/[ludap]/ludap/setup.php
ViewVC logotype

Diff of /ludap/setup.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by mose, Wed Sep 3 11:43:50 2003 UTC revision 1.6 by mose, Thu Sep 4 18:19:14 2003 UTC
# Line 23  the Free Software Foundation, Inc., Line 23  the Free Software Foundation, Inc.,
23  error_reporting(E_ALL);  error_reporting(E_ALL);
24  ini_set('register_globals','off');  ini_set('register_globals','off');
25    
26    /*
27    $ipath = ini_get('include_path');
28    $isep = (strstr($ipath,';')) ? ';' : ':';
29    ini_set('include_path', LUDAP_DIR.$isep.$ipath);
30    */
31    // setup.smarty.php initialize the classes
32    // $S for the smarty instance
33    // $C for the config instance
34    require('setup.smarty.php');
35    
36    include LUDAP_DIR.'ludap.lib.php';
37    $L = new ludap($C,'ludap.conf');
38    $L->conn() or die("Impossible to connect");
39    
40    
41  if (get_magic_quotes_gpc()) {  if (get_magic_quotes_gpc()) {
42    foreach($_REQUEST as $k=>$v) {    foreach($_REQUEST as $k=>$v) {
43      if (!is_array($_REQUEST[$k])) $_REQUEST[$k] = stripslashes($v);      if (!is_array($_REQUEST[$k])) $_REQUEST[$k] = stripslashes($v);
44    }    }
45  }  }
46    
 define("SMARTY_DIR", LUDAP_DIR."smarty/");  
 require_once(SMARTY_DIR.'Smarty.class.php');  
 require_once(SMARTY_DIR.'Config_File.class.php');  
   
 class Smarty_ludap extends Smarty {  
   
         function Smarty_ludap() {  
                 $this->Smarty();  
                 $this->template_dir = LUDAP_DIR."templates";  
                 $this->compile_dir = SMARTY_DIR."tmp/templates_c";  
                 $this->config_dir = LUDAP_DIR."etc";  
                 $this->plugins_dir = array(SMARTY_DIR."plugins");  
                           
                 $this->caching = 0;  
                 $this->cache_dir = SMARTY_DIR."tmp/cache";  
                 $this->cache_lifetime = -1;  
                 $this->cache_modified_check = true;  
                   
                 $this->php_handling = SMARTY_PHP_ALLOW;  
                 $this->compile_id = "";  
                 #$this->_smarty_debug_id = 'dbg';  
                   
                 // compile_check & force_compile  
                 // = false au passage en prod  
                 $this->compile_check = true;  
                 $this->force_compile = false;  
                   
                 // debugging = false au passage en prod  
                 $this->debugging = false;  
                 $this->debug_tpl = "";  
                 $this->debugging_ctrl = "URL";  
   
                 $this->assign('app_name','LuDAP');  
         }  
   
 }  
   
47  session_start();  session_start();
48    
 $S = new Smarty_ludap;  
   
 $C = new Config_File($S->config_dir);  
 $C->boolean = true;  
 $C->overwrite = true;  
   
 include LUDAP_DIR.'ludap.lib.php';  
 $L = new ludap($C,'ludap.conf');  
 $L->conn() or die("Impossible to connect");  
   
49  $me        = (isset($_SESSION['me']) and !isset($_GET['logout'])) ? $_SESSION['me'] : false;  $me        = (isset($_SESSION['me']) and !isset($_GET['logout'])) ? $_SESSION['me'] : false;
50  $admin     = (isset($_SESSION['admin']) and !isset($_GET['logout'])) ? $_SESSION['admin'] : false;  $admin     = (isset($_SESSION['admin']) and !isset($_GET['logout'])) ? $_SESSION['admin'] : false;
51  $login     = (isset($_POST['login'])) ? $_POST['login'] : false;  $login     = (isset($_POST['login'])) ? $_POST['login'] : false;

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26