source: contrib/Dms/inc/inc.Settings.php @ 3526

Revision 3526, 2.5 KB checked in by afernandes, 13 years ago (diff)

Ticket #1416 - Disponibilizado modulos Timesheet e DMS para a comunidade.

  • Property svn:executable set to *
Line 
1<?php
2if(!isset($GLOBALS['phpgw_info']) || !is_array($GLOBALS['phpgw_info']))
3{
4        $GLOBALS['phpgw_info']['flags'] = array(
5                'currentapp' => 'mydms',
6                'noheader'   => True,
7                'nonavbar'   => True
8        );
9
10        include('../../header.inc.php');
11}
12
13class 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 = PHPGW_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['phpgw_info']['server']['files_dir'] . "/mydms/";
45
46                //if the rootdir unexist or is not a directory, create it
47                if(!is_dir($this->_contentDir)) {
48                        if($ret1 = is_writable($GLOBALS['phpgw_info']['server']['files_dir']))
49                                $ret2 = mkdir($this->_contentDir,0755);
50                        if(!$ret1 && $ret2)
51                                die('The Root Dir does not exist or Can not be created');
52                }
53       
54                //the same as URL
55        //      $this->_httpRoot = $GLOBALS['phpgw_info']['server']['webserver_url'] . "/mydms/";   // we use the following more professional one
56                $this->_httpRoot = $GLOBALS['phpgw']->link('/mydms/');
57       
58                //files with one of the following endings will be converted with the given commands
59                //for windows users
60                $this->_convertFileTypes = array(".doc" => "cscript \"" . $this->_rootDir."op/convert_word.js\" {SOURCE} {TARGET}",
61                                                                                 ".xls" => "cscript \"".$this->_rootDir."op/convert_excel.js\" {SOURCE} {TARGET}",
62                                                                                 ".ppt" => "cscript \"".$this->_rootDir."op/convert_pp.js\" {SOURCE} {TARGET}");
63                //for linux users
64        //      $this->_convertFileTypes = array(".doc" => "mswordview -o {TARGET} {SOURCE}");
65        }
66}
67
68$settings = new Settings();
69$GLOBALS['mydms']->settings = $settings;
70
71?>
Note: See TracBrowser for help on using the repository browser.