30 require
'../main.inc.php';
31 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
32 require_once DOL_DOCUMENT_ROOT.
'/core/lib/mailmanspip.lib.php';
33 require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
36 $langs->loadLangs(array(
"admin",
"members",
"mailmanspip"));
41 $type = array(
'yesno',
'texte',
'chaine');
43 $action =
GETPOST(
'action',
'aZ09');
51 if ($action ==
'update' || $action ==
'add')
53 $constnamearray =
GETPOST(
"constname",
'array');
54 $constvaluearray =
GETPOST(
"constvalue",
'array');
55 $consttypearray =
GETPOST(
"consttype",
'array');
56 $constnotearray =
GETPOST(
"constnote",
'array');
59 if ($action ==
'update' || $action ==
'add')
61 foreach ($constnamearray as $key => $val)
68 $res =
dolibarr_set_const($db, $constname, $constvalue, $type[$consttype], 0, $constnote, $conf->entity);
70 if (!($res > 0)) $error++;
85 $result =
dolibarr_set_const($db, $_GET[
"name"], $_GET[
"value"],
'', 0,
'', $conf->entity);
93 if ($action ==
'unset')
110 llxHeader(
'', $langs->trans(
"MailmanSpipSetup"), $help_url);
113 $linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
117 $head = mailmanspip_admin_prepare_head();
123 if (!empty($conf->global->ADHERENT_USE_SPIP))
125 print '<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
126 print '<input type="hidden" name="token" value="'.newToken().
'">';
127 print '<input type="hidden" name="action" value="update">';
132 $link =
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=unset&token='.
newToken().
'&value=0&name=ADHERENT_USE_SPIP">';
134 $link .=
img_picto($langs->trans(
"Activated"),
'switch_on');
138 'ADHERENT_SPIP_SERVEUR',
140 'ADHERENT_SPIP_USER',
151 print
'<div class="center"><input type="submit" class="button" value="'.$langs->trans(
"Update").
'" name="update"></div>';
157 $link =
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=set&token='.
newToken().
'&value=1&name=ADHERENT_USE_SPIP">';
159 $link .=
img_picto($langs->trans(
"Disabled"),
'switch_off');
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
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).
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.
dolibarr_del_const($db, $name, $entity=1)
Effacement d'une constante dans la base de donnees.
img_picto($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt= '', $morecss= '', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
form_constantes($tableau, $strictw3c=0, $helptext= '')
Show array with constants to edit.
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_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
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.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $keepmoretags= '', $escapeonlyhtmltags=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields...