江西广告网
标题:
UCH2.0绿色完美支持邮箱登陆(免费)
[打印本页]
作者:
anchen
时间:
2009-10-26 01:55
标题:
UCH2.0绿色完美支持邮箱登陆(免费)
UCH2.0绿色完美支持邮箱登陆(免费)
找到 source/do_login.php
$password = $_POST['password'];
$username = $_POST['username'];
$cookietime = intval($_POST['cookietime']);
复制代码
在下面加入:
if (isemail($username)) {
$sqlgetuser = "SELECT uid,email,emailcheck FROM ".tname("spacefield")." WHERE email='$username'";
$querygetuser = $_SGLOBAL['db']->query($sqlgetuser);
$getuserid = $_SGLOBAL['db']->fetch_array($querygetuser);
if ($getuserid['emailcheck'] == 0 && $_SGLOBAL['db']->num_rows($querygetuser) != 0) {
showmessage('email_unchecked', 'do.php?ac='.$_SCONFIG['login_action']);
}
$getuserid = $getuserid['uid'];
$sqlgetuser = "SELECT uid,username FROM ".tname("space")." WHERE uid='$getuserid'";
$querygetuser = $_SGLOBAL['db']->query($sqlgetuser);
$getusername = $_SGLOBAL['db']->fetch_array($querygetuser);
$username = trim($getusername['username']);
} //
复制代码
找到 language/lang_showmessage.php
在里面添加
'email_unchecked'
复制代码
对应的提示信息(根据自身要求写)
然后修改登录提示 修改之前请备份
template/default/index.htm
找到
<p><label for="username">用户名</label> <input type="text" name="username" id="username" class="t_input" value="$membername" /></p>
复制代码
替换为
<p><label for="username">帐 号</label> <input type="text" name="username" id="username" class="t_input" value="用户名或Email" onfocus="if (value =='用户名或Email'){value =''}" onblur="if (value ==''){value='用户名或Email'}" /></p>
复制代码
template/default/do_login.htm
找到
<tr><th width="100"><label for="username">用户名</label></th><td><input type="text" name="username" id="username" class="t_input" value="$membername" tabindex="2" /></td></tr>
复制代码
替换为
<tr><th width="100"><label for="username">帐 号</label></th><td><input type="text" name="username" id="username" class="t_input" value="用户名或Email" onfocus="if (value =='用户名或Email'){value =''}" onblur="if (value ==''){value='用户名或Email'}" tabindex="2" /></td></tr>
复制代码
欢迎光临 江西广告网 (http://bbs.jxadw.com/)
Powered by Discuz! X3.2