D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
diafrica
/
result.dominicaninstitute.org
/
Filename :
listprogramme.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'])) { unset($temp); if(isset($_GET['tab'])){ $_GET['tab']=trim($_GET['tab']); if(preg_match('/^[0-9]/u',$_GET['tab'])){ settype($_GET['tab'], 'int'); $temp=(int)$_GET['tab']; } } if(!isset($temp)){echo "Sorry! Wrong Data!"; exit();} $editab=$temp; $query_dio=sprintf("select * from departments where sn = %s", mysql_real_escape_string($editab)); $dio = mysql_query($query_dio, $csn) or die(mysql_error()); $row_dio = mysql_fetch_assoc($dio); $totalRows_dio = mysql_num_rows($dio); ?> <?php if (isset($_GET['deltab'])) { unset($temp); if(isset($_GET['deltab'])){ $_GET['deltab']=trim($_GET['deltab']); if(preg_match('/^[0-9]/u',$_GET['deltab'])){ settype($_GET['deltab'], 'int'); $temp=(int)$_GET['deltab']; } } if(!isset($temp)){echo "Sorry! Wrong Data!"; exit();} $deltab=$temp; $sql=sprintf("delete from programmes where sn = %s", mysql_real_escape_string($deltab)); $result=mysql_query($sql,$csn) or die(mysql_error()); } if (isset($_GET['arhtab'])) { unset($temp); if(isset($_GET['arhtab'])){ $_GET['arhtab']=trim($_GET['arhtab']); if(preg_match('/^[0-9]/u',$_GET['arhtab'])){ settype($_GET['arhtab'], 'int'); $temp=(int)$_GET['arhtab']; } } if(!isset($temp)){echo "Sorry! Wrong Data!"; exit();} $deltab=$temp; $sql=sprintf("update programmes set archived='Yes' where sn = %s", mysql_real_escape_string($deltab)); $result=mysql_query($sql,$csn) or die(mysql_error()); } if (isset($_GET['unarhtab'])) { unset($temp); if(isset($_GET['unarhtab'])){ $_GET['unarhtab']=trim($_GET['unarhtab']); if(preg_match('/^[0-9]/u',$_GET['unarhtab'])){ settype($_GET['unarhtab'], 'int'); $temp=(int)$_GET['unarhtab']; } } if(!isset($temp)){echo "Sorry! Wrong Data!"; exit();} $deltab=$temp; $sql=sprintf("update programmes set archived='No' where sn = %s", mysql_real_escape_string($deltab)); $result=mysql_query($sql,$csn) or die(mysql_error()); } $query_dio1 = "SELECT * FROM programmes where departmentsn='$editab' and 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); $query_dio2 = "SELECT * FROM programmes where departmentsn='$editab' and archived='Yes' order by namer"; $dio2 = mysql_query($query_dio2, $csn) or die(mysql_error()); $row_dio2 = mysql_fetch_assoc($dio2); $totalRows_dio2 = mysql_num_rows($dio2); ?> <!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">Department: (<?php echo $row_dio['namer']; ?>)</div> <p> </p> <hr /> <p style="color:#990000"><b>Add New Programme</b></p> <form id="form1" name="form1" method="post" action="dadmin.php"> <table width="100%" cellpadding="1" cellspacing="2"> <?php for($i=1; $i<=1; $i++){ ?> <tr valign="top"> <td style="text-align:left"><span style="font-weight:bold; color:#009900; font-size:20px;"><?php echo($i); ?></span></td> <td><b>Name:</b> <input name="namer<?php echo($i); ?>" size="40" type="text" /></td> </tr> <tr valign="top"> <td> </td> <td><b>Number of Years:</b> <select name="status<?php echo($i); ?>"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="0">0</option> </select></td> </tr> <tr valign="top"> <td> </td> <td><b>Type:</b> <select name="typer<?php echo($i); ?>"> <option value="Degree">Degree</option> <option value="Masters">Masters</option> <option value="M.Phil">M.Phil</option> <option value="Ph.D">Ph.D</option> <option value="Professional">Professional</option> </select></td> </tr> <tr valign="top"> <td> </td> <td><b>Exam Officer Username:</b> <input name="officer<?php echo($i); ?>" size="40" type="text" /></td> </tr> <tr valign="top"> <td> </td> <td><b>Exam Officer Password:</b> <input name="pass<?php echo($i); ?>" size="40" type="text" /></td> </tr> <input name="dept<?php echo($i); ?>" type="hidden" value="<?php echo $row_dio['sn']; ?>" /> <tr valign="top"> <td colspan="2"><hr /></td> </tr> <?php } ?> <tr valign="top"> <td style="text-align:right; font-size:10px;" colspan="12"><a href="dadmin.php">Cancel</a> <input name="addprogramme" type="submit" style="font-size:12px;" id="addprogramme" value=" Add Programme " /> </td> </tr> </table> </form> <p> </p><p> </p> <p style="color:#990000"><b>Existing Programmes</b></p> <div class="post"> <?php if ($totalRows_dio1>0) { ?> <table width="98%"> <?php do { ?><tr valign="top"> <td style="border-bottom:1px solid #333333;"><?php echo $row_dio1['namer']; ?></td> <td width="90px"><a href="editprogramme.php?tab=<?php echo $row_dio1['sn']; ?>">Edit</a> <a href="listprogramme.php?arhtab=<?php echo $row_dio1['sn']; ?>&tab=<?php echo $row_dio['sn']; ?>">Archive</a> </td></tr> <?php } while ($row_dio1 = mysql_fetch_assoc($dio1)); ?> </table> <?php } else { echo ("None Found!"); } ?> </div><div class="post-bot"></div> <p style="color:#990000"><b>Archived Programmes</b></p> <div class="post"> <?php if ($totalRows_dio2>0) { ?> <table width="98%"> <?php do { ?><tr valign="top"> <td style="border-bottom:1px solid #333333;"><?php echo $row_dio2['namer']; ?></td> <td width="75px"> <a href="listprogramme.php?unarhtab=<?php echo $row_dio2['sn']; ?>&tab=<?php echo $row_dio['sn']; ?>">UnArchive</a> </td></tr> <?php } while ($row_dio2 = mysql_fetch_assoc($dio2)); ?> </table> <?php } else { echo ("None Found!"); } ?> </div><div class="post-bot"></div> <p><a href="dadmin.php">Back to Admin Page</a></p> <!--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("listfaculty.php"); } ?> <?php } else { include("ddadmin.php"); }?>