No Footer & Header -
No Footer -
No Header -
Normal
compile_dir= '/var/spool/gosa/';
$smarty->template_dir = '../';
$smarty->caching= false;
$smarty->php_handling= SMARTY_PHP_REMOVE;
return($smarty);
}
/* Escape all preg_* relevant characters */
function normalizePreg($input)
{
return (addcslashes($input, '[]()|/.*+-'));
}
/* Initiate autoloader... */
require_once("../../../include/autoload.inc");
restore_error_handler();
try {
/* Get new test instance of the Configuration */
$cr= Registry::getInstance("ConfigManager");
$cr->load("../../../gosa.conf");
/* Get a new test instance of ObjectListViewports */
if(!isset($_SESSION['vp1'])){
$_SESSION['vp1'] = new ObjectListViewport("plugin/sample");
$_SESSION['vp2'] = new ObjectListViewport("plugin/sample");
}
$vp1 = $_SESSION['vp1'];
$vp2 = $_SESSION['vp2'];
if(isset($_GET['d']) && preg_match("/f/",$_GET['d'])){
$vp1->enableFooter(FALSE);
$vp2->enableFooter(FALSE);
}
if(isset($_GET['d']) && preg_match("/h/",$_GET['d'])){
$vp1->enableHeader(FALSE);
$vp2->enableHeader(FALSE);
}
$content1= $vp1->render();
$content2= $vp2->render();
$str = preg_replace("/%LIST%/",$content1,file_get_contents('tpl'));
$str = preg_replace("/%LIST2%/",$content2,$str);
echo $str;
} catch (Exception $e) {
echo "\n-GOsa Exception-----------------------------------------------------------\n\n".
$e->__toString().
"\n\n--------------------------------------------------------------------------\n\n";
}
?>