diff --git a/AFC_logo.gif b/AFC_logo.gif new file mode 100644 index 0000000..a105d8e Binary files /dev/null and b/AFC_logo.gif differ diff --git a/NFC_logo.gif b/NFC_logo.gif new file mode 100644 index 0000000..76a3816 Binary files /dev/null and b/NFC_logo.gif differ diff --git a/NFL-logo.gif b/NFL-logo.gif new file mode 100644 index 0000000..bd3a7ff Binary files /dev/null and b/NFL-logo.gif differ diff --git a/Readme.txt b/Readme.txt new file mode 100644 index 0000000..0a20d52 --- /dev/null +++ b/Readme.txt @@ -0,0 +1,88 @@ + +########################################################################### + VNSB Squares + Version: 4.2 + Released: 1/23/13 + Written: www.VNLISTING.com + Demo: http://vnlisting.homelinux.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_v40.zip script to your local computer. +2. Change data in config.inc.php to reflect your mySQL data and rename it to config.php +3. Create a database in your MySQL as in config.php +4. Import superbowl.sql to your newly created MySQL database +5. Make changes to VNSB_settings as needed. +6. Upload all files to your web server. + + +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 send 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. + +===================== 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. + +===================== 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 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 4.1 to 4.2 ================================= +1. Add scores, winner indications, email winners + +TODO: +- Auto install of database and scripts +- Paypal implementation \ No newline at end of file diff --git a/VNSB_settings.sql b/VNSB_settings.sql new file mode 100644 index 0000000..e85fefe --- /dev/null +++ b/VNSB_settings.sql @@ -0,0 +1,41 @@ +-- phpMyAdmin SQL Dump +-- version 2.8.0.1 +-- http://www.phpmyadmin.net +-- +-- Host: custsql-pow13 +-- Generation Time: Jan 31, 2017 at 05:24 PM +-- Server version: 5.6.32 +-- PHP Version: 4.4.9 +-- +-- Database: `superbowl_51` +-- + +-- -------------------------------------------------------- + +-- +-- Table structure for table `VNSB_settings` +-- + +CREATE TABLE `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 5, 2017', 'sb_logo.png', 'Falcons', '/VNSB_releases/NFL_logos/Atlanta_Falcons.gif', 'Patriots', '/VNSB_releases/NFL_logos/NewEngland_Patriots.gif', '5.00', 20, 25, 20, 35, '4.2', 'admin@vnlisting.com', 'iloveu29'); diff --git a/VNSB_squares.sql b/VNSB_squares.sql new file mode 100644 index 0000000..367048e --- /dev/null +++ b/VNSB_squares.sql @@ -0,0 +1,137 @@ +-- 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); diff --git a/admin.php b/admin.php new file mode 100644 index 0000000..985146b --- /dev/null +++ b/admin.php @@ -0,0 +1,211 @@ + + + + + + , Kelly ' . "\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\")
;"; + } + ?> + +

ADMINISTRATOR APPROVAL

+ + + + + + + + + +
+ Confirm user selected square when payment is verified, or release the square if allowed time for payment has expired. +
+
+ + + + + + + + + + + + + + + + + + + + + +
Square + +
Confirm
Release
Notes to User
 

+
+
+

+ + + + + + + +
HomeNumbersScoresLogout
+

+ 0){ + $input = ""; + $whereclause = "("; + + for($e=0; $e"; + + $query="SELECT * FROM VNSB_squares WHERE $whereclause"; + //echo $query."
"; + $result = mysql_query($query); + if (!$result) { + echo mysql_error(); + exit; + } + + $USER_EMAIL_LIST = ''; + while ($record = mysql_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."
"; + if ($CONFIRM==1 AND $RELEASE!=1) { + $query="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) { + $query="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 "

Must select ONLY one 'Confirm' or 'Release' !!!

"; + echo "

Back

"; + exit; + } + //echo $query."
"; + $result = mysql_query($query); + if (!$result) { + echo mysql_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 "

Square(s) ".$square_list." updated successful

"; + echo "

Emailed to: ".$USER_EMAIL_LIST."

"; + echo " +

+ + + + + + +
HomeAdminLogout
+

"; + unset($confirmation, $SQUARE, $CONFIRM, $RELEASE, $NOTES, $ADM_EMAIL, $ADM_PASSWORD); + } + }else{ + echo "

Must select at least one Square to Confirm or Release' !!!

"; + echo "

Back

"; + exit; + } + + } ?> +

+

+ + + + + + + +
+

+ diff --git a/adminlogin.php b/adminlogin.php new file mode 100644 index 0000000..38c5fed --- /dev/null +++ b/adminlogin.php @@ -0,0 +1,83 @@ + + + + + + +ADMIN - Login + + + + +
+
"; + echo "Admin

Log out."; + exit; + } + // check input variables against database + include "config.php"; + $query = "SELECT Admin_email, Admin_pwd FROM VNSB_settings"; + $result = mysql_query($query); + // 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 = mysql_fetch_assoc($result); + if ($email==$record['Admin_email'] AND $pass==$record['Admin_pwd']) { + $_SESSION['VNSB']=$record['Admin_email']; + mysql_close($db); + header ("Location: admin.php"); + } else { + echo "

Invalid login

Admin login

"; + mysql_close($db); + exit; + } + } +} + +?> +
+

+

Welcome, Admin!
+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.

+ +
+ + + + + Enter Donation amount: $       +        + + +
+ +

+
+

Admin login

+ +
+

Email:        

+

Password:

+

+
+ +
+ + diff --git a/adminlogout.php b/adminlogout.php new file mode 100644 index 0000000..72ba85c --- /dev/null +++ b/adminlogout.php @@ -0,0 +1,33 @@ + + + + +ADMIN - Logout + + + + +
+ +

Logout

+
Don't forget to close your brower when you are done!!!"; + + // if the user isnt logged in, let them know that + } else { + echo "You haven't even logged in yet."; + } + ?> + +

Home

+

Admin

+ +
+ + diff --git a/config.php b/config.php new file mode 100644 index 0000000..8c6c00c --- /dev/null +++ b/config.php @@ -0,0 +1,18 @@ + + + diff --git a/emailall.php b/emailall.php new file mode 100644 index 0000000..cae5ed9 --- /dev/null +++ b/emailall.php @@ -0,0 +1,98 @@ + + + + + + + + + + + +
HomeAdminLogout
+

+ "; + + + require "header.inc"; + + function notify_admin ($mailto, $mailmessage, $mail_headers) + { + mail("$mailto", "Super Bowl Squares", "$mailmessage", "$mail_headers"); + } +?> + +

Send Email to ALL

+ + + + + + + + +
+ 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. +
+
+ + + + + +
 

+
+
+ Emails send to:

"; + $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"; + $query="SELECT * FROM VNSB_squares ORDER BY EMAIL"; + $result = mysql_query($query); + if (!$result) { + echo mysql_error(); + exit; + } + while ($record = mysql_fetch_assoc($result)) { + if ($USER_EMAIL != $record["EMAIL"]) { + $USER_NAME = $record["NAME"]; + $USER_EMAIL = $record["EMAIL"]; + notify_admin($USER_EMAIL,$bodyMessage,$headers); + echo "

".$USER_NAME.": ".$USER_EMAIL."

"; + } + } + + echo $LINKS; + unset($sendemails); + $headers = "From: $ADMIN_EMAIL\r\n"; + notify_admin($ADMIN_EMAIL,$bodyMessage,$headers); + } ?> + diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000..22a4320 Binary files /dev/null and b/favicon.ico differ diff --git a/footer.inc b/footer.inc new file mode 100644 index 0000000..a715077 --- /dev/null +++ b/footer.inc @@ -0,0 +1,19 @@ + + + +

+ + + + + +
Copyright © 2004- VNLISTINGVNSB Squares
+

+ + + + \ No newline at end of file diff --git a/gpl.txt b/gpl.txt new file mode 100644 index 0000000..4fe5df7 --- /dev/null +++ b/gpl.txt @@ -0,0 +1,340 @@ + 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. + + + Copyright (C) + + 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. + + , 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. diff --git a/header.inc b/header.inc new file mode 100644 index 0000000..f46af44 --- /dev/null +++ b/header.inc @@ -0,0 +1,56 @@ + + +Sorry, Technical problem occurred... Can't read from database.

Please notify this site admin"; + exit; +} +?> + + +VNLISTING :: Online Super Bowl Squares v4 + + + + + + + +
+

+ + + + + + +

Sunday,

   vs   
+
diff --git a/index.php b/index.php new file mode 100644 index 0000000..599917a --- /dev/null +++ b/index.php @@ -0,0 +1,195 @@ + + + + + + + +".$NFC_TEAM."
".$NFC[$i].""; + } +?> + + + + +".$AFC_TEAM."
".$AFC[$i]."";} + + if ($record['NAME'] == "AVAILABLE") { + $closed=0; + echo ""; + } 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
"; + } + if ($record['HALF']) { + $COLOR = "#ffff00"; + $WINNER .= "HALF
"; + } + if ($record['THIRD']) { + $COLOR = "#ffff00"; + $WINNER .= "THIRD
"; + } + if ($record['FINAL']) { + $COLOR = "#ffff00"; + $WINNER .= "FINAL"; + } + + echo ""; + } + + $cnt_row++; + if ($cnt_row==10) { + $cnt_row=0; + echo ""; + } +} +?> + +
".$record['SQUARE']." ".$record['NAME']."
"; + echo ""; + //".stripslashes($record['NAME'])."
".$record['SQUARE']."
+ echo "
".stripslashes($record['NAME'])."
".$STATUS."
".$WINNER."
+ +

+Check all your desired squares and click Submit to enter your information
+ +

+ + +
+ + + + + +
+The Rules:
+
  • $ per square
  • +
  • You can buy as many squares as you want
  • +
  • Your square(s) is/are not guaranteed until your payment is verified
  • +
  • Numbers will be randomly draw and assigned after all squares are taken
  • +
  • When confirmed, your square(s) will be changed to GREEN
  • +
    + + + + + + + + +
    The Payout:
    +
  • End of first quarter:
  • +
  • End of second quarter:
  • +
  • End of third quarter:
  • +
  • Final Score:
  • +
    +
       
    +
       
    +
       
    +
       
    +
    +
    %
    +
    %
    +
    %
    +
    %
    +
    +
    $
    +
    $
    +
    $
    +
    $
    +
    +
    +

    + + diff --git a/randomnumber.php b/randomnumber.php new file mode 100644 index 0000000..514af84 --- /dev/null +++ b/randomnumber.php @@ -0,0 +1,162 @@ + + + + + + + + + + +
    HomeAdminLogout
    +

    + "; + + require "header.inc"; + + echo " +

    Numbers Assignment

    +

    To be fair, numbers selection is not allowed until all squares are purchased/selected.

    +

    Numbers are only allowed to be entered once, either by randomly generated or manually entered.

    +
    + "; + + // makesure all squares are selected + $query="SELECT * FROM VNSB_squares WHERE `NAME`='AVAILABLE'"; + $result = mysql_query($query); + if ($record = mysql_fetch_assoc($result)) { + echo "

    Squares are still available!!!


    "; + echo $LINKS; + require "footer.inc"; + exit(); + } + + // stop if numbers existed + $query="SELECT * FROM VNSB_numbers"; + $result = mysql_query($query); + if ($record = mysql_fetch_assoc($result)) { + echo "

    Numbers already exist!!!


    "; + echo $LINKS; + require "footer.inc"; + exit(); + } + + if (isset($RANDOM)) { + //unset($RANDOM); // for testing + $NFC = array(); + $AFC = array(); + echo "

    Notify everyone via emails

    "; + echo "

    RANDOMLY GENERATED NUMBERS

    "; + + 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 " + + "; + + for ($i=1; $i<=10; $i++) { + echo ""; + } + echo " + + "; + + $query="SELECT * FROM VNSB_squares ORDER BY SQUARE"; + $result = mysql_query($query); + if (!$result) { + echo mysql_error(); + exit; + } + $cnt_row = 0; + $i=0; + while ($record = mysql_fetch_assoc($result)) { + if ($cnt_row==0) {$i++; echo"";} + if ($record['NAME'] == "AVAILABLE") { + echo ""; + } else if ($record['NAME']!="AVAILABLE" && $record['CONFIRM']==1) { + echo ""; + } else { + echo ""; + } + + $cnt_row++; + if ($cnt_row==10) { + $cnt_row=0; + echo ""; + } + } + echo "
     ".$NFC_TEAM." ".$NFC[$i]."
    $AFC_TEAM
    ".$AFC[$i]."
    ".stripslashes($record['NAME'])."
    ".$record['SQUARE']."
    ".stripslashes($record['NAME'])."
    Confirmed
    ".stripslashes($record['NAME'])."
    Pending
    "; + } else { + ?> + +
    + +
    + + PROBLEM WRITING NUMBERS INTO DATABASE!

    "; + exit; + } + } + } + + echo $LINKS; + require "footer.inc"; +} +?> + diff --git a/sb_logo.gif b/sb_logo.gif new file mode 100644 index 0000000..acfc4b8 Binary files /dev/null and b/sb_logo.gif differ diff --git a/sb_logo.jpg b/sb_logo.jpg new file mode 100644 index 0000000..f18f0bc Binary files /dev/null and b/sb_logo.jpg differ diff --git a/sb_logo.png b/sb_logo.png new file mode 100644 index 0000000..1d209a5 Binary files /dev/null and b/sb_logo.png differ diff --git a/sb_logo51.png b/sb_logo51.png new file mode 100644 index 0000000..44abb86 Binary files /dev/null and b/sb_logo51.png differ diff --git a/scores.php b/scores.php new file mode 100644 index 0000000..de6a26a --- /dev/null +++ b/scores.php @@ -0,0 +1,225 @@ + + + + + + + +Sorry, Technical problem occurred... your scores were not added.

    Email this problem to ".$ADMIN_EMAIL.""; + exit; + } +} + +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"); +} + +$query="SELECT * FROM `VNSB_scores`"; +$result = mysql_query($query); +if (!$result) { + echo mysql_error(); + exit; +} + +$scores = mysql_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; }; + +//Get assigned numbers +$query="SELECT * FROM VNSB_numbers"; +$result = mysql_query($query); +if (!$result) { + echo mysql_error(); + exit; +} +$cnt=0; +while ($record = mysql_fetch_assoc($result)) { + $cnt++; + $NFC[$cnt]=$record['NFC']; + $AFC[$cnt]=$record['AFC']; +} + +// Get name for each squares +$query="SELECT * FROM VNSB_squares"; +$result = mysql_query($query); +if (!$result) { + echo mysql_error(); + exit; +} + +while ($record = mysql_fetch_assoc($result)) { + $NAME[$record['SQUARE']] = $record['NAME']; + $EMAIL[$record['SQUARE']] = $record['EMAIL']; +} + + +// Admin add scores +if ($ADD_SCORES) { +?> +
    + + + + + + + + + + + + + + + + + + + + +
    QUARTERLY SCORES
    First
    Half
    Third
    Final
    + +
    +
    + + +

    + + + + + + + + +
    The Payout:
    +
  • End of first quarter:
  • +
  • End of second quarter:
  • +
  • End of third quarter:
  • +
  • Final Score:
  • +
    +
       
    +
       
    +
       
    +
       
    +
    +
    %
    +
    %
    +
    %
    +
    %
    +
    +
    $
    +
    $
    +
    $
    +
    $
    +
    +

    +"; + +// Display only on date of superbowl or later +// sb_date in the VNSB_settings must be in this format (February 3, 2013) for this to work correctly +if ( (strtotime(trim($SB_DATE)) <= strtotime(date("F j, Y"))) && ( $NFC_FIRST && $AFC_FIRST ) ) { + + echo ('email winners'); + + $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 "

    1st Quarter Winner ($NFC[$x],$AFC[$y])     Square #$square (".$NAME[$square].")

    "; + mysql_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 "

    Halftime Winner ($NFC[$x],$AFC[$y])     Square #$square (".$NAME[$square].")

    "; + mysql_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 "

    3rd Quarter Winner ($NFC[$x],$AFC[$y])     Square #$square (".$NAME[$square].")

    "; + mysql_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 "

    Final Winner ($NFC[$x],$AFC[$y])     Square #$square (".$NAME[$square].")

    "; + mysql_query("UPDATE VNSB_squares SET FINAL='1' WHERE SQUARE='$square' LIMIT 1"); + if ( $EMAIL=="yes" ) { notify_email($EMAIL[$square]); } + } + $cnt++; + } + } +} + +echo "

    "; +?> +



    + + + + + + +
    HomeAdminLogout
    +

    + + diff --git a/signup.php b/signup.php new file mode 100644 index 0000000..45a32ba --- /dev/null +++ b/signup.php @@ -0,0 +1,60 @@ + + + + +

    SQUARE SELECTION

    + + + + +
    +

    You are signing up for square(s): +
    +'); + echo (''); + if ( $SQ == 10 ) { echo "

    Maximum of 10 Squares per selection

    "; break; } // limit to 10 + } + } + + if ( $SQ==0 ) { + echo "

    You must select at least one square to continue!

    "; + echo "

    Home

    "; + exit; + } +} + ?> +

    + + +

    Name

    +

    Email

    +

    Notes to Admin
    + +

    +

    You have 24 hours to make your payment or your square will be released.

    + + + + +
    +

    + Home +

    + diff --git a/squares_blanksql.sql b/squares_blanksql.sql new file mode 100644 index 0000000..0c3e5bd --- /dev/null +++ b/squares_blanksql.sql @@ -0,0 +1,124 @@ + +-- +-- 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); diff --git a/superbowl.sql b/superbowl.sql new file mode 100644 index 0000000..6f6b907 --- /dev/null +++ b/superbowl.sql @@ -0,0 +1,208 @@ +-- 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); diff --git a/thankyou.php b/thankyou.php new file mode 100644 index 0000000..b96288b --- /dev/null +++ b/thankyou.php @@ -0,0 +1,109 @@ + + + +Back"; + exit; +} else { + $record = mysql_fetch_assoc($result); +} +} +//continue only if the square is available +if ($record['DATE'] == "0000-00-00 00:00:00") { + + +//check for required fields +for ($i=1;$i<=$sqTotal;$i++) { +if (($sqSelect[$i] >= 00 OR $sqSelect[$i] < 100) AND $name != '' AND $email != '') { + + $query="UPDATE VNSB_squares SET NAME='".$name."', EMAIL='".$email."', NOTES='".$notes."', DATE='".$date."', CONFIRM='".$confirm."' WHERE SQUARE='".$sqSelect[$i]."' LIMIT 1"; + $result = mysql_query($query); + if (!$result) { + echo mysql_error(); + echo "
    Sorry, Technical problem occurred... your selection was not added.

    Email this problem to ".$ADMIN_EMAIL.""; + exit; + } +} else { + echo "


    Required fields are missing!

    Back

    "; + 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]." "; } +?> + + + + + +
    +

    GOOD LUCK

    +

    Your request has been recieved and an email was sent to your email address given.

    +

    The square(s) is(are) temporary reserved in your name "", pending confirmation.

    +

    IF YOUR PAYMENT CAN NOT BE VERIFIED WITHIN 24 HOURS, YOU WILL LOOSE THE SQUARE(S).

    +

    Good Luck and enjoy the game.

    +

    The Commissioner

    + +

    +
    + +

    + Home +

    + + + +$square is NOT available! Someone must have just selected that same square.

    Please go back and select another square.

    "; + exit; +} +?> \ No newline at end of file