[Paulscriptsmods-checkin] pg3/root/includes functions_guestbook.php, NONE, 1.1
Status: Beta
Brought to you by:
paulsohier
From: Paul S. <pau...@us...> - 2007-09-30 13:02:58
|
Update of /cvsroot/paulscriptsmods/pg3/root/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17781 Added Files: functions_guestbook.php Log Message: another file. --- NEW FILE: functions_guestbook.php --- <?php /** * * @package profile guestbook * @version $Id: functions_guestbook.php,v 1.1 2007/09/30 13:02:58 paulsohier Exp $ * @copyright (c) 2007 Paul Sohier * @license http://opensource.org/licenses/gpl-license.php GNU Public License * */ /** */ if (!defined('IN_PHPBB')) { exit; } $gb = new guestbook(); $gb->display(); class guestbook { function guestbook () { } function display() { global $auth; $mode = request_var('gb', ''); switch ($mode) { case 'post': if ($auth->acl_get('u_gb_post')) { $this->post(); } else { trigger_error('NO_PERMISSION'); } break; case 'delete': if ($auth->acl_get('u_gb_delete')) { /** * @TODO: Use confirm box? */ $id = request_var('id', 0); if (!$id) { trigger_error('NO_POST'); } $sql = 'DELETE FROM ' . PROFILE_GUESTBOOK_TABLE . ' WHERE guestbook_id = ' . $id; $db->sql_query($sql); trigger_error('MESSAGE_DELETED');// Add return? } else { trigger_error('NO_PERMISSION'); } break; default: $this->view(); } } function view() { global $auth, $db, $user; // Member is a variable in memberlist.php that contains userdata from the current user. // If this var isnt present we cant run the guestbook really. global $member; if (!$member) { return; } } } ?> |