Файловый менеджер - Редактировать - /home/umudio/public_html/editup.php
Назад
<?php session_start(); if (!isset($_SESSION["manager"])) { header("location: ./"); exit(); } ?> <!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>Edit Upcoming Events</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">Edit Upcoming Events</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"> <p><a href="mod-auth">Go back to Admin Dashboard</a></p> <?php include("includes/config.php"); $id = $_GET['sn']; $get_post = "select * from calend where sn=$id"; $run_post = mysqli_query($con, $get_post); while ($row_post = mysqli_fetch_array($run_post)) { $activitye = $row_post['activity']; $fromdatee = $row_post['fromdate']; $todatee = $row_post['todate']; $detailse = $row_post['details']; } ?> <?php if (isset($_POST['editup'])) { include("includes/config.php"); $update_id = $_GET['sn']; $activity = str_replace("'", "''", $_POST['activity']); $fromdate = str_replace("'", "''", $_POST['fromdate']); $todate = str_replace("'", "''", $_POST['todate']); $details = str_replace("'", "''", $_POST['details']); $filename = $_FILES['image']['name']; $filepath = 'repo/' . $filename; move_uploaded_file($_FILES['image']['tmp_name'], $filepath); if ($_POST['todate'] != '') { $update_post = "update calend set activity='$activity',fromdate='$fromdate',todate='$todate',details='$details',image='$filepath' where sn='$update_id'"; $update_post = mysqli_query($con, $update_post); } else { $update_post = "update calend set activity='$activity',fromdate='$fromdate',details='$details',image='$filepath' where sn='$update_id'"; $update_post = mysqli_query($con, $update_post); } if ($update_post) { echo "<div class='alert alert-success'> Upcoming Event updated successfully! </div>"; } else { echo "<div class='alert alert-danger'> An error occured, please try again! </div>"; } } ?> <p class="headingbigger"><b>Edit Upcoming Event</b></p> <form method="post" action="" enctype="multipart/form-data"> <table width="100%" cellpadding="1" cellspacing="2"> <tr valign="top"> <td style="font-weight:bold; text-align:center">Activity</td> <td align="left"><input name="activity" type="text" size="70" value="<?php echo $activitye; ?>" /></td> </tr> <tr valign="top"> <td style="font-weight:bold; text-align:center"> </td> <td align="left"> <div style="height:10px;"> </div> <div> <input type="radio" name="YesNo" value="1" id="Day" onchange="yto()" onmouseup="yto()" onclick="yto()" ondblclick="yto()" /><b>Just a Day</b> <input type="radio" name="YesNo" value="2" id="Range" checked="checked" onchange="yto()" onmouseup="yto()" onclick="yto()" ondblclick="yto()" /><b>Range of Days</b></div> <span id="dfirst" style="font-weight:bold">From</span> <input name="fromdate" id="fromdate" type="date" size="18" required /> <span id="dsecond"> <b>Till</b> <input name="todate" id="todate" type="date" size="18" /></span><br><br> </td> </tr> <tr valign="top"> <td style="font-weight:bold; text-align:center">Event Thumbnail (Image)</td> <td align="left"><input name="image" type="file" required/><br><br></td> </tr> <tr valign="top"> <td style="font-weight:bold; text-align:center">Activity Details</td> <td align="left"><textarea name="details" id="details" cols="70" rows="15"><?php echo $detailse; ?></textarea></td> </tr> <tr valign="top"> <td colspan="2"><br> <input style="margin-left: 145px;" name="editup" type="submit" style="font-size:12px;" class="default-btn" id="" value=" Edit Upcomming Events " /> </td> </tr> </table> </form> <hr /> </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
|
Настройка