| <?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 | |
| *******************************************************************************/ | |
| #***************************************************************************** | |
| # | |
| # projects.php | |
| # | |
| # Author: Nathan Gervais | |
| # Date: Nov 3rd, 2006 | |
| # | |
| # Description: | |
| # This page displays the projects DB | |
| #**************************************************************************** | |
| require_once ("includes/header.php"); | |
| $query = "Select * from projects"; | |
| $result = mysql_query($query); | |
| echo mysql_error(); | |
| ?> | |
| <html> | |
| <body> | |
| <h2>Project Database Contents</h2> | |
| <table border="1" style="font-size:9pt;"> | |
| <tr> | |
| <td>Project ID</td> | |
| <td>Name</td> | |
| <td>Newsgroup URL</td> | |
| <td>Mailing List URL</td> | |
| <td>Wiki URL</td> | |
| <td>Docs URL</td> | |
| <td></td> | |
| <td></td> | |
| </tr> | |
| <? while ($dbiterator = mysql_fetch_array($result)) | |
| { | |
| $id = $dbiterator["project_id"]; | |
| $name = $dbiterator["name"]; | |
| $url_newsgroup = $dbiterator["url_newsgroup"]; | |
| $url_mailinglist = $dbiterator["url_mailinglist"]; | |
| $url_wiki = $dbiterator["url_wiki"]; | |
| $url_docs = $dbiterator["url_docs"]; | |
| ?> | |
| <tr> | |
| <td><?=$id;?></td> | |
| <td><?=$name;?></td> | |
| <td><?=$url_newsgroup;?></td> | |
| <td><?=$url_mailinglist;?></td> | |
| <td><?=$url_wiki;?></td> | |
| <td><?=$url_docs;?></td> | |
| <td><a href="edit_project.php?id=<?=$id;?>">Edit</a> | |
| <td><a href="delete_project.php?id=<?=$id;?>">Delete</a> | |
| </tr> | |
| <? | |
| } | |
| ?> | |
| </table> | |
| <br/> | |
| <h2>Add a Category</h2><br/> | |
| <form action="add_category.php" method="POST"> | |
| <table> | |
| <tr> | |
| <td>Category Shortname :</td> | |
| <td><input name="catShortName" 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 Category"/></td> | |
| </tr> | |
| </table> | |
| </form> | |
| </body> | |
| </html> | |