Файловый менеджер - Редактировать - /home/umudio/public_html/OLD/listpriests.php
Назад
<?php if (!$_SESSION){ session_start(); } $acc=$_SESSION['acc']; $yto=$_SESSION['yto']; if(isset($acc) && ($acc=="administratoroftheUmuahiasiteDiocese2016Byto")){?> <?php include("Connecter/dataconn.php"); ?> <?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 priests 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 priests set archived='Yes' where sn = %s", mysql_real_escape_string($deltab)); $result=mysql_query($sql,$csn) or die(mysql_error()); } if (isset($_POST['editdeceased'])) { $deltab=$_POST['sn']; $died=$_POST['died']; $buried=$_POST['buried']; $buriedat=$_POST['buriedat']; $sql=sprintf("update priests set died='$died', buried='$buried', buriedat='$buriedat', 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 priests set archived='No' where sn = %s", mysql_real_escape_string($deltab)); $result=mysql_query($sql,$csn) or die(mysql_error()); } $query_dio = "SELECT * FROM priests where archived='Yes' and status='Umuahia Diocesan Priest' order by namer"; $dio = mysql_query($query_dio, $csn) or die(mysql_error()); $row_dio = mysql_fetch_assoc($dio); $totalRows_dio = mysql_num_rows($dio); $query_dio1 = "SELECT * FROM priests where archived='No' and status='Umuahia Diocesan Priest' 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> <?php include("head.php"); ?> <?php include("textare.php"); ?> </head> <body> <?php include("top.php"); ?> <?php include("titlebar.php"); ?> <?php include("mast.php"); ?> <?php include("navbar.php"); ?> <?php include("contenttop.php"); ?> <?php include("sidebar.php"); ?> <?php include("mainbartop.php"); ?> <!--Content Goes here--> <div class="headingbiggest">Umuahia Diocesan Priests</div> <p> </p> <hr /> <p style="color:#990000"><b>Add Personnels</b></p> <form id="form1" name="form1" method="post" action="dadmin.php"> <input name="status" type="hidden" value="Umuahia Diocesan Priest" /> <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:30px;"><?php echo($i); ?></span></td> <td><b>Title: </b><select name="titler<?php echo($i); ?>"> <option value="Msgr.">Msgr.</option> <option value="Very Rev. Fr.">Very Rev. Fr.</option> <option value="Rev. Fr." selected="selected">Rev. Fr.</option> </select> <b>Name: </b><input name="namer<?php echo($i); ?>" size="50" type="text" /></td> </tr> <tr valign="top"> <td style="text-align:left"> </td> <td><b>Category: </b><select name="category<?php echo($i); ?>"> <option value="" selected="selected"></option> <option value="Sabbatical Leave">Sabbatical Leave</option> <option value="Military Chaplaincy">Military Chaplaincy</option> <option value="On Mission">On Mission</option> <option value="In Institution">In Institution</option> <option value="Institution (Within the Diocese)">Institution (Within the Diocese)</option> </select></td> </tr> <tr valign="top"> <td style="text-align:left"> </td> <td><b>Special Assignment: </b><input name="specialassign<?php echo($i); ?>" size="30" type="text" /> <b>Study Leave: </b><input name="studyleave<?php echo($i); ?>" size="10" type="text" /> </td> </tr> <tr valign="top"> <td> </td> <td><b>Ordination: </b><input name="ordination<?php echo($i); ?>" id="ordination<?php echo($i); ?>" type="text" size="8" /> <button id="triggero<?php echo($i); ?>">.</button> <script type="text/javascript"> Calendar.setup( { inputField : "ordination<?php echo($i); ?>", // ID of the input field ifFormat : "%Y-%m-%d", // the date format button : "triggero<?php echo($i); ?>" // ID of the button } ); </script> <b>Date of Birth: </b><input name="dob<?php echo($i); ?>" id="dob<?php echo($i); ?>" type="text" size="8" /> <button id="triggerd<?php echo($i); ?>">.</button> <script type="text/javascript"> Calendar.setup( { inputField : "dob<?php echo($i); ?>", // ID of the input field ifFormat : "%Y-%m-%d", // the date format button : "triggerd<?php echo($i); ?>" // ID of the button } ); </script> </td> </tr> <tr valign="top"> <td style="text-align:left"> </td> <td><b>Phone: </b><input name="phone<?php echo($i); ?>" size="20" type="text" /> <b>Email: </b><input name="email<?php echo($i); ?>" size="30" type="text" /></td> </tr> <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="addpriest" type="submit" style="font-size:12px;" id="addpriest" value=" Add Members " /> </td> </tr> </table> </form> <hr /> <p style="color:#990000"><b>Existing Personnels</b></p> <?php if ($totalRows_dio1>0) { ?> <div class="post"> <table width="98%"> <?php do { ?><tr valign="top"> <td style="border-bottom:1px solid #333333;"><?php echo $row_dio1['namer']; ?></td> <td style="border-bottom:1px solid #333333;"><a href="editpriest.php?tab=<?php echo $row_dio1['sn']; ?>">Edit</a> <a href="listpriests.php?deltab=<?php echo $row_dio1['sn']; ?>">Delete</a> <a href="editdeceased.php?tab=<?php echo $row_dio1['sn']; ?>">Deceased</a> </td></tr> <?php } while ($row_dio1 = mysql_fetch_assoc($dio1)); ?> </table> </div><div class="post-bot"></div> <?php } else { echo ("None Found!"); } ?> <p style="color:#990000"><b>Deceased Priests</b></p> <?php if ($totalRows_dio>0) { ?> <table width="90%"> <?php do { ?><tr valign="top"> <td style="border-bottom:1px solid #333333;"><?php echo $row_dio['namer']; ?></td> <td style="border-bottom:1px solid #333333;"><?php echo $row_dio['died']; ?></td> <td style="border-bottom:1px solid #333333;"> <a href="listpriests.php?unarhtab=<?php echo $row_dio['sn']; ?>">UnDeceased</a> </td></tr> <?php } while ($row_dio = mysql_fetch_assoc($dio)); ?> </table> <?php } else { echo ("No Priest Added Yet!"); } ?> <p><a href="dadmin.php">Back to Admin Page</a></p> <!--Content Ends here--> <?php include("mainbarbottom.php"); ?> <?php include("contentbottom.php"); ?> <?php include("footbar.php"); ?> <?php include("bottom.php"); ?> </body> </html> <?php } else { include("ddadmin.php"); }?>
| ver. 1.4 |
Github
|
.
| PHP 5.6.40 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка