Location: PHPKode > projects > PHP Project Manager > includes/header.php
<?php
require "password.php";
require "scripts/functions.php";
// initialisation process
if(isset($_GET['id']))
$project_id=$_GET['id'];
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Project Manager</title>
<link rel="stylesheet" type="text/css" href="undohtml.css" />
<link rel="stylesheet" type="text/css" href="css/project.css" />
<script type="text/javascript" src="scripts/project_scripts.js"></script>
</head>
<body>
<!-- MAIN CONTENT AREA -->
<div id="contentarea">

<div id="header">
<a href="index.php"><img src="images/project_logo.gif" /></a>
</div>
<?php
if(isset($_SESSION['error']))
{
echo "<p style=\"font-weight:bold;text-align:center;color:red;background-color:white;\">".$_SESSION['error']."</p>";
$_SESSION['error']="";
}
?>
<?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'];
	$_SESSION['date_fmt']=$date_format;
	$finance=$row['finance_manager'];	
	$testing=$row['test_manager'];	
	$clients=$row['client_manager'];
	$color=$row['color_scheme'];	
}
?>
<!-- OPTIONS -->
<ul id="nav">
	<li>Main
		<ul>
			<li><a href="news.php">News</a></li>
			<li><a href="index.php">Tasks</a></li>
			<li><a href="showprojects.php">Projects</a></li>
		</ul>
	</li>
	<li>Tasks
		<ul>
			<li><a href="addnewtask.php">Create New Task</a></li>
			<li><a href="index.php">View Tasks</a></li>
		</ul>
	</li>

	<li>Projects
		<ul>
			<li><a href="addnewproject.php">Create New Project</a></li>
			<li><a href="showprojects.php">View Projects</a></li>
			<li><a href="archives.php">View Archives</a></li>
			<li>-------------------------</li>

					<?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."projects ORDER BY project_name;";

	// 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++) 
	{
	// Don't Show Archived or Suspended Projects
	if (($row['Project_Status']!="Archive")&($row['Project_Status']!="Suspended"))
	echo "\n<li><a href=\"viewproject.php?id=" . stripslashes($row['project_name']) . "\">".substr(stripslashes($row['project_name']),0,15	)."</a></li>";
	}
	// close database connection
	mysql_close($connection);
?>	

			
		</ul>
	</li>

	<li>
	<?php
	if($clients=="on")
	{
	?>	
	Clients
		<ul>
			<li><a href="addnewclient.php">Add New Client</a></li>
			<li><a href="showclients.php">View Clients</a></li>
		</ul>
	<?php
	}
	else echo "&nbsp;"
	?>
	</li>

	<li>
	<?php
	if($testing=="on")
	{
	?>	
	Testing
		<ul>
			<li><a href="maintest.php">Create New Test</a></li>
			<li><a href="maintest.php">Run New Test</a></li>
			<li><a href="testrunlist.php">View Previous Tests</a></li>

		</ul>
	<?php
	}
	else echo "&nbsp;"
	?>
	</li>

	<li>
	<?php
	if($finance=="on")
	{
	?>
	Finance
		<ul>
			<li><a href="finance.php">Accounts Manager</a></li>
		</ul>
	<?php
	}
	else echo "&nbsp;"
	?>
	</li>
	<li>Administration
		<ul>
			<li><a href="administration.php">Administration</a></li>
			<li><a href="newsmanager.php">News Manager</a></li>
		</ul>
	</li>

</ul>
<!-- END OF OPTIONS -->
Return current item: PHP Project Manager