wwwroot); header("Link: <". $CFG->themewww . '/mobile_friendly/common/powder/powder.xml>; rel="describedby"; type="application/powder+xml";'); } $switch = get_config('W3CMobileAuthoringToolLibrary', 'switch_template'); try{ include(dirname(__FILE__) . '/switch.php'); $error = false; } catch(Excpetion $e){ $log = new FileLogger(); $log->add_message( 'Error while switching theme. Error ' . $e->getCode() . ' occured in ' . $e->getFile() . ' line ' . $e->getLine() . '. ' . $e->getMessage(), 'error' ); $error = true; } if($switch=='0' || $error){ my_setup_theme($default_template, array('forceconfig='.$default_template)); $output = my_print_header($title, $heading, $navigation, $focus, $meta, $cache, $button, $menu, $usexml, $bodytags, true); $reg_expr = ']*styles.php[^\?][^\>]*>'; echo preg_replace('/'.$reg_expr.'/', '', $output); } else if($need_switch){ my_setup_theme($newTemplate, array('forceconfig='.$newTemplate)); $output = my_print_header($title, $heading, $navigation, $focus, $meta, $cache, $button, $menu, $usexml, $bodytags, true); $reg_expr = ']*styles.php[^\?][^\>]*>'; echo preg_replace('/'.$reg_expr.'/', '', $output); } else{ ?>