Location: PHPKode > projects > Helpdesk Over Web > how/sysmgmt/settings.php
<?php

// Allow editing of global config settings.

// Include Configuration File
require_once ('../includes/config.inc'); 

// Connect to Database
require_once ('../includes/mysql_connect.php');

// Set the page title and include the HTML header.
$page_title = 'Helpdesk Over Web - System Settings';
include ('../includes/header.html');

// Page Content

// Retrive values from database.
$sql = "SELECT * FROM sysconfig;";
$settings = mysql_query($sql)
	   or die("Invalid query: " . mysql_error());
list($orgname, $defaultcallseverity, $helpdesktel, $helpdeskemail) = mysql_fetch_row($settings);

	echo "<H1>System Settings</H1>";
		echo "<TABLE WIDTH='600' PADDING='2' SPACING='2'>";
		echo "<form action='settingsupdate.php' method='post'>";
		echo "<TR><TD ALIGN='RIGHT'><B>Organisation Name:</B></TD><TD>&nbsp;&nbsp;<input type='text' name='orgname' value='$orgname' size='50' maxlength='48' class='textbox'></TD></TR>";
		echo "<TR><TD ALIGN='RIGHT'><B>Helpdesk Tel No:</B></TD><TD>&nbsp;&nbsp;<input type='text' name='helpdesktel' size='20' value='$helpdesktel' maxlength='18' class='textbox'></TD></TR>";
		echo "<TR><TD ALIGN='RIGHT'><B>Helpdesk Email:</B></TD><TD>&nbsp;&nbsp;<input type='text' name='helpdeskemail'  value='$helpdeskemail' size='42' class='textbox'></TD></TR>";
	echo "<TR><TD ALIGN='RIGHT'><B>Default Call Severity:</B></TD><TD>&nbsp;&nbsp;<SELECT name='defaultcallseverity'>";
	$sql = "SELECT * FROM sevcategories ORDER BY SeverityText;";
	$sevlist = mysql_query($sql)
	   or die("Invalid query: " . mysql_error());
	while($i = mysql_fetch_row($sevlist)) 
		{ 
		if($i[1] == $defaultcallseverity)
			echo "<OPTION SELECTED>$i[1]</OPTION>";
		else
			echo "<OPTION >$i[1]</OPTION>";
		}
	echo "</SELECT></TR>";
	echo "<TR><TD ALIGN='CENTER' COLSPAN='2'><input type='submit' value=' Update ' name='submit'></TD></TR>";
	echo "</TABLE></FORM>";
echo "<P>[ <A HREF='config.php'>Configuration Menu</A> ]</P>";
// Include standard HTML footer
include ('../includes/footer.html');
?>
Return current item: Helpdesk Over Web