[ Index ]
 

Code source de eGroupWare 1.2.106-2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/mydms/inc/ -> inc.Settings.php (source)

   1  <?php
   2  if(!isset($GLOBALS['egw_info']) || !is_array($GLOBALS['egw_info']))
   3  {
   4      $GLOBALS['egw_info']['flags'] = array(
   5              'currentapp' => 'mydms',
   6              'noheader'   => True,
   7              'nonavbar'   => True
   8      );
   9  
  10      include('../../header.inc.php');
  11  }
  12  
  13  class Settings
  14  {
  15      //IDs of admin-user, guest-user and root-folder (no need to change)
  16      var $_adminID = 1;
  17      var $_guestID = 2;
  18      var $_rootFolderID = 1;
  19      
  20      //If you don't want anybody to login as guest, set the following line to false
  21      var $_enableGuestLogin = false;
  22      
  23      //default language (name of a subfolder in folder "languages")
  24      var $_language = "English";
  25      
  26      //users are notified about document-changes that took place within the last $_updateNotifyTime seconds
  27      var $_updateNotifyTime = 86400; //means 24 hours
  28      
  29      //files with one of the following endings can be viewed online
  30      var $_viewOnlineFileTypes = array(".txt", ".html", ".htm", ".pdf", ".gif", ".png", ".jpg");
  31      
  32      //enable/disable converting of files
  33      var $_enableConverting = false;
  34      
  35      //default theme (name of a subfolder in folder "themes")
  36      var $_theme = "default";
  37      
  38  	function Settings()
  39      {
  40          //path to where mydms is located
  41          $this->_rootDir = EGW_SERVER_ROOT . '/mydms/';
  42      
  43          //where the uploaded files are stored (you better choose a directory that is not accessible through your web-server)
  44          $this->_contentDir = $GLOBALS['egw_info']['server']['files_dir'] . "/mydms/";
  45          //if the rootdir unexist or is not a directory, create it
  46          if(!is_dir($this->_contentDir)) {
  47              if($ret1 = is_writable($GLOBALS['egw_info']['server']['files_dir']))
  48                  $ret2 = mkdir($this->_contentDir,0755);
  49              if(!$ret1 && $ret2)
  50                  die('The Root Dir does not exist or Can not be created');
  51          }
  52      
  53          //the same as URL
  54      //    $this->_httpRoot = $GLOBALS['egw_info']['server']['webserver_url'] . "/mydms/";   // we use the following more professional one
  55          $this->_httpRoot = $GLOBALS['egw']->link('/mydms/');
  56      
  57          //files with one of the following endings will be converted with the given commands
  58          //for windows users
  59          $this->_convertFileTypes = array(".doc" => "cscript \"" . $this->_rootDir."op/convert_word.js\" {SOURCE} {TARGET}",
  60                                           ".xls" => "cscript \"".$this->_rootDir."op/convert_excel.js\" {SOURCE} {TARGET}",
  61                                           ".ppt" => "cscript \"".$this->_rootDir."op/convert_pp.js\" {SOURCE} {TARGET}");
  62          //for linux users
  63      //    $this->_convertFileTypes = array(".doc" => "mswordview -o {TARGET} {SOURCE}");
  64      }
  65  }
  66  
  67  $settings = new Settings();
  68  $GLOBALS['mydms']->settings = $settings;
  69  
  70  ?>


Généré le : Sun Feb 25 17:20:01 2007 par Balluche grâce à PHPXref 0.7