// $Header$ // Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. // All Rights Reserved. See below for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details. // Initialization require_once '../kernel/setup_inc.php'; include_once SHOUTBOX_PKG_PATH . 'Shoutbox.php'; $gShout = new Shoutbox(); $gBitSystem->verifyPackage('shoutbox'); $gBitSystem->verifyPermission('p_shoutbox_view'); $feedback = NULL; $edit = NULL; // Permissioning is handled in the class, where it should be... if (isset($_REQUEST["remove"])) { if ($gShout->expunge($_REQUEST["remove"])) { $feedback['success'] = tra("Message removed"); } else { $feedback['error'] = $gShout->mErrors['expunge']; } } elseif (isset($_REQUEST["shoutbox_admin"]) && $gBitUser->isAdmin()) { $gBitSystem->storeConfig('shoutbox_autolink', isset($_REQUEST["shoutbox_autolink"]) ? $_REQUEST["shoutbox_autolink"] : NULL, SHOUTBOX_PKG_NAME); $gBitSystem->storeConfig('shoutbox_email_notice', isset($_REQUEST["shoutbox_email_notice"]) ? 'y' : NULL, SHOUTBOX_PKG_NAME); $gBitSystem->storeConfig('shoutbox_smileys', isset($_REQUEST["shoutbox_smileys"]) ? 'y' : NULL, SHOUTBOX_PKG_NAME); // to be on the safe side, we will simply nuke the entire shoutbox cache $gShout->mCache->expungeCache(); } if (!empty($_REQUEST["save"]) && $gBitUser->hasPermission('p_shoutbox_post')) { if ($gShout->store($_REQUEST)) { $feedback['success'] = tra("Message saved"); } else {