function string2sql($string) {
return htmlentities((str_replace("'",'"',$string)));
}
?>
Tennis Memory
require_once 'class/mobile/Mobile_Detect.php';
$detect = new Mobile_Detect;
$deviceType = ($detect->isMobile() ? ($detect->isTablet() ? 'tablet' : 'phone') : 'computer');
if($deviceType=="phone") {
?>
$content = file_get_contents("count/phone.txt");
$file = fopen("count/phone.txt","w");
fwrite($file,$content.".");
fclose($file);
} else if($deviceType=="tablet") {
?>
$content = file_get_contents("count/tablet.txt");
$file = fopen("count/tablet.txt","w");
fwrite($file,$content.".");
fclose($file);
} else {
$content = file_get_contents("count/computer.txt");
$file = fopen("count/computer.txt","w");
fwrite($file,$content.".");
fclose($file);
}
?>
if(isset($_GET["win"])) {
?>
} else {
?>
// 8 card types
$cardtype_count = array(0,0,0,0,0,0,0,0);
for($i=0; $i<16; $i++)
{
$card_selected = false;
while(!$card_selected)
{
//$cardtype_count[$c] < 3
$c = rand(1,8);
if($cardtype_count[$c] < 2)
{
$current_card = $c;
$cardtype_count[$c] += 1;
$card_selected = true;
} else {
?>
}
}
?>
-
// (($rand = rand(1,99))>33) ? (($rand>66) ? " card-alt" : " card-alt2") : ""; ?>
}
?>
}
?>