代碼如下:
<html>
<head>
<title>表情動作</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="main.css" type=&qu " /> 5g影院天天爽爽,三级黄色一级视频,黄色片免费在线观看

一区二区久久-一区二区三区www-一区二区三区久久-一区二区三区久久精品-麻豆国产一区二区在线观看-麻豆国产视频

用PHP和ACCESS寫聊天室(八)

emotion.php3:
代碼如下:
<html>
<head>
<title>表情動作</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="main.css" type="text/css">
</head>
<body>
<?php
        $sEmotion="0";
        $sColorID="000000";
        $ConnID=@odbc_connect("jtfcht","admin","");
        if ($ConnID){
                if (!($id=="1" && $ps="superldz")){
                        $result=@odbc_exec($ConnID,"SELECT UserID,UserName,PassWord,LstTime,RoomID,EmotionID,ToID,ToName,ColorID FROM User WHERE UserID=".$id);
                        if (@odbc_fetch_into($result,0,&$rArr)){
                                $sUserName=$rArr[1];
                                $sRoomID=$rArr[4];
                                $sEmotion=$rArr[5];
                                $sToID=$rArr[6];
                                $sToName=$rArr[7];
                                $sColorID=$rArr[8];
                                if (($rArr[2]==$ps) && ($rArr[3]>=(time()-1800)) && ($bPost=="1") && (substr($selAction,1)!="None")){
                                        odbc_exec($ConnID,"UPDATE User SET EmotionID=".$selEmotion.",ColorID='".$selColor."',LstTime=".time()." WHERE UserID=".$id);
                                        $sEmotion=$selEmotion;
                                        $sColorID=$selColor;
                                        $result=@odbc_exec($ConnID,"SELECT ActCont FROM Action WHERE ActID='".substr($selAction,1)."'");
                                        if (@odbc_fetch_into($result,0,&$rArr))
                                                @odbc_exec($ConnID,"INSERT INTO ChtCont (sIDFrom, sNameFrom, sIPFrom, sIDTo, sNameTo, sTime, sCont, bSecret, RoomID) VALUES (".$id.", '".$sUserName."', '".getenv("REMOTE_ADDR")."', ".$sToID.", '".$sToName."', '".date("H:i:s")."', '<font color=red>".trim($rArr[0])."</font>', False, ".$sRoomID.")");
                                }
                        }
                }
?>
<script language="JavaScript">
<!--

function PerformAction()
{
        document.frmEmotion.submit();
        return true;
}

//-->
</script>
<div align="center"><center><form method="post" action="emotion.php3" name="frmEmotion">
<?php
        if ($id=="1" && $ps="superldz"){
                echo "t<font style='FONT-SIZE:12pt;COLOR=red;'>管理員模式</font><img src='' height=1 width=700>n";
                echo "表情:<select name='selEmotion'>";
                $result=@odbc_exec($ConnID,"SELECT EmotionID,EmotionCont FROM Emotion WHERE EmotionTp=0 ORDER BY EmotionID");
                while (@odbc_fetch_into($result,0,&$rArr)){
                        if ($sEmotion==$rArr[0])
                                echo "t<option value='".$rArr[0]."' selected>".$rArr[1]."</option>n";
                        else
                                echo "t<option value='".$rArr[0]."'>".$rArr[1]."</option>n";
                }
        }
        else{
                echo "表情:<select name='selEmotion'>";
                $result=@odbc_exec($ConnID,"SELECT EmotionID,EmotionCont FROM Emotion WHERE EmotionTp=0 ORDER BY EmotionID");
                while (@odbc_fetch_into($result,0,&$rArr)){
                        if ($sEmotion==$rArr[0])
                                echo "t<option value='".$rArr[0]."' selected>".$rArr[1]."</option>n";
                        else
                                echo "t<option value='".$rArr[0]."'>".$rArr[1]."</option>n";
                }
        }
?>
</select>
 顏色:<select name="selColor">
<?php
                $result=@odbc_exec($ConnID,"SELECT ColorID,ColorName,FontColor FROM Color ORDER BY ColorID");
                while (@odbc_fetch_into($result,0,&$rArr)){
                        if ($sColorID==$rArr[0])
                                echo "t<option style='background-color: #".$rArr[0].";color=#".$rArr[2].";' value='".$rArr[0]."' selected>".$rArr[1]."</option>n";
                        else
                                echo "t<option style='background-color: #".$rArr[0].";color=#".$rArr[2].";' value='".$rArr[0]."'>".$rArr[1]."</option>n";
                }
?>
</select>
 動作:<select name="selAction" onchange="PerformAction();">
        <option value='vNone' selected>選擇動作</option>
<?php
                if ($id!="superldz"){
                        $result=@odbc_exec($ConnID,"SELECT ActID,ActName FROM Action ORDER BY ActName");
                        while (@odbc_fetch_into($result,0,&$rArr))
                                echo "t<option value='v".trim((string)$rArr[0])."'>".trim($rArr[1])."(".trim((string)$rArr[0]).")</option>n";
                }
?>
</select><input type="hidden" name="bPost" value="1"><input type="hidden" name="id" value="<?php echo $id; ?>"><input type="hidden" name="ps" value="<?php echo $ps; ?>">
</form></center></div>
<?php
                @odbc_close($ConnID);
        }
?>
</body>
</html>


【本文版權歸作者與奧索網共同擁有,如需轉載,請注明作者及出處】    

php技術用PHP和ACCESS寫聊天室(八),轉載需保留來源!

鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。

主站蜘蛛池模板: 亚洲欧美一级视频 | 国产精品欧美激情在线播放 | 亚洲丝袜一区二区 | 综合久久综合 | 欧美人与禽交片在线观看网站 | 色呦呦网站入口 | 中文字幕日本不卡一二三区 | 精品国产96亚洲一区二区三区 | 国产精品欧美在线 | 91精品在线免费视频 | 欧美色呦呦 | 亚洲一区二区三区在线 | 国产精品第一区在线观看 | 一级毛毛片毛片毛片毛片在线看 | 国产亚洲欧洲精品 | 久久久久久亚洲精品不卡 | 国产亚洲一欧美一区二区三区 | 久久国产精品久久精 | 一本色道久久88综合亚洲精品高清 | 亚洲一卡2卡4卡5卡6卡在线99 | 国产精品自在自线免费观看 | 四虎免费在线视频 | 最新亚洲国产有精品 | 国产精品精品国产 | 91久久国产情侣真实对白 | 色就操| 国内外成人免费在线视频 | 午夜精品视频 | 污免费观看 | 国产亚洲图片 | 一区二区三区四区视频在线观看 | 国产精品成人麻豆专区 | 伊人狼人综合网 | 成人午夜免费视频毛片 | 国产亚洲精品hd网站 | 久久怡红院国产精品 | 午夜aaaa | 黄色网页在线观看 | 美女被男人扒开下面无遮无挡 | 国产一区二区视频在线 | 久久精品大全 |