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-rss_admin.php
<?php
if (isset(
_COOKIE['admin_Id'])) { } else { header('Location: index.php'); } include(<config.php>);
del =
_GET['del'];
add =
_GET['add'];
edit =
_GET['edit'];
title =
_POST['title'];
feed =
_POST['feed']; if(
_POST['update']) {
title =
_POST['title'];
url =
_POST['feed'];
id =
_POST['id'];
query = "UPDATE rss_feeds set title='
title', url='
url' where id='
id'";
ress = mysql_query(
query); if(!
ress) { die('Invalid query: ' . mysql_error()); } } if(
del) {
query2 = "DELETE from rss_feeds where id=
del";
result2 = mysql_query(
query2); if(!
result2) { die('Invalid query: ' . mysql_error()); } } if(
edit) {
query = "SELECT * FROM rss_feeds where id='
edit'";
res = mysql_query(
query);
row = mysql_fetch_array(
res); if(!
res) { die('Invalid query: ' . mysql_error()); } } if(
_POST['add']){
query = "INSERT into rss_feeds(id, title, url) values ('', '
title', '
feed')";
result = mysql_query(
query); if(!
result) { die('Invalid query: ' . mysql_error()); } } ?> <!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
/>
<?php
if(
edit) { ?>
<form
method="post" action="">
<table
border="0" cellspacing="0" cellpadding="0" width="600">
<tr>
<td
width="600" class="pageName">
<p>
Edit a RSS Feed
</p>
</td>
</tr>
<tr>
<td>
Title of feed:
<input
type="text" name="title" size="30" value="
<?php
echo
row['title']; ?>"/>
</td>
</tr>
<tr>
<td>
URL of feed:
<input
type="text" name="feed" size="30" value="
<?php
echo
row['url']; ?>"/>
</td>
</tr>
<tr>
<td>
<input
type="submit" value="Submit" name="update" />
</td>
</tr>
<input
type="hidden" value="
<?php
echo
row['id']; ?>" name="id" />
</table>
</form>
<?php
} elseif(
add) { ?>
<form
method="post" action="">
<table
border="0" cellspacing="0" cellpadding="0" width="600">
<tr>
<td
width="600" class="pageName">
<p>
Add New RSS Feed
</p>
</td>
</tr>
<tr>
<td>
Title of feed:
<input
type="text" name="title" size="30" value=""/>
</td>
</tr>
<tr>
<td>
URL of feed:
<input
type="text" name="feed" size="30" value=""/>
</td>
</tr>
<tr>
<td>
<input
type="submit" value="Submit" name="add" />
</td>
</tr>
</table>
</form>
<?php
} else { ?>
<table
border="0" cellspacing="0" cellpadding="0" width="600">
<tr>
<td
width="600" class="pageName">
<p>
RSS Feeds
</p>
</td>
</tr>
<tr>
<td>
<b>
Feedname
</b>
</td>
</tr>
<?php
include(<config.php>);
que = "SELECT * FROM `rss_feeds`";
res = mysql_query(
que); if(!
res) { die('Invalid query: ' . mysql_error()); } while(
row = mysql_fetch_array(
res)) { ?>
<tr>
<td>
<?php
echo
row['title']; ?>
</td>
<td>
</td>
</tr>
<?php
} ?>
<br
/>
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td>
Add New RSS Feed
</a>
</td>
</tr>
</table>
</td>
<?php
} ?>
<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.