29require
'../../main.inc.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/lib/security2.lib.php';
72llxHeader(
'',
'',
'',
'', 0, 0,
'',
'',
'',
'mod-webservices page-admin_index');
74$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
76print
load_fiche_titre($langs->trans(
"WebServicesSetup"), $linkback,
'title_setup');
78print
'<span class="opacitymedium">'.$langs->trans(
"WebServicesDesc").
"</span><br>\n";
81print
'<form name="agendasetupform" action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
82print
'<input type="hidden" name="token" value="'.newToken().
'">';
83print
'<input type="hidden" name="action" value="save">';
85print
'<table class="noborder centpercent">';
87print
'<tr class="liste_titre">';
88print
"<td>".$langs->trans(
"Parameter").
"</td>";
89print
"<td>".$langs->trans(
"Value").
"</td>";
91print
"<td> </td>";
94print
'<tr class="oddeven">';
95print
'<td class="fieldrequired">'.$langs->trans(
"KeyForWebServicesAccess").
'</td>';
96print
'<td><input type="text" class="flat" id="WEBSERVICES_KEY" name="WEBSERVICES_KEY" value="'.(GETPOST(
'WEBSERVICES_KEY') ?
GETPOST(
'WEBSERVICES_KEY') : (
getDolGlobalString(
'WEBSERVICES_KEY') ?
$conf->global->WEBSERVICES_KEY :
'')).
'" size="40">';
97if (!empty(
$conf->use_javascript_ajax)) {
98 print
' '.img_picto($langs->trans(
'Generate'),
'refresh',
'id="generate_token" class="linkobject"');
101print
'<td> </td>';
106print $form->buttonsSaveCancel(
"Save",
'');
115 'thirdparty' =>
'isModEnabled("societe")',
116 'contact' =>
'isModEnabled("societe")',
117 'productorservice' =>
'(isModEnabled("product") || isModEnabled("service"))',
118 'order' =>
'isModEnabled("order")',
119 'invoice' =>
'isModEnabled("invoice")',
120 'supplier_invoice' =>
'isModEnabled("fournisseur")',
121 'actioncomm' =>
'isModEnabled("agenda")',
122 'category' =>
'isModEnabled("category")',
123 'project' =>
'isModEnabled("project")',
129print
'<u>'.$langs->trans(
"WSDLCanBeDownloadedHere").
':</u><br>';
130foreach ($webservices as $name => $right) {
131 if (!empty($right) && !
verifCond($right)) {
134 $url = DOL_MAIN_URL_ROOT.
'/webservices/server_'.$name.
'.php?wsdl';
135 print
img_picto(
'',
'globe').
' <a href="'.$url.
'" target="_blank" rel="noopener noreferrer">'.$url.
"</a><br>\n";
141print
'<u>'.$langs->trans(
"EndPointIs").
':</u><br>';
142foreach ($webservices as $name => $right) {
143 if (!empty($right) && !
verifCond($right)) {
146 $url = DOL_MAIN_URL_ROOT.
'/webservices/server_'.$name.
'.php';
147 print
img_picto(
'',
'globe').
' <a href="'.$url.
'" target="_blank" rel="noopener noreferrer">'.$url.
"</a><br>\n";
153print $langs->trans(
"OnlyActiveElementsAreShown", DOL_URL_ROOT.
'/admin/modules.php');
155$constname =
'WEBSERVICES_KEY';
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).
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
verifCond($strToEvaluate, $onlysimplestring='1')
Verify if condition in string is ok or not.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $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.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
dolJSToSetRandomPassword($htmlname, $htmlnameofbutton='generate_token', $generic=1)
Output javascript to autoset a generated password using default module into a HTML element.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.