Файловый менеджер - Редактировать - /home/umudio/public_html/addpersonnel.php
Назад
<?php session_start(); if (isset($_POST["username"]) && isset($_POST["password"])) { $manager = $_POST["username"]; $password = $_POST["password"]; include("includes/config.php"); $cmem = "SELECT id FROM auth WHERE username='$manager' AND password='$password' LIMIT 1"; $run_cmem = mysqli_query($con, $cmem); $count_mem = mysqli_num_rows($run_cmem); if ($count_mem == 1) { while ($row = mysqli_fetch_array($run_cmem)) { $id = $row["id"]; } $_SESSION["id"] = $id; $_SESSION["manager"] = $manager; $_SESSION["password"] = $password; header("location: mod-auth"); exit(); } else { echo "<script>alert('Incorrect Password !!!')</script>"; echo "<script>window.open('./','_self')</script>"; exit(); } } ?> <?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 priests where sn = $deltab"); } $query_dio1 = mysqli_query($con, "SELECT * FROM priests where status='Others' order by namer"); $row_dio1 = mysqli_fetch_assoc($query_dio1); $totalRows_dio1 = mysqli_num_rows($query_dio1); ?> <!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>Add Other Personnel</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">Other Personnel</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 include("includes/config.php"); if (isset($_GET['sn'])) { $sn = $_GET['sn']; $delete = "delete from institutions where sn='$sn'"; $run = mysqli_query($con, $delete); if ($delete) { echo "<div class='alert alert-danger'> Institution deleted successfully! </div>"; } } ?> <p><a href="mod-auth">Go back to Admin Dashboard</a></p> <?php if (isset($_POST['addp'])) { $status = str_replace("'", "''", $_POST['status']); $archived = str_replace("'", "''", $_POST['archived']); $titler = str_replace("'", "''", $_POST['titler']); $namer = str_replace("'", "''", $_POST['namer']); $specialassign = "Null"; $studyleave = "Null"; $dob = str_replace("'", "''", $_POST['dob']); $native = "Null"; $phone = str_replace("'", "''", $_POST['phone']); $email = str_replace("'", "''", $_POST['email']); $parish = "Null"; $ordination = str_replace("'", "''", $_POST['ordination']); $placeofordination = "Null"; $died = "Null"; $buried = "Null"; $buriedat = "Null"; $ordainingprelate = "Null"; $pastoralwork = "Null"; $otherdiocesanappointment = "Null"; $formpro = "Null"; $username = "Null"; $passwrd = "Null"; include("includes/config.php"); global $con; $feedback = "INSERT INTO priests (namer, ordination, dob, email, phone, archived, status, specialassign, studyleave, diocese, community, username, passwrd, titler, formpro, died, buried, buriedat, native, parish, placeofordination, ordainingprelate, pastoralwork, otherdiocesanappointment) VALUES ('$namer','$ordination','$dob','$email','$phone','$archived','$status','$specialassign','$studyleave','$diocese','$community','$username','$passwrd','$titler','$formpro','$died','$buried','$buriedat','$native','$parish','$placeofordination','$ordainingprelate','$pastoralwork','$otherdiocesanappointment')"; $run = mysqli_query($con, $feedback); if ($feedback) { echo "<div class='alert alert-success'> Personnel Added Successfully! </div>"; } else { echo "<div class='alert alert-danger'> An error occured, please try again! </div>"; } } ?> <h2>Add Other Personnel in the Diocese</h2><br> <form id="form1" name="form1" method="post" action=""> <input name="status" type="hidden" value="Others" /> <input name="archived" type="hidden" value="No" /> <table width="100%" cellpadding="1" cellspacing="2"> <?php for ($i = 1; $i <= 10; $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"> <!-- <option value="Msgr.">Msgr.</option> <option value="Very Rev. Fr.">Very Rev. Fr.</option> <option value="Rev. Fr." selected="selected">Rev. Fr.</option> <option value="Sr.">Sr.</option> --> <option value="Rev.">Rev.</option> <option value="Bro.">Bro.</option> <option value="Seminarian">Seminarian</option> <option value="Catechist">Catechist</option> <option value="Mr">Mr</option> <option value="Mrs">Mrs</option> <option value="Miss">Miss</option> <option value="Chief">Chief</option> <option value="Sir">Sir</option> <option value="Lady">Lady</option> <option value="Prof">Prof</option> <option value="Dr">Dr</option> <option value="Engr">Engr</option> <option value="Barr">Barr</option> </select> <b>Name: </b><input name="namer" size="50" type="text" /></td> </tr> <tr valign="top"> <td> </td> <td><b>Ordination: </b><input name="ordination" readonly id="ordination<?php echo ($i); ?>" type="text" size="8" /> <button id="triggero<?php echo ($i); ?>"><i class="ti-calendar"></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" id="dob<?php echo ($i); ?>" readonly type="text" size="8" /> <button id="triggerd<?php echo ($i); ?>"><i class="ti-calendar"></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" size="20" type="text" /> <b>Email: </b><input name="email" size="30" type="text" /></td> </tr> <tr valign="top"> <td colspan="2"> <hr /> </td> </tr> <?php } ?> <tr valign="top"> <td colspan="2"><br> <input style="margin-left: 60px;" name="addp" type="submit" style="font-size:12px;" class="default-btn" id="addnews" value=" Add Personnel " /> </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="editpersonnel?tab=<?php echo $row_dio1['sn']; ?>">Edit</a> <a href="listpersonnel?deltab=<?php echo $row_dio1['sn']; ?>&tab=<?php echo $row_dio1['sn']; ?>">Delete</a> </td> </tr> <?php } while ($row_dio1 = mysqli_fetch_assoc($query_dio1)); ?> </table> </div> <div class="post-bot"></div> <?php } else { echo ("None Found!"); } ?> </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
|
Настройка