①打开templates/你的主题/network.htm
1.1找- <p><label for="username">用户名</label> <input type="text" name="username" id="username" class="t_input" value="$membername" /></p>
- <p><label for="password">密 码</label> <input type="password" name="password" id="password" class="t_input" value="$password" /></p>
复制代码 替换成- <div class="loginout">
- <div class="login">
- <span id="type" class="btn com" onmouseover="this.className='btn over'" onmouseout="this.className='btn com';" onclick="$('type_sel').className='types block';">
- 用户名
- </span>
- <span id='sel_btn'></span>
- <input class="t_input" style="border:0px;width:118px;" type="text" name="username" id="username" value="$membername" tabindex="2" />
- </div>
- <div id="type_sel" class="types none" onmouseover="$('type').className='btn over'">
- <a style="cursor:hand;" onclick="chgwd(this);$('type_sel').className='types none';$('type_val').value=1;">用 户 名</a><br>
- <a style="cursor:hand;" onclick="chgwd(this);$('type_sel').className='types none';$('type_val').value=2;">DK 号</a>
- <input id='type_val' type="hidden" name="type" value="1">
- </div>
- <div class="login">
- <span>
- 密 码 :
- </span>
- <input type="password" name="password" id="password" class="t_input" style="border:0px;width:120px;" tabindex="3" value="$password" />
- </div>
- </div>
复制代码 1.2找上面加- function chgwd(obj){
- $('type').innerHTML = obj.innerHTML;
- $('username').focus();
- $('username').select();
- }
复制代码 ②打开 source/do_login.php
2.1 找- $password = $_POST['password'];
复制代码 上面加- $isuid = $_POST['type'] == 1 ? 0 : 1 ;//登录类型 1:用户名;2:DK号;
复制代码 2.2找- getpassport($username, $password)
复制代码 替换成- getpassport($username, $password, $isuid)
复制代码 ③ 打开 source/function_common.php
3.1找- getpassport($username, $password)
复制代码 替换成- getpassport($username, $password, $isuid)
复制代码 3.2 找- uc_user_login($username, $password)
复制代码 替换成- getpassport($username, $password, $isuid)
复制代码 ⑤登录页面
5.1找- <tr><td colspan="2">
- <div class="loginout">
- <div class="login">
- <span id="type" class="btn com" onmouseover="this.className='btn over'" onmouseout="this.className='btn com';" onclick="$('type_sel').className='types block';">
- 用户名
- </span>
- <span id='sel_btn'></span>
- <input class="t_input" style="border:0px;width:118px;" type="text" name="username" id="username" value="$membername" tabindex="2" />
- </div>
- <div id="type_sel" class="types none" onmouseover="$('type').className='btn over'">
- <a style="cursor:hand;" onclick="chgwd(this);$('type_sel').className='types none';$('type_val').value=1;">用 户 名</a><br>
- <a style="cursor:hand;" onclick="chgwd(this);$('type_sel').className='types none';$('type_val').value=2;">DK 号</a>
- <input id='type_val' type="hidden" name="type" value="1">
- </div>
- <div class="login">
- <span>
- 密 码 :
- </span>
- <input type="password" name="password" id="password" class="t_input" style="border:0px;width:120px;" tabindex="3" value="$password" />
- </div>
- </div>
- </td></tr>
复制代码 替换成- <tr><td colspan="2">
- <div class="loginout">
- <div class="login">
- <span id="type" class="btn com" onmouseover="this.className='btn over'" onmouseout="this.className='btn com';" onclick="$('type_sel').className='types block';">
- 用户名
- </span>
- <span id='sel_btn'></span>
- <input class="t_input" style="border:0px;width:118px;" type="text" name="username" id="username" value="$membername" tabindex="2" />
- </div>
- <div id="type_sel" class="types none" onmouseover="$('type').className='btn over'">
- <a style="cursor:hand;" onclick="chgwd(this);$('type_sel').className='types none';$('type_val').value=1;">用 户 名</a><br>
- <a style="cursor:hand;" onclick="chgwd(this);$('type_sel').className='types none';$('type_val').value=2;">DK 号</a>
- <input id='type_val' type="hidden" name="type" value="1">
- </div>
- <div class="login">
- <span>
- 密 码 :
- </span>
- <input type="password" name="password" id="password" class="t_input" style="border:0px;width:120px;" tabindex="3" value="$password" />
- </div>
- </div>
- </td></tr>
复制代码 5.2找- <form id="loginform" name="loginform" action="do.php?ac=$_SCONFIG[login_action]&$url_plus&ref" method="post" class="c_form">
复制代码 上面加- <script language="javascript">
- function chgwd(obj){
- $('type').innerHTML = obj.innerHTML;
- $('username').focus();
- $('username').select();
- }
- </script>
- <style>
- .loginout { position:relative; padding-left:10px;}
- .login { padding:1px 0 1px 5px; border: #CCC 1px solid; position:relative; width:190px; margin-bottom:5px;}
- .login .t_input { background:#FFF; }
- .loginout .types { padding:5px 0 1px 5px; width: 50px; position:absolute; top:0px; left:0px; z-index:99; background:#FFF; border:#09F 1px solid; margin-left:0px;}
- .loginout .none { display:none; }
- .loginout .block { display:block; }
- .login .btn { cursor:hand;top:4px; padding-right:12px; width:48px; position:absolute;}
- .login .com { background:url(image/btn/newarow.gif) no-repeat right -3px ;}
- .login .over { background:url(image/btn/newarow.gif) no-repeat right -22px;}
- #username { left:55px; top:0px; position:relative;}
- </style>
复制代码 OK! |