Fix: the core system used php templates by default
This commit is contained in:
parent
30dcda109e
commit
78c66bc7a0
@ -44,33 +44,25 @@ function dol_loginfunction($langs,$conf,$mysoc)
|
||||
|
||||
$main_authentication=$conf->file->main_authentication;
|
||||
$session_name=session_name();
|
||||
|
||||
$dol_url_root = DOL_URL_ROOT;
|
||||
|
||||
$php_self = $_SERVER['PHP_SELF'];
|
||||
$php_self.= $_SERVER["QUERY_STRING"]?'?'.$_SERVER["QUERY_STRING"]:'';
|
||||
|
||||
// Select templates
|
||||
$template_dir=DOL_DOCUMENT_ROOT.'/core/tpl/'; // Common case
|
||||
if (! empty($conf->global->MAIN_USE_THEME_TEMPLATES)) // Disabled by default because make useless filsesystem calls that reduce speed.
|
||||
if ($conf->browser->phone)
|
||||
{
|
||||
if ($conf->browser->phone && ! empty($conf->global->MAIN_SMARTY))
|
||||
// Special cases
|
||||
if (file_exists(DOL_DOCUMENT_ROOT."/theme/phones/".$conf->browser->phone))
|
||||
{
|
||||
// Special cases
|
||||
if (file_exists(DOL_DOCUMENT_ROOT."/theme/phones/".$conf->browser->phone))
|
||||
{
|
||||
$template_dir=DOL_DOCUMENT_ROOT."/theme/phones/".$conf->browser->phone."/tpl/";
|
||||
}
|
||||
else
|
||||
{
|
||||
$template_dir=DOL_DOCUMENT_ROOT."/theme/phones/others/tpl/";
|
||||
}
|
||||
$theme = 'default';
|
||||
$template_dir=DOL_DOCUMENT_ROOT."/theme/phones/".$conf->browser->phone."/tpl/";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((! empty($conf->global->MAIN_SMARTY) && file_exists(DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/tpl/login.tpl"))
|
||||
|| (empty($conf->global->MAIN_SMARTY) && file_exists(DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/tpl/login.tpl.php")))
|
||||
{
|
||||
$template_dir=DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/tpl/";
|
||||
}
|
||||
$template_dir=DOL_DOCUMENT_ROOT."/theme/phones/others/tpl/";
|
||||
}
|
||||
}
|
||||
|
||||
@ -202,83 +194,8 @@ function dol_loginfunction($langs,$conf,$mysoc)
|
||||
$main_home=nl2br($conf->global->MAIN_HOME);
|
||||
|
||||
$conf_css=DOL_URL_ROOT.$conf->css;
|
||||
|
||||
|
||||
// START SMARTY
|
||||
if ($conf->global->MAIN_SMARTY)
|
||||
{
|
||||
global $smarty;
|
||||
|
||||
$smarty->template_dir=$template_dir;
|
||||
|
||||
$smarty->assign('conf_css', $conf_css);
|
||||
$smarty->assign('langs', $langs);
|
||||
|
||||
if (! empty($conf->global->MAIN_HTML_HEADER)) $smarty->assign('main_html_header', $conf->global->MAIN_HTML_HEADER);
|
||||
|
||||
$smarty->assign('php_self', $php_self);
|
||||
$smarty->assign('character_set_client',$conf->file->character_set_client);
|
||||
|
||||
$smarty->assign('theme', 'default');
|
||||
|
||||
$smarty->assign('dol_url_root', DOL_URL_ROOT);
|
||||
|
||||
$smarty->assign('focus_element', $focus_element);
|
||||
|
||||
$smarty->assign('login_background', $login_background);
|
||||
|
||||
$smarty->assign('title', $title);
|
||||
|
||||
$smarty->assign('login', $login);
|
||||
$smarty->assign('password', $password);
|
||||
|
||||
$smarty->assign('logo', $urllogo);
|
||||
$smarty->assign('logo_width', $width);
|
||||
$smarty->assign('logo_rowspan', $rowspan);
|
||||
|
||||
$smarty->assign('select_entity', $select_entity);
|
||||
$smarty->assign('captcha', $captcha);
|
||||
$smarty->assign('captcha_refresh', $captcha_refresh);
|
||||
|
||||
$smarty->assign('forgetpasslink', $forgetpasslink);
|
||||
$smarty->assign('helpcenterlink', $helpcenterlink);
|
||||
|
||||
$smarty->assign('main_home', $main_home);
|
||||
|
||||
// Google Adsense (ex: demo mode)
|
||||
if (! empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && ! empty($conf->global->MAIN_GOOGLE_AD_SLOT))
|
||||
{
|
||||
$smarty->assign('main_google_ad_client', $conf->global->MAIN_GOOGLE_AD_CLIENT);
|
||||
$smarty->assign('main_google_ad_name', $conf->global->MAIN_GOOGLE_AD_NAME);
|
||||
$smarty->assign('main_google_ad_slot', $conf->global->MAIN_GOOGLE_AD_SLOT);
|
||||
$smarty->assign('main_google_ad_width', $conf->global->MAIN_GOOGLE_AD_WIDTH);
|
||||
$smarty->assign('main_google_ad_height', $conf->global->MAIN_GOOGLE_AD_HEIGHT);
|
||||
|
||||
$google_ad_template = DOL_DOCUMENT_ROOT."/core/tpl/google_ad.tpl";
|
||||
$smarty->assign('google_ad_tpl', $google_ad_template);
|
||||
}
|
||||
|
||||
if (! empty($conf->global->MAIN_HTML_FOOTER)) $smarty->assign('main_html_footer', $conf->global->MAIN_HTML_FOOTER);
|
||||
$smarty->assign('main_authentication', $main_authentication);
|
||||
$smarty->assign('session_name', $session_name);
|
||||
|
||||
// Message
|
||||
if (! empty($_SESSION["dol_loginmesg"]))
|
||||
{
|
||||
$smarty->assign('dol_loginmesg', $_SESSION["dol_loginmesg"]);
|
||||
}
|
||||
|
||||
// Creation du template
|
||||
$smarty->display('login.tpl'); // To use Smarty
|
||||
// Suppression de la version compilee
|
||||
$smarty->clear_compiled_tpl('login.tpl');
|
||||
|
||||
// END SMARTY
|
||||
}
|
||||
else
|
||||
{
|
||||
include($template_dir.'login.tpl.php'); // To use native PHP
|
||||
}
|
||||
|
||||
include($template_dir.'login.tpl.php'); // To use native PHP
|
||||
|
||||
$_SESSION["dol_loginmesg"] = '';
|
||||
}
|
||||
|
||||
@ -1,137 +0,0 @@
|
||||
{* Copyright (C) 2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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 2 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
*}
|
||||
{php}
|
||||
header('Cache-Control: Public, must-revalidate');
|
||||
header("Content-type: text/html; charset=".$conf->file->character_set_client);
|
||||
{/php}
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
|
||||
<!-- BEGIN SMARTY TEMPLATE -->
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<title>{$title}</title>
|
||||
<meta name="robots" content="noindex,nofollow" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<link rel="apple-touch-icon" href="{$dol_url_root}/theme/phones/iphone/theme/{$theme}/thumbs/homescreen.png" />
|
||||
<meta name="viewport"content="minimum-scale=1.0, width=device-width, maximum-scale=0.6667, user-scalable=no" />
|
||||
<link type="text/css" rel="stylesheet" href="{$dol_url_root}/theme/phones/iphone/theme/{$theme}/{$theme}.css.php" />
|
||||
<script type="text/javascript" src="{$dol_url_root}/includes/iphone/iwebkit/Framework/javascript/functions.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="topbar">
|
||||
<div id="title">{$title}</div>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<form id="login" name="login" method="post" action="{$php_self}">
|
||||
<input type="hidden" name="token" value="{$smarty.session.newtoken}" />
|
||||
<input type="hidden" name="loginfunction" value="loginfunction" />
|
||||
|
||||
<div align="center">
|
||||
<img src="{$dol_url_root}/theme/phones/iphone/theme/{$theme}/thumbs/dolibarr.png">
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<span class="graytitle">{$langs->trans('Identification')}</span>
|
||||
<ul class="pageitem">
|
||||
<li class="form">
|
||||
<input placeholder="{$langs->trans('Login')}" type="text" id="username" name="username" value="{$login}" />
|
||||
</li>
|
||||
|
||||
<li class="form">
|
||||
<input placeholder="{$langs->trans('Password')}" type="password" id="password" name="password" value="{$password}" />
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
{if $select_entity}
|
||||
<span class="graytitle">{$langs->trans('Entity')}</span>
|
||||
<ul class="pageitem">
|
||||
<li class="form">
|
||||
{$select_entity}
|
||||
<span class="arrow"></span>
|
||||
</li>
|
||||
</ul>
|
||||
{/if}
|
||||
|
||||
{if $captcha}
|
||||
<span class="graytitle">{$langs->trans('SecurityCode')}</span>
|
||||
<ul class="pageitem">
|
||||
<li class="form">
|
||||
<span class="narrow">
|
||||
<input type="text" id="securitycode" name="code" />
|
||||
<img src="{$dol_url_root}/lib/antispamimage.php" border="0" width="128" height="36" />
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
{/if}
|
||||
|
||||
<ul class="pageitem">
|
||||
<li class="form">
|
||||
<input name="input Button" type="submit" value="{$langs->trans('Connection')}" />
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{if $forgetpasslink || $helpcenterlink}
|
||||
<span class="graytitle">{$langs->trans('Tools')}</span>
|
||||
|
||||
{if $forgetpasslink}
|
||||
<ul class="pageitem">
|
||||
<li class="menu">
|
||||
<a href="{$dol_url_root}/user/passwordforgotten.php">
|
||||
<img alt="tools" src="{$dol_url_root}/theme/phones/iphone/theme/{$theme}/thumbs/tools.png" />
|
||||
<span class="name">{$langs->trans('PasswordForgotten')}</span>
|
||||
<span class="arrow"></span>
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
|
||||
{if $helpcenterlink}
|
||||
<li class="menu">
|
||||
<a href="{$dol_url_root}/support/index.php">
|
||||
<img alt="support" src="{$dol_url_root}/theme/phones/iphone/theme/{$theme}/thumbs/support.png" />
|
||||
<span class="name">{$langs->trans('NeedHelpCenter')}</span>
|
||||
<span class="arrow"></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{/if}
|
||||
|
||||
{/if}
|
||||
|
||||
{if $dol_loginmesg}
|
||||
<script type="text/javascript" language="javascript">
|
||||
alert('{$dol_loginmesg}');
|
||||
</script>
|
||||
{/if}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!-- END SMARTY TEMPLATE -->
|
||||
135
htdocs/theme/phones/iphone/tpl/login.tpl.php
Normal file
135
htdocs/theme/phones/iphone/tpl/login.tpl.php
Normal file
@ -0,0 +1,135 @@
|
||||
<?php
|
||||
/* Copyright (C) 2009-2010 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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 2 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
header('Cache-Control: Public, must-revalidate');
|
||||
header("Content-type: text/html; charset=".$conf->file->character_set_client);
|
||||
?>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
|
||||
<!-- BEGIN PHP TEMPLATE -->
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<title><?php echo $title; ?></title>
|
||||
<meta name="robots" content="noindex,nofollow" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<link rel="apple-touch-icon" href="<?php echo $dol_url_root.'/theme/phones/iphone/theme/'.$theme.'/thumbs/homescreen.png'; ?>" />
|
||||
<meta name="viewport"content="minimum-scale=1.0, width=device-width, maximum-scale=0.6667, user-scalable=no" />
|
||||
<link type="text/css" rel="stylesheet" href="<?php echo $dol_url_root.'/theme/phones/iphone/theme/'.$theme.'/'.$theme.'.css.php'; ?>" />
|
||||
<script type="text/javascript" src="<?php echo $dol_url_root.'/includes/iphone/iwebkit/Framework/javascript/functions.js'; ?>"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="topbar">
|
||||
<div id="title"><?php echo $title; ?></div>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<form id="login" name="login" method="post" action="<?php echo $php_self; ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>" />
|
||||
<input type="hidden" name="loginfunction" value="loginfunction" />
|
||||
|
||||
<div align="center">
|
||||
<img src="<?php echo $dol_url_root.'/theme/phones/iphone/theme/'.$theme.'/thumbs/dolibarr.png'; ?>">
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<span class="graytitle"><?php echo $langs->trans('Identification'); ?></span>
|
||||
<ul class="pageitem">
|
||||
<li class="form">
|
||||
<input placeholder="<?php echo $langs->trans('Login'); ?>" type="text" id="username" name="username" value="<?php echo $login; ?>" />
|
||||
</li>
|
||||
|
||||
<li class="form">
|
||||
<input placeholder="<?php echo $langs->trans('Password'); ?>" type="password" id="password" name="password" value="<?php echo $password; ?>" />
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<?php if ($select_entity) { ?>
|
||||
<span class="graytitle"><?php echo $langs->trans('Entity'); ?></span>
|
||||
<ul class="pageitem">
|
||||
<li class="form">
|
||||
<?php echo $select_entity; ?>
|
||||
<span class="arrow"></span>
|
||||
</li>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($captcha) { ?>
|
||||
<span class="graytitle"><?php echo $langs->trans('SecurityCode'); ?></span>
|
||||
<ul class="pageitem">
|
||||
<li class="form">
|
||||
<span class="narrow">
|
||||
<input type="text" id="securitycode" name="code" />
|
||||
<img src="<?php echo $dol_url_root.'/lib/antispamimage.php" border="0" width="128" height="36"'; ?> />
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
|
||||
<ul class="pageitem">
|
||||
<li class="form">
|
||||
<input name="input Button" type="submit" value="<?php echo $langs->trans('Connection'); ?>" />
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php if ($forgetpasslink || $helpcenterlink) { ?>
|
||||
<span class="graytitle"><?php echo $langs->trans('Tools'); ?></span>
|
||||
|
||||
<?php if ($forgetpasslink) { ?>
|
||||
<ul class="pageitem">
|
||||
<li class="menu">
|
||||
<a href="<?php echo $dol_url_root.'/user/passwordforgotten.php'; ?>">
|
||||
<img alt="tools" src="<?php echo $dol_url_root.'/theme/phones/iphone/theme/'.$theme.'/thumbs/tools.png'; ?>" />
|
||||
<span class="name"><?php echo $langs->trans('PasswordForgotten'); ?></span>
|
||||
<span class="arrow"></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($helpcenterlink) { ?>
|
||||
<li class="menu">
|
||||
<a href="<?php echo $dol_url_root.'/support/index.php'; ?>">
|
||||
<img alt="support" src="<?php echo $dol_url_root.'/theme/phones/iphone/theme/'.$theme.'/thumbs/support.png'; ?>" />
|
||||
<span class="name"><?php echo $langs->trans('NeedHelpCenter'); ?></span>
|
||||
<span class="arrow"></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<?php } } ?>
|
||||
|
||||
<?php if ($dol_loginmesg) { ?>
|
||||
<script type="text/javascript" language="javascript">
|
||||
alert('<?php echo $dol_loginmesg; ?>');
|
||||
</script>
|
||||
<?php } ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!-- END PHP TEMPLATE -->
|
||||
@ -1,180 +0,0 @@
|
||||
{* Copyright (C) 2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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 2 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
*}
|
||||
{php}
|
||||
header('Cache-Control: Public, must-revalidate');
|
||||
header("Content-type: text/html; charset=".$conf->file->character_set_client);
|
||||
{/php}
|
||||
|
||||
<!-- BEGIN SMARTY TEMPLATE -->
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta name="robots" content="noindex,nofollow">
|
||||
<title>{$langs->trans('Login')}</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="{$conf_css}">
|
||||
|
||||
<style type="text/css">
|
||||
<!--
|
||||
#login {ldelim}
|
||||
margin-top: 10px;
|
||||
margin-bottom: 5px;
|
||||
text-align: center;
|
||||
font: 12px arial,helvetica;
|
||||
{rdelim}
|
||||
#login table {ldelim}
|
||||
border: 1px solid #C0C0C0;
|
||||
background: #F0F0F0 url({$login_background}) repeat-x;
|
||||
font-size: 12px;
|
||||
{rdelim}
|
||||
-->
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
{literal}
|
||||
function donnefocus(element) {
|
||||
document.getElementById(element).focus();
|
||||
}
|
||||
{/literal}
|
||||
</script>
|
||||
|
||||
{if $main_html_header}
|
||||
{$main_html_header}
|
||||
{/if}
|
||||
|
||||
<!-- HTTP_USER_AGENT = {$smarty.server.HTTP_USER_AGENT} -->
|
||||
</head>
|
||||
|
||||
<body class="body" onload="donnefocus({$focus_element});">
|
||||
<form id="login" name="login" method="post" action="{$php_self}">
|
||||
<input type="hidden" name="token" value="{$smarty.session.newtoken}">
|
||||
|
||||
<table class="login" summary="{$title}" cellpadding="0" cellspacing="0" border="0" align="center">
|
||||
<tr class="vmenu"><td align="center">{$title}</td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table class="login" summary="Login area" cellpadding="2" align="center">
|
||||
|
||||
<tr><td colspan="3"> </td></tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td valign="bottom"> <b>{$langs->trans('Login')}</b> </td>
|
||||
<td valign="bottom" nowrap="nowrap">
|
||||
<input type="text" id="username" name="username" class="flat" size="15" maxlength="25" value="{$login}" tabindex="1" /></td>
|
||||
|
||||
<td rowspan="{$logo_rowspan}" align="center" valign="top"> </td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr><td colspan="3"> </td></tr>
|
||||
|
||||
<tr><td valign="top" nowrap="nowrap"> <b>{$langs->trans('Password')}</b> </td>
|
||||
<td valign="top" nowrap="nowrap">
|
||||
<input id="password" name="password" class="flat" type="password" size="15" maxlength="30" value="{$password}" tabindex="2">
|
||||
</td></tr>
|
||||
|
||||
{if $entity}
|
||||
<tr><td valign="top" nowrap="nowrap"> <b>{$langs->trans('Entity')}</b> </td>
|
||||
<td valign="top" nowrap="nowrap">
|
||||
{$entity}
|
||||
</td></tr>
|
||||
{/if}
|
||||
|
||||
{if $captcha}
|
||||
<tr><td valign="middle" nowrap="nowrap"> <b>{$langs->trans('SecurityCode')}</b></td>
|
||||
<td valign="top" nowrap="nowrap" align="left" class="none">
|
||||
|
||||
<table style="width: 100px;"><tr>
|
||||
<td><input id="securitycode" class="flat" type="text" size="6" maxlength="5" name="code" tabindex="4"></td>
|
||||
<td><img src="{$dol_url_root}/lib/antispamimage.php" border="0" width="64" height="24"></td>
|
||||
<td><a href="{$php_self}">{$captcha_refresh}</a></td>
|
||||
</tr></table>
|
||||
|
||||
</td></tr>
|
||||
{/if}
|
||||
|
||||
<tr><td colspan="3"> </td></tr>
|
||||
|
||||
<tr><td colspan="3" style="text-align:center;"><br>
|
||||
<input type="submit" class="button" value=" {$langs->trans('Connection')} " tabindex="5" />
|
||||
</td></tr>
|
||||
|
||||
{if $forgetpasslink || $helpcenterlink}
|
||||
<tr><td colspan="3" align="center">
|
||||
{strip}
|
||||
{if $forgetpasslink}
|
||||
<a style="color: #888888; font-size: 10px" href="{$dol_url_root}/user/passwordforgotten.php">(
|
||||
{$langs->trans('PasswordForgotten')}
|
||||
{/if}
|
||||
|
||||
{if $helpcenterlink}
|
||||
<a style="color: #888888; font-size: 10px" href="{$dol_url_root}/support/index.php" target="_blank">
|
||||
{if $forgetpasslink}
|
||||
-
|
||||
{else}
|
||||
(
|
||||
{/if}
|
||||
{$langs->trans('NeedHelpCenter')}
|
||||
{/if}
|
||||
)</a>
|
||||
{/strip}
|
||||
</td></tr>
|
||||
{/if}
|
||||
|
||||
</table>
|
||||
|
||||
<input type="hidden" name="loginfunction" value="loginfunction" />
|
||||
|
||||
</form>
|
||||
|
||||
{if $smarty.session.dol_loginmesg}
|
||||
<center><table width="60%"><tr><td align="center"><div class="error">
|
||||
{$smarty.session.dol_loginmesg}
|
||||
</div></td></tr></table></center>
|
||||
{/if}
|
||||
|
||||
{if $main_home}
|
||||
<center><table summary="info" cellpadding="0" cellspacing="0" border="0" align="center">
|
||||
<tr><td align="center">
|
||||
{$main_home}
|
||||
</td></tr></table></center><br>
|
||||
{/if}
|
||||
|
||||
{if $main_google_ad_client}
|
||||
<div align="center">
|
||||
{include file=$google_ad_tpl}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<!-- authentication mode = {$main_authentication} -->
|
||||
<!-- cookie name used for this session = {$session_name} -->
|
||||
<!-- urlfrom in this session = {$smarty.session.urlfrom} -->
|
||||
|
||||
{if $main_html_footer}
|
||||
{$main_html_footer}
|
||||
{/if}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!-- END SMARTY TEMPLATE -->
|
||||
174
htdocs/theme/phones/others/tpl/login.tpl.php
Normal file
174
htdocs/theme/phones/others/tpl/login.tpl.php
Normal file
@ -0,0 +1,174 @@
|
||||
<?php
|
||||
/* Copyright (C) 2009-2010 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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 2 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
header('Cache-Control: Public, must-revalidate');
|
||||
header("Content-type: text/html; charset=".$conf->file->character_set_client);
|
||||
?>
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<!-- BEGIN PHP TEMPLATE -->
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta name="robots" content="noindex,nofollow">
|
||||
<title><?php echo $langs->trans('Login'); ?></title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo $conf_css; ?>">
|
||||
|
||||
<style type="text/css">
|
||||
<!--
|
||||
#login {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 5px;
|
||||
text-align: center;
|
||||
font: 12px arial,helvetica;
|
||||
}
|
||||
#login table {
|
||||
border: 1px solid #C0C0C0;
|
||||
background: #F0F0F0 url('<?php echo $login_background; ?>') repeat-x;
|
||||
font-size: 12px;
|
||||
}
|
||||
-->
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
function donnefocus(element) {
|
||||
document.getElementById(element).focus();
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php if ($main_html_header) echo $main_html_header; ?>
|
||||
|
||||
<!-- HTTP_USER_AGENT = <?php echo $_SERVER['HTTP_USER_AGENT']; ?> -->
|
||||
</head>
|
||||
|
||||
<body class="body" onload="donnefocus(<?php echo $focus_element; ?>);">
|
||||
<form id="login" name="login" method="post" action="<?php echo $php_self; ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>">
|
||||
|
||||
<table class="login" summary="<?php echo $title; ?>" cellpadding="0" cellspacing="0" border="0" align="center">
|
||||
<tr class="vmenu"><td align="center"><?php echo $title; ?></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table class="login" summary="Login area" cellpadding="2" align="center">
|
||||
|
||||
<tr><td colspan="3"> </td></tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td valign="bottom"> <b><?php echo $langs->trans('Login'); ?></b> </td>
|
||||
<td valign="bottom" nowrap="nowrap">
|
||||
<input type="text" id="username" name="username" class="flat" size="15" maxlength="25" value="<?php echo $login; ?>" tabindex="1" /></td>
|
||||
|
||||
<td rowspan="<?php echo $logo_rowspan; ?>" align="center" valign="top"> </td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr><td colspan="3"> </td></tr>
|
||||
|
||||
<tr><td valign="top" nowrap="nowrap"> <b><?php echo $langs->trans('Password'); ?></b> </td>
|
||||
<td valign="top" nowrap="nowrap">
|
||||
<input id="password" name="password" class="flat" type="password" size="15" maxlength="30" value="<?php echo $password; ?>" tabindex="2">
|
||||
</td></tr>
|
||||
|
||||
<?php if ($entity) { ?>
|
||||
<tr><td valign="top" nowrap="nowrap"> <b><?php echo $langs->trans('Entity'); ?></b> </td>
|
||||
<td valign="top" nowrap="nowrap">
|
||||
<?php echo $entity; ?>
|
||||
</td></tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($captcha) { ?>
|
||||
<tr><td valign="middle" nowrap="nowrap"> <b><?php echo $langs->trans('SecurityCode'); ?></b></td>
|
||||
<td valign="top" nowrap="nowrap" align="left" class="none">
|
||||
|
||||
<table style="width: 100px;"><tr>
|
||||
<td><input id="securitycode" class="flat" type="text" size="6" maxlength="5" name="code" tabindex="4"></td>
|
||||
<td><img src="<?php echo $dol_url_root.'/lib/antispamimage.php'; ?>" border="0" width="64" height="24"></td>
|
||||
<td><a href="<?php echo $php_self; ?>"><?php echo $captcha_refresh; ?></a></td>
|
||||
</tr></table>
|
||||
|
||||
</td></tr>
|
||||
<?php } ?>
|
||||
|
||||
<tr><td colspan="3"> </td></tr>
|
||||
|
||||
<tr><td colspan="3" style="text-align:center;"><br>
|
||||
<input type="submit" class="button" value=" <?php echo $langs->trans('Connection'); ?> " tabindex="5" />
|
||||
</td></tr>
|
||||
|
||||
<?php
|
||||
if ($forgetpasslink || $helpcenterlink) {
|
||||
echo '<tr><td colspan="3" align="center">';
|
||||
if ($forgetpasslink) {
|
||||
echo '<a style="color: #888888; font-size: 10px" href="'.$dol_url_root.'/user/passwordforgotten.php">';
|
||||
echo '('.$langs->trans('PasswordForgotten');
|
||||
echo '</a>';
|
||||
}
|
||||
if ($helpcenterlink) {
|
||||
echo '<a style="color: #888888; font-size: 10px" href="'.$dol_url_root.'/support/index.php" target="_blank">';
|
||||
if ($forgetpasslink) {
|
||||
echo ' - ';
|
||||
}else{
|
||||
echo '(';
|
||||
}
|
||||
echo $langs->trans('NeedHelpCenter');
|
||||
echo ')</a>';
|
||||
}
|
||||
echo '</td></tr>';
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
|
||||
<input type="hidden" name="loginfunction" value="loginfunction" />
|
||||
|
||||
</form>
|
||||
|
||||
<?php if ($_SESSION['dol_loginmesg']) { ?>
|
||||
<center><table width="60%"><tr><td align="center"><div class="error">
|
||||
<?php echo $_SESSION['dol_loginmesg']; ?>
|
||||
</div></td></tr></table></center>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($main_home) { ?>
|
||||
<center><table summary="info" cellpadding="0" cellspacing="0" border="0" align="center">
|
||||
<tr><td align="center">
|
||||
<?php echo $main_home; ?>
|
||||
</td></tr></table></center><br>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($main_google_ad_client) { ?>
|
||||
<div align="center">
|
||||
<?php include $google_ad_tpl; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<!-- authentication mode = <?php echo $main_authentication; ?> -->
|
||||
<!-- cookie name used for this session = <?php echo $session_name; ?> -->
|
||||
<!-- urlfrom in this session = <?php echo $_SESSION['urlfrom']; ?> -->
|
||||
|
||||
<?php if ($main_html_footer) echo $main_html_footer; ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!-- END PHP TEMPLATE -->
|
||||
Loading…
Reference in New Issue
Block a user