http://www.mdoing.com/ 的会员登陆怎么实现? 以下代码加条件判断能做到吗? 我是新手 希望大家多多指点
<? require("../e/class/connect.php"); include("../e/class/db_sql.php"); include("../e/class/q_functions.php"); include("../e/class/user.php"); include("../e/class/MemberLevel.php"); $link=db_connect(); $empire=new mysqlquery(); $editor=1; //是否登陆 $user=islogin(); $r=ReturnUserInfo($user[userid]); $userdate=0; //时间 if($r[userdate]) { $userdate=$r[userdate]-time(); if($userdate<=0) { $userdate=0; } else { $userdate=round($userdate/(24*3600)); } } ?> <html> <head> <title>会员登录</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <link href="/img0728/css.CSS" rel="stylesheet" type="text/css" /> <style type="text/css"> <!--
TD { FONT-FAMILY:宋体;FONT-SIZE: 9pt;line-height: 130%; } a{text-decoration: none;} /* 链接无下划线,有为underline */ a:link {color: #000000;} /* 未访问的链接 */ a:visited {color: #000000;} /* 已访问的链接 */ a:hover{COLOR: #AE0927;} /* 鼠标在链接上 */ a:active {color: #000000;} /* 点击激活链接 */ body { margin-left: 5px; margin-top: 7px; margin-right: 0px; margin-bottom: 0px; background-image: url(/img0728/menubg.gif); background-repeat: repeat-x; }
--> </style> <!--增加使userlogin.asp不能脱离框架结构的判断 -->
<!--完毕--> <table align='left' border='0' cellspacing='0' cellpadding='0'> <form action='/e/enews/index.php' method='post' name='form1' onSubmit='return CheckLoginForm();' target='_top'> <tr> <input type=hidden name=enews value=login> <td width=20><img src=/img0728/arf.jpg border=0></td><td height='25' width=105><input name='username' type='text' id='username' size='16' maxlength='20' class='input2' style='width:100px;height=18;'></td> <td height='25' width=105><input name='password' type='password' id='password' size='16' maxlength='20' style='width:100px;height=18;' class='input2'></td> <td height='25' width=70><input name='key' type='text' id='key' size='6' maxlength='6' class='input2' style='width:60px;height=18;'></td> <td width=70><a href='javascript:refreshimg()' title='看不清楚,换个图片'><img id='checkcode' src='/e/ShowKey/?ecms' style='border: 1px solid #666666'></a></td> <td height='25' colspan='2' align='center' width=80> <input type='checkbox' name='CookieDate' value='3'><font color=000000>永久登录</font> <input type='hidden' name='ComeUrl' value='http://www.518ol.com'> </td><td width=60><input name='Login' type='image' id='Login' src='/img0728/login.jpg'></td> <td> <a href='/Reg/User_Reg.asp' target='_blank'><font color='#000000'>免费注册!</font></a> <a href='/User/User_GetPassword.asp' target='_blank'><font color='#000000'>忘记密码?</font></a> </td> </tr></form></table> <script language=javascript> function refreshimg(){document.all.checkcode.src='/e/ShowKey/?ecms';} function CheckLoginForm(){ if(document.UserLogin.UserName.value==''){ alert('请输入用户名!'); document.UserLogin.UserName.focus(); return false; } if(document.UserLogin.Password.value == ''){ alert('请输入密码!'); document.UserLogin.Password.focus(); return false; } if(document.UserLogin.CheckCode.value == ''){ alert('请输入验证码!'); document.UserLogin.CheckCode.focus(); return false; } } </script>
<table align='left' height=28 border='0' cellspacing='0' cellpadding='2' ><tr><td> <b><font color=#ffffff><?=$user[username]?></font></b></td> <td></td><td>会员等级:<span style="color:blue;font-weight:bold;"><?=$level_r[$r[groupid]][groupname]?></span> </td><td></td><td>剩余天数: <b><font color=blue><?=$userdate?></font></b> 天</td><td></td><td></td><td>剩余点数: <b><font color=blue><?=$r[userfen]?></font></b> 点 </td><td>【<a href='http://www.518ol.com/e/enews?enews=exit' target='_top'>注销登录</a>】【<a href='http://www.518ol.com/e/member/EditInfo' target='_top'>修改密码</a>】
</body> </html>
|