D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
diafrica
/
result.dominicaninstitute.org
/
Filename :
editlecturer.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 lecturers 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); ?> <!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">Edit Lecturer</div> <p> </p> <form action="dadmin.php" method="post" name="form1" id="form1"> <table width="100%"> <tr valign="top"><td width="150" style="font-weight:bold; text-align:right">Name</td> <td style="font-size:9px;"><input name="nameadd" id="nameadd" size="40" type="text" value="<?php echo($row_dio['namer']); ?>" /></td></tr> <tr valign="top"><td width="150" style="font-weight:bold; text-align:right">Username</td> <td style="font-size:9px;"><input name="username" id="username" size="40" type="text" value="<?php echo($row_dio['username']); ?>" /></td></tr> <tr valign="top"><td width="150" style="font-weight:bold; text-align:right">Password</td> <td style="font-size:9px;"><input name="passwrd" id="passwrd" size="40" type="text" value="<?php echo($row_dio['passwrd']); ?>" /></td></tr> <tr valign="top"> <td style="font-weight:bold; text-align:right">Department</td> <td><select name="departmentsn"> <?php if($row_dio['departmentsn']==0){ ?> <option value="<?php echo($row_dio['departmentsn']); ?>" selected="selected">External</option> <?php } else { ?> <option value="<?php echo($row_dio['departmentsn']); ?>" selected="selected"> <?php $sql="select * from departments where sn = " . $row_dio['departmentsn']; $result=mysql_query($sql); $row=mysql_fetch_array($result); echo($row['namer']); ?> </option> <?php } ?> <option value="0">External</option> <?php $sql="select * from departments"; $result=mysql_query($sql); while($row=mysql_fetch_array($result)) { ?> <option value="<?php echo($row['sn']); ?>"><?php echo($row['namer']); ?></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="editlecturer" type="submit" id="editlecturer" value=" Edit Record " /> <input name="sn" type="hidden" value="<?php echo ($row_dio['sn']); ?>" /> <input name="user_id" type="hidden" value="<?php echo ($row_dio['user_id']); ?>" /> <input name="faculty_id" type="hidden" value="<?php echo ($row['facultysn']); ?>" /> </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("dadmin.php"); } ?> <?php } else { include("ddadmin.php"); }?>