Guest User

user_functions()

a guest
Dec 20th, 2011
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.76 KB | None | 0 0
  1. function user_functions()
  2. {
  3.     if ($_SESSION['class'] == U_ROOT) {
  4.  
  5.     $action = isset($_GET["action"]) ? $_GET["action"] : '';
  6.    
  7.   $ad_actions = array('adduser'            => 'adduser',
  8.                                 'deleteuser'             => 'deleteuser',
  9.                                 'updateuser'             => 'updateuser',
  10.                       'deletepost'         => 'deletepost',
  11.                       'updatepost'           => 'updatepost',
  12.                       'newpost'                => 'newpost'
  13.                         );    
  14.    
  15.     if( in_array($action, $ad_actions) AND file_exists( "../quote/admin/{$ad_actions[ $action ]}.php"))
  16.     {
  17.       require_once "../quote/admin/{$ad_actions[ $action ]}.php";
  18.     }
  19.     else
  20.     {
  21.       require_once "../quote/add.php";
  22.      
  23.       }
  24.     }
Advertisement
Add Comment
Please, Sign In to add comment