function Avatars() { global $CFG, $aAvatars; // What are they wanting to do? switch ($_REQUEST['action']) { case 'add': AddAvatar(); case 'remove': RemoveAvatar(); case 'edit': EditAvatar(); } // Are they coming for the first time or submitting information? if (isset($_REQUEST['submit'])) { // Submitting information, so store it. $aOptions['maxdims'] = abs((int) $_REQUEST['maxdims']); $aOptions['maxsize'] = abs((int) $_REQUEST['maxsize']); // Validate the information, and submit it to the database if everything's okay. UpdateAvatars($aOptions); } else { // Coming for the first time, so set the defaults. $aOptions['maxdims'] = $CFG['avatars']['maxdims']; $aOptions['maxsize'] = $CFG['avatars']['maxsize']; } // Template require "./skins/{$CFG['skin']}/admincp/avatars.tpl.php"; // Send the page. exit; }
// Is the user logged in? if (!$_SESSION['loggedin']) { // No, so they can't access their control panel. Unauthorized(); } // What section do they want to view? switch ($_REQUEST['section']) { case 'profile': $strSection = $_REQUEST['section']; EditProfile(); case 'options': $strSection = $_REQUEST['section']; EditOptions(); case 'avatar': $strSection = $_REQUEST['section']; EditAvatar(); case 'password': $strSection = $_REQUEST['section']; EditPassword(); case 'buddylist': $strSection = $_REQUEST['section']; EditBuddyList(); case 'ignorelist': $strSection = $_REQUEST['section']; EditIgnoreList(); default: $strSection = 'index'; ShowIndex(); } // *************************************************************************** \\ function ShowIndex()