dolibarr 21.0.0-beta
callback.php
1top_htmlhead <?php
2/* Copyright (C) 2023 Maximilien Rozniecki <mrozniecki@easya.solutions>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17
26define('NOLOGIN', '1');
27if (!defined('NOTOKENRENEWAL')) {
28 define('NOTOKENRENEWAL', '1');
29}
30
31require '../../../main.inc.php';
32require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php';
33
34// Javascript code on logon page only to detect user tz, dst_observed, dst_first, dst_second
35$arrayofjs = array(
36 '/includes/jstz/jstz.min.js'.(empty($conf->dol_use_jmobile) ? '' : '?version='.urlencode(DOL_VERSION)),
37 '/core/js/dst.js'.(empty($conf->dol_use_jmobile) ? '' : '?version='.urlencode(DOL_VERSION))
38);
39
40top_htmlhead('', '', 0, 0, $arrayofjs);
41
42$prefix = dol_getprefix('');
43$rollback_url = $_COOKIE["DOL_rollback_url_$prefix"];
44if (empty($rollback_url) || $rollback_url === '/') {
45 $action = $dolibarr_main_url_root . '/index.php?mainmenu=home&leftmenu=';
46} else {
47 $action = $rollback_url;
48 setcookie('DOL_rollback_url_' . dol_getprefix(''), "", time() + 1, '/');
49}
50?>
51
52<form id="login" name="login" method="post" action="<?php echo $action; ?>">
53 <!-- Add fields to send OpenID information -->
54 <input type="hidden" name="openid_mode" value="true" />
55 <input type="hidden" name="state" value="<?php echo GETPOST('state'); ?>" />
56 <input type="hidden" name="session_state" value="<?php echo GETPOST('session_state'); ?>" />
57 <input type="hidden" name="code" value="<?php echo GETPOST('code'); ?>" />
58 <input type="hidden" name="token" value="<?php echo newToken(); ?>" />
59 <!-- Add fields to send local user information -->
60 <input type="hidden" name="tz" id="tz" value="" />
61 <input type="hidden" name="tz_string" id="tz_string" value="" />
62 <input type="hidden" name="dst_observed" id="dst_observed" value="" />
63 <input type="hidden" name="dst_first" id="dst_first" value="" />
64 <input type="hidden" name="dst_second" id="dst_second" value="" />
65 <input type="hidden" name="screenwidth" id="screenwidth" value="" />
66 <input type="hidden" name="screenheight" id="screenheight" value="" />
67</form>
68<script type="text/javascript">
69 $(document).ready(function () {
70 document.forms['login'].submit();
71 });
72</script>
top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs=array(), $arrayofcss=array(), $disableforlogin=0, $disablenofollow=0, $disablenoindex=0)
Output html header of a page.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79
$conf db user
Active Directory does not allow anonymous connections.
Definition repair.php:153
if(preg_match('/crypted:/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
Definition repair.php:149
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:152