| Server IP : 104.21.37.246 / Your IP : 172.71.28.145 [ 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/CaseList/ |
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>";
*/
//$docdate = explode("/",@$_POST["DocumentDate"]);
$docdate = $util_class->date_chang_1($_POST["DocumentDate"]);;
$path = "../Upload/";
$subPath = "Case/".@$_POST["CaseId"]."/";
$Directory = $path . $subPath;
$name_file=$path.$_POST['old_file'];
if($_FILES["File"]["error"] == 0)
{
@unlink($path.$name_file);
if (!file_exists($Directory)) {mkdir($Directory, 0777, true);}
$name_file = $image_class->file_up($_FILES["File"],$Directory,$subPath);
}
$list = array(
'table'=>$name_table3,
'CaseAttachmentId'=>@$_GET["Id"],
'FilePath'=>@$name_file,
'AttachmentDate'=>@$date,
'Del'=>'0',
'DocumentType'=>@$_POST["DocumentType"],
'DocumentDate'=>@$docdate,
'DocumentName'=>@$_POST["DocumentName"],
'UpdateBy'=>@$_SESSION["UserInfo"][0]['UserId'],
'UpdateDateTime'=>@$date,
);
$data = $actiondata_db->edit_db($list);
if($data['suc']==1){
$_SESSION['Success']='Update attachment successful';
echo "<script>window.location.href='edit.php?Type=Edit&Id=$_POST[CaseId]'</script>";
}else{
$_SESSION['Error']='false';
echo "<script>window.location.href='edit.php?Type=Edit&Id=$_POST[CaseId]'</script>";
}
?>