D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
diafrica
/
result.dominicaninstitute.org
/
Filename :
enterdresultsadmin.php
back
Copy
<?php if (!$_SESSION){ session_start(); } $acc=$_SESSION['acc']; $yto=$_SESSION['yto']; //if(isset($acc) && ($acc=="administratoroftheduresult2018byto")){?> <?php include("Connecter/dataconn.php"); ?> <?php if(isset($_GET['tab'])) { $dsn=$_GET['tab']; $prog=$_GET['prog']; $description1=$_GET['des1']; $description2=$_GET['des2']; ?> <?php $query_dio1 = "SELECT * FROM coursesregistered where coursesn=$dsn order by matric asc"; $dio1 = mysql_query($query_dio1, $csn) or die(mysql_error()); $row_dio1 = mysql_fetch_assoc($dio1); $totalRows_dio1 = mysql_num_rows($dio1); ?> <!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" /> <noscript> This page needs JavaScript activated to work. <style>div { display:none; }</style> </noscript> <?php include("head.php"); ?> <script> function isNumber(evt) { evt = (evt) ? evt : window.event; var charCode = (evt.which) ? evt.which : evt.keyCode; if (charCode > 31 && (charCode < 48 || charCode > 57) && charCode != 46) { 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"><?php echo $description1; ?></div><hr /> <div class="headingbigger"><?php echo $description2; ?></div> <p style="color:#000099"><b> <?php //echo "Programme of Study: ".$prog; ?></b></p><hr /> <?php if ($totalRows_dio1>0) { $z=0; ?> <form action="entercheckresultsadmin.php" method="post" name="form1" id="form1"> <table border="1" style="border-collapse:collapse" width="100%"> <tr valign="top"> <td colspan="6" align="center"> </td> </tr> <tr valign="top"><td><b>Matric</b></td><td><b>Name</b></td> <td align="center"><b> CA<br />(40%)</b></td> <td align="center"><strong>EXAM<br />(60%)</strong></td> <td align="center"><strong>TOTAL<br />(100%)</strong></td> <td align="center"><strong>Departmental <br />Approval<br /> Status</strong></td> </tr> <?php do { $z++; ?> <tr valign="top"> <td style="border-bottom:1px solid #333333;"><?php echo $row_dio1['matric']; ?></td> <td style="border-bottom:1px solid #333333;"> <?php $sql="SELECT * FROM students where matric='".$row_dio1['matric']."'"; $result=mysql_query($sql); $row=mysql_fetch_array($result); $nam=strtoupper($row['surname']).', '.$row['firstname'].' '.$row['othernames']; echo($nam); ?> </td> <td align="center"> <input name="ca<?php echo $z; ?>" id="ca<?php echo $z; ?>" type="number" step="any" onkeypress="return isNumber(event)" value="<?php echo $row_dio1['ca']; ?>" onkeyup="return doMaths(<?php echo $z; ?>);" size="5" maxlength="5" style="width:50px" /> <input type="hidden" name="y<?php echo $z; ?>" value="<?php echo $row_dio1['sn']; ?>" /> </td> <td align="center"><input style="width:50px" name="exam<?php echo $z; ?>" id="exam<?php echo $z; ?>" type="number" step="any" onkeypress="return isNumber(event)" onkeyup="return doMaths(<?php echo $z; ?>);" value="<?php echo $row_dio1['exam']; ?>" size="5" maxlength="5" /></td> <td align="center"><input style="width:50px" name="total<?php echo $z; ?>" id="total<?php echo $z; ?>" type="number" step="any" value="<?php echo $row_dio1['score']; ?>" size="5" maxlength="5" class="readonly" required /></td> <td align="center"><?php if($row_dio1['dept_status'] == "A") echo "Locked"; ?> <input type="hidden" name="depts<?php echo $z; ?>" value="<?php echo $row_dio1['dept_status']; ?>" /></td> </tr> <?php } while ($row_dio1 = mysql_fetch_assoc($dio1)); ?> </table> <div align="right" style="margin-top:30px"> <table width="100%" border="0"> <tr> <td align="right"><strong>Lecturer:</strong></td> <td align="left"><?php echo $_GET['lname'];?></td> <td align="right"><strong>Signature</strong></td> <td align="left">...........................</td> <td align="center"><button onClick="printer()" title="Print" id="print-me" class="no-print" style="font-size:14px; font-weight:bold; color:#F00;" >PRINT</button></td> <td align="center"><input name="doneresult" type="submit" id="doneresult" value=" Submit Result " style="font-size:16px; font-weight:bold; color:maroon;" class="no-print" /> </td> </tr> </table> <input name="numof" type="hidden" value="<?php echo($totalRows_dio1); ?>" /> <input name="de" type="hidden" value="<?php echo $_GET['de']; ?>" /> <input name="level" type="hidden" value="<?php echo $_GET['level']; ?>" /> <input name="semester" type="hidden" value="<?php echo $_GET['semester']; ?>" /> <input name="programmesn" type="hidden" value="<?php echo $_GET['programmesn']; ?>" /> <input name="session" type="hidden" value="<?php echo $_GET['session']; ?>" /> </div> </form> <?php } else { echo("No student has registered for this course yet! Contact the Web administrator."); } ?> <!--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> <script> $(".readonly").on('keydown paste', function(e){ e.preventDefault(); }); </script> <script type="text/javascript"> function doMaths(z) { // Capture the entered values of two input boxes var my_input1 = document.getElementById("ca"+z).value; var my_input2 = document.getElementById("exam"+z).value; // Add them together and display var sum = Number(my_input1) + Number(my_input2); if(sum<=100){ document.getElementById("total"+z).value = sum.toFixed(2); } else{ alert('Total Score cannot be greater than 100'); document.getElementById("total"+z).value = ''; } } </script> <?php } else { include("dadmin.php"); }?> <?php /*} else { include("ddadmin.php"); }*/?>