* Copyright (C) 2005-2013 Laurent Destailleur * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2012 Regis Houssin * Copyright (C) 2013 Florian Henry * * 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 cron/admin/cron.php * \ingroup cron */ // Dolibarr environment $res = @include("../../main.inc.php"); // From htdocs directory require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/cron.lib.php'; $langs->load("admin"); $langs->load("cron"); if (! $user->admin) accessforbidden(); $actionsave=GETPOST("save"); // Sauvegardes parametres if (!empty($actionsave)) { $i=0; $db->begin(); $i+=dolibarr_set_const($db,'CRON_KEY',trim(GETPOST("CRON_KEY")),'chaine',0,'',0); if ($i >= 1) { $db->commit(); setEventMessage($langs->trans("SetupSaved")); } else { $db->rollback(); setEventMessage($langs->trans("Error"), 'errors'); } } /* * View */ llxHeader(); $linkback=''.$langs->trans("BackToModuleList").''; print_fiche_titre($langs->trans("CronSetup"),$linkback,'title_setup'); // Configuration header $head = cronadmin_prepare_head(); print '
'; print ''; dol_fiche_head($head,'setup',$langs->trans("Module2300Name"),0,'cron'); print "
\n"; print ''; print ''; print ""; print ""; print ""; print ""; print ''; print ''; print ''; print ''; print ''; print '
".$langs->trans("Parameter")."".$langs->trans("Value")." 
'.$langs->trans("KeyForCronAccess").''; if (! empty($conf->use_javascript_ajax)) print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"'); print ' 
'; dol_fiche_end(); print '
'; print ''; print '
'; print '
'; print '

'; print $langs->trans("UseMenuModuleToolsToAddCronJobs").'
'; print '

'; dol_print_cron_urls(); print '
'; if (! empty($conf->use_javascript_ajax)) { print "\n".''; } llxFooter(); $db->close();