| Server IP : 210.245.233.93 / Your IP : 216.73.216.226 Web Server : Apache/2.2.15 (CentOS) System : Linux webserver2.onesolution.com.hk 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64 User : apache ( 48) PHP Version : 5.3.3 Disable Function : exec, shell_exec, system, passthru, popen, proc_open, pcntl_exec MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/onesolution.com.hk/support/ |
Upload File : |
<?php require("checkuser.php"); ?>
<?
$jobid = $_POST['jobid'];
$staffid = $_POST['staffid'];
$custid = $_POST['custid'];
$email = $_POST['email'];
$jobtimefr = $_POST['jobtimefr'];
$jobtimeto = $_POST['jobtimeto'];
$jobdate = $_POST['jobdate'];
$calldate = $_POST['calldate'];
$calltime = $_POST['calltime'];
$jobdetail = htmlspecialchars($_POST['jobdetail'], ENT_QUOTES);
$jobaction = htmlspecialchars($_POST['jobaction'], ENT_QUOTES);
$jobstatus = $_POST['jobstatus'];
$remarks = htmlspecialchars($_POST['remarks'], ENT_QUOTES);
$creationby = $_SESSION['userid'];
$creationdate = date("Ymdgis");
$updatedby = $_SESSION['userid'];
$updateddate = date("Ymdgis");
$acceptedby = $_POST['acceptedby'];
$filename = $_FILES['filename']['name'];
if (strlen($jobstatus) == 0)
{
$jobstatus = 1;
}
include("configure.php");
if (strlen($_FILES['filename']['name']) <> 0)
{
if ($_FILES['filename']['size'] < 10000000)
{
copy ($_FILES['filename']['tmp_name'], "docs/". $jobid."_".$_FILES['filename']['name'])
or die("<br>Can't copy");
$filename = $jobid."_".$_FILES['filename']['name'];
}
else
{
die("<br>File size error");
}
}
$sql = "SELECT * ";
$sql .= "FROM CM_CUSTOMER_HDR ";
$sql .= "where custid = ". $custid ." ";
$result = mysql_query($sql);
if ($row = mysql_fetch_array($result,MYSQL_ASSOC))
{
$custname = $row{'custname'};
$address = htmlspecialchars($row{'address'}, ENT_QUOTES);
$contactperson = $row{'contactperson'};
$telno = $row{'telno'};
}
if (strlen($_FILES['filename']['name']) <> 0)
{
$sql = "update SYS_JOB ";
$sql .= "set staffid=$staffid, custid=$custid, email='$email', jobtimefr='$jobtimefr', jobtimeto='$jobtimeto', jobdate='$jobdate', calldate='$calldate', calltime='$calltime', jobdetail='$jobdetail', jobaction='$jobaction', jobstatus=$jobstatus, remarks='$remarks', updatedby='$updatedby', updateddate='$updateddate', custname='$custname', address='$address', contactperson='$contactperson', telno='$telno', acceptedby='$acceptedby', accepteddate='$updateddate', filename='$filename' ";
$sql .= "where jobid = $jobid";
$result = mysql_query($sql);
if (!$result) {
die('Invalid query: ' . mysql_error());
}
}
else
{
$sql = "update SYS_JOB ";
$sql .= "set staffid=$staffid, custid=$custid, email='$email', jobtimefr='$jobtimefr', jobtimeto='$jobtimeto', jobdate='$jobdate', calldate='$calldate', calltime='$calltime', jobdetail='$jobdetail', jobaction='$jobaction', jobstatus=$jobstatus, remarks='$remarks', updatedby='$updatedby', updateddate='$updateddate', custname='$custname', address='$address', contactperson='$contactperson', telno='$telno', acceptedby='$acceptedby', accepteddate='$updateddate' ";
$sql .= "where jobid = $jobid";
$result = mysql_query($sql);
if (!$result) {
die('Invalid query: ' . mysql_error());
}
}
require_once "sendEmail.php";
header("Location: jobdetail.php?id=".md5($jobid));
/*
if (strlen($_SESSION['roleid']) == 0)
{
header("Location: jobdetail.php?id=".md5($jobid));
}
else
{
header("Location: jobdetail.php?id=$jobid");
}
*/
?>