| Server IP : 104.21.37.246 / Your IP : 172.71.28.146 [ 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 : /home/cp648411/public_html/ilawasia.onnud20.com/Ip/Names_old/ |
Upload File : |
<?php
$ck='not';
include("../include/checkLogin.php");
include("../include/class.php");
include("../include/table_name.php");
$date_year = date("Y");
$date_month = date("m");
require_once("../../class/coreClass.php");
$core_db = new coreClass;
/*
echo "<pre>";
print_r($_POST);
echo "</pre>";
*/
$sql = array('table'=>$name_table51);
$view_sql = $view_db->view($sql);
$row = $view_db->q($view_sql);
$res = $view_db->q_re($view_sql);
$row_count = $view_db->q_nr($res);
$code =str_pad(($row_count+1),6,"0",STR_PAD_LEFT)."T";
$IsDeleted = 0;
$StatusActive = 1;
//echo $code;
$list = array(
'table'=>$name_table51,
'NamesName'=>"'".@$_POST["name"]."'",
'NamesCode'=>"'".@$code."'",
'Telephone'=>"'".@$_POST["phone"]."'",
'PostalAddress'=>"'".@$_POST["addr"]."'",
'Fax'=>"'".@$_POST["fax"]."'",
'ElectronicMail'=>"'".@$_POST["email"]."'",
'TaxID'=>"'".@$_POST["taxID"]."'",
'Remark'=>"'".@$_POST["remark"]."'",
'Initial'=>"'".@$_POST["initial"]."'",
'CreateBy'=>"'".@$_SESSION['UserInfo'][0]["UserId"]."'",
'LastUpdateBy'=>"'".@$_SESSION['UserInfo'][0]["UserId"]."'",
'CreateDateTime'=>"'".@$date."'",
'LastUpdateDateTime'=>"'".@$date."'",
'Deleted'=>"'".@$IsDeleted."'",
'StatusActive'=>"'".@$StatusActive."'",
);
$add = $actiondata_db->add_db($list);
//print_r($add);
//exit();
if($add['suc']==1){
$list = array(
'table'=>$name_table38,
'NamesName'=>"'".@$_POST["name"]."'",
'NamesCode'=>"'".@$code."'",
'Telephone'=>"'".@$_POST["phone"]."'",
'PostalAddress'=>"'".@$_POST["addr"]."'",
'Fax'=>"'".@$_POST["fax"]."'",
'ElectronicMail'=>"'".@$_POST["email"]."'",
'TaxID'=>"'".@$_POST["taxID"]."'",
'Remark'=>"'".@$_POST["remark"]."'",
'Initial'=>"'".@$_POST["initial"]."'",
'CreateBy'=>"'".@$_SESSION['UserInfo'][0]["UserId"]."'",
'LastUpdateBy'=>"'".@$_SESSION['UserInfo'][0]["UserId"]."'",
'CreateDateTime'=>"'".@$date."'",
'LastUpdateDateTime'=>"'".@$date."'",
'Deleted'=>"'".@$IsDeleted."'",
'StatusActive'=>"'".@$StatusActive."'",
);
$add = $actiondata_db->add_db($list);
$_SESSION['Success'] = "Add Names Successful.";
echo "<script>window.location.href='index.php';</script>";
}else{
$_SESSION['Error'] = "False";
echo "<script>window.location.href='index.php';</script>";
}