Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 30282f8281 |
|
Before Width: | Height: | Size: 661 B |
|
Before Width: | Height: | Size: 398 B |
|
Before Width: | Height: | Size: 1.3 KiB |
@@ -1,4 +1,5 @@
|
|||||||
# SuperBowl Squares
|
# MFGUSB
|
||||||
Superbowl Squares
|
Main MFG test using USB
|
||||||
|
This version is for internal use with mySQL instead of AWS
|
||||||
Larry Lam
|
Larry Lam
|
||||||
vnlisting@gmail.com
|
llam@silver-peak.com
|
||||||
|
|||||||
@@ -1,92 +0,0 @@
|
|||||||
|
|
||||||
###########################################################################
|
|
||||||
VNSB Squares
|
|
||||||
Version: 4.3
|
|
||||||
Released: 1/29/2019
|
|
||||||
Written: www.VNLISTING.com
|
|
||||||
Demo: http://www.vnlisting.com/superbowl
|
|
||||||
Forum: http://forum.vnlisting.com/
|
|
||||||
Email: admin@vnlisting.com
|
|
||||||
|
|
||||||
This is a free script released under the (gpl.txt) GENERAL PUBLIC LICENSE
|
|
||||||
In addition, you agree to:
|
|
||||||
1. Not to make any financial gain from this script.
|
|
||||||
2. Not to distribution this scrip as your own.
|
|
||||||
3. If you make any improvement to this script, you must send
|
|
||||||
a copy to admin@vnlisting.com.
|
|
||||||
4. ALL acknowledgements must remain as it.
|
|
||||||
5. A link back to www.vnlisting.com is required.
|
|
||||||
6. For $25 donation, you can remove links back to us, and get supports.
|
|
||||||
###########################################################################
|
|
||||||
|
|
||||||
For a small donation I can help ::::::::::::::::::::::::::::::::::::::::
|
|
||||||
|
|
||||||
1. Setup/install this script on your server.
|
|
||||||
2. Setup/install this script on our server. You will get a seperate
|
|
||||||
URL for your group to use without having to by a domain name or
|
|
||||||
pay for posting else where.
|
|
||||||
3. Most support can be found on the forum, But if you still need help
|
|
||||||
let me know.
|
|
||||||
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
|
||||||
|
|
||||||
|
|
||||||
This scripts will require some knowledge of PHP and MySQL.
|
|
||||||
|
|
||||||
Requirements:
|
|
||||||
- Good knowledge of PHP and MySQL
|
|
||||||
- PHP and MySQL
|
|
||||||
- Mail configuration for PHP "mail" function, for email notification to work
|
|
||||||
- This was tested with PHP 5.1.2, mySQL 5.0.18, Firefox2, and IE7
|
|
||||||
|
|
||||||
How to install:
|
|
||||||
1. Unzip VNSBsquares_v50.zip and copy all files to your web server.
|
|
||||||
2. run the 'setup.php' from your web browser.
|
|
||||||
i.e. http://www.yourdomain.com/superbowl/setup.php
|
|
||||||
3. delete 'setup.php' before go live.
|
|
||||||
|
|
||||||
|
|
||||||
Usage:
|
|
||||||
1. On your browser, type "www.yourdomain.com/superbowl" or wherever you uploaded the files
|
|
||||||
2. Click on any "AVAILABLE" squares to make the selection. Click "Submit" when all squares are selected.
|
|
||||||
3. Emails will be sent to the Admin and the user when selection is made.
|
|
||||||
|
|
||||||
|
|
||||||
Administrator:
|
|
||||||
1. Use "www.yourdomain.com/superbowl/admin.php" to approve/confirm each selected square.
|
|
||||||
2. Email will be send to user and admin for each confirmation.
|
|
||||||
3. When all squares are selected, run randomnumber.php to randomly generate numbers.
|
|
||||||
4. Email to everyone when random numbers have been generated.
|
|
||||||
5. Enter scores from the admin page
|
|
||||||
|
|
||||||
|
|
||||||
===================== CHANGES FROM 4.1 to 5.0 =================================
|
|
||||||
1. Add scores, winner indications, email winners
|
|
||||||
2. php7 compatible
|
|
||||||
3. easily install and configuration from webpage
|
|
||||||
|
|
||||||
|
|
||||||
===================== CHANGES FROM 4.0 to 4.1 =================================
|
|
||||||
1. Admin above to confirm all squares from the same users at once.
|
|
||||||
2. Improve email sending header
|
|
||||||
3. Improve session header
|
|
||||||
|
|
||||||
===================== CHANGES FROM 3.0 to 4.0 =================================
|
|
||||||
1. Move superbowl logo to the database for easy change each year
|
|
||||||
2. User will be able to make multiple picks before enter information
|
|
||||||
3. Removed Admin link from user pages
|
|
||||||
|
|
||||||
===================== CHANGES FROM 2.0 to 3.0 =================================
|
|
||||||
|
|
||||||
Bugs fixed:
|
|
||||||
1. In generals, it's much more user/admin friendly. Clean up a lot of coding styles.
|
|
||||||
2. The square will be locked when the first person select it. This will eliminate the problem
|
|
||||||
with two persons register for the same square at the approximate same time.
|
|
||||||
3. Selected squares cannot be override by some sneaky person by direct access to the square
|
|
||||||
via the URL. (Don't worry if you don't know what this mean).
|
|
||||||
4. Admin only required to login once instead of verifying admin email and password each confirmation.
|
|
||||||
5. Random number selection is now require login.
|
|
||||||
i
|
|
||||||
|
|
||||||
|
|
||||||
TODO:
|
|
||||||
- Paypal implementation
|
|
||||||
@@ -1,137 +0,0 @@
|
|||||||
-- phpMyAdmin SQL Dump
|
|
||||||
-- version 2.8.0.1
|
|
||||||
-- http://www.phpmyadmin.net
|
|
||||||
--
|
|
||||||
-- Host: custsql-pow13
|
|
||||||
-- Generation Time: Jan 22, 2018 at 02:13 PM
|
|
||||||
-- Server version: 5.6.37
|
|
||||||
-- PHP Version: 4.4.9
|
|
||||||
--
|
|
||||||
-- Database: `superbowl_li`
|
|
||||||
--
|
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `VNSB_squares`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `VNSB_squares`;
|
|
||||||
CREATE TABLE IF NOT EXISTS `VNSB_squares` (
|
|
||||||
`SQUARE` varchar(15) NOT NULL DEFAULT '',
|
|
||||||
`NAME` varchar(30) NOT NULL DEFAULT 'AVAILABLE',
|
|
||||||
`EMAIL` varchar(45) DEFAULT NULL,
|
|
||||||
`NOTES` text,
|
|
||||||
`DATE` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
|
||||||
`CONFIRM` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
`FIRST` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
`HALF` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
`THIRD` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
`FINAL` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
UNIQUE KEY `SQUARE` (`SQUARE`)
|
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Super Bowl Squares';
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping data for table `VNSB_squares`
|
|
||||||
--
|
|
||||||
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('00', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('01', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('02', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('03', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('04', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('05', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('06', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('07', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('08', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('09', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('10', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('11', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('12', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('13', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('14', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('15', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('16', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('17', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('18', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('19', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('20', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('21', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('22', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('23', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('24', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('25', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('26', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('27', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('28', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('29', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('30', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('31', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('32', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('33', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('34', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('35', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('36', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('37', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('38', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('39', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('40', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('41', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('42', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('43', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('44', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('45', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('46', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('47', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('48', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('49', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('50', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('51', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('52', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('53', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('54', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('55', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('56', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('57', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('58', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('59', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('60', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('61', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('62', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('63', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('64', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('65', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('66', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('67', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('68', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('69', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('70', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('71', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('72', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('73', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('74', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('75', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('76', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('77', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('78', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('79', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('80', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('81', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('82', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('83', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('84', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('85', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('86', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('87', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('88', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('89', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('90', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('91', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('92', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('93', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('94', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('95', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('96', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('97', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('98', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('99', 'AVAILABLE', NULL, NULL, '0000-00-00 00:00:00', 0, 0, 0, 0, 0);
|
|
||||||
@@ -1,215 +0,0 @@
|
|||||||
<?php
|
|
||||||
session_start();
|
|
||||||
@ob_start();
|
|
||||||
|
|
||||||
#www.vnlisting.com
|
|
||||||
#Online Super Bowl Squares Script
|
|
||||||
#Please read the "Readme.txt for license agreement, installation and usage instructions
|
|
||||||
|
|
||||||
|
|
||||||
if (!isset($_SESSION['VNSB'])) {
|
|
||||||
?>
|
|
||||||
<meta http-equiv="Refresh"content="0;url=adminlogin.php">
|
|
||||||
<?php
|
|
||||||
} else {
|
|
||||||
|
|
||||||
require "includes/dbTables.inc";
|
|
||||||
$conn = dbConnection();
|
|
||||||
if (!$conn) {
|
|
||||||
die("Are you sure your database is setup correctly? I'm giving up!". mysqli_connect_error());
|
|
||||||
}
|
|
||||||
|
|
||||||
$superbowlURL = $_SERVER['REQUEST_SCHEME']."://".$_SERVER['HTTP_HOST'].trim($_SERVER['PHP_SELF'], "admin.php");
|
|
||||||
$confirmation = $_POST['Confirmation'];
|
|
||||||
$SQUARE = $_POST['square'];
|
|
||||||
$CONFIRM = $_POST['confirm'];
|
|
||||||
$RELEASE = $_POST['release'];
|
|
||||||
$NOTES = $_POST['body'];
|
|
||||||
|
|
||||||
require "includes/header.inc";
|
|
||||||
|
|
||||||
//$headers = "From: $ADMIN_EMAIL\r\nBcc: $ADMIN_EMAIL\r\n";
|
|
||||||
|
|
||||||
// To send HTML mail, the Content-type header must be set
|
|
||||||
$headers = 'MIME-Version: 1.0' . "\r\n";
|
|
||||||
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
|
|
||||||
|
|
||||||
// Additional headers
|
|
||||||
//$headers .= 'To: Mary <mary@example.com>, Kelly <kelly@example.com>' . "\r\n";
|
|
||||||
$headers .= "From: Admin <$ADMIN_EMAIL>" . "\r\n";
|
|
||||||
//$headers .= 'Cc: birthdayarchive@example.com' . "\r\n";
|
|
||||||
$headers .= 'Bcc: Admin <$ADMIN_EMAIL>' . "\r\n";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function notify_admin ($mailto, $mailmessage, $mail_headers)
|
|
||||||
{
|
|
||||||
mail("$mailto", "Super Bowl Squares", "$mailmessage", "$mail_headers");
|
|
||||||
//echo "mail(\"$mailto\", \"Super Bowl Squares\", \"$mailmessage\", \"$mail_headers\")</br>;";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<h3>ADMINISTRATOR APPROVAL</h3>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
if (!isset($confirmation)) { ?>
|
|
||||||
<table width="50%" cellpadding="5" style="font-family: verdana, arial; border: #FFCC99 1px solid">
|
|
||||||
<tr>
|
|
||||||
<td height="28" colspan="3" align="center" style="font-size: 11px">
|
|
||||||
<strong>Confirm user selected square when payment is verified, or release the square if allowed time for payment has expired.</strong>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td width="" align="center" valign="top">
|
|
||||||
<form name="approval" action="admin.php" method="post" enctype="multipart/form-data">
|
|
||||||
<table width="100%" border="0" style="font-family: verdana, arial; font-size: 11px">
|
|
||||||
<tr>
|
|
||||||
<td><b>Square</b></td>
|
|
||||||
<td>
|
|
||||||
<select name="square[]" id="square" size="11" multiple>
|
|
||||||
<!--<option value="">Select One</option>-->
|
|
||||||
<?php
|
|
||||||
$sql="SELECT * FROM `VNSB_squares` WHERE NAME!='AVAILABLE' AND NAME!='' AND CONFIRM='0' ORDER BY NAME, SQUARE";
|
|
||||||
$result = mysqli_query($conn, $sql);
|
|
||||||
if (!$result) {
|
|
||||||
echo mysqli_error();
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
while ($record = mysqli_fetch_assoc($result)) {
|
|
||||||
echo "<option value = '".$record['SQUARE']."'>".$record["NAME"]." - ".$record["SQUARE"]."</option>";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><b>Confirm</b></td>
|
|
||||||
<td><input type="checkbox" name="confirm" value="1"></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><b>Release</b></td>
|
|
||||||
<td><input type="checkbox" name="release" value="1"></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><b>Notes to User</b></td>
|
|
||||||
<td><textarea name="body" rows="3" cols="50" wrap="virtual" style="font-family: verdana, arial; font-size: 10px"></textarea></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td> </a></td>
|
|
||||||
<td><br/><p><input type="submit" value="Confirmation" name="Confirmation"></p></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</form>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<p>
|
|
||||||
<table width="50%" border="0" cellspacing="0" cellpadding="0" style="font-family: verdana, arial; font-size: 12px">
|
|
||||||
<tr>
|
|
||||||
<td width="25%"><a href="<?php echo $superbowlURL; ?>" title="Home">Home</a></td>
|
|
||||||
<td width="25%" align="center"><a href="randomnumber.php" title="Random Numbers">Numbers</a></td>
|
|
||||||
<td width="25%" align="center"><a href="scores.php" title="Enter scores">Scores</a></td>
|
|
||||||
<td width="25%" align="right"><a href="adminlogout.php" title="Admin logout">Logout</a></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</p>
|
|
||||||
<?php
|
|
||||||
} else {
|
|
||||||
if (count($SQUARE) > 0){
|
|
||||||
$input = "";
|
|
||||||
$whereclause = "(";
|
|
||||||
|
|
||||||
for($e=0; $e<count($SQUARE); $e++){
|
|
||||||
$whereclause = $whereclause . "SQUARE = '" . trim($SQUARE[$e]) . "' OR ";
|
|
||||||
$square_list = $square_list .", ".$SQUARE[$e];
|
|
||||||
}
|
|
||||||
|
|
||||||
$whereclause = substr_replace($whereclause,"",-3); // strip off ' OR'
|
|
||||||
$whereclause = $whereclause .")";
|
|
||||||
|
|
||||||
$square_list = substr_replace($square_list,"",0,2);
|
|
||||||
//echo $square_list."</br>";
|
|
||||||
|
|
||||||
$sql="SELECT * FROM `VNSB_squares` WHERE $whereclause";
|
|
||||||
//echo $sql."</br>";
|
|
||||||
$result = mysqli_query($conn, $sql);
|
|
||||||
if (!$result) {
|
|
||||||
echo mysqli_error();
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
$USER_EMAIL_LIST = '';
|
|
||||||
while ($record = mysqli_fetch_assoc($result)) {
|
|
||||||
$USER_EMAIL = '';
|
|
||||||
$USER_EMAIL = $record["EMAIL"];
|
|
||||||
|
|
||||||
$pos = strpos($USER_EMAIL_LIST,$USER_EMAIL);
|
|
||||||
if($pos === false) {
|
|
||||||
// string $USER_EMAIL NOT found in $USER_EMAIL_LIST
|
|
||||||
$USER_EMAIL_LIST = $USER_EMAIL_LIST .",".$USER_EMAIL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$USER_EMAIL_LIST = substr_replace($USER_EMAIL_LIST,"",0,1);
|
|
||||||
|
|
||||||
$bodyMessage = "\r\nNOTIFICATION\r\n";
|
|
||||||
//echo $bodyMessage."</br>";
|
|
||||||
if ($CONFIRM==1 AND $RELEASE!=1) {
|
|
||||||
$sql="UPDATE `VNSB_squares` SET CONFIRM='1' WHERE $whereclause";
|
|
||||||
$bodyMessage .= "Your square $square_list is now confirmed.\r\n\n";
|
|
||||||
} else if ($RELEASE==1 AND $CONFIRM!=1) {
|
|
||||||
$sql="UPDATE `VNSB_squares` SET NAME='AVAILABLE', EMAIL='', NOTES='', DATE='', CONFIRM='0' WHERE $whereclause";
|
|
||||||
$bodyMessage .= "Your square $square_list selection is now released due to no payment.\r\n";
|
|
||||||
$bodyMessage .= "If this is an error, please contact me or re-select your square.\r\n\n";
|
|
||||||
} else if (($CONFIRM!=1 AND $RELEASE!=1) OR ($RELEASE==1 AND $CONFIRM==1) ) {
|
|
||||||
echo "<p>Must select ONLY one 'Confirm' or 'Release' !!!</p>";
|
|
||||||
echo "<p><a href='javascript:onClick=history.go(-1);'>Back</a></p>";
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
//echo $sql."</br>";
|
|
||||||
$result = mysqli_query($conn, $sql);
|
|
||||||
if (!$result) {
|
|
||||||
echo mysqli_error();
|
|
||||||
} else {
|
|
||||||
$bodyMessage .= $NOTES."\r\n\n";
|
|
||||||
$bodyMessage .= "Good Luck and enjoy the game.\r\n";
|
|
||||||
$bodyMessage .= "The Commissioner\r\n";
|
|
||||||
$bodyMessage .= "$superbowlURL\r\n";
|
|
||||||
|
|
||||||
notify_admin($USER_EMAIL_LIST,$bodyMessage,$headers);
|
|
||||||
echo "<p>Square(s) <b>".$square_list."</b> updated successful</p>";
|
|
||||||
echo "<p>Emailed to: ".$USER_EMAIL_LIST."</p>";
|
|
||||||
echo "
|
|
||||||
<p>
|
|
||||||
<table width=\"50%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-family: verdana, arial; font-size: 12px\">
|
|
||||||
<tr>
|
|
||||||
<td width=\"33%\"><a href=\"$superbowlURL\" title=\"Administrator\">Home</a></td>
|
|
||||||
<td width=\"34%\" align=\"center\"><a href=\"./admin.php\" title=\"Administrator\">Admin</a></td>
|
|
||||||
<td width=\"33%\" align=\"right\"><a href=\"adminlogout.php\" title=\"Admin logout\">Logout</a></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</p>";
|
|
||||||
unset($confirmation, $SQUARE, $CONFIRM, $RELEASE, $NOTES, $ADM_EMAIL, $ADM_PASSWORD);
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
echo "<p>Must select at least one Square to Confirm or Release' !!!</p>";
|
|
||||||
echo "<p><a href='javascript:onClick=history.go(-1);'>Back</a></p>";
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
} ?>
|
|
||||||
<p align="center" style="">
|
|
||||||
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
|
|
||||||
<input type="hidden" name="cmd" value="_xclick">
|
|
||||||
<input type="hidden" name="business" value="admin@vnlisting.com">
|
|
||||||
<input type="hidden" name="item_name" value="NFL Super Bowl Squares Scripts">
|
|
||||||
<input type="hidden" name="item_number" value="3">
|
|
||||||
<!-- <b>Enter Donation amount: $</b><input type="text" name="amount" value="" size=6> <input type=submit value="click here to Donate">
|
|
||||||
-->
|
|
||||||
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
|
|
||||||
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHNwYJKoZIhvcNAQcEoIIHKDCCByQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYA2estwKoVCckgAdhQywU8gbgrJxnSDQ7U3kcDzp9kVWh+ey7JmejervwbjeKiNvgmzBdJUD3irqnFiD88iiD3EnwrzJKNz7HYnh260uFNaUnhjWhalkK5aGgDzvI6vq7xQ1fRQu6AYbSr8IIqxpU/FyMvLdDP/LRt6BOTwEH3IgzELMAkGBSsOAwIaBQAwgbQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIH4rlyAySQpuAgZBZdfgl60vRvSNmf/jg7soyG4rj8L5IwDwAmx7vSnYQLqQUUOmyQ9ZPIoaUR7y8bwdf1Gzou86Q9mHu3eV3lvWQAyKi01BgYmDj0ENoycpQqDs8pBZzwY1qh6atvcc/+sLoHzZ5uUqBA3RWExEU1W4r36YnOni+AChBKfBB5PWv2/bzZSrO41LXN1CnWNcaN06gggOHMIIDgzCCAuygAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20wHhcNMDQwMjEzMTAxMzE1WhcNMzUwMjEzMTAxMzE1WjCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMFHTt38RMxLXJyO2SmS+Ndl72T7oKJ4u4uw+6awntALWh03PewmIJuzbALScsTS4sZoS1fKciBGoh11gIfHzylvkdNe/hJl66/RGqrj5rFb08sAABNTzDTiqqNpJeBsYs/c2aiGozptX2RlnBktH+SUNpAajW724Nv2Wvhif6sFAgMBAAGjge4wgeswHQYDVR0OBBYEFJaffLvGbxe9WT9S1wob7BDWZJRrMIG7BgNVHSMEgbMwgbCAFJaffLvGbxe9WT9S1wob7BDWZJRroYGUpIGRMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbYIBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAIFfOlaagFrl71+jq6OKidbWFSE+Q4FqROvdgIONth+8kSK//Y/4ihuE4Ymvzn5ceE3S/iBSQQMjyvb+s2TWbQYDwcp129OPIbD9epdr4tJOUNiSojw7BHwYRiPh58S1xGlFgHFXwrEBb3dgNbMUa+u4qectsMAXpVHnD9wIyfmHMYIBmjCCAZYCAQEwgZQwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wNjAxMjEwMDQ2MjZaMCMGCSqGSIb3DQEJBDEWBBTq5veqr7s7hYvPRjaEeymblr5ImjANBgkqhkiG9w0BAQEFAASBgAv448wf84lW4+N1Sd7g6Kt+SJ4gJ5goll8sDzSYz8aRxvLqx4P6ZLPxNOLOYTgTkGPzFY0D6m2kuFslf8usxGv8f8grSeN9rLdpAJfyNxdfKgsnCIke4Id25Tcj7nBvvL7fiRiQo8cTJHTg9SdJlfb6MkyZoZKN25xrNqman0cx-----END PKCS7-----
|
|
||||||
">
|
|
||||||
</form>
|
|
||||||
</p>
|
|
||||||
<?php require "includes/footer.inc";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
@@ -1,88 +0,0 @@
|
|||||||
<!--
|
|
||||||
www.vnlisting.com
|
|
||||||
Online Super Bowl Squares Script
|
|
||||||
Please read the "Readme.txt for license agreement, installation and usage instructions
|
|
||||||
-->
|
|
||||||
|
|
||||||
<?php
|
|
||||||
@ob_start();
|
|
||||||
session_start();
|
|
||||||
?>
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>ADMIN - Login</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<center>
|
|
||||||
<?php
|
|
||||||
$email=$_POST['AdminEmail'];
|
|
||||||
$pass=$_POST['AdminPass'];
|
|
||||||
|
|
||||||
// check to see if details have been passed to the script by the form
|
|
||||||
if ($email && $pass) {
|
|
||||||
if ($_SESSION['VNSB']) {
|
|
||||||
echo $email.", you are already logged in.<br/><br/>";
|
|
||||||
echo "<a href='admin.php'>Admin</a><br/><br/><a href='adminlogout.php'>Log out.</a>";
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
// check input variables against database
|
|
||||||
include('includes/dbTables.inc');
|
|
||||||
$conn = dbConnection();
|
|
||||||
if (!$conn) {
|
|
||||||
die("Are you sure your database is setup correctly? I'm giving up!". mysqli_connect_error());
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql = "SELECT Admin_email, Admin_pwd FROM `VNSB_settings`";
|
|
||||||
$result = mysqli_query($conn, $sql);
|
|
||||||
// in case of an error, throw up an error message and exit
|
|
||||||
if (!$result) {
|
|
||||||
echo "Sorry, there is a problem with accessing your database!!!";
|
|
||||||
exit;
|
|
||||||
} else {
|
|
||||||
$record = mysqli_fetch_assoc($result);
|
|
||||||
if ($email==$record['Admin_email'] AND md5($pass)==$record['Admin_pwd']) {
|
|
||||||
$_SESSION['VNSB']=$record['Admin_email'];
|
|
||||||
mysqli_close($conn);
|
|
||||||
header ("Location: admin.php");
|
|
||||||
} else {
|
|
||||||
echo "<center><h1>Invalid login</h1><p><a href=\"adminlogin.php\">Admin login</a></p></center>";
|
|
||||||
mysqli_close($conn);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
<br />
|
|
||||||
<p>
|
|
||||||
<p style="width:60%"><strong>Welcome, Admin!</strong><br />
|
|
||||||
If you feel that the work I've done has value to you, I would greatly appreciate a paypal donation (click button below). I have spent many hours working on this project, and I will continue its development as I find the time. Again, I am very grateful for any and all contributions.</p>
|
|
||||||
|
|
||||||
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
|
|
||||||
<input type="hidden" name="cmd" value="_xclick">
|
|
||||||
<input type="hidden" name="business" value="admin@vnlisting.com">
|
|
||||||
<input type="hidden" name="item_name" value="NFL Super Bowl Squares Scripts">
|
|
||||||
<input type="hidden" name="item_number" value="3">
|
|
||||||
<b>Enter Donation amount: $</b><input type="text" name="amount" value="" size=6> <input type=submit value="click here to Donate">
|
|
||||||
|
|
||||||
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
|
|
||||||
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHNwYJKoZIhvcNAQcEoIIHKDCCByQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYA2estwKoVCckgAdhQywU8gbgrJxnSDQ7U3kcDzp9kVWh+ey7JmejervwbjeKiNvgmzBdJUD3irqnFiD88iiD3EnwrzJKNz7HYnh260uFNaUnhjWhalkK5aGgDzvI6vq7xQ1fRQu6AYbSr8IIqxpU/FyMvLdDP/LRt6BOTwEH3IgzELMAkGBSsOAwIaBQAwgbQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIH4rlyAySQpuAgZBZdfgl60vRvSNmf/jg7soyG4rj8L5IwDwAmx7vSnYQLqQUUOmyQ9ZPIoaUR7y8bwdf1Gzou86Q9mHu3eV3lvWQAyKi01BgYmDj0ENoycpQqDs8pBZzwY1qh6atvcc/+sLoHzZ5uUqBA3RWExEU1W4r36YnOni+AChBKfBB5PWv2/bzZSrO41LXN1CnWNcaN06gggOHMIIDgzCCAuygAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20wHhcNMDQwMjEzMTAxMzE1WhcNMzUwMjEzMTAxMzE1WjCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMFHTt38RMxLXJyO2SmS+Ndl72T7oKJ4u4uw+6awntALWh03PewmIJuzbALScsTS4sZoS1fKciBGoh11gIfHzylvkdNe/hJl66/RGqrj5rFb08sAABNTzDTiqqNpJeBsYs/c2aiGozptX2RlnBktH+SUNpAajW724Nv2Wvhif6sFAgMBAAGjge4wgeswHQYDVR0OBBYEFJaffLvGbxe9WT9S1wob7BDWZJRrMIG7BgNVHSMEgbMwgbCAFJaffLvGbxe9WT9S1wob7BDWZJRroYGUpIGRMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbYIBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAIFfOlaagFrl71+jq6OKidbWFSE+Q4FqROvdgIONth+8kSK//Y/4ihuE4Ymvzn5ceE3S/iBSQQMjyvb+s2TWbQYDwcp129OPIbD9epdr4tJOUNiSojw7BHwYRiPh58S1xGlFgHFXwrEBb3dgNbMUa+u4qectsMAXpVHnD9wIyfmHMYIBmjCCAZYCAQEwgZQwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wNjAxMjEwMDQ2MjZaMCMGCSqGSIb3DQEJBDEWBBTq5veqr7s7hYvPRjaEeymblr5ImjANBgkqhkiG9w0BAQEFAASBgAv448wf84lW4+N1Sd7g6Kt+SJ4gJ5goll8sDzSYz8aRxvLqx4P6ZLPxNOLOYTgTkGPzFY0D6m2kuFslf8usxGv8f8grSeN9rLdpAJfyNxdfKgsnCIke4Id25Tcj7nBvvL7fiRiQo8cTJHTg9SdJlfb6MkyZoZKN25xrNqman0cx-----END PKCS7-----
|
|
||||||
">
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</p>
|
|
||||||
<br>
|
|
||||||
<h2>Admin login</h2>
|
|
||||||
|
|
||||||
<form method="post" action="adminlogin.php">
|
|
||||||
<p> Email: <input name="AdminEmail" type="email" size="30"></p>
|
|
||||||
<p> Password: <input name="AdminPass" type="password" size="30"></p>
|
|
||||||
<p> <input type="submit" value="Login"></p>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</center>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
<?php
|
|
||||||
session_start();
|
|
||||||
?>
|
|
||||||
|
|
||||||
<HTML>
|
|
||||||
<head>
|
|
||||||
<title>ADMIN - Logout</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
|
|
||||||
<center>
|
|
||||||
|
|
||||||
<H2>Logout</H2>
|
|
||||||
<?php
|
|
||||||
// if the user is logged in, log them out
|
|
||||||
if ($_SESSION['VNSB']) {
|
|
||||||
unset($_SESSION['VNSB']);
|
|
||||||
echo "You are now logged out.";
|
|
||||||
echo "<br><br><em>Don't forget to close your brower when you are done!!!</em>";
|
|
||||||
|
|
||||||
// if the user isnt logged in, let them know that
|
|
||||||
} else {
|
|
||||||
echo "You haven't even logged in yet.";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<p><a href="<?php echo $_SERVER['REQUEST_SCHEME']."://".$_SERVER['HTTP_HOST'].trim($_SERVER['PHP_SELF'], "adminlogout.php");?>">Home</a></p>
|
|
||||||
<p><a href="admin.php">Admin</a></p>
|
|
||||||
|
|
||||||
</center>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
<!--
|
|
||||||
www.vnlisting.com
|
|
||||||
Online Super Bowl Squares Script
|
|
||||||
Please read the "Readme.txt for license agreement, installtion and usage instructions
|
|
||||||
-->
|
|
||||||
|
|
||||||
<?php
|
|
||||||
// Full URL path to your superbowl. ex. www.yoursite.com/superbowl
|
|
||||||
$superbowlURL = "http://www.vnlisting.com/superbowl";
|
|
||||||
|
|
||||||
//make changes accordingly to your database
|
|
||||||
$hostname = "localhost";
|
|
||||||
$database = "superbowl";
|
|
||||||
$username = "superbowl";
|
|
||||||
$password = "password";
|
|
||||||
$db = mysql_connect($hostname, $username, $password);
|
|
||||||
$db_select = mysql_select_db($database, $db) or mysql_error();
|
|
||||||
?>
|
|
||||||
@@ -1,104 +0,0 @@
|
|||||||
<!--
|
|
||||||
www.vnlisting.com
|
|
||||||
Online Super Bowl Squares Script
|
|
||||||
Please read the "Readme.txt for license agreement, installation and usage instructions
|
|
||||||
Version: 4.1 1/9/2012
|
|
||||||
-->
|
|
||||||
|
|
||||||
<?php
|
|
||||||
@ob_start();
|
|
||||||
session_start();
|
|
||||||
|
|
||||||
if (!$_SESSION['VNSB']) {
|
|
||||||
?>
|
|
||||||
<meta http-equiv="Refresh"content="0;url=adminlogin.php">
|
|
||||||
<?php
|
|
||||||
} else {
|
|
||||||
$superbowlURL = $_SERVER['REQUEST_SCHEME']."://".$_SERVER['HTTP_HOST'].trim($_SERVER['PHP_SELF'], "emailall.php");
|
|
||||||
|
|
||||||
require_once('includes/dbTables.inc');
|
|
||||||
$conn = dbConnection();
|
|
||||||
if (!$conn) {
|
|
||||||
die("Are you sure your database is setup correctly? I'm giving up!".mysqli_connect_error());
|
|
||||||
}
|
|
||||||
|
|
||||||
$sendemails = $_POST['sendemails'];
|
|
||||||
|
|
||||||
$LINKS = "
|
|
||||||
<p>
|
|
||||||
<table width=\"50%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-family: verdana, arial; font-size: 12px\">
|
|
||||||
<tr>
|
|
||||||
<td width=\"33%\"><a href=\"$superbowlURL\" title=\"Home\">Home</a></td>
|
|
||||||
<td width=\"34%\" align=\"center\"><a href=\"admin.php\" title=\"Administrator\">Admin</a></td>
|
|
||||||
<td width=\"33%\" align=\"right\"><a href=\"adminlogout.php\" title=\"Admin logout\">Logout</a></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</p>
|
|
||||||
";
|
|
||||||
|
|
||||||
|
|
||||||
require "includes/header.inc";
|
|
||||||
|
|
||||||
function notify_admin ($mailto, $mailmessage, $mail_headers)
|
|
||||||
{
|
|
||||||
mail("$mailto", "Super Bowl Squares", "$mailmessage", "$mail_headers");
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<h3>Send Email to ALL</h3>
|
|
||||||
<?php
|
|
||||||
if (!isset($sendemails)) { ?>
|
|
||||||
<table width="50%" cellpadding="5" style="font-family: verdana, arial; border: #FFCC99 1px solid">
|
|
||||||
<tr>
|
|
||||||
<td height="28" colspan="3" align="center" style="font-size: 11px">
|
|
||||||
<strong>Click the button below to send an email to everyone and let them know the numbers have been picked and assigned for them to view and print as needed.</strong>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td width="" align="center" valign="top">
|
|
||||||
<form name="approval" action="emailall.php" method="post">
|
|
||||||
<table width="100%" border="0" style="font-family: verdana, arial; font-size: 11px">
|
|
||||||
<tr>
|
|
||||||
<td> </a></td>
|
|
||||||
<td align="center"><br/><p><input type="submit" value="Send Emails" name="sendemails"></p></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</form>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<?php
|
|
||||||
echo $LINKS;
|
|
||||||
|
|
||||||
} else {
|
|
||||||
echo "<p>Emails send to:</p>";
|
|
||||||
$bodyMessage = "\r\nNOTIFICATION\r\n";
|
|
||||||
$bodyMessage .= "All squares have been selected and all numbers have been picked and assigned.\r\n";
|
|
||||||
$bodyMessage .= "You can view and print your own sheet at $superbowlURL.\r\n\n";
|
|
||||||
$bodyMessage .= "Good Luck and enjoy the game.\r\n";
|
|
||||||
$bodyMessage .= "The Commissioner\r\n";
|
|
||||||
$headers = "From: $ADMIN_EMAIL\r\n";
|
|
||||||
$sql="SELECT * FROM VNSB_squares ORDER BY EMAIL";
|
|
||||||
$result = mysqli_query($conn, $sql);
|
|
||||||
if (!$result) {
|
|
||||||
echo mysqli_error();
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
while ($record = mysqli_fetch_assoc($result)) {
|
|
||||||
if ($USER_EMAIL != $record["EMAIL"]) {
|
|
||||||
$USER_NAME = $record["NAME"];
|
|
||||||
$USER_EMAIL = $record["EMAIL"];
|
|
||||||
notify_admin($USER_EMAIL,$bodyMessage,$headers);
|
|
||||||
echo "<p><b>".$USER_NAME."</b>: ".$USER_EMAIL."</p>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
echo $LINKS;
|
|
||||||
unset($sendemails);
|
|
||||||
$headers = "From: $ADMIN_EMAIL\r\n";
|
|
||||||
notify_admin($ADMIN_EMAIL,$bodyMessage,$headers);
|
|
||||||
} ?>
|
|
||||||
<?php require "includes/footer.inc";
|
|
||||||
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
Before Width: | Height: | Size: 1.5 KiB |
@@ -1,19 +0,0 @@
|
|||||||
<!--
|
|
||||||
www.vnlisting.com
|
|
||||||
Online Super Bowl Squares Script
|
|
||||||
Please read the "Readme.txt for license agreement, installation and usage instructions
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- You may not and shall not make any changes to this file -->
|
|
||||||
<p>
|
|
||||||
<table width="95%" style="font-family: verdana, arial; font-size: 9px">
|
|
||||||
<tr>
|
|
||||||
<td>Copyright © 2004-<?=date("Y")?> <a href="http://www.vnlisting.com/freescripts.php" title="Vietnamese Business Directory" target="_parent">VNLISTING</a></td>
|
|
||||||
<td align="right"><a href="http://www.vnlisting.com/freescripts.php" title="Download & Support" target="_parent">VNSB Squares <?=$VERSION?></a></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</p>
|
|
||||||
</center>
|
|
||||||
<?php mysql_close($db); ?>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,340 +0,0 @@
|
|||||||
GNU GENERAL PUBLIC LICENSE
|
|
||||||
Version 2, June 1991
|
|
||||||
|
|
||||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
|
||||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
The licenses for most software are designed to take away your
|
|
||||||
freedom to share and change it. By contrast, the GNU General Public
|
|
||||||
License is intended to guarantee your freedom to share and change free
|
|
||||||
software--to make sure the software is free for all its users. This
|
|
||||||
General Public License applies to most of the Free Software
|
|
||||||
Foundation's software and to any other program whose authors commit to
|
|
||||||
using it. (Some other Free Software Foundation software is covered by
|
|
||||||
the GNU Library General Public License instead.) You can apply it to
|
|
||||||
your programs, too.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
|
||||||
have the freedom to distribute copies of free software (and charge for
|
|
||||||
this service if you wish), that you receive source code or can get it
|
|
||||||
if you want it, that you can change the software or use pieces of it
|
|
||||||
in new free programs; and that you know you can do these things.
|
|
||||||
|
|
||||||
To protect your rights, we need to make restrictions that forbid
|
|
||||||
anyone to deny you these rights or to ask you to surrender the rights.
|
|
||||||
These restrictions translate to certain responsibilities for you if you
|
|
||||||
distribute copies of the software, or if you modify it.
|
|
||||||
|
|
||||||
For example, if you distribute copies of such a program, whether
|
|
||||||
gratis or for a fee, you must give the recipients all the rights that
|
|
||||||
you have. You must make sure that they, too, receive or can get the
|
|
||||||
source code. And you must show them these terms so they know their
|
|
||||||
rights.
|
|
||||||
|
|
||||||
We protect your rights with two steps: (1) copyright the software, and
|
|
||||||
(2) offer you this license which gives you legal permission to copy,
|
|
||||||
distribute and/or modify the software.
|
|
||||||
|
|
||||||
Also, for each author's protection and ours, we want to make certain
|
|
||||||
that everyone understands that there is no warranty for this free
|
|
||||||
software. If the software is modified by someone else and passed on, we
|
|
||||||
want its recipients to know that what they have is not the original, so
|
|
||||||
that any problems introduced by others will not reflect on the original
|
|
||||||
authors' reputations.
|
|
||||||
|
|
||||||
Finally, any free program is threatened constantly by software
|
|
||||||
patents. We wish to avoid the danger that redistributors of a free
|
|
||||||
program will individually obtain patent licenses, in effect making the
|
|
||||||
program proprietary. To prevent this, we have made it clear that any
|
|
||||||
patent must be licensed for everyone's free use or not licensed at all.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow.
|
|
||||||
.
|
|
||||||
GNU GENERAL PUBLIC LICENSE
|
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
|
||||||
|
|
||||||
0. This License applies to any program or other work which contains
|
|
||||||
a notice placed by the copyright holder saying it may be distributed
|
|
||||||
under the terms of this General Public License. The "Program", below,
|
|
||||||
refers to any such program or work, and a "work based on the Program"
|
|
||||||
means either the Program or any derivative work under copyright law:
|
|
||||||
that is to say, a work containing the Program or a portion of it,
|
|
||||||
either verbatim or with modifications and/or translated into another
|
|
||||||
language. (Hereinafter, translation is included without limitation in
|
|
||||||
the term "modification".) Each licensee is addressed as "you".
|
|
||||||
|
|
||||||
Activities other than copying, distribution and modification are not
|
|
||||||
covered by this License; they are outside its scope. The act of
|
|
||||||
running the Program is not restricted, and the output from the Program
|
|
||||||
is covered only if its contents constitute a work based on the
|
|
||||||
Program (independent of having been made by running the Program).
|
|
||||||
Whether that is true depends on what the Program does.
|
|
||||||
|
|
||||||
1. You may copy and distribute verbatim copies of the Program's
|
|
||||||
source code as you receive it, in any medium, provided that you
|
|
||||||
conspicuously and appropriately publish on each copy an appropriate
|
|
||||||
copyright notice and disclaimer of warranty; keep intact all the
|
|
||||||
notices that refer to this License and to the absence of any warranty;
|
|
||||||
and give any other recipients of the Program a copy of this License
|
|
||||||
along with the Program.
|
|
||||||
|
|
||||||
You may charge a fee for the physical act of transferring a copy, and
|
|
||||||
you may at your option offer warranty protection in exchange for a fee.
|
|
||||||
|
|
||||||
2. You may modify your copy or copies of the Program or any portion
|
|
||||||
of it, thus forming a work based on the Program, and copy and
|
|
||||||
distribute such modifications or work under the terms of Section 1
|
|
||||||
above, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) You must cause the modified files to carry prominent notices
|
|
||||||
stating that you changed the files and the date of any change.
|
|
||||||
|
|
||||||
b) You must cause any work that you distribute or publish, that in
|
|
||||||
whole or in part contains or is derived from the Program or any
|
|
||||||
part thereof, to be licensed as a whole at no charge to all third
|
|
||||||
parties under the terms of this License.
|
|
||||||
|
|
||||||
c) If the modified program normally reads commands interactively
|
|
||||||
when run, you must cause it, when started running for such
|
|
||||||
interactive use in the most ordinary way, to print or display an
|
|
||||||
announcement including an appropriate copyright notice and a
|
|
||||||
notice that there is no warranty (or else, saying that you provide
|
|
||||||
a warranty) and that users may redistribute the program under
|
|
||||||
these conditions, and telling the user how to view a copy of this
|
|
||||||
License. (Exception: if the Program itself is interactive but
|
|
||||||
does not normally print such an announcement, your work based on
|
|
||||||
the Program is not required to print an announcement.)
|
|
||||||
.
|
|
||||||
These requirements apply to the modified work as a whole. If
|
|
||||||
identifiable sections of that work are not derived from the Program,
|
|
||||||
and can be reasonably considered independent and separate works in
|
|
||||||
themselves, then this License, and its terms, do not apply to those
|
|
||||||
sections when you distribute them as separate works. But when you
|
|
||||||
distribute the same sections as part of a whole which is a work based
|
|
||||||
on the Program, the distribution of the whole must be on the terms of
|
|
||||||
this License, whose permissions for other licensees extend to the
|
|
||||||
entire whole, and thus to each and every part regardless of who wrote it.
|
|
||||||
|
|
||||||
Thus, it is not the intent of this section to claim rights or contest
|
|
||||||
your rights to work written entirely by you; rather, the intent is to
|
|
||||||
exercise the right to control the distribution of derivative or
|
|
||||||
collective works based on the Program.
|
|
||||||
|
|
||||||
In addition, mere aggregation of another work not based on the Program
|
|
||||||
with the Program (or with a work based on the Program) on a volume of
|
|
||||||
a storage or distribution medium does not bring the other work under
|
|
||||||
the scope of this License.
|
|
||||||
|
|
||||||
3. You may copy and distribute the Program (or a work based on it,
|
|
||||||
under Section 2) in object code or executable form under the terms of
|
|
||||||
Sections 1 and 2 above provided that you also do one of the following:
|
|
||||||
|
|
||||||
a) Accompany it with the complete corresponding machine-readable
|
|
||||||
source code, which must be distributed under the terms of Sections
|
|
||||||
1 and 2 above on a medium customarily used for software interchange; or,
|
|
||||||
|
|
||||||
b) Accompany it with a written offer, valid for at least three
|
|
||||||
years, to give any third party, for a charge no more than your
|
|
||||||
cost of physically performing source distribution, a complete
|
|
||||||
machine-readable copy of the corresponding source code, to be
|
|
||||||
distributed under the terms of Sections 1 and 2 above on a medium
|
|
||||||
customarily used for software interchange; or,
|
|
||||||
|
|
||||||
c) Accompany it with the information you received as to the offer
|
|
||||||
to distribute corresponding source code. (This alternative is
|
|
||||||
allowed only for noncommercial distribution and only if you
|
|
||||||
received the program in object code or executable form with such
|
|
||||||
an offer, in accord with Subsection b above.)
|
|
||||||
|
|
||||||
The source code for a work means the preferred form of the work for
|
|
||||||
making modifications to it. For an executable work, complete source
|
|
||||||
code means all the source code for all modules it contains, plus any
|
|
||||||
associated interface definition files, plus the scripts used to
|
|
||||||
control compilation and installation of the executable. However, as a
|
|
||||||
special exception, the source code distributed need not include
|
|
||||||
anything that is normally distributed (in either source or binary
|
|
||||||
form) with the major components (compiler, kernel, and so on) of the
|
|
||||||
operating system on which the executable runs, unless that component
|
|
||||||
itself accompanies the executable.
|
|
||||||
|
|
||||||
If distribution of executable or object code is made by offering
|
|
||||||
access to copy from a designated place, then offering equivalent
|
|
||||||
access to copy the source code from the same place counts as
|
|
||||||
distribution of the source code, even though third parties are not
|
|
||||||
compelled to copy the source along with the object code.
|
|
||||||
.
|
|
||||||
4. You may not copy, modify, sublicense, or distribute the Program
|
|
||||||
except as expressly provided under this License. Any attempt
|
|
||||||
otherwise to copy, modify, sublicense or distribute the Program is
|
|
||||||
void, and will automatically terminate your rights under this License.
|
|
||||||
However, parties who have received copies, or rights, from you under
|
|
||||||
this License will not have their licenses terminated so long as such
|
|
||||||
parties remain in full compliance.
|
|
||||||
|
|
||||||
5. You are not required to accept this License, since you have not
|
|
||||||
signed it. However, nothing else grants you permission to modify or
|
|
||||||
distribute the Program or its derivative works. These actions are
|
|
||||||
prohibited by law if you do not accept this License. Therefore, by
|
|
||||||
modifying or distributing the Program (or any work based on the
|
|
||||||
Program), you indicate your acceptance of this License to do so, and
|
|
||||||
all its terms and conditions for copying, distributing or modifying
|
|
||||||
the Program or works based on it.
|
|
||||||
|
|
||||||
6. Each time you redistribute the Program (or any work based on the
|
|
||||||
Program), the recipient automatically receives a license from the
|
|
||||||
original licensor to copy, distribute or modify the Program subject to
|
|
||||||
these terms and conditions. You may not impose any further
|
|
||||||
restrictions on the recipients' exercise of the rights granted herein.
|
|
||||||
You are not responsible for enforcing compliance by third parties to
|
|
||||||
this License.
|
|
||||||
|
|
||||||
7. If, as a consequence of a court judgment or allegation of patent
|
|
||||||
infringement or for any other reason (not limited to patent issues),
|
|
||||||
conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot
|
|
||||||
distribute so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you
|
|
||||||
may not distribute the Program at all. For example, if a patent
|
|
||||||
license would not permit royalty-free redistribution of the Program by
|
|
||||||
all those who receive copies directly or indirectly through you, then
|
|
||||||
the only way you could satisfy both it and this License would be to
|
|
||||||
refrain entirely from distribution of the Program.
|
|
||||||
|
|
||||||
If any portion of this section is held invalid or unenforceable under
|
|
||||||
any particular circumstance, the balance of the section is intended to
|
|
||||||
apply and the section as a whole is intended to apply in other
|
|
||||||
circumstances.
|
|
||||||
|
|
||||||
It is not the purpose of this section to induce you to infringe any
|
|
||||||
patents or other property right claims or to contest validity of any
|
|
||||||
such claims; this section has the sole purpose of protecting the
|
|
||||||
integrity of the free software distribution system, which is
|
|
||||||
implemented by public license practices. Many people have made
|
|
||||||
generous contributions to the wide range of software distributed
|
|
||||||
through that system in reliance on consistent application of that
|
|
||||||
system; it is up to the author/donor to decide if he or she is willing
|
|
||||||
to distribute software through any other system and a licensee cannot
|
|
||||||
impose that choice.
|
|
||||||
|
|
||||||
This section is intended to make thoroughly clear what is believed to
|
|
||||||
be a consequence of the rest of this License.
|
|
||||||
.
|
|
||||||
8. If the distribution and/or use of the Program is restricted in
|
|
||||||
certain countries either by patents or by copyrighted interfaces, the
|
|
||||||
original copyright holder who places the Program under this License
|
|
||||||
may add an explicit geographical distribution limitation excluding
|
|
||||||
those countries, so that distribution is permitted only in or among
|
|
||||||
countries not thus excluded. In such case, this License incorporates
|
|
||||||
the limitation as if written in the body of this License.
|
|
||||||
|
|
||||||
9. The Free Software Foundation may publish revised and/or new versions
|
|
||||||
of the General Public License from time to time. Such new versions will
|
|
||||||
be similar in spirit to the present version, but may differ in detail to
|
|
||||||
address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the Program
|
|
||||||
specifies a version number of this License which applies to it and "any
|
|
||||||
later version", you have the option of following the terms and conditions
|
|
||||||
either of that version or of any later version published by the Free
|
|
||||||
Software Foundation. If the Program does not specify a version number of
|
|
||||||
this License, you may choose any version ever published by the Free Software
|
|
||||||
Foundation.
|
|
||||||
|
|
||||||
10. If you wish to incorporate parts of the Program into other free
|
|
||||||
programs whose distribution conditions are different, write to the author
|
|
||||||
to ask for permission. For software which is copyrighted by the Free
|
|
||||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
|
||||||
make exceptions for this. Our decision will be guided by the two goals
|
|
||||||
of preserving the free status of all derivatives of our free software and
|
|
||||||
of promoting the sharing and reuse of software generally.
|
|
||||||
|
|
||||||
NO WARRANTY
|
|
||||||
|
|
||||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
|
||||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
|
||||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
|
||||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
|
||||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
||||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
|
||||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
|
||||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
|
||||||
REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
|
||||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
|
||||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
|
||||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
|
||||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
|
||||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
|
||||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
|
||||||
POSSIBILITY OF SUCH DAMAGES.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
.
|
|
||||||
How to Apply These Terms to Your New Programs
|
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
|
||||||
possible use to the public, the best way to achieve this is to make it
|
|
||||||
free software which everyone can redistribute and change under these terms.
|
|
||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest
|
|
||||||
to attach them to the start of each source file to most effectively
|
|
||||||
convey the exclusion of warranty; and each file should have at least
|
|
||||||
the "copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
<one line to give the program's name and a brief idea of what it does.>
|
|
||||||
Copyright (C) <year> <name of author>
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
If the program is interactive, make it output a short notice like this
|
|
||||||
when it starts in an interactive mode:
|
|
||||||
|
|
||||||
Gnomovision version 69, Copyright (C) year name of author
|
|
||||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
|
||||||
This is free software, and you are welcome to redistribute it
|
|
||||||
under certain conditions; type `show c' for details.
|
|
||||||
|
|
||||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
|
||||||
parts of the General Public License. Of course, the commands you use may
|
|
||||||
be called something other than `show w' and `show c'; they could even be
|
|
||||||
mouse-clicks or menu items--whatever suits your program.
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or your
|
|
||||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
|
||||||
necessary. Here is a sample; alter the names:
|
|
||||||
|
|
||||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
|
||||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
|
||||||
|
|
||||||
<signature of Ty Coon>, 1 April 1989
|
|
||||||
Ty Coon, President of Vice
|
|
||||||
|
|
||||||
This General Public License does not permit incorporating your program into
|
|
||||||
proprietary programs. If your program is a subroutine library, you may
|
|
||||||
consider it more useful to permit linking proprietary applications with the
|
|
||||||
library. If this is what you want to do, use the GNU Library General
|
|
||||||
Public License instead of this License.
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
<!--
|
|
||||||
www.vnlisting.com
|
|
||||||
Online Super Bowl Squares Script
|
|
||||||
Please read the "Readme.txt for license agreement, installation and usage instructions
|
|
||||||
Version: 4.2 1/23/2013
|
|
||||||
-->
|
|
||||||
|
|
||||||
<?php
|
|
||||||
$query="SELECT * FROM VNSB_settings";
|
|
||||||
$result = mysql_query($query);
|
|
||||||
if ($record = mysql_fetch_assoc($result)) {
|
|
||||||
$SB_DATE = $record['sb_date'];
|
|
||||||
$SB_LOGO = $record['sb_logo'];
|
|
||||||
$NFC_TEAM = $record['NFC_team'];
|
|
||||||
$NFC_LOGO = $record['NFC_logo'];
|
|
||||||
$AFC_TEAM = $record['AFC_team'];
|
|
||||||
$AFC_LOGO = $record['AFC_logo'];
|
|
||||||
$VERSION = $record['Version'];
|
|
||||||
$ADMIN_EMAIL = $record['Admin_email'];
|
|
||||||
$ADMIN_PASSWORD = $record['Admin_pwd'];
|
|
||||||
$ADMIN_VERIFY = $record['Admin_verify'];
|
|
||||||
$BET = $record['Bet'];
|
|
||||||
$WIN_FIRST = $record['Win_first'];
|
|
||||||
$WIN_SECOND = $record['Win_second'];
|
|
||||||
$WIN_THIRD = $record['Win_third'];
|
|
||||||
$WIN_FINAL = $record['Win_final'];
|
|
||||||
$FIRST = (100 * (int)$BET ) * ((int)$WIN_FIRST/100);
|
|
||||||
$SECOND = (100 * (int)$BET ) * ((int)$WIN_SECOND/100);
|
|
||||||
$THIRD = (100 * (int)$BET ) * ((int)$WIN_THIRD/100);
|
|
||||||
$FINAL = (100 * (int)$BET ) * ((int)$WIN_FINAL/100);
|
|
||||||
} else {
|
|
||||||
//echo mysql_error();
|
|
||||||
echo "<br/>Sorry, Technical problem occurred... Can't read from database.<br><br> Please notify this site admin</a>";
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>VNLISTING :: Online Super Bowl Squares v4</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
<meta name="keywords" content="VNLISTING, superbowl squares, super bowl, nfl squares online, free softwares, free scripts, superbowl scripts"/>
|
|
||||||
<meta name="description" content="The one and only fun and free NFL Super Bowl Squares Online."/>
|
|
||||||
<meta name="robots" content="index,nofollow"/>
|
|
||||||
</head>
|
|
||||||
<body bgcolor="" link="#0033CC" vlink="#0033CC" alink="#CC0000" leftmargin="0" topmargin="10" marginwidth="0" marginheight="0">
|
|
||||||
<!--body bgcolor="#99CCFF" link="#0033CC" vlink="#0033CC" alink="#CC0000" leftmargin="0" topmargin="10" marginwidth="0" marginheight="0"-->
|
|
||||||
<center>
|
|
||||||
<p>
|
|
||||||
<table width="95%" border="0" cellspacing="0" cellpadding="0">
|
|
||||||
<tr>
|
|
||||||
<td><img src="<?=$SB_LOGO?>" border="0" title="Super Bowl Squares"></td>
|
|
||||||
<td align="center"><h2><font color="#009900">Sunday, <?=$SB_DATE?></font></h3></td>
|
|
||||||
<td align="right"><img src="<?=$AFC_LOGO?>" border="0" title="<?=$AFC_TEAM?>"> <b><font size="+2">vs</font></b> <img src="<?=$NFC_LOGO?>" border="0" title="<?=$NFC_TEAM?>"></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<br/>
|
|
||||||
|
Before Width: | Height: | Size: 661 B |
|
Before Width: | Height: | Size: 398 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 6.2 KiB |
@@ -1,21 +0,0 @@
|
|||||||
{
|
|
||||||
"db_host": "localhost",
|
|
||||||
"db_user": "llam",
|
|
||||||
"db_pass": "vnlisting",
|
|
||||||
"db_name": "superbowl",
|
|
||||||
"site_url": "http:\/\/172.23.49.14\/superbowl_v50",
|
|
||||||
"admin_email": "vnlisting@gmail.com",
|
|
||||||
"admin_pass": "vnlisting",
|
|
||||||
"sb_logo": "images\/sb_logo.jpg",
|
|
||||||
"afc_champ": "AFC",
|
|
||||||
"afc_champ_logo": "images\/AFC_logo.gif",
|
|
||||||
"nfc_champ": "NFC",
|
|
||||||
"nfc_champ_logo": "images\/NFC_logo.gif",
|
|
||||||
"sb_date": "Sunday, February 03, 2019",
|
|
||||||
"sb_time": "15:30",
|
|
||||||
"cost": "5",
|
|
||||||
"first": "20",
|
|
||||||
"second": "25",
|
|
||||||
"third": "20",
|
|
||||||
"final": "35"
|
|
||||||
}
|
|
||||||
@@ -1,347 +0,0 @@
|
|||||||
<?php
|
|
||||||
# Creating all tables needed for this project.
|
|
||||||
# Any existing tables will be drop and recreate with default values
|
|
||||||
#=============================================================================
|
|
||||||
|
|
||||||
# Connect to database and return handle
|
|
||||||
function dbConnection() {
|
|
||||||
|
|
||||||
if (file_exists("includes/config.inc")) {
|
|
||||||
$notJSON = file_get_contents("includes/config.inc");
|
|
||||||
$tempJSON = json_decode($notJSON);
|
|
||||||
|
|
||||||
$conn = mysqli_connect($tempJSON->db_host, $tempJSON->db_user, $tempJSON->db_pass, $tempJSON->db_name);
|
|
||||||
|
|
||||||
if (!$conn) {
|
|
||||||
die("Connection failed!!!<br>".mysqli_connect_error());
|
|
||||||
} else {
|
|
||||||
return $conn;
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
echo "ERROR: Unable to connect to ".$tempJSON->db_host."<br>".mysqli_error($conn);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Table structure for table `VNSB_numbers`
|
|
||||||
function create_VNSB_numbers($conn) {
|
|
||||||
$sql = "DROP TABLE IF EXISTS `VNSB_numbers`;";
|
|
||||||
if (!mysqli_query($conn, $sql)) {
|
|
||||||
echo "ERROR: Unable to DROP `VNSB_numbers`! <br>".mysqli_error($conn);
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql = "CREATE TABLE IF NOT EXISTS `VNSB_numbers` (
|
|
||||||
`NFC` tinyint(2) DEFAULT NULL,
|
|
||||||
`AFC` tinyint(2) DEFAULT NULL
|
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Randomly picked numbers';
|
|
||||||
";
|
|
||||||
if (!mysqli_query($conn, $sql)) {
|
|
||||||
echo "ERROR: Unable to CREATE `VNSB_numbers`! <br>".mysqli_error($conn);
|
|
||||||
} else {
|
|
||||||
echo "<p>`VNSB_numbers` created successfully.</p>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Table structure for table `VNSB_scores`
|
|
||||||
function create_VNSB_scores($conn) {
|
|
||||||
$sql = "DROP TABLE IF EXISTS `VNSB_scores`;";
|
|
||||||
if (!mysqli_query($conn, $sql)) {
|
|
||||||
echo "ERROR: Unable to DROP `VNSB_scores`! <br>".mysqli_error($conn);
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql = "CREATE TABLE IF NOT EXISTS `VNSB_scores` (
|
|
||||||
`ID` tinyint(2) NOT NULL,
|
|
||||||
`NFC_FIRST` varchar(2) DEFAULT NULL,
|
|
||||||
`AFC_FIRST` varchar(2) DEFAULT NULL,
|
|
||||||
`NFC_HALF` varchar(2) DEFAULT NULL,
|
|
||||||
`AFC_HALF` varchar(2) DEFAULT NULL,
|
|
||||||
`NFC_THIRD` varchar(2) DEFAULT NULL,
|
|
||||||
`AFC_THIRD` varchar(2) DEFAULT NULL,
|
|
||||||
`NFC_FINAL` varchar(2) DEFAULT NULL,
|
|
||||||
`AFC_FINAL` varchar(2) DEFAULT NULL
|
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
|
||||||
";
|
|
||||||
if (!mysqli_query($conn, $sql)) {
|
|
||||||
echo "ERROR: Unable to CREATE `VNSB_scores`! <br>".mysqli_error($conn);
|
|
||||||
} else {
|
|
||||||
echo "<p>`VNSB_scores` created successfully.</p>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Table structure for table `VNSB_squares`
|
|
||||||
function create_VNSB_squares($conn) {
|
|
||||||
$sql = "DROP TABLE IF EXISTS `VNSB_squares`;";
|
|
||||||
if (!mysqli_query($conn, $sql)) {
|
|
||||||
echo "ERROR: Unable to DROP `VNSB_squares`! <br>".mysqli_error($conn);
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql = "CREATE TABLE IF NOT EXISTS `VNSB_squares` (
|
|
||||||
`SQUARE` varchar(15) NOT NULL DEFAULT '',
|
|
||||||
`NAME` varchar(30) NOT NULL DEFAULT 'AVAILABLE',
|
|
||||||
`EMAIL` varchar(45) DEFAULT NULL,
|
|
||||||
`NOTES` text,
|
|
||||||
`DATE` datetime DEFAULT CURRENT_TIMESTAMP,
|
|
||||||
`CONFIRM` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
`FIRST` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
`HALF` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
`THIRD` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
`FINAL` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
UNIQUE KEY `SQUARE` (`SQUARE`)
|
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Super Bowl Squares';
|
|
||||||
";
|
|
||||||
if (!mysqli_query($conn, $sql)) {
|
|
||||||
echo "ERROR: Unable to CREAT `VNSB_squares`! <br>".mysqli_error($conn);
|
|
||||||
} else {
|
|
||||||
|
|
||||||
for ($l=0; $l < 100; $l++) {
|
|
||||||
$sql = "INSERT INTO `VNSB_squares` VALUES ('".sprintf("%02d", $l)."', 'AVAILABLE', NULL, NULL, NULL, 0, 0, 0, 0, 0);";
|
|
||||||
if (!mysqli_query($conn, $sql)) {
|
|
||||||
echo "ERROR: Unable to populate squares! <br>".mysqli_error($conn);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
echo "<p>`VNSB_squares` created successfully.</p>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Table structure for table `VNSB_settings`
|
|
||||||
function create_VNSB_settings() {
|
|
||||||
|
|
||||||
$VERSION = "5.0";
|
|
||||||
if (file_exists("includes/config.inc")) {
|
|
||||||
$notJSON = file_get_contents("includes/config.inc");
|
|
||||||
$tempJSON = json_decode($notJSON);
|
|
||||||
|
|
||||||
$conn = mysqli_connect($tempJSON->db_host, $tempJSON->db_user, $tempJSON->db_pass, $tempJSON->db_name);
|
|
||||||
|
|
||||||
if (!$conn) {
|
|
||||||
die("Connection failed!!!<br>".mysqli_connect_error());
|
|
||||||
} else {
|
|
||||||
|
|
||||||
$sql = "DROP TABLE IF EXISTS `VNSB_settings`;";
|
|
||||||
if (!mysqli_query($conn, $sql)) {
|
|
||||||
echo "ERROR: Unable to DROP `VNSB_settings`! <br>".mysqli_error($conn);
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql = "CREATE TABLE IF NOT EXISTS `VNSB_settings` (
|
|
||||||
`sb_date` varchar(30) NOT NULL DEFAULT 'Sunday, February 7, 2021',
|
|
||||||
`sb_time` varchar(30) NOT NULL DEFAULT '3:30 PM',
|
|
||||||
`sb_logo` varchar(30) DEFAULT NULL,
|
|
||||||
`NFC_team` varchar(30) DEFAULT NULL,
|
|
||||||
`NFC_logo` varchar(80) DEFAULT NULL,
|
|
||||||
`AFC_team` varchar(30) DEFAULT NULL,
|
|
||||||
`AFC_logo` varchar(80) DEFAULT NULL,
|
|
||||||
`Bet` varchar(5) NOT NULL DEFAULT '5.00',
|
|
||||||
`Win_first` tinyint(2) NOT NULL DEFAULT '20',
|
|
||||||
`Win_second` tinyint(2) NOT NULL DEFAULT '25',
|
|
||||||
`Win_third` tinyint(2) NOT NULL DEFAULT '20',
|
|
||||||
`Win_final` tinyint(2) NOT NULL DEFAULT '35',
|
|
||||||
`Version` char(3) NOT NULL DEFAULT '5.0',
|
|
||||||
`Admin_email` varchar(80) NOT NULL DEFAULT 'admin@email.com',
|
|
||||||
`Admin_pwd` varchar(80) NOT NULL DEFAULT 'password',
|
|
||||||
PRIMARY KEY (`sb_date`)
|
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Setting for VN SuperBowl Squares';
|
|
||||||
";
|
|
||||||
if (!mysqli_query($conn, $sql)) {
|
|
||||||
echo "ERROR: Unable to CREATE `VNSB_settings`! <br>".mysqli_error($conn);
|
|
||||||
} else {
|
|
||||||
echo "<p>`VNSB_settings` created successfully.</p>";
|
|
||||||
}
|
|
||||||
|
|
||||||
# populate table
|
|
||||||
$sql = "INSERT INTO `VNSB_settings` VALUES ('".$tempJSON->sb_date."', '".$tempJSON->sb_time."', '".$tempJSON->sb_logo."', '".$tempJSON->nfc_champ."', '".$tempJSON->nfc_champ_logo."', '".$tempJSON->afc_champ."', '".$tempJSON->afc_champ_logo."', '".$tempJSON->cost."', '".$tempJSON->first."', '".$tempJSON->second."', '".$tempJSON->third."', '".$tempJSON->final."', '".$VERSION."', '".$tempJSON->admin_email."', '".md5($tempJSON->admin_pass)."');";
|
|
||||||
# echo $sql;
|
|
||||||
if (!mysqli_query($conn, $sql)) {
|
|
||||||
echo "ERROR: Unable to populate 'VNSB_settings's! <br>".mysqli_error($conn);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
# $mysqli_close($conn);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
echo "ERROR: Configuration file does not existi or required fields are missing!";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# databse
|
|
||||||
function dbInquery() {
|
|
||||||
|
|
||||||
if (file_exists("includes/config.inc")) {
|
|
||||||
# Read back json file
|
|
||||||
$myJSON = file_get_contents("includes/config.inc");
|
|
||||||
$notJSON = json_decode($myJSON);
|
|
||||||
$db_host = $notJSON->db_host;
|
|
||||||
$db_user = $notJSON->db_user;
|
|
||||||
$db_pass = $notJSON->db_pass;
|
|
||||||
$db_name = $notJSON->db_name;
|
|
||||||
} else {
|
|
||||||
$db_host = "localhost";
|
|
||||||
$db_user = "vnsb";
|
|
||||||
$db_pass = "vnlisting";
|
|
||||||
$db_name = "superbowl";
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "<p>Minimum PHP version 5.5.9 recommeneded.<br>";
|
|
||||||
if (version_compare(PHP_VERSION, '5.5.9') >= 0) {
|
|
||||||
echo "Your PHP version: <b>".PHP_VERSION."</b></p>";
|
|
||||||
} else {
|
|
||||||
echo "Your PHP version: <b>".PHP_VERSION."</b><br>DOES NOT MEET MINIMUM RECOMENDATION</p>";
|
|
||||||
}
|
|
||||||
|
|
||||||
echo('
|
|
||||||
<form method="post" action="">
|
|
||||||
<fieldset style="width:450px; border: #6699ff 1px solid"><legend style="color:#6699ff"> mySQL </legend>
|
|
||||||
<table cellpadding="0" cellspacing="10" style="width:450px">
|
|
||||||
<tr><td>Hostname:</td>
|
|
||||||
<td><input type="text" name="db_host" size="40" maxlength="40" value="'. $db_host. '"></input>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td>Username:</td>
|
|
||||||
<td><input type="text" name="db_user" size="40" maxlength="40" value="'. $db_user. '"></input>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td>Password:</td>
|
|
||||||
<td><input type="password" name="db_pass" size="40" maxlength="40" value"'. $db_pass. '"></input>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td>Database:</td>
|
|
||||||
<td><input type="text" name="db_name" size="40" maxlength="40" value="'. $db_name. '"></input>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td colspan="2"><p align="center"><input type="submit" name="DBsubmit" value="Submit"></input></p> </td></tr>
|
|
||||||
</table>
|
|
||||||
<p><u>Warning:</u> Any existing databse with the same name will be deleted!</p>
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
||||||
');
|
|
||||||
}
|
|
||||||
|
|
||||||
# Admin
|
|
||||||
function adminInquery() {
|
|
||||||
|
|
||||||
if (file_exists("includes/config.inc")) {
|
|
||||||
# Read back json file
|
|
||||||
$myJSON = file_get_contents("includes/config.inc");
|
|
||||||
$notJSON = json_decode($myJSON);
|
|
||||||
$admin_email = $notJSON->admin_email;
|
|
||||||
$admin_pass = $notJSON->admin_pass;
|
|
||||||
$site_url = $notJSON->site_url;
|
|
||||||
} else {
|
|
||||||
$admin_email = "admin@email.com";
|
|
||||||
$admin_pass = "password";
|
|
||||||
$site_url = $_SERVER['REQUEST_SCHEME']."://".$_SERVER['HTTP_HOST'].trim($_SERVER['PHP_SELF'], "setup.php");
|
|
||||||
}
|
|
||||||
|
|
||||||
echo('
|
|
||||||
<form method="post" action="">
|
|
||||||
<fieldset style="width:450px; border: #6699ff 1px solid"><legend style="color:#6699ff"> Admin </legend>
|
|
||||||
<table cellpadding="0" cellspacing="10" style="width: 450px">
|
|
||||||
<tr><td width="30%">Site URL:</td>
|
|
||||||
<td width="70%"><input type="url" name="site_url" size="30" maxlength="80" value="'. $site_url .'"></input>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td>Admin Email:</td>
|
|
||||||
<td><input type="email" name="admin_email" size="30" maxlength="80" value="'. $admin_email .'"></input>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td>Admin Password:</td>
|
|
||||||
<td><input type="password" name="admin_pass" size="30" maxlength="40" value"'. $admin_pass .'"></input>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td colspan="2"><p align="center"><input type="submit" name="ADsubmit" value="Submit"></input></p> </td></tr>
|
|
||||||
</table>
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
||||||
');
|
|
||||||
}
|
|
||||||
|
|
||||||
# configuration
|
|
||||||
function configInquery() {
|
|
||||||
|
|
||||||
if (file_exists("includes/config.inc")) {
|
|
||||||
# Read back json file
|
|
||||||
$myJSON = file_get_contents("includes/config.inc");
|
|
||||||
$notJSON = json_decode($myJSON);
|
|
||||||
$sb_logo = $notJSON->sb_logo;
|
|
||||||
$afc_champ = $notJSON->afc_champ;
|
|
||||||
$afc_champ_logo = $notJSON->afc_champ_logo;
|
|
||||||
$nfc_champ = $notJSON->nfc_champ;
|
|
||||||
$nfc_champ_logo = $notJSON->nfc_champ_logo;
|
|
||||||
$sb_date = $notJSON->sb_date;
|
|
||||||
$sb_time = $notJSON->sb_time;
|
|
||||||
$cost = $notJSON->cost;
|
|
||||||
$first = $notJSON->first;
|
|
||||||
$second = $notJSON->second;
|
|
||||||
$third = $notJSON->third;
|
|
||||||
$final = $notJSON->final;
|
|
||||||
$cost_total = (float)$cost * 100;
|
|
||||||
$first_value = ((int)$first * $cost_total) / 100;
|
|
||||||
$second_value = ((int)$second * $cost_total) / 100;
|
|
||||||
$third_value = ((int)$third * $cost_total) / 100;
|
|
||||||
$final_value = ((int)$final * $cost_total) / 100;
|
|
||||||
} else {
|
|
||||||
$sb_logo = "images/sb_logo.jpg";
|
|
||||||
$afc_champ = "AFC";
|
|
||||||
$afc_champ_logo = "images/AFC_logo.gif";
|
|
||||||
$nfc_champ = "NFC";
|
|
||||||
$nfc_champ_logo = "images/NFC_logo.gif";
|
|
||||||
$sb_date = "Sunday, February 7, 2021";
|
|
||||||
$sb_time = "3:30PM";
|
|
||||||
$cost = "5";
|
|
||||||
$first = "20";
|
|
||||||
$second = "25";
|
|
||||||
$third = "20";
|
|
||||||
$final = "35";
|
|
||||||
$cost_total = (int)$cost * 100;
|
|
||||||
$first_value = ((int)$first * $cost_total) / 100;
|
|
||||||
$second_value = ((int)$second * $cost_total) / 100;
|
|
||||||
$third_value = ((int)$third * $cost_total) / 100;
|
|
||||||
$final_value = ((int)$final * $cost_total) / 100;
|
|
||||||
}
|
|
||||||
|
|
||||||
echo('
|
|
||||||
<form method="post" action="">
|
|
||||||
<fieldset style="width:450px; border: #6699ff 1px solid"><legend style="color:#6699ff"> NFL </legend>
|
|
||||||
<table cellpadding="0" cellspacing="10" style="width: 450px">
|
|
||||||
<tr><td>Super Bowl Logo:</td>
|
|
||||||
<td><input type="text" name="sb_logo" size="30" maxlength="80" value="'. $sb_logo .'"></input>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td>AFC Champion:</td>
|
|
||||||
<td><input type="text" name="afc_champ" size="30" maxlength="30" value="'. $afc_champ .'"></input>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td>AFC Logo:</td>
|
|
||||||
<td><input type="text" name="afc_champ_logo" size="30" maxlength="80" value="'. $afc_champ_logo .'"></input>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td>NFC Champion:</td>
|
|
||||||
<td><input type="text" name="nfc_champ" size="30" maxlength="30" value="'. $nfc_champ .'"></input>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td>NFC Logo:</td>
|
|
||||||
<td><input type="text" name="nfc_champ_logo" size="30" maxlength="80" value="'. $nfc_champ_logo .'"></input>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td>Super Bowl Date:</td>
|
|
||||||
<td><input type="date" name="sb_date" size="30" maxlength="30" value="'. $sb_date .'"></input>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td>Super Bowl Time:</td>
|
|
||||||
<td><input type="time" name="sb_time" size="30" maxlength="30" value="'. $sb_time .'"></input>
|
|
||||||
</td></tr>
|
|
||||||
</table>
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
<fieldset style="width:450px; border: #6699ff 1px solid"><legend style="color:#6699ff"> Payout </legend>
|
|
||||||
<table cellpadding="0" cellspacing="10" style="width: 450px">
|
|
||||||
<tr><td>Cost per square:</td>
|
|
||||||
<td>$ <input type="text" name="cost" size="5" maxlength="5" value="'. $cost .'"></input> $ <input type="text" name="cost_total" size="5" maxlength="5" value="'. $cost_total .'" disabled></input>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td>1st quarter:</td>
|
|
||||||
<td>% <input type="text" name="first" size="5" maxlength"5" value="'. $first .'"></input> $ <input type="text" name="first_value" size="5" maxlength="5" value="'. $first_value .'" disabled></input>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td>2nd quarter:</td>
|
|
||||||
<td>% <input type="text" name="second" size="5" maxlength="5" value="'. $second .'"></input> $ <input type="text" name="second_value" size="5" maxlength="5" value="'. $second_value .'" disabled></input>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td>3rd quarter:</td>
|
|
||||||
<td>% <input type="text" name="third" size="5" maxlength="5" value="'. $third .'"></input> $ <input type="text" name="third_value" size="5" maxlength="5" value="'. $third_value .'" disabled></input>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td>Final:</td>
|
|
||||||
<td>% <input type="text" name="final" size="5" maxlength="5" value="'. $final .'"></input> $ <input type="text" name="final_value" size="5" maxlength="5" value="'. $final_value .'" disabled></input>
|
|
||||||
</td></tr>
|
|
||||||
</table>
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
<p align="center"><input type="submit" name="VNsubmit" value="Submit"></input></p>
|
|
||||||
</form>
|
|
||||||
');
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
<!--
|
|
||||||
www.vnlisting.com
|
|
||||||
Online Super Bowl Squares Script
|
|
||||||
Please read the "Readme.txt for license agreement, installation and usage instructions
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- You may not and shall not make any changes to this file -->
|
|
||||||
<p>
|
|
||||||
<table width="95%" style="font-family: verdana, arial; font-size: 9px">
|
|
||||||
<tr>
|
|
||||||
<td>Copyright © 2004-<?=date("Y")?> <a href="http://www.vnlisting.com/freescripts.php" title="Vietnamese Business Directory" target="_parent">VNLISTING</a></td>
|
|
||||||
<td align="right"><a href="http://www.vnlisting.com/freescripts.php" title="Download & Support" target="_parent">VNSB Squares <?=$VERSION?></a></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</p>
|
|
||||||
</center>
|
|
||||||
<?php mysqli_close($conn); ?>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
<!--
|
|
||||||
www.vnlisting.com
|
|
||||||
Online Super Bowl Squares Script
|
|
||||||
Please read the "Readme.txt for license agreement, installation and usage instructions
|
|
||||||
Version: 5.0 2/7/2019
|
|
||||||
-->
|
|
||||||
|
|
||||||
<?php
|
|
||||||
$VERSION = "5.0";
|
|
||||||
$sql="SELECT * FROM VNSB_settings";
|
|
||||||
$result = mysqli_query($conn, $sql);
|
|
||||||
if ($record = mysqli_fetch_assoc($result)) {
|
|
||||||
$SB_DATE = $record['sb_date'];
|
|
||||||
$SB_TIME = $record['sb_time'];
|
|
||||||
$SB_LOGO = $record['sb_logo'];
|
|
||||||
$NFC_TEAM = $record['NFC_team'];
|
|
||||||
$NFC_LOGO = $record['NFC_logo'];
|
|
||||||
$AFC_TEAM = $record['AFC_team'];
|
|
||||||
$AFC_LOGO = $record['AFC_logo'];
|
|
||||||
# $VERSION = $record['Version'];
|
|
||||||
$ADMIN_EMAIL = $record['Admin_email'];
|
|
||||||
$ADMIN_PASSWORD = $record['Admin_pwd'];
|
|
||||||
$ADMIN_VERIFY = $record['Admin_verify'];
|
|
||||||
$BET = $record['Bet'];
|
|
||||||
$WIN_FIRST = $record['Win_first'];
|
|
||||||
$WIN_SECOND = $record['Win_second'];
|
|
||||||
$WIN_THIRD = $record['Win_third'];
|
|
||||||
$WIN_FINAL = $record['Win_final'];
|
|
||||||
$FIRST = (100 * (int)$BET ) * ((int)$WIN_FIRST/100);
|
|
||||||
$SECOND = (100 * (int)$BET ) * ((int)$WIN_SECOND/100);
|
|
||||||
$THIRD = (100 * (int)$BET ) * ((int)$WIN_THIRD/100);
|
|
||||||
$FINAL = (100 * (int)$BET ) * ((int)$WIN_FINAL/100);
|
|
||||||
} else {
|
|
||||||
//echo mysql_error();
|
|
||||||
echo "<br/>Sorry, Technical problem occurred... Can't read from database.<br><br> Please notify this site admin</a>";
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>VNLISTING :: Online Super Bowl Squares v5.0</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
<meta name="keywords" content="VNLISTING, superbowl squares, super bowl, nfl squares online, free softwares, free scripts, superbowl scripts"/>
|
|
||||||
<meta name="description" content="The one and only fun and free NFL Super Bowl Squares Online."/>
|
|
||||||
<meta name="robots" content="index,nofollow"/>
|
|
||||||
</head>
|
|
||||||
<body bgcolor="" link="#0033CC" vlink="#0033CC" alink="#CC0000" leftmargin="0" topmargin="10" marginwidth="0" marginheight="0">
|
|
||||||
<!--body bgcolor="#99CCFF" link="#0033CC" vlink="#0033CC" alink="#CC0000" leftmargin="0" topmargin="10" marginwidth="0" marginheight="0"-->
|
|
||||||
<center>
|
|
||||||
<p>
|
|
||||||
<table width="95%" border="0" cellspacing="0" cellpadding="0">
|
|
||||||
<tr>
|
|
||||||
<td><img src="<?php echo $SB_LOGO?>" border="0" title="Super Bowl Squares"></td>
|
|
||||||
<td align="center"><h2><font color="#009900"><?php echo $SB_DATE?><br><?php echo $SB_TIME?></font></h2></td>
|
|
||||||
<td align="right"><img src="<?php echo $AFC_LOGO; ?>" border="0" title="<?php echo $AFC_TEAM; ?>"> <b><font size="+2">vs</font></b> <img src="<?php echo $NFC_LOGO; ?>" border="0" title="<?php echo $NFC_TEAM; ?>"></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<br/>
|
|
||||||
@@ -1,183 +0,0 @@
|
|||||||
<!--
|
|
||||||
www.vnlisting.com
|
|
||||||
Online Super Bowl Squares Script
|
|
||||||
Please read the "Readme.txt for license agreement, installation and usage instructions
|
|
||||||
Version: 5.0 2/7/2019
|
|
||||||
-->
|
|
||||||
|
|
||||||
<?php
|
|
||||||
require_once('includes/dbTables.inc');
|
|
||||||
$conn = dbConnection();
|
|
||||||
if (!$conn) {
|
|
||||||
die("Are you sure your database is setup correctly? I'm giving up!".mysqli_connect_error());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$NFC = array();
|
|
||||||
$AFC = array();
|
|
||||||
$cnt = 0;
|
|
||||||
for ($i=1; $i<=10; $i++) {
|
|
||||||
$NFC[$i]="";
|
|
||||||
$AFC[$i]="";
|
|
||||||
}
|
|
||||||
$sql="SELECT * FROM VNSB_numbers";
|
|
||||||
$result = mysqli_query($conn, $sql);
|
|
||||||
if (!$result) {
|
|
||||||
echo mysqli_error();
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
while ($record = mysqli_fetch_assoc($result)) {
|
|
||||||
$cnt++;
|
|
||||||
$NFC[$cnt]=$record['NFC'];
|
|
||||||
$AFC[$cnt]=$record['AFC'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql="SELECT * FROM VNSB_scores ORDER BY ID DESC LIMIT 1";
|
|
||||||
$result = mysqli_query($conn, $sql);
|
|
||||||
if (!$result) {
|
|
||||||
echo mysqli_error();
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
$scores = mysqli_fetch_assoc($result);
|
|
||||||
$NFC_FIRST=$scores['NFC_FIRST'];
|
|
||||||
$AFC_FIRST=$scores['AFC_FIRST'];
|
|
||||||
$NFC_HALF=$scores['NFC_HALF'];
|
|
||||||
$AFC_HALF=$scores['AFC_HALF'];
|
|
||||||
$NFC_THIRD=$scores['NFC_THIRD'];
|
|
||||||
$AFC_THIRD=$scores['AFC_THIRD'];
|
|
||||||
$NFC_FINAL=$scores['NFC_FINAL'];
|
|
||||||
$AFC_FINAL=$scores['AFC_FINAL'];
|
|
||||||
|
|
||||||
?>
|
|
||||||
<?php require "includes/header.inc"; ?>
|
|
||||||
<!--<p align="center">This is the live demo. Use real email to see the script at work.</p>-->
|
|
||||||
<table width="95%" border="1" cellspacing="1" cellpadding="5" style="font-family: Verdana,Ariel; font-size: 10px; color:#0066CC;">
|
|
||||||
<tr>
|
|
||||||
<td align="center" style="border-top: none; border-left: none;"><img src="images/NFL-logo.gif" title="National Football League" border="0" /></td>
|
|
||||||
<?php
|
|
||||||
for ($i=1; $i<=10; $i++) {
|
|
||||||
echo "<td align=\"center\" style=\"font-size:12px; color:#232B85; font-weight:bold\">".$NFC_TEAM."<br>".$NFC[$i]."</td>";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<form name="sqSelect" method="post" action="signup.php">
|
|
||||||
|
|
||||||
<?php
|
|
||||||
$sql="SELECT * FROM VNSB_squares ORDER BY SQUARE";
|
|
||||||
$result = mysqli_query($conn, $sql);
|
|
||||||
if (!$result) {
|
|
||||||
echo mysqli_error();
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
$cnt_row = 0;
|
|
||||||
$i=0;
|
|
||||||
$closed=1;
|
|
||||||
while ($record = mysqli_fetch_assoc($result)) {
|
|
||||||
if ($cnt_row==0) {$i++; echo"<td align=\"center\" style=\"font-size:12px; color:#DB2824; font-weight:bold\">".$AFC_TEAM."<br/>".$AFC[$i]."</td>";}
|
|
||||||
|
|
||||||
if ($record['NAME'] == "AVAILABLE") {
|
|
||||||
$closed=0;
|
|
||||||
echo "<td align=\"center\" width='10%' title='only $".$BET."'>".$record['SQUARE']." ".$record['NAME']."<br/>";
|
|
||||||
echo "<input name=\"sqNum_".$record['SQUARE']."\" type=\"checkbox\" value=\"".$record['SQUARE']."\"></input>";
|
|
||||||
//<a href=\"signup.php?square=".$record['SQUARE']."\">".stripslashes($record['NAME'])."<br/>".$record['SQUARE']."</a>
|
|
||||||
echo "</td>";
|
|
||||||
} else {
|
|
||||||
// display name and status
|
|
||||||
if ($record['CONFIRM']) {
|
|
||||||
$COLOR = "#99ff66";
|
|
||||||
$STATUS = "Confirmed";
|
|
||||||
$WINNER = "";
|
|
||||||
} else {
|
|
||||||
$COLOR = "#ff9966";
|
|
||||||
$STATUS = "Pending";
|
|
||||||
$WINNER = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($record['FIRST']) {
|
|
||||||
$COLOR = "#ffff00";
|
|
||||||
$WINNER .= "FIRST<br>";
|
|
||||||
}
|
|
||||||
if ($record['HALF']) {
|
|
||||||
$COLOR = "#ffff00";
|
|
||||||
$WINNER .= "HALF<br>";
|
|
||||||
}
|
|
||||||
if ($record['THIRD']) {
|
|
||||||
$COLOR = "#ffff00";
|
|
||||||
$WINNER .= "THIRD<br>";
|
|
||||||
}
|
|
||||||
if ($record['FINAL']) {
|
|
||||||
$COLOR = "#ffff00";
|
|
||||||
$WINNER .= "FINAL";
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "<td width='10%' bgcolor='".$COLOR."' align='center' title=\"".$record['NOTES']."\"><strong>".stripslashes($record['NAME'])."</strong><br/>".$STATUS."<br/>".$WINNER."</td>";
|
|
||||||
}
|
|
||||||
|
|
||||||
$cnt_row++;
|
|
||||||
if ($cnt_row==10) {
|
|
||||||
$cnt_row=0;
|
|
||||||
echo "</tr><tr>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<?php
|
|
||||||
if ( !$closed ) {
|
|
||||||
?>
|
|
||||||
<p style="font-family: Verdana,Ariel; font-size: 10px; color:#0066CC; font-weight:bold">
|
|
||||||
Check all your desired squares and click Submit to enter your information<br />
|
|
||||||
<input type="submit" name="sqSelect_Submit" value="Submit" title="Submit your selection"></input>
|
|
||||||
</p>
|
|
||||||
<?php } ?>
|
|
||||||
</form>
|
|
||||||
<br/>
|
|
||||||
<table width="95%" cellspacing="5" cellpadding="5" style="font-family: Verdana,Ariel; font-size: 12px; border: #009900 1px solid">
|
|
||||||
<tr>
|
|
||||||
<td align="left" width="46%" valign="top">
|
|
||||||
<strong>The Rules:</strong><br/>
|
|
||||||
<li><strong>$<?=$BET?></strong> per square</li>
|
|
||||||
<li>You can buy as many squares as you want</li>
|
|
||||||
<li>Your square(s) is/are not guaranteed until your payment is verified</li>
|
|
||||||
<li>When confirmed, your square(s) will be changed to <font color="#009900"><strong>GREEN</strong></font></li>
|
|
||||||
<li>Numbers will be randomly draw and assigned after all squares are taken</li>
|
|
||||||
</td>
|
|
||||||
<td align="center" width="27%" valign="top">
|
|
||||||
<table width="100%" style="font-family: Verdana,Ariel; font-size: 12px; border: #009900 1px solid">
|
|
||||||
<tr><td colspan="3" align="center"><strong>The Payout:</strong></td></tr>
|
|
||||||
<tr>
|
|
||||||
<td width="50%">
|
|
||||||
<li>End of first quarter:</li>
|
|
||||||
<li>End of second quarter:</li>
|
|
||||||
<li>End of third quarter:</li>
|
|
||||||
<li>Final Score:</li>
|
|
||||||
</td>
|
|
||||||
<td width="25%">
|
|
||||||
<dt><strong><font color="#232B85"><?=$NFC_FIRST?></font> <font color="#DB2824"><?=$AFC_FIRST?></font></strong></dt>
|
|
||||||
<dt><strong><font color="#232B85"><?=$NFC_HALF?></font> <font color="#DB2824"><?=$AFC_HALF?></font></strong></dt>
|
|
||||||
<dt><strong><font color="#232B85"><?=$NFC_THIRD?></font> <font color="#DB2824"><?=$AFC_THIRD?></font></strong></dt>
|
|
||||||
<dt><strong><font color="#232B85"><?=$NFC_FINAL?></font> <font color="#DB2824"><?=$AFC_FINAL?></font></strong></dt>
|
|
||||||
</td>
|
|
||||||
<td width="13%">
|
|
||||||
<dt><?=$WIN_FIRST?>%</dt>
|
|
||||||
<dt><?=$WIN_SECOND?>%</dt>
|
|
||||||
<dt><?=$WIN_THIRD?>%</dt>
|
|
||||||
<dt><?=$WIN_FINAL?>%</dt>
|
|
||||||
</td>
|
|
||||||
<td width="12%" align="right" style="font-weight: 600px">
|
|
||||||
<dt><strong>$<?=$FIRST?></strong></dt>
|
|
||||||
<dt><strong>$<?=$SECOND?></strong></dt>
|
|
||||||
<dt><strong>$<?=$THIRD?></strong></dt>
|
|
||||||
<dt><strong>$<?=$FINAL?></strong></dt>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<?php require "includes/footer.inc"; ?>
|
|
||||||
@@ -1,167 +0,0 @@
|
|||||||
<!--
|
|
||||||
www.vnlisting.com
|
|
||||||
Online Super Bowl Squares Script
|
|
||||||
Please read the "Readme.txt for license agreement, installation and usage instructions
|
|
||||||
-->
|
|
||||||
<?php
|
|
||||||
@ob_start();
|
|
||||||
session_start();
|
|
||||||
if (!$_SESSION['VNSB']) {
|
|
||||||
?>
|
|
||||||
<meta http-equiv="Refresh"content="0;url=adminlogin.php">
|
|
||||||
<?php
|
|
||||||
} else {
|
|
||||||
$superbowlURL = $_SERVER['REQUEST_SCHEME']."://".$_SERVER['HTTP_HOST'].trim($_SERVER['PHP_SELF'], "randomnumber.php");
|
|
||||||
|
|
||||||
require_once('includes/dbTables.inc');
|
|
||||||
$conn = dbConnection();
|
|
||||||
if (!$conn) {
|
|
||||||
die("Are you sure your database is setup correctly? I'm giving up!".mysqli_connect_error());
|
|
||||||
}
|
|
||||||
|
|
||||||
$RANDOM = $_REQUEST['randomnumber'];
|
|
||||||
|
|
||||||
$LINKS = "
|
|
||||||
<p>
|
|
||||||
<table width=\"50%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-family: verdana, arial; font-size: 12px\">
|
|
||||||
<tr>
|
|
||||||
<td width=\"33%\"><a href=\"$superbowlURL\" title=\"Online Superbowl Squares\">Home</a></td>
|
|
||||||
<td width=\"34%\" align=\"center\"><a href=\"./admin.php\" title=\"Administrator\">Admin</a></td>
|
|
||||||
<td width=\"33%\" align=\"right\"><a href=\"adminlogout.php\" title=\"Admin logout\">Logout</a></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</p>
|
|
||||||
";
|
|
||||||
|
|
||||||
require "includes/header.inc";
|
|
||||||
|
|
||||||
echo "
|
|
||||||
<h1>Numbers Assignment</h1>
|
|
||||||
<p>To be fair, numbers selection is not allowed until all squares are purchased/selected.</p>
|
|
||||||
<p>Numbers are only allowed to be entered once, either by randomly generated or manually entered.</p>
|
|
||||||
<br/>
|
|
||||||
";
|
|
||||||
|
|
||||||
// makesure all squares are selected
|
|
||||||
$sql="SELECT * FROM VNSB_squares WHERE `NAME`='AVAILABLE'";
|
|
||||||
$result = mysqli_query($conn, $sql);
|
|
||||||
if ($record = mysqli_fetch_assoc($result)) {
|
|
||||||
echo "<br><h2 style=\"color: #ff0000\">Squares are still available!!!</h2><br>";
|
|
||||||
echo $LINKS;
|
|
||||||
require "footer.inc";
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
// stop if numbers existed
|
|
||||||
$sql="SELECT * FROM VNSB_numbers";
|
|
||||||
$result = mysqli_query($conn, $sql);
|
|
||||||
if ($record = mysqli_fetch_assoc($result)) {
|
|
||||||
echo "<br><h2 style=\"color: #ff0000\">Numbers already exist!!!</h2><br>";
|
|
||||||
echo $LINKS;
|
|
||||||
require "footer.inc";
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($RANDOM)) {
|
|
||||||
//unset($RANDOM); // for testing
|
|
||||||
$NFC = array();
|
|
||||||
$AFC = array();
|
|
||||||
echo "<p><b>Notify everyone via <a href=\"emailall.php\" title=\"Let them know nubmers are picked\">emails</a></b></p>";
|
|
||||||
echo "<h3>RANDOMLY GENERATED NUMBERS</h3>";
|
|
||||||
|
|
||||||
for ($i=1; $i<=10; $i++) {
|
|
||||||
while (1) {
|
|
||||||
$duplicate = 0;
|
|
||||||
$num=rand(0,9);
|
|
||||||
for ($x=1; $x<$i; $x++) {
|
|
||||||
if ($NFC[$x]==$num) { $duplicate = 1; }
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($duplicate==0) {
|
|
||||||
$NFC[$i]=$num;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for ($i=1; $i<=10; $i++) {
|
|
||||||
while (1) {
|
|
||||||
$duplicate = 0;
|
|
||||||
$num=rand(0,9);
|
|
||||||
for ($x=1; $x<$i; $x++) {
|
|
||||||
if ($AFC[$x]==$num) { $duplicate = 1; }
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($duplicate==0) {
|
|
||||||
$AFC[$i]=$num;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//show table for review
|
|
||||||
echo "<table width=\"95%\" border=\"1\" cellspacing=\"1\" cellpadding=\"5\" style=\"font-family: Verdana,Ariel; font-size: 10px\">
|
|
||||||
<tr>
|
|
||||||
<td style=\"border-top: none; border-left: none\"> </td>";
|
|
||||||
|
|
||||||
for ($i=1; $i<=10; $i++) {
|
|
||||||
echo "<td align=\"center\">".$NFC_TEAM." <font size=\"3\" color=\"blue\"><strong>".$NFC[$i]."</strong></font></td>";
|
|
||||||
}
|
|
||||||
echo "
|
|
||||||
</tr>
|
|
||||||
<tr>";
|
|
||||||
|
|
||||||
$sql="SELECT * FROM VNSB_squares ORDER BY SQUARE";
|
|
||||||
$result = mysqli_query($conn, $sql);
|
|
||||||
if (!$result) {
|
|
||||||
echo mysqli_error();
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
$cnt_row = 0;
|
|
||||||
$i=0;
|
|
||||||
while ($record = mysqli_fetch_assoc($result)) {
|
|
||||||
if ($cnt_row==0) {$i++; echo"<td align='center'> $AFC_TEAM<br/><font size='3' color=\"red\"><strong>".$AFC[$i]."</strong></font> </td>";}
|
|
||||||
if ($record['NAME'] == "AVAILABLE") {
|
|
||||||
echo "<td width='10%' title='only $".$BET."'><a href=\"signup.php?square=".$record['SQUARE']."\">".stripslashes($record['NAME'])."<br/>".$record['SQUARE']."</a></td>";
|
|
||||||
} else if ($record['NAME']!="AVAILABLE" && $record['CONFIRM']==1) {
|
|
||||||
echo "<td width='10%' bgcolor='#99ff66' align='center' title=\"".$record['NOTES']."\"><strong>".stripslashes($record['NAME'])."</strong><br/>Confirmed</td>";
|
|
||||||
} else {
|
|
||||||
echo "<td width='10%' bgcolor='#ff9966' align='center' title=\"".$record['NOTES']."\"><strong>".stripslashes($record['NAME'])."</strong><br/>Pending</td>";
|
|
||||||
}
|
|
||||||
|
|
||||||
$cnt_row++;
|
|
||||||
if ($cnt_row==10) {
|
|
||||||
$cnt_row=0;
|
|
||||||
echo "</tr><tr>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
echo "</table>";
|
|
||||||
} else {
|
|
||||||
?>
|
|
||||||
|
|
||||||
<form action="" method="post">
|
|
||||||
<input type="submit" name="randomnumber" value="Random" title="Auto select numbers randomly"></input>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
|
|
||||||
// save to database
|
|
||||||
if (isset($RANDOM)) {
|
|
||||||
for ($n=1; $n<=10; $n++) {
|
|
||||||
$sql="INSERT INTO VNSB_numbers (NFC, AFC) VALUES ('".$NFC[$n]."','".$AFC[$n]."')";
|
|
||||||
$result = mysqli_query($conn, $sql);
|
|
||||||
if (!$result) {
|
|
||||||
echo mysqli_error();
|
|
||||||
echo "<p>PROBLEM WRITING NUMBERS INTO DATABASE!</p>";
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
echo $LINKS;
|
|
||||||
require "ncludes/footer.inc";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 7.5 KiB |
@@ -1,225 +0,0 @@
|
|||||||
<?php
|
|
||||||
@ob_start();
|
|
||||||
session_start();
|
|
||||||
if (!$_SESSION['VNSB']) {
|
|
||||||
?>
|
|
||||||
<meta http-equiv="Refresh"content="0;url=adminlogin.php">
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
www.vnlisting.com
|
|
||||||
Online Super Bowl Squares Script
|
|
||||||
Please read the "Readme.txt for license agreement, installation and usage instructions
|
|
||||||
Version: 4.3 1/29/2019
|
|
||||||
-->
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
|
||||||
$superbowlURL = $_SERVER['REQUEST_SCHEME']."://".$_SERVER['HTTP_HOST'].trim($_SERVER['PHP_SELF'], "scores.php");
|
|
||||||
|
|
||||||
function email_notify ($mailto)
|
|
||||||
{
|
|
||||||
$mail_headers = "From: $ADMIN_EMAIL\r\n";
|
|
||||||
$mail_subject = "Super Bowl Squares :: You are the winner";
|
|
||||||
$mailmessage = "\r\nCongratulations\r\n";
|
|
||||||
$mailmessage .= "You are the lucky winner for our Super Bowl Squares for $SB_DATE \r\n\n";
|
|
||||||
$mailmessage .= "Contact us to collect your winning.\r\n";
|
|
||||||
$mailmessage .= "The Commissioner\r\n";
|
|
||||||
|
|
||||||
mail("$mailto", "$mail_subject", "$mailmessage", "$mail_headers");
|
|
||||||
}
|
|
||||||
|
|
||||||
require_once('includes/dbTables.inc');
|
|
||||||
$conn = dbConnection();
|
|
||||||
if (!$conn) {
|
|
||||||
die("Are you sure your database is setup correctly? I'm giving up!".mysqli_connect_error());
|
|
||||||
}
|
|
||||||
|
|
||||||
require "includes/header.inc";
|
|
||||||
|
|
||||||
$EMAIL = $_REQUEST['m'];
|
|
||||||
|
|
||||||
$NFC = array();
|
|
||||||
$AFC = array();
|
|
||||||
$NAME = array();
|
|
||||||
$NFC_1 = $_POST['NFC_1'];
|
|
||||||
$NFC_2 = $_POST['NFC_2'];
|
|
||||||
$NFC_3 = $_POST['NFC_3'];
|
|
||||||
$NFC_4 = $_POST['NFC_4'];
|
|
||||||
$AFC_1 = $_POST['AFC_1'];
|
|
||||||
$AFC_2 = $_POST['AFC_2'];
|
|
||||||
$AFC_3 = $_POST['AFC_3'];
|
|
||||||
$AFC_4 = $_POST['AFC_4'];
|
|
||||||
|
|
||||||
|
|
||||||
// Update
|
|
||||||
if (isset($_REQUEST['addscores'])) {
|
|
||||||
$sql="INSERT INTO `VNSB_scores` VALUES (NULL, '".$NFC_1."', '".$AFC_1."', '".$NFC_2."', '".$AFC_2."', '".$NFC_3."', '".$AFC_3."', '".$NFC_4."', '".$AFC_4."');";
|
|
||||||
$result = mysqli_query($conn, $sql);
|
|
||||||
if (!$result) {
|
|
||||||
echo "<p>Sorry, Technical problem occurred... Scores were not added.</p>". mysqli_error($conn);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql="SELECT * FROM `VNSB_scores` ORDER BY ID DESC LIMIT 1";
|
|
||||||
$result = mysqli_query($conn, $sql);
|
|
||||||
if (!$result) {
|
|
||||||
die("ERROR: Unable to read record from 'VNSB_scores'!. <br>". mysqli_error($conn));
|
|
||||||
}
|
|
||||||
|
|
||||||
$scores = mysqli_fetch_assoc($result);
|
|
||||||
$NFC_FIRST=$scores['NFC_FIRST'];
|
|
||||||
$AFC_FIRST=$scores['AFC_FIRST'];
|
|
||||||
$NFC_HALF=$scores['NFC_HALF'];
|
|
||||||
$AFC_HALF=$scores['AFC_HALF'];
|
|
||||||
$NFC_THIRD=$scores['NFC_THIRD'];
|
|
||||||
$AFC_THIRD=$scores['AFC_THIRD'];
|
|
||||||
$NFC_FINAL=$scores['NFC_FINAL'];
|
|
||||||
$AFC_FINAL=$scores['AFC_FINAL'];
|
|
||||||
|
|
||||||
#if (!isset($NFC_FINAL) && !isset($AFC_FINAL) ) { $ADD_SCORES = 1; } else { $ADD_SCORES = 0; };
|
|
||||||
if ($NFC_FINAL==NULL || $AFC_FINAL==NULL) { $ADD_SCORES = 1; } else { $ADD_SCORES = 0; };
|
|
||||||
|
|
||||||
//Get assigned numbers
|
|
||||||
$sql="SELECT * FROM VNSB_numbers";
|
|
||||||
$result = mysqli_query($conn, $sql);
|
|
||||||
if (!$result) {
|
|
||||||
die("ERROR: Unable to read records from 'VNSB_numbers'!. <br>". mysqli_error($conn));
|
|
||||||
}
|
|
||||||
$cnt=0;
|
|
||||||
while ($record = mysqli_fetch_assoc($result)) {
|
|
||||||
$cnt++;
|
|
||||||
$NFC[$cnt]=$record['NFC'];
|
|
||||||
$AFC[$cnt]=$record['AFC'];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get name for each squares
|
|
||||||
$sql="SELECT * FROM VNSB_squares";
|
|
||||||
$result = mysqli_query($conn, $sql);
|
|
||||||
if (!$result) {
|
|
||||||
die("ERROR: Unable to read records from 'VNSB_squares'!. <br>". mysqli_error($conn));
|
|
||||||
}
|
|
||||||
|
|
||||||
while ($record = mysqli_fetch_assoc($result)) {
|
|
||||||
$NAME[$record['SQUARE']] = $record['NAME'];
|
|
||||||
$EMAIL[$record['SQUARE']] = $record['EMAIL'];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Admin add scores
|
|
||||||
if ($ADD_SCORES) {
|
|
||||||
?>
|
|
||||||
<form method="post" action="">
|
|
||||||
<table width="" cellpadding="0" cellspacing="10" style="font-family: Verdana,Ariel; font-size: 12px">
|
|
||||||
<tr><td align="center" colspan="5" style="font-weight:bold;">QUARTERLY SCORES</td></tr>
|
|
||||||
<tr>
|
|
||||||
<tr>
|
|
||||||
<td align="right" valign="bottom" style="color:#232b85; font-weight:bold"><?php echo $NFC_TEAM ?></td>
|
|
||||||
<td align="center" style="font-weight:bold;">First<br>
|
|
||||||
<input type="text" name="NFC_1" size="5" maxlength="2" value="<?php echo $NFC_FIRST ?>"></input></td>
|
|
||||||
<td align="center" style="font-weight:bold;">Half<br>
|
|
||||||
<input type="text" name="NFC_2" size="5" maxlength="2" value="<?php echo $NFC_HALF ?>"></input></td>
|
|
||||||
<td align="center" style="font-weight:bold;">Third<br>
|
|
||||||
<input type="text" name="NFC_3" size="5" maxlength="2" value="<?php echo $NFC_THIRD ?>"></input></td>
|
|
||||||
<td align="center" style="font-weight:bold;">Final<br>
|
|
||||||
<input type="text" name="NFC_4" size="5" maxlength="2" value="<?php echo $NFC_FINAL ?>"></input></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align="right" style="color:#db2824; font-weight:bold"><?php echo $AFC_TEAM ?></td>
|
|
||||||
<td style="font-weight:bold;"><input type="text" name="AFC_1" size="5" maxlength="2" value="<?php echo $AFC_FIRST ?>"></input></td>
|
|
||||||
<td style="font-weight:bold;"><input type="text" name="AFC_2" size="5" maxlength="2" value="<?php echo $AFC_HALF ?>"></input></td>
|
|
||||||
<td style="font-weight:bold;"><input type="text" name="AFC_3" size="5" maxlength="2" value="<?php echo $AFC_THIRD ?>"></input></td>
|
|
||||||
<td style="font-weight:bold;"><input type="text" name="AFC_4" size="5" maxlength="2" value="<?php echo $AFC_FINAL ?>"></input></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align="center" colspan="5">
|
|
||||||
<input type="submit" name="addscores" value="Submit"></input>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</form>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<table width="50%" style="font-family: Verdana,Ariel; font-size: 12px; border: #009900 1px solid">
|
|
||||||
<tr><td colspan="4" align="center"><strong>The Payout:</strong></td></tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<li>End of first quarter: </li>
|
|
||||||
<li>End of second quarter: </li>
|
|
||||||
<li>End of third quarter: </li>
|
|
||||||
<li>Final Score: </li>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<dt><strong><font color="#232B85"><?=$NFC_FIRST?></font> <font color="#DB2824"><?=$AFC_FIRST?></font></strong></dt>
|
|
||||||
<dt><strong><font color="#232B85"><?=$NFC_HALF?></font> <font color="#DB2824"><?=$AFC_HALF?></font></strong></dt>
|
|
||||||
<dt><strong><font color="#232B85"><?=$NFC_THIRD?></font> <font color="#DB2824"><?=$AFC_THIRD?></font></strong></dt>
|
|
||||||
<dt><strong><font color="#232B85"><?=$NFC_FINAL?></font> <font color="#DB2824"><?=$AFC_FINAL?></font></strong></dt>
|
|
||||||
</td>
|
|
||||||
<td >
|
|
||||||
<dt><?=$WIN_FIRST?>%</dt>
|
|
||||||
<dt><?=$WIN_SECOND?>%</dt>
|
|
||||||
<dt><?=$WIN_THIRD?>%</dt>
|
|
||||||
<dt><?=$WIN_FINAL?>%</dt>
|
|
||||||
</td>
|
|
||||||
<td width="15%" align="right" style="font-weight: 600px">
|
|
||||||
<dt><strong>$<?=$FIRST?></strong></dt>
|
|
||||||
<dt><strong>$<?=$SECOND?></strong></dt>
|
|
||||||
<dt><strong>$<?=$THIRD?></strong></dt>
|
|
||||||
<dt><strong>$<?=$FINAL?></strong></dt>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</p>
|
|
||||||
<?php
|
|
||||||
echo "<p>";
|
|
||||||
|
|
||||||
# Notify winners
|
|
||||||
echo ('<a href="'.$REQUEST_URI.'?m=yes">email winners</a>');
|
|
||||||
|
|
||||||
$cnt=0;
|
|
||||||
for ($y=1; $y<=10; $y++) {
|
|
||||||
for ($x=1; $x<=10; $x++) {
|
|
||||||
if ($cnt<10) { $square = "0".$cnt; } else { $square = $cnt; }
|
|
||||||
if ( ($NFC[$x] == substr($NFC_FIRST, -1)) && ($AFC[$y] == substr($AFC_FIRST, -1)) && ( $NFC_FIRST && $AFC_FIRST ) ) {
|
|
||||||
echo "<p>1st Quarter Winner ($NFC[$x],$AFC[$y]) Square #$square (".$NAME[$square].")</p>";
|
|
||||||
mysqli_query("UPDATE VNSB_squares SET FIRST='1' WHERE SQUARE='$square' LIMIT 1");
|
|
||||||
if ( $EMAIL=="yes" ) { notify_email($EMAIL[$square]); }
|
|
||||||
}
|
|
||||||
if ( ($NFC[$x] == substr($NFC_HALF, -1)) && ($AFC[$y] == substr($AFC_HALF, -1)) && ( $NFC_HALF && $AFC_HALF ) ) {
|
|
||||||
echo "<p>Halftime Winner ($NFC[$x],$AFC[$y]) Square #$square (".$NAME[$square].")</p>";
|
|
||||||
mysqli_query("UPDATE VNSB_squares SET HALF='1' WHERE SQUARE='$square' LIMIT 1");
|
|
||||||
if ( $EMAIL=="yes" ) { notify_email($EMAIL[$square]); }
|
|
||||||
}
|
|
||||||
if ( ($NFC[$x] == substr($NFC_THIRD, -1)) && ($AFC[$y] == substr($AFC_THIRD, -1)) && ( $NFC_THIRD && $AFC_THIRD ) ) {
|
|
||||||
echo "<p>3rd Quarter Winner ($NFC[$x],$AFC[$y]) Square #$square (".$NAME[$square].")</p>";
|
|
||||||
mysqli_query("UPDATE VNSB_squares SET THIRD='1' WHERE SQUARE='$square' LIMIT 1");
|
|
||||||
if ( $EMAIL=="yes" ) { notify_email($EMAIL[$square]); }
|
|
||||||
}
|
|
||||||
if ( ($NFC[$x] == substr($NFC_FINAL, -1)) && ($AFC[$y] == substr($AFC_FINAL, -1) && ( $NFC_FINAL && $AFC_FINAL )) ) {
|
|
||||||
echo "<p>Final Winner ($NFC[$x],$AFC[$y]) Square #$square (".$NAME[$square].")</p>";
|
|
||||||
mysqli_query("UPDATE VNSB_squares SET FINAL='1' WHERE SQUARE='$square' LIMIT 1");
|
|
||||||
if ( $EMAIL=="yes" ) { notify_email($EMAIL[$square]); }
|
|
||||||
}
|
|
||||||
$cnt++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "</p>";
|
|
||||||
?>
|
|
||||||
<p><br><br>
|
|
||||||
<table width="50%" border="0" cellspacing="0" cellpadding="0" style="font-family: verdana, arial; font-size: 12px">
|
|
||||||
<tr>
|
|
||||||
<td width="25%"><a href="<?=$superbowlURL?>" title="Administrator">Home</a></td>
|
|
||||||
<td width="25%" align="center"><a href="admin.php" title="Administrator">Admin</a></td>
|
|
||||||
<td width="25%" align="center"><a href="scores.php" title="Enter scores">Scores</a></td>
|
|
||||||
<td width="25%" align="right"><a href="adminlogout.php" title="Admin logout">Logout</a></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<?php require "includes/footer.inc"; ?>
|
|
||||||
@@ -1,177 +0,0 @@
|
|||||||
|
|
||||||
<?php
|
|
||||||
# VNSB Super Bowl Squares Installation.
|
|
||||||
|
|
||||||
# Create a new database for this project.
|
|
||||||
# Copy all files to your server/host location.
|
|
||||||
# Run this file to start the installation and setup.
|
|
||||||
#========================================================
|
|
||||||
?>
|
|
||||||
|
|
||||||
<HTML>
|
|
||||||
<head>
|
|
||||||
<title>VNSB - Super Bowl Quares - Installation</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
|
|
||||||
<center>
|
|
||||||
|
|
||||||
<p><a href="http://www.vnlisting.com/freescripts.php"><img src="images/VNLogo.gif"></a></p>
|
|
||||||
<p style="font-size:24px; font-weight:bold">Super Bowl Squares<br>Installation</p>
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
|
||||||
require("includes/dbTables.inc");
|
|
||||||
|
|
||||||
if ($_REQUEST['DBsubmit']) {
|
|
||||||
|
|
||||||
if ($_POST['db_host'] && $_POST['db_user'] && $_POST['db_pass'] && $_POST['db_name']) {
|
|
||||||
|
|
||||||
# Create connection
|
|
||||||
$dbconn = mysqli_connect($_POST['db_host'], $_POST['db_user'], $_POST['db_pass']);
|
|
||||||
if (!$dbconn) {
|
|
||||||
die("ERROR: Unable to connect to host!!!<br>".mysqli_connect_error());
|
|
||||||
} else {
|
|
||||||
# Create database
|
|
||||||
$sql = "CREATE DATABASE IF NOT EXISTS ".$_POST['db_name'];
|
|
||||||
if (!mysqli_query($dbconn, $sql)) {
|
|
||||||
die("ERROR: Unable to create new database!!!<br>".mysqli_connect_error());
|
|
||||||
}
|
|
||||||
mysqli_close($dbconn);
|
|
||||||
sleep(2);
|
|
||||||
|
|
||||||
# Create connection for tables
|
|
||||||
$conn = mysqli_connect($_POST['db_host'], $_POST['db_user'], $_POST['db_pass'], $_POST['db_name']);
|
|
||||||
|
|
||||||
if (!$conn) {
|
|
||||||
die("ERROR: Connection failed!!!<br>".mysqli_connect_error());
|
|
||||||
} else {
|
|
||||||
|
|
||||||
echo "<p>Database connected sucessful!</p>";
|
|
||||||
|
|
||||||
create_VNSB_squares($conn);
|
|
||||||
create_VNSB_numbers($conn);
|
|
||||||
create_VNSB_scores($conn);
|
|
||||||
|
|
||||||
# Create json file with all configurations
|
|
||||||
$dbObj->db_host = $_POST['db_host'];
|
|
||||||
$dbObj->db_user = $_POST['db_user'];
|
|
||||||
$dbObj->db_pass = $_POST['db_pass'];
|
|
||||||
$dbObj->db_name = $_POST['db_name'];
|
|
||||||
|
|
||||||
$myJSON = json_encode($dbObj, JSON_PRETTY_PRINT);
|
|
||||||
|
|
||||||
if (file_exists("includes/config.inc")) {
|
|
||||||
$notJSON = file_get_contents("includes/config.inc");
|
|
||||||
$tempJSON = json_decode($notJSON);
|
|
||||||
$tempJSON->db_host = $_POST['db_host'];
|
|
||||||
$tempJSON->db_user = $_POST['db_user'];
|
|
||||||
$tempJSON->db_pass = $_POST['db_pass'];
|
|
||||||
$tempJSON->db_name = $_POST['db_name'];
|
|
||||||
|
|
||||||
$myJSON = json_encode($tempJSON, JSON_PRETTY_PRINT);
|
|
||||||
}
|
|
||||||
|
|
||||||
$fh = fopen("includes/config.inc", "w") or die ("Error opening file!");
|
|
||||||
fwrite($fh, $myJSON);
|
|
||||||
fclose($fh);
|
|
||||||
|
|
||||||
# Admin
|
|
||||||
adminInquery();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
echo "ERROR: Database information CANNOT be blank!!!";
|
|
||||||
}
|
|
||||||
|
|
||||||
} elseif ($_REQUEST['ADsubmit']) {
|
|
||||||
|
|
||||||
if ($_POST['site_url'] && $_POST['admin_email'] && $_POST['admin_pass']) {
|
|
||||||
|
|
||||||
# Read back json file
|
|
||||||
if (file_exists("includes/config.inc")) {
|
|
||||||
$notJSON = file_get_contents("includes/config.inc");
|
|
||||||
$tempJSON = json_decode($notJSON);
|
|
||||||
$tempJSON->site_url = $_POST['site_url'];
|
|
||||||
$tempJSON->admin_email = $_POST['admin_email'];
|
|
||||||
$tempJSON->admin_pass = $_POST['admin_pass'];
|
|
||||||
$myJSON = json_encode($tempJSON, JSON_PRETTY_PRINT);
|
|
||||||
|
|
||||||
$fh = fopen("includes/config.inc", "w") or die ("Error opening file!");
|
|
||||||
fwrite($fh, $myJSON);
|
|
||||||
fclose($fh);
|
|
||||||
|
|
||||||
# Configuration
|
|
||||||
configInquery();
|
|
||||||
|
|
||||||
} else {
|
|
||||||
echo "ERROR: Databse configuration file does not exist!";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
echo "ERROR: One or more field(s) is invalid or empty!!!";
|
|
||||||
}
|
|
||||||
|
|
||||||
} elseif ($_REQUEST['VNsubmit']) {
|
|
||||||
|
|
||||||
if ($_POST['afc_champ'] && $_POST['nfc_champ'] && $_POST['sb_date']) {
|
|
||||||
|
|
||||||
# Read back json file
|
|
||||||
if (file_exists("includes/config.inc")) {
|
|
||||||
$notJSON = file_get_contents("includes/config.inc");
|
|
||||||
$tempJSON = json_decode($notJSON);
|
|
||||||
$tempJSON->sb_logo = $_POST['sb_logo'];
|
|
||||||
$tempJSON->afc_champ = $_POST['afc_champ'];
|
|
||||||
$tempJSON->afc_champ_logo = $_POST['afc_champ_logo'];
|
|
||||||
$tempJSON->nfc_champ = $_POST['nfc_champ'];
|
|
||||||
$tempJSON->nfc_champ_logo = $_POST['nfc_champ_logo'];
|
|
||||||
# date format
|
|
||||||
$sbDate = new DateTime($_POST['sb_date']);
|
|
||||||
$date_of_week = date('l', strtotime($_POST['sb_date']));
|
|
||||||
$tempJSON->sb_date = $date_of_week.", ".$sbDate->format('F d, Y');
|
|
||||||
$tempJSON->sb_time = $_POST['sb_time'];
|
|
||||||
$tempJSON->cost = $_POST['cost'];
|
|
||||||
$tempJSON->first = $_POST['first'];
|
|
||||||
$tempJSON->second = $_POST['second'];
|
|
||||||
$tempJSON->third = $_POST['third'];
|
|
||||||
$tempJSON->final = $_POST['final'];
|
|
||||||
|
|
||||||
$myJSON = json_encode($tempJSON, JSON_PRETTY_PRINT);
|
|
||||||
|
|
||||||
$fh = fopen("includes/config.inc", "w") or die ("Error opening file!");
|
|
||||||
fwrite($fh, $myJSON);
|
|
||||||
fclose($fh);
|
|
||||||
|
|
||||||
# Populate settings
|
|
||||||
create_VNSB_settings();
|
|
||||||
|
|
||||||
# Done
|
|
||||||
$notJSON = file_get_contents("includes/config.inc");
|
|
||||||
$tempJSON = json_decode($notJSON);
|
|
||||||
echo "Congratulation... You are ready to go!<br>";
|
|
||||||
echo "<p><a href='".$tempJSON->site_url."'title='Super Bowl Squares'>".$tempJSON->site_url."</a></p>";
|
|
||||||
# foreach ($tempJSON as $key=>$value) {
|
|
||||||
# echo $key. ": " .$value. "<br>";
|
|
||||||
# }
|
|
||||||
|
|
||||||
echo "<p>>>>>> MAKE SURE YOU DELETE 'setup.php' BEFORE YOU GO LIVE <<<<<</p>";
|
|
||||||
|
|
||||||
} else {
|
|
||||||
echo "ERROR: Databse configuration file does not exist!";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
echo "ERROR: One or more field(s) is invalid or empty!!!";
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
# database
|
|
||||||
dbInquery();
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
</center>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
<?php $mysqli_close($conn); ?>
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
<!--
|
|
||||||
www.vnlisting.com
|
|
||||||
Online Super Bowl Squares Script
|
|
||||||
Please read the "Readme.txt for license agreement, installation and usage instructions
|
|
||||||
-->
|
|
||||||
|
|
||||||
<?php
|
|
||||||
$superbowlURL = $_SERVER['REQUEST_SCHEME']."://".$_SERVER['HTTP_HOST'].trim($_SERVER['PHP_SELF'], "signup.php");
|
|
||||||
|
|
||||||
require_once('includes/dbTables.inc');
|
|
||||||
$conn = dbConnection();
|
|
||||||
if (!$conn) {
|
|
||||||
die("Are you sure your database is setup correctly? I'm giving up!".mysqli_connect_error());
|
|
||||||
}
|
|
||||||
|
|
||||||
require "includes/header.inc";
|
|
||||||
?>
|
|
||||||
|
|
||||||
<h3>SQUARE SELECTION</h3>
|
|
||||||
<table width="50%" cellpadding="5" style="font-family: verdana, arial; border: #FFCC99 1px solid">
|
|
||||||
<tr>
|
|
||||||
<td width="" align="center" valign="top" style="font-size: 11px">
|
|
||||||
<h2><strong>You are signing up for square(s): <font color="#ff0000">
|
|
||||||
<form name="signup" action="thankyou.php" method="post">
|
|
||||||
<?php
|
|
||||||
if ( isset($_REQUEST['sqSelect_Submit']) ) {
|
|
||||||
$SQ=0;
|
|
||||||
$SQcount = 100;
|
|
||||||
for ($i=0;$i<$SQcount;$i++) {
|
|
||||||
if ($i<10) { $SQarray[$i] = $_POST["sqNum_0$i"]; }
|
|
||||||
else { $SQarray[$i] = $_POST["sqNum_$i"]; }
|
|
||||||
if ( isset($SQarray[$i]) ) {
|
|
||||||
$SQ++;
|
|
||||||
echo $SQarray[$i]." ";
|
|
||||||
echo ('<input type="hidden" name="square_'.$SQ.'" value="'.$SQarray[$i].'">');
|
|
||||||
echo ('<input type="hidden" name="sqTotal" value="'.$SQ.'">');
|
|
||||||
if ( $SQ == 10 ) { echo "<p>Maximum of 10 Squares per selection</p>"; break; } // limit to 10
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $SQ==0 ) {
|
|
||||||
echo "<p style=\"font-size:12px; color:#000000\">You must select at least one square to continue!</p>";
|
|
||||||
echo "<p><a href=\"".$superbowlURL."\" title=\"Online Superbowl Squares\">Home</a></p>";
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</font></strong></h2>
|
|
||||||
<!--<h2><strong>You are signing up for square(s): <font color="#ff0000"><?=$square_select?></font></strong></h2>-->
|
|
||||||
<!--<form name="signup" action="thankyou.php" method="post">-->
|
|
||||||
<p><b>Name</b> <br/><input type=text name="realname" size="30" value=""></p>
|
|
||||||
<p><b>Email</b><br/><input type=email name="email" size="30" maxlength="45" value=""></p>
|
|
||||||
<p><b>Notes to Admin</b><br/>
|
|
||||||
<textarea name="body" rows="3" cols="40" wrap="virtual" style="font-family: verdana, arial; font-size: 10px"></textarea>
|
|
||||||
</p>
|
|
||||||
<p>You have 24 hours to make your payment or your square will be released.<br/><input type="submit" value="Submit"></p>
|
|
||||||
|
|
||||||
<!--<input type="hidden" name="square" value="<?=$square_select?>">-->
|
|
||||||
<input type="hidden" name="confirmation" value="0"></input>
|
|
||||||
</form>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<p style="font-family: verdana, arial; font-size: 12px">
|
|
||||||
<a href="<?=$superbowlURL?>" title="Online Superbowl Squares">Home</a>
|
|
||||||
</p>
|
|
||||||
<?php require "includes/footer.inc"; ?>
|
|
||||||
@@ -1,208 +0,0 @@
|
|||||||
-- phpMyAdmin SQL Dump
|
|
||||||
-- version 2.8.0.1
|
|
||||||
-- http://www.phpmyadmin.net
|
|
||||||
--
|
|
||||||
-- Host: custsql-pow13
|
|
||||||
-- Generation Time: Dec 13, 2013 at 12:59 AM
|
|
||||||
-- Server version: 5.5.32
|
|
||||||
-- PHP Version: 4.4.9
|
|
||||||
--
|
|
||||||
-- Database: `superbowl`
|
|
||||||
--
|
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `VNSB_numbers`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `VNSB_numbers`;
|
|
||||||
CREATE TABLE IF NOT EXISTS `VNSB_numbers` (
|
|
||||||
`NFC` tinyint(2) DEFAULT NULL,
|
|
||||||
`AFC` tinyint(2) DEFAULT NULL
|
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Randomly picked numbers';
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping data for table `VNSB_numbers`
|
|
||||||
--
|
|
||||||
|
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `VNSB_scores`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `VNSB_scores`;
|
|
||||||
CREATE TABLE IF NOT EXISTS `VNSB_scores` (
|
|
||||||
`NFC_FIRST` tinyint(2) DEFAULT NULL,
|
|
||||||
`AFC_FIRST` tinyint(2) DEFAULT NULL,
|
|
||||||
`NFC_HALF` tinyint(2) DEFAULT NULL,
|
|
||||||
`AFC_HALF` tinyint(2) DEFAULT NULL,
|
|
||||||
`NFC_THIRD` tinyint(2) DEFAULT NULL,
|
|
||||||
`AFC_THIRD` tinyint(2) DEFAULT NULL,
|
|
||||||
`NFC_FINAL` tinyint(2) DEFAULT NULL,
|
|
||||||
`AFC_FINAL` tinyint(2) DEFAULT NULL
|
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping data for table `VNSB_scores`
|
|
||||||
--
|
|
||||||
|
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `VNSB_settings`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `VNSB_settings`;
|
|
||||||
CREATE TABLE IF NOT EXISTS `VNSB_settings` (
|
|
||||||
`sb_date` varchar(30) NOT NULL DEFAULT '',
|
|
||||||
`sb_logo` varchar(30) DEFAULT NULL,
|
|
||||||
`NFC_team` varchar(30) DEFAULT NULL,
|
|
||||||
`NFC_logo` varchar(80) DEFAULT NULL,
|
|
||||||
`AFC_team` varchar(30) DEFAULT NULL,
|
|
||||||
`AFC_logo` varchar(80) DEFAULT NULL,
|
|
||||||
`Bet` varchar(5) NOT NULL DEFAULT '5.00',
|
|
||||||
`Win_first` tinyint(2) NOT NULL DEFAULT '20',
|
|
||||||
`Win_second` tinyint(2) NOT NULL DEFAULT '25',
|
|
||||||
`Win_third` tinyint(2) NOT NULL DEFAULT '20',
|
|
||||||
`Win_final` tinyint(2) NOT NULL DEFAULT '35',
|
|
||||||
`Version` char(3) NOT NULL DEFAULT '',
|
|
||||||
`Admin_email` varchar(30) NOT NULL DEFAULT 'admin@email.com',
|
|
||||||
`Admin_pwd` varchar(8) NOT NULL DEFAULT 'password',
|
|
||||||
PRIMARY KEY (`sb_date`)
|
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Setting for VN SuperBowl Squares';
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping data for table `VNSB_settings`
|
|
||||||
--
|
|
||||||
|
|
||||||
INSERT INTO `VNSB_settings` VALUES ('February 2, 2014', 'sb_XLVIII.png', 'NFC', 'NFC_logo.gif', 'AFC', 'AFC_logo.gif', '5.00', 20, 25, 20, 35, '4.2', 'admin@email.com', 'password');
|
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `VNSB_squares`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `VNSB_squares`;
|
|
||||||
CREATE TABLE IF NOT EXISTS `VNSB_squares` (
|
|
||||||
`SQUARE` varchar(15) NOT NULL DEFAULT '',
|
|
||||||
`NAME` varchar(30) NOT NULL DEFAULT 'AVAILABLE',
|
|
||||||
`EMAIL` varchar(45) DEFAULT NULL,
|
|
||||||
`NOTES` text,
|
|
||||||
`DATE` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
|
||||||
`CONFIRM` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
`FIRST` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
`HALF` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
`THIRD` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
`FINAL` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
UNIQUE KEY `SQUARE` (`SQUARE`)
|
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Super Bowl Squares';
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping data for table `VNSB_squares`
|
|
||||||
--
|
|
||||||
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('00', 'AVAILABLE', NULL, NULL, '2013-01-14 01:56:43', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('01', 'AVAILABLE', NULL, NULL, '2013-01-15 12:10:16', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('02', 'AVAILABLE', NULL, NULL, '2013-01-09 11:53:47', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('03', 'AVAILABLE', NULL, NULL, '2013-01-15 08:41:10', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('04', 'AVAILABLE', NULL, NULL, '2013-01-14 01:52:22', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('05', 'AVAILABLE', NULL, NULL, '2013-01-08 12:45:49', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('06', 'AVAILABLE', NULL, NULL, '2013-01-21 12:38:27', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('07', 'AVAILABLE', NULL, NULL, '2013-01-18 02:49:41', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('08', 'AVAILABLE', NULL, NULL, '2013-01-14 01:23:21', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('09', 'AVAILABLE', NULL, NULL, '2013-01-14 02:30:08', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('10', 'AVAILABLE', NULL, NULL, '2013-01-08 12:58:53', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('11', 'AVAILABLE', NULL, NULL, '2013-01-08 04:34:09', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('12', 'AVAILABLE', NULL, NULL, '2013-01-08 03:53:14', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('13', 'AVAILABLE', NULL, NULL, '2013-01-14 04:26:08', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('14', 'AVAILABLE', NULL, NULL, '2013-01-20 10:03:29', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('15', 'AVAILABLE', NULL, NULL, '2013-01-13 02:31:36', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('16', 'AVAILABLE', NULL, NULL, '2013-01-14 02:18:40', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('17', 'AVAILABLE', NULL, NULL, '2013-01-14 01:36:04', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('18', 'AVAILABLE', NULL, NULL, '2013-01-14 08:48:40', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('19', 'AVAILABLE', NULL, NULL, '2013-01-20 07:02:59', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('20', 'AVAILABLE', NULL, NULL, '2013-01-15 08:41:10', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('21', 'AVAILABLE', NULL, NULL, '2013-01-08 12:45:49', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('22', 'AVAILABLE', NULL, NULL, '2013-01-09 11:53:47', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('23', 'AVAILABLE', NULL, NULL, '2013-01-08 03:53:33', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('24', 'AVAILABLE', NULL, NULL, '2013-01-08 12:58:53', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('25', 'AVAILABLE', NULL, NULL, '2013-01-20 10:03:50', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('26', 'AVAILABLE', NULL, NULL, '2013-01-16 07:36:01', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('27', 'AVAILABLE', NULL, NULL, '2013-01-08 12:45:49', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('28', 'AVAILABLE', NULL, NULL, '2013-01-18 03:16:41', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('29', 'AVAILABLE', NULL, NULL, '2013-01-20 08:44:30', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('30', 'AVAILABLE', NULL, NULL, '2013-01-22 02:21:03', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('31', 'AVAILABLE', NULL, NULL, '2013-01-22 02:21:03', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('32', 'AVAILABLE', NULL, NULL, '2013-01-13 02:31:36', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('33', 'AVAILABLE', NULL, NULL, '2013-01-08 04:34:09', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('34', 'AVAILABLE', NULL, NULL, '2013-01-15 12:10:16', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('35', 'AVAILABLE', NULL, NULL, '2013-01-14 02:30:08', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('36', 'AVAILABLE', NULL, NULL, '2013-01-20 10:04:10', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('37', 'AVAILABLE', NULL, NULL, '2013-01-15 12:25:05', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('38', 'AVAILABLE', NULL, NULL, '2013-01-20 10:46:57', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('39', 'AVAILABLE', NULL, NULL, '2013-01-14 04:04:01', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('40', 'AVAILABLE', NULL, NULL, '2013-01-14 01:52:22', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('41', 'AVAILABLE', NULL, NULL, '2013-01-15 08:41:10', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('42', 'AVAILABLE', NULL, NULL, '2013-01-14 02:18:40', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('43', 'AVAILABLE', NULL, NULL, '2013-01-14 02:30:08', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('44', 'AVAILABLE', NULL, NULL, '2013-01-11 07:25:05', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('45', 'AVAILABLE', NULL, NULL, '2013-01-14 01:36:40', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('46', 'AVAILABLE', NULL, NULL, '2013-01-08 02:11:23', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('47', 'AVAILABLE', NULL, NULL, '2013-01-14 01:56:43', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('48', 'AVAILABLE', NULL, NULL, '2013-01-14 04:26:08', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('49', 'AVAILABLE', NULL, NULL, '2013-01-14 01:52:22', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('50', 'AVAILABLE', NULL, NULL, '2013-01-20 07:02:59', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('51', 'AVAILABLE', NULL, NULL, '2013-01-20 08:32:44', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('52', 'AVAILABLE', NULL, NULL, '2013-01-15 12:10:16', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('53', 'AVAILABLE', NULL, NULL, '2013-01-15 10:03:13', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('54', 'AVAILABLE', NULL, NULL, '2013-01-14 01:36:40', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('55', 'AVAILABLE', NULL, NULL, '2013-01-11 07:25:05', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('56', 'AVAILABLE', NULL, NULL, '2013-01-15 12:10:16', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('57', 'AVAILABLE', NULL, NULL, '2013-01-21 12:39:03', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('58', 'AVAILABLE', NULL, NULL, '2013-01-21 09:11:27', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('59', 'AVAILABLE', NULL, NULL, '2013-01-18 03:16:41', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('60', 'AVAILABLE', NULL, NULL, '2013-01-14 02:30:08', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('61', 'AVAILABLE', NULL, NULL, '2013-01-22 02:21:03', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('62', 'AVAILABLE', NULL, NULL, '2013-01-08 12:58:53', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('63', 'AVAILABLE', NULL, NULL, '2013-01-14 01:36:40', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('64', 'AVAILABLE', NULL, NULL, '2013-01-14 04:08:24', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('65', 'AVAILABLE', NULL, NULL, '2013-01-15 10:03:13', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('66', 'AVAILABLE', NULL, NULL, '2013-01-08 03:53:58', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('67', 'AVAILABLE', NULL, NULL, '2013-01-15 08:41:10', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('68', 'AVAILABLE', NULL, NULL, '2013-01-08 12:58:53', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('69', 'AVAILABLE', NULL, NULL, '2013-01-18 02:49:41', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('70', 'AVAILABLE', NULL, NULL, '2013-01-15 12:25:05', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('71', 'AVAILABLE', NULL, NULL, '2013-01-21 12:37:39', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('72', 'AVAILABLE', NULL, NULL, '2013-01-14 01:36:40', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('73', 'AVAILABLE', NULL, NULL, '2013-01-08 02:11:23', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('74', 'AVAILABLE', NULL, NULL, '2013-01-16 07:36:01', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('75', 'AVAILABLE', NULL, NULL, '2013-01-14 04:04:01', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('76', 'AVAILABLE', NULL, NULL, '2013-01-18 03:16:41', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('77', 'AVAILABLE', NULL, NULL, '2013-01-08 03:54:15', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('78', 'AVAILABLE', NULL, NULL, '2013-01-20 10:46:57', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('79', 'AVAILABLE', NULL, NULL, '2013-01-08 07:00:57', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('80', 'AVAILABLE', NULL, NULL, '2013-01-14 01:23:21', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('81', 'AVAILABLE', NULL, NULL, '2013-01-14 04:26:08', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('82', 'AVAILABLE', NULL, NULL, '2013-01-21 12:36:55', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('83', 'AVAILABLE', NULL, NULL, '2013-01-18 03:16:41', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('84', 'AVAILABLE', NULL, NULL, '2013-01-20 08:32:44', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('85', 'AVAILABLE', NULL, NULL, '2013-01-20 08:44:30', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('86', 'AVAILABLE', NULL, NULL, '2013-01-18 02:49:41', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('87', 'AVAILABLE', NULL, NULL, '2013-01-20 07:02:59', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('88', 'AVAILABLE', NULL, NULL, '2013-01-08 03:54:33', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('89', 'AVAILABLE', NULL, NULL, '2013-01-15 12:10:16', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('90', 'AVAILABLE', NULL, NULL, '2013-01-09 11:53:47', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('91', 'AVAILABLE', NULL, NULL, '2013-01-14 08:48:40', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('92', 'AVAILABLE', NULL, NULL, '2013-01-14 04:04:01', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('93', 'AVAILABLE', NULL, NULL, '2013-01-20 07:02:59', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('94', 'AVAILABLE', NULL, NULL, '2013-01-14 01:52:22', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('95', 'AVAILABLE', NULL, NULL, '2013-01-14 01:36:04', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('96', 'AVAILABLE', NULL, NULL, '2013-01-14 04:26:08', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('97', 'AVAILABLE', NULL, NULL, '2013-01-15 08:41:10', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('98', 'AVAILABLE', NULL, NULL, '2013-01-15 12:10:16', 0, 0, 0, 0, 0);
|
|
||||||
INSERT INTO `VNSB_squares` VALUES ('99', 'AVAILABLE', NULL, NULL, '2013-01-14 02:30:08', 0, 0, 0, 0, 0);
|
|
||||||
@@ -1,116 +0,0 @@
|
|||||||
<!--
|
|
||||||
www.vnlisting.com
|
|
||||||
Online Super Bowl Squares Script
|
|
||||||
Please read the "Readme.txt for license agreement, installation and usage instructions
|
|
||||||
-->
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
|
||||||
$superbowlURL = $_SERVER['REQUEST_SCHEME']."://".$_SERVER['HTTP_HOST'].trim($_SERVER['PHP_SELF'], "thankyou.php");
|
|
||||||
|
|
||||||
require_once('includes/dbTables.inc');
|
|
||||||
$conn = dbConnection();
|
|
||||||
if (!$conn) {
|
|
||||||
die("Are you sure your database is setup correctly? I'm giving up!".mysqli_connect_error());
|
|
||||||
}
|
|
||||||
|
|
||||||
require "includes/header.inc";
|
|
||||||
|
|
||||||
//$square = $_POST['square'];
|
|
||||||
$sqTotal = $_POST["sqTotal"];
|
|
||||||
for ($i=1;$i<=$sqTotal;$i++) {
|
|
||||||
$sqSelect[$i] = $_POST["square_$i"];
|
|
||||||
//echo $sqSelect[$i];
|
|
||||||
}
|
|
||||||
|
|
||||||
$name = $_POST['realname'];
|
|
||||||
$email = $_POST['email'];
|
|
||||||
$notes = $_POST['body'];
|
|
||||||
$date = date("Y-m-d h:i:s");
|
|
||||||
$confirm = $_POST['confirmation'];
|
|
||||||
|
|
||||||
for ($i=1;$i<=$sqTotal;$i++) {
|
|
||||||
$sql="SELECT * FROM VNSB_squares WHERE SQUARE='".$sqSelect[$i]."'";
|
|
||||||
$result = mysqli_query($conn, $sql);
|
|
||||||
if (!$result) {
|
|
||||||
//echo mysqli_error();
|
|
||||||
echo "\n\n\t***** Invalid square selected *****\n\n";
|
|
||||||
echo "<a href='javascript:onClick=history.go(-2);'>Back</a>";
|
|
||||||
exit;
|
|
||||||
} else {
|
|
||||||
$record = mysqli_fetch_assoc($result);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//continue only if the square is available
|
|
||||||
if ($record['DATE'] == "0000-00-00 00:00:00" || $record['DATE'] == NULL) {
|
|
||||||
|
|
||||||
|
|
||||||
//check for required fields
|
|
||||||
for ($i=1;$i<=$sqTotal;$i++) {
|
|
||||||
if (($sqSelect[$i] >= 00 OR $sqSelect[$i] < 100) AND $name != '' AND $email != '') {
|
|
||||||
|
|
||||||
$sql="UPDATE VNSB_squares SET NAME='".$name."', EMAIL='".$email."', NOTES='".$notes."', DATE='".$date."', CONFIRM='".$confirm."' WHERE SQUARE='".$sqSelect[$i]."' LIMIT 1";
|
|
||||||
$result = mysqli_query($conn, $sql);
|
|
||||||
if (!$result) {
|
|
||||||
echo mysqli_error();
|
|
||||||
echo "<BR>Sorry, Technical problem occurred... your selection was not added.<br><br> Email this problem to <a href=\"mailto:".$ADMIN_EMAIL."\">".$ADMIN_EMAIL."</a>";
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
echo "<p align='center'><br/><font color='#ff0000', size='3'>Required fields are missing!</font><br/><br/><a href='javascript:onClick=history.go(-1);'>Back</a></p>";
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//email
|
|
||||||
//$headers = "From: $ADMIN_EMAIL\r\nBcc: $ADMIN_EMAIL\r\n";
|
|
||||||
$headers = "From: $ADMIN_EMAIL"."\r\n"."Bcc: $ADMIN_EMAIL";
|
|
||||||
function notify_admin ($mailto, $mailmessage, $mail_headers)
|
|
||||||
{
|
|
||||||
mail("$mailto", "Super Bowl Squares", "$mailmessage", "$mail_headers");
|
|
||||||
}
|
|
||||||
|
|
||||||
$selectedSQUARES="";
|
|
||||||
for ($i=1;$i<=$sqTotal;$i++) { $selectedSQUARES .= $sqSelect[$i]." "; }
|
|
||||||
?>
|
|
||||||
|
|
||||||
<table width="60%" cellspacing="0" cellpadding="0" style="border: #FFCC99 1px solid; font-family:verdana, arial; font-size:12px; font-color:#0033cc">
|
|
||||||
<tr>
|
|
||||||
<td align="center">
|
|
||||||
<p><font size="4" color="#ffcc00"><h2>GOOD LUCK</h2></font></p>
|
|
||||||
<p>Your request has been recieved and an email was sent to your email address given.</p>
|
|
||||||
<p>The square(s) <strong><font color="#ff0000"><?=$selectedSQUARES?></font></strong> is(are) temporary reserved in your name "<font color="#ff0000"><?=$name?></font>", pending confirmation.</p>
|
|
||||||
<p>IF YOUR PAYMENT CAN NOT BE VERIFIED WITHIN 24 HOURS, YOU WILL LOOSE THE SQUARE(S).</p>
|
|
||||||
<p>Good Luck and enjoy the game.</p>
|
|
||||||
<p>The Commissioner</p>
|
|
||||||
<!-- <p>You may make your payment thru Paypal if you preferred. <br/>There will be an additional $1 for each payment up to $20 to cover the charges by Paypal.</p> -->
|
|
||||||
<br/><br/>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<p style="font-family: verdana, arial; font-size: 12px">
|
|
||||||
<a href="<?=$superbowlURL?>" title="Online Superbowl Squares">Home</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
$bodyMessage = "\nREMINDER\r\n";
|
|
||||||
$bodyMessage .= "Square(s) $selectedSQUARES is(are) temporary reserved in your name \"$name\", pending confirmation.\r\n";
|
|
||||||
$bodyMessage .= "IF YOUR PAYMENT CAN NOT BE VERIFIED WITHIN 24 HOURS, YOU WILL LOOSE THE SQUARE(S).\r\n\n";
|
|
||||||
$bodyMessage .= "Good Luck and enjoy the game.\r\n";
|
|
||||||
$bodyMessage .= "The Commissioner\r\n";
|
|
||||||
$bodyMessage .= "$superbowlURL\r\n\n";
|
|
||||||
//$bodyMessage .= "You may make your payment thru Paypal if you like. \rThere will be an additional $1 for each payment up to $20 to cover the charges by Paypal.\r\n";
|
|
||||||
$bodyMessage .= "\r\n\nNOTES TO ADMIN:\r\n";
|
|
||||||
$bodyMessage .= $notes."\r\n\n";
|
|
||||||
|
|
||||||
notify_admin($email,$bodyMessage,$headers);
|
|
||||||
|
|
||||||
require "includes/footer.inc"; ?>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
} else {
|
|
||||||
echo "<p align='center'><font color='#ff0000', size='3'><b>$square</b> is NOT available! Someone must have just selected that same square.<br/></font><br/>Please go <a href='javascript:onClick=history.go(-2);'>back</a> and select another square.</p>";
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||