SOURCE CODE
<?php // ============================= // ============================= if ($_SERVER["SERVER_NAME"] == "www.thaiall.com") session_save_path("/home/users/web/b352/hy.thaiwebsearch/cgi-bin/tmp"); session_start(); // ============================= // Variables 1 $bgcolor = "#ddffdd"; if (isset($_GET["subj"])) $subj = "subj=".$_GET["subj"]; else $subj = ""; if (isset($_SESSION['name'])) $name = $_SESSION['name']; else $name = ""; if (isset($_SESSION['surname'])) $surname = $_SESSION['surname']; else $surname = ""; if (isset($_POST["name"])) { $name = $_POST["name"]; $_SESSION['name'] = $name; } if (isset($_POST["surname"])) { $surname = $_POST["surname"]; $_SESSION['surname'] = $surname; } // ============================= // Variable 2 $version = "1.600119"; $program_name = "tense10.php"; $directory = "http://www.thaiall.com/quiz/"; $data_name_prefix = "tense10"; $data_name = "present1"; $score_name = "tense10score.txt"; $background = "tense10bg.gif"; $t_now = date("M j,y g:i:s"); // ============================= // Variable 3 $google300 = '<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- 39 quiztense 300 --> <ins class="adsbygoogle" style="display:inline-block;width:300px;height:250px" data-ad-client="ca-pub-3309619467978767" data-ad-slot="7776834551"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script>'; $google728 = '<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- 39 quiztense 728 --> <ins class="adsbygoogle" style="display:inline-block;width:728px;height:90px" data-ad-client="ca-pub-3309619467978767" data-ad-slot="9113966956"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script>'; $google160 = '<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- 39 quiztense 160 --> <ins class="adsbygoogle" style="display:inline-block;width:160px;height:600px" data-ad-client="ca-pub-3309619467978767" data-ad-slot="6300101352"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script>'; // ============================= // Default Variable 3 if (isset($_GET["subj"])) $data_name = $_GET["subj"]; if (isset($_GET["action"])) $data_name = $_GET["action"]; // http://www.firstimpressionsimprinting.com/gpage11.html (tense10.gif = boy) <meta http-equiv=content-type content='text/html; charset=windows-874'> <meta name='keywords' content='tense,present,past,future' /> <meta name='description' content='tense is a verb-based method used to indicate the time' /> <link type='text/css' rel='stylesheet' href='rsp62.css'><link rel='icon' type='image/x-icon' href='rsp.ico' /><style type='text/css'> textarea{font-family:microsoft sans serif;font-size:14px;color:blue;background:white;} td{font-family:THChakraPetch,microsoft sans serif;font-size:25px;} body{font-family:THChakraPetch,microsoft sans serif;font-size:30px;} </style></head><body bgcolor=$bgcolor topmargin='0' leftmargin='0' style='background-image:url(" . $background . ")'> <table width=760 align=center cellspacing=1 border=1 bordercolor=black bgcolor=black><td><center>" . $google728 . "</td></table>"; $footer = "<table width=760 align=center cellspacing=1 bgcolor=white><tr><td style='font-size:20px'><center> <table cellspacing=5 cellpadding=0 bgcolor=white> <td valign=top style='font-size:14px;font-family:microsoft sans serif;' width=120px> <a href=http://www.thaiall.com/quiz/test10.php?subj=vbnet01>vb.net 1</a><br/> </td><td bgcolor=gray width=1px> </td><td valign=top style='font-size:14px;font-family:microsoft sans serif;' width=120px> </td><td bgcolor=gray width=1px> </td><td valign=top style='font-size:14px;font-family:microsoft sans serif;' width=120px> <a href=http://www.thaiall.com/quiz/tense10.php?subj=present1>present 1</a><br/> <a href=http://www.thaiall.com/quiz/tense10.php?subj=presentper1>present perfect 1</a><br/> </td><td bgcolor=gray width=1px> </td><td valign=top style='font-size:14px;font-family:microsoft sans serif;' width=120px> </td><td bgcolor=gray width=1px> </td><td valign=top style='font-size:14px;font-family:microsoft sans serif;' width=120px> <a href=http://www.thaiall.com/sponsor>สนับสนุน</a><br/> <a href=http://www.facebook.com/thaiall>facebook page</a> </td></table> <script language=javascript>page='quiz_tense10'</script><script language='javascript1.1' src='http://hits1.truehits.net/data/c0001941.js'></script></td></tr></table> </body></html>"; $remark = "<tr><td bgcolor=#660000 colspan=2><font color=white> </td></tr>"; // ============================= // View Source Code if (isset($_GET["action"])) { echo $header; if ($_GET["action"] == "source") { $ar = file($program_name); echo "<table align=center width=760><td bgcolor=#dddddd><center><font size=6>SOURCE CODE</font><br/><textarea cols=120 rows=25 wrap=off>"; foreach ($ar as $k=>$v) echo htmlspecialchars($v); echo "</textarea></td></table>"; } if ($_GET["action"] == "report") { $ar = file($score_name); ?> <table width="760" align="center" cellspacing="1" bgcolor="white"><tr><td> </td><td width="300"> <center> <?php echo $google300; ?> </center> </td></tr></table> <?php echo "<table width=760 align=center cellspacing=1 bgcolor=#f9f9f9> $i=0; $bg = ""; foreach ($ar as $k=>$v) { $i++; if (!isset($_GET["top"]) || $i <= 10) { $ar = split("\t",$v); if (strlen($bg) == 0) $bg = " bgcolor=#ddffff"; else $bg = ""; if ($ar[3] == $ar[4]) $bg = " bgcolor=#ffdddd"; echo "<tr $bg><td>$i</td><td><b>$ar[0] $ar[1]</b></td><td><a href=?subj=$ar[2]>$ar[2]</a></td> <td align=center>$ar[3]</td><td align=center>$ar[4]</td><td>$ar[5]</td><td>$ar[6]</td></tr>"; } } echo "</table>"; } echo $footer; exit; } // ============================= // Get Random value and Read file $cnt_quiz = 0; $data_namef = $data_name_prefix . $data_name . ".php"; if (!file_exists($data_namef)) { echo $error_subj.$footer; exit; } $ar = file($data_namef); foreach ($ar as $v) { $q = split("\t",$v); $qok{$cnt_quiz} = $v; $rnd{$cnt_quiz} = rand(); $cnt_quiz = $cnt_quiz + 1; } } // ============================= // General Variable $c[1] = array(1,2,3,4,7,5,6); $c[2] = array(5,7,2,3,4,1,6); $c[3] = array(4,1,2,5,7,3,6); $c[4] = array(2,3,5,4,1,6,7); $c[5] = array(4,6,7,3,1,2,5); $c[6] = array(7,6,5,2,4,1,3); $c[7] = array(2,4,1,3,7,6,5); // ============================= // Check Answer if (isset($_POST["action"]) && isset($_SESSION['start'])) { echo $header; if ($_POST["action"] == "check") { if (strlen($_POST["name"]) == 0 || strlen($_POST["surname"]) == 0) { echo $error_name.$footer; unset($_SESSION["start"]); exit; } $right = 0; $wrong = 0; $qok{$cnt_quiz} = $v; foreach ($qok as $k=>$v) { $q = split("\t",$v); $qans{$q[0]} = $q[2]; } foreach ($_POST as $k=>$v) { if ($k != "action" && $k != "name" && $k != "surname" && $k != "total" && $k != "subject") { if (strlen($v) > 0) if ($qans{$k} == $v) $right++; else $wrong++; } } $total = $_POST["total"]; if ($total <= ($right + $wrong)) { $wrong = $total - $right; echo "<table width=760 align=center cellspacing=1 bgcolor=white>"; echo "</td></table>"; $data = $_POST["name"]."\t".$_POST["surname"]."\t".$_POST["subject"]."\t"; $data = $data . $right."\t".$total."\t".$_SESSION['start']."\t".$t_now."\n"; $fr = array(); if (file_exists($score_name)) $fr = file($score_name); $limit = count($fr); if ($total_user <= $limit) $limit = $total_user - 1; $fw=fopen ($score_name,"w"); fputs ($fw,$data); for ($i=0;$i<$limit;$i++) fputs ($fw,$fr[$i]); fclose ($fw); echo "<meta http-equiv=refresh content='10;url=". $program_name . "?action=report&top=10'>"; unset($_SESSION["start"]); // session_unset(); } else { } } } else { // ============================= // Show Question $ar = file($data_namef); $q = split("\t",$ar[0]); echo $header; $_SESSION['start'] = $t_now; echo "<form action='$directory". "$program_name' method=post> <table width='760' align='center' border='1' bordercolor='black' cellspacing='0'> <tr><td bgcolor=#dddddd><center><b>Quiz ID : $data_name</b></center>"; $total_question = 0; echo "<table width='600' align='center' style='background-color:#f2f2f2;'>"; $bg = ""; foreach ($rnd as $k=>$v) { $total_question++; $q = split("\t",$qok{$k}); if (strlen($bg) == 0) $bg = " bgcolor='#ffffdd'"; else $bg = ""; echo "<tr $bg><td style='font-size:40px'>"; echo $total_question.". ".$q[1]; $cok = rand(1,7); for($i=3;$i<10;$i++) { if (isset($q[$c[$cok][$i - 3] + 2])) { if (strlen($q[$c[$cok][$i - 3] + 2]) > 0 && $q[$c[$cok][$i - 3] + 2] != "\r\n" && $q[$c[$cok][$i - 3] + 2] != "\n") echo "<dd><input type='radio' name=$q[0] value='". ($c[$cok][$i - 3]) ."'>". $q[$c[$cok][$i - 3] + 2]."</dd>"; } } echo "</td>"; if ($total_question == 1) { echo "<td width=160 valign=top rowspan=10 bgcolor=gray>$google160</td>"; } echo "</tr>"; } echo "<tr><td align='center' bgcolor='" . $bgcolor . "' colspan=2><table bgcolor=white><tr><td>"; if ($_SERVER["SERVER_NAME"] == "www.thaiabc.com") else echo "<table width='400' align='center' bgcolor='#dddddd'> $remark <br/>$remark_send <input type='hidden' value='check' name='action'> <input type='hidden' value=$total_question name='total'> <input type='hidden' value=$data_name name='subject'> </form>"; echo "</td><td>" . $google300 . "</td></tr></table></td></table><br/>"; } echo $footer; ?>
สถิติ 100 รายการ
:
เริ่มใหม่
:
ภาพเตรียมข้อสอบ
:
รหัสต้นฉบับ
: รุ่น 1.600119 : เวลา : Mar 29,24 6:56:59
คอมพิวเตอร์
vb.net 1
คีย์แอพพลิเคชั่น 1*
จาวาทำซ้ำ 1
คอมพิวเตอร์ 1
คอมพิวเตอร์ 2
คณิต
บวกเลข 1
บวกเลข 2
อนุกรม (ก.พ.)
เตรียมสอบ (ก.พ.)
คณิต 1
อังกฤษ
ถาม - ตอบ
present 1
present perfect 1
อังกฤษเบื้องต้น
อังกฤษ 1
ไทย สังคม
สังคมศึกษา
ความรู้ทั่วไป
ไทย f.1
ไทย p.1
ไทย m.1
เกี่ยวกับเรา
หน้าหลัก
ทีมงาน
ศูนย์สอบออนไลน์
สนับสนุน
facebook page