28 require_once
'../main.inc.php';
29 require_once DOL_DOCUMENT_ROOT.
'/product/class/html.formproduct.class.php';
32 $langs->loadLangs(array(
"admin",
"cashdesk"));
35 if ($_SESSION[
'uid'] > 0)
37 header(
'Location: '.DOL_URL_ROOT.
'/cashdesk/affIndex.php');
41 $usertxt =
GETPOST(
'user',
'', 1);
45 $hookmanager->initHooks(array(
'cashdeskloginpage'));
51 $form =
new Form($db);
54 $arrayofcss = array(
'/cashdesk/css/style.css');
58 $parameters = array(
'entity' =>
GETPOST(
'entity',
'int'));
59 $reshook = $hookmanager->executeHooks(
'getLoginPageOptions', $parameters);
60 if (is_array($hookmanager->resArray) && !empty($hookmanager->resArray)) {
61 $morelogincontent = $hookmanager->resArray;
63 $morelogincontent = $hookmanager->resPrint;
68 <div
class=
"conteneur">
69 <div
class=
"conteneur_img_gauche">
70 <div
class=
"conteneur_img_droite">
72 <div
class=
"menu_principal hideonsmartphone">
75 if (!empty($mysoc->logo_small))
77 print '<img class="logopos" alt="Logo company" src="'.DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&file='.urlencode(
'logos/thumbs/'.$mysoc->logo_small).
'">';
79 print '<div class="logopos">'.$mysoc->name.
'</div>';
86 <div
class=
"inline-block" style=
"vertical-align: top">
87 <div
class=
"principal_login">
89 <fieldset
class=
"cadre_facturation"><legend
class=
"titre1"><?php echo $langs->trans(
"Identification"); ?></legend>
90 <form
id=
"frmLogin" method=
"POST" action=
"index_verif.php">
91 <input
type=
"hidden" name=
"token" value=
"<?php echo newToken(); ?>" />
96 <td
class=
"label1"><?php echo $langs->trans(
"Login"); ?></td>
97 <td><input
name=
"txtUsername" class=
"texte_login maxwidth150onsmartphoneimp" type=
"text" value=
"<?php echo $usertxt; ?>" /></td>
100 <td
class=
"label1"><?php echo $langs->trans(
"Password"); ?></td>
101 <td><input name=
"pwdPassword" class=
"texte_login maxwidth150onsmartphoneimp" type=
"password" value=
"" /></td>
105 if (!empty($morelogincontent)) {
106 if (is_array($morelogincontent)) {
107 foreach ($morelogincontent as $format => $option)
109 if ($format ==
'table') {
110 echo
'<!-- Option by hook -->';
115 echo
'<!-- Option by hook -->';
116 echo $morelogincontent;
129 print
'<td class="label1">'.$langs->trans(
"CashDeskThirdPartyForSell").
'</td>';
132 $langs->load(
"companies");
133 if (!empty($conf->global->CASHDESK_ID_THIRDPARTY)) $disabled = 1;
134 print $form->select_company(
GETPOST(
'socid',
'int') ?
GETPOST(
'socid',
'int') : $conf->global->CASHDESK_ID_THIRDPARTY,
'socid',
'(s.client IN (1,3) AND s.status = 1)', !$disabled, $disabled, 0, array(), 0,
'maxwidth300');
139 if (!empty($conf->stock->enabled) && empty($conf->global->CASHDESK_NO_DECREASE_STOCK))
141 $langs->load(
"stocks");
143 print
'<td class="label1">'.$langs->trans(
"Warehouse").
'</td>';
146 if ($conf->global->CASHDESK_ID_WAREHOUSE > 0) $disabled = 1;
147 print $formproduct->selectWarehouses((
GETPOST(
'warehouseid') ?
GETPOST(
'warehouseid',
'int') : (empty($conf->global->CASHDESK_ID_WAREHOUSE) ?
'ifone' : $conf->global->CASHDESK_ID_WAREHOUSE)),
'warehouseid',
'', !$disabled, $disabled);
153 print
'<td class="label1">'.$langs->trans(
"CashDeskBankAccountForSell").
'</td>';
156 if (!empty($conf->global->CASHDESK_ID_BANKACCOUNT_CASH) && $conf->global->CASHDESK_ID_BANKACCOUNT_CASH > 0) $defaultknown = 1;
157 $form->select_comptes(((
GETPOST(
'bankid_cash') > 0) ?
GETPOST(
'bankid_cash') : $conf->global->CASHDESK_ID_BANKACCOUNT_CASH),
'CASHDESK_ID_BANKACCOUNT_CASH', 0,
"courant=2", ($defaultknown ? 0 : 2));
162 print
'<td class="label1">'.$langs->trans(
"CashDeskBankAccountForCheque").
'</td>';
165 if (!empty($conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE) && $conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE > 0) $defaultknown = 1;
166 $form->select_comptes(((
GETPOST(
'bankid_cheque') > 0) ?
GETPOST(
'bankid_cheque') : $conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE),
'CASHDESK_ID_BANKACCOUNT_CHEQUE', 0,
"courant=1", ($defaultknown ? 0 : 2));
171 print
'<td class="label1">'.$langs->trans(
"CashDeskBankAccountForCB").
'</td>';
174 if (!empty($conf->global->CASHDESK_ID_BANKACCOUNT_CB) && $conf->global->CASHDESK_ID_BANKACCOUNT_CB > 0) $defaultknown = 1;
175 $form->select_comptes(((
GETPOST(
'bankid_cb') > 0) ?
GETPOST(
'bankid_cb') : $conf->global->CASHDESK_ID_BANKACCOUNT_CB),
'CASHDESK_ID_BANKACCOUNT_CB', 0,
"courant=1", ($defaultknown ? 0 : 2));
191 <div align=
"center"><span
class=
"bouton_login"><input
class=
"button" type=
"submit" value=
"<?php echo dol_escape_htmltag($langs->trans("Connection
")); ?>" /></span></div>
198 if ($_GET[
'err'] < 0)
200 echo (
'<script type="text/javascript">');
201 echo (
' document.getElementById(\'frmLogin\').pwdPassword.focus();');
204 echo (
'<script type="text/javascript">');
205 echo (
' document.getElementById(\'frmLogin\').txtUsername.focus();');
214 <?php include
'affPied.php'; ?></div>
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
top_htmlhead($head, $title= '', $disablejs=0, $disablehead=0, $arrayofjs= '', $arrayofcss= '', $disablejmobile=0, $disablenofollow=0)
Ouput html header of a page.
$conf db name
Only used if Module[ID]Name translation string is not found.
print
Draft customers invoices.
if(preg_match('/crypted:/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
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...