26 require
'../../main.inc.php';
27 require_once DOL_DOCUMENT_ROOT.
"/core/lib/admin.lib.php";
28 require_once
'../lib/partnership.lib.php';
32 $langs->loadLangs(array(
"admin",
"partnership"));
39 $action =
GETPOST(
'action',
'aZ09');
40 $value =
GETPOST(
'value',
'alpha');
50 $nomessageinsetmoduleoptions = 1;
51 include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
54 if ($action ==
'setting') {
55 require_once DOL_DOCUMENT_ROOT.
"/core/modules/modPartnership.class.php";
57 $modulemenu = (
GETPOST(
'PARTNERSHIP_IS_MANAGED_FOR',
'alpha') ==
'member') ?
'member' :
'thirdparty';
58 $res =
dolibarr_set_const($db,
"PARTNERSHIP_IS_MANAGED_FOR", $modulemenu,
'chaine', 0,
'', $conf->entity);
62 $error += $partnership->delete_tabs();
63 $error += $partnership->insert_tabs();
65 $error += $partnership->delete_menus();
66 $error += $partnership->insert_menus();
68 if (
GETPOSTISSET(
"PARTNERSHIP_NBDAYS_AFTER_MEMBER_EXPIRATION_BEFORE_CANCEL")) {
69 dolibarr_set_const($db,
"PARTNERSHIP_NBDAYS_AFTER_MEMBER_EXPIRATION_BEFORE_CANCEL",
GETPOST(
"PARTNERSHIP_NBDAYS_AFTER_MEMBER_EXPIRATION_BEFORE_CANCEL",
'int'),
'chaine', 0,
'', $conf->entity);
72 dolibarr_set_const($db,
"PARTNERSHIP_BACKLINKS_TO_CHECK",
GETPOST(
"PARTNERSHIP_BACKLINKS_TO_CHECK"),
'chaine', 0,
'', $conf->entity);
81 header(
"Location: ".$_SERVER[
'PHP_SELF']);
89 $title = $langs->trans(
'PartnershipSetup');
93 $linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
102 $dirpartnership = array(
'/core/modules/partnership/');
103 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
110 print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
111 print
'<input type="hidden" name="token" value="'.newToken().
'">';
112 print
'<input type="hidden" name="action" value="setting">';
113 print
'<input type="hidden" name="page_y" value="">';
115 print
'<div class="div-table-responsive-no-min">';
116 print
'<table class="noborder centpercent">';
118 print
'<tr class="liste_titre">';
119 print
'<td>'.$langs->trans(
"Setting").
'</td>';
120 print
'<td>'.$langs->trans(
"Value").
'</td>';
121 print
'<td>'.$langs->trans(
"Examples").
'</td>';
124 print
'<tr class="oddeven"><td>'.$langs->trans(
"PARTNERSHIP_IS_MANAGED_FOR").
'</td>';
126 print
'<select class="flat minwidth100" id="select_PARTNERSHIP_IS_MANAGED_FOR" name="PARTNERSHIP_IS_MANAGED_FOR">';
127 print
'<option value="thirdparty" '.((getDolGlobalString(
'PARTNERSHIP_IS_MANAGED_FOR',
'thirdparty') ==
'thirdparty') ?
'selected' :
'').
'>'.$langs->trans(
"ThirdParty").
'</option>';
128 print
'<option value="member" '.((getDolGlobalString(
'PARTNERSHIP_IS_MANAGED_FOR',
'thirdparty') ==
'member') ?
'selected' :
'').
'>'.$langs->trans(
"Members").
'</option>';
132 print
'<td><span class="opacitymedium">'.$langs->trans(
"partnershipforthirdpartyormember").
'</span></td>';
137 print
'<tr class="oddeven"><td>'.$langs->trans(
"PARTNERSHIP_NBDAYS_AFTER_MEMBER_EXPIRATION_BEFORE_CANCEL").
'</td>';
140 $backlinks = (!empty($conf->global->PARTNERSHIP_NBDAYS_AFTER_MEMBER_EXPIRATION_BEFORE_CANCEL)) ? $conf->global->PARTNERSHIP_NBDAYS_AFTER_MEMBER_EXPIRATION_BEFORE_CANCEL : $dnbdays;
141 print
'<input class="maxwidth50" type="text" name="PARTNERSHIP_NBDAYS_AFTER_MEMBER_EXPIRATION_BEFORE_CANCEL" value="'.$backlinks.
'">';
143 print
'<td><span class="opacitymedium">'.$dnbdays.
'</span></td>';
155 print
'<span class="opacitymedium">'.$langs->trans(
"ReferingWebsiteCheckDesc").
'</span><br>';
158 print
'<div class="div-table-responsive-no-min">';
159 print
'<table class="noborder centpercent">';
161 print
'<tr class="liste_titre">';
162 print
'<td>'.$langs->trans(
"Setting").
'</td>';
163 print
'<td>'.$langs->trans(
"Value").
'</td>';
164 print
'<td>'.$langs->trans(
"Examples").
'</td>';
167 print
'<tr class="oddeven"><td>'.$langs->trans(
"PARTNERSHIP_BACKLINKS_TO_CHECK").
'</td>';
169 $backlinks = (empty($conf->global->PARTNERSHIP_BACKLINKS_TO_CHECK) ?
'' : $conf->global->PARTNERSHIP_BACKLINKS_TO_CHECK);
170 print
'<input class="minwidth400" type="text" name="PARTNERSHIP_BACKLINKS_TO_CHECK" value="'.$backlinks.
'">';
172 print
'<td><span class="opacitymedium">dolibarr.org|dolibarr.fr|dolibarr.es</span></td>';
179 print
'<div class="center">';
180 print
'<input type="submit" class="button reposition" value="'.$langs->trans(
"Modify").
'">';
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
if($cancel &&!$id) if($action== 'add'&&!$cancel) if($action== 'delete') if($id) $form
Actions.
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).
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Description and activation class for module Partnership This module is base on this specification : h...
partnershipAdminPrepareHead()
Prepare admin pages header.
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form...
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 ...
ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $forcefocus=0, $widthTypeOfAutocomplete= 'resolve', $idforemptyvalue= '-1')
Convert a html select field into an ajax combobox.
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.