1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
<?
include 'header.php';
include 'format.css';
$queryu = "SELECT * FROM $userstable WHERE (userlevel = '2' OR userlevel = '3' OR userlevel = 'A') AND username = '$tmpname'";
$resultu = mysql_query($queryu);
$rowu= mysql_fetch_array($resultu);
$userlevel = $rowu['userlevel'];
if($userlevel == '2'){
// DO NOTHING
echo "<table bgcolor=\"#ECECEC\" cellpadding=\"3\" cellspacing=\"0\" align=\"center\" class=\"black\" border=\"0\">";
echo "<tr>";
echo "<td>You must have manager access to enter this area.</td>";
echo "</tr><table>";
}else{
//ELSE, SHOW FORM BELOW - Begin manager form
include 'includes/inputcheck.php';
echo "<td>";
echo "<table bgcolor=\"#ECECEC\" cellpadding=\"3\" cellspacing=\"0\" align=\"center\" class=\"black\" border=\"0\">";
echo "<tr><td bgcolor=\"#ECECEC\" align=\"center\"><b>Task Creation</b></td><td bgcolor=\"#F2F2F2\" align=\"center\"><b>Customer Maintenance</b></td></tr>";
echo "<tr><td>";
echo "<table bgcolor=\"#ECECEC\" cellpadding=\"3\" cellspacing=\"0\" align=\"center\" class=\"black\">";
echo "<tr><form name=\"form1\" method=\"post\" onSubmit=\"return (formCheck(this))\" action=\"complete.php?getid=1\">";
echo "<td align=\"right\"><b>Customer:</b></td> ";
echo "<td><select name=\"catname\">";
echo "<option value=\"\"></option>";
include 'includes/catecon.php';
echo "</select></td></tr>";
/*for($m = 0;$m <= 0; $m++){
$now = date("Y-m-d h:i", strtotime("now + $m day"));
echo "<input type='hidden' name='open_date' value='$now' />\n";
}*/
/*for($m = 0;$m <= 0; $m++)
{
$now = date ("Y-m-d", mktime (0,0,0,date("m"),date("d")+$m,date("Y")));
echo "<input type=\"hidden\" name=\"open_date\" value=\"" . $now . "\">";
}*/
for($m = 0; $m <= 1; $m++)
{
$now = date ("Y-m-d H:i", mktime (date("H"),date("i"),0,date("m"),date("d")+$m,date("Y")));
echo "<input type=\"hidden\" name=\"open_date\" value=\"" . $now . "\">";
}
/*echo "<tr><td align=\"right\"><b>Priority:</b></td><td><select name=\"priority\">";
echo "<option value=\"\"></option>";
include 'includes/priorcon.php';
echo "</select> <font size=\"1\">Lower numbers are higher priority</font></td></tr>";*/
echo "<tr><td align=\"right\"><b>Customer Site:</b><td><input type=\"text\" name=\"site\" value=\"\" size=\"25\"><br></td></tr>";
echo "<tr><td align=\"right\"><b>Modem #:</b><td><input type=\"text\" name=\"modem\" value=\"\" size=\"25\"><br></td></tr>";
echo "<tr><td align=\"right\"><b>Task Name:</b><td><input type=\"text\" name=\"title\" value=\"\" size=\"25\"><br></td></tr>";
echo "<tr><td align=\"right\"><b>Description:</b><td><textarea name=\"description\" cols=\"25\" rows=\"5\"></textarea><br></td></tr>";
echo "<tr><td align=\"right\"><b>Assignee:</b></td><td><select name=\"personnel\">";
echo "<option value=\"\"></option>";
include 'includes/personnel.php';
echo "</select></td></tr>";
echo "<tr><td align=\"right\"><b>Caller's Name:</b><td><input type=\"text\" name=\"caller\" value=\"\" size=\"25\"><br></td></tr>";
echo "<tr><td align=\"right\"><input type=\"submit\" value=\"Submit Task\"></td></tr>";
echo "<tr><td align=\"center\" colspan=\"2\">";
echo "</form></td></tr></table>";
echo "</td>";
echo "<td bgcolor=\"#F2F2F2\" valign=\"top\"><br>";
echo "<table width=\"70%\" cellpadding=\"3\" cellspacing=\"0\" align=\"center\" class=\"black\" border=\"0\">";
$sql = "SELECT * FROM $taskstable WHERE taskid = '$taskid' GROUP BY open_date";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
echo "<form name=\"form2\" method=\"post\" onSubmit=\"return (formCheck(this))\" action=\"complete.php?getid=112\">";
echo "<tr><td align=\"right\" colspan=\"2\"><b>Add:</b> <input type=\"text\" name=\"catname\" value=\"\" size=\"20\"> <input type=\"submit\" value=\"Add Customer\"></td></tr></form>";
echo "<form name=\"form2\" method=\"post\" action=\"complete.php?getid=56\"><tr><td align=\"right\" colspan=\"2\"><br> <b>Delete:</b>
<select name=\"catnamedel\"><option value=\"\"></option>";
include 'includes/catecon.php';
echo "</select> <input type=\"submit\" value=\"Delete Customer\"></td>";
echo "</tr></form>";
echo "</table>";
echo "</td>";
echo "</tr><table>";
echo "<br><br></td>";
echo "</tr>";
echo "</table>";
}
/*include 'footer.php';*/
?> |
Partager