Index: trunk/wb/modules/news/uninstall.php
===================================================================
--- trunk/wb/modules/news/uninstall.php	(revision 83)
+++ trunk/wb/modules/news/uninstall.php	(nonexistent)
@@ -1,38 +0,0 @@
-<?php
-
-// $Id: uninstall.php,v 1.3 2005/04/25 11:53:12 rdjurovich Exp $
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-// Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
-
-$database->query("DELETE FROM ".TABLE_PREFIX."search WHERE name = 'module' AND value = 'news'");
-$database->query("DELETE FROM ".TABLE_PREFIX."search WHERE extra = 'news'");
-$database->query("DROP TABLE ".TABLE_PREFIX."mod_news_posts");
-$database->query("DROP TABLE ".TABLE_PREFIX."mod_news_groups");
-$database->query("DROP TABLE ".TABLE_PREFIX."mod_news_comments");
-$database->query("DROP TABLE ".TABLE_PREFIX."mod_news_settings");
-require(WB_PATH.'/framework/functions.php');
-rm_full_dir(WB_PATH.PAGES_DIRECTORY.'/posts');
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/news/uninstall.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/news/save_post.php
===================================================================
--- trunk/wb/modules/news/save_post.php	(revision 83)
+++ trunk/wb/modules/news/save_post.php	(nonexistent)
@@ -1,115 +0,0 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-require('../../config.php');
-
-// Get id
-if(!isset($_POST['post_id']) OR !is_numeric($_POST['post_id'])) {
-	header("Location: ".ADMIN_URL."/pages/index.php");
-} else {
-	$id = $_POST['post_id'];
-	$post_id = $id;
-}
-
-// Include WB admin wrapper script
-$update_when_modified = true; // Tells script to update when this page was last updated
-require(WB_PATH.'/modules/admin.php');
-
-// Validate all fields
-if($admin->get_post('title') == '' AND $admin->get_post('url') == '') {
-	$admin->print_error($MESSAGE['GENERIC']['FILL_IN_ALL'], WB_URL.'/modules/news/modify_post.php?page_id='.$page_id.'&section_id='.$section_id.'&post_id='.$id);
-} else {
-	$title = $admin->add_slashes($admin->get_post('title'));
-	$short = $admin->add_slashes($admin->get_post('short'));
-	$long = $admin->add_slashes($admin->get_post('long'));
-	$commenting = $admin->get_post('commenting');
-	$active = $admin->get_post('active');
-	$old_link = $admin->get_post('link');
-	$group_id = $admin->get_post('group');
-}
-
-// Get page link URL
-$query_page = $database->query("SELECT level,link FROM ".TABLE_PREFIX."pages WHERE page_id = '$page_id'");
-$page = $query_page->fetchRow();
-$page_level = $page['level'];
-$page_link = $page['link'];
-
-// Include WB functions file
-require(WB_PATH.'/framework/functions.php');
-
-// Work-out what the link should be
-$post_link = '/posts/'.page_filename($title).$post_id;
-
-// Make sure the post link is set and exists
-// Make news post access files dir
-make_dir(WB_PATH.PAGES_DIRECTORY.'/posts/');
-if(!is_writable(WB_PATH.PAGES_DIRECTORY.'/posts/')) {
-	$admin->print_error($MESSAGE['PAGES']['CANNOT_CREATE_ACCESS_FILE']);
-} elseif($old_link != $post_link OR !file_exists(WB_PATH.PAGES_DIRECTORY.$post_link.'.php')) {
-	// We need to create a new file
-	// First, delete old file if it exists
-	if(file_exists(WB_PATH.$old_link.'.php')) {
-		unlink(WB_PATH.$old_link.'.php');
-	}
-	// Specify the filename
-	$filename = WB_PATH.PAGES_DIRECTORY.'/'.$post_link.'.php';
-	// The depth of the page directory in the directory hierarchy
-	// '/pages' is at depth 1
-	$pages_dir_depth=count(explode('/',PAGES_DIRECTORY))-1;
-	// Work-out how many ../'s we need to get to the index page
-	$index_location = '../';
-	for($i = 0; $i < $pages_dir_depth; $i++) {
-		$index_location .= '../';
-	}
-	// Write to the filename
-	$content = ''.
-'<?php
-$page_id = '.$page_id.';
-$section_id = '.$section_id.';
-$post_id = '.$post_id.';
-define("POST_ID", $post_id);
-require("'.$index_location.'config.php");
-require(WB_PATH."/index.php");
-?>';
-	$handle = fopen($filename, 'w');
-	fwrite($handle, $content);
-	fclose($handle);
-	change_mode($filename);
-}
-
-// Update row
-$database->query("UPDATE ".TABLE_PREFIX."mod_news_posts SET group_id = '$group_id', title = '$title', link = '$post_link', content_short = '$short', content_long = '$long', commenting = '$commenting', active = '$active', posted_when = '".mktime()."', posted_by = '".$admin->get_user_id()."' WHERE post_id = '$post_id'");
-
-// Check if there is a db error, otherwise say successful
-if($database->is_error()) {
-	$admin->print_error($database->get_error(), WB_URL.'/modules/news/modify_post.php?page_id='.$page_id.'&section_id='.$section_id.'&post_id='.$id);
-} else {
-	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-}
-
-// Print admin footer
-$admin->print_footer();
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/news/save_post.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/news/comment.php
===================================================================
--- trunk/wb/modules/news/comment.php	(revision 83)
+++ trunk/wb/modules/news/comment.php	(nonexistent)
@@ -1,71 +0,0 @@
-<?php
-
-// $Id: comment.php,v 1.2 2005/04/02 06:25:56 rdjurovich Exp $
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-// Include config file
-require('../../config.php');
-
-// Check if there is a post id
-if(!isset($_GET['id']) OR !is_numeric($_GET['id'])) {
-	if(!isset($_POST['post_id']) OR !is_numeric($_POST['post_id'])) {
-		header('Location: '.WB_URL.'/pages/');
-	} else {
-		$post_id = $_POST['post_id'];
-	}
-} else {
-	$post_id = $_GET['id'];
-}
-
-// Include database class
-require_once(WB_PATH.'/framework/class.database.php');
-$database = new database();
-
-// Query post for page id
-$query_post = $database->query("SELECT post_id,title,section_id,page_id FROM ".TABLE_PREFIX."mod_news_posts WHERE post_id = '$post_id'");
-if($query_post->numRows() == 0) {
-	header('Location: '.WB_URL.'/pages/');
-} else {
-	$fetch_post = $query_post->fetchRow();
-	$page_id = $fetch_post['page_id'];
-	$section_id = $fetch_post['section_id'];
-	$post_id = $fetch_post['post_id'];
-	$post_title = $fetch_post['title'];
-	define('SECTION_ID', $section_id);
-	define('POST_ID', $post_id);
-	define('POST_TITLE', $post_title);
-	// Get page details
-	$query_page = $database->query("SELECT parent,page_title,menu_title,keywords,description,visibility FROM ".TABLE_PREFIX."pages WHERE page_id = '$page_id'");
-	if($query_page->numRows() == 0) {
-		header('Location: '.WB_URL.'/pages/');
-	} else {
-		$page = $query_page->fetchRow();
-		// Required page details
-		define('PAGE_CONTENT', WB_PATH.'/modules/news/comment_page.php');
-		// Include index (wrapper) file
-		require(WB_PATH.'/index.php');
-	}
-}
-
-
-?>

Property changes on: trunk/wb/modules/news/comment.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/news/install.php
===================================================================
--- trunk/wb/modules/news/install.php	(revision 83)
+++ trunk/wb/modules/news/install.php	(nonexistent)
@@ -1,137 +0,0 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-if(defined('WB_URL')) {
-	
-	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_posts`");
-	$mod_news = 'CREATE TABLE `'.TABLE_PREFIX.'mod_news_posts` ( '
-					 . '`post_id` INT NOT NULL AUTO_INCREMENT,'
-					 . '`section_id` INT NOT NULL,'
-					 . '`page_id` INT NOT NULL,'
-					 . '`group_id` INT NOT NULL,'
-					 . '`active` INT NOT NULL,'
-					 . '`position` INT NOT NULL,'
-					 . '`title` VARCHAR(255) NOT NULL,'
-					 . '`link` TEXT NOT NULL,'
-					 . '`content_short` TEXT NOT NULL,'
-					 . '`content_long` TEXT NOT NULL,'
-					 . '`commenting` VARCHAR(7) NOT NULL,'
-		   	    . '`posted_when` INT NOT NULL ,'
-					 . '`posted_by` INT NOT NULL ,'
-					 . 'PRIMARY KEY (post_id)'
-                . ' )';
-	$database->query($mod_news);
-	
-	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_groups`");
-	$mod_news = 'CREATE TABLE `'.TABLE_PREFIX.'mod_news_groups` ( '
-					 . '`group_id` INT NOT NULL AUTO_INCREMENT,'
-					 . '`section_id` INT NOT NULL,'
-					 . '`page_id` INT NOT NULL,'
-					 . '`active` INT NOT NULL,'
-					 . '`position` INT NOT NULL,'
-					 . '`title` VARCHAR(255) NOT NULL,'
-					 . 'PRIMARY KEY (group_id)'
-                . ' )';
-	$database->query($mod_news);
-	
-	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_comments`");
-	$mod_news = 'CREATE TABLE `'.TABLE_PREFIX.'mod_news_comments` ( '
-					 . '`comment_id` INT NOT NULL AUTO_INCREMENT,'
-					 . '`section_id` INT NOT NULL,'
-					 . '`page_id` INT NOT NULL,'
-					 . '`post_id` INT NOT NULL,'
-					 . '`title` VARCHAR(255) NOT NULL,'
-					 . '`comment` TEXT NOT NULL,'
-		   	    . '`commented_when` INT NOT NULL ,'
-					 . '`commented_by` INT NOT NULL ,'
-					 . 'PRIMARY KEY (comment_id)'
-                . ' )';
-	$database->query($mod_news);
-	
-	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_settings`");
-	$mod_news = 'CREATE TABLE `'.TABLE_PREFIX.'mod_news_settings` ( '
-					 . '`section_id` INT NOT NULL,'
-					 . '`page_id` INT NOT NULL,'
-					 . '`header` TEXT NOT NULL,'
-					 . '`post_loop` TEXT NOT NULL,'
-					 . '`footer` TEXT NOT NULL,'
-					 . '`posts_per_page` INT NOT NULL,'
-					 . '`post_header` TEXT NOT NULL,'
-					 . '`post_footer` TEXT NOT NULL,'
-					 . '`comments_header` TEXT NOT NULL,'
-					 . '`comments_loop` TEXT NOT NULL,'
-					 . '`comments_footer` TEXT NOT NULL,'
-					 . '`comments_page` TEXT NOT NULL,'
-					 . '`commenting` VARCHAR(7) NOT NULL,'
-					 . '`resize` INT NOT NULL,'
-					 . 'PRIMARY KEY (section_id)'
-                . ' )';
-	$database->query($mod_news);
-		
-	// Insert info into the search table
-	// Module query info
-	$field_info = array();
-	$field_info['page_id'] = 'page_id';
-	$field_info['title'] = 'page_title';
-	$field_info['link'] = 'link';
-	$field_info['description'] = 'description';
-	$field_info['modified_when'] = 'modified_when';
-	$field_info['modified_by'] = 'modified_by';
-	$field_info = serialize($field_info);
-	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('module', 'news', '$field_info')");
-	// Query start
-	$query_start_code = "SELECT [TP]pages.page_id, [TP]pages.page_title,	[TP]pages.link, [TP]pages.description, [TP]pages.modified_when, [TP]pages.modified_by	FROM [TP]mod_news_posts, [TP]mod_news_groups, [TP]mod_news_comments, [TP]mod_news_settings, [TP]pages WHERE ";
-	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_start', '$query_start_code', 'news')");
-	// Query body
-	$query_body_code = "
-	[TP]pages.page_id = [TP]mod_news_posts.page_id AND [TP]mod_news_posts.title LIKE \'%[STRING]%\'
-	OR [TP]pages.page_id = [TP]mod_news_posts.page_id AND [TP]mod_news_posts.content_short LIKE \'%[STRING]%\'
-	OR [TP]pages.page_id = [TP]mod_news_posts.page_id AND [TP]mod_news_posts.content_long LIKE \'%[STRING]%\'
-	OR [TP]pages.page_id = [TP]mod_news_comments.page_id AND [TP]mod_news_comments.title LIKE \'%[STRING]%\'
-	OR [TP]pages.page_id = [TP]mod_news_comments.page_id AND [TP]mod_news_comments.comment LIKE \'%[STRING]%\'
-	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.header LIKE \'%[STRING]%\'
-	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.footer LIKE \'%[STRING]%\'
-	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.post_header LIKE \'%[STRING]%\'
-	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.post_footer LIKE \'%[STRING]%\'
-	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.comments_header LIKE \'%[STRING]%\'
-	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.comments_footer LIKE \'%[STRING]%\'
-	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.comments_footer LIKE \'%[STRING]%\'";
-	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_body', '$query_body_code', 'news')");
-	// Query end
-	$query_end_code = "";	
-	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_end', '$query_end_code', 'news')");
-	
-	// Insert blank row (there needs to be at least on row for the search to work)
-	$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_posts (section_id,page_id) VALUES ('0', '0')");
-	$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_groups (section_id,page_id) VALUES ('0', '0')");
-	$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_comments (section_id,page_id) VALUES ('0', '0')");
-	$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_settings (section_id,page_id) VALUES ('0', '0')");
-	
-	// Make news post access files dir
-	make_dir(WB_PATH.PAGES_DIRECTORY.'/posts/');-	
-}
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/news/install.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/news/modify_settings.php
===================================================================
--- trunk/wb/modules/news/modify_settings.php	(revision 83)
+++ trunk/wb/modules/news/modify_settings.php	(nonexistent)
@@ -1,173 +0,0 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-require('../../config.php');
-
-// Include WB admin wrapper script
-require(WB_PATH.'/modules/admin.php');
-
-// Get header and footer
-$query_content = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '$section_id'");
-$fetch_content = $query_content->fetchRow();
-
-// Set raw html <'s and >'s to be replace by friendly html code
-$raw = array('<', '>');
-$friendly = array('&lt;', '&gt;');
-
-?>
-
-<style type="text/css">
-.setting_name {
-	vertical-align: top;
-}
-</style>
-
-<form name="modify" action="<?php echo WB_URL; ?>/modules/news/save_settings.php" method="post" style="margin: 0;">
-
-<input type="hidden" name="section_id" value="<?php echo $section_id; ?>">
-<input type="hidden" name="page_id" value="<?php echo $page_id; ?>">
-
-<table cellpadding="2" cellspacing="0" border="0" width="100%">
-<tr>
-	<td class="setting_name" width="100"><?php echo $TEXT['HEADER']; ?>:</td>
-	<td class="setting_name">
-		<textarea name="header" style="width: 100%; height: 80px;"><?php echo $admin->strip_slashes_dummy($fetch_content['header']); ?></textarea>
-	</td>
-</tr>
-<tr>
-	<td class="setting_name"><?php echo $TEXT['POST'].' '.$TEXT['LOOP']; ?>:</td>
-	<td class="setting_name">
-		<textarea name="post_loop" style="width: 100%; height: 60px;"><?php echo $admin->strip_slashes_dummy($fetch_content['post_loop']); ?></textarea>
-	</td>
-</tr>
-<tr>
-	<td class="setting_name"><?php echo $TEXT['FOOTER']; ?>:</td>
-	<td class="setting_name">
-		<textarea name="footer" style="width: 100%; height: 80px;"><?php echo str_replace($raw, $friendly, $admin->strip_slashes_dummy($fetch_content['footer'])); ?></textarea>
-	</td>
-</tr>
-<tr>
-	<td class="setting_name"><?php echo $TEXT['POST_HEADER']; ?>:</td>
-	<td class="setting_name">
-		<textarea name="post_header" style="width: 100%; height: 60px;"><?php echo str_replace($raw, $friendly, $admin->strip_slashes_dummy($fetch_content['post_header'])); ?></textarea>
-	</td>
-</tr>
-<tr>
-	<td class="setting_name"><?php echo $TEXT['POST_FOOTER']; ?>:</td>
-	<td class="setting_name">
-		<textarea name="post_footer" style="width: 100%; height: 60px;"><?php echo str_replace($raw, $friendly, $admin->strip_slashes_dummy($fetch_content['post_footer'])); ?></textarea>
-	</td>
-</tr>
-<tr>
-	<td class="setting_name"><?php echo $TEXT['POSTS_PER_PAGE']; ?>:</td>
-	<td class="setting_name">
-		<select name="posts_per_page" style="width: 100%;">
-			<option value=""><?php echo $TEXT['UNLIMITED']; ?></option>
-			<?php
-			for($i = 1; $i <= 20; $i++) {
-				if($fetch_content['posts_per_page'] == ($i*5)) { $selected = ' selected'; } else { $selected = ''; }
-				echo '<option value="'.($i*5).'"'.$selected.'>'.($i*5).'</option>';
-			}
-			?>
-		</select>
-	</td>
-</tr>
-<tr>
-	<td><?php echo $TEXT['COMMENTING']; ?>:</td>
-	<td>
-		<select name="commenting" style="width: 100%;">
-			<option value="none"><?php echo $TEXT['DISABLED']; ?></option>
-			<option value="public" <?php if($fetch_content['commenting'] == 'public') { echo 'selected'; } ?>><?php echo $TEXT['PUBLIC']; ?></option>
-			<option value="private" <?php if($fetch_content['commenting'] == 'private') { echo 'selected'; } ?>><?php echo $TEXT['PRIVATE']; ?></option>
-		</select>
-	</td>
-</tr>
-<?php if(extension_loaded('gd') AND function_exists('imageCreateFromJpeg')) { /* Make's sure GD library is installed */ ?>
-<tr>
-	<td>
-		<?php echo $TEXT['RESIZE_IMAGE_TO']; ?>:
-	</td>
-	<td>
-		<select name="resize" style="width: 100%;">
-			<option value=""><?php echo $TEXT['NONE']; ?></option>
-			<?php
-			$SIZES['50'] = '50x50px';
-			$SIZES['75'] = '75x75px';
-			$SIZES['100'] = '100x100px';
-			$SIZES['125'] = '125x125px';
-			$SIZES['150'] = '150x150px';
-			foreach($SIZES AS $size => $size_name) {
-				if($fetch_content['resize'] == $size) { $selected = ' selected'; } else { $selected = ''; }
-				echo '<option value="'.$size.'"'.$selected.'>'.$size_name.'</option>';
-			}
-			?>
-		</select>
-	</td>
-</tr>
-<?php } ?>
-<tr>
-	<td class="setting_name"><?php echo $TEXT['COMMENTS'].' '.$TEXT['HEADER']; ?>:</td>
-	<td class="setting_name">
-		<textarea name="comments_header" style="width: 100%; height: 60px;"><?php echo str_replace($raw, $friendly, $admin->strip_slashes_dummy($fetch_content['comments_header'])); ?></textarea>
-	</td>
-</tr>
-<tr>
-	<td class="setting_name"><?php echo $TEXT['COMMENTS'].' '.$TEXT['LOOP']; ?>:</td>
-	<td class="setting_name">
-		<textarea name="comments_loop" style="width: 100%; height: 60px;"><?php echo str_replace($raw, $friendly, $admin->strip_slashes_dummy($fetch_content['comments_loop'])); ?></textarea>
-	</td>
-</tr>
-<tr>
-	<td class="setting_name"><?php echo $TEXT['COMMENTS'].' '.$TEXT['FOOTER']; ?>:</td>
-	<td class="setting_name">
-		<textarea name="comments_footer" style="width: 100%; height: 60px;"><?php echo str_replace($raw, $friendly, $admin->strip_slashes_dummy($fetch_content['comments_footer'])); ?></textarea>
-	</td>
-</tr>
-<tr>
-	<td class="setting_name"><?php echo $TEXT['COMMENTS'].' '.$TEXT['PAGE']; ?>:</td>
-	<td class="setting_name">
-		<textarea name="comments_page" style="width: 100%; height: 80px;"><?php echo str_replace($raw, $friendly, $admin->strip_slashes_dummy($fetch_content['comments_page'])); ?></textarea>
-	</td>
-</tr>
-</table>
-<table cellpadding="0" cellspacing="0" border="0" width="100%">
-<tr>
-	<td width="105">&nbsp;</td>
-	<td align="left">
-		<input name="save" type="submit" value="<?php echo $TEXT['SAVE'].' '.$TEXT['SETTINGS']; ?>" style="width: 200px; margin-top: 5px;"></form>
-	</td>
-	<td align="right">
-		<input type="button" value="<?php echo $TEXT['CANCEL']; ?>" onclick="javascript: window.location = '<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page_id; ?>';" style="width: 100px; margin-top: 5px;" />
-	</td>
-</tr>
-</table>
-
-
-<?php
-
-// Print admin footer
-$admin->print_footer();
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/news/modify_settings.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/news/modify_group.php
===================================================================
--- trunk/wb/modules/news/modify_group.php	(revision 83)
+++ trunk/wb/modules/news/modify_group.php	(nonexistent)
@@ -1,105 +0,0 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-require('../../config.php');
-
-// Get id
-if(!isset($_GET['group_id']) OR !is_numeric($_GET['group_id'])) {
-	header("Location: ".ADMIN_URL."/pages/index.php");
-} else {
-	$group_id = $_GET['group_id'];
-}
-
-// Include WB admin wrapper script
-require(WB_PATH.'/modules/admin.php');
-
-// Get header and footer
-$query_content = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_news_groups WHERE group_id = '$group_id'");
-$fetch_content = $query_content->fetchRow();
-
-?>
-
-<form name="modify" action="<?php echo WB_URL; ?>/modules/news/save_group.php" method="post" enctype="multipart/form-data" style="margin: 0;">
-
-<input type="hidden" name="section_id" value="<?php echo $section_id; ?>">
-<input type="hidden" name="page_id" value="<?php echo $page_id; ?>">
-<input type="hidden" name="group_id" value="<?php echo $group_id; ?>">
-
-<table cellpadding="4" cellspacing="0" border="0" width="100%">
-<tr>
-	<td width="80"><?php echo $TEXT['TITLE']; ?>:</td>
-	<td>
-		<input type="text" name="title" value="<?php echo $admin->strip_slashes_dummy(htmlspecialchars($fetch_content['title'])); ?>" style="width: 100%;" maxlength="255" />
-	</td>
-</tr>
-<tr>
-	<td><?php echo $TEXT['IMAGE']; ?>:</td>
-	<?php if(file_exists(WB_PATH.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg')) { ?>
-	<td>
-		<a href="<?php echo WB_URL.MEDIA_DIRECTORY; ?>/.news/image<?php echo $group_id; ?>.jpg" target="_blank">View</a>
-		&nbsp;
-		<input type="checkbox" name="delete_image" id="delete_image" value="true" />
-		<a href="javascript: toggle_checkbox('delete_image');">Delete</a>
-	</td>
-	<?php } else { ?>
-	<td>
-		<input type="file" name="image" />
-	</td>
-	<?php } ?>
-</tr>
-<tr>
-	<td><?php echo $TEXT['ACTIVE']; ?>:</td>
-	<td>
-		<input type="radio" name="active" id="active_true" value="1" <?php if($fetch_content['active'] == 1) { echo ' checked'; } ?> />
-		<a href="#" onclick="javascript: document.getElementById('active_true').checked = true;">
-		<?php echo $TEXT['YES']; ?>
-		</a>
-		-
-		<input type="radio" name="active" id="active_false" value="0" <?php if($fetch_content['active'] == 0) { echo ' checked'; } ?> />
-		<a href="#" onclick="javascript: document.getElementById('active_false').checked = true;">
-		<?php echo $TEXT['NO']; ?>
-		</a>
-	</td>
-</tr>
-</table>
-
-<table cellpadding="0" cellspacing="0" border="0" width="100%">
-<tr>
-	<td align="left">
-		<input name="save" type="submit" value="<?php echo $TEXT['SAVE']; ?>" style="width: 200px; margin-top: 5px;"></form>
-	</td>
-	<td align="right">
-		<input type="button" value="<?php echo $TEXT['CANCEL']; ?>" onclick="javascript: window.location = '<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page_id; ?>';" style="width: 100px; margin-top: 5px;" />
-	</td>
-</tr>
-</table>
-
-
-<?php
-
-// Print admin footer
-$admin->print_footer();
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/news/modify_group.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/news/save_settings.php
===================================================================
--- trunk/wb/modules/news/save_settings.php	(revision 83)
+++ trunk/wb/modules/news/save_settings.php	(nonexistent)
@@ -1,65 +0,0 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-require('../../config.php');
-
-// Include WB admin wrapper script
-$update_when_modified = true; // Tells script to update when this page was last updated
-require(WB_PATH.'/modules/admin.php');
-
-// This code removes any <?php tags and adds slashes
-$friendly = array('&lt;', '&gt;', '?php');
-$raw = array('<', '>', '');
-$header = $admin->add_slashes(str_replace($friendly, $raw, $_POST['header']));
-$post_loop = $admin->add_slashes(str_replace($friendly, $raw, $_POST['post_loop']));
-$footer = $admin->add_slashes(str_replace($friendly, $raw, $_POST['footer']));
-$post_header = $admin->add_slashes(str_replace($friendly, $raw, $_POST['post_header']));
-$post_footer = $admin->add_slashes(str_replace($friendly, $raw, $_POST['post_footer']));
-$comments_header = $admin->add_slashes(str_replace($friendly, $raw, $_POST['comments_header']));
-$comments_loop = $admin->add_slashes(str_replace($friendly, $raw, $_POST['comments_loop']));
-$comments_footer = $admin->add_slashes(str_replace($friendly, $raw, $_POST['comments_footer']));
-$comments_page = $admin->add_slashes(str_replace($friendly, $raw, $_POST['comments_page']));
-$commenting = $_POST['commenting'];
-$posts_per_page = $_POST['posts_per_page'];
-if(extension_loaded('gd') AND function_exists('imageCreateFromJpeg')) {
-	$resize = $_POST['resize'];
-} else {
-	$resize = '';
-}
-
-// Update settings
-$database->query("UPDATE ".TABLE_PREFIX."mod_news_settings SET header = '$header', post_loop = '$post_loop', footer = '$footer', posts_per_page = '$posts_per_page', post_header = '$post_header', post_footer = '$post_footer', comments_header = '$comments_header', comments_loop = '$comments_loop', comments_footer = '$comments_footer', comments_page = '$comments_page', commenting = '$commenting', resize = '$resize' WHERE section_id = '$section_id'");
-
-// Check if there is a db error, otherwise say successful
-if($database->is_error()) {
-	$admin->print_error($database->get_error(), ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-} else {
-	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-}
-
-// Print admin footer
-$admin->print_footer();
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/news/save_settings.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/news/modify_post.php
===================================================================
--- trunk/wb/modules/news/modify_post.php	(revision 83)
+++ trunk/wb/modules/news/modify_post.php	(nonexistent)
@@ -1,197 +0,0 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-require('../../config.php');
-
-// Get id
-if(!isset($_GET['post_id']) OR !is_numeric($_GET['post_id'])) {
-	header("Location: ".ADMIN_URL."/pages/index.php");
-} else {
-	$post_id = $_GET['post_id'];
-}
-
-// Include WB admin wrapper script
-require(WB_PATH.'/modules/admin.php');
-
-// Get header and footer
-$query_content = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_news_posts WHERE post_id = '$post_id'");
-$fetch_content = $query_content->fetchRow();
-
-if (!defined('WYSIWYG_EDITOR') OR WYSIWYG_EDITOR=="none" OR !file_exists(WB_PATH.'/modules/'.WYSIWYG_EDITOR.'/include.php')) {
-	function show_wysiwyg_editor($name,$id,$content,$width,$height) {
-		echo '<textarea name="'.$name.'" id="'.$id.'" style="width: '.$width.'; height: '.$height.';">'.$content.'</textarea>';
-	}
-} else {
-	$id_list=array("short","long");
-			require(WB_PATH.'/modules/'.WYSIWYG_EDITOR.'/include.php');
-}
-
-?>
-<form name="modify" action="<?php echo WB_URL; ?>/modules/news/save_post.php" method="post" style="margin: 0;">
-
-<input type="hidden" name="section_id" value="<?php echo $section_id; ?>">
-<input type="hidden" name="page_id" value="<?php echo $page_id; ?>">
-<input type="hidden" name="post_id" value="<?php echo $post_id; ?>">
-<input type="hidden" name="link" value="<?php echo $fetch_content['link']; ?>">
-
-<table cellpadding="4" cellspacing="0" border="0" width="100%">
-<tr>
-	<td width="80"><?php echo $TEXT['TITLE']; ?>:</td>
-	<td>
-		<input type="text" name="title" value="<?php echo $admin->strip_slashes_dummy(htmlspecialchars($fetch_content['title'])); ?>" style="width: 100%;" maxlength="255" />
-	</td>
-</tr>
-<tr>
-	<td><?php echo $TEXT['GROUP']; ?>:</td>
-	<td>
-		<select name="group" style="width: 100%;">
-			<option value="0"><?php echo $TEXT['NONE']; ?></option>
-			<?php
-			$query = $database->query("SELECT group_id,title FROM ".TABLE_PREFIX."mod_news_groups WHERE section_id = '$section_id' ORDER BY position ASC");
-			if($query->numRows() > 0) {
-				// Loop through groups
-				while($group = $query->fetchRow()) {
-					?>
-					<option value="<?php echo $group['group_id']; ?>"<?php if($fetch_content['group_id'] == $group['group_id']) { echo ' selected'; } ?>><?php echo $group['title']; ?></option>
-					<?php
-				}
-			}
-			?>
-		</select>
-	</td>
-</tr>
-<tr>
-	<td><?php echo $TEXT['COMMENTING']; ?>:</td>
-	<td>
-		<select name="commenting" style="width: 100%;">
-			<option value="none"><?php echo $TEXT['DISABLED']; ?></option>
-			<option value="public" <?php if($fetch_content['commenting'] == 'public') { echo 'selected'; } ?>><?php echo $TEXT['PUBLIC']; ?></option>
-			<option value="private" <?php if($fetch_content['commenting'] == 'private') { echo 'selected'; } ?>><?php echo $TEXT['PRIVATE']; ?></option>
-		</select>
-	</td>
-</tr>
-<tr>
-	<td><?php echo $TEXT['ACTIVE']; ?>:</td>
-	<td>
-		<input type="radio" name="active" id="active_true" value="1" <?php if($fetch_content['active'] == 1) { echo ' checked'; } ?> />
-		<a href="#" onclick="javascript: document.getElementById('active_true').checked = true;">
-		<?php echo $TEXT['YES']; ?>
-		</a>
-		&nbsp;
-		<input type="radio" name="active" id="active_false" value="0" <?php if($fetch_content['active'] == 0) { echo ' checked'; } ?> />
-		<a href="#" onclick="javascript: document.getElementById('active_false').checked = true;">
-		<?php echo $TEXT['NO']; ?>
-		</a>
-	</td>
-</tr>
-<tr>
-	<td valign="top"><?php echo $TEXT['SHORT']; ?>:</td>
-	<td>
-	<?php
-	show_wysiwyg_editor("short","short",$fetch_content['content_short'],"100%","135px");
-	?>
-	</td>
-</tr>
-<tr>
-	<td valign="top"><?php echo $TEXT['LONG']; ?>:</td>
-	<td>
-	<?php
-	show_wysiwyg_editor("long","long",$fetch_content['content_long'],"100%","300px");
-	?>
-	</td>
-</tr>
-</table>
-
-<table cellpadding="0" cellspacing="0" border="0" width="100%">
-<tr>
-	<td width="90">
-		&nbsp;
-	</td>
-	<td align="left">
-		<input name="save" type="submit" value="<?php echo $TEXT['SAVE']; ?>" style="width: 200px; margin-top: 5px;"></form>
-	</td>
-	<td align="right">
-		<input type="button" value="<?php echo $TEXT['CANCEL']; ?>" onclick="javascript: window.location = '<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page_id; ?>';" style="width: 100px; margin-top: 5px;" />
-	</td>
-</tr>
-</table>
-
-<br />
-
-<h2><?php echo $TEXT['MODIFY'].'/'.$TEXT['DELETE'].' '.$TEXT['COMMENT']; ?></h2>
-
-<?php
-
-// Loop through existing posts
-$query_comments = $database->query("SELECT * FROM `".TABLE_PREFIX."mod_news_comments` WHERE section_id = '$section_id' AND post_id = '$post_id' ORDER BY commented_when DESC");
-if($query_comments->numRows() > 0) {
-	$row = 'a';
-	?>
-	<table cellpadding="2" cellspacing="0" border="0" width="100%">
-	<?php
-	while($comment = $query_comments->fetchRow()) {
-		?>
-		<tr class="row_<?php echo $row; ?>" height="20">
-			<td width="20" style="padding-left: 5px;">
-				<a href="<?php echo WB_URL; ?>/modules/news/modify_comment.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&comment_id=<?php echo $comment['comment_id']; ?>" title="<?php echo $TEXT['MODIFY']; ?>">
-					<img src="<?php echo ADMIN_URL; ?>/images/modify_16.png" border="0" alt="^" />
-				</a>
-			</td>	
-			<td>
-				<a href="<?php echo WB_URL; ?>/modules/news/modify_comment.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&comment_id=<?php echo $comment['comment_id']; ?>">
-					<?php echo $comment['title']; ?>
-				</a>
-			</td>
-			<td width="20">
-				<a href="javascript: confirm_link('<?php echo $TEXT['ARE_YOU_SURE']; ?>', '<?php echo WB_URL; ?>/modules/news/delete_comment.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&post_id=<?php echo $post_id; ?>&comment_id=<?php echo $comment['comment_id']; ?>');" title="<?php echo $TEXT['DELETE']; ?>">
-					<img src="<?php echo ADMIN_URL; ?>/images/delete_16.png" border="0" alt="X" />
-				</a>
-			</td>
-		</tr>
-		<?php
-		// Alternate row color
-		if($row == 'a') {
-			$row = 'b';
-		} else {
-			$row = 'a';
-		}
-	}
-	?>
-	</table>
-	<?php
-} else {
-	echo $TEXT['NONE_FOUND'];
-}
-
-?>
-
-
-
-<?php
-
-// Print admin footer
-$admin->print_footer();
-
-?>

Property changes on: trunk/wb/modules/news/modify_post.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/news/move_up.php
===================================================================
--- trunk/wb/modules/news/move_up.php	(revision 83)
+++ trunk/wb/modules/news/move_up.php	(nonexistent)
@@ -1,60 +0,0 @@
-<?php
-
-// $Id: move_up.php,v 1.1.1.1 2005/01/30 10:32:20 rdjurovich Exp $
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-require('../../config.php');
-
-// Get id
-if(!isset($_GET['post_id']) OR !is_numeric($_GET['post_id'])) {
-	if(!isset($_GET['group_id']) OR !is_numeric($_GET['group_id'])) {
-		header("Location: index.php");
-	} else {
-		$id = $_GET['group_id'];
-		$id_field = 'group_id';
-		$table = TABLE_PREFIX.'mod_news_groups';
-	}
-} else {
-	$id = $_GET['post_id'];
-	$id_field = 'post_id';
-	$table = TABLE_PREFIX.'mod_news_posts';
-}
-
-// Include WB admin wrapper script
-require(WB_PATH.'/modules/admin.php');
-
-// Include the ordering class
-require(WB_PATH.'/framework/class.order.php');
-
-// Create new order object an reorder
-$order = new order($table, 'position', $id_field, 'section_id');
-if($order->move_up($id)) {
-	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-} else {
-	$admin->print_error($TEXT['ERROR'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-}
-
-// Print admin footer
-$admin->print_footer();
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/news/move_up.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/news/add_group.php
===================================================================
--- trunk/wb/modules/news/add_group.php	(revision 83)
+++ trunk/wb/modules/news/add_group.php	(nonexistent)
@@ -1,53 +0,0 @@
-<?php
-
-// $Id: add_group.php,v 1.1.1.1 2005/01/30 10:32:22 rdjurovich Exp $
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-require('../../config.php');
-
-// Include WB admin wrapper script
-require(WB_PATH.'/modules/admin.php');
-
-// Include the ordering class
-require(WB_PATH.'/framework/class.order.php');
-// Get new order
-$order = new order(TABLE_PREFIX.'mod_news_groups', 'position', 'group_id', 'section_id');
-$position = $order->get_new($section_id);
-
-// Insert new row into database
-$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_groups (section_id,page_id,position,active) VALUES ('$section_id','$page_id','$position','1')");
-
-// Get the id
-$group_id = $database->get_one("SELECT LAST_INSERT_ID()");
-
-// Say that a new record has been added, then redirect to modify page
-if($database->is_error()) {
-	$admin->print_error($database->get_error(), WB_URL.'/modules/news/modify_group.php?page_id='.$page_id.'&section_id='.$section_id.'&group_id='.$group_id);
-} else {
-	$admin->print_success($TEXT['SUCCESS'], WB_URL.'/modules/news/modify_group.php?page_id='.$page_id.'&section_id='.$section_id.'&group_id='.$group_id);
-}
-
-// Print admin footer
-$admin->print_footer();
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/news/add_group.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/news/view.php
===================================================================
--- trunk/wb/modules/news/view.php	(revision 83)
+++ trunk/wb/modules/news/view.php	(nonexistent)
@@ -1,323 +0,0 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-// Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
-
-// Check if there is a start point defined
-if(isset($_GET['p']) AND is_numeric($_GET['p']) AND $_GET['p'] >= 0) {
-	$position = $_GET['p'];
-} else {
-	$position = 0;
-}
-
-// Get user's username, display name, email, and id - needed for insertion into post info
-$users = array();
-$query_users = $database->query("SELECT user_id,username,display_name,email FROM ".TABLE_PREFIX."users");
-if($query_users->numRows() > 0) {
-	while($user = $query_users->fetchRow()) {
-		// Insert user info into users array
-		$user_id = $user['user_id'];
-		$users[$user_id]['username'] = $user['username'];
-		$users[$user_id]['display_name'] = $user['display_name'];
-		$users[$user_id]['email'] = $user['email'];
-	}
-}
-
-// Get groups (title, if they are active, and their image [if one has been uploaded])
-$groups[0]['title'] = '';
-$groups[0]['active'] = true;
-$groups[0]['image'] = '';
-$query_users = $database->query("SELECT group_id,title,active FROM ".TABLE_PREFIX."mod_news_groups WHERE section_id = '$section_id' ORDER BY position ASC");
-if($query_users->numRows() > 0) {
-	while($group = $query_users->fetchRow()) {
-		// Insert user info into users array
-		$group_id = $group['group_id'];
-		$groups[$group_id]['title'] = $this->strip_slashes_dummy($group['title']);
-		$groups[$group_id]['active'] = $group['active'];
-		if(file_exists(WB_PATH.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg')) {
-			$groups[$group_id]['image'] = WB_URL.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg';
-		} else {
-			$groups[$group_id]['image'] = '';
-		}
-	}
-}
-
-// Check if we should show the main page or a post itself
-if(!defined('POST_ID') OR !is_numeric(POST_ID)) {
-	
-	// Check if we should only list posts from a certain group
-	if(isset($_GET['g']) AND is_numeric($_GET['g'])) {
-		$query_extra = " AND group_id = '".$_GET['g']."'";
-		?>
-		<style type="text/css">.selected_group_title { font-size: 14px; text-align: center; }</style>
-		<?php
-	} else {
-		$query_extra = '';
-	}
-	
-	// Get settings
-	$query_settings = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '$section_id'");
-	if($query_settings->numRows() > 0) {
-		$fetch_settings = $query_settings->fetchRow();
-		$setting_header = $this->strip_slashes_dummy($fetch_settings['header']);
-		$setting_post_loop = $this->strip_slashes_dummy($fetch_settings['post_loop']);
-		$setting_footer = $this->strip_slashes_dummy($fetch_settings['footer']);
-		$setting_posts_per_page = $fetch_settings['posts_per_page'];
-	} else {
-		$setting_header = '';
-		$setting_post_loop = '';
-		$setting_footer = '';
-		$setting_posts_per_page = '';
-	}
-	
-	// Get total number of posts
-	$query_total_num = $database->query("SELECT post_id FROM ".TABLE_PREFIX."mod_news_posts WHERE section_id = '$section_id' AND active = '1' AND title != ''$query_extra");
-	$total_num = $query_total_num->numRows();
-
-	// Work-out if we need to add limit code to sql
-	if($setting_posts_per_page != 0) {
-		$limit_sql = " LIMIT $position,$setting_posts_per_page";
-	} else {
-		$limit_sql = "";
-	}
-	
-	// Query posts (for this page)
-	$query_posts = $database->query("SELECT group_id,post_id,title,link,content_short,posted_by,posted_when FROM ".TABLE_PREFIX."mod_news_posts WHERE section_id = '$section_id' AND active = '1' AND title != ''$query_extra ORDER BY position DESC".$limit_sql);
-	$num_posts = $query_posts->numRows();
-	
-	// Create previous and next links
-	if($setting_posts_per_page != 0) {
-		if($position > 0) {
-			if(isset($_GET['g']) AND is_numeric($_GET['g'])) {
-				$pl_prepend = '<a href="?p='.($position-$setting_posts_per_page).'&g='.$_GET['g'].'"><< ';
-			} else {
-				$pl_prepend = '<a href="?p='.($position-$setting_posts_per_page).'"><< ';
-			}
-			$pl_append = '</a>';
-			$previous_link = $pl_prepend.$TEXT['PREVIOUS'].$pl_append;
-			$previous_page_link = $pl_prepend.$TEXT['PREVIOUS_PAGE'].$pl_append;
-		} else {
-			$previous_link = '';
-			$previous_page_link = '';
-		}
-		if($position+$setting_posts_per_page >= $total_num) {
-			$next_link = '';
-			$next_page_link = '';
-		} else {
-			if(isset($_GET['g']) AND is_numeric($_GET['g'])) {
-				$nl_prepend = '<a href="?p='.($position+$setting_posts_per_page).'&g='.$_GET['g'].'"> ';
-			} else {
-				$nl_prepend = '<a href="?p='.($position+$setting_posts_per_page).'"> ';
-			}
-			$nl_append = ' >></a>';
-			$next_link = $nl_prepend.$TEXT['NEXT'].$nl_append;
-			$next_page_link = $nl_prepend.$TEXT['NEXT_PAGE'].$nl_append;
-		}
-		if($position+$setting_posts_per_page > $total_num) {
-			$num_of = $position+$num_posts;
-		} else {
-			$num_of = $position+$setting_posts_per_page;
-		}
-		$out_of = ($position+1).'-'.$num_of.' '.strtolower($TEXT['OUT_OF']).' '.$total_num;
-		$of = ($position+1).'-'.$num_of.' '.strtolower($TEXT['OF']).' '.$total_num;
-		$display_previous_next_links = '';
-	} else {
-		$display_previous_next_links = 'none';
-	}
-		
-	// Print header
-	if($display_previous_next_links == 'none') {
-		echo  str_replace(array('[NEXT_PAGE_LINK]','[NEXT_LINK]','[PREVIOUS_PAGE_LINK]','[PREVIOUS_LINK]','[OUT_OF]','[OF]','[DISPLAY_PREVIOUS_NEXT_LINKS]'), array('','','','','','', $display_previous_next_links), $setting_header);
-	} else {
-		echo str_replace(array('[NEXT_PAGE_LINK]','[NEXT_LINK]','[PREVIOUS_PAGE_LINK]','[PREVIOUS_LINK]','[OUT_OF]','[OF]','[DISPLAY_PREVIOUS_NEXT_LINKS]'), array($next_page_link, $next_link, $previous_page_link, $previous_link, $out_of, $of, $display_previous_next_links), $setting_header);
-	}
-	
-	if($num_posts > 0) {
-		if($query_extra != '') {
-			?>
-			<div class="selected_group_title">
-				<?php echo '<a href="'.$_SERVER['PHP_SELF'].'">'.PAGE_TITLE.'</a> >> '.$groups[$_GET['g']]['title']; ?>
-			</div>
-			<?php
-		}
-		while($post = $query_posts->fetchRow()) {
-			if(isset($groups[$post['group_id']]['active']) AND $groups[$post['group_id']]['active'] != false) { // Make sure parent group is active
-				$uid = $post['posted_by']; // User who last modified the post
-				// Workout date and time of last modified post
-				$post_date = gmdate(DATE_FORMAT, $post['posted_when']+TIMEZONE);
-				$post_time = gmdate(TIME_FORMAT, $post['posted_when']+TIMEZONE);
-				// Work-out the post link
-				$post_link = page_link($post['link']);
-				if(isset($_GET['p']) AND $position > 0) {
-					$post_link .= '?p='.$position;
-				}
-				if(isset($_GET['g']) AND is_numeric($_GET['g'])) {
-					if(isset($_GET['p']) AND $position > 0) { $post_link .= '&'; } else { $post_link .= '?'; }
-					$post_link .= 'g='.$_GET['g'];
-				}
-				// Get group id, title, and image
-				$group_id = $post['group_id'];
-				$group_title = $groups[$group_id]['title'];
-				$group_image = $groups[$group_id]['image'];
-				if($group_image == '') { $display_image = 'none'; } else { $display_image = ''; }
-				if($group_id == 0) { $display_group = 'none'; } else { $display_group = ''; }
-				// Replace [wblink--PAGE_ID--] with real link
-				$short = $this->strip_slashes_dummy($post['content_short']);
-				$this->preprocess($short);
-				// Replace vars with values
-				$vars = array('[PAGE_TITLE]', '[GROUP_ID]', '[GROUP_TITLE]', '[GROUP_IMAGE]', '[DISPLAY_GROUP]', '[DISPLAY_IMAGE]', '[TITLE]', '[SHORT]', '[LINK]', '[DATE]', '[TIME]', '[USER_ID]', '[USERNAME]', '[DISPLAY_NAME]', '[EMAIL]', '[TEXT_READ_MORE]');
-				if(isset($users[$uid]['username']) AND $users[$uid]['username'] != '') {
-					$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $this->strip_slashes_dummy($post['title']), $short, $post_link, $post_date, $post_time, $uid, $users[$uid]['username'], $users[$uid]['display_name'], $users[$uid]['email'], $TEXT['READ_MORE']);
-				} else {
-					$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $this->strip_slashes_dummy($post['title']), $short, $post_link, $post_date, $post_time, '', '', '', '', $TEXT['READ_MORE']);
-				}
-				echo str_replace($vars, $values, $setting_post_loop);
-			}
-		}
-	}
-	
-	// Print footer
-	if($display_previous_next_links == 'none') {
-		echo  str_replace(array('[NEXT_PAGE_LINK]','[NEXT_LINK]','[PREVIOUS_PAGE_LINK]','[PREVIOUS_LINK]','[OUT_OF]','[OF]','[DISPLAY_PREVIOUS_NEXT_LINKS]'), array('','','','','','', $display_previous_next_links), $setting_footer);
-	} else {
-		echo str_replace(array('[NEXT_PAGE_LINK]','[NEXT_LINK]','[PREVIOUS_PAGE_LINK]','[PREVIOUS_LINK]','[OUT_OF]','[OF]','[DISPLAY_PREVIOUS_NEXT_LINKS]'), array($next_page_link, $next_link, $previous_page_link, $previous_link, $out_of, $of, $display_previous_next_links), $setting_footer);
-	}
-	
-} elseif(defined('POST_ID') AND is_numeric(POST_ID)) {
-	
-	// Get settings
-	$query_settings = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '$section_id'");
-	if($query_settings->numRows() > 0) {
-		$fetch_settings = $query_settings->fetchRow();
-		$setting_post_header = $this->strip_slashes_dummy($fetch_settings['post_header']);
-		$setting_post_footer = $this->strip_slashes_dummy($fetch_settings['post_footer']);
-		$setting_comments_header = $this->strip_slashes_dummy($fetch_settings['comments_header']);
-		$setting_comments_loop = $this->strip_slashes_dummy($fetch_settings['comments_loop']);
-		$setting_comments_footer = $this->strip_slashes_dummy($fetch_settings['comments_footer']);
-	} else {
-		$setting_post_header = '';
-		$setting_post_footer = '';
-		$setting_comments_header = '';
-		$setting_comments_loop = '';
-		$setting_comments_footer = '';
-	}
-	
-	// Get page info
-	$query_page = $database->query("SELECT link FROM ".TABLE_PREFIX."pages WHERE page_id = '".PAGE_ID."'");
-	if($query_page->numRows() > 0) {
-		$page = $query_page->fetchRow();
-		$page_link = page_link($page['link']);
-		if(isset($_GET['p']) AND $position > 0) {
-			$page_link .= '?p='.$_GET['p'];
-		}
-		if(isset($_GET['g']) AND is_numeric($_GET['g'])) {
-			if(isset($_GET['p']) AND $position > 0) { $page_link .= '&'; } else { $page_link .= '?'; }
-			$page_link .= 'g='.$_GET['g'];
-		}
-	} else {
-		exit('Page not found');
-	}
-	
-	// Get post info
-	$query_post = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_news_posts WHERE post_id = '".POST_ID."' AND active = '1'");
-	if($query_post->numRows() > 0) {
-		$post = $query_post->fetchRow();
-		if(isset($groups[$post['group_id']]['active']) AND $groups[$post['group_id']]['active'] != false) { // Make sure parent group is active
-			$uid = $post['posted_by']; // User who last modified the post
-			// Workout date and time of last modified post
-			$post_date = gmdate(DATE_FORMAT, $post['posted_when']+TIMEZONE);
-			$post_time = gmdate(TIME_FORMAT, $post['posted_when']+TIMEZONE);
-			// Get group id, title, and image
-			$group_id = $post['group_id'];
-			$group_title = $groups[$group_id]['title'];
-			$group_image = $groups[$group_id]['image'];
-			if($group_image == '') { $display_image = 'none'; } else { $display_image = ''; }
-			if($group_id == 0) { $display_group = 'none'; } else { $display_group = ''; }
-			$vars = array('[PAGE_TITLE]', '[GROUP_ID]', '[GROUP_TITLE]', '[GROUP_IMAGE]', '[DISPLAY_GROUP]', '[DISPLAY_IMAGE]', '[TITLE]', '[SHORT]', '[BACK]', '[DATE]', '[TIME]', '[USER_ID]', '[USERNAME]', '[DISPLAY_NAME]', '[EMAIL]');
-			if(isset($users[$uid]['username']) AND $users[$uid]['username'] != '') {
-				$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $this->strip_slashes_dummy($post['title']), $this->strip_slashes_dummy($post['content_short']), $page_link, $post_date, $post_time, $uid, $users[$uid]['username'], $users[$uid]['display_name'], $users[$uid]['email']);
-			} else {
-				$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $this->strip_slashes_dummy($post['title']), $this->strip_slashes_dummy($post['content_short']), $page_link, $post_date, $post_time, '', '', '', '');
-			}
-			$post_long = $this->strip_slashes_dummy($post['content_long']);
-		}
-	} else {
-		header('Location: '.WB_URL.'/pages/');
-	}
-	
-	// Print post header
-	echo str_replace($vars, $values, $setting_post_header);
-	
-	// Replace [wblink--PAGE_ID--] with real link
-  	$this->preprocess($postlong);
-	// Print long
-	echo $post_long;
-	
-	// Print post footer
-	echo str_replace($vars, $values, $setting_post_footer);
-	
-	// Show comments section if we have to
-	if($post['commenting'] == 'private' AND isset($admin) AND $admin->is_authenticated() == true OR $post['commenting'] == 'public') {
-		
-		// Print comments header
-		echo str_replace('[ADD_COMMENT_URL]', WB_URL.'/modules/news/comment.php?id='.POST_ID, $setting_comments_header);
-		
-		// Query for comments
-		$query_comments = $database->query("SELECT title,comment,commented_when,commented_by FROM ".TABLE_PREFIX."mod_news_comments WHERE post_id = '".POST_ID."' ORDER BY commented_when ASC");
-		if($query_comments->numRows() > 0) {
-			while($comment = $query_comments->fetchRow()) {
-				// Display Comments without slashes, but with new-line characters
-				$comment['comment'] = nl2br($this->strip_slashes_dummy($comment['comment']));
-				$comment['title'] = $this->strip_slashes_dummy($comment['title']);
-				// Print comments loop
-				$commented_date = gmdate(DATE_FORMAT, $comment['commented_when']+TIMEZONE);
-				$commented_time = gmdate(TIME_FORMAT, $comment['commented_when']+TIMEZONE);
-				$uid = $comment['commented_by'];
-				$vars = array('[TITLE]','[COMMENT]','[DATE]','[TIME]','[USER_ID]','[USERNAME]','[DISPLAY_NAME]', '[EMAIL]');
-				if(isset($users[$uid]['username']) AND $users[$uid]['username'] != '') {
-					$values = array($this->strip_slashes_dummy($comment['title']), $this->strip_slashes_dummy($comment['comment']), $commented_date, $commented_time, $uid, $this->strip_slashes_dummy($users[$uid]['username']), $this->strip_slashes_dummy($users[$uid]['display_name']), $this->strip_slashes_dummy($users[$uid]['email']));
-				} else {
-					$values = array($this->strip_slashes_dummy($comment['title']), $this->strip_slashes_dummy($comment['comment']), $commented_date, $commented_time, '0', strtolower($TEXT['UNKNOWN']), $TEXT['UNKNOWN'], '');
-				}
-				echo str_replace($vars, $values, $setting_comments_loop);
-			}
-		} else {
-			// Say no comments found
-			if(isset($TEXT['NONE_FOUND'])) {
-				echo $TEXT['NONE_FOUND'].'<br />';
-			} else {
-				echo 'None Found<br />';
-			}
-		}
-		
-		// Print comments footer
-		echo str_replace('[ADD_COMMENT_URL]', WB_URL.'/modules/news/comment.php?id='.POST_ID, $setting_comments_footer);
-		
-	}
-		
-}
-
-?>

Property changes on: trunk/wb/modules/news/view.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/news/save_group.php
===================================================================
--- trunk/wb/modules/news/save_group.php	(revision 83)
+++ trunk/wb/modules/news/save_group.php	(nonexistent)
@@ -1,99 +0,0 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-require('../../config.php');
-
-// Get id
-if(!isset($_POST['group_id']) OR !is_numeric($_POST['group_id'])) {
-	header("Location: ".ADMIN_URL."/pages/index.php");
-} else {
-	$group_id = $_POST['group_id'];
-}
-
-// Include WB admin wrapper script
-$update_when_modified = true; // Tells script to update when this page was last updated
-require(WB_PATH.'/modules/admin.php');
-
-// Include WB functions file
-require(WB_PATH.'/framework/functions.php');
-
-// Vagroup_idate all fields
-if($admin->get_post('title') == '') {
-	$admin->print_error($MESSAGE['GENERIC']['FILL_IN_ALL'], WB_URL.'/modules/news/modify_group.php?page_id='.$page_id.'&section_id='.$section_id.'&group_id='.$group_id);
-} else {
-	$title = $admin->add_slashes($admin->get_post('title'));
-	$active = $admin->get_post('active');
-}
-
-// Update row
-$database->query("UPDATE ".TABLE_PREFIX."mod_news_groups SET title = '$title', active = '$active' WHERE group_id = '$group_id'");
-
-// Check if the user uploaded an image or wants to delete one
-if(isset($_FILES['image']['tmp_name']) AND $_FILES['image']['tmp_name'] != '') {
-	// Get real filename and set new filename
-	$filename = $_FILES['image']['name'];
-	$new_filename = WB_PATH.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg';
-	// Make sure the image is a jpg file
-	if(substr($filename, -3, 3) != 'jpg') {
-		$admin->print_error($MESSAGE['GENERIC']['FILE_TYPE'].' JPG (JPEG)');
-	} elseif(mime_content_type($_FILES['image']['tmp_name']) != 'image/jpeg' AND mime_content_type($_FILES['image']['tmp_name']) != 'image/jpg') {
-		$admin->print_error($MESSAGE['GENERIC']['FILE_TYPE'].' JPG (JPEG)');
-	}
-	// Make sure the target directory exists
-	make_dir(WB_PATH.MEDIA_DIRECTORY.'/.news');
-	// Upload image
-	move_uploaded_file($_FILES['image']['tmp_name'], $new_filename);
-	// Check if we need to create a thumb
-	$query_settings = $database->query("SELECT resize FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '$section_id'");
-	$fetch_settings = $query_settings->fetchRow();
-	$resize = $fetch_settings['resize'];
-	if($resize != 0) {
-		// Resize the image
-		$thumb_location = WB_PATH.MEDIA_DIRECTORY.'/.news/thumb'.$group_id.'.jpg';
-		if(make_thumb($new_filename, $thumb_location, $resize)) {
-			// Delete the actual image and replace with the resized version
-			unlink($new_filename);
-			rename($thumb_location, $new_filename);
-		}
-	}
-}
-if(isset($_POST['delete_image']) AND $_POST['delete_image'] != '') {
-	// Try unlinking image
-	if(file_exists(WB_PATH.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg')) {
-		unlink(WB_PATH.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg');
-	}
-}
-
-// Check if there is a db error, otherwise say successful
-if($database->is_error()) {
-	$admin->print_error($database->get_error(), WB_URL.'/modules/news/modify_group.php?page_id='.$page_id.'&section_id='.$section_id.'&group_id='.$group_id);
-} else {
-	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-}
-
-// Print admin footer
-$admin->print_footer();
-
-?>

Property changes on: trunk/wb/modules/news/save_group.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/news/save_comment.php
===================================================================
--- trunk/wb/modules/news/save_comment.php	(revision 83)
+++ trunk/wb/modules/news/save_comment.php	(nonexistent)
@@ -1,61 +0,0 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-require('../../config.php');
-
-// Get id
-if(!isset($_POST['comment_id']) OR !is_numeric($_POST['comment_id'])) {
-	header("Location: ".ADMIN_URL."/pages/index.php");
-} else {
-	$comment_id = $_POST['comment_id'];
-}
-
-// Include WB admin wrapper script
-$update_when_modified = true; // Tells script to update when this page was last updated
-require(WB_PATH.'/modules/admin.php');
-
-// Validate all fields
-if($admin->get_post('title') == '' AND $admin->get_post('comment') == '') {
-	$admin->print_error($MESSAGE['GENERIC']['FILL_IN_ALL'], WB_URL.'/modules/modify_comment.php?page_id='.$page_id.'&section_id='.$section_id.'comment_id='.$id);
-} else {
-	$title = $admin->add_slashes($admin->get_post('title'));
-	$comment = $admin->add_slashes($admin->get_post('comment'));
-	$post_id = $admin->get_post('post_id');
-}
-
-// Update row
-$database->query("UPDATE ".TABLE_PREFIX."mod_news_comments SET title = '$title', comment = '$comment' WHERE comment_id = '$comment_id'");
-
-// Check if there is a db error, otherwise say successful
-if($database->is_error()) {
-	$admin->print_error($database->get_error(), WB_URL.'/modules/news/modify_comment.php?page_id='.$page_id.'&section_id='.$section_id.'&comment_id='.$id);
-} else {
-	$admin->print_success($TEXT['SUCCESS'], WB_URL.'/modules/news/modify_post.php?page_id='.$page_id.'&section_id='.$section_id.'&post_id='.$post_id);
-}
-
-// Print admin footer
-$admin->print_footer();
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/news/save_comment.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/news/delete_group.php
===================================================================
--- trunk/wb/modules/news/delete_group.php	(revision 83)
+++ trunk/wb/modules/news/delete_group.php	(nonexistent)
@@ -1,52 +0,0 @@
-<?php
-
-// $Id: delete_group.php,v 1.1.1.1 2005/01/30 10:32:17 rdjurovich Exp $
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-require('../../config.php');
-
-// Get id
-if(!isset($_GET['group_id']) OR !is_numeric($_GET['group_id'])) {
-	header("Location: ".ADMIN_URL."/pages/index.php");
-} else {
-	$group_id = $_GET['group_id'];
-}
-
-// Include WB admin wrapper script
-$update_when_modified = true; // Tells script to update when this page was last updated
-require(WB_PATH.'/modules/admin.php');
-
-// Update row
-$database->query("DELETE FROM ".TABLE_PREFIX."mod_news_groups WHERE group_id = '$group_id'");
-
-// Check if there is a db error, otherwise say successful
-if($database->is_error()) {
-	$admin->print_error($database->get_error(), ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-} else {
-	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-}
-
-// Print admin footer
-$admin->print_footer();
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/news/delete_group.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/news/delete_post.php
===================================================================
--- trunk/wb/modules/news/delete_post.php	(revision 83)
+++ trunk/wb/modules/news/delete_post.php	(nonexistent)
@@ -1,70 +0,0 @@
-<?php
-
-// $Id: delete_post.php,v 1.1.1.1 2005/01/30 10:32:21 rdjurovich Exp $
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-require('../../config.php');
-
-// Get id
-if(!isset($_GET['post_id']) OR !is_numeric($_GET['post_id'])) {
-	header("Location: ".ADMIN_URL."/pages/index.php");
-} else {
-	$post_id = $_GET['post_id'];
-}
-
-// Include WB admin wrapper script
-$update_when_modified = true; // Tells script to update when this page was last updated
-require(WB_PATH.'/modules/admin.php');
-
-// Get post details
-$query_details = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_news_posts WHERE post_id = '$post_id'");
-if($query_details->numRows() > 0) {
-	$get_details = $query_details->fetchRow();
-} else {
-	$admin->print_error($TEXT['NOT_FOUND'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-}
-
-// Unlink post access file
-if(is_writable(WB_PATH.$get_details['link'].'.php')) {
-	unlink(WB_PATH.$get_details['link'].'.php');
-}
-
-// Delete post
-$database->query("DELETE FROM ".TABLE_PREFIX."mod_news_posts WHERE post_id = '$post_id' LIMIT 1");
-
-// Clean up ordering
-require(WB_PATH.'/framework/class.order.php');
-$order = new order(TABLE_PREFIX.'mod_news_posts', 'position', 'post_id', 'section_id');
-$order->clean($section_id); 
-
-// Check if there is a db error, otherwise say successful
-if($database->is_error()) {
-	$admin->print_error($database->get_error(), WB_URL.'/modules/modify_post.php?page_id='.$page_id.'&post_id='.$post_id);
-} else {
-	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-}
-
-// Print admin footer
-$admin->print_footer();
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/news/delete_post.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/news/rss.php
===================================================================
--- trunk/wb/modules/news/rss.php	(revision 83)
+++ trunk/wb/modules/news/rss.php	(nonexistent)
@@ -1,94 +0,0 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-// Include WB files
-require_once('../../config.php');
-require_once(WB_PATH.'/framework/class.frontend.php');
-$database = new database();
-$wb = new frontend();
-$wb->get_page_details();
-$wb->get_website_settings();
-
-// Check that GET values have been supplied
-if(isset($_GET['page_id']) AND is_numeric($_GET['page_id'])) {
-	$page_id = $_GET['page_id'];
-} else {
-	header('Location: '.WB_URL);
-}
-if(isset($_GET['group_id']) AND is_numeric($_GET['group_id'])) {
-	$group_id = $_GET['group_id'];
-}
-
-// Sending XML header
-header("Content-type: text/xml");
-
-// Header info
-// Required by CSS 2.0
-
-echo "<rss version='2.0'>";
-echo "<channel>";
-echo "<title>".PAGE_TITLE."</title>";
-echo "<link>".WB_URL."</link>";
-echo "<description>".PAGE_DESCRIPTION."</description>";
-
-// Optional header info
-echo "<language>".DEFAULT_LANGUAGE."</language>";
-echo "<copyright>".WB_URL."</copyright>";
-echo "<managingEditor>".SERVER_EMAIL."</managingEditor>";
-echo "<webMaster>".SERVER_EMAIL."</webMaster>";
-echo "<category>".WEBSITE_TITLE."</category>";
-echo "<generator>Website Baker Content Management System</generator>";
-
-// Get news items from database
-
-//Query
-if(isset($group_id)) {
-	$query = "SELECT * FROM ".TABLE_PREFIX."mod_news_posts WHERE group_id=".$group_id." AND page_id = ".$page_id." AND active=1 ORDER BY posted_when DESC";
-} else {
-	$query = "SELECT * FROM ".TABLE_PREFIX."mod_news_posts WHERE page_id=".$page_id." AND active=1 ORDER BY posted_when DESC";	
-}
-$result = $database->query($query);
-
-//Generating the news items
-while($item = $result->fetchRow($result)){
-
-    echo "<item>";
-    echo "<title>".$item["title"]."</title>";
-    // Stripping HTML Tags for text-only visibility
-    echo "<description>".strip_tags($item["content_short"])."</description>";
-    echo "<link>".WB_URL."/pages".$item["link"].PAGE_EXTENSION."</link>";
-    /* Add further (non required) information here like ie.
-    echo "<author>".$item["posted_by"]."</author>");
-    etc.
-    */
-    echo "</item>";
-
-}
-
-// Writing footer information
-echo "</channel>";
-echo "</rss>";
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/news/rss.php
___________________________________________________________________
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/news/modify.php
===================================================================
--- trunk/wb/modules/news/modify.php	(revision 83)
+++ trunk/wb/modules/news/modify.php	(nonexistent)
@@ -1,192 +0,0 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-// Must include code to stop this file being access directly
-if(!defined('WB_PATH')) { exit("Cannot access this file directly"); }
-
-?>
-<table cellpadding="0" cellspacing="0" border="0" width="100%">
-<tr>
-	<td align="left" width="33%">
-		<input type="button" value="<?php echo $TEXT['ADD'].' '.$TEXT['POST']; ?>" onclick="javascript: window.location = '<?php echo WB_URL; ?>/modules/news/add_post.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>';" style="width: 100%;" />
-	</td>
-	<td align="left" width="33%">
-		<input type="button" value="<?php echo $TEXT['ADD'].' '.$TEXT['GROUP']; ?>" onclick="javascript: window.location = '<?php echo WB_URL; ?>/modules/news/add_group.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>';" style="width: 100%;" />
-	</td>
-	<td align="right" width="33%">
-		<input type="button" value="<?php echo $TEXT['SETTINGS']; ?>" onclick="javascript: window.location = '<?php echo WB_URL; ?>/modules/news/modify_settings.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>';" style="width: 100%;" />
-	</td>
-</tr>
-</table>
-
-<br />
-
-<h2><?php echo $TEXT['MODIFY'].'/'.$TEXT['DELETE'].' '.$TEXT['POST']; ?></h2>
-
-<?php
-
-// Loop through existing posts
-$query_posts = $database->query("SELECT * FROM `".TABLE_PREFIX."mod_news_posts` WHERE section_id = '$section_id' ORDER BY position DESC");
-if($query_posts->numRows() > 0) {
-	$num_posts = $query_posts->numRows();
-	$row = 'a';
-	?>
-	<table cellpadding="2" cellspacing="0" border="0" width="100%">
-	<?php
-	while($post = $query_posts->fetchRow()) {
-		?>
-		<tr class="row_<?php echo $row; ?>" height="20">
-			<td width="20" style="padding-left: 5px;">
-				<a href="<?php echo WB_URL; ?>/modules/news/modify_post.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&post_id=<?php echo $post['post_id']; ?>" title="<?php echo $TEXT['MODIFY']; ?>">
-					<img src="<?php echo ADMIN_URL; ?>/images/modify_16.png" border="0" alt="Modify - " />
-				</a>
-			</td>
-			<td>
-				<a href="<?php echo WB_URL; ?>/modules/news/modify_post.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&post_id=<?php echo $post['post_id']; ?>">
-					<?php echo $admin->strip_slashes_dummy($post['title']); ?>
-				</a>
-			</td>
-			<td width="180">
-				<?php echo $TEXT['GROUP'].': ';
-				// Get group title
-				$query_title = $database->query("SELECT title FROM ".TABLE_PREFIX."mod_news_groups WHERE group_id = '".$post['group_id']."'");
-				if($query_title->numRows() > 0) {
-					$fetch_title = $query_title->fetchRow();
-					echo $admin->strip_slashes_dummy($fetch_title['title']);
-				} else {
-					echo $TEXT['NONE'];
-				}
-				?>
-			</td>
-			<td width="80">
-				<?php echo $TEXT['COMMENTS'].': ';
-				// Get number of comments
-				$query_title = $database->query("SELECT title FROM ".TABLE_PREFIX."mod_news_comments WHERE post_id = '".$post['post_id']."'");
-				echo $query_title->numRows();
-				?>
-			</td>
-			<td width="80">
-				<?php echo $TEXT['ACTIVE'].': '; if($post['active'] == 1) { echo $TEXT['YES']; } else { echo $TEXT['NO']; } ?>
-			</td>
-			<td width="20">
-			<?php if($post['position'] != $num_posts) { ?>
-				<a href="<?php echo WB_URL; ?>/modules/news/move_down.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&post_id=<?php echo $post['post_id']; ?>" title="<?php echo $TEXT['MOVE_UP']; ?>">
-					<img src="<?php echo ADMIN_URL; ?>/images/up_16.png" border="0" alt="^" />
-				</a>
-			<?php } ?>
-			</td>
-			<td width="20">
-			<?php if($post['position'] != 1) { ?>
-				<a href="<?php echo WB_URL; ?>/modules/news/move_up.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&post_id=<?php echo $post['post_id']; ?>" title="<?php echo $TEXT['MOVE_DOWN']; ?>">
-					<img src="<?php echo ADMIN_URL; ?>/images/down_16.png" border="0" alt="v" />
-				</a>
-			<?php } ?>
-			</td>
-			<td width="20">
-				<a href="javascript: confirm_link('<?php echo $TEXT['ARE_YOU_SURE']; ?>', '<?php echo WB_URL; ?>/modules/news/delete_post.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&post_id=<?php echo $post['post_id']; ?>');" title="<?php echo $TEXT['DELETE']; ?>">
-					<img src="<?php echo ADMIN_URL; ?>/images/delete_16.png" border="0" alt="X" />
-				</a>
-			</td>
-		</tr>
-		<?php
-		// Alternate row color
-		if($row == 'a') {
-			$row = 'b';
-		} else {
-			$row = 'a';
-		}
-	}
-	?>
-	</table>
-	<?php
-} else {
-	echo $TEXT['NONE_FOUND'];
-}
-
-?>
-
-<h2><?php echo $TEXT['MODIFY'].'/'.$TEXT['DELETE'].' '.$TEXT['GROUP']; ?></h2>
-
-<?php
-
-// Loop through existing groups
-$query_groups = $database->query("SELECT * FROM `".TABLE_PREFIX."mod_news_groups` WHERE section_id = '$section_id' ORDER BY position ASC");
-if($query_groups->numRows() > 0) {
-	$num_groups = $query_groups->numRows();
-	$row = 'a';
-	?>
-	<table cellpadding="2" cellspacing="0" border="0" width="100%">
-	<?php
-	while($group = $query_groups->fetchRow()) {
-		?>
-		<tr class="row_<?php echo $row; ?>" height="20">
-			<td width="20" style="padding-left: 5px;">
-				<a href="<?php echo WB_URL; ?>/modules/news/modify_group.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&group_id=<?php echo $group['group_id']; ?>" title="<?php echo $TEXT['MODIFY']; ?>">
-					<img src="<?php echo ADMIN_URL; ?>/images/modify_16.png" border="0" alt="Modify - " />
-				</a>
-			</td>		
-			<td>
-				<a href="<?php echo WB_URL; ?>/modules/news/modify_group.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&group_id=<?php echo $group['group_id']; ?>">
-					<?php echo $group['title']; ?>
-				</a>
-			</td>
-			<td width="80">
-				<?php echo $TEXT['ACTIVE'].': '; if($group['active'] == 1) { echo $TEXT['YES']; } else { echo $TEXT['NO']; } ?>
-			</td>
-			<td width="20">
-			<?php if($group['position'] != 1) { ?>
-				<a href="<?php echo WB_URL; ?>/modules/news/move_up.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&group_id=<?php echo $group['group_id']; ?>" title="<?php echo $TEXT['MOVE_UP']; ?>">
-					<img src="<?php echo ADMIN_URL; ?>/images/up_16.png" border="0" alt="^" />
-				</a>
-			<?php } ?>
-			</td>
-			<td width="20">
-			<?php if($group['position'] != $num_groups) { ?>
-				<a href="<?php echo WB_URL; ?>/modules/news/move_down.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&group_id=<?php echo $group['group_id']; ?>" title="<?php echo $TEXT['MOVE_DOWN']; ?>">
-					<img src="<?php echo ADMIN_URL; ?>/images/down_16.png" border="0" alt="v" />
-				</a>
-			<?php } ?>
-			</td>
-			<td width="20">
-				<a href="javascript: confirm_link('<?php echo $TEXT['ARE_YOU_SURE']; ?>', '<?php echo WB_URL; ?>/modules/news/delete_group.php?page_id=<?php echo $page_id; ?>&group_id=<?php echo $group['group_id']; ?>');" title="<?php echo $TEXT['DELETE']; ?>">
-					<img src="<?php echo ADMIN_URL; ?>/images/delete_16.png" border="0" alt="X" />
-				</a>
-			</td>
-		</tr>
-		<?php
-		// Alternate row color
-		if($row == 'a') {
-			$row = 'b';
-		} else {
-			$row = 'a';
-		}
-	}
-	?>
-	</table>
-	<?php
-} else {
-	echo $TEXT['NONE_FOUND'];
-}
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/news/modify.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/news/move_down.php
===================================================================
--- trunk/wb/modules/news/move_down.php	(revision 83)
+++ trunk/wb/modules/news/move_down.php	(nonexistent)
@@ -1,60 +0,0 @@
-<?php
-
-// $Id: move_down.php,v 1.1.1.1 2005/01/30 10:32:15 rdjurovich Exp $
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-require('../../config.php');
-
-// Get id
-if(!isset($_GET['post_id']) OR !is_numeric($_GET['post_id'])) {
-	if(!isset($_GET['group_id']) OR !is_numeric($_GET['group_id'])) {
-		header("Location: index.php");
-	} else {
-		$id = $_GET['group_id'];
-		$id_field = 'group_id';
-		$table = TABLE_PREFIX.'mod_news_groups';
-	}
-} else {
-	$id = $_GET['post_id'];
-	$id_field = 'post_id';
-	$table = TABLE_PREFIX.'mod_news_posts';
-}
-
-// Include WB admin wrapper script
-require(WB_PATH.'/modules/admin.php');
-
-// Include the ordering class
-require(WB_PATH.'/framework/class.order.php');
-
-// Create new order object an reorder
-$order = new order($table, 'position', $id_field, 'section_id');
-if($order->move_down($id)) {
-	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-} else {
-	$admin->print_error($TEXT['ERROR'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-}
-
-// Print admin footer
-$admin->print_footer();
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/news/move_down.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/news/modify_comment.php
===================================================================
--- trunk/wb/modules/news/modify_comment.php	(revision 83)
+++ trunk/wb/modules/news/modify_comment.php	(nonexistent)
@@ -1,85 +0,0 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-require('../../config.php');
-
-// Get id
-if(!isset($_GET['comment_id']) OR !is_numeric($_GET['comment_id'])) {
-	header("Location: ".ADMIN_URL."/pages/index.php");
-} else {
-	$comment_id = $_GET['comment_id'];
-}
-
-// Include WB admin wrapper script
-require(WB_PATH.'/modules/admin.php');
-
-// Get header and footer
-$query_content = $database->query("SELECT post_id,title,comment FROM ".TABLE_PREFIX."mod_news_comments WHERE comment_id = '$comment_id'");
-$fetch_content = $query_content->fetchRow();
-
-?>
-
-<form name="modify" action="<?php echo WB_URL; ?>/modules/news/save_comment.php" method="post" style="margin: 0;">
-
-<input type="hidden" name="section_id" value="<?php echo $section_id; ?>">
-<input type="hidden" name="page_id" value="<?php echo $page_id; ?>">
-<input type="hidden" name="post_id" value="<?php echo $fetch_content['post_id']; ?>">
-<input type="hidden" name="comment_id" value="<?php echo $comment_id; ?>">
-
-<table cellpadding="0" cellspacing="0" border="0" width="100%">
-<tr>
-	<td width="80"><?php echo $TEXT['TITLE']; ?>:</td>
-	<td>
-		<input type="text" name="title" value="<?php echo $admin->strip_slashes_dummy(htmlspecialchars($fetch_content['title'])); ?>" style="width: 100%;" maxlength="255" />
-	</td>
-</tr>
-<tr>
-	<td valign="top"><?php echo $TEXT['COMMENT']; ?>:</td>
-	<td>
-		<textarea name="comment" style="width: 100%; height: 150px;"><?php echo $admin->strip_slashes_dummy(htmlspecialchars($fetch_content['comment'])); ?></textarea>
-	</td>
-</tr>
-</table>
-
-<br />
-
-<table cellpadding="0" cellspacing="0" border="0" width="100%">
-<tr>
-	<td align="left">
-		<input name="save" type="submit" value="<?php echo $TEXT['SAVE']; ?>" style="width: 200px; margin-top: 5px;"></form>
-	</td>
-	<td align="right">
-		<input type="button" value="<?php echo $TEXT['CANCEL']; ?>" onclick="javascript: window.location = '<?php echo WB_URL; ?>/modules/news/modify_post.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&post_id=<?php echo $fetch_content['post_id']; ?>';" style="width: 100px; margin-top: 5px;" />
-	</td>
-</tr>
-</table>
-
-
-<?php
-
-// Print admin footer
-$admin->print_footer();
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/news/modify_comment.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/news/index.php
===================================================================
--- trunk/wb/modules/news/index.php	(revision 83)
+++ trunk/wb/modules/news/index.php	(nonexistent)
@@ -1,3 +0,0 @@
-<?php
-header("Location: ../../index.php");
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/news/index.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/news/add.php
===================================================================
--- trunk/wb/modules/news/add.php	(revision 83)
+++ trunk/wb/modules/news/add.php	(nonexistent)
@@ -1,105 +0,0 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-// Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
-
-$header = '<style type=\"text/css\">
-.post_title, .post_date { border-bottom: 1px solid #DDDDDD; }
-.post_title { font-weight: bold; font-size: 12px; color: #000000; }
-.post_date { text-align: right; font-weight: bold; }
-.post_short { text-align: justify; padding-bottom: 5px; }
-</style>
-<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">';
-$post_loop = '<tr class=\"post_top\">
-<td class=\"post_title\"><a href=\"[LINK]\">[TITLE]</a></td>
-<td class=\"post_date\">[TIME], [DATE]</td>
-</tr>
-<tr>
-<td class=\"post_short\" colspan=\"2\">
-[SHORT] 
-<a href=\"[LINK]\">[TEXT_READ_MORE]</a>
-</td>
-</tr>';
-$footer = '</table>
-<table cellpadding="0" cellspacing="0" border="0" width="100%" style="display: [DISPLAY_PREVIOUS_NEXT_LINKS]">
-<tr>
-<td width="35%" align="left">[PREVIOUS_PAGE_LINK]</td>
-<td width="30%" align="center">[OF]</td>
-<td width="35%" align="right">[NEXT_PAGE_LINK]</td>
-</tr>
-</table>';
-$post_header = $admin->add_slashes('<table cellpadding="0" cellspacing="0" border="0" width="100%">
-<tr>
-<td height="30"><h1>[TITLE]</h1></td>
-<td rowspan="3" style="display: [DISPLAY_IMAGE]"><img src="[GROUP_IMAGE]" alt="[GROUP_TITLE]" /></td>
-</tr>
-<tr>
-<td valign="top"><b>Posted by [DISPLAY_NAME] ([USERNAME]) on [DATE] at [TIME]</b></td>
-</tr>
-<tr style="display: [DISPLAY_GROUP]">
-<td valign="top"><a href="[BACK]">[PAGE_TITLE]</a> >> <a href="[BACK]?g=[GROUP_ID]">[GROUP_TITLE]</a></td>
-</tr>
-</table>
-<p style="text-align: justify;">');
-$post_footer = '</p>
-<a href=\"[BACK]\">Back</a>';
-$comments_header = $admin->add_slashes('<br /><br />
-<style type="text/css">
-.comment_title { font-weight: bold; }
-.comment_text { font-weight: bold; background-color: #FDFDFD; border-bottom: 1px solid #DDDDDD; padding-bottom: 15px; }
-.comment_title, .comment_text { border-left: 1px solid #DDDDDD; }
-.comment_info { text-align: right; border-right: 1px solid #DDDDDD; }
-.comment_title, .comment_info { border-top: 1px solid #DDDDDD; background-color: #EEEEEE; }
-</style>
-<h2>Comments</h2>
-<table cellpadding="2" cellspacing="0" border="0" width="100%">');
-$comments_loop = $admin->add_slashes('<tr>
-<td class="comment_title">[TITLE]</td>
-<td class="comment_info">By [DISPLAY_NAME] on [DATE] at [TIME]</td>
-</tr>
-<tr>
-<td colspan="2" class="comment_text">[COMMENT]</td>
-</tr>');
-$comments_footer = '</table>
-<br /><a href=\"[ADD_COMMENT_URL]\">Add Comment</a>';
-$comments_page = '<h1>Comment</h1>
-<h2>[POST_TITLE]</h2>
-<br />
-<form name=\"comment\" action=\"[ACTION_URL]\" method=\"post\">
-Title:
-<br />
-<input type=\"text\" name=\"title\" maxlength=\"255\" style=\"width: 90%;\" />
-<br /><br />
-Comment:
-<br />
-<textarea name=\"comment\" style=\"width: 90%; height: 150px;\"></textarea>
-<br /><br />
-<input type=\"submit\" name=\"submit\" value=\"Add Comment\" />';
-$commenting = 'none';
-
-$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_settings (section_id,page_id,header,post_loop,footer,post_header,post_footer,comments_header,comments_loop,comments_footer,comments_page,commenting) VALUES ('$section_id','$page_id','$header','$post_loop','$footer','$post_header','$post_footer','$comments_header','$comments_loop','$comments_footer','$comments_page','$commenting')");
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/news/add.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/news/delete.php
===================================================================
--- trunk/wb/modules/news/delete.php	(revision 83)
+++ trunk/wb/modules/news/delete.php	(nonexistent)
@@ -1,34 +0,0 @@
-<?php
-
-// $Id: delete.php,v 1.1.1.1 2005/01/30 10:32:21 rdjurovich Exp $
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-// Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
-
-$database->query("DELETE FROM ".TABLE_PREFIX."mod_news_posts WHERE section_id = '$section_id'");
-$database->query("DELETE FROM ".TABLE_PREFIX."mod_news_groups WHERE section_id = '$section_id'");
-$database->query("DELETE FROM ".TABLE_PREFIX."mod_news_comments WHERE section_id = '$section_id'");
-$database->query("DELETE FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '$section_id'");
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/news/delete.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/news/comment_page.php
===================================================================
--- trunk/wb/modules/news/comment_page.php	(revision 83)
+++ trunk/wb/modules/news/comment_page.php	(nonexistent)
@@ -1,41 +0,0 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-// Make sure page cannot be accessed directly
-if(!defined('WB_URL')) { header('Location: ../index.php'); }
-	
-// Get comments page template details from db
-$query_settings = $database->query("SELECT comments_page FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '".SECTION_ID."'");
-if($query_settings->numRows() == 0) {
-	header('Location: '.WB_URL.'/pages/');
-} else {
-	$settings = $query_settings->fetchRow();
-	// Print comments page
-	$vars = array('[POST_TITLE]', '[ACTION_URL]');
-	$values = array(POST_TITLE, WB_URL.'/modules/news/submit_comment.php?page_id='.PAGE_ID.'&section_id='.SECTION_ID.'&post_id='.POST_ID);
-	echo str_replace($vars, $values, $this->strip_slashes_dummy($settings['comments_page']));
-}
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/news/comment_page.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/news/info.php
===================================================================
--- trunk/wb/modules/news/info.php	(revision 83)
+++ trunk/wb/modules/news/info.php	(nonexistent)
@@ -1,34 +0,0 @@
-<?php
-
-// $Id: info.php,v 1.3 2005/04/08 09:58:31 rdjurovich Exp $
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-$module_directory = 'news';
-$module_name = 'News';
-$module_type = 'page';
-$module_version = '2.5';
-$module_designed_for = '2.x';
-$module_author = 'Ryan Djurovich';
-$module_description = 'This page type is designed for making a news page.';
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/news/info.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/news/add_post.php
===================================================================
--- trunk/wb/modules/news/add_post.php	(revision 83)
+++ trunk/wb/modules/news/add_post.php	(nonexistent)
@@ -1,58 +0,0 @@
-<?php
-
-// $Id: add_post.php,v 1.1.1.1 2005/01/30 10:32:19 rdjurovich Exp $
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-require('../../config.php');
-
-// Include WB admin wrapper script
-require(WB_PATH.'/modules/admin.php');
-
-// Include the ordering class
-require(WB_PATH.'/framework/class.order.php');
-// Get new order
-$order = new order(TABLE_PREFIX.'mod_news_posts', 'position', 'post_id', 'section_id');
-$position = $order->get_new($section_id);
-
-// Get default commenting
-$query_settings = $database->query("SELECT commenting FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '$section_id'");
-$fetch_settings = $query_settings->fetchRow();
-$commenting = $fetch_settings['commenting'];
-
-// Insert new row into database
-$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_posts (section_id,page_id,position,commenting,active) VALUES ('$section_id','$page_id','$position','$commenting','1')");
-
-// Get the id
-$post_id = $database->get_one("SELECT LAST_INSERT_ID()");
-
-// Say that a new record has been added, then redirect to modify page
-if($database->is_error()) {
-	$admin->print_error($database->get_error(), WB_URL.'/modules/news/modify_post.php?page_id='.$page_id.'&section_id='.$section_id.'&post_id='.$post_id);
-} else {
-	$admin->print_success($TEXT['SUCCESS'], WB_URL.'/modules/news/modify_post.php?page_id='.$page_id.'&section_id='.$section_id.'&post_id='.$post_id);
-}
-
-// Print admin footer
-$admin->print_footer();
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/news/add_post.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/news/submit_comment.php
===================================================================
--- trunk/wb/modules/news/submit_comment.php	(revision 83)
+++ trunk/wb/modules/news/submit_comment.php	(nonexistent)
@@ -1,63 +0,0 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-// Include config file
-require('../../config.php');
-
-// Include admin class
-require_once(WB_PATH.'/framework/class.admin.php');
-$admin = new admin('Start', 'start', false, false);
-
-// Include WB functions file
-if(!defined('FUNCTIONS_CLASS_LOADED')) {
-	require(WB_PATH.'/framework/functions.php');
-}
-
-// Check if we should show the form or add a comment
-if(is_numeric($_GET['page_id']) AND is_numeric($_GET['section_id']) AND isset($_GET['post_id']) AND is_numeric($_GET['post_id']) AND isset($_POST['comment']) AND $_POST['comment'] != '') {
-	
-	// Insert the comment into db
-	$page_id = $_GET['page_id'];
-	$section_id = $_GET['section_id'];
-	$post_id = $_GET['post_id'];
-	$title = $admin->add_slashes(strip_tags($_POST['title']));
-	$comment = $admin->add_slashes(strip_tags($_POST['comment']));
-	$commented_when = mktime();
-	if(isset($admin) AND $admin->is_authenticated() == true) {
-		$commented_by = $admin->get_user_id();
-	} else {
-		$commented_by = '';
-	}
-	$query = $database->query("INSERT INTO ".TABLE_PREFIX."mod_news_comments (section_id,page_id,post_id,title,comment,commented_when,commented_by) VALUES ('$section_id','$page_id','$post_id','$title','$comment','$commented_when','$commented_by')");
-	// Get page link
-	$query_page = $database->query("SELECT link FROM ".TABLE_PREFIX."mod_news_posts WHERE post_id = '$post_id'");
-	$page = $query_page->fetchRow();
-	header('Location: '.page_link($page['link']).'?id='.$post_id);
-	
-} else {
-	header('Location: '.WB_URL.'/pages/');
-}
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/news/submit_comment.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/news/delete_comment.php
===================================================================
--- trunk/wb/modules/news/delete_comment.php	(revision 83)
+++ trunk/wb/modules/news/delete_comment.php	(nonexistent)
@@ -1,59 +0,0 @@
-<?php
-
-// $Id: delete_comment.php,v 1.1.1.1 2005/01/30 10:32:20 rdjurovich Exp $
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2005, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-require('../../config.php');
-
-// Get id
-if(!isset($_GET['comment_id']) OR !is_numeric($_GET['comment_id'])) {
-	header("Location: ".ADMIN_URL."/pages/index.php");
-} else {
-	$comment_id = $_GET['comment_id'];
-}
-
-// Get post id
-if(!isset($_GET['post_id']) OR !is_numeric($_GET['post_id'])) {
-	header("Location: ".ADMIN_URL."/pages/index.php");
-} else {
-	$post_id = $_GET['post_id'];
-}
-
-// Include WB admin wrapper script
-$update_when_modified = true; // Tells script to update when this page was last updated
-require(WB_PATH.'/modules/admin.php');
-
-// Update row
-$database->query("DELETE FROM ".TABLE_PREFIX."mod_news_comments  WHERE comment_id = '$comment_id'");
-
-// Check if there is a db error, otherwise say successful
-if($database->is_error()) {
-	$admin->print_error($database->get_error(), WB_URL.'/modules/news/modify_post.php?page_id='.$page_id.'&section_id='.$section_id.'&post_id='.$post_id);
-} else {
-	$admin->print_success($TEXT['SUCCESS'], WB_URL.'/modules/news/modify_post.php?page_id='.$page_id.'&section_id='.$section_id.'&post_id='.$post_id);
-}
-
-// Print admin footer
-$admin->print_footer();
-
-?>
\ No newline at end of file

Property changes on: trunk/wb/modules/news/delete_comment.php
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: addons/modules/news/modify_post.php
===================================================================
--- addons/modules/news/modify_post.php	(nonexistent)
+++ addons/modules/news/modify_post.php	(revision 84)
@@ -0,0 +1,197 @@
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+require('../../config.php');
+
+// Get id
+if(!isset($_GET['post_id']) OR !is_numeric($_GET['post_id'])) {
+	header("Location: ".ADMIN_URL."/pages/index.php");
+} else {
+	$post_id = $_GET['post_id'];
+}
+
+// Include WB admin wrapper script
+require(WB_PATH.'/modules/admin.php');
+
+// Get header and footer
+$query_content = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_news_posts WHERE post_id = '$post_id'");
+$fetch_content = $query_content->fetchRow();
+
+if (!defined('WYSIWYG_EDITOR') OR WYSIWYG_EDITOR=="none" OR !file_exists(WB_PATH.'/modules/'.WYSIWYG_EDITOR.'/include.php')) {
+	function show_wysiwyg_editor($name,$id,$content,$width,$height) {
+		echo '<textarea name="'.$name.'" id="'.$id.'" style="width: '.$width.'; height: '.$height.';">'.$content.'</textarea>';
+	}
+} else {
+	$id_list=array("short","long");
+			require(WB_PATH.'/modules/'.WYSIWYG_EDITOR.'/include.php');
+}
+
+?>
+<form name="modify" action="<?php echo WB_URL; ?>/modules/news/save_post.php" method="post" style="margin: 0;">
+
+<input type="hidden" name="section_id" value="<?php echo $section_id; ?>">
+<input type="hidden" name="page_id" value="<?php echo $page_id; ?>">
+<input type="hidden" name="post_id" value="<?php echo $post_id; ?>">
+<input type="hidden" name="link" value="<?php echo $fetch_content['link']; ?>">
+
+<table cellpadding="4" cellspacing="0" border="0" width="100%">
+<tr>
+	<td width="80"><?php echo $TEXT['TITLE']; ?>:</td>
+	<td>
+		<input type="text" name="title" value="<?php echo $admin->strip_slashes_dummy(htmlspecialchars($fetch_content['title'])); ?>" style="width: 100%;" maxlength="255" />
+	</td>
+</tr>
+<tr>
+	<td><?php echo $TEXT['GROUP']; ?>:</td>
+	<td>
+		<select name="group" style="width: 100%;">
+			<option value="0"><?php echo $TEXT['NONE']; ?></option>
+			<?php
+			$query = $database->query("SELECT group_id,title FROM ".TABLE_PREFIX."mod_news_groups WHERE section_id = '$section_id' ORDER BY position ASC");
+			if($query->numRows() > 0) {
+				// Loop through groups
+				while($group = $query->fetchRow()) {
+					?>
+					<option value="<?php echo $group['group_id']; ?>"<?php if($fetch_content['group_id'] == $group['group_id']) { echo ' selected'; } ?>><?php echo $group['title']; ?></option>
+					<?php
+				}
+			}
+			?>
+		</select>
+	</td>
+</tr>
+<tr>
+	<td><?php echo $TEXT['COMMENTING']; ?>:</td>
+	<td>
+		<select name="commenting" style="width: 100%;">
+			<option value="none"><?php echo $TEXT['DISABLED']; ?></option>
+			<option value="public" <?php if($fetch_content['commenting'] == 'public') { echo 'selected'; } ?>><?php echo $TEXT['PUBLIC']; ?></option>
+			<option value="private" <?php if($fetch_content['commenting'] == 'private') { echo 'selected'; } ?>><?php echo $TEXT['PRIVATE']; ?></option>
+		</select>
+	</td>
+</tr>
+<tr>
+	<td><?php echo $TEXT['ACTIVE']; ?>:</td>
+	<td>
+		<input type="radio" name="active" id="active_true" value="1" <?php if($fetch_content['active'] == 1) { echo ' checked'; } ?> />
+		<a href="#" onclick="javascript: document.getElementById('active_true').checked = true;">
+		<?php echo $TEXT['YES']; ?>
+		</a>
+		&nbsp;
+		<input type="radio" name="active" id="active_false" value="0" <?php if($fetch_content['active'] == 0) { echo ' checked'; } ?> />
+		<a href="#" onclick="javascript: document.getElementById('active_false').checked = true;">
+		<?php echo $TEXT['NO']; ?>
+		</a>
+	</td>
+</tr>
+<tr>
+	<td valign="top"><?php echo $TEXT['SHORT']; ?>:</td>
+	<td>
+	<?php
+	show_wysiwyg_editor("short","short",$fetch_content['content_short'],"100%","135px");
+	?>
+	</td>
+</tr>
+<tr>
+	<td valign="top"><?php echo $TEXT['LONG']; ?>:</td>
+	<td>
+	<?php
+	show_wysiwyg_editor("long","long",$fetch_content['content_long'],"100%","300px");
+	?>
+	</td>
+</tr>
+</table>
+
+<table cellpadding="0" cellspacing="0" border="0" width="100%">
+<tr>
+	<td width="90">
+		&nbsp;
+	</td>
+	<td align="left">
+		<input name="save" type="submit" value="<?php echo $TEXT['SAVE']; ?>" style="width: 200px; margin-top: 5px;"></form>
+	</td>
+	<td align="right">
+		<input type="button" value="<?php echo $TEXT['CANCEL']; ?>" onclick="javascript: window.location = '<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page_id; ?>';" style="width: 100px; margin-top: 5px;" />
+	</td>
+</tr>
+</table>
+
+<br />
+
+<h2><?php echo $TEXT['MODIFY'].'/'.$TEXT['DELETE'].' '.$TEXT['COMMENT']; ?></h2>
+
+<?php
+
+// Loop through existing posts
+$query_comments = $database->query("SELECT * FROM `".TABLE_PREFIX."mod_news_comments` WHERE section_id = '$section_id' AND post_id = '$post_id' ORDER BY commented_when DESC");
+if($query_comments->numRows() > 0) {
+	$row = 'a';
+	?>
+	<table cellpadding="2" cellspacing="0" border="0" width="100%">
+	<?php
+	while($comment = $query_comments->fetchRow()) {
+		?>
+		<tr class="row_<?php echo $row; ?>" height="20">
+			<td width="20" style="padding-left: 5px;">
+				<a href="<?php echo WB_URL; ?>/modules/news/modify_comment.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&comment_id=<?php echo $comment['comment_id']; ?>" title="<?php echo $TEXT['MODIFY']; ?>">
+					<img src="<?php echo ADMIN_URL; ?>/images/modify_16.png" border="0" alt="^" />
+				</a>
+			</td>	
+			<td>
+				<a href="<?php echo WB_URL; ?>/modules/news/modify_comment.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&comment_id=<?php echo $comment['comment_id']; ?>">
+					<?php echo $comment['title']; ?>
+				</a>
+			</td>
+			<td width="20">
+				<a href="javascript: confirm_link('<?php echo $TEXT['ARE_YOU_SURE']; ?>', '<?php echo WB_URL; ?>/modules/news/delete_comment.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&post_id=<?php echo $post_id; ?>&comment_id=<?php echo $comment['comment_id']; ?>');" title="<?php echo $TEXT['DELETE']; ?>">
+					<img src="<?php echo ADMIN_URL; ?>/images/delete_16.png" border="0" alt="X" />
+				</a>
+			</td>
+		</tr>
+		<?php
+		// Alternate row color
+		if($row == 'a') {
+			$row = 'b';
+		} else {
+			$row = 'a';
+		}
+	}
+	?>
+	</table>
+	<?php
+} else {
+	echo $TEXT['NONE_FOUND'];
+}
+
+?>
+
+
+
+<?php
+
+// Print admin footer
+$admin->print_footer();
+
+?>

Property changes on: addons/modules/news/modify_post.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/news/save_post.php
===================================================================
--- addons/modules/news/save_post.php	(nonexistent)
+++ addons/modules/news/save_post.php	(revision 84)
@@ -0,0 +1,115 @@
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+require('../../config.php');
+
+// Get id
+if(!isset($_POST['post_id']) OR !is_numeric($_POST['post_id'])) {
+	header("Location: ".ADMIN_URL."/pages/index.php");
+} else {
+	$id = $_POST['post_id'];
+	$post_id = $id;
+}
+
+// Include WB admin wrapper script
+$update_when_modified = true; // Tells script to update when this page was last updated
+require(WB_PATH.'/modules/admin.php');
+
+// Validate all fields
+if($admin->get_post('title') == '' AND $admin->get_post('url') == '') {
+	$admin->print_error($MESSAGE['GENERIC']['FILL_IN_ALL'], WB_URL.'/modules/news/modify_post.php?page_id='.$page_id.'&section_id='.$section_id.'&post_id='.$id);
+} else {
+	$title = $admin->add_slashes($admin->get_post('title'));
+	$short = $admin->add_slashes($admin->get_post('short'));
+	$long = $admin->add_slashes($admin->get_post('long'));
+	$commenting = $admin->get_post('commenting');
+	$active = $admin->get_post('active');
+	$old_link = $admin->get_post('link');
+	$group_id = $admin->get_post('group');
+}
+
+// Get page link URL
+$query_page = $database->query("SELECT level,link FROM ".TABLE_PREFIX."pages WHERE page_id = '$page_id'");
+$page = $query_page->fetchRow();
+$page_level = $page['level'];
+$page_link = $page['link'];
+
+// Include WB functions file
+require(WB_PATH.'/framework/functions.php');
+
+// Work-out what the link should be
+$post_link = '/posts/'.page_filename($title).$post_id;
+
+// Make sure the post link is set and exists
+// Make news post access files dir
+make_dir(WB_PATH.PAGES_DIRECTORY.'/posts/');
+if(!is_writable(WB_PATH.PAGES_DIRECTORY.'/posts/')) {
+	$admin->print_error($MESSAGE['PAGES']['CANNOT_CREATE_ACCESS_FILE']);
+} elseif($old_link != $post_link OR !file_exists(WB_PATH.PAGES_DIRECTORY.$post_link.'.php')) {
+	// We need to create a new file
+	// First, delete old file if it exists
+	if(file_exists(WB_PATH.$old_link.'.php')) {
+		unlink(WB_PATH.$old_link.'.php');
+	}
+	// Specify the filename
+	$filename = WB_PATH.PAGES_DIRECTORY.'/'.$post_link.'.php';
+	// The depth of the page directory in the directory hierarchy
+	// '/pages' is at depth 1
+	$pages_dir_depth=count(explode('/',PAGES_DIRECTORY))-1;
+	// Work-out how many ../'s we need to get to the index page
+	$index_location = '../';
+	for($i = 0; $i < $pages_dir_depth; $i++) {
+		$index_location .= '../';
+	}
+	// Write to the filename
+	$content = ''.
+'<?php
+$page_id = '.$page_id.';
+$section_id = '.$section_id.';
+$post_id = '.$post_id.';
+define("POST_ID", $post_id);
+require("'.$index_location.'config.php");
+require(WB_PATH."/index.php");
+?>';
+	$handle = fopen($filename, 'w');
+	fwrite($handle, $content);
+	fclose($handle);
+	change_mode($filename);
+}
+
+// Update row
+$database->query("UPDATE ".TABLE_PREFIX."mod_news_posts SET group_id = '$group_id', title = '$title', link = '$post_link', content_short = '$short', content_long = '$long', commenting = '$commenting', active = '$active', posted_when = '".mktime()."', posted_by = '".$admin->get_user_id()."' WHERE post_id = '$post_id'");
+
+// Check if there is a db error, otherwise say successful
+if($database->is_error()) {
+	$admin->print_error($database->get_error(), WB_URL.'/modules/news/modify_post.php?page_id='.$page_id.'&section_id='.$section_id.'&post_id='.$id);
+} else {
+	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+}
+
+// Print admin footer
+$admin->print_footer();
+
+?>
\ No newline at end of file

Property changes on: addons/modules/news/save_post.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/news/install.php
===================================================================
--- addons/modules/news/install.php	(nonexistent)
+++ addons/modules/news/install.php	(revision 84)
@@ -0,0 +1,137 @@
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+if(defined('WB_URL')) {
+	
+	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_posts`");
+	$mod_news = 'CREATE TABLE `'.TABLE_PREFIX.'mod_news_posts` ( '
+					 . '`post_id` INT NOT NULL AUTO_INCREMENT,'
+					 . '`section_id` INT NOT NULL,'
+					 . '`page_id` INT NOT NULL,'
+					 . '`group_id` INT NOT NULL,'
+					 . '`active` INT NOT NULL,'
+					 . '`position` INT NOT NULL,'
+					 . '`title` VARCHAR(255) NOT NULL,'
+					 . '`link` TEXT NOT NULL,'
+					 . '`content_short` TEXT NOT NULL,'
+					 . '`content_long` TEXT NOT NULL,'
+					 . '`commenting` VARCHAR(7) NOT NULL,'
+		   	    . '`posted_when` INT NOT NULL ,'
+					 . '`posted_by` INT NOT NULL ,'
+					 . 'PRIMARY KEY (post_id)'
+                . ' )';
+	$database->query($mod_news);
+	
+	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_groups`");
+	$mod_news = 'CREATE TABLE `'.TABLE_PREFIX.'mod_news_groups` ( '
+					 . '`group_id` INT NOT NULL AUTO_INCREMENT,'
+					 . '`section_id` INT NOT NULL,'
+					 . '`page_id` INT NOT NULL,'
+					 . '`active` INT NOT NULL,'
+					 . '`position` INT NOT NULL,'
+					 . '`title` VARCHAR(255) NOT NULL,'
+					 . 'PRIMARY KEY (group_id)'
+                . ' )';
+	$database->query($mod_news);
+	
+	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_comments`");
+	$mod_news = 'CREATE TABLE `'.TABLE_PREFIX.'mod_news_comments` ( '
+					 . '`comment_id` INT NOT NULL AUTO_INCREMENT,'
+					 . '`section_id` INT NOT NULL,'
+					 . '`page_id` INT NOT NULL,'
+					 . '`post_id` INT NOT NULL,'
+					 . '`title` VARCHAR(255) NOT NULL,'
+					 . '`comment` TEXT NOT NULL,'
+		   	    . '`commented_when` INT NOT NULL ,'
+					 . '`commented_by` INT NOT NULL ,'
+					 . 'PRIMARY KEY (comment_id)'
+                . ' )';
+	$database->query($mod_news);
+	
+	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_settings`");
+	$mod_news = 'CREATE TABLE `'.TABLE_PREFIX.'mod_news_settings` ( '
+					 . '`section_id` INT NOT NULL,'
+					 . '`page_id` INT NOT NULL,'
+					 . '`header` TEXT NOT NULL,'
+					 . '`post_loop` TEXT NOT NULL,'
+					 . '`footer` TEXT NOT NULL,'
+					 . '`posts_per_page` INT NOT NULL,'
+					 . '`post_header` TEXT NOT NULL,'
+					 . '`post_footer` TEXT NOT NULL,'
+					 . '`comments_header` TEXT NOT NULL,'
+					 . '`comments_loop` TEXT NOT NULL,'
+					 . '`comments_footer` TEXT NOT NULL,'
+					 . '`comments_page` TEXT NOT NULL,'
+					 . '`commenting` VARCHAR(7) NOT NULL,'
+					 . '`resize` INT NOT NULL,'
+					 . 'PRIMARY KEY (section_id)'
+                . ' )';
+	$database->query($mod_news);
+		
+	// Insert info into the search table
+	// Module query info
+	$field_info = array();
+	$field_info['page_id'] = 'page_id';
+	$field_info['title'] = 'page_title';
+	$field_info['link'] = 'link';
+	$field_info['description'] = 'description';
+	$field_info['modified_when'] = 'modified_when';
+	$field_info['modified_by'] = 'modified_by';
+	$field_info = serialize($field_info);
+	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('module', 'news', '$field_info')");
+	// Query start
+	$query_start_code = "SELECT [TP]pages.page_id, [TP]pages.page_title,	[TP]pages.link, [TP]pages.description, [TP]pages.modified_when, [TP]pages.modified_by	FROM [TP]mod_news_posts, [TP]mod_news_groups, [TP]mod_news_comments, [TP]mod_news_settings, [TP]pages WHERE ";
+	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_start', '$query_start_code', 'news')");
+	// Query body
+	$query_body_code = "
+	[TP]pages.page_id = [TP]mod_news_posts.page_id AND [TP]mod_news_posts.title LIKE \'%[STRING]%\'
+	OR [TP]pages.page_id = [TP]mod_news_posts.page_id AND [TP]mod_news_posts.content_short LIKE \'%[STRING]%\'
+	OR [TP]pages.page_id = [TP]mod_news_posts.page_id AND [TP]mod_news_posts.content_long LIKE \'%[STRING]%\'
+	OR [TP]pages.page_id = [TP]mod_news_comments.page_id AND [TP]mod_news_comments.title LIKE \'%[STRING]%\'
+	OR [TP]pages.page_id = [TP]mod_news_comments.page_id AND [TP]mod_news_comments.comment LIKE \'%[STRING]%\'
+	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.header LIKE \'%[STRING]%\'
+	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.footer LIKE \'%[STRING]%\'
+	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.post_header LIKE \'%[STRING]%\'
+	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.post_footer LIKE \'%[STRING]%\'
+	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.comments_header LIKE \'%[STRING]%\'
+	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.comments_footer LIKE \'%[STRING]%\'
+	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.comments_footer LIKE \'%[STRING]%\'";
+	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_body', '$query_body_code', 'news')");
+	// Query end
+	$query_end_code = "";	
+	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_end', '$query_end_code', 'news')");
+	
+	// Insert blank row (there needs to be at least on row for the search to work)
+	$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_posts (section_id,page_id) VALUES ('0', '0')");
+	$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_groups (section_id,page_id) VALUES ('0', '0')");
+	$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_comments (section_id,page_id) VALUES ('0', '0')");
+	$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_settings (section_id,page_id) VALUES ('0', '0')");
+	
+	// Make news post access files dir
+	make_dir(WB_PATH.PAGES_DIRECTORY.'/posts/');+	
+}
+
+?>
\ No newline at end of file

Property changes on: addons/modules/news/install.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/news/rss.php
===================================================================
--- addons/modules/news/rss.php	(nonexistent)
+++ addons/modules/news/rss.php	(revision 84)
@@ -0,0 +1,94 @@
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+// Include WB files
+require_once('../../config.php');
+require_once(WB_PATH.'/framework/class.frontend.php');
+$database = new database();
+$wb = new frontend();
+$wb->get_page_details();
+$wb->get_website_settings();
+
+// Check that GET values have been supplied
+if(isset($_GET['page_id']) AND is_numeric($_GET['page_id'])) {
+	$page_id = $_GET['page_id'];
+} else {
+	header('Location: '.WB_URL);
+}
+if(isset($_GET['group_id']) AND is_numeric($_GET['group_id'])) {
+	$group_id = $_GET['group_id'];
+}
+
+// Sending XML header
+header("Content-type: text/xml");
+
+// Header info
+// Required by CSS 2.0
+
+echo "<rss version='2.0'>";
+echo "<channel>";
+echo "<title>".PAGE_TITLE."</title>";
+echo "<link>".WB_URL."</link>";
+echo "<description>".PAGE_DESCRIPTION."</description>";
+
+// Optional header info
+echo "<language>".DEFAULT_LANGUAGE."</language>";
+echo "<copyright>".WB_URL."</copyright>";
+echo "<managingEditor>".SERVER_EMAIL."</managingEditor>";
+echo "<webMaster>".SERVER_EMAIL."</webMaster>";
+echo "<category>".WEBSITE_TITLE."</category>";
+echo "<generator>Website Baker Content Management System</generator>";
+
+// Get news items from database
+
+//Query
+if(isset($group_id)) {
+	$query = "SELECT * FROM ".TABLE_PREFIX."mod_news_posts WHERE group_id=".$group_id." AND page_id = ".$page_id." AND active=1 ORDER BY posted_when DESC";
+} else {
+	$query = "SELECT * FROM ".TABLE_PREFIX."mod_news_posts WHERE page_id=".$page_id." AND active=1 ORDER BY posted_when DESC";	
+}
+$result = $database->query($query);
+
+//Generating the news items
+while($item = $result->fetchRow($result)){
+
+    echo "<item>";
+    echo "<title>".$item["title"]."</title>";
+    // Stripping HTML Tags for text-only visibility
+    echo "<description>".strip_tags($item["content_short"])."</description>";
+    echo "<link>".WB_URL."/pages".$item["link"].PAGE_EXTENSION."</link>";
+    /* Add further (non required) information here like ie.
+    echo "<author>".$item["posted_by"]."</author>");
+    etc.
+    */
+    echo "</item>";
+
+}
+
+// Writing footer information
+echo "</channel>";
+echo "</rss>";
+
+?>
\ No newline at end of file

Property changes on: addons/modules/news/rss.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/news/view.php
===================================================================
--- addons/modules/news/view.php	(nonexistent)
+++ addons/modules/news/view.php	(revision 84)
@@ -0,0 +1,323 @@
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+// Must include code to stop this file being access directly
+if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
+
+// Check if there is a start point defined
+if(isset($_GET['p']) AND is_numeric($_GET['p']) AND $_GET['p'] >= 0) {
+	$position = $_GET['p'];
+} else {
+	$position = 0;
+}
+
+// Get user's username, display name, email, and id - needed for insertion into post info
+$users = array();
+$query_users = $database->query("SELECT user_id,username,display_name,email FROM ".TABLE_PREFIX."users");
+if($query_users->numRows() > 0) {
+	while($user = $query_users->fetchRow()) {
+		// Insert user info into users array
+		$user_id = $user['user_id'];
+		$users[$user_id]['username'] = $user['username'];
+		$users[$user_id]['display_name'] = $user['display_name'];
+		$users[$user_id]['email'] = $user['email'];
+	}
+}
+
+// Get groups (title, if they are active, and their image [if one has been uploaded])
+$groups[0]['title'] = '';
+$groups[0]['active'] = true;
+$groups[0]['image'] = '';
+$query_users = $database->query("SELECT group_id,title,active FROM ".TABLE_PREFIX."mod_news_groups WHERE section_id = '$section_id' ORDER BY position ASC");
+if($query_users->numRows() > 0) {
+	while($group = $query_users->fetchRow()) {
+		// Insert user info into users array
+		$group_id = $group['group_id'];
+		$groups[$group_id]['title'] = $this->strip_slashes_dummy($group['title']);
+		$groups[$group_id]['active'] = $group['active'];
+		if(file_exists(WB_PATH.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg')) {
+			$groups[$group_id]['image'] = WB_URL.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg';
+		} else {
+			$groups[$group_id]['image'] = '';
+		}
+	}
+}
+
+// Check if we should show the main page or a post itself
+if(!defined('POST_ID') OR !is_numeric(POST_ID)) {
+	
+	// Check if we should only list posts from a certain group
+	if(isset($_GET['g']) AND is_numeric($_GET['g'])) {
+		$query_extra = " AND group_id = '".$_GET['g']."'";
+		?>
+		<style type="text/css">.selected_group_title { font-size: 14px; text-align: center; }</style>
+		<?php
+	} else {
+		$query_extra = '';
+	}
+	
+	// Get settings
+	$query_settings = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '$section_id'");
+	if($query_settings->numRows() > 0) {
+		$fetch_settings = $query_settings->fetchRow();
+		$setting_header = $this->strip_slashes_dummy($fetch_settings['header']);
+		$setting_post_loop = $this->strip_slashes_dummy($fetch_settings['post_loop']);
+		$setting_footer = $this->strip_slashes_dummy($fetch_settings['footer']);
+		$setting_posts_per_page = $fetch_settings['posts_per_page'];
+	} else {
+		$setting_header = '';
+		$setting_post_loop = '';
+		$setting_footer = '';
+		$setting_posts_per_page = '';
+	}
+	
+	// Get total number of posts
+	$query_total_num = $database->query("SELECT post_id FROM ".TABLE_PREFIX."mod_news_posts WHERE section_id = '$section_id' AND active = '1' AND title != ''$query_extra");
+	$total_num = $query_total_num->numRows();
+
+	// Work-out if we need to add limit code to sql
+	if($setting_posts_per_page != 0) {
+		$limit_sql = " LIMIT $position,$setting_posts_per_page";
+	} else {
+		$limit_sql = "";
+	}
+	
+	// Query posts (for this page)
+	$query_posts = $database->query("SELECT group_id,post_id,title,link,content_short,posted_by,posted_when FROM ".TABLE_PREFIX."mod_news_posts WHERE section_id = '$section_id' AND active = '1' AND title != ''$query_extra ORDER BY position DESC".$limit_sql);
+	$num_posts = $query_posts->numRows();
+	
+	// Create previous and next links
+	if($setting_posts_per_page != 0) {
+		if($position > 0) {
+			if(isset($_GET['g']) AND is_numeric($_GET['g'])) {
+				$pl_prepend = '<a href="?p='.($position-$setting_posts_per_page).'&g='.$_GET['g'].'"><< ';
+			} else {
+				$pl_prepend = '<a href="?p='.($position-$setting_posts_per_page).'"><< ';
+			}
+			$pl_append = '</a>';
+			$previous_link = $pl_prepend.$TEXT['PREVIOUS'].$pl_append;
+			$previous_page_link = $pl_prepend.$TEXT['PREVIOUS_PAGE'].$pl_append;
+		} else {
+			$previous_link = '';
+			$previous_page_link = '';
+		}
+		if($position+$setting_posts_per_page >= $total_num) {
+			$next_link = '';
+			$next_page_link = '';
+		} else {
+			if(isset($_GET['g']) AND is_numeric($_GET['g'])) {
+				$nl_prepend = '<a href="?p='.($position+$setting_posts_per_page).'&g='.$_GET['g'].'"> ';
+			} else {
+				$nl_prepend = '<a href="?p='.($position+$setting_posts_per_page).'"> ';
+			}
+			$nl_append = ' >></a>';
+			$next_link = $nl_prepend.$TEXT['NEXT'].$nl_append;
+			$next_page_link = $nl_prepend.$TEXT['NEXT_PAGE'].$nl_append;
+		}
+		if($position+$setting_posts_per_page > $total_num) {
+			$num_of = $position+$num_posts;
+		} else {
+			$num_of = $position+$setting_posts_per_page;
+		}
+		$out_of = ($position+1).'-'.$num_of.' '.strtolower($TEXT['OUT_OF']).' '.$total_num;
+		$of = ($position+1).'-'.$num_of.' '.strtolower($TEXT['OF']).' '.$total_num;
+		$display_previous_next_links = '';
+	} else {
+		$display_previous_next_links = 'none';
+	}
+		
+	// Print header
+	if($display_previous_next_links == 'none') {
+		echo  str_replace(array('[NEXT_PAGE_LINK]','[NEXT_LINK]','[PREVIOUS_PAGE_LINK]','[PREVIOUS_LINK]','[OUT_OF]','[OF]','[DISPLAY_PREVIOUS_NEXT_LINKS]'), array('','','','','','', $display_previous_next_links), $setting_header);
+	} else {
+		echo str_replace(array('[NEXT_PAGE_LINK]','[NEXT_LINK]','[PREVIOUS_PAGE_LINK]','[PREVIOUS_LINK]','[OUT_OF]','[OF]','[DISPLAY_PREVIOUS_NEXT_LINKS]'), array($next_page_link, $next_link, $previous_page_link, $previous_link, $out_of, $of, $display_previous_next_links), $setting_header);
+	}
+	
+	if($num_posts > 0) {
+		if($query_extra != '') {
+			?>
+			<div class="selected_group_title">
+				<?php echo '<a href="'.$_SERVER['PHP_SELF'].'">'.PAGE_TITLE.'</a> >> '.$groups[$_GET['g']]['title']; ?>
+			</div>
+			<?php
+		}
+		while($post = $query_posts->fetchRow()) {
+			if(isset($groups[$post['group_id']]['active']) AND $groups[$post['group_id']]['active'] != false) { // Make sure parent group is active
+				$uid = $post['posted_by']; // User who last modified the post
+				// Workout date and time of last modified post
+				$post_date = gmdate(DATE_FORMAT, $post['posted_when']+TIMEZONE);
+				$post_time = gmdate(TIME_FORMAT, $post['posted_when']+TIMEZONE);
+				// Work-out the post link
+				$post_link = page_link($post['link']);
+				if(isset($_GET['p']) AND $position > 0) {
+					$post_link .= '?p='.$position;
+				}
+				if(isset($_GET['g']) AND is_numeric($_GET['g'])) {
+					if(isset($_GET['p']) AND $position > 0) { $post_link .= '&'; } else { $post_link .= '?'; }
+					$post_link .= 'g='.$_GET['g'];
+				}
+				// Get group id, title, and image
+				$group_id = $post['group_id'];
+				$group_title = $groups[$group_id]['title'];
+				$group_image = $groups[$group_id]['image'];
+				if($group_image == '') { $display_image = 'none'; } else { $display_image = ''; }
+				if($group_id == 0) { $display_group = 'none'; } else { $display_group = ''; }
+				// Replace [wblink--PAGE_ID--] with real link
+				$short = $this->strip_slashes_dummy($post['content_short']);
+				$this->preprocess($short);
+				// Replace vars with values
+				$vars = array('[PAGE_TITLE]', '[GROUP_ID]', '[GROUP_TITLE]', '[GROUP_IMAGE]', '[DISPLAY_GROUP]', '[DISPLAY_IMAGE]', '[TITLE]', '[SHORT]', '[LINK]', '[DATE]', '[TIME]', '[USER_ID]', '[USERNAME]', '[DISPLAY_NAME]', '[EMAIL]', '[TEXT_READ_MORE]');
+				if(isset($users[$uid]['username']) AND $users[$uid]['username'] != '') {
+					$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $this->strip_slashes_dummy($post['title']), $short, $post_link, $post_date, $post_time, $uid, $users[$uid]['username'], $users[$uid]['display_name'], $users[$uid]['email'], $TEXT['READ_MORE']);
+				} else {
+					$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $this->strip_slashes_dummy($post['title']), $short, $post_link, $post_date, $post_time, '', '', '', '', $TEXT['READ_MORE']);
+				}
+				echo str_replace($vars, $values, $setting_post_loop);
+			}
+		}
+	}
+	
+	// Print footer
+	if($display_previous_next_links == 'none') {
+		echo  str_replace(array('[NEXT_PAGE_LINK]','[NEXT_LINK]','[PREVIOUS_PAGE_LINK]','[PREVIOUS_LINK]','[OUT_OF]','[OF]','[DISPLAY_PREVIOUS_NEXT_LINKS]'), array('','','','','','', $display_previous_next_links), $setting_footer);
+	} else {
+		echo str_replace(array('[NEXT_PAGE_LINK]','[NEXT_LINK]','[PREVIOUS_PAGE_LINK]','[PREVIOUS_LINK]','[OUT_OF]','[OF]','[DISPLAY_PREVIOUS_NEXT_LINKS]'), array($next_page_link, $next_link, $previous_page_link, $previous_link, $out_of, $of, $display_previous_next_links), $setting_footer);
+	}
+	
+} elseif(defined('POST_ID') AND is_numeric(POST_ID)) {
+	
+	// Get settings
+	$query_settings = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '$section_id'");
+	if($query_settings->numRows() > 0) {
+		$fetch_settings = $query_settings->fetchRow();
+		$setting_post_header = $this->strip_slashes_dummy($fetch_settings['post_header']);
+		$setting_post_footer = $this->strip_slashes_dummy($fetch_settings['post_footer']);
+		$setting_comments_header = $this->strip_slashes_dummy($fetch_settings['comments_header']);
+		$setting_comments_loop = $this->strip_slashes_dummy($fetch_settings['comments_loop']);
+		$setting_comments_footer = $this->strip_slashes_dummy($fetch_settings['comments_footer']);
+	} else {
+		$setting_post_header = '';
+		$setting_post_footer = '';
+		$setting_comments_header = '';
+		$setting_comments_loop = '';
+		$setting_comments_footer = '';
+	}
+	
+	// Get page info
+	$query_page = $database->query("SELECT link FROM ".TABLE_PREFIX."pages WHERE page_id = '".PAGE_ID."'");
+	if($query_page->numRows() > 0) {
+		$page = $query_page->fetchRow();
+		$page_link = page_link($page['link']);
+		if(isset($_GET['p']) AND $position > 0) {
+			$page_link .= '?p='.$_GET['p'];
+		}
+		if(isset($_GET['g']) AND is_numeric($_GET['g'])) {
+			if(isset($_GET['p']) AND $position > 0) { $page_link .= '&'; } else { $page_link .= '?'; }
+			$page_link .= 'g='.$_GET['g'];
+		}
+	} else {
+		exit('Page not found');
+	}
+	
+	// Get post info
+	$query_post = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_news_posts WHERE post_id = '".POST_ID."' AND active = '1'");
+	if($query_post->numRows() > 0) {
+		$post = $query_post->fetchRow();
+		if(isset($groups[$post['group_id']]['active']) AND $groups[$post['group_id']]['active'] != false) { // Make sure parent group is active
+			$uid = $post['posted_by']; // User who last modified the post
+			// Workout date and time of last modified post
+			$post_date = gmdate(DATE_FORMAT, $post['posted_when']+TIMEZONE);
+			$post_time = gmdate(TIME_FORMAT, $post['posted_when']+TIMEZONE);
+			// Get group id, title, and image
+			$group_id = $post['group_id'];
+			$group_title = $groups[$group_id]['title'];
+			$group_image = $groups[$group_id]['image'];
+			if($group_image == '') { $display_image = 'none'; } else { $display_image = ''; }
+			if($group_id == 0) { $display_group = 'none'; } else { $display_group = ''; }
+			$vars = array('[PAGE_TITLE]', '[GROUP_ID]', '[GROUP_TITLE]', '[GROUP_IMAGE]', '[DISPLAY_GROUP]', '[DISPLAY_IMAGE]', '[TITLE]', '[SHORT]', '[BACK]', '[DATE]', '[TIME]', '[USER_ID]', '[USERNAME]', '[DISPLAY_NAME]', '[EMAIL]');
+			if(isset($users[$uid]['username']) AND $users[$uid]['username'] != '') {
+				$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $this->strip_slashes_dummy($post['title']), $this->strip_slashes_dummy($post['content_short']), $page_link, $post_date, $post_time, $uid, $users[$uid]['username'], $users[$uid]['display_name'], $users[$uid]['email']);
+			} else {
+				$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $this->strip_slashes_dummy($post['title']), $this->strip_slashes_dummy($post['content_short']), $page_link, $post_date, $post_time, '', '', '', '');
+			}
+			$post_long = $this->strip_slashes_dummy($post['content_long']);
+		}
+	} else {
+		header('Location: '.WB_URL.'/pages/');
+	}
+	
+	// Print post header
+	echo str_replace($vars, $values, $setting_post_header);
+	
+	// Replace [wblink--PAGE_ID--] with real link
+  	$this->preprocess($postlong);
+	// Print long
+	echo $post_long;
+	
+	// Print post footer
+	echo str_replace($vars, $values, $setting_post_footer);
+	
+	// Show comments section if we have to
+	if($post['commenting'] == 'private' AND isset($admin) AND $admin->is_authenticated() == true OR $post['commenting'] == 'public') {
+		
+		// Print comments header
+		echo str_replace('[ADD_COMMENT_URL]', WB_URL.'/modules/news/comment.php?id='.POST_ID, $setting_comments_header);
+		
+		// Query for comments
+		$query_comments = $database->query("SELECT title,comment,commented_when,commented_by FROM ".TABLE_PREFIX."mod_news_comments WHERE post_id = '".POST_ID."' ORDER BY commented_when ASC");
+		if($query_comments->numRows() > 0) {
+			while($comment = $query_comments->fetchRow()) {
+				// Display Comments without slashes, but with new-line characters
+				$comment['comment'] = nl2br($this->strip_slashes_dummy($comment['comment']));
+				$comment['title'] = $this->strip_slashes_dummy($comment['title']);
+				// Print comments loop
+				$commented_date = gmdate(DATE_FORMAT, $comment['commented_when']+TIMEZONE);
+				$commented_time = gmdate(TIME_FORMAT, $comment['commented_when']+TIMEZONE);
+				$uid = $comment['commented_by'];
+				$vars = array('[TITLE]','[COMMENT]','[DATE]','[TIME]','[USER_ID]','[USERNAME]','[DISPLAY_NAME]', '[EMAIL]');
+				if(isset($users[$uid]['username']) AND $users[$uid]['username'] != '') {
+					$values = array($this->strip_slashes_dummy($comment['title']), $this->strip_slashes_dummy($comment['comment']), $commented_date, $commented_time, $uid, $this->strip_slashes_dummy($users[$uid]['username']), $this->strip_slashes_dummy($users[$uid]['display_name']), $this->strip_slashes_dummy($users[$uid]['email']));
+				} else {
+					$values = array($this->strip_slashes_dummy($comment['title']), $this->strip_slashes_dummy($comment['comment']), $commented_date, $commented_time, '0', strtolower($TEXT['UNKNOWN']), $TEXT['UNKNOWN'], '');
+				}
+				echo str_replace($vars, $values, $setting_comments_loop);
+			}
+		} else {
+			// Say no comments found
+			if(isset($TEXT['NONE_FOUND'])) {
+				echo $TEXT['NONE_FOUND'].'<br />';
+			} else {
+				echo 'None Found<br />';
+			}
+		}
+		
+		// Print comments footer
+		echo str_replace('[ADD_COMMENT_URL]', WB_URL.'/modules/news/comment.php?id='.POST_ID, $setting_comments_footer);
+		
+	}
+		
+}
+
+?>

Property changes on: addons/modules/news/view.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/news/comment_page.php
===================================================================
--- addons/modules/news/comment_page.php	(nonexistent)
+++ addons/modules/news/comment_page.php	(revision 84)
@@ -0,0 +1,41 @@
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+// Make sure page cannot be accessed directly
+if(!defined('WB_URL')) { header('Location: ../index.php'); }
+	
+// Get comments page template details from db
+$query_settings = $database->query("SELECT comments_page FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '".SECTION_ID."'");
+if($query_settings->numRows() == 0) {
+	header('Location: '.WB_URL.'/pages/');
+} else {
+	$settings = $query_settings->fetchRow();
+	// Print comments page
+	$vars = array('[POST_TITLE]', '[ACTION_URL]');
+	$values = array(POST_TITLE, WB_URL.'/modules/news/submit_comment.php?page_id='.PAGE_ID.'&section_id='.SECTION_ID.'&post_id='.POST_ID);
+	echo str_replace($vars, $values, $this->strip_slashes_dummy($settings['comments_page']));
+}
+
+?>
\ No newline at end of file

Property changes on: addons/modules/news/comment_page.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/news/modify_group.php
===================================================================
--- addons/modules/news/modify_group.php	(nonexistent)
+++ addons/modules/news/modify_group.php	(revision 84)
@@ -0,0 +1,105 @@
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+require('../../config.php');
+
+// Get id
+if(!isset($_GET['group_id']) OR !is_numeric($_GET['group_id'])) {
+	header("Location: ".ADMIN_URL."/pages/index.php");
+} else {
+	$group_id = $_GET['group_id'];
+}
+
+// Include WB admin wrapper script
+require(WB_PATH.'/modules/admin.php');
+
+// Get header and footer
+$query_content = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_news_groups WHERE group_id = '$group_id'");
+$fetch_content = $query_content->fetchRow();
+
+?>
+
+<form name="modify" action="<?php echo WB_URL; ?>/modules/news/save_group.php" method="post" enctype="multipart/form-data" style="margin: 0;">
+
+<input type="hidden" name="section_id" value="<?php echo $section_id; ?>">
+<input type="hidden" name="page_id" value="<?php echo $page_id; ?>">
+<input type="hidden" name="group_id" value="<?php echo $group_id; ?>">
+
+<table cellpadding="4" cellspacing="0" border="0" width="100%">
+<tr>
+	<td width="80"><?php echo $TEXT['TITLE']; ?>:</td>
+	<td>
+		<input type="text" name="title" value="<?php echo $admin->strip_slashes_dummy(htmlspecialchars($fetch_content['title'])); ?>" style="width: 100%;" maxlength="255" />
+	</td>
+</tr>
+<tr>
+	<td><?php echo $TEXT['IMAGE']; ?>:</td>
+	<?php if(file_exists(WB_PATH.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg')) { ?>
+	<td>
+		<a href="<?php echo WB_URL.MEDIA_DIRECTORY; ?>/.news/image<?php echo $group_id; ?>.jpg" target="_blank">View</a>
+		&nbsp;
+		<input type="checkbox" name="delete_image" id="delete_image" value="true" />
+		<a href="javascript: toggle_checkbox('delete_image');">Delete</a>
+	</td>
+	<?php } else { ?>
+	<td>
+		<input type="file" name="image" />
+	</td>
+	<?php } ?>
+</tr>
+<tr>
+	<td><?php echo $TEXT['ACTIVE']; ?>:</td>
+	<td>
+		<input type="radio" name="active" id="active_true" value="1" <?php if($fetch_content['active'] == 1) { echo ' checked'; } ?> />
+		<a href="#" onclick="javascript: document.getElementById('active_true').checked = true;">
+		<?php echo $TEXT['YES']; ?>
+		</a>
+		-
+		<input type="radio" name="active" id="active_false" value="0" <?php if($fetch_content['active'] == 0) { echo ' checked'; } ?> />
+		<a href="#" onclick="javascript: document.getElementById('active_false').checked = true;">
+		<?php echo $TEXT['NO']; ?>
+		</a>
+	</td>
+</tr>
+</table>
+
+<table cellpadding="0" cellspacing="0" border="0" width="100%">
+<tr>
+	<td align="left">
+		<input name="save" type="submit" value="<?php echo $TEXT['SAVE']; ?>" style="width: 200px; margin-top: 5px;"></form>
+	</td>
+	<td align="right">
+		<input type="button" value="<?php echo $TEXT['CANCEL']; ?>" onclick="javascript: window.location = '<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page_id; ?>';" style="width: 100px; margin-top: 5px;" />
+	</td>
+</tr>
+</table>
+
+
+<?php
+
+// Print admin footer
+$admin->print_footer();
+
+?>
\ No newline at end of file

Property changes on: addons/modules/news/modify_group.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/news/modify_settings.php
===================================================================
--- addons/modules/news/modify_settings.php	(nonexistent)
+++ addons/modules/news/modify_settings.php	(revision 84)
@@ -0,0 +1,173 @@
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+require('../../config.php');
+
+// Include WB admin wrapper script
+require(WB_PATH.'/modules/admin.php');
+
+// Get header and footer
+$query_content = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '$section_id'");
+$fetch_content = $query_content->fetchRow();
+
+// Set raw html <'s and >'s to be replace by friendly html code
+$raw = array('<', '>');
+$friendly = array('&lt;', '&gt;');
+
+?>
+
+<style type="text/css">
+.setting_name {
+	vertical-align: top;
+}
+</style>
+
+<form name="modify" action="<?php echo WB_URL; ?>/modules/news/save_settings.php" method="post" style="margin: 0;">
+
+<input type="hidden" name="section_id" value="<?php echo $section_id; ?>">
+<input type="hidden" name="page_id" value="<?php echo $page_id; ?>">
+
+<table cellpadding="2" cellspacing="0" border="0" width="100%">
+<tr>
+	<td class="setting_name" width="100"><?php echo $TEXT['HEADER']; ?>:</td>
+	<td class="setting_name">
+		<textarea name="header" style="width: 100%; height: 80px;"><?php echo $admin->strip_slashes_dummy($fetch_content['header']); ?></textarea>
+	</td>
+</tr>
+<tr>
+	<td class="setting_name"><?php echo $TEXT['POST'].' '.$TEXT['LOOP']; ?>:</td>
+	<td class="setting_name">
+		<textarea name="post_loop" style="width: 100%; height: 60px;"><?php echo $admin->strip_slashes_dummy($fetch_content['post_loop']); ?></textarea>
+	</td>
+</tr>
+<tr>
+	<td class="setting_name"><?php echo $TEXT['FOOTER']; ?>:</td>
+	<td class="setting_name">
+		<textarea name="footer" style="width: 100%; height: 80px;"><?php echo str_replace($raw, $friendly, $admin->strip_slashes_dummy($fetch_content['footer'])); ?></textarea>
+	</td>
+</tr>
+<tr>
+	<td class="setting_name"><?php echo $TEXT['POST_HEADER']; ?>:</td>
+	<td class="setting_name">
+		<textarea name="post_header" style="width: 100%; height: 60px;"><?php echo str_replace($raw, $friendly, $admin->strip_slashes_dummy($fetch_content['post_header'])); ?></textarea>
+	</td>
+</tr>
+<tr>
+	<td class="setting_name"><?php echo $TEXT['POST_FOOTER']; ?>:</td>
+	<td class="setting_name">
+		<textarea name="post_footer" style="width: 100%; height: 60px;"><?php echo str_replace($raw, $friendly, $admin->strip_slashes_dummy($fetch_content['post_footer'])); ?></textarea>
+	</td>
+</tr>
+<tr>
+	<td class="setting_name"><?php echo $TEXT['POSTS_PER_PAGE']; ?>:</td>
+	<td class="setting_name">
+		<select name="posts_per_page" style="width: 100%;">
+			<option value=""><?php echo $TEXT['UNLIMITED']; ?></option>
+			<?php
+			for($i = 1; $i <= 20; $i++) {
+				if($fetch_content['posts_per_page'] == ($i*5)) { $selected = ' selected'; } else { $selected = ''; }
+				echo '<option value="'.($i*5).'"'.$selected.'>'.($i*5).'</option>';
+			}
+			?>
+		</select>
+	</td>
+</tr>
+<tr>
+	<td><?php echo $TEXT['COMMENTING']; ?>:</td>
+	<td>
+		<select name="commenting" style="width: 100%;">
+			<option value="none"><?php echo $TEXT['DISABLED']; ?></option>
+			<option value="public" <?php if($fetch_content['commenting'] == 'public') { echo 'selected'; } ?>><?php echo $TEXT['PUBLIC']; ?></option>
+			<option value="private" <?php if($fetch_content['commenting'] == 'private') { echo 'selected'; } ?>><?php echo $TEXT['PRIVATE']; ?></option>
+		</select>
+	</td>
+</tr>
+<?php if(extension_loaded('gd') AND function_exists('imageCreateFromJpeg')) { /* Make's sure GD library is installed */ ?>
+<tr>
+	<td>
+		<?php echo $TEXT['RESIZE_IMAGE_TO']; ?>:
+	</td>
+	<td>
+		<select name="resize" style="width: 100%;">
+			<option value=""><?php echo $TEXT['NONE']; ?></option>
+			<?php
+			$SIZES['50'] = '50x50px';
+			$SIZES['75'] = '75x75px';
+			$SIZES['100'] = '100x100px';
+			$SIZES['125'] = '125x125px';
+			$SIZES['150'] = '150x150px';
+			foreach($SIZES AS $size => $size_name) {
+				if($fetch_content['resize'] == $size) { $selected = ' selected'; } else { $selected = ''; }
+				echo '<option value="'.$size.'"'.$selected.'>'.$size_name.'</option>';
+			}
+			?>
+		</select>
+	</td>
+</tr>
+<?php } ?>
+<tr>
+	<td class="setting_name"><?php echo $TEXT['COMMENTS'].' '.$TEXT['HEADER']; ?>:</td>
+	<td class="setting_name">
+		<textarea name="comments_header" style="width: 100%; height: 60px;"><?php echo str_replace($raw, $friendly, $admin->strip_slashes_dummy($fetch_content['comments_header'])); ?></textarea>
+	</td>
+</tr>
+<tr>
+	<td class="setting_name"><?php echo $TEXT['COMMENTS'].' '.$TEXT['LOOP']; ?>:</td>
+	<td class="setting_name">
+		<textarea name="comments_loop" style="width: 100%; height: 60px;"><?php echo str_replace($raw, $friendly, $admin->strip_slashes_dummy($fetch_content['comments_loop'])); ?></textarea>
+	</td>
+</tr>
+<tr>
+	<td class="setting_name"><?php echo $TEXT['COMMENTS'].' '.$TEXT['FOOTER']; ?>:</td>
+	<td class="setting_name">
+		<textarea name="comments_footer" style="width: 100%; height: 60px;"><?php echo str_replace($raw, $friendly, $admin->strip_slashes_dummy($fetch_content['comments_footer'])); ?></textarea>
+	</td>
+</tr>
+<tr>
+	<td class="setting_name"><?php echo $TEXT['COMMENTS'].' '.$TEXT['PAGE']; ?>:</td>
+	<td class="setting_name">
+		<textarea name="comments_page" style="width: 100%; height: 80px;"><?php echo str_replace($raw, $friendly, $admin->strip_slashes_dummy($fetch_content['comments_page'])); ?></textarea>
+	</td>
+</tr>
+</table>
+<table cellpadding="0" cellspacing="0" border="0" width="100%">
+<tr>
+	<td width="105">&nbsp;</td>
+	<td align="left">
+		<input name="save" type="submit" value="<?php echo $TEXT['SAVE'].' '.$TEXT['SETTINGS']; ?>" style="width: 200px; margin-top: 5px;"></form>
+	</td>
+	<td align="right">
+		<input type="button" value="<?php echo $TEXT['CANCEL']; ?>" onclick="javascript: window.location = '<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page_id; ?>';" style="width: 100px; margin-top: 5px;" />
+	</td>
+</tr>
+</table>
+
+
+<?php
+
+// Print admin footer
+$admin->print_footer();
+
+?>
\ No newline at end of file

Property changes on: addons/modules/news/modify_settings.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/news/modify_comment.php
===================================================================
--- addons/modules/news/modify_comment.php	(nonexistent)
+++ addons/modules/news/modify_comment.php	(revision 84)
@@ -0,0 +1,85 @@
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+require('../../config.php');
+
+// Get id
+if(!isset($_GET['comment_id']) OR !is_numeric($_GET['comment_id'])) {
+	header("Location: ".ADMIN_URL."/pages/index.php");
+} else {
+	$comment_id = $_GET['comment_id'];
+}
+
+// Include WB admin wrapper script
+require(WB_PATH.'/modules/admin.php');
+
+// Get header and footer
+$query_content = $database->query("SELECT post_id,title,comment FROM ".TABLE_PREFIX."mod_news_comments WHERE comment_id = '$comment_id'");
+$fetch_content = $query_content->fetchRow();
+
+?>
+
+<form name="modify" action="<?php echo WB_URL; ?>/modules/news/save_comment.php" method="post" style="margin: 0;">
+
+<input type="hidden" name="section_id" value="<?php echo $section_id; ?>">
+<input type="hidden" name="page_id" value="<?php echo $page_id; ?>">
+<input type="hidden" name="post_id" value="<?php echo $fetch_content['post_id']; ?>">
+<input type="hidden" name="comment_id" value="<?php echo $comment_id; ?>">
+
+<table cellpadding="0" cellspacing="0" border="0" width="100%">
+<tr>
+	<td width="80"><?php echo $TEXT['TITLE']; ?>:</td>
+	<td>
+		<input type="text" name="title" value="<?php echo $admin->strip_slashes_dummy(htmlspecialchars($fetch_content['title'])); ?>" style="width: 100%;" maxlength="255" />
+	</td>
+</tr>
+<tr>
+	<td valign="top"><?php echo $TEXT['COMMENT']; ?>:</td>
+	<td>
+		<textarea name="comment" style="width: 100%; height: 150px;"><?php echo $admin->strip_slashes_dummy(htmlspecialchars($fetch_content['comment'])); ?></textarea>
+	</td>
+</tr>
+</table>
+
+<br />
+
+<table cellpadding="0" cellspacing="0" border="0" width="100%">
+<tr>
+	<td align="left">
+		<input name="save" type="submit" value="<?php echo $TEXT['SAVE']; ?>" style="width: 200px; margin-top: 5px;"></form>
+	</td>
+	<td align="right">
+		<input type="button" value="<?php echo $TEXT['CANCEL']; ?>" onclick="javascript: window.location = '<?php echo WB_URL; ?>/modules/news/modify_post.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&post_id=<?php echo $fetch_content['post_id']; ?>';" style="width: 100px; margin-top: 5px;" />
+	</td>
+</tr>
+</table>
+
+
+<?php
+
+// Print admin footer
+$admin->print_footer();
+
+?>
\ No newline at end of file

Property changes on: addons/modules/news/modify_comment.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/news/modify.php
===================================================================
--- addons/modules/news/modify.php	(nonexistent)
+++ addons/modules/news/modify.php	(revision 84)
@@ -0,0 +1,192 @@
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+// Must include code to stop this file being access directly
+if(!defined('WB_PATH')) { exit("Cannot access this file directly"); }
+
+?>
+<table cellpadding="0" cellspacing="0" border="0" width="100%">
+<tr>
+	<td align="left" width="33%">
+		<input type="button" value="<?php echo $TEXT['ADD'].' '.$TEXT['POST']; ?>" onclick="javascript: window.location = '<?php echo WB_URL; ?>/modules/news/add_post.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>';" style="width: 100%;" />
+	</td>
+	<td align="left" width="33%">
+		<input type="button" value="<?php echo $TEXT['ADD'].' '.$TEXT['GROUP']; ?>" onclick="javascript: window.location = '<?php echo WB_URL; ?>/modules/news/add_group.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>';" style="width: 100%;" />
+	</td>
+	<td align="right" width="33%">
+		<input type="button" value="<?php echo $TEXT['SETTINGS']; ?>" onclick="javascript: window.location = '<?php echo WB_URL; ?>/modules/news/modify_settings.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>';" style="width: 100%;" />
+	</td>
+</tr>
+</table>
+
+<br />
+
+<h2><?php echo $TEXT['MODIFY'].'/'.$TEXT['DELETE'].' '.$TEXT['POST']; ?></h2>
+
+<?php
+
+// Loop through existing posts
+$query_posts = $database->query("SELECT * FROM `".TABLE_PREFIX."mod_news_posts` WHERE section_id = '$section_id' ORDER BY position DESC");
+if($query_posts->numRows() > 0) {
+	$num_posts = $query_posts->numRows();
+	$row = 'a';
+	?>
+	<table cellpadding="2" cellspacing="0" border="0" width="100%">
+	<?php
+	while($post = $query_posts->fetchRow()) {
+		?>
+		<tr class="row_<?php echo $row; ?>" height="20">
+			<td width="20" style="padding-left: 5px;">
+				<a href="<?php echo WB_URL; ?>/modules/news/modify_post.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&post_id=<?php echo $post['post_id']; ?>" title="<?php echo $TEXT['MODIFY']; ?>">
+					<img src="<?php echo ADMIN_URL; ?>/images/modify_16.png" border="0" alt="Modify - " />
+				</a>
+			</td>
+			<td>
+				<a href="<?php echo WB_URL; ?>/modules/news/modify_post.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&post_id=<?php echo $post['post_id']; ?>">
+					<?php echo $admin->strip_slashes_dummy($post['title']); ?>
+				</a>
+			</td>
+			<td width="180">
+				<?php echo $TEXT['GROUP'].': ';
+				// Get group title
+				$query_title = $database->query("SELECT title FROM ".TABLE_PREFIX."mod_news_groups WHERE group_id = '".$post['group_id']."'");
+				if($query_title->numRows() > 0) {
+					$fetch_title = $query_title->fetchRow();
+					echo $admin->strip_slashes_dummy($fetch_title['title']);
+				} else {
+					echo $TEXT['NONE'];
+				}
+				?>
+			</td>
+			<td width="80">
+				<?php echo $TEXT['COMMENTS'].': ';
+				// Get number of comments
+				$query_title = $database->query("SELECT title FROM ".TABLE_PREFIX."mod_news_comments WHERE post_id = '".$post['post_id']."'");
+				echo $query_title->numRows();
+				?>
+			</td>
+			<td width="80">
+				<?php echo $TEXT['ACTIVE'].': '; if($post['active'] == 1) { echo $TEXT['YES']; } else { echo $TEXT['NO']; } ?>
+			</td>
+			<td width="20">
+			<?php if($post['position'] != $num_posts) { ?>
+				<a href="<?php echo WB_URL; ?>/modules/news/move_down.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&post_id=<?php echo $post['post_id']; ?>" title="<?php echo $TEXT['MOVE_UP']; ?>">
+					<img src="<?php echo ADMIN_URL; ?>/images/up_16.png" border="0" alt="^" />
+				</a>
+			<?php } ?>
+			</td>
+			<td width="20">
+			<?php if($post['position'] != 1) { ?>
+				<a href="<?php echo WB_URL; ?>/modules/news/move_up.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&post_id=<?php echo $post['post_id']; ?>" title="<?php echo $TEXT['MOVE_DOWN']; ?>">
+					<img src="<?php echo ADMIN_URL; ?>/images/down_16.png" border="0" alt="v" />
+				</a>
+			<?php } ?>
+			</td>
+			<td width="20">
+				<a href="javascript: confirm_link('<?php echo $TEXT['ARE_YOU_SURE']; ?>', '<?php echo WB_URL; ?>/modules/news/delete_post.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&post_id=<?php echo $post['post_id']; ?>');" title="<?php echo $TEXT['DELETE']; ?>">
+					<img src="<?php echo ADMIN_URL; ?>/images/delete_16.png" border="0" alt="X" />
+				</a>
+			</td>
+		</tr>
+		<?php
+		// Alternate row color
+		if($row == 'a') {
+			$row = 'b';
+		} else {
+			$row = 'a';
+		}
+	}
+	?>
+	</table>
+	<?php
+} else {
+	echo $TEXT['NONE_FOUND'];
+}
+
+?>
+
+<h2><?php echo $TEXT['MODIFY'].'/'.$TEXT['DELETE'].' '.$TEXT['GROUP']; ?></h2>
+
+<?php
+
+// Loop through existing groups
+$query_groups = $database->query("SELECT * FROM `".TABLE_PREFIX."mod_news_groups` WHERE section_id = '$section_id' ORDER BY position ASC");
+if($query_groups->numRows() > 0) {
+	$num_groups = $query_groups->numRows();
+	$row = 'a';
+	?>
+	<table cellpadding="2" cellspacing="0" border="0" width="100%">
+	<?php
+	while($group = $query_groups->fetchRow()) {
+		?>
+		<tr class="row_<?php echo $row; ?>" height="20">
+			<td width="20" style="padding-left: 5px;">
+				<a href="<?php echo WB_URL; ?>/modules/news/modify_group.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&group_id=<?php echo $group['group_id']; ?>" title="<?php echo $TEXT['MODIFY']; ?>">
+					<img src="<?php echo ADMIN_URL; ?>/images/modify_16.png" border="0" alt="Modify - " />
+				</a>
+			</td>		
+			<td>
+				<a href="<?php echo WB_URL; ?>/modules/news/modify_group.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&group_id=<?php echo $group['group_id']; ?>">
+					<?php echo $group['title']; ?>
+				</a>
+			</td>
+			<td width="80">
+				<?php echo $TEXT['ACTIVE'].': '; if($group['active'] == 1) { echo $TEXT['YES']; } else { echo $TEXT['NO']; } ?>
+			</td>
+			<td width="20">
+			<?php if($group['position'] != 1) { ?>
+				<a href="<?php echo WB_URL; ?>/modules/news/move_up.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&group_id=<?php echo $group['group_id']; ?>" title="<?php echo $TEXT['MOVE_UP']; ?>">
+					<img src="<?php echo ADMIN_URL; ?>/images/up_16.png" border="0" alt="^" />
+				</a>
+			<?php } ?>
+			</td>
+			<td width="20">
+			<?php if($group['position'] != $num_groups) { ?>
+				<a href="<?php echo WB_URL; ?>/modules/news/move_down.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&group_id=<?php echo $group['group_id']; ?>" title="<?php echo $TEXT['MOVE_DOWN']; ?>">
+					<img src="<?php echo ADMIN_URL; ?>/images/down_16.png" border="0" alt="v" />
+				</a>
+			<?php } ?>
+			</td>
+			<td width="20">
+				<a href="javascript: confirm_link('<?php echo $TEXT['ARE_YOU_SURE']; ?>', '<?php echo WB_URL; ?>/modules/news/delete_group.php?page_id=<?php echo $page_id; ?>&group_id=<?php echo $group['group_id']; ?>');" title="<?php echo $TEXT['DELETE']; ?>">
+					<img src="<?php echo ADMIN_URL; ?>/images/delete_16.png" border="0" alt="X" />
+				</a>
+			</td>
+		</tr>
+		<?php
+		// Alternate row color
+		if($row == 'a') {
+			$row = 'b';
+		} else {
+			$row = 'a';
+		}
+	}
+	?>
+	</table>
+	<?php
+} else {
+	echo $TEXT['NONE_FOUND'];
+}
+?>
\ No newline at end of file

Property changes on: addons/modules/news/modify.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/news/save_group.php
===================================================================
--- addons/modules/news/save_group.php	(nonexistent)
+++ addons/modules/news/save_group.php	(revision 84)
@@ -0,0 +1,99 @@
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+require('../../config.php');
+
+// Get id
+if(!isset($_POST['group_id']) OR !is_numeric($_POST['group_id'])) {
+	header("Location: ".ADMIN_URL."/pages/index.php");
+} else {
+	$group_id = $_POST['group_id'];
+}
+
+// Include WB admin wrapper script
+$update_when_modified = true; // Tells script to update when this page was last updated
+require(WB_PATH.'/modules/admin.php');
+
+// Include WB functions file
+require(WB_PATH.'/framework/functions.php');
+
+// Vagroup_idate all fields
+if($admin->get_post('title') == '') {
+	$admin->print_error($MESSAGE['GENERIC']['FILL_IN_ALL'], WB_URL.'/modules/news/modify_group.php?page_id='.$page_id.'&section_id='.$section_id.'&group_id='.$group_id);
+} else {
+	$title = $admin->add_slashes($admin->get_post('title'));
+	$active = $admin->get_post('active');
+}
+
+// Update row
+$database->query("UPDATE ".TABLE_PREFIX."mod_news_groups SET title = '$title', active = '$active' WHERE group_id = '$group_id'");
+
+// Check if the user uploaded an image or wants to delete one
+if(isset($_FILES['image']['tmp_name']) AND $_FILES['image']['tmp_name'] != '') {
+	// Get real filename and set new filename
+	$filename = $_FILES['image']['name'];
+	$new_filename = WB_PATH.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg';
+	// Make sure the image is a jpg file
+	if(substr($filename, -3, 3) != 'jpg') {
+		$admin->print_error($MESSAGE['GENERIC']['FILE_TYPE'].' JPG (JPEG)');
+	} elseif(mime_content_type($_FILES['image']['tmp_name']) != 'image/jpeg' AND mime_content_type($_FILES['image']['tmp_name']) != 'image/jpg') {
+		$admin->print_error($MESSAGE['GENERIC']['FILE_TYPE'].' JPG (JPEG)');
+	}
+	// Make sure the target directory exists
+	make_dir(WB_PATH.MEDIA_DIRECTORY.'/.news');
+	// Upload image
+	move_uploaded_file($_FILES['image']['tmp_name'], $new_filename);
+	// Check if we need to create a thumb
+	$query_settings = $database->query("SELECT resize FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '$section_id'");
+	$fetch_settings = $query_settings->fetchRow();
+	$resize = $fetch_settings['resize'];
+	if($resize != 0) {
+		// Resize the image
+		$thumb_location = WB_PATH.MEDIA_DIRECTORY.'/.news/thumb'.$group_id.'.jpg';
+		if(make_thumb($new_filename, $thumb_location, $resize)) {
+			// Delete the actual image and replace with the resized version
+			unlink($new_filename);
+			rename($thumb_location, $new_filename);
+		}
+	}
+}
+if(isset($_POST['delete_image']) AND $_POST['delete_image'] != '') {
+	// Try unlinking image
+	if(file_exists(WB_PATH.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg')) {
+		unlink(WB_PATH.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg');
+	}
+}
+
+// Check if there is a db error, otherwise say successful
+if($database->is_error()) {
+	$admin->print_error($database->get_error(), WB_URL.'/modules/news/modify_group.php?page_id='.$page_id.'&section_id='.$section_id.'&group_id='.$group_id);
+} else {
+	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+}
+
+// Print admin footer
+$admin->print_footer();
+
+?>

Property changes on: addons/modules/news/save_group.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/news/save_settings.php
===================================================================
--- addons/modules/news/save_settings.php	(nonexistent)
+++ addons/modules/news/save_settings.php	(revision 84)
@@ -0,0 +1,65 @@
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+require('../../config.php');
+
+// Include WB admin wrapper script
+$update_when_modified = true; // Tells script to update when this page was last updated
+require(WB_PATH.'/modules/admin.php');
+
+// This code removes any <?php tags and adds slashes
+$friendly = array('&lt;', '&gt;', '?php');
+$raw = array('<', '>', '');
+$header = $admin->add_slashes(str_replace($friendly, $raw, $_POST['header']));
+$post_loop = $admin->add_slashes(str_replace($friendly, $raw, $_POST['post_loop']));
+$footer = $admin->add_slashes(str_replace($friendly, $raw, $_POST['footer']));
+$post_header = $admin->add_slashes(str_replace($friendly, $raw, $_POST['post_header']));
+$post_footer = $admin->add_slashes(str_replace($friendly, $raw, $_POST['post_footer']));
+$comments_header = $admin->add_slashes(str_replace($friendly, $raw, $_POST['comments_header']));
+$comments_loop = $admin->add_slashes(str_replace($friendly, $raw, $_POST['comments_loop']));
+$comments_footer = $admin->add_slashes(str_replace($friendly, $raw, $_POST['comments_footer']));
+$comments_page = $admin->add_slashes(str_replace($friendly, $raw, $_POST['comments_page']));
+$commenting = $_POST['commenting'];
+$posts_per_page = $_POST['posts_per_page'];
+if(extension_loaded('gd') AND function_exists('imageCreateFromJpeg')) {
+	$resize = $_POST['resize'];
+} else {
+	$resize = '';
+}
+
+// Update settings
+$database->query("UPDATE ".TABLE_PREFIX."mod_news_settings SET header = '$header', post_loop = '$post_loop', footer = '$footer', posts_per_page = '$posts_per_page', post_header = '$post_header', post_footer = '$post_footer', comments_header = '$comments_header', comments_loop = '$comments_loop', comments_footer = '$comments_footer', comments_page = '$comments_page', commenting = '$commenting', resize = '$resize' WHERE section_id = '$section_id'");
+
+// Check if there is a db error, otherwise say successful
+if($database->is_error()) {
+	$admin->print_error($database->get_error(), ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+} else {
+	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+}
+
+// Print admin footer
+$admin->print_footer();
+
+?>
\ No newline at end of file

Property changes on: addons/modules/news/save_settings.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/news/save_comment.php
===================================================================
--- addons/modules/news/save_comment.php	(nonexistent)
+++ addons/modules/news/save_comment.php	(revision 84)
@@ -0,0 +1,61 @@
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+require('../../config.php');
+
+// Get id
+if(!isset($_POST['comment_id']) OR !is_numeric($_POST['comment_id'])) {
+	header("Location: ".ADMIN_URL."/pages/index.php");
+} else {
+	$comment_id = $_POST['comment_id'];
+}
+
+// Include WB admin wrapper script
+$update_when_modified = true; // Tells script to update when this page was last updated
+require(WB_PATH.'/modules/admin.php');
+
+// Validate all fields
+if($admin->get_post('title') == '' AND $admin->get_post('comment') == '') {
+	$admin->print_error($MESSAGE['GENERIC']['FILL_IN_ALL'], WB_URL.'/modules/modify_comment.php?page_id='.$page_id.'&section_id='.$section_id.'comment_id='.$id);
+} else {
+	$title = $admin->add_slashes($admin->get_post('title'));
+	$comment = $admin->add_slashes($admin->get_post('comment'));
+	$post_id = $admin->get_post('post_id');
+}
+
+// Update row
+$database->query("UPDATE ".TABLE_PREFIX."mod_news_comments SET title = '$title', comment = '$comment' WHERE comment_id = '$comment_id'");
+
+// Check if there is a db error, otherwise say successful
+if($database->is_error()) {
+	$admin->print_error($database->get_error(), WB_URL.'/modules/news/modify_comment.php?page_id='.$page_id.'&section_id='.$section_id.'&comment_id='.$id);
+} else {
+	$admin->print_success($TEXT['SUCCESS'], WB_URL.'/modules/news/modify_post.php?page_id='.$page_id.'&section_id='.$section_id.'&post_id='.$post_id);
+}
+
+// Print admin footer
+$admin->print_footer();
+
+?>
\ No newline at end of file

Property changes on: addons/modules/news/save_comment.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/news/submit_comment.php
===================================================================
--- addons/modules/news/submit_comment.php	(nonexistent)
+++ addons/modules/news/submit_comment.php	(revision 84)
@@ -0,0 +1,63 @@
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+// Include config file
+require('../../config.php');
+
+// Include admin class
+require_once(WB_PATH.'/framework/class.admin.php');
+$admin = new admin('Start', 'start', false, false);
+
+// Include WB functions file
+if(!defined('FUNCTIONS_CLASS_LOADED')) {
+	require(WB_PATH.'/framework/functions.php');
+}
+
+// Check if we should show the form or add a comment
+if(is_numeric($_GET['page_id']) AND is_numeric($_GET['section_id']) AND isset($_GET['post_id']) AND is_numeric($_GET['post_id']) AND isset($_POST['comment']) AND $_POST['comment'] != '') {
+	
+	// Insert the comment into db
+	$page_id = $_GET['page_id'];
+	$section_id = $_GET['section_id'];
+	$post_id = $_GET['post_id'];
+	$title = $admin->add_slashes(strip_tags($_POST['title']));
+	$comment = $admin->add_slashes(strip_tags($_POST['comment']));
+	$commented_when = mktime();
+	if(isset($admin) AND $admin->is_authenticated() == true) {
+		$commented_by = $admin->get_user_id();
+	} else {
+		$commented_by = '';
+	}
+	$query = $database->query("INSERT INTO ".TABLE_PREFIX."mod_news_comments (section_id,page_id,post_id,title,comment,commented_when,commented_by) VALUES ('$section_id','$page_id','$post_id','$title','$comment','$commented_when','$commented_by')");
+	// Get page link
+	$query_page = $database->query("SELECT link FROM ".TABLE_PREFIX."mod_news_posts WHERE post_id = '$post_id'");
+	$page = $query_page->fetchRow();
+	header('Location: '.page_link($page['link']).'?id='.$post_id);
+	
+} else {
+	header('Location: '.WB_URL.'/pages/');
+}
+
+?>
\ No newline at end of file

Property changes on: addons/modules/news/submit_comment.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/news/add.php
===================================================================
--- addons/modules/news/add.php	(nonexistent)
+++ addons/modules/news/add.php	(revision 84)
@@ -0,0 +1,105 @@
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+// Must include code to stop this file being access directly
+if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
+
+$header = '<style type=\"text/css\">
+.post_title, .post_date { border-bottom: 1px solid #DDDDDD; }
+.post_title { font-weight: bold; font-size: 12px; color: #000000; }
+.post_date { text-align: right; font-weight: bold; }
+.post_short { text-align: justify; padding-bottom: 5px; }
+</style>
+<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">';
+$post_loop = '<tr class=\"post_top\">
+<td class=\"post_title\"><a href=\"[LINK]\">[TITLE]</a></td>
+<td class=\"post_date\">[TIME], [DATE]</td>
+</tr>
+<tr>
+<td class=\"post_short\" colspan=\"2\">
+[SHORT] 
+<a href=\"[LINK]\">[TEXT_READ_MORE]</a>
+</td>
+</tr>';
+$footer = '</table>
+<table cellpadding="0" cellspacing="0" border="0" width="100%" style="display: [DISPLAY_PREVIOUS_NEXT_LINKS]">
+<tr>
+<td width="35%" align="left">[PREVIOUS_PAGE_LINK]</td>
+<td width="30%" align="center">[OF]</td>
+<td width="35%" align="right">[NEXT_PAGE_LINK]</td>
+</tr>
+</table>';
+$post_header = $admin->add_slashes('<table cellpadding="0" cellspacing="0" border="0" width="100%">
+<tr>
+<td height="30"><h1>[TITLE]</h1></td>
+<td rowspan="3" style="display: [DISPLAY_IMAGE]"><img src="[GROUP_IMAGE]" alt="[GROUP_TITLE]" /></td>
+</tr>
+<tr>
+<td valign="top"><b>Posted by [DISPLAY_NAME] ([USERNAME]) on [DATE] at [TIME]</b></td>
+</tr>
+<tr style="display: [DISPLAY_GROUP]">
+<td valign="top"><a href="[BACK]">[PAGE_TITLE]</a> >> <a href="[BACK]?g=[GROUP_ID]">[GROUP_TITLE]</a></td>
+</tr>
+</table>
+<p style="text-align: justify;">');
+$post_footer = '</p>
+<a href=\"[BACK]\">Back</a>';
+$comments_header = $admin->add_slashes('<br /><br />
+<style type="text/css">
+.comment_title { font-weight: bold; }
+.comment_text { font-weight: bold; background-color: #FDFDFD; border-bottom: 1px solid #DDDDDD; padding-bottom: 15px; }
+.comment_title, .comment_text { border-left: 1px solid #DDDDDD; }
+.comment_info { text-align: right; border-right: 1px solid #DDDDDD; }
+.comment_title, .comment_info { border-top: 1px solid #DDDDDD; background-color: #EEEEEE; }
+</style>
+<h2>Comments</h2>
+<table cellpadding="2" cellspacing="0" border="0" width="100%">');
+$comments_loop = $admin->add_slashes('<tr>
+<td class="comment_title">[TITLE]</td>
+<td class="comment_info">By [DISPLAY_NAME] on [DATE] at [TIME]</td>
+</tr>
+<tr>
+<td colspan="2" class="comment_text">[COMMENT]</td>
+</tr>');
+$comments_footer = '</table>
+<br /><a href=\"[ADD_COMMENT_URL]\">Add Comment</a>';
+$comments_page = '<h1>Comment</h1>
+<h2>[POST_TITLE]</h2>
+<br />
+<form name=\"comment\" action=\"[ACTION_URL]\" method=\"post\">
+Title:
+<br />
+<input type=\"text\" name=\"title\" maxlength=\"255\" style=\"width: 90%;\" />
+<br /><br />
+Comment:
+<br />
+<textarea name=\"comment\" style=\"width: 90%; height: 150px;\"></textarea>
+<br /><br />
+<input type=\"submit\" name=\"submit\" value=\"Add Comment\" />';
+$commenting = 'none';
+
+$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_settings (section_id,page_id,header,post_loop,footer,post_header,post_footer,comments_header,comments_loop,comments_footer,comments_page,commenting) VALUES ('$section_id','$page_id','$header','$post_loop','$footer','$post_header','$post_footer','$comments_header','$comments_loop','$comments_footer','$comments_page','$commenting')");
+
+?>
\ No newline at end of file

Property changes on: addons/modules/news/add.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/news/info.php
===================================================================
--- addons/modules/news/info.php	(nonexistent)
+++ addons/modules/news/info.php	(revision 84)
@@ -0,0 +1,34 @@
+<?php
+
+// $Id: info.php,v 1.3 2005/04/08 09:58:31 rdjurovich Exp $
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+$module_directory = 'news';
+$module_name = 'News';
+$module_type = 'page';
+$module_version = '2.5';
+$module_designed_for = '2.x';
+$module_author = 'Ryan Djurovich';
+$module_description = 'This page type is designed for making a news page.';
+
+?>
\ No newline at end of file

Property changes on: addons/modules/news/info.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/news/move_down.php
===================================================================
--- addons/modules/news/move_down.php	(nonexistent)
+++ addons/modules/news/move_down.php	(revision 84)
@@ -0,0 +1,60 @@
+<?php
+
+// $Id: move_down.php,v 1.1.1.1 2005/01/30 10:32:15 rdjurovich Exp $
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+require('../../config.php');
+
+// Get id
+if(!isset($_GET['post_id']) OR !is_numeric($_GET['post_id'])) {
+	if(!isset($_GET['group_id']) OR !is_numeric($_GET['group_id'])) {
+		header("Location: index.php");
+	} else {
+		$id = $_GET['group_id'];
+		$id_field = 'group_id';
+		$table = TABLE_PREFIX.'mod_news_groups';
+	}
+} else {
+	$id = $_GET['post_id'];
+	$id_field = 'post_id';
+	$table = TABLE_PREFIX.'mod_news_posts';
+}
+
+// Include WB admin wrapper script
+require(WB_PATH.'/modules/admin.php');
+
+// Include the ordering class
+require(WB_PATH.'/framework/class.order.php');
+
+// Create new order object an reorder
+$order = new order($table, 'position', $id_field, 'section_id');
+if($order->move_down($id)) {
+	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+} else {
+	$admin->print_error($TEXT['ERROR'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+}
+
+// Print admin footer
+$admin->print_footer();
+
+?>
\ No newline at end of file

Property changes on: addons/modules/news/move_down.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/news/add_post.php
===================================================================
--- addons/modules/news/add_post.php	(nonexistent)
+++ addons/modules/news/add_post.php	(revision 84)
@@ -0,0 +1,58 @@
+<?php
+
+// $Id: add_post.php,v 1.1.1.1 2005/01/30 10:32:19 rdjurovich Exp $
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+require('../../config.php');
+
+// Include WB admin wrapper script
+require(WB_PATH.'/modules/admin.php');
+
+// Include the ordering class
+require(WB_PATH.'/framework/class.order.php');
+// Get new order
+$order = new order(TABLE_PREFIX.'mod_news_posts', 'position', 'post_id', 'section_id');
+$position = $order->get_new($section_id);
+
+// Get default commenting
+$query_settings = $database->query("SELECT commenting FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '$section_id'");
+$fetch_settings = $query_settings->fetchRow();
+$commenting = $fetch_settings['commenting'];
+
+// Insert new row into database
+$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_posts (section_id,page_id,position,commenting,active) VALUES ('$section_id','$page_id','$position','$commenting','1')");
+
+// Get the id
+$post_id = $database->get_one("SELECT LAST_INSERT_ID()");
+
+// Say that a new record has been added, then redirect to modify page
+if($database->is_error()) {
+	$admin->print_error($database->get_error(), WB_URL.'/modules/news/modify_post.php?page_id='.$page_id.'&section_id='.$section_id.'&post_id='.$post_id);
+} else {
+	$admin->print_success($TEXT['SUCCESS'], WB_URL.'/modules/news/modify_post.php?page_id='.$page_id.'&section_id='.$section_id.'&post_id='.$post_id);
+}
+
+// Print admin footer
+$admin->print_footer();
+
+?>
\ No newline at end of file

Property changes on: addons/modules/news/add_post.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/news/comment.php
===================================================================
--- addons/modules/news/comment.php	(nonexistent)
+++ addons/modules/news/comment.php	(revision 84)
@@ -0,0 +1,71 @@
+<?php
+
+// $Id: comment.php,v 1.2 2005/04/02 06:25:56 rdjurovich Exp $
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+// Include config file
+require('../../config.php');
+
+// Check if there is a post id
+if(!isset($_GET['id']) OR !is_numeric($_GET['id'])) {
+	if(!isset($_POST['post_id']) OR !is_numeric($_POST['post_id'])) {
+		header('Location: '.WB_URL.'/pages/');
+	} else {
+		$post_id = $_POST['post_id'];
+	}
+} else {
+	$post_id = $_GET['id'];
+}
+
+// Include database class
+require_once(WB_PATH.'/framework/class.database.php');
+$database = new database();
+
+// Query post for page id
+$query_post = $database->query("SELECT post_id,title,section_id,page_id FROM ".TABLE_PREFIX."mod_news_posts WHERE post_id = '$post_id'");
+if($query_post->numRows() == 0) {
+	header('Location: '.WB_URL.'/pages/');
+} else {
+	$fetch_post = $query_post->fetchRow();
+	$page_id = $fetch_post['page_id'];
+	$section_id = $fetch_post['section_id'];
+	$post_id = $fetch_post['post_id'];
+	$post_title = $fetch_post['title'];
+	define('SECTION_ID', $section_id);
+	define('POST_ID', $post_id);
+	define('POST_TITLE', $post_title);
+	// Get page details
+	$query_page = $database->query("SELECT parent,page_title,menu_title,keywords,description,visibility FROM ".TABLE_PREFIX."pages WHERE page_id = '$page_id'");
+	if($query_page->numRows() == 0) {
+		header('Location: '.WB_URL.'/pages/');
+	} else {
+		$page = $query_page->fetchRow();
+		// Required page details
+		define('PAGE_CONTENT', WB_PATH.'/modules/news/comment_page.php');
+		// Include index (wrapper) file
+		require(WB_PATH.'/index.php');
+	}
+}
+
+
+?>

Property changes on: addons/modules/news/comment.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/news/delete.php
===================================================================
--- addons/modules/news/delete.php	(nonexistent)
+++ addons/modules/news/delete.php	(revision 84)
@@ -0,0 +1,34 @@
+<?php
+
+// $Id: delete.php,v 1.1.1.1 2005/01/30 10:32:21 rdjurovich Exp $
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+// Must include code to stop this file being access directly
+if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
+
+$database->query("DELETE FROM ".TABLE_PREFIX."mod_news_posts WHERE section_id = '$section_id'");
+$database->query("DELETE FROM ".TABLE_PREFIX."mod_news_groups WHERE section_id = '$section_id'");
+$database->query("DELETE FROM ".TABLE_PREFIX."mod_news_comments WHERE section_id = '$section_id'");
+$database->query("DELETE FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '$section_id'");
+
+?>
\ No newline at end of file

Property changes on: addons/modules/news/delete.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/news/add_group.php
===================================================================
--- addons/modules/news/add_group.php	(nonexistent)
+++ addons/modules/news/add_group.php	(revision 84)
@@ -0,0 +1,53 @@
+<?php
+
+// $Id: add_group.php,v 1.1.1.1 2005/01/30 10:32:22 rdjurovich Exp $
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+require('../../config.php');
+
+// Include WB admin wrapper script
+require(WB_PATH.'/modules/admin.php');
+
+// Include the ordering class
+require(WB_PATH.'/framework/class.order.php');
+// Get new order
+$order = new order(TABLE_PREFIX.'mod_news_groups', 'position', 'group_id', 'section_id');
+$position = $order->get_new($section_id);
+
+// Insert new row into database
+$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_groups (section_id,page_id,position,active) VALUES ('$section_id','$page_id','$position','1')");
+
+// Get the id
+$group_id = $database->get_one("SELECT LAST_INSERT_ID()");
+
+// Say that a new record has been added, then redirect to modify page
+if($database->is_error()) {
+	$admin->print_error($database->get_error(), WB_URL.'/modules/news/modify_group.php?page_id='.$page_id.'&section_id='.$section_id.'&group_id='.$group_id);
+} else {
+	$admin->print_success($TEXT['SUCCESS'], WB_URL.'/modules/news/modify_group.php?page_id='.$page_id.'&section_id='.$section_id.'&group_id='.$group_id);
+}
+
+// Print admin footer
+$admin->print_footer();
+
+?>
\ No newline at end of file

Property changes on: addons/modules/news/add_group.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/news/delete_post.php
===================================================================
--- addons/modules/news/delete_post.php	(nonexistent)
+++ addons/modules/news/delete_post.php	(revision 84)
@@ -0,0 +1,70 @@
+<?php
+
+// $Id: delete_post.php,v 1.1.1.1 2005/01/30 10:32:21 rdjurovich Exp $
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+require('../../config.php');
+
+// Get id
+if(!isset($_GET['post_id']) OR !is_numeric($_GET['post_id'])) {
+	header("Location: ".ADMIN_URL."/pages/index.php");
+} else {
+	$post_id = $_GET['post_id'];
+}
+
+// Include WB admin wrapper script
+$update_when_modified = true; // Tells script to update when this page was last updated
+require(WB_PATH.'/modules/admin.php');
+
+// Get post details
+$query_details = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_news_posts WHERE post_id = '$post_id'");
+if($query_details->numRows() > 0) {
+	$get_details = $query_details->fetchRow();
+} else {
+	$admin->print_error($TEXT['NOT_FOUND'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+}
+
+// Unlink post access file
+if(is_writable(WB_PATH.$get_details['link'].'.php')) {
+	unlink(WB_PATH.$get_details['link'].'.php');
+}
+
+// Delete post
+$database->query("DELETE FROM ".TABLE_PREFIX."mod_news_posts WHERE post_id = '$post_id' LIMIT 1");
+
+// Clean up ordering
+require(WB_PATH.'/framework/class.order.php');
+$order = new order(TABLE_PREFIX.'mod_news_posts', 'position', 'post_id', 'section_id');
+$order->clean($section_id); 
+
+// Check if there is a db error, otherwise say successful
+if($database->is_error()) {
+	$admin->print_error($database->get_error(), WB_URL.'/modules/modify_post.php?page_id='.$page_id.'&post_id='.$post_id);
+} else {
+	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+}
+
+// Print admin footer
+$admin->print_footer();
+
+?>
\ No newline at end of file

Property changes on: addons/modules/news/delete_post.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/news/index.php
===================================================================
--- addons/modules/news/index.php	(nonexistent)
+++ addons/modules/news/index.php	(revision 84)
@@ -0,0 +1,3 @@
+<?php
+header("Location: ../../index.php");
+?>
\ No newline at end of file

Property changes on: addons/modules/news/index.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/news/uninstall.php
===================================================================
--- addons/modules/news/uninstall.php	(nonexistent)
+++ addons/modules/news/uninstall.php	(revision 84)
@@ -0,0 +1,38 @@
+<?php
+
+// $Id: uninstall.php,v 1.3 2005/04/25 11:53:12 rdjurovich Exp $
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+// Must include code to stop this file being access directly
+if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
+
+$database->query("DELETE FROM ".TABLE_PREFIX."search WHERE name = 'module' AND value = 'news'");
+$database->query("DELETE FROM ".TABLE_PREFIX."search WHERE extra = 'news'");
+$database->query("DROP TABLE ".TABLE_PREFIX."mod_news_posts");
+$database->query("DROP TABLE ".TABLE_PREFIX."mod_news_groups");
+$database->query("DROP TABLE ".TABLE_PREFIX."mod_news_comments");
+$database->query("DROP TABLE ".TABLE_PREFIX."mod_news_settings");
+require(WB_PATH.'/framework/functions.php');
+rm_full_dir(WB_PATH.PAGES_DIRECTORY.'/posts');
+
+?>
\ No newline at end of file

Property changes on: addons/modules/news/uninstall.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/news/move_up.php
===================================================================
--- addons/modules/news/move_up.php	(nonexistent)
+++ addons/modules/news/move_up.php	(revision 84)
@@ -0,0 +1,60 @@
+<?php
+
+// $Id: move_up.php,v 1.1.1.1 2005/01/30 10:32:20 rdjurovich Exp $
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+require('../../config.php');
+
+// Get id
+if(!isset($_GET['post_id']) OR !is_numeric($_GET['post_id'])) {
+	if(!isset($_GET['group_id']) OR !is_numeric($_GET['group_id'])) {
+		header("Location: index.php");
+	} else {
+		$id = $_GET['group_id'];
+		$id_field = 'group_id';
+		$table = TABLE_PREFIX.'mod_news_groups';
+	}
+} else {
+	$id = $_GET['post_id'];
+	$id_field = 'post_id';
+	$table = TABLE_PREFIX.'mod_news_posts';
+}
+
+// Include WB admin wrapper script
+require(WB_PATH.'/modules/admin.php');
+
+// Include the ordering class
+require(WB_PATH.'/framework/class.order.php');
+
+// Create new order object an reorder
+$order = new order($table, 'position', $id_field, 'section_id');
+if($order->move_up($id)) {
+	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+} else {
+	$admin->print_error($TEXT['ERROR'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+}
+
+// Print admin footer
+$admin->print_footer();
+
+?>
\ No newline at end of file

Property changes on: addons/modules/news/move_up.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/news/delete_group.php
===================================================================
--- addons/modules/news/delete_group.php	(nonexistent)
+++ addons/modules/news/delete_group.php	(revision 84)
@@ -0,0 +1,52 @@
+<?php
+
+// $Id: delete_group.php,v 1.1.1.1 2005/01/30 10:32:17 rdjurovich Exp $
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+require('../../config.php');
+
+// Get id
+if(!isset($_GET['group_id']) OR !is_numeric($_GET['group_id'])) {
+	header("Location: ".ADMIN_URL."/pages/index.php");
+} else {
+	$group_id = $_GET['group_id'];
+}
+
+// Include WB admin wrapper script
+$update_when_modified = true; // Tells script to update when this page was last updated
+require(WB_PATH.'/modules/admin.php');
+
+// Update row
+$database->query("DELETE FROM ".TABLE_PREFIX."mod_news_groups WHERE group_id = '$group_id'");
+
+// Check if there is a db error, otherwise say successful
+if($database->is_error()) {
+	$admin->print_error($database->get_error(), ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+} else {
+	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+}
+
+// Print admin footer
+$admin->print_footer();
+
+?>
\ No newline at end of file

Property changes on: addons/modules/news/delete_group.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: addons/modules/news/delete_comment.php
===================================================================
--- addons/modules/news/delete_comment.php	(nonexistent)
+++ addons/modules/news/delete_comment.php	(revision 84)
@@ -0,0 +1,59 @@
+<?php
+
+// $Id: delete_comment.php,v 1.1.1.1 2005/01/30 10:32:20 rdjurovich Exp $
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2005, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+require('../../config.php');
+
+// Get id
+if(!isset($_GET['comment_id']) OR !is_numeric($_GET['comment_id'])) {
+	header("Location: ".ADMIN_URL."/pages/index.php");
+} else {
+	$comment_id = $_GET['comment_id'];
+}
+
+// Get post id
+if(!isset($_GET['post_id']) OR !is_numeric($_GET['post_id'])) {
+	header("Location: ".ADMIN_URL."/pages/index.php");
+} else {
+	$post_id = $_GET['post_id'];
+}
+
+// Include WB admin wrapper script
+$update_when_modified = true; // Tells script to update when this page was last updated
+require(WB_PATH.'/modules/admin.php');
+
+// Update row
+$database->query("DELETE FROM ".TABLE_PREFIX."mod_news_comments  WHERE comment_id = '$comment_id'");
+
+// Check if there is a db error, otherwise say successful
+if($database->is_error()) {
+	$admin->print_error($database->get_error(), WB_URL.'/modules/news/modify_post.php?page_id='.$page_id.'&section_id='.$section_id.'&post_id='.$post_id);
+} else {
+	$admin->print_success($TEXT['SUCCESS'], WB_URL.'/modules/news/modify_post.php?page_id='.$page_id.'&section_id='.$section_id.'&post_id='.$post_id);
+}
+
+// Print admin footer
+$admin->print_footer();
+
+?>
\ No newline at end of file

Property changes on: addons/modules/news/delete_comment.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
