29 require_once(
"../class/config_nochk.php");
31 if (
$mem->checkid(
false)) {
32 Header(
"Location: /main.php");
38 $H=getenv(
"HTTP_HOST");
40 if (!isset($restrictip)) {
43 if (!isset($charset) || ! $charset) $charset=
"UTF-8";
44 @header(
"Content-Type: text/html; charset=$charset");
46 require_once(
"html-head.php");
48 <body
class=
"login_page">
54 $logo =
variable_get(
'logo_login',
'' ,
'You can specify a logo for the login page, example /images/my_logo.png .', array(
'desc'=>
'URL',
'type'=>
'string'));
56 $logo =
'images/logo.png';
59 <p
id=
'logo'> <img src=
"<?php echo $logo; ?>" border=
"0" height=
"100px" alt=
"<?php __("Web Hosting Control Panel
"); ?>" title=
"<?php __("Web Hosting Control Panel
"); ?>" />
62 <?php echo
$msg->msg_html_all(); ?>
65 if (isset($_GET[
'authip_token'])) $authip_token=$_GET[
'authip_token'];
66 if (
variable_get(
'https_warning',
true,
'warn users to switch to HTTPS') && !isset($_SERVER[
'HTTPS'])) {
67 echo
'<div class="unsecure"><strong>' . sprintf(_(
'WARNING: you are trying to access the control panel insecurely, click <a href="https://%s">here</a> to go to secure mode'), $_SERVER[
"HTTP_HOST"]) .
'</strong></div>';
70 <div
class=
"block_list">
71 <div
class=
"block_login_page">
72 <?php
__(
"To connect to the hosting control panel, enter your AlternC's login and password in the following form and click 'Enter'"); ?>
74 <div
class=
"block_login_page">
75 <div
class=
"menu-box">
76 <?php
if (!empty($authip_token)) { echo
"<p style='color:red;'>";
__(
"You are attemping to connect without IP restriction."); echo
"</p>"; } ?>
77 <div
class=
"menu-title"><?php
__(
"AlternC access"); ?></div>
78 <form action=
"login.php" method=
"post" name=
"loginform" target=
"_top">
80 <div
class=
"menu-content">
81 <div><label
for=
"username"><?php echo _(
"Username"); ?></label></td><td><input type=
"text" class=
"int" name=
"username" id=
"username" value=
"" maxlength=
"128" autocapitalize=
"none" /></div>
82 <div><label
for=
"password"><?php echo _(
"Password"); ?></label></td><td><input type=
"password" class=
"int" name=
"password" id=
"password" value=
"" maxlength=
"128" /></div>
83 <div
class=
"submit"><input type=
"submit" class=
"inb" name=
"submit" onclick=
'return logmein();' value=
"<?php __("Enter
"); ?>" /><input type=
"hidden" id=
"restrictip" name=
"restrictip" value=
"0" />
84 <input type=
"hidden" id=
"authip_token" name=
"authip_token" value=
"<?php ehe( (empty($authip_token)?'':$authip_token) ) ?>" /></div>
89 <div
class=
"block_login_page">
90 <a href=
"request_reset.php"><?php echo _(
'Request new password'); ?></a>
92 <?php
__(
"You must accept the session cookie to log-in"); ?>
94 <?php echo _(
"If you want to use a different language, choose it in the list below"); ?>
97 foreach($locales as $l) {
99 <a href=
"?setlang=<?php echo $l; ?>"><?php
if (isset($lang_translation[$l])) echo $lang_translation[$l];
else echo $l; ?></a>
103 $mem->show_help(
"login",
true);
106 <div
class=
"block_login_page">
115 foreach(
$res as
$r)
if (
$r!==
false) { $url=
$r;
break; }
117 if (isset($url) && $url) {
119 <p><a href=
"<?php echo $url; ?>"><?php
__(
"To read your mail in a browser, click here to go to your server's Webmail"); ?></a></p>
125 <div
class=
"alternc_powered">
126 <a href=
"http://www.alternc.com/"><img src=
"images/powered_by_alternc2.png" width=
"128" height=
"32" alt=
"Powered by AlternC" /></a>
129 <script type=
"text/javascript">
130 $(
'#username').focus();
133 if ( $(
'#username').val() ==
'' || $(
'#password').val() ==
'' ) {
134 alert(
"<?php __("Need a login and a password
"); ?>");
142 <div style=
"clear:both;" ></div>
variable_get($name, $default=null, $createit_comment=null)
Return a persistent variable.
csrf_get($return=false)
Give a new CSRF uniq token for a form the session must be up since the CSRF is linked to the session ...