* Copyright (C) 2011-2017 Juanjo Menent * Copyright (C) 2011 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** * \file htdocs/cashdesk/index.php * \ingroup cashdesk * \brief File to login to point of sales */ // Set and init common variables // This include will set: config file variable $dolibarr_xxx, $conf, $langs and $mysoc objects require_once '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; // Load translation files required by the page $langs->loadLangs(array("admin", "cashdesk")); // Test if user logged if ($_SESSION['uid'] > 0) { header('Location: '.DOL_URL_ROOT.'/cashdesk/affIndex.php'); exit; } $usertxt = GETPOST('user', '', 1); $err = GETPOST("err"); // Instantiate hooks of thirdparty module only if not already define $hookmanager->initHooks(array('cashdeskloginpage')); /* * View */ $form = new Form($db); $formproduct = new FormProduct($db); $arrayofcss = array('/cashdesk/css/style.css'); top_htmlhead('', '', 0, 0, '', $arrayofcss); // Execute hook getLoginPageOptions (for table) $parameters = array('entity' => GETPOST('entity', 'int')); $reshook = $hookmanager->executeHooks('getLoginPageOptions', $parameters); // Note that $action and $object may have been modified by some hooks. if (is_array($hookmanager->resArray) && !empty($hookmanager->resArray)) { $morelogincontent = $hookmanager->resArray; // (deprecated) For compatibility } else { $morelogincontent = $hookmanager->resPrint; } ?>
';