Файловый менеджер - Редактировать - /home/umudio/public_html/editinst.php
Назад
<?php session_start(); if (!isset($_SESSION["manager"])) { header("location: ./"); exit(); } ?> <?php include("includes/config.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; $result = mysqli_query($con, "DELETE from institutions where sn = $deltab"); } $query_dio1 = mysqli_query($con, "SELECT * FROM institutions where status='Secondary School' order by nameadd"); $row_dio1 = mysqli_fetch_assoc($query_dio1); $totalRows_dio1 = mysqli_num_rows($query_dio1); $query_dio2 = mysqli_query($con, "SELECT * FROM institutions where status='Primary/Nursery School' order by nameadd"); $row_dio2 = mysqli_fetch_assoc($query_dio2); $totalRows_dio2 = mysqli_num_rows($query_dio2); $query_dio3 = mysqli_query($con, "SELECT * FROM institutions where status='Health Institution' order by nameadd"); $row_dio3 = mysqli_fetch_assoc($query_dio3); $totalRows_dio3 = mysqli_num_rows($query_dio3); $query_dio4 = mysqli_query($con, "SELECT * FROM institutions where status='Pastoral/Vocational/Social Institution' order by nameadd"); $row_dio4 = mysqli_fetch_assoc($query_dio4); $totalRows_dio4 = mysqli_num_rows($query_dio4); $query_dio5 = mysqli_query($con, "SELECT * FROM institutions where status='Ecclesiastical Establishment' order by nameadd"); $row_dio5 = mysqli_fetch_assoc($query_dio5); $totalRows_dio5 = mysqli_num_rows($query_dio5); $query_dio6 = mysqli_query($con, "SELECT * FROM institutions where status='Media House' order by nameadd"); $row_dio6 = mysqli_fetch_assoc($query_dio6); $totalRows_dio6 = mysqli_num_rows($query_dio6); $query_dio7 = mysqli_query($con, "SELECT * FROM institutions where status='Book Centre' order by nameadd"); $row_dio7 = mysqli_fetch_assoc($query_dio7); $totalRows_dio7 = mysqli_num_rows($query_dio7); $query_dio8 = mysqli_query($con, "SELECT * FROM institutions where status='Chaplaincy' order by nameadd"); $row_dio8 = mysqli_fetch_assoc($query_dio8); $totalRows_dio8 = mysqli_num_rows($query_dio8); $query_dio9 = mysqli_query($con, "SELECT * FROM institutions where status='Tertiary Institution' order by nameadd"); $row_dio9 = mysqli_fetch_assoc($query_dio9); $totalRows_dio9 = mysqli_num_rows($query_dio9); $query_dio10 = mysqli_query($con, "SELECT * FROM institutions where status='Seminary/Formation House' order by nameadd"); $row_dio10 = mysqli_fetch_assoc($query_dio10); $totalRows_dio10 = mysqli_num_rows($query_dio10); $query_dio11 = mysqli_query($con, "SELECT * FROM institutions where status='Other Establishment' order by nameadd"); $row_dio11 = mysqli_fetch_assoc($query_dio11); $totalRows_dio11 = mysqli_num_rows($query_dio11); ?> <!doctype html> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9" lang=""> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--> <?php include("includes/pages-header.php"); ?> <div class="header-height"></div> <div class="pager-header"> <div class="container"> <div class="page-content"> <h2>Institutions</h2> <p>One thing I ask of the Lord. This I long to dwell in the house of the Lord, <br> all the days of my life.</p> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="./">Home</a></li> <li class="breadcrumb-item active">Institutions</li> </ol> </div> </div> </div><!-- /Page Header --> <!-- /Page Header --> <div class="" style="background-color: #F2F2F2;padding: 47px;"> <div class="row"> <div class="col-lg-9"> <?php if (isset($_POST['editinst'])) { include("includes/config.php"); $update_id = $_GET['sn']; $nameadde = str_replace("'", "''", $_POST['nameadd']); $detailse = str_replace("'", "''", $_POST['details']); $statuse = str_replace("'", "''", $_POST['status']); $update_post = "update institutions set nameadd='$nameadde',details='$detailse',status='$statuse' where sn='$update_id'"; $update_post = mysqli_query($con, $update_post); if ($update_post) { echo "<div class='alert alert-success'> Institution updated successfully! </div>"; } else { echo "<div class='alert alert-danger'> An error occured, please try again! </div>"; } } ?> <p><a href="mod-auth">Go back to Admin Dashboard</a></p> <h2>Edit Ordinary</h2><br> <?php include("includes/config.php"); $id = $_GET['sn']; $get_post = "select * from institutions where sn=$id"; $run_post = mysqli_query($con, $get_post); while ($row_post = mysqli_fetch_array($run_post)) { $nameadd = $row_post['nameadd']; $details = $row_post['details']; $status = $row_post['status']; } ?> <form id="form1" name="form1" method="post" action=""> <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>Name/Address:</b><br /><textarea name="nameadd" cols="60" rows="10"><?php echo $nameadd ?></textarea></td> </tr> <tr valign="top"> <td><b>Status:</b></td> <td><select name="status"> <option value="Secondary School" selected="selected">Secondary School</option> <option value="Primary/Nursery School">Primary/Nursery School</option> <option value="Tertiary Institution">Tertiary Institution</option> <option value="Health Institution">Health Institution</option> <option value="Pastoral/Vocational/Social Institution">Pastoral/Vocational/Social Institution</option> <option value="Ecclesiastical Establishment">Ecclesiastical Establishment</option> <option value="Other Establishment">Other Establishment</option> <option value="Seminary/Formation House">Seminary/Formation House</option> <option value="Media House">Media House</option> <option value="Book Centre">Book Centre</option> <option value="Chaplaincy">Chaplaincy</option> </select></td> </tr> <tr valign="top"> <td> </td> <td><b>Other Details:</b><br /><textarea name="details" cols="60" rows="10"><?php echo $nameadd ?></textarea></td> </tr> <tr> <td colspan="2"> <hr /> </td> </tr> <?php } ?> <tr valign="top"> <td colspan="2"><br> <input style="margin-left: 60px;" name="editinst" type="submit" style="font-size:12px;" class="default-btn" id="addnews" value=" Edit Institution " /> </td> </tr> </table> </form> </div> <?php include("includes/sidecontent.php") ?> </div> </div> <?php include("includes/footer.php"); ?> <a data-scroll href="#header" id="scroll-to-top"><i class="arrow_up"></i></a> <!-- jQuery Lib --> <script src="js/vendor/jquery-1.12.4.min.js"></script> <!-- Bootstrap JS --> <script src="js/vendor/bootstrap.min.js"></script> <!-- Tether JS --> <script src="js/vendor/tether.min.js"></script> <!-- Imagesloaded JS --> <script src="js/vendor/imagesloaded.pkgd.min.js"></script> <!-- OWL-Carousel JS --> <script src="js/vendor/owl.carousel.min.js"></script> <!-- isotope JS --> <script src="js/vendor/jquery.isotope.v3.0.2.js"></script> <!-- Smooth Scroll JS --> <script src="js/vendor/smooth-scroll.min.js"></script> <!-- venobox JS --> <script src="js/vendor/venobox.min.js"></script> <!-- ajaxchimp JS --> <script src="js/vendor/jquery.ajaxchimp.min.js"></script> <!-- Counterup JS --> <script src="js/vendor/jquery.counterup.min.js"></script> <!-- waypoints js --> <script src="js/vendor/jquery.waypoints.v2.0.3.min.js"></script> <!-- Slick Nav JS --> <script src="js/vendor/jquery.slicknav.min.js"></script> <!-- Nivo Slider JS --> <script src="js/vendor/jquery.nivo.slider.pack.js"></script> <!-- Letter Animation JS --> <script src="js/vendor/letteranimation.min.js"></script> <!-- Wow JS --> <script src="js/vendor/wow.min.js"></script> <!-- Contact JS --> <script src="js/contact.js"></script> <!-- Main JS --> <script src="js/main.js"></script> </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 5.6.40 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка