:: **Zploit** v1.0 | Current Path: **/home/bbbncs7/amtechint.com/admin/**
:: Editing File: client-review-new.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 // Assuming $conn is your database connection if (isset($_POST['submit'])) { $heading = $_POST['heading']; $review = $_POST['review']; $client_name = $_POST['client_name']; $position = $_POST['position']; // File upload handling $file_name = ''; if (isset($_FILES['client_img'])) { $file_name = $_FILES['client_img']['name']; $file_tmp = $_FILES['client_img']['tmp_name']; $file_size = $_FILES['client_img']['size']; $file_type = $_FILES['client_img']['type']; // Move uploaded file to desired directory move_uploaded_file($file_tmp, "upload-image/" . $file_name); } // Check if all required fields are not empty if (!empty($heading) && !empty($review) && !empty($client_name) && !empty($position) && !empty($file_name)) { // Prepare and bind the SQL statement $stmt = $conn->prepare("INSERT INTO client_reviews (heading, review, client_name, position, file_name) VALUES (?, ?, ?, ?, ?)"); $stmt->bind_param("sssss", $heading, $review, $client_name, $position, $file_name); // Execute the statement if ($stmt->execute()) { // Redirect upon successful insertion header("Location: client-review.php"); exit(); } else { echo "<script>window.alert('Process Failed')</script>"; } // Close statement $stmt->close(); } } ?> <?php include "param.php"; include "func.php"; include "chk_login.php"; ?> <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 class="p-3"> <form method="post" enctype="multipart/form-data" action=""> <div class="row"> <div class="mb-3 col-md-6"> <label class="form-label">Heading</label> <input type="text" class="form-control" name="heading" placeholder="Heading" required> </div> <div class="mb-3 col-md-12"> <div class="card"> <div class="card-header"> <h4 class="card-title">Review</h4> </div> <div class="card-body"> <div class="basic-form"> <div class="mb-3"> <textarea class="form-txtarea form-control" name="review" rows="2" id="review" required></textarea> </div> </div> </div> </div> </div> <div class="mb-3 col-md-6"> <label class="form-label">Client Name</label> <input type="text" class="form-control" name="client_name" placeholder="Client Name" required> </div> <div class="mb-3 col-md-6"> <label class="form-label">Position</label> <input type="text" class="form-control" name="position" placeholder="Position" required> </div> <div class="mb-3 col-md-6"> <label for="formFileMultiple" class="form-label">Client Image</label> <input class="form-control" type="file" name="client_img" id="chosefile" multiple="" required> </div> </div> <button type="submit" name="submit" class="btn btn-primary">SUBMIT</button> </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>