Go to the documentation of this file.
24 require
'../main.inc.php';
25 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
26 require_once DOL_DOCUMENT_ROOT.
'/dav/dav.lib.php';
29 $langs->loadLangs(array(
"admin",
"other",
"agenda"));
36 $action =
GETPOST(
'action',
'aZ09');
37 $backtopage =
GETPOST(
'backtopage',
'alpha');
41 $arrayofparameters = array(
42 'DAV_RESTICT_ON_IP'=>array(
'css'=>
'minwidth200',
'enabled'=>1),
43 'DAV_ALLOW_PRIVATE_DIR'=>array(
'css'=>
'minwidth200',
'enabled'=>2),
44 'DAV_ALLOW_PUBLIC_DIR'=>array(
'css'=>
'minwidth200',
'enabled'=>1),
45 'DAV_ALLOW_ECM_DIR'=>array(
'css'=>
'minwidth200',
'enabled'=>$conf->ecm->enabled)
49 dol_mkdir($conf->dav->dir_output.
'/temp');
50 dol_mkdir($conf->dav->dir_output.
'/public');
51 dol_mkdir($conf->dav->dir_output.
'/private');
58 include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
70 $linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
74 print
'<form name="agendasetupform" action="'.$_SERVER[
"PHP_SELF"].
'" method="post">';
75 print
'<input type="hidden" name="token" value="'.newToken().
'">';
81 if ($action ==
'edit') {
82 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
83 print
'<input type="hidden" name="token" value="'.newToken().
'">';
84 print
'<input type="hidden" name="action" value="update">';
86 print
'<table class="noborder centpercent">';
87 print
'<tr class="liste_titre"><td>'.$langs->trans(
"Parameter").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>';
89 foreach ($arrayofparameters as $key => $val) {
90 if (isset($val[
'enabled']) && empty($val[
'enabled'])) {
94 print
'<tr class="oddeven"><td>';
95 $tooltiphelp = (($langs->trans($key.
'Tooltip') != $key.
'Tooltip') ? $langs->trans($key.
'Tooltip') :
'');
96 $label = $langs->trans($key);
97 if ($key ==
'DAV_RESTICT_ON_IP') {
98 $label = $langs->trans(
"RESTRICT_ON_IP");
99 $label .=
' '.$langs->trans(
"Example").
': '.$langs->trans(
"IPListExample");
101 print
$form->textwithpicto($label, $tooltiphelp);
103 if ($key ==
'DAV_ALLOW_PRIVATE_DIR') {
104 print $langs->trans(
"AlwaysActive");
105 } elseif ($key ==
'DAV_ALLOW_PUBLIC_DIR' || $key ==
'DAV_ALLOW_ECM_DIR') {
106 print
$form->selectyesno($key, $conf->global->$key, 1);
108 print
'<input name="'.$key.
'" class="flat '.(empty($val[
'css']) ?
'minwidth200' : $val[
'css']).
'" value="'.
getDolGlobalString($key).
'">';
115 print
'<br><div class="center">';
116 print
'<input class="button button-save" type="submit" value="'.$langs->trans(
"Save").
'">';
122 print
'<table class="noborder centpercent">';
123 print
'<tr class="liste_titre"><td>'.$langs->trans(
"Parameter").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>';
125 foreach ($arrayofparameters as $key => $val) {
126 print
'<tr class="oddeven"><td class="titlefieldmiddle">';
127 $tooltiphelp = (($langs->trans($key.
'Tooltip') != $key.
'Tooltip') ? $langs->trans($key.
'Tooltip') :
'');
128 $label = $langs->trans($key);
129 if ($key ==
'DAV_RESTICT_ON_IP') {
130 $label = $langs->trans(
"RESTRICT_ON_IP");
131 $label .=
' <span class="opacitymedium">'.$langs->trans(
"Example").
': '.$langs->trans(
"IPListExample").
'</span>';
133 print
$form->textwithpicto($label, $tooltiphelp);
135 if ($key ==
'DAV_ALLOW_PRIVATE_DIR') {
136 print $langs->trans(
"AlwaysActive");
137 } elseif ($key ==
'DAV_ALLOW_PUBLIC_DIR' || $key ==
'DAV_ALLOW_ECM_DIR') {
138 print
yn($conf->global->$key);
140 print $conf->global->$key;
147 print
'<div class="tabsAction">';
148 print
'<a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?action=edit&token='.
newToken().
'">'.$langs->trans(
"Modify").
'</a>';
164 print
'<span class="opacitymedium">'.$langs->trans(
"WebDAVSetupDesc").
"</span><br>\n";
169 $urlwithouturlroot = preg_replace(
'/'.preg_quote(DOL_URL_ROOT,
'/').
'$/i',
'', trim($dolibarr_main_url_root));
170 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
176 $url =
'<a href="'.$urlwithroot.
'/dav/fileserver.php" target="_blank" rel="noopener noreferrer">'.$urlwithroot.
'/dav/fileserver.php</a>';
178 $message .=
img_picto(
'',
'globe').
' '.str_replace(
'{url}', $url, $langs->trans(
"WebDavServer",
'WebDAV',
''));
179 $message .=
'<div class="urllink"><input type="text" id="webdavpublicurl" class="quatrevingtpercent" value="'.$urlwithroot.
'/dav/fileserver.php">';
180 $message .=
'<a href="'.$urlwithroot.
'/dav/fileserver.php" target="_blank" rel="noopener noreferrer">';
181 $message .=
' '.img_picto(
'',
'globe');
183 $message .=
'</div>';
187 if (!empty($conf->global->DAV_ALLOW_PUBLIC_DIR)) {
188 $urlEntity = (!empty($conf->multicompany->enabled) ?
'?entity='.$conf->entity :
'');
189 $url =
'<a href="'.$urlwithroot.
'/dav/fileserver.php/public/'.$urlEntity.
'" target="_blank" rel="noopener noreferrer">'.$urlwithroot.
'/dav/fileserver.php/public/'.$urlEntity.
'</a>';
191 $message .=
img_picto(
'',
'globe').
' '.str_replace(
'{url}', $url, $langs->trans(
"WebDavServer",
'WebDAV public',
''));
192 $message .=
'<div class="urllink"><input type="text" id="webdavurl" class="quatrevingtpercent" value="'.$urlwithroot.
'/dav/fileserver.php/public/'.$urlEntity.
'">';
193 $message .=
'<a href="'.$urlwithroot.
'/dav/fileserver.php/public/'.$urlEntity.
'" target="_blank" rel="noopener noreferrer">';
194 $message .=
' '.img_picto(
'',
'globe');
196 $message .=
'</div>';
204 require_once DOL_DOCUMENT_ROOT.
'/includes/sabre/autoload.php';
205 $version = Sabre\DAV\Version::VERSION;
206 print
'<span class="opacitymedium">'.$langs->trans(
"BaseOnSabeDavVersion").
' : '.$version.
'</span>';
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save" &&empty($cancel)) $help_url
View.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
if(!function_exists('utf8_encode')) if(!function_exists('utf8_decode')) getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
ajax_autoselect($htmlname, $addlink='', $textonlink='Link')
Make content of an input box selected when we click into input field.
if(!defined('CDAV_CONTACT_TAG')) if(!defined('CDAV_URI_KEY')) dav_admin_prepare_head()
Prepare array with list of tabs.
dol_mkdir($dir, $dataroot='', $newmask='')
Creation of a directory (this can create recursive subdir)
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.