29require
'../../main.inc.php';
39require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
40require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
41require_once DOL_DOCUMENT_ROOT.
'/contact/class/contact.class.php';
42require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
45$langs->loadLangs(array(
"admin",
"accountancy",
"companies",
"other"));
47$action =
GETPOST(
'action',
'aZ09');
60if ($action ==
'setSOCIETE_ENABLE_PUBLIC') {
68if ($action ==
'update') {
69 $public =
GETPOST(
'SOCIETE_ENABLE_PUBLIC');
93llxHeader(
'', $langs->trans(
"CompanySetup"), $help_url);
95$linkback =
'<a href="'.dolBuildUrl(DOL_URL_ROOT.
'/admin/modules.php', [
'restore_lastsearch_values' => 1]).
'">'.
img_picto($langs->trans(
"BackToModuleList"),
'back',
'class="pictofixedwidth"').
'<span class="hideonsmartphone">'.$langs->trans(
"BackToModuleList").
'</span></a>';
97print
load_fiche_titre($langs->trans(
"CompanySetup"), $linkback,
'title_setup');
103print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="post">';
104print
'<input type="hidden" name="action" value="update">';
105print
'<input type="hidden" name="token" value="'.newToken().
'">';
110print
'<div class="info">';
112print
'<span class="opacitymedium">'.$langs->trans(
"PublicInterfaceCompanyDesc").
'</span><br><br>';
116$enabledisablehtml = $langs->trans(
"EnablePublicCompanyPages").
' ';
119 $enabledisablehtml .=
'<a class="reposition valignmiddle" href="'.$_SERVER[
"PHP_SELF"].
'?action=setSOCIETE_ENABLE_PUBLIC&token='.newToken().
'&value=1'.$param.
'">';
120 $enabledisablehtml .=
img_picto($langs->trans(
"Disabled"),
'switch_off');
121 $enabledisablehtml .=
'</a>';
124 $enabledisablehtml .=
'<a class="reposition valignmiddle" href="'.$_SERVER[
"PHP_SELF"].
'?action=setSOCIETE_ENABLE_PUBLIC&token='.newToken().
'&value=0'.$param.
'">';
125 $enabledisablehtml .=
img_picto($langs->trans(
"Activated"),
'switch_on');
126 $enabledisablehtml .=
'</a>';
128print $enabledisablehtml;
129print
'<input type="hidden" id="SOCIETE_ENABLE_PUBLIC" name="SOCIETE_ENABLE_PUBLIC" value="'.(!
getDolGlobalString(
'SOCIETE_ENABLE_PUBLIC') ? 0 : 1).
'">';
143 print
img_picto(
'',
'globe').
' <span class="opacitymedium">'.$langs->trans(
'BlankSubscriptionForm').
'</span><br>';
145 $entity_qr =
'?entity='.$conf->entity;
152 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
155 print
'<div class="urllink">';
156 print
'<input type="text" id="publicurlmember" class="quatrevingtpercentminusx" value="'.$urlwithroot.
'/public/company/new.php'.$entity_qr.
'">';
157 print
'<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.
'/public/company/new.php'.$entity_qr.
'">'.
img_picto(
'',
'globe',
'class="paddingleft"').
'</a>';
159 print ajax_autoselect(
'publicurlmember');
global $dolibarr_main_url_root
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.
societe_admin_prepare_head()
Return array head with list of tabs to view object information.
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, $allowothertags=array())
Show picto whatever it's its name (generic function)
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0, $morecssdiv='')
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.