Ver Mensaje Individual
  #4 (permalink)  
Antiguo 23/07/2011, 14:36
Avatar de Most
Most
 
Fecha de Ingreso: marzo-2009
Mensajes: 642
Antigüedad: 15 años, 1 mes
Puntos: 6
Respuesta: rango en portal - apartado de phpbb3 ¿?

he encontrado este codigo en un script de php, no se si me servira:

Código PHP:
Ver original
  1. define('IN_PHPBB', true);
  2. // Enable the debug mode
  3. if (!defined('DEBUG'))
  4. {
  5.     @define('DEBUG', true);
  6. }
  7. // Enable the full debug mode
  8. if (!defined('DEBUG_EXTRA'))
  9. {
  10.     @define('DEBUG_EXTRA', true);
  11. }
  12. // Include files
  13. $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
  14. $phpEx = substr(strrchr(__FILE__, '.'), 1);
  15. require($phpbb_root_path . 'common.' . $phpEx);
  16.  
  17. // Start session management
  18. $user->session_begin();
  19. $auth->acl($user->data);
  20. $user->setup();
  21. // End session management
  22.  
  23. // Have they authenticated (again) as an admin for this session?
  24. if (!isset($user->data['session_admin']) || !$user->data['session_admin'])
  25. {
  26.     login_box('', $user->lang['LOGIN_ADMIN_CONFIRM'], $user->lang['LOGIN_ADMIN_SUCCESS'], true, false);
  27. }
  28.  
  29. // Is user any type of admin? No, then stop here, each script needs to
  30. // check specific permissions but this is a catchall
  31. if (!$auth->acl_get('a_'))
  32. {
  33.     trigger_error('NO_ADMIN');
  34. }
  35.  
  36. // application/xhtml+xml not used because of IE
  37. header('Content-type: text/html; charset=UTF-8');
  38.  
  39. header('Cache-Control: private, no-cache="set-cookie"');
  40. header('Expires: 0');
  41. header('Pragma: no-cache');
  42.  
  43.     static $charset = array();