Linux host2.homegym.sg 4.18.0-553.8.1.el8_10.x86_64 #1 SMP Tue Jul 2 07:26:33 EDT 2024 x86_64
Apache
Server IP : 159.223.38.192 & Your IP : 159.223.38.192
Domains : 20 Domain
User : eachadea
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Lock Shell
Lock File++
Readme
/
home /
eachadea /
public_html /
bhg /
Delete
Unzip
Name
Size
Permission
Date
Action
assets
[ DIR ]
drwxr-xr-x
2025-10-29 23:03
images
[ DIR ]
drwxr-xr-x
2025-10-28 12:40
.htaccess
4.53
KB
-rw-rw-r--
2020-11-16 04:15
bhg-order.phtml
10.74
KB
-rw-r--r--
2020-12-12 07:19
doc.php
12.56
KB
-rw-r--r--
2025-10-28 12:40
error_log
231.79
KB
-rw-r--r--
2024-05-29 23:59
info.php
20
B
-rw-r--r--
2020-11-16 03:19
wp.php
18
B
-rw-r--r--
2025-10-28 12:36
Save
Rename
<head> <title>HOMEGYM.SG</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css"> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script> </head> <form id="test-form" class="form-style-9" method="post" enctype="multipart/form-data"> <?php if (!empty($_POST["name"]) && !empty($_POST["phone"]) && !empty($_POST["address"]) && !empty($_POST["item"])) { if ($_POST["stairs"] < 0) $delivery = "Self pickup"; else $delivery = "Carry ".$_POST["stairs"]." levels"; $name_of_uploaded_file =basename($_FILES['uploaded_file']['name']); $formData = $_POST; getFile( $name_of_uploaded_file, $formData ); //$error = "Submit Successfully! Auto reload in 10s"; //$page = $_SERVER['PHP_SELF']; //$sec = "10"; ?> <?php } elseif (!empty($_POST["name"]) || !empty($_POST["phone"]) || !empty($_POST["address"]) || !empty($_POST["email"]) || !empty($_POST["postal"]) || !empty($_POST["items"]) || !empty($_POST["price"])) { $error = "Please fill in all required fields"; $name = $_POST["name"]; $phone = $_POST["phone"]; $address = $_POST["address"]; $email = $_POST["email"]; $postal = $_POST["postal"]; $items = $_POST["items"]; $items = $_POST["price"]; } ?> <?php function getFile( $filename , $formData ) { $allowedExts = array("jpg", "png", "jpeg", "JPG", "JPEG"); $temp = explode(".", $_FILES["uploaded_file"]["name"]); $extension = end($temp); $mimes = array('application/vnd.ms-excel','text/plain','text/csv','text/tsv'); if (($_FILES["uploaded_file"]["size"] < 30000000) && in_array($extension, $allowedExts)) { if ($_FILES["uploaded_file"]["error"] > 0) { echo "Return Code: " . $_FILES["uploaded_file"]["error"] . "<br>"; } else { $location = "images/".$filename; compressImage($_FILES["uploaded_file"]["tmp_name"],$location,60); sendMailAsAttachment($location, $location,$formData); } } else { echo "<p class='error'>Invalid file</p>"; } } function prepareEmail( $formData ) { // email fields: to, from, subject, and so on $to = "homegym.sg@gmail.com"; $from = "homegym.sg@gmail.com"; $subject ="Receipt"; $message = "Uploaded File\n"; $message .= "Name: ". $formData['name']."\n"; $message .= "Phone: ". $formData['phone']."\n"; $message .= "Address: ". $formData['address']."\n"; $message .= "Items: ". $formData['item']."\n"; $headers = "From: $from"; // boundary $semi_rand = md5(time()); $mime_boundary = "==Multipart_Boundary_x{$semi_rand}x"; // headers for attachment $headers .= "\nMIME-Version: 1.0\n" . "Content-Type: multipart/mixed;\n" . " boundary=\"{$mime_boundary}\""; // multipart boundary $message .= "This is a multi-part message in MIME format.\n\n" . "--{$mime_boundary}\n" . "Content-Type: text/plain; charset=\"iso-8859-1\"\n" . "Content-Transfer-Encoding: 7bit\n\n" . $message . "\n\n"; $message .= "--{$mime_boundary}\n"; $emailData = array ( 'to' => $to, 'from' => $from, 'subject' => $subject, 'headers' => $headers, 'message' => $message ); return $emailData; } function sendMailAsAttachment( $filename, $fileorgname, $formData ) { $emailData = prepareEmail( $formData ); $attachContent = prepareAttachment( $filename,$fileorgname ); $message = $emailData['message'].$attachContent; $ok = @mail($emailData['to'], $emailData['subject'], $message, $emailData['headers']); if ($ok) { echo "<p class='error'>Dear Customer, <br />Thank you for your purchase. <br />We will contact you within 2 working days to confirm the delivery arrangement. Kindly retain your receipt. <br />For queries, please call 8822 2886 (Mon- Fri/9am-5pm).</p>"; } else { echo "<p class='error'>An error has occured, please try again or contact the sales rep.</p>"; } } function prepareAttachment( $filename ,$fileorgname) { $attachContent = ''; $file = fopen($filename,"rb"); $data = fread($file,filesize($filename)); fclose($file); $cvData = chunk_split(base64_encode($data)); $attachContent .= "Content-Type: {\"application/octet-stream\"};\n" . " name=\"$fileorgname\"\n" . "Content-Disposition: attachment;\n" . " filename=\"$fileorgname\"\n" . "Content-Transfer-Encoding: base64\n\n" . $cvData . "\n\n"; $attachContent .= "--{$mime_boundary}\n"; return $attachContent; } // Compress image function compressImage($source, $destination, $quality) { $info = getimagesize($source); if ($info['mime'] == 'image/jpeg') $image = imagecreatefromjpeg($source); elseif ($info['mime'] == 'image/gif') $image = imagecreatefromgif($source); elseif ($info['mime'] == 'image/png') $image = imagecreatefrompng($source); imagejpeg($image, $destination, $quality); } ?> <ul> <li> <input type="text" name="name" class="field-style field-full align-none" placeholder="Name*" value="<?php echo $name ?>" /> </li> <li> <input type="number" name="phone" class="field-style field-full align-none" placeholder="Phone*" value="<?php echo $phone ?>" /> </li> <li> <input type="text" name="address" class="field-style field-full align-none" placeholder="Address*" value="<?php echo $address ?>" /> </li> <li> <select name="stairs" class="field-style field-full align-none"> <option value="0" <?php if ($_POST["stairs"]=="0") echo "selected" ?>>No stairs carrying required</option> <option value="1" <?php if ($_POST["stairs"]=="1") echo "selected" ?>>Carry 1 levels - - - $15</option> <option value="2" <?php if ($_POST["stairs"]=="2") echo "selected" ?>>Carry 2 levels - - - $25</option> <option value="3" <?php if ($_POST["stairs"]=="3") echo "selected" ?>>Carry 3 levels - - - $35</option> </select> </li> <li> <div class="field-style field-full align-none"> <b>ITEMS *</b><br /><br /> <input type="checkbox" id="check1" name="items" value="OVICX Treadmill"> <label for="check1"> OVICX Treadmill</label><br> <input type="checkbox" id="check2" name="items" value="OVICX Bike"> <label for="check2"> OVICX Bike</label><br> <input type="checkbox" id="check3" name="items" value="OVICX Mat - self"> <label for="check3"> OVICX Mat (collected)</label><br> <input type="checkbox" id="check4" name="items" value="OVICX Mat - delivery"> <label for="check4"> OVICX Mat (for delivery)</label><br> <input type="checkbox" id="check5" name="items" value="PROGUARD Rubber Mat - self"> <label for="check5"> PROGUARD Rubber Mat (collected)</label><br> <input type="checkbox" id="check6" name="items" value="PROGUARD Rubber Mat - delivery"> <label for="check6"> PROGUARD Rubber Mat (for delivery)</label><br> </div> </li> <li> <label for='uploaded_file'>Upload your Receipt:</label> <input type="file" name="uploaded_file" id="uploaded_file"></li> <li> <input type="submit" value="Submit" id="submit-form"/> <button onClick="window.location.reload();">Refresh Page</button> <p class="uploading" style="display:none">Uploading...</p> </ul> <?php echo '<p class="error">'.$error.'</p>'; ?> <input type="hidden" name="date" value="" id="date"> <input type="hidden" name="item" value="" id="item"> </form> <script> var $form = $('form#test-form'), url = 'https://script.google.com/macros/s/AKfycbwT0mwqsiFAAUPOqFYjACsezy3MFBKmuSru8WcC9N-Vm3_K6xMC/exec' $(document).ready(function() { $('#submit-form').on('click', function(e) { $(".uploading").show( "shake", 10000 ); //e.preventDefault(); $('#date').val(unixTime(Date.now())); $("input:checkbox[name=items]:checked").each(function(){ $('#item').val($('#item').val()+"\n"+$(this).val()); }); var jqxhr = $.ajax({ url: url, method: "GET", dataType: "json", data: $form.serialize() }).done(function() { //alert( "Dear Customer, \nThank you for your purchase. \nWe will contact you within 2 working days to confirm the delivery arrangement. Kindly retain your receipt. \nFor queries, please call 8822 2886 (Mon- Fri/9am-5pm)." ); $(this).submit(); }).fail(function() { alert( "Something went wrong. Please try again or contact the sales rep." ); }); }) }); function unixTime(unixtime) { var u = new Date(unixtime); return u.getUTCFullYear() + '-' + ('0' + u.getUTCMonth()).slice(-2) + '-' + ('0' + u.getUTCDate()).slice(-2) + ' ' + ('0' + u.getUTCHours()).slice(-2) + ':' + ('0' + u.getUTCMinutes()).slice(-2) + ':' + ('0' + u.getUTCSeconds()).slice(-2) + '.' + (u.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) }; </script> <style type="text/css"> .form-style-9{ max-width: 700px; background: #FAFAFA; padding: 30px; margin: 50px auto; box-shadow: 1px 1px 25px rgba(0, 0, 0, 0.35); border-radius: 10px; border: 6px solid rgb(249, 116, 19); } .form-style-9 ul{ padding:0; margin:0; list-style:none; } .form-style-9 ul li{ display: block; margin-bottom: 10px; min-height: 35px; } .form-style-9 ul li .field-style{ box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; padding: 8px; outline: none; border: 1px solid #0ca9ff; -webkit-transition: all 0.30s ease-in-out; -moz-transition: all 0.30s ease-in-out; -ms-transition: all 0.30s ease-in-out; -o-transition: all 0.30s ease-in-out; font-size: large; }.form-style-9 ul li .field-style:focus{ box-shadow: 0 0 5px #B0CFE0; border:1px solid #0ca9ff; } .form-style-9 ul li .field-split{ width: 49%; } .form-style-9 ul li .field-full{ width: 100%; } .form-style-9 ul li input.align-left{ float:left; } .form-style-9 ul li input.align-right{ float:right; } .form-style-9 ul li textarea{ width: 100%; height: 100px; } .form-style-9 ul li button, .form-style-9 ul li input[type="button"], .form-style-9 ul li input[type="submit"] { -moz-box-shadow: inset 0px 1px 0px 0px #45D6D6; -webkit-box-shadow: inset 0px 1px 0px 0px #45D6D6; box-shadow: inset 0px 1px 0px 0px #45D6D6; background-color: #2CBBBB; border: 1px solid #27A0A0; display: inline-block; cursor: pointer; color: #FFFFFF; font-family: 'Open Sans Condensed', sans-serif; padding: 8px 18px; text-decoration: none; text-transform: uppercase; } .form-style-9 ul li button:hover, .form-style-9 ul li input[type="button"]:hover, .form-style-9 ul li input[type="submit"]:hover { background:linear-gradient(to bottom, #34CACA 5%, #30C9C9 100%); background-color:#34CACA; } .error { FONT-SIZE: larger; color: red; font-weight: 800; } </style>