*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
/**
* \file htdocs/admin/dav.php
* \ingroup dav
* \brief Page to setup DAV server
*/
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/dav/dav.lib.php';
if (!$user->admin)
accessforbidden();
$langs->load("admin");
$langs->load("other");
$langs->load("agenda");
$def = array();
$actionsave=GETPOST('save','alpha');
// Sauvegardes parametres
if ($actionsave)
{
$i=0;
$db->begin();
$i+=dolibarr_set_const($db,'XXX',trim(GETPOST('XXX','alpha')),'chaine',0,'',$conf->entity);
if ($i >= 4)
{
$db->commit();
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
else
{
$db->rollback();
setEventMessages($langs->trans("SaveFailed"), null, 'errors');
}
}
/**
* View
*/
llxHeader('', $langs->trans("DAVSetup"), $wikihelp);
$linkback=''.$langs->trans("BackToModuleList").'';
print load_fiche_titre($langs->trans("DAVSetup"),$linkback,'title_setup');
print '
\n";
clearstatcache();
//if ($mesg) print "
$mesg
";
print "
";
// Define $urlwithroot
$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root));
$urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
// Show message
$message='';
$url=''.$urlwithroot.'/dav/fileserver.php';
$message.=img_picto('','object_globe.png').' '.$langs->trans("WebDavServer",'WebDAV',$url);
$message.='
';
print $message;
/*$message =$langs->trans("AgendaUrlOptions1",$user->login,$user->login).'
';
$message.=$langs->trans("AgendaUrlOptions3",$user->login,$user->login).'
';
$message.=$langs->trans("AgendaUrlOptionsNotAdmin",$user->login,$user->login).'
';
$message.=$langs->trans("AgendaUrlOptions4",$user->login,$user->login).'
';
$message.=$langs->trans("AgendaUrlOptionsProject",$user->login,$user->login).'
';
$message.=$langs->trans("AgendaUrlOptionsNotAutoEvent",'systemauto','systemauto').'
';
print info_admin($message);
*/
/*
if (! empty($conf->use_javascript_ajax))
{
print "\n".'';
}
*/
llxFooter();
$db->close();