Guest User

Untitled

a guest
Jan 19th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.27 KB | None | 0 0
  1. require_once 'lib/personas_constants.php';
  2.     require_once 'lib/personas_functions.php';
  3.     require_once 'lib/storage.php';
  4.     require_once 'lib/user.php';
  5.         require_once 'lib/src.php';
  6.         include 'templates/cachecheck.php';
  7.  
  8.     $db = new PersonaStorage();
  9.     $user = new PersonaUser();
  10.     $username = $user->authenticate();
  11.  
  12.     $categories = $db->get_categories();
  13.     array_unshift($categories, 'All');
  14.     $category = null;
  15.  
  16.     $path = array_key_exists('PATH_INFO', $_SERVER) ? $_SERVER['PATH_INFO'] : '/';
  17.     $path = substr($path, 1); #chop the lead slash
  18.     list($persona_id) = explode('/', $path);
  19.     $page_header = _("View Personas");
  20.  
  21.     if (!is_numeric($persona_id))
  22.         $persona_id = null;
  23.     else
  24.     {
  25.         $persona_id = intval($persona_id);
  26.  
  27.         $persona = $db->get_persona_by_id($persona_id);
  28.         if ($persona['status'] == 1)
  29.             $page_header = sprintf(/*L10N: %1$s is the persona name, %2$s is the author name*/_('%1$s by %2$s'), $persona['name'], $persona['display_username']);
  30.             $category = $persona['category'];
  31.         $persona['json'] = htmlentities(json_encode(extract_record_data($persona)));
  32.     }
  33.  
  34.     $favorite_persona = $username ? $db->is_favorite_persona($username, $persona_id) : null;
  35.     $nonce =  $user->generate_nonce('favoritespage');
  36.     $url_prefix = '/gallery';
  37.     $tabs = null;
Add Comment
Please, Sign In to add comment