D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
diafrica
/
result.dominicaninstitute.org
/
Filename :
enterresultsadmin.php
back
Copy
<?php if (!$_SESSION){ session_start(); } //ini_set('display_errors', 1); //ini_set('display_startup_errors', 1); //error_reporting(E_ALL); $acc=$_SESSION['acc']; $yto=$_SESSION['yto']; if(isset($acc) && ($acc=="administratoroftheduresult2018byto" || $acc=="lectureroftheuniversity2015byto" || $acc=="examofficeroftheuniversity2015byto")){?> <?php include("Connecter/dataconn.php"); ?> <?php if(isset($_POST['doneresult'])) { $numof=$_POST['numof']; for($i=1;$i<=$numof;$i++){ $a="x".$i; $b="y".$i; $dscore=$_POST[$a]; $dsn=$_POST[$b]; $sql="update coursesregistered set score=$dscore where sn=$dsn"; $result=mysql_query($sql); } /* $sql="update coursesregistered set gp=7 where score>=70"; $result=mysql_query($sql); $sql="update coursesregistered set gp=6 where score>=65 and score<70"; $result=mysql_query($sql); $sql="update coursesregistered set gp=5 where score>=60 and score<65"; $result=mysql_query($sql); $sql="update coursesregistered set gp=4 where score>=55 and score<60"; $result=mysql_query($sql); $sql="update coursesregistered set gp=3 where score>=50 and score<55"; $result=mysql_query($sql); $sql="update coursesregistered set gp=2 where score>=45 and score<50"; $result=mysql_query($sql); $sql="update coursesregistered set gp=1 where score>=40 and score<45"; $result=mysql_query($sql); $sql="update coursesregistered set gp=0 where score<40"; $result=mysql_query($sql); */ //gp adjustments $sqln="update coursesregistered set gp=0"; $resultn=mysql_query($sqln); $nsql="select * from gradepoints where status='active' order by gradepoint asc"; $nresult=mysql_query($nsql); $ndn=mysql_num_rows($nresult); if($ndn>0){ while($nrow=mysql_fetch_array($nresult)){ $ddgp=$nrow['gradepoint']; $ddfrom=$nrow['dfrom']; $ddto=$nrow['dto']; $fsql="update coursesregistered set gp=".$ddgp." where score>=".$ddfrom." and score<=".$ddto; $fresult=mysql_query($fsql); } } //end of gp adjustments } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <?php include("head.php"); ?> <script> function byto() { var mySession = document.getElementById('session').value; var ses = 1; ses = parseInt(mySession); ses = ses + 1; if(isNaN(ses)){ document.getElementById('session2').value = ''; } else { document.getElementById('session2').value = ses; } } function isNumber(evt) { evt = (evt) ? evt : window.event; var charCode = (evt.which) ? evt.which : evt.keyCode; if (charCode > 31 && (charCode < 48 || charCode > 57)) { return false; } return true; } </script> </head> <body> <?php include("top.php"); ?> <?php include("dtable0.php"); ?> <?php include("nav.php"); ?> <?php include("dtable1.php"); ?> <?php include("topcontainer.php"); ?> <!--Content Goes Here--> <div class="headingbiggest">Enter Results</div><hr /> <p style="color:#990000"><b>Please click the session and semester you want to enter results for:</b></p> <div class="headingbiggest">Choose Session</div> <hr /> <?php if(isset($jkjk)){ echo("<p align='center' style='color:#ff0000'>".$jkjk."</p>"); } else { ?> <p align="center">Enter the session, level and semester below:</p> <?php } ?> <form action="entercheckresultsadmin.php" method="get" name="form1" id="form1"> <table width="100%"> <tr valign="top"><td width="150" style="font-weight:bold; text-align:right">Session:</td> <td style="font-size:9px;"><input name="session" id="session" size="2" type="text" maxlength="4" onkeyup="byto()" onkeypress="return isNumber(event)" onchange="byto()" /> <span style="font-weight:bold; font-size:16px;">/</span> <input name="session2" id="session2" size="2" type="text" maxlength="4" readonly="readonly" /></td></tr> <tr valign="top"> <td width="150" style="font-weight:bold; text-align:right">Year:</td> <td style="font-size:9px;"><input name="level" id="level" size="1" type="text" maxlength="1" onkeypress="return isNumber(event)" /></td></tr> <tr valign="top"><td width="150" style="font-weight:bold; text-align:right">Semester:</td> <td style="font-size:9px;"> <label> <input type="radio" name="semester" value="1" id="semester_0" checked="checked" /> <b>First Semester</b></label> <label> <input type="radio" name="semester" value="2" id="semester_1" /> <b>Second Semester</b></label> </td></tr> <tr valign="top"><td width="150" style="font-weight:bold; text-align:right">Entry Mode:</td> <td style="font-size:9px;"> <label> <input type="radio" name="de" value="" id="de_0" checked="checked" /> <b>UTME</b></label> <label> <input type="radio" name="de" value="DE" id="de_1" /> <b>Direct Entry</b></label> </td></tr> <tr valign="top"><td width="150" style="font-weight:bold; text-align:right">Programme of Study:</td> <td style="font-size:9px;"> <?php $prog_id = $_SESSION["prog_id"]; if($_SESSION['dtype'] == 'exams') $str = "and departmentsn='$prog_id'"; elseif($_SESSION['dtype'] == 'lecturer'){ $lec_id = $_SESSION['lec_id']; $str = "and departmentsn in (select departmentsn from coursestobetaken where programmesn=programmes.sn and lecturersn='$lec_id')"; } else $str=''; $sql = "SELECT *,programmes.sn as feli1 ,programmes.namer as feli2, departments.namer as feli3 FROM programmes inner join departments on programmes.departmentsn = departments.sn where programmes.archived='No' $str"; $result = mysql_query($sql); ?> <select name="programmesn" id="programmesn"> <?php while($row = mysql_fetch_array($result)){ ?> <option value="<?php echo $row['feli1']; ?>"><?php echo $row['feli3']; ?></option> <?php }?> </select> </td></tr> <tr valign="top"> <td style="text-align:right; font-size:10px;" colspan="2"><a href="dadmin.php">Cancel</a> <input name="checksession" type="submit" id="checksession" value=" Submit " /> </td> </tr> </table> </form> <!--Content Ends Here--> <?php include("bottomcontainer.php"); ?> <?php include("dtable2.php"); ?> <?php include("side.php"); ?> <?php include("dtable3.php"); ?> <?php include("foot.php"); ?> </body> </html> <?php } else { include("ddadmin.php"); }?>