1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <title>Blubb</title>
5 <style type="text/css">@import url('../ObjectListViewport.css');</style>
8 <meta name="generator" content="my hands">
9 <meta name="description" content="GOsa - Login">
10 <meta name="author" lang="de" content="Cajus Pollmeier">
12 <meta http-equiv="Expires" content="Mon, 26 Jul 1997 05:00:00 GMT">
14 <meta http-equiv="Last-Modified" content="Friday, 09th November 2007 09:14:31 +0000 GMT">
15 <meta http-equiv="Cache-Control" content="no-cache">
16 <meta http-equiv="Pragma" content="no-cache">
17 <meta http-equiv="Cache-Control" content="post-check=0, pre-check=0">
18 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
20 <style type="text/css">@import url('themes/default/style.css');</style>
21 <link rel="shortcut icon" href="favicon.ico">
23 <script language="javascript" src="../ObjectListViewport.js" type="text/javascript"></script>
24 <script language="javascript" src="include/png.js" type="text/javascript"></script>
25 <script language="javascript" src="include/calendar.js" type="text/javascript"></script>
26 <script language="javascript" src="include/focus.js" type="text/javascript"></script>
27 <script language="javascript" src="include/warning.js" type="text/javascript"></script>
28 </head>
29 <body>
30 <button onclick='updateObjectListViewportSize();'>Tester</button>
31 <a href="?d=hf">No Footer & Header</a> -
32 <a href="?d=f">No Footer</a> -
33 <a href="?d=h">No Header</a> -
34 <a href="?d=">Normal</a>
35 <?php
37 /* This is good for testing... */
38 error_reporting (E_ALL | E_STRICT);
40 session_start();
42 function get_smarty()
43 {
44 echo "Smarty fake in each ./tests/ListTest[1-9]/index.php";
45 date_default_timezone_set("europe/berlin");
46 $smarty = new smarty;
47 /* Set template compile directory */
48 $smarty->compile_dir= '/var/spool/gosa/';
49 $smarty->template_dir = '../';
50 $smarty->caching= false;
51 $smarty->php_handling= SMARTY_PHP_REMOVE;
52 return($smarty);
53 }
57 /* Escape all preg_* relevant characters */
58 function normalizePreg($input)
59 {
60 return (addcslashes($input, '[]()|/.*+-'));
61 }
64 /* Initiate autoloader... */
65 require_once("../../../include/autoload.inc");
66 restore_error_handler();
67 try {
69 /* Get new test instance of the Configuration */
70 $cr= Registry::getInstance("ConfigManager");
71 $cr->load("../../../gosa.conf");
73 /* Get a new test instance of ObjectListViewports */
75 if(!isset($_SESSION['vp1'])){
76 $_SESSION['vp1'] = new ObjectListViewport("plugin/sample");
77 $_SESSION['vp2'] = new ObjectListViewport("plugin/sample");
78 }
79 $vp1 = $_SESSION['vp1'];
80 $vp2 = $_SESSION['vp2'];
82 if(isset($_GET['d']) && preg_match("/f/",$_GET['d'])){
83 $vp1->enableFooter(FALSE);
84 $vp2->enableFooter(FALSE);
85 }
86 if(isset($_GET['d']) && preg_match("/h/",$_GET['d'])){
87 $vp1->enableHeader(FALSE);
88 $vp2->enableHeader(FALSE);
89 }
90 $content1= $vp1->render();
91 $content2= $vp2->render();
93 $str = preg_replace("/%LIST%/",$content1,file_get_contents('tpl'));
94 $str = preg_replace("/%LIST2%/",$content2,$str);
95 echo $str;
97 } catch (Exception $e) {
98 echo "\n-GOsa Exception-----------------------------------------------------------\n\n".
99 $e->__toString().
100 "\n\n--------------------------------------------------------------------------\n\n";
101 }
103 ?>
104 </body>
105 </html>