if(isset($display)) {?>View All Players |
} ?>
if(isset($display)) {
include 'config.php';
include 'opendb.php';
$query2 = "select * from lotto_numbers order by id asc";
//mysql_query($query2) or die('Error, Selecting Data');
$query = "select * from lotto_users where id=$id";
//mysql_query($query) or die('Error, Selecting Data');
$rt=mysql_query($query);
echo mysql_error();
?>| Player |
while($nt=mysql_fetch_array($rt)){
$onematch=0;
$twomatch=0;
$threematch=0;
$fourmatch=0;
$fivematch=0;
$sixmatch=0;
$rt2=mysql_query($query2);
while($lotto=mysql_fetch_array($rt2)){
if ($nt[one]==$lotto[one]) { $onematch = $onematch+1;}
if ($nt[one]==$lotto[two]) { $onematch = $onematch+1;}
if ($nt[one]==$lotto[three]) { $onematch = $onematch+1;}
if ($nt[one]==$lotto[four]) { $onematch = $onematch+1;}
if ($nt[one]==$lotto[five]) { $onematch = $onematch+1;}
if ($nt[one]==$lotto[six]) { $onematch = $onematch+1;}
if ($nt[two]==$lotto[one]) { $twomatch = $twomatch+1;}
if ($nt[two]==$lotto[two]) { $twomatch = $twomatch+1;}
if ($nt[two]==$lotto[three]) { $twomatch = $twomatch+1;}
if ($nt[two]==$lotto[four]) { $twomatch = $twomatch+1;}
if ($nt[two]==$lotto[five]) { $twomatch = $twomatch+1;}
if ($nt[two]==$lotto[six]) { $twomatch = $twomatch+1;}
if ($nt[three]==$lotto[one]) { $threematch = $threematch+1;}
if ($nt[three]==$lotto[two]) { $threematch = $threematch+1;}
if ($nt[three]==$lotto[three]) { $threematch = $threematch+1;}
if ($nt[three]==$lotto[four]) { $threematch = $threematch+1;}
if ($nt[three]==$lotto[five]) { $threematch = $threematch+1;}
if ($nt[three]==$lotto[six]) { $threematch = $threematch+1;}
if ($nt[four]==$lotto[one]) { $fourmatch = $fourmatch+1;}
if ($nt[four]==$lotto[two]) { $fourmatch = $fourmatch+1;}
if ($nt[four]==$lotto[three]) { $fourmatch = $fourmatch+1;}
if ($nt[four]==$lotto[four]) { $fourmatch = $fourmatch+1;}
if ($nt[four]==$lotto[five]) { $fourmatch = $fourmatch+1;}
if ($nt[four]==$lotto[six]) { $fourmatch = $fourmatch+1;}
if ($nt[five]==$lotto[one]) { $fivematch = $fivematch+1;}
if ($nt[five]==$lotto[two]) { $fivematch = $fivematch+1;}
if ($nt[five]==$lotto[three]) { $fivematch = $fivematch+1;}
if ($nt[five]==$lotto[four]) { $fivematch = $fivematch+1;}
if ($nt[five]==$lotto[five]) { $fivematch = $fivematch+1;}
if ($nt[five]==$lotto[six]) { $fivematch = $fivematch+1;}
if ($nt[six]==$lotto[one]) { $sixmatch = $sixmatch+1;}
if ($nt[six]==$lotto[two]) { $sixmatch = $sixmatch+1;}
if ($nt[six]==$lotto[three]) { $sixmatch = $sixmatch+1;}
if ($nt[six]==$lotto[four]) { $sixmatch = $sixmatch+1;}
if ($nt[six]==$lotto[five]) { $sixmatch = $sixmatch+1;}
if ($nt[six]==$lotto[six]) { $sixmatch = $sixmatch+1;}
if ($onematch > $m1) { $didmatch = 1;}
if ($twomatch > $m2) { $didmatch = 1;}
if ($threematch > $m3) { $didmatch = 1;}
if ($fourmatch > $m4) { $didmatch = 1;}
if ($fivematch > $m5) { $didmatch = 1;}
if ($sixmatch > $m6) { $didmatch = 1;}
if ($didmatch == 1) { $lottomatches .= "id=$lotto[id] OR "; }
$didmatch = 0;
$m1 = $onematch;
$m2 = $twomatch;
$m3 = $threematch;
$m4 = $fourmatch;
$m5 = $fivematch;
$m6 = $sixmatch;
}
if ($onematch > 0) { $color1 = "yellow";} else {$color1 = "white";}
if ($twomatch > 0) { $color2 = "yellow";} else {$color2 = "white";}
if ($threematch > 0) { $color3 = "yellow";} else {$color3 = "white";}
if ($fourmatch > 0) { $color4 = "yellow";} else {$color4 = "white";}
if ($fivematch > 0) { $color5 = "yellow";} else {$color5 = "white";}
if ($sixmatch > 0) { $color6 = "yellow"; } else {$color6 = "white";}
echo "| $nt[name] | $nt[one] | $nt[two] | $nt[three] | $nt[four] | $nt[five] | $nt[six] | ";
}
?>
|
//$query = "select * from lotto_numbers where $lottomatches id=1 order by id asc";
$query = "select * from lotto_numbers order by id asc";
//mysql_query($query) or die('Error, Selecting Data');
$rt=mysql_query($query);
echo mysql_error();
?>| LOTTO NUMBERS |
$query2 = "select * from lotto_users where id=$id";
//mysql_query($query2) or die('Error, Selecting Data');
while($lotto=mysql_fetch_array($rt)){
$onematch=0;
$twomatch=0;
$threematch=0;
$fourmatch=0;
$fivematch=0;
$sixmatch=0;
$rt2=mysql_query($query2);
while($nt=mysql_fetch_array($rt2)){
if ($lotto[one]==$nt[one]) { $onematch = $onematch+1;}
if ($lotto[one]==$nt[two]) { $onematch = $onematch+1;}
if ($lotto[one]==$nt[three]) { $onematch = $onematch+1;}
if ($lotto[one]==$nt[four]) { $onematch = $onematch+1;}
if ($lotto[one]==$nt[five]) { $onematch = $onematch+1;}
if ($lotto[one]==$nt[six]) { $onematch = $onematch+1;}
if ($lotto[two]==$nt[one]) { $twomatch = $twomatch+1;}
if ($lotto[two]==$nt[two]) { $twomatch = $twomatch+1;}
if ($lotto[two]==$nt[three]) { $twomatch = $twomatch+1;}
if ($lotto[two]==$nt[four]) { $twomatch = $twomatch+1;}
if ($lotto[two]==$nt[five]) { $twomatch = $twomatch+1;}
if ($lotto[two]==$nt[six]) { $twomatch = $twomatch+1;}
if ($lotto[three]==$nt[one]) { $threematch = $threematch+1;}
if ($lotto[three]==$nt[two]) { $threematch = $threematch+1;}
if ($lotto[three]==$nt[three]) { $threematch = $threematch+1;}
if ($lotto[three]==$nt[four]) { $threematch = $threematch+1;}
if ($lotto[three]==$nt[five]) { $threematch = $threematch+1;}
if ($lotto[three]==$nt[six]) { $threematch = $threematch+1;}
if ($lotto[four]==$nt[one]) { $fourmatch = $fourmatch+1;}
if ($lotto[four]==$nt[two]) { $fourmatch = $fourmatch+1;}
if ($lotto[four]==$nt[three]) { $fourmatch = $fourmatch+1;}
if ($lotto[four]==$nt[four]) { $fourmatch = $fourmatch+1;}
if ($lotto[four]==$nt[five]) { $fourmatch = $fourmatch+1;}
if ($lotto[four]==$nt[six]) { $fourmatch = $fourmatch+1;}
if ($lotto[five]==$nt[one]) { $fivematch = $fivematch+1;}
if ($lotto[five]==$nt[two]) { $fivematch = $fivematch+1;}
if ($lotto[five]==$nt[three]) { $fivematch = $fivematch+1;}
if ($lotto[five]==$nt[four]) { $fivematch = $fivematch+1;}
if ($lotto[five]==$nt[five]) { $fivematch = $fivematch+1;}
if ($lotto[five]==$nt[six]) { $fivematch = $fivematch+1;}
if ($lotto[six]==$nt[one]) { $sixmatch = $sixmatch+1;}
if ($lotto[six]==$nt[two]) { $sixmatch = $sixmatch+1;}
if ($lotto[six]==$nt[three]) { $sixmatch = $sixmatch+1;}
if ($lotto[six]==$nt[four]) { $sixmatch = $sixmatch+1;}
if ($lotto[six]==$nt[five]) { $sixmatch = $sixmatch+1;}
if ($lotto[six]==$nt[six]) { $sixmatch = $sixmatch+1;}
}
if ($onematch > 0) { $color1 = "yellow";} else {$color1 = "white";}
if ($twomatch > 0) { $color2 = "yellow";} else {$color2 = "white";}
if ($threematch > 0) { $color3 = "yellow";} else {$color3 = "white";}
if ($fourmatch > 0) { $color4 = "yellow";} else {$color4 = "white";}
if ($fivematch > 0) { $color5 = "yellow";} else {$color5 = "white";}
if ($sixmatch > 0) { $color6 = "yellow"; } else {$color6 = "white";}
echo "| $lotto[one] | $lotto[two] | $lotto[three] | $lotto[four] | $lotto[five] | $lotto[six] | $lotto[date] | ";
}
echo " ";
include 'closedb.php';
} else {
include 'config.php';
include 'opendb.php';
$query2 = "select * from lotto_numbers order by id asc";
//mysql_query($query2) or die('Error, Selecting Data');
$query = "select * from lotto_users order by name asc";
//mysql_query($query) or die('Error, Selecting Data');
$rt=mysql_query($query);
echo mysql_error();
?>| Players |
while($nt=mysql_fetch_array($rt)){
$onematch=0;
$twomatch=0;
$threematch=0;
$fourmatch=0;
$fivematch=0;
$sixmatch=0;
$veryclose=0;
$rt2=mysql_query($query2);
while($lotto=mysql_fetch_array($rt2)){
if ($nt[one]==$lotto[one]) { $onematch = $onematch+1;}
if ($nt[one]==$lotto[two]) { $onematch = $onematch+1;}
if ($nt[one]==$lotto[three]) { $onematch = $onematch+1;}
if ($nt[one]==$lotto[four]) { $onematch = $onematch+1;}
if ($nt[one]==$lotto[five]) { $onematch = $onematch+1;}
if ($nt[one]==$lotto[six]) { $onematch = $onematch+1;}
if ($nt[two]==$lotto[one]) { $twomatch = $twomatch+1;}
if ($nt[two]==$lotto[two]) { $twomatch = $twomatch+1;}
if ($nt[two]==$lotto[three]) { $twomatch = $twomatch+1;}
if ($nt[two]==$lotto[four]) { $twomatch = $twomatch+1;}
if ($nt[two]==$lotto[five]) { $twomatch = $twomatch+1;}
if ($nt[two]==$lotto[six]) { $twomatch = $twomatch+1;}
if ($nt[three]==$lotto[one]) { $threematch = $threematch+1;}
if ($nt[three]==$lotto[two]) { $threematch = $threematch+1;}
if ($nt[three]==$lotto[three]) { $threematch = $threematch+1;}
if ($nt[three]==$lotto[four]) { $threematch = $threematch+1;}
if ($nt[three]==$lotto[five]) { $threematch = $threematch+1;}
if ($nt[three]==$lotto[six]) { $threematch = $threematch+1;}
if ($nt[four]==$lotto[one]) { $fourmatch = $fourmatch+1;}
if ($nt[four]==$lotto[two]) { $fourmatch = $fourmatch+1;}
if ($nt[four]==$lotto[three]) { $fourmatch = $fourmatch+1;}
if ($nt[four]==$lotto[four]) { $fourmatch = $fourmatch+1;}
if ($nt[four]==$lotto[five]) { $fourmatch = $fourmatch+1;}
if ($nt[four]==$lotto[six]) { $fourmatch = $fourmatch+1;}
if ($nt[five]==$lotto[one]) { $fivematch = $fivematch+1;}
if ($nt[five]==$lotto[two]) { $fivematch = $fivematch+1;}
if ($nt[five]==$lotto[three]) { $fivematch = $fivematch+1;}
if ($nt[five]==$lotto[four]) { $fivematch = $fivematch+1;}
if ($nt[five]==$lotto[five]) { $fivematch = $fivematch+1;}
if ($nt[five]==$lotto[six]) { $fivematch = $fivematch+1;}
if ($nt[six]==$lotto[one]) { $sixmatch = $sixmatch+1;}
if ($nt[six]==$lotto[two]) { $sixmatch = $sixmatch+1;}
if ($nt[six]==$lotto[three]) { $sixmatch = $sixmatch+1;}
if ($nt[six]==$lotto[four]) { $sixmatch = $sixmatch+1;}
if ($nt[six]==$lotto[five]) { $sixmatch = $sixmatch+1;}
if ($nt[six]==$lotto[six]) { $sixmatch = $sixmatch+1;}
}
if ($onematch > 0) { $color1 = "yellow"; $veryclose = $veryclose+1;} else {$color1 = "white";}
if ($twomatch > 0) { $color2 = "yellow"; $veryclose = $veryclose+1;} else {$color2 = "white";}
if ($threematch > 0) { $color3 = "yellow"; $veryclose = $veryclose+1;} else {$color3 = "white";}
if ($fourmatch > 0) { $color4 = "yellow"; $veryclose = $veryclose+1;} else {$color4 = "white";}
if ($fivematch > 0) { $color5 = "yellow"; $veryclose = $veryclose+1;} else {$color5 = "white";}
if ($sixmatch > 0) { $color6 = "yellow"; $veryclose = $veryclose+1;} else {$color6 = "white";}
if ($onematch > 0 AND $twomatch > 0 AND $threematch > 0 AND $fourmatch > 0 AND $fivematch > 0 AND $sixmatch > 0) { $WINNER = 1;} else {$WINNER = 0;}
if ($WINNER == 1) {$winnercolor="red"; echo "| $nt[name] WINS! | ";} else {$winnercolor="white";}
if ($veryclose == 5) { $winnercolor="purple"; $count5 = $count5+1;}
if ($veryclose == 4) { $winnercolor="green"; $count4 = $count4+1;}
if ($veryclose == 3) { $winnercolor="pink"; $count3 = $count3+1;}
if ($username == $nt[name]) { $spaces = " ] ";} else {$spaces = "";}
$username = $nt[name];
echo "| $spaces$nt[name] | $nt[one] | $nt[two] | $nt[three] | $nt[four] | $nt[five] | $nt[six] | ";
$count = $count + 1;
}
Echo "| $count Total Players | ";
Echo "| $count3 with 3 Numbers | ";
Echo "| $count4 with 4 Numbers | ";
Echo "| $count5 with 5 Numbers | ";
include 'closedb.php';
?>
|
| LOTTO NUMBERS |
while($lotto=mysql_fetch_array($rt)){
echo "| $lotto[one] | $lotto[two] | $lotto[three] | $lotto[four] | $lotto[five] | $lotto[six] | $lotto[date] | ";
$count2 = $count2 + 1;
}
Echo "| $count2 Total Drawing | ";
echo " ";
include 'closedb.php';
}
?>
|