| 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"); ?>
<?
if ($logged_in == 1) {
} else {
header('Location: logon.php');
}
?>
<?php require("configure.php"); ?>
<?
$jobid = $_POST['jobid'];
$staffid = $_POST['staffid'];
$custid = $_POST['custid'];
$jobdatefr = $_POST['jobdatefr'];
$jobdateto = $_POST['jobdateto'];
if ($jobdatefr == "")
$jobdatefr = date("Y-m-d");
if ($jobdateto == "")
$jobdateto = date("Y-m-d");
$jobdetail = $_POST['jobdetail'];
?>
<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="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>
<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 Service</b></td>
<td class='content' align="center" width="150"></td>
</tr>
</table>
<form action="" name="searchform" method="post">
<table border="0" cellpadding="1" cellspacing="1" width="800">
<tr><td class="content" width="150">Job no:</td>
<td class="content"><input type="text" name="jobid" value="<?=$jobid?>" size="4" maxlength="4" class="content"></td></tr>
<tr><td class='content' align="left" valign="middle" width="150">Select a Staff:</td>
<td class='content' width="450">
<select name="staffid" class="content">
<?php
if ($_SESSION['roleid'] == 1)
{
$sql = "SELECT * ";
$sql .= "FROM SYS_STAFF where roleid = 2 and status = 1 order by staffname";
echo "<option></option>";
}
else
{
if ($disable == "disabled")
{
$sql = "SELECT * ";
$sql .= "FROM SYS_STAFF where roleid = 2 and status = 1 and staffid = '". $staffid ."' order by staffname";
}
else
{
$sql = "SELECT * ";
$sql .= "FROM SYS_STAFF where roleid = 2 and status = 1 and userid = '". $_SESSION['userid'] ."' order by staffname";
}
}
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result,MYSQL_ASSOC))
{
echo "<option value='".$row{'staffid'}."' ". getSelect($row{'staffid'}, $staffid).">". $row{'staffname'} ."</option>";
}
?>
</select>
</td></tr>
<tr><td class='content' align="left" valign="middle" width="150">Select a Customer:</td>
<td class='content'>
<select name="custid" class="content">
<option></option>
<?php
$sql = "SELECT * ";
$sql .= "FROM CM_CUSTOMER_HDR order by custname";
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result,MYSQL_ASSOC))
{
echo "<option value='".$row{'custid'}."' ". getSelect($row{'custid'}, $custid).">". $row{'custname'} ."</option>";
}
?>
</select>
</td></tr>
<tr><td class="content" width="150" valign="top">Date:</td>
<td class="content">
<script>DateInput('jobdatefr', true, 'YYYY-MM-DD', '<?=$jobdatefr?>', '')</script> To <script>DateInput('jobdateto', true, 'YYYY-MM-DD', '<?=$jobdateto?>', '')</script>
</td></tr>
<tr><td class="content" width="150">Job Symptions:</td>
<td class="content"><input type="text" name="jobdetail" value="<?=$jobdetail?>" size="50" maxlength="100" class="content"></td></tr>
<tr><td class="content" width="150" valign="top"></td>
<td class="content"><input type="submit" value="Submit" class="content"><input type="reset" value="Reset" class="content">
</td></tr>
</table>
</form>
<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>
<?
$sql = "select * from SYS_JOB a, SYS_STAFF b where a.staffid = b.staffid ";
if (strlen($jobid) > 0)
$sql .= "and jobid = $jobid ";
if (strlen($custid) > 0)
$sql .= "and custid = $custid ";
if (strlen($staffid) > 0)
$sql .= "and a.staffid = $staffid ";
$sql .= "and jobdate >= '$jobdatefr' ";
$sql .= "and jobdate <= '$jobdateto' ";
if (strlen($jobdetail) > 0)
$sql .= "and jobdetail = '$jobdetail' ";
$result = mysql_query($sql);
//echo $sql;
while ($row = mysql_fetch_array($result,MYSQL_ASSOC))
{
?>
<tr><td class="content" bgcolor='#FFFFFF'><?=$row{'jobid'}?></td>
<td class="content" bgcolor='#FFFFFF'><?=$row{'custname'}?></td>
<td class="content" bgcolor='#FFFFFF'><?=$row{'jobdate'}?></td>
<td class="content" bgcolor='#FFFFFF'><?=$row{'jobdetail'}?></td>
<td class="content" bgcolor='#FFFFFF'><?=$row{'staffname'}?></td>
<td class="content" bgcolor='#FFFFFF' align='center'>
<?
switch ($row{'status'}) {
case 0:
print "";
break;
case 1:
print "Done";
break;
case 2:
print "Follow up";
break;
case 3:
print "Others";
break;
default:
print "";
break;
}
?>
</td>
<td class="content" bgcolor='#FFFFFF' align='center'>
<?
if ($row{'acceptedby'} <> "")
{
echo "Yes";
}
?>
</td>
<td class="content" align='center' bgcolor='#FFFFFF'><a href='jobdetail.php?jobid=<?=$row{'jobid'}?>' target='_new'><img src='images/button_edit.png' border='0' alt="Task"></a></td>
<?php /*?><td class="content" align='center'><a href='jobdetail.php?id=<?=md5($row{'jobid'})?>' target='_new'><img src='images/button_edit.png' border='0'></a></td><?php */?>
<td class="content" align='center' bgcolor='#FFFFFF'><a href='jobchecklist.php?jobid=<?=$row{'jobid'}?>' target='_new'><img src='images/button_edit.png' border='0' alt="Checking List"></a></td>
</tr>
<?
}
?>
</table>
</body>
</html>
<?
function getSelect($field1, $field2)
{
if ($field1 == $field2)
{
return "selected";
}
else
{
return "";
}
}
?>