29 if (!defined(
'NOSCANPOSTFORINJECTION')) define(
'NOSCANPOSTFORINJECTION',
'1');
31 require
'../../main.inc.php';
32 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
39 $langs->loadLangs(array(
'admin',
'other',
'externalsite'));
43 $action =
GETPOST(
'action',
'aZ09');
46 if ($action ==
'update')
52 $label =
GETPOST(
'EXTERNALSITE_LABEL',
'alpha');
53 $exturl =
GETPOST(
'EXTERNALSITE_URL',
'restricthtml');
55 $i +=
dolibarr_set_const($db,
'EXTERNALSITE_LABEL', trim($label),
'chaine', 0,
'', $conf->entity);
56 $i +=
dolibarr_set_const($db,
'EXTERNALSITE_URL', trim($exturl),
'chaine', 0,
'', $conf->entity);
75 $linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
79 print $langs->trans(
"Module100Desc").
"<br>\n";
82 print
'<form name="externalsiteconfig" action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
83 print
'<input type="hidden" name="token" value="'.newToken().
'">';
84 print
'<input type="hidden" name="action" value="update">';
85 print
"<table class=\"noborder\" width=\"100%\">";
87 print
"<tr class=\"liste_titre\">";
88 print
"<td width=\"30%\">".$langs->trans(
"Parameter").
"</td>";
89 print
"<td>".$langs->trans(
"Value").
"</td>";
90 print
"<td>".$langs->trans(
"Examples").
"</td>";
94 print
'<tr class="oddeven">';
95 print
'<td class="fieldrequired">'.$langs->trans(
"Label").
"</td>";
96 print
"<td><input type=\"text\" class=\"flat\" name=\"EXTERNALSITE_LABEL\" value=\"".(GETPOST(
'EXTERNALSITE_LABEL',
'alpha') ?
GETPOST(
'EXTERNALSITE_LABEL',
'alpha') : ((empty($conf->global->EXTERNALSITE_LABEL) || $conf->global->EXTERNALSITE_LABEL ==
'ExternalSite') ?
'' : $conf->global->EXTERNALSITE_LABEL)).
"\" size=\"12\"></td>";
97 print
"<td>".$langs->trans(
"ExampleMyMenuEntry").
"</td>";
101 print
'<tr class="oddeven">';
102 print
'<td class="fieldrequired">'.$langs->trans(
"ExternalSiteURL").
"</td>";
103 print
'<td><textarea class="flat minwidth500" name="EXTERNALSITE_URL">';
104 print (
GETPOST(
'EXTERNALSITE_URL',
'restricthtml') ?
GETPOST(
'EXTERNALSITE_URL',
'restricthtml') : (empty($conf->global->EXTERNALSITE_URL) ?
'' : $conf->global->EXTERNALSITE_URL));
105 print
'</textarea></td>';
106 print
"<td>http://localhost/myurl/";
107 print
"<br>https://wikipedia.org/";
108 print
"<br><iframe>...</iframe>";
115 print
'<br><div class="center">';
116 print
'<input type="submit" name="save" class="button button-save" value="'.$langs->trans(
"Save").
'">';
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.
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 ...
print
Draft customers invoices.