| 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"); ?>
<?
if ($logged_in == 1) {
} else {
header('Location: logon.php');
}
?>
<?php require("configure.php"); ?>
<?
$projectid = $_GET['projectid'];
if ($projectid == "")
{
header('Location: projectindex.php');
return;
}
?>
<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>
<!--********************************************************-->
<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("taskname", "staffid");
// Enter field description to appear in the dialog box
var fieldDescription = Array("Name", "Assigned To");
// dialog message
var alertMsg = "Please complete the following fields:\n";
var l_Msg = alertMsg.length;
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>Software Project Task</b></td>
<td class='content' align="center" width="150"></td>
</tr>
<?
$sql = "select * from PM_PROJECT_HDR where projectid = $projectid";
$result = mysql_query($sql);
//echo $sql;
if ($row = mysql_fetch_array($result,MYSQL_ASSOC))
{
echo "<tr><td class='pageheader' colspan='2'>Project: <i><a href='tasklist.php?projectid=$projectid'>". $row{'projectname'} ."</a></i></td>";
}
?>
</table>
<form action="taskadd.php" name="addform" method="post" onsubmit="return formCheck(this);">
<input type="hidden" name="projectid" value="<?=$projectid?>">
<table border="0" cellpadding="1" cellspacing="1" width="600">
<tr><td class="content" width="150">Name: *</td>
<td class="content"><input type="text" name="taskname" size="30" maxlength="100" class="content">
</td></tr>
<tr><td class='content' align="left" valign="middle" width="150">Assigned To: *</td>
<td class='content' width="450">
<select name="staffid" class="content">
<?php
if ($_SESSION['roleid'] == 1 || $_SESSION['roleid'] == 3)
{
$sql = "SELECT * ";
$sql .= "FROM SYS_STAFF where roleid in (1,3) and status = 1 order by staffname";
}
else
{
$sql = "SELECT * ";
$sql .= "FROM SYS_STAFF where roleid in (1,3) 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'}."'>". $row{'staffname'} ."</option>";
}
?>
</select>
</td></tr>
<tr><td class="content" width="150">Date *:</td>
<td class="content">
<script>DateInput('datefr', true, 'YYYY-MM-DD', '<?=date("Y-m-d")?>')</script>
<script>DateInput('dateto', true, 'YYYY-MM-DD', '<?=date("Y-m-d")?>')</script>
</td></tr>
<tr><td class="content" width="150" valign="top">Description:</td>
<td class="content">
<textarea name="taskdesc" class="content" cols="80" rows="5" maxlength="500" onkeyup="return ismaxlength(this)"></textarea>
</td></tr>
<tr><td class='content' align="left" valign="middle" width="150">Priority: *</td>
<td class='content' width="450">
<select name="priority" class="content">
<option value='1'>1</option>
<option value='2'>2</option>
<option value='3'>3</option>
<option value='4'>4</option>
<option value='5'>5</option>
</select>
</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>
</form>
<?
//echo date("F j, Y, g:i a");
//echo date("Ymdgi");
?>
</body>
</html>