| Server IP : 172.67.216.113 / Your IP : 104.23.243.32 [ 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/ilawasia.onnud20.com/Quotation/ |
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");
/*
echo "<pre>";
print_r($_SESSION);
echo "</pre>";
*/
echo "<pre>";
print_r($_FILES['File']);
echo "</pre>";
echo "<pre>";
print_r($_POST);
echo "</pre>";
$name_file_a=$_POST['old_file_a'];$name_file=$_POST['old_file'];
if($_FILES["File"]["error"] == 0)
{
$path = "../Upload/";
$subPath = "Quotation/".@$_POST["QuotationId"]."/";
$Directory = $path . $subPath;
if (!file_exists($Directory)) {mkdir($Directory, 0777, true);}
$name_file = $image_class->file_up($_FILES["File"],$Directory,$subPath);
@unlink($path.$name_file);
}
if($_FILES["ApproveFile"]["error"] == 0)
{
$path_a = "../Upload/";
$subPath_a = "Quotation/Approve/".@$_POST["QuotationId"]."/";
$Directory_a = $path_a . $subPath_a;
if (!file_exists($Directory_a)) {mkdir($Directory_a, 0777, true);}
$name_file_a = $image_class->file_up($_FILES["File"],$Directory_a,$subPath_a);
@unlink($path.$name_file_a);
}
$list = array(
'table'=>$name_table19,
'QuotationDocumentId'=>@$_POST["Id"],
'DocType'=>@$_POST["DocType"],
'FilePath'=>@$name_file,
'ApproveFilePath'=>@$name_file_a,
'Status'=>@$_POST["Status"],
'UpdateBy'=>@$_SESSION["UserInfo"][0]['UserId'],
'UpdateDateTime'=>@$date
);
$data = $actiondata_db->edit_db($list);
if($data['suc']==1){
echo $_SESSION['Success']='Update document successful';
}else{
echo $_SESSION['er']='false';
}
?>