[Paulscriptsmods-checkin] pg3/root/includes functions_guestbook.php, 1.1, 1.2
Status: Beta
Brought to you by:
paulsohier
|
From: Paul S. <pau...@us...> - 2007-12-02 11:21:23
|
Update of /cvsroot/paulscriptsmods/pg3/root/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27600/root/includes Modified Files: functions_guestbook.php Log Message: Editors... Index: functions_guestbook.php =================================================================== RCS file: /cvsroot/paulscriptsmods/pg3/root/includes/functions_guestbook.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** functions_guestbook.php 30 Sep 2007 13:02:58 -0000 1.1 --- functions_guestbook.php 2 Dec 2007 11:17:26 -0000 1.2 *************** *** 28,74 **** 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(); } } --- 28,73 ---- 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(); } } *************** *** 76,88 **** 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; } } --- 75,87 ---- 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; } } |