Location: PHPKode > projects > Cadence Guestbook Host > cadence/class/admin.php
<?php

/************************************
 * Cadence
 * Remotely Hosted Guestbook Script.
 * (c) 2006, Dennis Pedrie
 * www.CadenceBook.com
 * admin.php
 ***********************************
 * Cadence Guestbook is licensed under
 * a Creative Commons License.
 * More information is available by visiting
 * http://creativecommons.org/licenses/by/3.0/
 * or the LICENSE file in the Cadence Root Folder
 ***********************************/

class admin {
	function acpnews() {
		global $db,$q;
		$news = $db->get_results($q->acpnews());
		if($db->num_rows > 0) {
			foreach($news as $news) {
				$thenews[] = '<div style="border:1px dashed #bbb; padding:3px; margin-top:15px;"><strong>'. $news->news_title .'</strong><br />
				Posted on:'. date("M d, Y g:i A", $news->news_date) .'<br /><br />
				'. $news->news_content .'</div>';				
			}
		}
		return $thenews;	
	}
	
	function acpnotes() {
		global $book,$gbook;
		return '		<div style="border:1px dashed #bbb; padding:3px; margin-top:15px; text-align:center;" align="center">
		 <form style="margin:auto" method="post" action="index.php?book='. $book .'&amp;act=admin&amp;acpact=idx&amp;do=editnote">
		  <textarea name="notes" cols="50" rows="5">'. $gbook->acpnotes .'</textarea><br />
		  <center><input type="submit" name="submit" value="Submit" /></center>
		 </form>
		</div>';
	}
}

?>
Return current item: Cadence Guestbook Host