? 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/tour/
File Upload :
Current File : /home/admin/domains/happytokorea.com/public_html/backend/modules/tour/add_group_do.php

<?
session_start();
require_once('../../../config.php');
require_once('../../../libs/MySql.php');
require_once('function.php');
$db=new MySql;
function add_category(){
global $db;
if ($_SESSION["la"] == 1){
$ck=$db->getRow('tour_cat',"WHERE CatName='{$_POST[CatName]}' ");
}else{
$ck=$db->getRow('tour_cat_en',"WHERE CatName='{$_POST[CatName]}' ");
}

	if($ck[CatName]==""){
				if($_POST[CatName]!=""){
						$adddata=Array(
							'CatName'=>$_POST['CatName'],
							'CatParentID'=>$_POST['parent'],
							'CatURL'=>genURLCat($_POST[CatName]),
							
							);
if ($_SESSION["la"] == 1){
							if($db->Insert('tour_cat',$adddata)){
							$id=mysql_insert_id();
							echo"<center><br>บันทึกข้อมูลสำเร็จ</center>
							<script language=\"JavaScript\">
							window.parent.frames[0].location = \"list_group.php\";
							</script>
							<meta http-equiv=\"refresh\" content=\"1;url=com_new_group.php?parent=$parent\">";
							
							}else{
								$error="ไม่สามารถบันทึกข้อมูลได้ในขณะนี้ค่ะ";
								echo "<SCRIPT>alert(\"$error\"); window.history.back(); </SCRIPT>\n";
								exit(0);
							}
}else{
							if($db->Insert('tour_cat_en',$adddata)){
							$id=mysql_insert_id();
							echo"<center><br>บันทึกข้อมูลสำเร็จ</center>
							<script language=\"JavaScript\">
							window.parent.frames[0].location = \"list_group.php\";
							</script>
							<meta http-equiv=\"refresh\" content=\"1;url=com_new_group.php?parent=$parent\">";
							
							}else{
								$error="ไม่สามารถบันทึกข้อมูลได้ในขณะนี้ค่ะ";
								echo "<SCRIPT>alert(\"$error\"); window.history.back(); </SCRIPT>\n";
								exit(0);
							}
}

				}else{
					$error="กรอกข้อมูลไม่ครบค่ะ";
					echo "<SCRIPT>alert(\"$error\"); window.history.back(); </SCRIPT>\n";
					exit(0);
				}//จบ ตรวจสอบว่าข้อมูลครบหรือไม
	}else{
	//ข้อมูลมีในฐานข้อมูลหรือป่าว
	$error="ชื่อหมวดหมู่ซ้ำกับของเดิม";
		echo "<SCRIPT>alert(\"$error\"); window.history.back(); </SCRIPT>\n";
		exit(0);
	}	//จบข้อมูลมีในฐานข้อมูลหรือป่าว

}//end
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE><?echo $cfg['site_name'];?></TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<META content="" name=Keywords>
<META content="<? echo $cfg['site_name'];?>" name="Description">
<META content="<? echo $cfg['site_name'];?>" name="Author">
<META content="<? echo $cfg['site_name'];?>" name="Copyright">

<?
add_category();
?>

T1KUS90T
  root-grov@210.1.60.28:~$