:: **Zploit** v1.0 | Current Path: **/home/bbbncs7/amtechint.com/admin/**
:: Editing File: logo-slider-new.php
<?php include "param.php"; include "func.php"; include "chk_login.php"; ?> <?php $conn=mysqli_connect('106.0.62.85','bbbncs7_newamtech',']se$}HOiVeP$','bbbncs7_newamtech'); if (!$conn) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } ?> <?php if (isset($_POST['submit'])) { // Check if file is chosen if(isset($_FILES['chosefile'])){ $file_name = $_FILES['chosefile']['name']; $file_size = $_FILES['chosefile']['size']; $file_tmp = $_FILES['chosefile']['tmp_name']; $file_type = $_FILES['chosefile']['type']; // Set upload directory $upload_dir = "upload-image/"; // Move the uploaded file to the desired directory if(move_uploaded_file($file_tmp, $upload_dir . $file_name)) { // File uploaded successfully // Insert file information into database $insert = mysqli_query($conn, "INSERT INTO logo_slider(file_name) VALUES('$file_name')"); if ($insert) { echo "<script>window.alert('File Added Successfully')</script>"; header('location: logo-slider.php'); echo "<script>window.location.href='all-services.php';</script>"; } else { echo "<script>window.alert('Process Failed')</script>"; } } else { // Failed to upload file echo "<script>window.alert('Error uploading file.')</script>"; } } } ?> <html> <head> <title> <?=$web_title?> </title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="style.css" rel="stylesheet" type="text/css"> <script type="text/javascript" src="chk_frm.js"></script> <script language="JavaScript"> function chk_form() { if (checkempty(document.frm_add.pname, ":.. Please enter Page Name.:") == false) return false; return true; } </script> <script src="//cdn.ckeditor.com/4.7.3/full/ckeditor.js"></script> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous"> <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.min.js" integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF" crossorigin="anonymous"></script> <style> .btn:hover { height: 2.5em; font-size: 15px; } </style> </head> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="21" align="center" valign="top"> <?php include("top_cp.php"); ?> </td> </tr> <tr> <td align="center" valign="top"> <table width="990" height="100%" border="0" cellpadding="0" cellspacing="0" class="base"> <tr> <td height="2" colspan="2"><img src="imgs/cp/spacer.gif" width="8" height="8"></td> </tr> <tr> <td width="190" valign="top"> <?php include("left_cp.php"); ?> </td> <td width="800" valign="top"> <table width="800" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="681" height="29" background="imgs/cp/menu_cat_bg.jpg" class="left_menu_head" style="padding:4px;"><a href="home.php" class="left_menu_head">Home</a> | Content Pages</td> <td width="119" align="right" background="imgs/cp/menu_cat_bg.jpg" class="left_menu_head" style="padding:4px;"><a href="content.php" class="btn">Back</a></td> </tr> <tr><td> <form method="post" enctype="multipart/form-data" class="m-3"> <div class="row"> <div class="mb-3 col-md-6"> <label for="formFileMultiple" class="form-label">Select Slider Image/video</label> <input class="form-control" type="file" name="chosefile" id="chosefile" multiple="" required> </div> <button type="submit" name="submit" class="btn btn-primary">SUBMIT</button> <?php echo $file_name ?> </form> </td> </tr> </table> </td> </tr> <tr> <td height="2" colspan="2"><img src="imgs/cp/spacer.gif" width="8" height="8"></td> </tr> </table> </td> </tr> <tr> <td height="29" align="center" background="imgs/cp/btm_bg22.jpg"> <?php include("btm_cp.php"); ?> </td> </tr> </table> </body> </html>