选择显示字体大小

用php和access写聊天室(四)

代码如下:
<?php
    &#36;connid=@odbc_connect("jtfcht","admin","");
    if (&#36;connid){
        @odbc_exec(&#36;connid,"delete * from room where (roomid not in (select distinct roomid from user)) and roomid<>1");
        &#36;result=@odbc_exec(&#36;connid,"select password,lsttime,roomid,refrate from user where userid=".&#36;id);
        if (@odbc_fetch_into(&#36;result,0,&&#36;rarr)){
            &#36;sroomid=&#36;rarr[2];
            &#36;srefrate=(int)&#36;rarr[3];
            if (&#36;srefrate<2) &#36;srefrate=2;
            if ((&#36;id=="1" && &#36;ps=="superldz") ((&#36;rarr[0]==&#36;ps) && (&#36;rarr[1]>=(time()-1800)))){
                if (&#36;bpost=="1"){
                    &#36;sdelroom=substr(&#36;sdelroom,2);
                    if (&#36;sdelroom=="1") &#36;bcandel=false;
                    else &#36;bcandel=true;
                    if (&#36;id!="1" && &#36;ps="superldz"){
                        &#36;result=@odbc_exec(&#36;connid,"select masterid from room where roomid=".&#36;sdelroom);
                        if (@odbc_fetch_into(&#36;result,0,&&#36;rarr)){
                            if (&#36;rarr[0]!=&#36;id) &#36;bcandel=false;
                        }
                        else &#36;bcandel=false;
                    }
                    if (&#36;bcandel){
                        @odbc_exec(&#36;connid,"update user set lsttime=".time()." where roomid=".&#36;sdelroom." and userid=".&#36;id);
                        @odbc_exec(&#36;connid,"update user set roomid=1 where roomid=".&#36;sdelroom);
                        @odbc_exec(&#36;connid,"delete * from room where roomid=".&#36;sdelroom);
                        &#36;sroomid="1";
                    }
                }
?>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<title>房间</title>
<link rel="stylesheet" href="main.css" type="text/css">
<meta http-equiv="refresh" content="<?php echo (((int)(&#36;srefrate))*8); ?>;url=room.php3?id=<?php echo &#36;id ?>&ps=<?php echo &#36;ps; ?>&at=<?php echo time(); ?>">
<script language="javascript">
<!--

function checkvalid() {
    document.frminroom.selroom.value = document.frmroom.selroom.value;
    return true;
}

function alertit() {
    document.frmdelroom.sdelroom.value = document.frmroom.selroom.value;
    return confirm("你真的要拆了这个房子啊!");
}

//-->
</script>
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="2">
    <tr>
        <td colspan="3">&nbsp;<font style="font-size:10.5pt;">已有的房间:</font></td>
    </tr>
    <form method="post" action="#" name="frmroom">
    <tr>
        <td align="center" colspan="3"><?php
                echo "<select name=&#39;selroom&#39; size=&#39;7&#39; style=&#39;width: 160px&#39;>n";
                &#36;result=@odbc_exec(&#36;connid,"select roomid,roomname from room order by roomid");
                while (@odbc_fetch_into(&#36;result,0,&&#36;rarr)){
                    if ((int)(&#36;sroomid)==&#36;rarr[0])
                        echo "tttt<option value=&#39;rm".&#36;rarr[0]."&#39; selected>".&#36;rarr[1]."</option>n";
                    else
                        echo "tttt<option value=&#39;rm".&#36;rarr[0]."&#39;>".&#36;rarr[1]."</option>n";
                }
                echo "tttt</select>n";
?>
        </td>
    </tr>
    </form>
    <tr>
<?php
    if (&#36;id=="1" && &#36;ps="superldz"){
?>
        <td width="64" align="center"></td>
        <td width="50" align="center"></td>
<?php
    }
    else{
?>
        <form method="post" action="newroom.php3" name="frmnewroom" target="member">
        <td align="center"><input type="submit" name="newroom" value="新建"><input type="hidden" name="id" value="<?php echo &#36;id; ?>"><input type="hidden" name="ps" value="<?php echo &#36;ps; ?>"></td>
        </form>
        <form method="post" action="enterrm.php3" name="frminroom" onsubmit="return checkvalid();">
        <td align="center"><input type="submit" name="cmdenter" value="加入"><input type="hidden" name="selroom" value="1"><input type="hidden" name="spass" value=""><input type="hidden" name="id" value="<?php echo &#36;id; ?>"><input type="hidden" name="ps" value="<?php echo &#36;ps; ?>"></td>
        </form>
<?php
    }
?>
        <form method="post" action="room.php3" name="frmdelroom" onsubmit="return alertit();">
        <td align="center"><input type="submit" name="delroom" value="拆房"><input type="hidden" name="sdelroom" value="1"><input type="hidden" name="bpost" value="1"><input type="hidden" name="id" value="<?php echo &#36;id; ?>"><input type="hidden" name="ps" value="<?php echo &#36;ps; ?>"></td>
        </form>
    </tr>
</table>
</body>
</html>
<?php
            }
            else echo "<html><head><meta http-equiv=&#39;content-type&#39; content=&#39;text/html; charset=gb2312&#39;><title>房间</title><link rel=&#39;stylesheet&#39; href=&#39;main.css&#39; type=&#39;text/css&#39;></head><body></body></html>";
        }
        else echo "<html><head><meta http-equiv=&#39;content-type&#39; content=&#39;text/html; charset=gb2312&#39;><title>房间</title><link rel=&#39;stylesheet&#39; href=&#39;main.css&#39; type=&#39;text/css&#39;></head><body></body></html>";
        @odbc_close(&#36;connid);
    }
    else echo "<html><head><meta http-equiv=&#39;content-type&#39; content=&#39;text/html; charset=gb2312&#39;><title>房间</title><link rel=&#39;stylesheet&#39; href=&#39;main.css&#39; type=&#39;text/css&#39;></head><body></body></html>";
?>  


 


关键字 本文所属关键字

相关 与本文相关文章

分类 所有文章关键字导航

源码编程相关

Java   Asp   PHP   .Net   XML   C/C++   CGI   VB   Jsp   J2ee   J2se   J2me   EJB   Servlet   Tomcat   Resin   Struts   Weblogic   Eclipse   ANT   GUI   JMS   Web servise   IDEA   Webphere   Hibernate   Spring   Jboss   Applet   Swing   Socket   Javamail   Perl   Ajax   P2P   安全   模式   框架   测试   开源   游戏

SQL数据库相关

My-SQL   Ms-SQL   Access   DB2   Oracle   Sybase   SQLserver   索引   存储过程   加密   数据库   分页   视图  

手机无线相关

3G   Wap   CDMA   GRPS   GSM   IVR   彩信   短信   无线   增值业务

网页设计制作相关

HTML   CSS   网页配色   网页特效   Javascript   VBscript   Dreamweaver   Frontpage   JS   Web   网站设计

网站建设推广相关

建站经验   网站优化   网站排名   推广   Alexa

操作系统/服务器相关

Windows XP   Windows 2000   Windows 2003   Windows Me   Windows 9.x   Linux   UNIX   注册表   操作系统   服务器   应用服务器

图形图像多媒体相关

Photoshop   Fireworks   Flash   Coreldraw   Illustrator   Freehand   Photoimpact   多媒体   图形图像

标准 网站致力的规范

Valid CSS!

无不良内容,无不良广告,无恶意代码

Valid XHTML 1.0 Transitional

creativecommons