blob: c90a9b3583b6cde51501efd60ae58688eb8dfb09 [file] [log] [blame]
<?php
/*******************************************************************************
* Copyright (c) 2006 Eclipse Foundation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Nathan Gervais (Eclipse Foundation)- initial API and implementation
*******************************************************************************/
#*****************************************************************************
#
# project_categories.php
#
# Author: Nathan Gervais
# Date: Nov 3rd, 2006
#
# Description:
# This page displays the contents of the project_categories DB.
#****************************************************************************
require_once ("includes/header.php");
$query = "Select * from project_categories order by category_id";
$result = mysql_query($query);
echo mysql_error();
?>
<html>
<body>
<h2>Project_Categories Database Contents</h2>
<table border="1">
<tr>
<td>Project ID</td>
<td>Category ID</td>
<td>Short Description</td>
<td>Long Description</td>
<td></td>
<td></td>
</tr>
<? while ($dbiterator = mysql_fetch_array($result))
{
$prj_id = $dbiterator["project_id"];
$cat_id = $dbiterator["category_id"];
$shortname = $dbiterator["description"];
$long_desc = $dbiterator["long_description"];
?>
<tr>
<td><?=$prj_id;?></td>
<td><?=$cat_id;?></td>
<td><?=$shortname;?></td>
<td><?=$long_desc;?></td>
<td><a href="edit_prj_category.php?prj_id=<?=$prj_id;?>&cat_id=<?=$cat_id;?>">Edit</a>
<td><a href="delete_prj_category.php?prj_id=<?=$prj_id;?>&cat_id=<?=$cat_id;?>">Delete</a>
</tr>
<?
}
?>
</table>
<br/>
<h2>Add a Project Category Association</h2><br/>
<form action="add_prj_category.php" method="POST">
<table>
<tr>
<td>Project ID :</td>
<td><input name="prj_id" type="text"></td>
</tr>
<tr>
<td>Category ID :</td>
<td><input name="cat_id" type="text"></td>
</tr>
<tr>
<td>Short Description :</td>
<td><input name="shortname" type="text"></td>
</tr>
<tr>
<td>Long Description :</td>
<td>
<textarea name="description" rows="10" cols="50" wrap="off"></textarea>
</td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="submit" value="Add Project Category Association"/></td>
</tr>
</table>
</form>
</body>
</html>