Code

df138401f9d0c5590b0c9be4b94f390fed8515ec
[gosa.git] / ListTest / 2 / index.php
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 &amp; 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 /* Escape all preg_* relevant characters */
41 function normalizePreg($input)
42 {
43   return (addcslashes($input, '[]()|/.*+-'));
44 }
47 /* Initiate autoloader... */
48 require_once("../../include/autoload.inc");
49 restore_error_handler();
50 try {
52         /* Get new test instance of the Configuration */
53         $cr= Registry::getInstance("ConfigManager");
54         $cr->load("../../gosa.conf");
56         /* Get a new test instance of ObjectListViewports */
57         $vp= new ObjectListViewport("plugin/sample");
58         if(isset($_GET['d']) && preg_match("/f/",$_GET['d'])){
59                 $vp->enableFooter(FALSE);
60         }
61         if(isset($_GET['d']) && preg_match("/h/",$_GET['d'])){
62                 $vp->enableHeader(FALSE);
63         }
64         $content= $vp->render();
66         echo preg_replace("/%LIST%/",$content,file_get_contents('tpl'));        
68 } catch (Exception $e) {
69         echo "\n-GOsa Exception-----------------------------------------------------------\n\n".
70                  $e->__toString().
71                  "\n\n--------------------------------------------------------------------------\n\n";
72 }
74 ?>
75 </body>
76 </html>