topical media & game development
[]
readme
course(s)
preface
I
1
2
II
3
4
III
5
6
7
IV
8
9
10
V
11
12
afterthought(s)
appendix
reference(s)
example(s)
resource(s)
_
portal-cms-categories.php
<?php
include(<config.php>);
del =
_GET['del'];
add =
_GET['add']; if(
del) {
query = "ALTER table `content_matrix` DROP
del";
res = mysql_query(
query); if(!
res) { die('Invalid query: ' . mysql_error()); } } if(
_POST['add']) {
name =
_POST['name'];
query = "ALTER TABLE `content_matrix` ADD `
name` TINYINT( 1 ) NOT NULL";
res = mysql_query(
query); if(!
res) { die('Invalid query: ' . mysql_error()); } echo "
<meta
http-equiv=\"refresh\" content=\"0;url=categories.php\">"; } ?> <!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">
<!-- DW6 -->
<head>
<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<title>
Climate Portal Content Management System
</title>
<meta
http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link
rel="stylesheet" href="cms.css" type="text/css" />
<style
type="text/css"> <!-- .style1 {color: #FFFFFF} .style3 {color: #CCFFCC} .style5 {font-size: 24px} .style6 {color: #D4D0C8} -->
</style>
</head>
<body
bgcolor="#cccccc">
<table
width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td
width="15" nowrap="nowrap">
<img
src="file:
D|/Program%20Files/%5Bwebdesign%5D/dreamweaver%208/Dreamweaver%208/Configuration/BuiltIn/StarterPages/mm_spacer.gif" alt="" width="15" height="1" border="0" />
</td>
<td
height="74" colspan="3" class="logo" nowrap="nowrap">
<br
/>
<span
class="style1"> CLIMATE
<span
class="style3">PORTAL
</span>
<span
class="style5">CMS
</span>
</span>
</td>
<td
width="4">
</td>
<td
width="574">
</td>
</tr>
<tr
bgcolor="#ffffff">
<td
colspan="6">
</td>
</tr>
<tr
bgcolor="#a4c2c2">
<td
width="15" nowrap="nowrap">
</td>
<td
height="36" colspan="3" id="navigation" class="navText">
</a>
<span
class="style6">
ADD ITEM
</a>
EDIT ITEM
</a>
CATEGORIES
</a>
USER MANAGEMENT
</a>
</span>
RSS ADMIN
</a>
</span>
</td>
<td
width="4">
</td>
<td
width="574">
</td>
</tr>
<tr
bgcolor="#ffffff">
<td
colspan="6">
<img
src="file:
D|/Program%20Files/%5Bwebdesign%5D/dreamweaver%208/Dreamweaver%208/Configuration/BuiltIn/StarterPages/mm_spacer.gif" alt="" width="1" height="1" border="0" />
</td>
</tr>
<tr
bgcolor="#ffffff">
<td
colspan="2" valign="top" bgcolor="#a4c2c2">
</td>
<td
width="50" valign="top">
<img
src="file:
D|/Program%20Files/%5Bwebdesign%5D/dreamweaver%208/Dreamweaver%208/Configuration/BuiltIn/StarterPages/mm_spacer.gif" alt="" width="50" height="1" border="0" />
</td>
<td
width="536" valign="top">
<br
/>
<br
/>
<table
border="0" cellspacing="0" cellpadding="0" width="600">
<?php
if(!
add) { ?>
<tr>
<td
width="600" class="pageName">
<p>
Categories
</p>
</td>
</tr>
<?php
query = "SHOW COLUMNS FROM content_matrix";
res = mysql_query(
query); if (mysql_num_rows(
res) > 0) { while (
row = mysql_fetch_assoc(
res)) { ?>
<tr>
<td>
<?php
if(
row['Field'] != content_id) { echo
row['Field']; ?>
</td>
<td>
</td>
</tr>
<?php
} ?>
<?php
} } ?>
<tr>
<td>
</td>
</tr>
<tr>
<td>
Add New Category
</a>
</td>
</tr>
<?php
} else { ?>
<form
method="post" action="">
<tr>
<td>
Category name:
<input
type="text" name="name" size="30" value=""/>
</td>
</tr>
<tr>
<td>
<input
type="submit" value="Submit" name="add" />
</td>
</tr>
</form>
<?php
} ?>
</table>
</td>
<td
width="4">
</td>
<td
width="574">
</td>
</tr>
<tr>
<td
colspan="6">
<img
src="file:
D|/Program%20Files/%5Bwebdesign%5D/dreamweaver%208/Dreamweaver%208/Configuration/BuiltIn/StarterPages/mm_spacer.gif" alt="" width="1" height="1" border="0" />
</td>
</tr>
<tr>
<td
width="15">
</td>
<td
width="4">
</td>
<td
width="50">
</td>
<td
width="536">
</td>
<td
width="4">
</td>
<td
width="574">
</td>
</tr>
</table>
</body>
</html>
[]
readme
course(s)
preface
I
1
2
II
3
4
III
5
6
7
IV
8
9
10
V
11
12
afterthought(s)
appendix
reference(s)
example(s)
resource(s)
_
(C) A. Eliëns 2/9/2007
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.