| 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 header("Content-Type:text/html;charset=BIG5"); ?>
<?php require("checkuser.php"); ?>
<?php require("configure.php"); ?>
<?
$jobid = $_GET['jobid'];
$id = $_GET['id'];
//$id = "c9f0f895fb98ab9159f51fd0297e236d";
if ($id == "")
{
if ($logged_in <> 1) {
header('Location: logon.php');
return;
}
$disable = "";
$sql = "select * from SYS_JOB where jobid = $jobid";
}
else
{
$disable = "disabled";
$sql = "select * from SYS_JOB where md5(jobid) = '$id'";
}
$result = mysql_query($sql);
if ($row = mysql_fetch_array($result,MYSQL_ASSOC))
{
$jobid = $row{'jobid'};
$staffid = $row{'staffid'};
$custid = $row{'custid'};
$email = $row{'email'};
$jobtimefr = substr($row{'jobtimefr'},3,2).substr($row{'jobtimefr'},6,2);
$jobtimeto = substr($row{'jobtimeto'},3,2).substr($row{'jobtimeto'},6,2);
$jobdate = $row{'jobdate'};
$jobtype = $row{'jobtype'};
$calldate = $row{'calldate'};
$calltime = substr($row{'calltime'},3,2).substr($row{'calltime'},6,2);
$jobdetail = $row{'jobdetail'};
$jobaction = $row{'jobaction'};
$jobstatus = $row{'jobstatus'};
$remarks = $row{'remarks'};
$creationby = $row{'creationby'};
$creationdate = $row{'creationdate'};
$updatedby = $row{'updatedby'};
$updateddate = $row{'updateddate'};
$acceptedby = $row{'acceptedby'};
$filename = $row{'filename'};
}
?>
<html>
<head>
<title>One Solution Limited - Support</title>
<link rel="stylesheet" href="main.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=big5" />
<script language="JavaScript" type="text/javascript" src="richtext.js"></script>
<script type="text/javascript" src="selectcustomer.js"></script>
<script type="text/javascript" src="calendarDateInput.js"></script>
<script type="text/javascript">
function ismaxlength(obj){
var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
if (obj.getAttribute && obj.value.length>mlength)
obj.value=obj.value.substring(0,mlength)
}
</script>
</head>
<body onLoad="showCustomer('<?=$custid?>')">
<!--********************************************************-->
<script language="JavaScript">
<!--
var emailfilter=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i
function formCheck(formobj){
// Enter name of mandatory fields
var fieldRequired = Array("email", "jobtimefr", "jobtimeto", "calltime", "jobdetail", "jobaction");
// Enter field description to appear in the dialog box
var fieldDescription = Array("Email", "Service time start", "Service time end", "Call time", "Job symptions", "Action");
// dialog message
var alertMsg = "Please complete the following fields:\n";
var l_Msg = alertMsg.length;
// check email start
var returnval=emailfilter.test(formobj.email.value)
if (returnval==false)
{
//alert("Please enter a valid email address.")
alertMsg += " - Please enter a valid email address.\n";
//formobj.email.select()
}
// check email end
var jobtimefr = formobj.jobtimefr.value
if (jobtimefr.length != 4 || IsNumeric(jobtimefr) == false)
{
alertMsg += " - Please enter expected Service Time Start using the following format (Eg. 0930).\n";
}
var jobtimeto = formobj.jobtimeto.value
if (jobtimeto.length != 4 || IsNumeric(jobtimeto) == false)
{
alertMsg += " - Please enter expected Service Time End using the following format (Eg. 0930).\n";
}
var calltime = formobj.calltime.value
if (calltime.length != 0)
{
if (IsNumeric(calltime) == false)
{
alertMsg += " - Please enter expected Call Time using the following format (Eg. 0930).\n";
}
}
for (var i = 0; i < fieldRequired.length; i++){
var obj = formobj.elements[fieldRequired[i]];
if (obj){
switch(obj.type){
case "select-one":
if (obj.selectedIndex == -1 || obj.options[obj.selectedIndex].text == ""){
alertMsg += " - " + fieldDescription[i] + "\n";
}
break;
case "select-multiple":
if (obj.selectedIndex == -1){
alertMsg += " - " + fieldDescription[i] + "\n";
}
break;
case "text":
case "textarea":
if (obj.value == "" || obj.value == null){
alertMsg += " - " + fieldDescription[i] + "\n";
}
break;
default:
}
if (obj.type == undefined){
var blnchecked = false;
for (var j = 0; j < obj.length; j++){
if (obj[j].checked){
blnchecked = true;
}
}
if (!blnchecked){
alertMsg += " - " + fieldDescription[i] + "\n";
}
}
}
}
if (alertMsg.length == l_Msg){
return submitForm();
}else{
alert(alertMsg);
return false;
}
}
function IsNumeric(sText)
{
var ValidChars = "0123456789.";
var IsNumber=true;
var Char;
for (i = 0; i < sText.length && IsNumber == true; i++)
{
Char = sText.charAt(i);
if (ValidChars.indexOf(Char) == -1)
{
IsNumber = false;
}
}
return IsNumber;
}
function y2k(number) { return (number < 1000) ? number + 1900 : number; }
function daysElapsed(date1,date2) {
var difference =
Date.UTC(y2k(date1.getYear()),date1.getMonth(),date1.getDate(),0,0,0)
- Date.UTC(y2k(date2.getYear()),date2.getMonth(),date2.getDate(),0,0,0);
return difference/1000/60/60/24;
}
function submitForm() {
return true;
}
// -->
</script>
<script type="text/javascript">
var emailfilter=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i
function checkmail(e){
var returnval=emailfilter.test(e.value)
if (returnval==false){
alert("Please enter a valid email address.")
e.select()
}
return returnval
}
</script>
<!--********************************************************-->
<table border="0" cellpadding="1" cellspacing="1" width="100%">
<tr><td class='pageheader' align="left" valign="middle" height="100"><img src="images/iconProducts.png"> <b>Job Checking List</b></td>
<td class='content' align="center" width="150"></td>
</tr>
</table>
<input type="hidden" name="jobid" value="<?=$jobid?>">
<table border="0" cellpadding="1" cellspacing="1" width="800">
<tr><td class='content' align="left" valign="middle" width="150"><b>Job No.:</b></td>
<td class='content' width="650"><b><?=$jobid?></b></td></tr>
<tr><td class='content' align="left" valign="middle" width="150">Select a Staff:</td>
<td class='content' width="650">
<?php
$sql = "SELECT * ";
$sql .= "FROM SYS_STAFF where roleid = 2 and status = 1 and staffid = '". $staffid ."' order by staffname";
$result = mysql_query($sql);
$row = mysql_fetch_array($result,MYSQL_ASSOC);
echo $row{'staffname'};
?>
</td></tr>
<tr><td class='content' align="left" valign="middle" width="150">Select a Customer:</td>
<td class='content' width="650">
<?php
$sql = "SELECT * ";
$sql .= "FROM CM_CUSTOMER_HDR WHERE custid = '".$custid."' order by custname";
$result = mysql_query($sql);
$row = mysql_fetch_array($result,MYSQL_ASSOC);
echo $row{'custname'};
mysql_close($dbh);
?>
</select>
</td></tr>
</table>
<?
$showemail = 0;
?>
<div id="txtHint" class="content">Customer info will be listed here.</div>
<table border="0" cellpadding="1" cellspacing="1" width="800">
<tr><td class="content" width="150">Email:</td>
<td class="content"><?=$email?></td></tr>
</table>
<table border="0" cellpadding="1" cellspacing="1" width="800">
<tr><td class="content" width="150">Service Time:</td>
<td class="content">
Start : <?=$jobtimefr?>
End : <?=$jobtimeto?>
</td></tr>
<tr><td class="content" width="150">Date:</td>
<td class="content"><?=$jobdate?></td></tr>
</table>
<hr>
<table border="0" cellpadding="1" cellspacing="1" width="980" bgcolor="#666666">
<tr><td class="content" width="50" align='center' bgcolor='#FFFFFF'>Job No</td>
<td class="content" width="200" align='center' bgcolor='#FFFFFF'>Customer</td>
<td class="content" width="150" align='center' bgcolor='#FFFFFF'>Job Date</td>
<td class="content" width="430" align='center' bgcolor='#FFFFFF'>Job Symptions </td>
<td class="content" width="130" align='center' bgcolor='#FFFFFF'>Handle by</td>
<td class="content" width="75" align='center' bgcolor='#FFFFFF'>Status</td>
<td class="content" width="75" align='center' bgcolor='#FFFFFF'>Completed</td>
<td class="content" width="75" align='center' bgcolor='#FFFFFF'>Task</td>
<td class="content" width="130" align='center' bgcolor='#FFFFFF'>Checking List</td>
</tr>
</table>
</body>
</html>
<?
function getSelect($field1, $field2)
{
if ($field1 == $field2)
{
return "selected";
}
else
{
return "";
}
}
?>
<?
function getCheck($field1, $field2)
{
if ($field1 == $field2)
{
return "checked";
}
else
{
return "";
}
}
?>