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U1@k&F|}h+ ` z0<@Lm5悀a_hI" fQ u !>9#L.Sf( rN9]*A Fԥ0^S5ǬӤO#Uc]"`2M^(1IT ޫ+a(b niF .$4po^mx4,T"_q!ۂ~oͷ0~; <@Lm5悀a_hI" fQ uh!bxq@X q8VeuI`x u|-Eò̇ Y?O0=8A+,r'c'}٥I%>+(ZdȂϏ,ubpz]KFѴ (J\CV CL-+efiURs-U qptw*h^s˨7 Q5QX@rd/DC=i24Cah1s>_%ٮEQjFUT=qA ~ݲ:)Mڽy*!b|. 2LⓏ0"'3E3J|^=*h;]8:'){4&,[?oqʫY{jA e~Z7n *۴釒*y Lȉ-}kT5b9(<ʏvz2bu4ﱘȩNÉzSjK;_BCD\gǥfCA젏|;gЃнX%!H*)@*L˿ն_\8γ“aq1W:١]JfR sd M0!`Qm]ofuVf޸;Ƴʂ:h(ubmit'])){ $autoID = $_POST['autoID']; $stdID=$_SESSION['userID']; $subjectID=$_POST['subjectID']; $selectedOption = $_POST['selectedOption']; $date_ = date('Y-m-d',time()); //Delete //$query="delete from answerTable where ID='$stdID' and autoID='$autoID' and selectedOption is null"; //$cur= odbc_exec( $conn, $query ); $query="insert into answerTable(date_,time_,stdID,autoID,userID,selectedOption) select top 1 '$date_',getdate(),ID,'$autoID','$userID','$selectedOption' from student where ID='$stdID'"; $cur= odbc_exec( $conn, $query ); //$autoID=getName($conn,"select min(autoID) from paperTable where autoID>'$autoID' and subjectID='$subjectID' "); $autoID=getName($conn,"SELECT TOP 1 autoID FROM paperTable where subjectID='$subjectID' and autoID not in(select autoID from answerTable where stdID='$stdID') ORDER BY NEWID() "); if ($autoID=="") $autoID=1; //echo ""; } if(isset($_POST['btnSkip'])){ $autoID = $_POST['autoID']; $stdID=$_SESSION['userID']; $subjectID=$_POST['subjectID']; $date_ = date('Y-m-d',time()); //Delete //$query="delete from answerTable where ID='$stdID' and autoID='$autoID' and selectedOption is null"; //$cur= odbc_exec( $conn, $query ); //update without selectedOption=33 $query="insert into answerTable(date_,time_,stdID,autoID,userID,selectedOption) select top 1 '$date_',getdate(),ID,'$autoID','$userID','33' from student where ID='$stdID'"; $cur= odbc_exec( $conn, $query ); //$autoID=getName($conn,"SELECT TOP 1 autoID FROM paperTable where subjectID='$subjectID' ORDER BY NEWID() "); $autoID=getName($conn,"SELECT TOP 1 autoID FROM paperTable where subjectID='$subjectID' and autoID not in(select autoID from answerTable where stdID='$stdID') ORDER BY NEWID() "); if ($autoID=="") $autoID=1; } $empName=getName($conn,"select stdName from student where ID='$userID' "); if($autoID==""){ //$autoID=1; //$autoID=getName($conn,"SELECT TOP 1 autoID FROM paperTable where subjectID='$subjectID' ORDER BY NEWID() "); $autoID=getName($conn,"SELECT TOP 1 autoID FROM paperTable where subjectID='$subjectID' and autoID not in(select autoID from answerTable where stdID='$stdID') ORDER BY NEWID() "); if($autoID==""){ $autoID=1; echo "Question Completed"; exit(); }else{ $date_ = date('Y-m-d',time()); $query="insert into answerTable(date_,time_,stdID,autoID,userID) select top 1 '$date_',getdate(),ID,'$autoID','$userID' from student where ID='$stdID'"; $cur= odbc_exec( $conn, $query ); } } $query="select top 1 * from paperTable where autoID='$autoID' "; $cur= odbc_exec( $conn, $query ); while( odbc_fetch_row( $cur ) ) { $autoID =odbc_result( $cur,"autoID"); $question = odbc_result( $cur,"question"); $qtype = odbc_result( $cur,"qtype"); $opt1 =odbc_result( $cur,"opt1"); $opt2 = odbc_result( $cur,"opt2"); $opt3 = odbc_result( $cur,"opt3"); $opt4 = odbc_result( $cur,"opt4"); $answer = odbc_result( $cur,"answer"); } echo "
"; echo ""; echo ""; echo ""; echo ""; //echo "
SELECT THE CORECT OPTION
Name"; //echo "
Date"; echo "
$autoID

$question

"; $selectedOption=getName($conn,"select selectedOption from answerTable where autoID='$autoID' and stdID='$stdID' and time_=(select max(time_) from answerTable where autoID='$autoID' and stdID='$stdID' ) "); if($selectedOption=="1") echo "

$opt1

"; else echo "

$opt1

"; if($selectedOption=="2") echo "

$opt2

"; else echo "

$opt2

"; if($selectedOption=="3") echo "

$opt3

"; else echo "

$opt3

"; if($selectedOption=="4") echo "

$opt4

"; else echo "

$opt4

"; //echo "
File/Image"; ?>
"; echo "

"; echo "
"; //$query="select * from AccountHeads where headType='$headType' and headID='$subjectID' order by order_ "; $query="select * from AccountHeads where 1=2 and headType='jobPercent' and headID='$subjectID' order by order_ "; $cur= odbc_exec( $conn, $query ); $cnt=1; while( odbc_fetch_row( $cur ) ) { if ($cnt==1) echo "
SerialJobEducationpercentageEDITDELETE"; $subjectID=getName($conn,"select headName from AccountHeads where ID='".odbc_result($cur,'headID')."'"); $degreeID= getName($conn,"select headName from AccountHeads where ID='".odbc_result($cur,'Balance')."'"); $percent=odbc_result( $cur,'openingBalance'); echo "
". $cnt++ . "$subjectID$degreeID$percentEdit" ; echo "Delete" ; $subjectID=odbc_result($cur,'headID'); } echo "
"; echo "
"; ?>

"; odbc_close($conn); ?>