PHP switch theme from browser URL -


i have list of theme users can select theme demo. want user able change theme browser:

domain.com/?theme=bootstrap-2

a default function set theme is:

$this->setdefaultview("client/bootstrap-1"); 

i tried code not yet effective:

/*===================== theme switcher ========= */   $stylesarr = array('bootstrap-1', 'bootstrap-2', 'bootstrap-3', 'bootstrap-4');  if(isset($_cookie['theme']) && in_array($_cookie['theme'], $stylesarr)) {     $style = '' . $_cookie['theme'] . ''; } else {     $style = 'bootstrap-1'; //default theme }   if(isset($_get['theme']) && in_array($_get['theme'], $stylesarr)){          $this->setdefaultview("client/".$stylesarr);       } else {               $this->setdefaultview("client/bootstrap-1"); }   /* =================== theme switcher ========= */   

i use blesta billing hosting.


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -