Location: PHPKode > projects > Helpdesk Solutions > helpdesk/scripts/admin/admin_security.php


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

$head = "Name the Security Levels";
$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) || (!$lev4) || (!$lev5)) {
		$warning = "<td class=warning>** One of the fields is blank. Please ensure there is a name in each field";
	} else {
		//Update the fields with the new names
		$sql1 = "UPDATE permissions SET per_name = '$lev1' WHERE per_level = '1'";
		$sql2 = "UPDATE permissions SET per_name = '$lev2' WHERE per_level = '2'";
		$sql3 = "UPDATE permissions SET per_name = '$lev3' WHERE per_level = '3'";
		$sql4 = "UPDATE permissions SET per_name = '$lev4' WHERE per_level = '4'";
		$sql5 = "UPDATE permissions SET per_name = '$lev5' WHERE per_level = '5'";
		$warning = "<td class=success>** Changes have now been saved!";

$head = "Security Levels";

// Get names from database

$sql = "SELECT per_level, per_name FROM permissions";
$result = db_query2($sql,$conn);

while ($row = mysql_fetch_array($result)) {
	$level = $row['per_level'];
	$name_temp = $row['per_name'];

	$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>";

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

This allows you to change the name of each security level.<br>
<tr class=standard><td valign=top nowrap class=redtext>Level 1<td valign=top>-<td class=bluetext>Is the top security clearence. The level required to change all the site settings.
<tr class=standard><td valign=top nowrap class=redtext>Level 2<td valign=top>-<td class=bluetext>For Assistant Admins who will be able to change various settings such as adding Users, Knowledgebase management, Forum management etc.
<tr class=standard><td valign=top nowrap class=redtext>Level 3<td valign=top>-<td class=bluetext>For IT Support Personal who need to only manage their helpdesk requests.
<tr class=standard><td valign=top nowrap class=redtext>Level 4<td valign=top>-<td class=bluetext>Advanced Users - Those who will need to be allowed to add their own (departmental) documentation to the knowledgebase.
<tr class=standard><td valign=top nowrap class=redtext>Level 5<td valign=top>-<td class=bluetext>Normal Users - Those who need to add their own helpdesk requests and view knowledgebase articles.

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

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


Return current item: Helpdesk Solutions