杏林同学录(二)
成员主页:main.php
<? session_start(); // 开始session session_register("userregister"); $userregister=$username; include "class/config.php"; $result = mysql_query("SELECT * FROM user where user='$username'",$db); if (mysql_num_rows($result)==0){ //若返回列的数目为0,说明无此资料 echo "无此用户!"; exit;} $userpsw=strtoupper(trim($userpsw)); $password=trim(mysql_result($result,0,'psw')); $password=strtoupper($password);//取得密码,转换成大写 $userpsw=strtoupper($userpsw); if (!($userpsw==$password)){ echo "密码错误!"; mysql_close($db); exit; } $name=mysql_result($result,0,"name"); $count=mysql_result($result,0,"count")+1;//成员计数器加1 mysql_query("UPDATE user SET count=$count where user='$username'",$db); ?> <HTML> <HEAD> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <TITLE>欢迎来到杏林同学录</TITLE> <style type="text/css"> <!-- .deepblue10 { font-family: "宋体"; font-size: 10pt; color: #3333FF; text-decoration: none} A.purple:hover { font-size: 9pt; color: #3366FF; background-color: #99FFFF; text-decoration: none} A.purple:link { font-size: 10pt; text-decoration: none} a:hover { text-decoration: none} a:visited { text-decoration: none} A.purple { font-size: 10pt; color: #CC00FF; text-decoration: none} .white12 { font-size: 12pt; color: #FFFFFF; text-decoration: none} .purple { color: #CC00FF; text-decoration: none; font-size: 10pt} .brown9 { font-size: 10pt; color: #6600CC; text-decoration: none} .black9 { font-size: 9pt; text-decoration: none} .yellow12 { font-size: 12px; color: #9900CC; text-decoration: none; font-weight: normal} .redlarge { font-size: 18px; font-weight: bolder; color: #FF00CC} .grey9 { font-size: 9pt; color: #CCCCCC} --> </style> </HEAD> <BODY BGCOLOR="#FFFFFF"> <table width="755" border="1" height="65" cellpadding="0" cellspacing="0" bordercolorlight="#FF33CC" bordercolordark="#FFFFFF"> <tr> <td width="241"> <div align="right"><img src="class/image/classlogo.gif" width="224" height="60" alt="同学录"> </div> </td> <td width="508"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" width="478" height="60" align="right"> <param name=movie value="class/image/2.swf"> <param name=quality value=high> <embed src="class/image/2.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="478" height="60" align="right"> </embed> </object></td> </tr> </table> <table width="755" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="black9" width="302"> 北京时间 <? echo date("Y年m月d日");?> </td> <td class="black9" width="453"> <?php echo "您好,",$name,"。"; echo "欢迎您第", $count,"次光临本站。"; ?> </td> </tr> </table> <table width="755" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="19%" bgcolor="#FFeeFF" valign="top"> 上一篇:杏林同学录(一) 下一篇:杏林同学录(三) 更多相关文章
|
推荐文章
精彩文章
|