Your IP : 216.73.217.87
<?php
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
?><!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="product" content="Областно състезание по ИТ" />
<meta name="description" content="Областно състезание по ИТ" />
<meta name="author" content="СОУ Васил Левски - Троян" />
<style>
<!--
html, body
{
margin: 0px;
padding: 0px;
}
a.mi
{
text-decoration: none;
border: 2px #456 solid;
}
a.mi:hover
{
border: 2px #000 solid;
}
a.milnk
{
text-decoration: none;
border: 2px #456 solid;
}
a.milnk:hover
{
border: 2px #000 solid;
}
a.lnk
{
color: #000;
text-decoration: underline;
}
a.lnk:hover
{
text-decoration: none;
}
div
{
font-family: Verdana, Helvetica, sans-serif;
font-size: 18px;
}
label, textarea, input, select
{
font-family: Verdana, Helvetica, sans-serif;
font-size: 15px;
cursor: default;
}
-->
</style>
<title>За състезанието</title>
</head>
<body>
<div style="position: relative; margin: 0 auto; width: 900px; background-color: #fff; font-size: 20px;">
<iframe name="sff" id="sff" src="./l.html" style="position: absolute; width: 0px; height: 0px; top: 0px; left: 0px; border: 0px; z-index: 1;"></iframe>
<form id="sf" name="sf">
<img src="./header.png" width="150" height="150" border="0" align="left" /><br />Областно състезание<br />по информационни технологии
<br />на СОУ "Васил Левски" - гр. Троян
<br />
<br />
<br /><hr />
<center>
<br />
<?php
include("./conn.php");
@mysql_select_db('it', $db) or die();
$snm=$_POST["snm"];
$code=$_POST["code"];
$res=mysql_query("SELECT i,kl FROM `students` WHERE `i`='".$snm."' AND `code`='".$code."' LIMIT 1", $db);
$i=1;
$std=0;
while ($rows=mysql_fetch_row($res))
{
$i=2;
$std=$rows[0];
$kl=$rows[1];
}
if ($i==1)
{
?>
<br />
<br /><font style="color: #f00;"><b>СГРЕШЕН КОД ЗА ДОСТЪП!</b></font>
<br />
<br />
<a href="./begin.php" style="cursor: pointer; color: #FFFFFF; text-decoration: none;" title="Опитайте отново"><div style="margin: 0 auto; width: 300px; height: 30px; text-align: center; font-family: Verdana, Arial, sans-serif; font-size: 18px; padding-top: 7px; border: 3px #337799 solid; border-radius: 5px; background-color: #330044; cursor: pointer; overflow: hidden;">Опитайте отново</div></a>
</center></form></div></body></html>
<?php
exit;
}
else
{
//if (($kl==5) || ($kl==11) || ($kl==12))
if (1==1)
{
?>
</center>
<b>ТЕСТ:</b> <i>За Вашата група <u>НЯМА</u> тест.</i><br />
<?php
}
else
{
$tsn=time();
$res=mysql_query("UPDATE `students` SET `tsn`='".$tsn."' WHERE `i`='".$std."'", $db);
print("<input type=\"hidden\" name=\"std\" id=\"std\" value=\"".$std."\" />");
print("<input type=\"hidden\" name=\"words\" id=\"words\" value=\"\" />");
?>
</center>
<b>ТЕСТ ОТ 20 ВЪПРОСА:</b>
<div style="width: 925px; height: 250px; border: 2px; overflow-x: hidden; overflow-y: auto;">
<?php
include("./conn.php");
mysql_select_db("it");
if (($kl==6) || ($kl==7) || ($kl==8))
{
$res=mysql_query("SELECT * FROM `inf_6` ORDER BY RAND() LIMIT 20", $db);
}
else
{
$res=mysql_query("SELECT * FROM `inf_9` ORDER BY RAND() LIMIT 20", $db);
}
$i=1;
while ($rows=mysql_fetch_row($res))
{
$qa[$i]="".$rows[0]."";
$qarr[$i]="".$rows[1]."";
$aarr[$i]="".$rows[2]."";
$barr[$i]="".$rows[3]."";
$carr[$i]="".$rows[4]."";
$darr[$i]="".$rows[5]."";
$rabarr[$i]="".$rows[6]."";
$tarr[$i]="".$rows[7]."";
$i++;
}
$qqo="q".$qa[1]."q".$qa[2]."q".$qa[3]."q".$qa[4]."q".$qa[5]."q".$qa[6]."q".$qa[7]."q".$qa[8]."q".$qa[9]."q".$qa[10]."q".$qa[11]."q".$qa[12]."q".$qa[13]."q".$qa[14]."q".$qa[15]."q".$qa[16]."";
$i=1;
$qro="";
$tss="";
while ($i<=20)
{
$q="".$qarr[$i]."";
$a="".$aarr[$i]."";
$b="".$barr[$i]."";
$c="".$carr[$i]."";
$d="".$darr[$i]."";
$rab="".$rabarr[$i]."";
$t="".$tarr[$i]."";
if ($t==1)
{
$qr=rand(1, 24);
if ($qr==1)
{
$qt=$q;
$at=$a;
$bt=$b;
$ct=$c;
$dt=$d;
$ra=1;
}
else if ($qr==2)
{
$qt=$q;
$at=$a;
$bt=$b;
$ct=$d;
$dt=$c;
$ra=1;
}
else if ($qr==3)
{
$qt=$q;
$at=$a;
$bt=$c;
$ct=$b;
$dt=$d;
$ra=1;
}
else if ($qr==4)
{
$qt=$q;
$at=$a;
$bt=$c;
$ct=$d;
$dt=$b;
$ra=1;
}
else if ($qr==5)
{
$qt=$q;
$at=$a;
$bt=$d;
$ct=$b;
$dt=$c;
$ra=1;
}
else if ($qr==6)
{
$qt=$q;
$at=$a;
$bt=$d;
$ct=$c;
$dt=$b;
$ra=1;
}
else if ($qr==7)
{
$qt=$q;
$at=$b;
$bt=$a;
$ct=$c;
$dt=$d;
$ra=2;
}
else if ($qr==8)
{
$qt=$q;
$at=$b;
$bt=$a;
$ct=$d;
$dt=$c;
$ra=2;
}
else if ($qr==9)
{
$qt=$q;
$at=$b;
$bt=$c;
$ct=$a;
$dt=$d;
$ra=3;
}
else if ($qr==10)
{
$qt=$q;
$at=$b;
$bt=$c;
$ct=$d;
$dt=$a;
$ra=4;
}
else if ($qr==11)
{
$qt=$q;
$at=$b;
$bt=$d;
$ct=$a;
$dt=$c;
$ra=3;
}
else if ($qr==12)
{
$qt=$q;
$at=$b;
$bt=$d;
$ct=$c;
$dt=$a;
$ra=4;
}
else if ($qr==13)
{
$qt=$q;
$at=$c;
$bt=$a;
$ct=$b;
$dt=$d;
$ra=2;
}
else if ($qr==14)
{
$qt=$q;
$at=$c;
$bt=$a;
$ct=$d;
$dt=$b;
$ra=2;
}
else if ($qr==15)
{
$qt=$q;
$at=$c;
$bt=$b;
$ct=$a;
$dt=$d;
$ra=3;
}
else if ($qr==16)
{
$qt=$q;
$at=$c;
$bt=$b;
$ct=$d;
$dt=$a;
$ra=4;
}
else if ($qr==17)
{
$qt=$q;
$at=$c;
$bt=$d;
$ct=$a;
$dt=$b;
$ra=3;
}
else if ($qr==18)
{
$qt=$q;
$at=$c;
$bt=$d;
$ct=$b;
$dt=$a;
$ra=4;
}
else if ($qr==19)
{
$qt=$q;
$at=$d;
$bt=$a;
$ct=$b;
$dt=$c;
$ra=2;
}
else if ($qr==20)
{
$qt=$q;
$at=$d;
$bt=$a;
$ct=$c;
$dt=$b;
$ra=2;
}
else if ($qr==21)
{
$qt=$q;
$at=$d;
$bt=$b;
$ct=$a;
$dt=$c;
$ra=3;
}
else if ($qr==22)
{
$qt=$q;
$at=$d;
$bt=$b;
$ct=$c;
$dt=$a;
$ra=4;
}
else if ($qr==23)
{
$qt=$q;
$at=$d;
$bt=$c;
$ct=$a;
$dt=$b;
$ra=3;
}
else
{
$qt=$q;
$at=$d;
$bt=$c;
$ct=$b;
$dt=$a;
$ra=4;
}
print("<div id=\"q".$i."q\" style=\"z-index: 2; width: 900px;\"><b>".$i.". ".$qt."</b></div><label for=\"q".$i."a\"><div id=\"a".$i."\" style=\"z-index: 2; width: 900px; background-color: #AA9999; color: #000000;\" onmouseover=\"this.style.backgroundColor='#666633'; this.style.color='#FFFFFF';\" onmouseout=\"this.style.backgroundColor='#AA9999'; this.style.color='#000000';\" onclick=\"document.getElementById('im".$i."a').src='./images/rbon.png'; document.getElementById('im".$i."b').src='./images/rboff.png'; document.getElementById('im".$i."c').src='./images/rboff.png'; document.getElementById('im".$i."d').src='./images/rboff.png'; return true;\"><img src=\"./images/rboff.png\" width=\"18\" height=\"18\" border=\"0\" alt=\"\" id=\"im".$i."a\" align=\"left\" /><input type=\"radio\" name=\"q".$i."\" id=\"q".$i."a\" style=\"display: none;\"> A ) ".$at."</div></label><label for=\"q".$i."b\"><div id=\"b".$i."\" style=\"z-index: 2; width: 900px; background-color: #AA9999; color: #000000;\" onmouseover=\"this.style.backgroundColor='#666633'; this.style.color='#FFFFFF';\" onmouseout=\"this.style.backgroundColor='#AA9999'; this.style.color='#000000';\" onclick=\"document.getElementById('im".$i."a').src='./images/rboff.png'; document.getElementById('im".$i."b').src='./images/rbon.png'; document.getElementById('im".$i."c').src='./images/rboff.png'; document.getElementById('im".$i."d').src='./images/rboff.png'; return true;\"><img src=\"./images/rboff.png\" width=\"18\" height=\"18\" border=\"0\" alt=\"\" id=\"im".$i."b\" align=\"left\" /><input type=\"radio\" name=\"q".$i."\" id=\"q".$i."b\" style=\"display: none;\"> B ) ".$bt."</div></label><label for=\"q".$i."c\"><div id=\"c".$i."\" style=\"z-index: 2; width: 900px; background-color: #AA9999; color: #000000;\" onmouseover=\"this.style.backgroundColor='#666633'; this.style.color='#FFFFFF';\" onmouseout=\"this.style.backgroundColor='#AA9999'; this.style.color='#000000';\" onclick=\"document.getElementById('im".$i."a').src='./images/rboff.png'; document.getElementById('im".$i."b').src='./images/rboff.png'; document.getElementById('im".$i."c').src='./images/rbon.png'; document.getElementById('im".$i."d').src='./images/rboff.png'; return true;\"><img src=\"./images/rboff.png\" width=\"18\" height=\"18\" border=\"0\" alt=\"\" id=\"im".$i."c\" align=\"left\" /><input type=\"radio\" name=\"q".$i."\" id=\"q".$i."c\" style=\"display: none;\"> C ) ".$ct."</div></label><label for=\"q".$i."d\"><div id=\"d".$i."\" style=\"z-index: 2; width: 900px; background-color: #AA9999; color: #000000;\" onmouseover=\"this.style.backgroundColor='#666633'; this.style.color='#FFFFFF';\" onmouseout=\"this.style.backgroundColor='#AA9999'; this.style.color='#000000';\" onclick=\"document.getElementById('im".$i."a').src='./images/rboff.png'; document.getElementById('im".$i."b').src='./images/rboff.png'; document.getElementById('im".$i."c').src='./images/rboff.png'; document.getElementById('im".$i."d').src='./images/rbon.png'; return true;\"><img src=\"./images/rboff.png\" width=\"18\" height=\"18\" border=\"0\" alt=\"\" id=\"im".$i."d\" align=\"left\" /><input type=\"radio\" name=\"q".$i."\" id=\"q".$i."d\" style=\"display: none;\"> D ) ".$dt."</div></label><hr />");
}
$qro=$qro."q".$ra; // The Right Answers
$i++;
}
print("</div>");
$res=mysql_query("UPDATE students SET ra='".$qro."' WHERE i='".$std."' LIMIT 1", $db);
}
}
?>
</form>
<form id="tstf" name="tstf" action="./upload.php" method="get">
<input type="hidden" name="kl" id="kl" value="<?php print("".$kl.""); ?>" />
<input type="hidden" name="skpt" id="skpt" value="1" />
<input type="hidden" name="tstr" id="tstr" value="" />
<?php
print("<input type=\"hidden\" name=\"std\" id=\"std2\" value=\"".$std."\" />");
?>
<a href="#" onclick="sndf(2)" style="visibility: hidden; cursor: pointer; color: #FFFFFF; text-decoration: none;" title="Пропусни"><div style="position: absolute; top: 530px; left: 150px; width: 300px; height: 30px; text-align: center; font-family: Verdana, Arial, sans-serif; font-size: 18px; padding-top: 7px; border: 3px #337799 solid; border-radius: 5px; background-color: #990044; cursor: pointer; overflow: hidden;">Пропусни</div></a>
<a href="#" onclick="sndf(1)" style="cursor: pointer; color: #FFFFFF; text-decoration: none;" title="Продължи"><div style="position: absolute; top: 530px; left: 465px; width: 300px; height: 30px; text-align: center; font-family: Verdana, Arial, sans-serif; font-size: 18px; padding-top: 7px; border: 3px #337799 solid; border-radius: 5px; background-color: #330044; cursor: pointer; overflow: hidden;">Продължи</div></a>
</center>
</form>
</div>
<script>
<!--
function sndf(skptest)
{
if (skptest==2)
{
document.getElementById("skpt").value=2;
document.getElementById("tstf").submit();
}
else
{
var ga="";
<?php
if (($kl==5) || ($kl==11) || ($kl==12))
{
}
else
{
$i=1;
while ($i<=20)
{
print(" var qd".$i."=0;");
print(" var qmk".$i."a=document.getElementById(\"im".$i."a\").src;");
print(" var qch".$i."a=qmk".$i."a.replace(\"rbon\",\"\");");
print(" var qmk".$i."b=document.getElementById(\"im".$i."b\").src;");
print(" var qch".$i."b=qmk".$i."b.replace(\"rbon\",\"\");");
print(" var qmk".$i."c=document.getElementById(\"im".$i."c\").src;");
print(" var qch".$i."c=qmk".$i."c.replace(\"rbon\",\"\");");
print(" var qmk".$i."d=document.getElementById(\"im".$i."d\").src;");
print(" var qch".$i."d=qmk".$i."d.replace(\"rbon\",\"\");");
print(" if (qmk".$i."a!=qch".$i."a) { ga=ga+\"q1\"; qd".$i."=1; } if (qmk".$i."b!=qch".$i."b) { ga=ga+\"q2\"; qd".$i."=1; } if (qmk".$i."c!=qch".$i."c) { ga=ga+\"q3\"; qd".$i."=1; } if (qmk".$i."d!=qch".$i."d) { ga=ga+\"q4\"; qd".$i."=1; } if (qd".$i."==0) { ga=ga+\"q0\"; }");
$i++;
}
}
?>
document.getElementById("tstr").value=ga;
document.getElementById("tstf").submit();
}
}
// -->
</script>
</body>
</html>