25require
'../main.inc.php';
26require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
27require_once DOL_DOCUMENT_ROOT.
'/core/lib/agenda.lib.php';
28require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formactions.class.php';
29require_once DOL_DOCUMENT_ROOT.
'/cron/class/cronjob.class.php';
36$langs->loadLangs(array(
"admin",
"other",
"agenda"));
38$action =
GETPOST(
'action',
'aZ09');
39$value =
GETPOST(
'value',
'alpha');
40$modulepart =
GETPOST(
'modulepart',
'aZ09');
42$param =
GETPOST(
'param',
'alpha');
43$cancel =
GETPOST(
'cancel',
'alpha');
44$scandir =
GETPOST(
'scandir',
'alpha');
52include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
54if (preg_match(
'/set_([a-z0-9_\-]+)/i', $action, $reg)) {
58 Header(
"Location: ".$_SERVER[
"PHP_SELF"]);
65if (preg_match(
'/del_([a-z0-9_\-]+)/i', $action, $reg)) {
68 Header(
"Location: ".$_SERVER[
"PHP_SELF"]);
74if ($action ==
'set') {
75 dolibarr_set_const($db,
'AGENDA_USE_EVENT_TYPE_DEFAULT',
GETPOST(
'AGENDA_USE_EVENT_TYPE_DEFAULT'),
'chaine', 0,
'', $conf->entity);
76 dolibarr_set_const($db,
'AGENDA_DEFAULT_FILTER_TYPE',
GETPOST(
'AGENDA_DEFAULT_FILTER_TYPE'),
'chaine', 0,
'', $conf->entity);
77 dolibarr_set_const($db,
'AGENDA_DEFAULT_FILTER_STATUS',
GETPOST(
'AGENDA_DEFAULT_FILTER_STATUS'),
'chaine', 0,
'', $conf->entity);
79} elseif ($action ==
'specimen') {
80 $modele =
GETPOST(
'module',
'alpha');
83 $commande->initAsSpecimen();
84 $commande->thirdparty = $specimenthirdparty;
90 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
91 foreach ($dirmodels as $reldir) {
92 $file =
dol_buildpath($reldir.
"core/modules/action/doc/pdf_".$modele.
".modules.php", 0);
93 if (file_exists($file)) {
95 $classname =
"pdf_".$modele;
103 $module =
new $classname($db, $commande);
105 if ($module->write_file($commande, $langs) > 0) {
106 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=action&file=SPECIMEN.pdf");
114 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
116} elseif ($action ==
'setmodel') {
120} elseif ($action ==
'del') {
123 if ($conf->global->ACTION_EVENT_ADDON_PDF ==
"$value") {
127} elseif ($action ==
'setdoc') {
129 if (
dolibarr_set_const($db,
"ACTION_EVENT_ADDON_PDF", $value,
'chaine', 0,
'', $conf->entity)) {
132 $conf->global->ACTION_EVENT_ADDON_PDF = $value;
148$dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
151$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
152print
load_fiche_titre($langs->trans(
"AgendaSetup"), $linkback,
'title_setup');
159print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" name="agenda">';
160print
'<input type="hidden" name="token" value="'.newToken().
'">';
161print
'<input type="hidden" name="action" value="set">';
163print
'<table class="noborder allwidth">'.
"\n";
164print
'<tr class="liste_titre">'.
"\n";
165print
'<td>'.$langs->trans(
"Parameters").
'</td>'.
"\n";
166print
'<td class="center"> </td>'.
"\n";
167print
'<td class="right">'.$langs->trans(
"Value").
'</td>'.
"\n";
171print
'<tr class="oddeven">'.
"\n";
172print
'<td>'.$langs->trans(
'AGENDA_REMINDER_BROWSER').
'</td>'.
"\n";
173print
'<td class="center"> </td>'.
"\n";
174print
'<td class="right nowraponall">'.
"\n";
178 $langs->load(
"errors");
179 print
img_warning($langs->trans(
"WarningAvailableOnlyForHTTPSServers"),
'',
'valignmiddle size15x').
' ';
181 print
'<a class="valignmiddle" href="'.$_SERVER[
'PHP_SELF'].
'?action=set_AGENDA_REMINDER_BROWSER&token='.newToken().
'">'.
img_picto($langs->trans(
'Disabled'),
'switch_off').
'</a>';
182 print
'</td></tr>'.
"\n";
185 $langs->load(
"errors");
186 print
img_warning($langs->trans(
"WarningAvailableOnlyForHTTPSServers"),
'',
'valignmiddle size15x').
' ';
188 print
'<a class="valignmiddle" href="'.$_SERVER[
'PHP_SELF'].
'?action=del_AGENDA_REMINDER_BROWSER&token='.newToken().
'">'.
img_picto($langs->trans(
'Enabled'),
'switch_on').
'</a>';
189 print
'</td></tr>'.
"\n";
191 print
'<tr class="oddeven">'.
"\n";
192 print
'<td>'.$langs->trans(
'AGENDA_REMINDER_BROWSER_SOUND').
'</td>'.
"\n";
193 print
'<td class="center"> </td>'.
"\n";
194 print
'<td class="right">'.
"\n";
197 print
'<a href="'.$_SERVER[
'PHP_SELF'].
'?action=set_AGENDA_REMINDER_BROWSER_SOUND&token='.newToken().
'">'.
img_picto($langs->trans(
'Disabled'),
'switch_off').
'</a>';
199 print
'<a href="'.$_SERVER[
'PHP_SELF'].
'?action=del_AGENDA_REMINDER_BROWSER_SOUND&token='.newToken().
'">'.
img_picto($langs->trans(
'Enabled'),
'switch_on').
'</a>';
202 print
'</td></tr>'.
"\n";
206$job->fetch(0,
'ActionComm',
'sendEmailsReminder');
209print
'<tr class="oddeven">'.
"\n";
210print
'<td>'.$langs->trans(
'AGENDA_REMINDER_EMAIL', $langs->transnoentities(
"Module2300Name"));
211if (isModEnabled(
'cron')) {
214 if ($job->status == $job::STATUS_ENABLED) {
215 print
'<br><span class="opacitymedium">'.$langs->trans(
"AGENDA_REMINDER_EMAIL_NOTE", $langs->transnoentitiesnoconv(
"sendEmailsReminder")).
'</span>';
221print
'<td class="center"> </td>'.
"\n";
222print
'<td class="right nowraponall">'.
"\n";
224if (!isModEnabled(
'cron')) {
225 print
'<span class="opacitymedium">'.$langs->trans(
"WarningModuleNotActive", $langs->transnoentitiesnoconv(
"Module2300Name")).
'</span>';
228 print
'<a href="'.$_SERVER[
'PHP_SELF'].
'?action=set_AGENDA_REMINDER_EMAIL&token='.newToken().
'">'.
img_picto($langs->trans(
'Disabled'),
'switch_off').
'</a>';
232 if ($job->status != $job::STATUS_ENABLED) {
233 $langs->load(
"cron");
234 print
'<span class="opacitymedium warning">'.$langs->trans(
"JobXMustBeEnabled", $langs->transnoentitiesnoconv(
"sendEmailsReminder")).
'</span>';
236 print
'<a href="'.$_SERVER[
'PHP_SELF'].
'?action=del_AGENDA_REMINDER_EMAIL&token='.newToken().
'">'.
img_picto($langs->trans(
'Enabled'),
'switch_on').
'</a>';
239 $langs->load(
"cron");
240 print
'<span class="opacitymedium warning">'.$langs->trans(
"JobNotFound", $langs->transnoentitiesnoconv(
"sendEmailsReminder")).
'</span>';
244print
'</td></tr>'.
"\n";
addDocumentModel($name, $type, $label='', $description='')
Add document model used by doc generator.
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
delDocumentModel($name, $type)
Delete document model used by doc generator.
agenda_prepare_head()
Prepare array with list of tabs.
if(preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) if(preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) if($action=='set') elseif( $action=='specimen') elseif($action=='setmodel') elseif( $action=='del') elseif($action=='setdoc') $formactions
View.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage predefined suppliers products.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
isHTTPS()
Return if we are using a HTTPS connexion Check HTTPS (no way to be modified by user but may be empty ...
dol_get_fiche_end($notab=0)
Return tab footer of a card.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.