Файловый менеджер - Редактировать - /home/umudio/public_html/OLD/listparishes.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 parishes where sn = %s", mysql_real_escape_string($deltab)); $result=mysql_query($sql,$csn) or die(mysql_error()); } $query_dio1 = "SELECT * FROM parishes where status='Parish' 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 parishes where status='MassCentre' 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); $query_dio3 = "SELECT * FROM parishes where status='Chaplaincy' order by namer"; $dio3 = mysql_query($query_dio3, $csn) or die(mysql_error()); $row_dio3 = mysql_fetch_assoc($dio3); $totalRows_dio3 = mysql_num_rows($dio3); $query_dio12 = "SELECT * FROM deanaries where archived<>'Yes' order by titler"; $dio12 = mysql_query($query_dio12, $csn) or die(mysql_error()); $row_dio12 = mysql_fetch_assoc($dio12); $num12 = mysql_num_rows($dio12); $gvv=1; if($num12>0){ do { $deansn[$gvv]=$row_dio12["sn"]; $deannn[$gvv]=$row_dio12["titler"]; $gvv++; } while($row_dio12 = mysql_fetch_assoc($dio12)); } ?> <!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">Parishes & Mass Centres of the Diocese</div> <p> </p> <hr /> <p style="color:#990000"><b>Add New Parishes or Mass Centres</b></p> <form id="form1" name="form1" method="post" action="dadmin.php"> <table width="100%" cellpadding="1" cellspacing="2"> <?php for($k=1; $k<=1; $k++){ ?> <tr valign="top"> <td colspan="2" style="text-align:left;"><span style="font-weight:bold; color:#009900; font-size:30px;"><?php echo($k); ?>.</span> <b>Name: </b><input name="namer<?php echo($k); ?>" type="text" size="20" /> <b>Status:</b> <select name="status<?php echo($k); ?>"> <option value="Parish" selected="selected">Parish</option> <option value="MassCentre">Mass Centre</option> <!--<option value="Chaplaincy">Chaplaincy</option>--> </select> <b>Deanary:</b> <select name="deanary<?php echo($k); ?>"><?php for($i=1; $i<=$num12; $i++){ echo('<option value="' . $deansn[$i] . '">' . $deannn[$i] . '</option>'); } ?></select> </td></tr> <tr valign="top"><td><b>Town:</b></td><td><input name="town<?php echo($k); ?>" type="text" size="50" /></td></tr> <tr valign="top"><td><b>Address:</b></td><td><textarea name="address<?php echo($k); ?>" cols="50" rows="15"></textarea></td></tr> <tr valign="top"><td><b>Details:</b></td><td><textarea name="details<?php echo($k); ?>" cols="50" rows="15"></textarea></td></tr> <tr valign="top"><td colspan="2"><hr style="border-bottom:4px solid #000;" /></td></tr> <?php } ?> <tr valign="top"> <td style="text-align:right; font-size:10px;" colspan="2"><a href="dadmin.php">Cancel</a> <input name="addparish" type="submit" style="font-size:12px;" id="addparish" value=" Add Parish, Mass Centre or Chaplaincy " /> </td> </tr> </table> </form> <hr /> <p style="color:#990000"><b>Existing Parishes</b></p> <?php if ($totalRows_dio1>0) { ?> <table width="90%"> <?php do { ?><tr valign="top"> <td style="border-bottom:1px solid #333333;"><?php echo $row_dio1['namer']; ?>, <?php echo $row_dio1['town']; ?></td> <td style="border-bottom:1px solid #333333;"><a href="editparish.php?tab=<?php echo $row_dio1['sn']; ?>">Edit</a> | <a href="listparishes.php?deltab=<?php echo $row_dio1['sn']; ?>">Delete</a> </td></tr> <?php } while ($row_dio1 = mysql_fetch_assoc($dio1)); ?> </table> <?php } else { echo ("No Parish Found!"); } ?> <hr /> <p style="color:#990000"><b>Existing Mass Centres</b></p> <?php if ($totalRows_dio2>0) { ?> <table width="90%"> <?php do { ?><tr valign="top"> <td style="border-bottom:1px solid #333333;"><?php echo $row_dio2['namer']; ?>, <?php echo $row_dio2['town']; ?></td> <td style="border-bottom:1px solid #333333;"><a href="editparish.php?tab=<?php echo $row_dio2['sn']; ?>">Edit</a> | <a href="listparishes.php?deltab=<?php echo $row_dio2['sn']; ?>">Delete</a> </td></tr> <?php } while ($row_dio2 = mysql_fetch_assoc($dio2)); ?> </table> <?php } else { echo ("No Mass Centre Found!"); } ?> <!-- <hr /> <p style="color:#990000"><b>Existing Chaplaincies</b></p> <?php if ($totalRows_dio3>0) { ?> <table width="90%"> <?php do { ?><tr valign="top"> <td style="border-bottom:1px solid #333333;"><?php echo $row_dio3['namer']; ?></td> <td style="border-bottom:1px solid #333333;"><a href="editparish.php?tab=<?php echo $row_dio3['sn']; ?>">Edit</a> | <a href="listparishes.php?deltab=<?php echo $row_dio3['sn']; ?>">Delete</a> </td></tr> <?php } while ($row_dio3 = mysql_fetch_assoc($dio3)); ?> </table> <?php } else { echo ("No Chaplaincy Found!"); } ?> --> <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.33 |
proxy
|
phpinfo
|
Настройка