themes
[ class tree: themes ] [ index: themes ] [ all elements ]

Source for file switch_theme.php

Documentation is available at switch_theme.php

  1. <?php 
  2. /**
  3.  * @version $Header$
  4.  * @package themes
  5.  * @subpackage functions
  6.  */
  7.  
  8. /**
  9.  * Setup
  10.  */
  11. require_once'../kernel/setup_inc.php' );
  12. include_onceKERNEL_PKG_PATH.'BitBase.php' );
  13.  
  14. if (isset($_SERVER['HTTP_REFERER'])) {
  15.     $orig_url $_SERVER['HTTP_REFERER'];
  16. else {
  17.     $orig_url $bit_index;
  18. }
  19.  
  20. if (isset($_GET['theme']&& $gBitSystem->getConfig('users_themes'== 'y'){
  21.     $new_theme $_GET['theme'];
  22.  
  23.     if(isset($gBitUser&& $gBitSystem->getConfig('users_preferences'== 'y' {  
  24.         $gBitUser->storePreference('theme',$new_theme);
  25.         setcookie('bit-theme'''time()-3600*24*30*12$gBitSystem->getConfig('cookie_path')$gBitSystem->getConfig('cookie_domain'));
  26.     else {
  27.         setcookie('bit-theme'$new_themetime()+3600*24*30*12$gBitSystem->getConfig('cookie_path')$gBitSystem->getConfig('cookie_domain'));
  28.     }
  29. else{
  30.     setcookie('bit-theme'''time()-3600*24*30*12$gBitSystem->getConfig('cookie_path')$gBitSystem->getConfig('cookie_domain'));
  31. }
  32.  
  33. header("location: $orig_url");
  34. exit;
  35. ?>

Documentation generated on Wed, 29 Jul 2015 13:57:29 +0000 by phpDocumentor 1.5.0-lsces