WebsiteBaker 2.13.8 is now available!
R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WBhttps://forum.websitebaker.org/index.php/topic,32355.0.html
require(WB_PATH.'/templates/'.TEMPLATE.'/index.php');
if ($_GET['template']!="") { if(file_exists(WB_PATH.'/templates/'.$_GET['template'].'/index.php')) { define('TEMPLATE',$_GET['template']); require(WB_PATH.'/templates/'.TEMPLATE.'/index.php'); }} require(WB_PATH.'/templates/'.TEMPLATE.'/index.php');
// Figure out which page to display// Stop processing if intro page was shown$wb->page_select() or die();// Figure out what template to use - DFD allows 'template' variable in the URL to call a different templateif ($_GET['template']!="") if(file_exists(WB_PATH.'/templates/'.$_GET['template'].'/index.php')) define('TEMPLATE',$_GET['template']);// Collect info about the currently viewed page// and check permissions$wb->get_page_details();
// get the template to display from URLif ($_GET['template']!="") { if(file_exists(WB_PATH.'/templates/'.$_GET['template'].'/index.php')) { define('TEMPLATE',$_GET['template']); $_SESSION['TEMPLATE']=TEMPLATE; }}// get the template to display from Session Variableelse { if(isset($_SESSION['TEMPLATE']) AND $_SESSION['TEMPLATE'] != '') define('TEMPLATE',$_SESSION['TEMPLATE']);}
// Collect info about the currently viewed page// and check permissions$wb->get_page_details();
// Collect info about the currently viewed page // and check permissions // Sticky Template switcher if ($_GET['template']!="") { // get the template to display from URL if(file_exists(WB_PATH.'/templates/'.$_GET['template'].'/index.php')) { define('TEMPLATE',$_GET['template']); $_SESSION['TEMPLATE']=TEMPLATE; } } else { // else get the template to display from Session Variable if(isset($_SESSION['TEMPLATE']) AND $_SESSION['TEMPLATE'] != '') define('TEMPLATE',$_SESSION['TEMPLATE']); } $wb->get_page_details();
// Display the filtered output on the frontend echo filter_frontend_output($frontend_output); // from here , Template switcher ----------------------------------------------------------------- echo "<body><html><div style='position: absolute; right: 0px ; top: 10px; width: 170px; height: 30px;' >" ; $return= ''; $lineBreak = "\n"; $lang_theme_selection = array( 'reset_theme' => 'Standard-Design', 'choose_theme' => 'Wähle Design', ); $CurrentTheme.="template="; // get list of available themes $value = $CONFIG['template']; $theme_dir = WB_PATH.'/templates/'; $dir = opendir($theme_dir); while ($file = readdir($dir)) { if (is_dir($theme_dir . $file) && $file != "." && $file != ".." && $file != 'CVS' && $file != 'sample' && $file != '.svn') { $theme_array[] = $file; } } closedir($dir); //start the output $return.= $lineBreak . '<form name="ChooseTheme" id="ChooseTheme" action="' . $_SERVER['PHP_SELF'] . '" method="get" style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;display:inline">' . $lineBreak; $return.= '<select name="ThemeSelect" class="listbox" onchange="if (this.options[this.selectedIndex].value) window.location.href=\'' . '?' . $CurrentTheme . '\' + this.options[this.selectedIndex].value;">' . $lineBreak; $return.='<option selected="selected">' . $lang_theme_selection['choose_theme'] . '</option>'; foreach ($theme_array as $theme) { $return.= '<option value="' . $theme . '"'.($value == $theme ? ' selected="selected"' : '').'>' . strtr(ucfirst($theme), '_', ' ') . ($value == $theme ? ' *' : ''). '</option>' . $lineBreak; } $return.= '</select>' . $lineBreak; $return.= '</form>' . $lineBreak; echo $return; echo "</div></body></html>" ; // to here -> Templatewechsel Ende ------------------------------------------------------------------------
echo filter_frontend_output($frontend_output);
die;
betweenCode: echo filter_frontend_out put($frontend_output); andCode: die;