File manager - Edit - /home/certfair/public_html/client-update.php.tar
Back
home/certfair/public_html/admin/client-update.php 0000644 00000014464 14676045155 0016162 0 ustar 00 <?php session_start(); if($_SESSION['status']!="Active") { header("location:index.php"); } include("config.php"); if(isset($_GET['id'])) { $id=$_GET['id']; } if (isset($_POST['update'])) { $a =$_POST['name']; $b =$_POST['title']; $fileinfo=PATHINFO($_FILES["file"]["name"]); $newFilename=$fileinfo['filename'] ."_". time() . "." . $fileinfo['extension']; move_uploaded_file($_FILES["file"]["tmp_name"],"file/" . $newFilename); $doc="file/" . $newFilename; $qu=mysqli_query($con,"UPDATE `client` SET `name`='".$a."', `file` ='".$doc."' , `title` ='".$b."' WHERE `id`='".$id."'"); if ($qu) { header('location:client.php'); } else { echo 'error'; } } $sql=mysqli_query($con,"select * from `client` where id='$id' "); $row=mysqli_fetch_array($sql); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="description" content=""> <meta name="author" content=""> <title>Organic Update -</title> <!-- Custom fonts for this template--> <link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css"> <link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet"> <!-- Custom styles for this template--> <link href="css/sb-admin-2.min.css" rel="stylesheet"> </head> <body id="page-top"> <!-- Page Wrapper --> <div id="wrapper"> <!-- Sidebar --> <?php include("sidebar.php");?> <!-- End of Sidebar --> <!-- Content Wrapper --> <div id="content-wrapper" class="d-flex flex-column"> <!-- Main Content --> <div id="content"> <!-- Topbar --> <?php include("topbar.php");?> <!-- End of Topbar --> <!-- Begin Page Content --> <div class="container-fluid"> <!-- Page Heading --> <h1 class="h3 mb-4 text-gray-800">Blank Page</h1> <div class="row justify-content-center"> <div class="col-xl-10 col-lg-12 col-md-9"> <div class="card o-hidden border-0 shadow-lg my-5"> <div class="card-body p-0"> <!-- Nested Row within Card Body --> <div class="row"> <div class="col-lg-6 d-none d-lg-block bg-login-image"></div> <div class="col-lg-6"> <div class="p-5"> <div class="text-center"> <h1 class="h4 text-gray-900 mb-4">Client Update</h1> </div> <form class="user" action="#" method="post" enctype="multipart/form-data"> <div class="form-group"> <input type="text" class="form-control form-control-user" name="title" placeholder="Enter username..." value="<?php echo $row['title']; ?>" > </div> <div class="form-group"> <input type="text" class="form-control form-control-user" name="name" placeholder="Enter username..." value="<?php echo $row['name']; ?>" > </div> <div class="form-group"> <input type="file" class="form-control form-control-user" name="file" value="<?php echo $row['file']; ?>" style="height: auto;" multiple > </div> <button type="submit" value="submit" name="update" class="btn btn-primary btn-user btn-block"> Update </button> <hr> <!--a href="index.html" class="btn btn-google btn-user btn-block"> <i class="fab fa-google fa-fw"></i> Login with Google </a> <a href="index.html" class="btn btn-facebook btn-user btn-block"> <i class="fab fa-facebook-f fa-fw"></i> Login with Facebook </a--> </form> <hr> <!--div class="text-center"> <a class="small" href="forgot-password.html">Forgot Password?</a> </div> <div class="text-center"> <a class="small" href="register.html">Create an Account!</a> </div--> </div> </div> </div> </div> </div> </div> </div> </div> <!-- /.container-fluid --> </div> <!-- End of Main Content --> <!-- Footer --> <?php include("footer.php");?> <!-- End of Footer --> </div> <!-- End of Content Wrapper --> </div> <!-- End of Page Wrapper --> <!-- Scroll to Top Button--> <a class="scroll-to-top rounded" href="#page-top"> <i class="fas fa-angle-up"></i> </a> <!-- Logout Modal--> <div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLabel">Ready to Leave?</h5> <button class="close" type="button" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body">Select "Logout" below if you are ready to end your current session.</div> <div class="modal-footer"> <button class="btn btn-secondary" type="button" data-dismiss="modal">Cancel</button> <a class="btn btn-primary" href="login.html">Logout</a> </div> </div> </div> </div> <!-- Bootstrap core JavaScript--> <script src="vendor/jquery/jquery.min.js"></script> <script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script> <!-- Core plugin JavaScript--> <script src="vendor/jquery-easing/jquery.easing.min.js"></script> <!-- Custom scripts for all pages--> <script src="js/sb-admin-2.min.js"></script> </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings