Location: PHPKode > projects > PHP Project Manager > administration.php
<?php
include "includes/header.php";
?>
<!--- ADD NEW TASK --->
<h2>Administration Section</h2>
<form name="admin" class="input_form" method="post" action="scripts/updateadmin.php">
<fieldset>
<table>
<?php
include 'scripts/db.php';

// connect to mysql
$connection=mysql_connect($hostName,$username,$password)
or die("Unable to connect to SQL Server");
// connect to database
mysql_select_db($databaseName,$connection)
or die("Unable to select database");
	
// query
$query = "SELECT * from ".$d_ext."admin LIMIT 1;";

// run query
$result=mysql_query($query, $connection)
or die("Unable to run query on database");
// fetch results

for ($rowCounter = 0;$row = @ mysql_fetch_array($result);$rowCounter++) 
{
	$date_format=$row['date_format'];
	$finance=$row['finance_manager'];	
	$testing=$row['test_manager'];	
	$clients=$row['client_manager'];
	$color=$row['color_scheme'];	
}
?>
	<tr>
		<td class="formlabel">
		Date Format
		</td>
		<td class="forminput">
		<select name="date_format" id="date_format">
		<option value="uk"<?php if($date_format=="uk") echo " selected=\"selected\""; ?>>dd/mm/yy</option>
		<option value="us"<?php if($date_format=="us") echo " selected=\"selected\""; ?>>mm/dd/yy</option>
		</select>
		</td>
	</tr>
	<tr>
		<td class="formlabel">
		Finance Manager
		</td>
		<td class="forminput">
		<input name="finance" id="finance" type="checkbox" <?php if($finance=="on") echo "checked=\"checked\""; ?> name="finance" id="finance" />
		</td>
	</tr>
	<tr>
		<td class="formlabel">
		Test Manager
		</td>
		<td class="forminput">
		<input name="testing" id="testing" type="checkbox" <?php if($testing=="on") echo "checked=\"checked\""; ?> name="testing" id="testing" />
		</td>
	</tr>
	<tr>
		<td class="formlabel">
		Contacts Manager
		</td>
		<td class="forminput">
		<input name="clients" id="clients" type="checkbox" <?php if($clients=="on") echo "checked=\"checked\""; ?> name="clients" id="clients" /> 
		</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td class="forminput"><input type="image" src="images/button_update.gif" style="border:0;" alt="Update" /></td>
	</tr>

</table>
</fieldset>
</form>
<!---/ ADD NEW TASK --->
</div>
<!---/ MAIN CONTENT AREA --->
<?php
include "includes/footer.php";
?>
Return current item: PHP Project Manager