Location: PHPKode > projects > Helpdesk Solutions > helpdesk/scripts/admin/admin_priorities.php
<?
include($DOCUMENT_ROOT.'/helpdesk/include/database.php');
include($DOCUMENT_ROOT.'/helpdesk/include/new_user.php');

session_start();

if ($valid != "yes") {
	header("Location: /helpdesk/login.php");
	exit;
}

$head = "Configure Priorities";
$bttm_menu = " &nbsp;&nbsp;<a class=bttm_menu href='/helpdesk/scripts/main_adminmenu.php'>Main Menu</a>&nbsp;&nbsp;|
				&nbsp;&nbsp;<a class=bttm_menu href='/helpdesk/scripts/admin/admin_menu.php'>Prefs Menu</a>&nbsp;&nbsp;|
				&nbsp;&nbsp;<a class=bttm_menu href='/helpdesk/logout.php'>Log Out</a>&nbsp;&nbsp;|
";

if ($submit) {
	//Check there are no blank fields
	if ((!$lev1) || (!$lev2) || (!$lev3)) {
		$warning = "<td class=warning>** One of the fields were blank. Please ensure there is a name in each field";
	} else {
		//Update the fields with the new names
		$sql1 = "UPDATE priorities SET prio_name = '$lev1', prio_time = '$time1' WHERE prio_level = '1'";
		$sql2 = "UPDATE priorities SET prio_name = '$lev2', prio_time = '$time2' WHERE prio_level = '2'";
		$sql3 = "UPDATE priorities SET prio_name = '$lev3', prio_time = '$time3' WHERE prio_level = '3'";

		$result=mysql_query($sql1,$conn);
		$result=mysql_query($sql2,$conn);
		$result=mysql_query($sql3,$conn);
		$warning = "<td class=success>** Changes have now been saved!";
	}
}

$head = "Priority Levels";

// Get names from database

$sql = "SELECT prio_level, prio_name, prio_time FROM priorities";
$result = mysql_query($sql,$conn);

while ($row = mysql_fetch_array($result)) {
	$level = $row['prio_level'];
	$name_temp = $row['prio_name'];
	$time = $row['prio_time'];

	$table .= "<tr class=standard_2><td nowrap class=redtext>Level $level<td> - <td><input type=text name=lev$level value=\"$name_temp\" size=20 maxlength=20><td class=greentext>with an expected response time of: <td class=greentext><input type=text name=time$level value=$time size=2> hours.";
}




$bottom = "
<h1>Priority Levels Setup</h1>

This page allows you to change the names and times of different priority levels. The times below indicate your expected response time from when the call was made. The hours set here will be incorporated into the Helpdesk system.<br>
<br>
<b>Key:</b><br>
<table>
<tr class=standard><td valign=top nowrap class=redtext>Level 1<td valign=top>-<td class=bluetext>The highest priority for a request.
<tr class=standard><td valign=top nowrap class=redtext>Level 2<td valign=top>-<td class=bluetext>Medium priority for a request. 
<tr class=standard><td valign=top nowrap class=redtext>Level 3<td valign=top>-<td class=bluetext>Low priority for a request. 



</table>
<br><br>
<b>Modify level names:</b><br>
<br>
<form method=post action='$phpself'>
<table>
$table

<tr><td colspan=3><br><input type=submit name=submit value='Save Changes'>
</table>
</form>


";


include($DOCUMENT_ROOT.'/helpdesk/include/template.inc.php');
?>
Return current item: Helpdesk Solutions