version 5.0

updated to work with newer AMP
installation is much simpler via install script
This commit is contained in:
Larry Lam
2023-02-09 13:21:22 -08:00
committed by GitHub
parent 57dc85e5a5
commit b9980b2b07
20 changed files with 898 additions and 250 deletions
+25 -37
View File
@@ -2,10 +2,17 @@
www.vnlisting.com
Online Super Bowl Squares Script
Please read the "Readme.txt for license agreement, installation and usage instructions
Version: 4.2 1/24/2013
Version: 5.0 2/7/2019
-->
<?php
require_once('config.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;
@@ -13,27 +20,27 @@ for ($i=1; $i<=10; $i++) {
$NFC[$i]="";
$AFC[$i]="";
}
$query="SELECT * FROM VNSB_numbers";
$result = mysql_query($query);
$sql="SELECT * FROM VNSB_numbers";
$result = mysqli_query($conn, $sql);
if (!$result) {
echo mysql_error();
echo mysqli_error();
exit;
}
while ($record = mysql_fetch_assoc($result)) {
while ($record = mysqli_fetch_assoc($result)) {
$cnt++;
$NFC[$cnt]=$record['NFC'];
$AFC[$cnt]=$record['AFC'];
}
$query="SELECT * FROM VNSB_scores";
$result = mysql_query($query);
$sql="SELECT * FROM VNSB_scores ORDER BY ID DESC LIMIT 1";
$result = mysqli_query($conn, $sql);
if (!$result) {
echo mysql_error();
echo mysqli_error();
exit;
}
$scores = mysql_fetch_assoc($result);
$scores = mysqli_fetch_assoc($result);
$NFC_FIRST=$scores['NFC_FIRST'];
$AFC_FIRST=$scores['AFC_FIRST'];
$NFC_HALF=$scores['NFC_HALF'];
@@ -43,31 +50,12 @@ $AFC_THIRD=$scores['AFC_THIRD'];
$NFC_FINAL=$scores['NFC_FINAL'];
$AFC_FINAL=$scores['AFC_FINAL'];
/* moved to header from 4.2
$query="SELECT * FROM VNSB_settings";
$result = mysql_query($query);
if ($record = mysql_fetch_assoc($result)) {
$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();
exit;
}
*/
?>
<?php require "header.inc"; ?>
<?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="NFL-logo.gif" title="National Football League" border="0" /></td>
<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>";
@@ -78,16 +66,16 @@ if ($record = mysql_fetch_assoc($result)) {
<form name="sqSelect" method="post" action="signup.php">
<?php
$query="SELECT * FROM VNSB_squares ORDER BY SQUARE";
$result = mysql_query($query);
$sql="SELECT * FROM VNSB_squares ORDER BY SQUARE";
$result = mysqli_query($conn, $sql);
if (!$result) {
echo mysql_error();
echo mysqli_error();
exit;
}
$cnt_row = 0;
$i=0;
$closed=1;
while ($record = mysql_fetch_assoc($result)) {
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") {
@@ -154,8 +142,8 @@ Check all your desired squares and click Submit to enter your information<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>Numbers will be randomly draw and assigned after all squares are taken</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">
@@ -192,4 +180,4 @@ Check all your desired squares and click Submit to enter your information<br />
</table>
</p>
<?php require "footer.inc"; ?>
<?php require "includes/footer.inc"; ?>