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"));
35 $action =
GETPOST(
'action',
'aZ09');
36 $backtopage =
GETPOST(
'backtopage',
'alpha');
40 $arrayofparameters = array(
41 'DAV_RESTICT_ON_IP'=>array(
'css'=>
'minwidth200',
'enabled'=>1),
42 'DAV_ALLOW_PRIVATE_DIR'=>array(
'css'=>
'minwidth200',
'enabled'=>2),
43 'DAV_ALLOW_PUBLIC_DIR'=>array(
'css'=>
'minwidth200',
'enabled'=>1),
44 'DAV_ALLOW_ECM_DIR'=>array(
'css'=>
'minwidth200',
'enabled'=>$conf->ecm->enabled)
52 include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
63 $linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
67 print '<form name="agendasetupform" action="'.$_SERVER[
"PHP_SELF"].
'" method="post">';
68 print '<input type="hidden" name="token" value="'.newToken().
'">';
74 if ($action ==
'edit')
76 print '<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
77 print '<input type="hidden" name="token" value="'.newToken().
'">';
78 print '<input type="hidden" name="action" value="update">';
80 print '<table class="noborder centpercent">';
81 print '<tr class="liste_titre"><td>'.$langs->trans(
"Parameter").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>';
83 foreach ($arrayofparameters as $key => $val)
85 if (isset($val[
'enabled']) && empty($val[
'enabled']))
continue;
87 print '<tr class="oddeven"><td>';
88 $tooltiphelp = (($langs->trans($key.
'Tooltip') != $key.
'Tooltip') ? $langs->trans($key.
'Tooltip') :
'');
89 $label = $langs->trans($key);
90 if ($key ==
'DAV_RESTICT_ON_IP') {
91 $label = $langs->trans(
"RESTRICT_ON_IP");
92 $label .=
' '.$langs->trans(
"Example").
': '.$langs->trans(
"IPListExample");
94 print $form->textwithpicto($label, $tooltiphelp);
96 if ($key ==
'DAV_ALLOW_PRIVATE_DIR')
98 print $langs->trans(
"AlwaysActive");
99 } elseif ($key ==
'DAV_ALLOW_PUBLIC_DIR' || $key ==
'DAV_ALLOW_ECM_DIR')
101 print $form->selectyesno($key, $conf->global->$key, 1);
103 print '<input name="'.$key.
'" class="flat '.(empty($val[
'css']) ?
'minwidth200' : $val[
'css']).
'" value="'.$conf->global->$key.
'">';
110 print '<br><div class="center">';
111 print '<input class="button button-save" type="submit" value="'.$langs->trans(
"Save").
'">';
117 print '<table class="noborder centpercent">';
118 print '<tr class="liste_titre"><td>'.$langs->trans(
"Parameter").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>';
120 foreach ($arrayofparameters as $key => $val)
122 print '<tr class="oddeven"><td>';
123 $tooltiphelp = (($langs->trans($key.
'Tooltip') != $key.
'Tooltip') ? $langs->trans($key.
'Tooltip') :
'');
124 $label = $langs->trans($key);
125 if ($key ==
'DAV_RESTICT_ON_IP') {
126 $label = $langs->trans(
"RESTRICT_ON_IP");
127 $label .=
' '.$langs->trans(
"Example").
': '.$langs->trans(
"IPListExample");
129 print $form->textwithpicto($label, $tooltiphelp);
131 if ($key ==
'DAV_ALLOW_PRIVATE_DIR')
133 print $langs->trans(
"AlwaysActive");
134 } elseif ($key ==
'DAV_ALLOW_PUBLIC_DIR' || $key ==
'DAV_ALLOW_ECM_DIR')
138 print $conf->global->$key;
145 print '<div class="tabsAction">';
146 print '<a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?action=edit">'.$langs->trans(
"Modify").
'</a>';
162 print '<span class="opacitymedium">'.$langs->trans(
"WebDAVSetupDesc").
"</span><br>\n";
167 $urlwithouturlroot = preg_replace(
'/'.preg_quote(DOL_URL_ROOT,
'/').
'$/i',
'', trim($dolibarr_main_url_root));
168 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
174 $url =
'<a href="'.$urlwithroot.
'/dav/fileserver.php" target="_blank">'.$urlwithroot.
'/dav/fileserver.php</a>';
175 $message .=
img_picto(
'',
'globe').
' '.str_replace(
'{url}', $url, $langs->trans(
"WebDavServer",
'WebDAV',
'{url}'));
177 if (!empty($conf->global->DAV_ALLOW_PUBLIC_DIR))
179 $urlEntity = (!empty($conf->multicompany->enabled) ?
'?entity='.$conf->entity :
'');
180 $url =
'<a href="'.$urlwithroot.
'/dav/fileserver.php/public/'.$urlEntity.
'" target="_blank">'.$urlwithroot.
'/dav/fileserver.php/public/'.$urlEntity.
'</a>';
181 $message .=
img_picto(
'',
'globe').
' '.str_replace(
'{url}', $url, $langs->trans(
"WebDavServer",
'WebDAV public',
'{url}'));
186 print '<br><br><br>';
188 require_once DOL_DOCUMENT_ROOT.
'/includes/sabre/autoload.php';
189 $version = Sabre\DAV\Version::VERSION;
190 print '<span class="opacitymedium">'.$langs->trans(
"BaseOnSabeDavVersion").
' : '.$version.
'</span>';
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
if(!defined('CDAV_CONTACT_TAG')) if(!defined('CDAV_URI_KEY')) dav_admin_prepare_head()
Prepare array with list of tabs.
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)) $wikihelp
View.
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.
img_picto($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt= '', $morecss= '', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
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 ...
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
print
Draft customers invoices.
dol_get_fiche_end($notab=0)
Return tab footer of a card.