D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
diafrica
/
result.dominicaninstitute.org
/
Filename :
managecourses.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 include("checkforpending2.php"); ?> <?php include("checkforpending.php"); ?> <?php if(isset($_GET['sustainedses']) || isset($_POST['donecourse'])){ $joyd=1; ?> <?php if(isset($_GET['sustainedses'])){ $natasession=$_GET['sustainedses']; $sql1="delete from tempcourses"; if (!mysql_query($sql1)){ echo("Unable to empty tempcourses: " . mysql_error()); exit(); } $sql1="delete from tempprogrammes"; if (!mysql_query($sql1)){ echo("Unable to empty tempprogrammes: " . mysql_error()); exit(); } $sql1="insert into tempprogrammes select * from programmes where archived='No'"; if (!mysql_query($sql1)){ echo("Unable to populate tempprogrammes: " . mysql_error()); exit(); } $query_dio1 = "SELECT * FROM tempprogrammes where archived='No' order by namer"; $dio1 = mysql_query($query_dio1, $csn) or die(mysql_error()); $row_dio1 = mysql_fetch_assoc($dio1); $totalRows_dio1 = mysql_num_rows($dio1); } ?> <?php if(isset($_POST['donecourse'])) { $prog=$_POST['tab']; $sql = "update tempprogrammes set archived='Yes' where sn=$prog"; $result = @mysql_query($sql, $csn); $sql = "select count(*) from tempprogrammes where archived='No'"; $result = @mysql_query($sql, $csn); $row=mysql_fetch_array($result); $joyd=$row[0]; $natasession=$_POST['ses']; $query_dio1 = "SELECT * FROM tempprogrammes order by namer"; $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" /> <?php include("head.php"); ?> </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 Courses to be Taken in <?php echo($natasession); ?> Session</div> <hr /> <p style="color:#990000"><b>Existing Programmes of Study</b></p> <div class="post"> <?php if ($totalRows_dio1>0) { ?> <table width="98%"> <tr valign="top"><td><b>Programme</b></td><td><b>Done</b></td><td width="180px"><b> </b></td></tr> <?php do { ?><tr valign="top"> <td style="border-bottom:1px solid #333333;"><?php echo $row_dio1['namer']; ?> <?php $heat="select * from departments where sn=".$row_dio1['departmentsn']; $heatresult=mysql_query($heat); $heatrow=mysql_fetch_array($heatresult); echo(" (".$heatrow['namer'].")"); ?> </td> <td style="border-bottom:1px solid #333333;"><?php echo $row_dio1['archived']; ?></td> <td> <a href="listcoursestobetaken2.php?tab=<?php echo $row_dio1['sn']; ?>&ses=<?php echo $natasession; ?>">Add Courses to be Taken</a> </td></tr> <?php } while ($row_dio1 = mysql_fetch_assoc($dio1)); ?> </table> <?php } else { echo ("None Found!"); } ?> <p> </p><hr /> <form action="managedsession.php" method="post" name="form1" id="form1"> <div align="right"> <input name="doneallcourse" type="submit" id="doneallcourse" value=" Done " style="font-size:16px; font-weight:bold;" <?php if($joyd>0){ echo('disabled="disabled"'); } ?> /> <input name="sustainedses" type="hidden" value="<?php echo($natasession); ?>" /> </div> </form> </div><div class="post-bot"></div> <!--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("dadmin.php"); }?> <?php } else { include("ddadmin.php"); }?>