Chat room Php&mysql (iii)

Source: Internet
Author: User
Third page name= "frame3.php"


?
Include ".. /signup/mysql.php ";
Echo $userid;
Echo $private;
if ($p) $p = 1;
else $p = 0;

if ($action = "OK") and ($p)) {

$sql = "Select Userid,id from chat_user_list where userid= ' $userid '";
$result =mysql_query ($sql);
$roww =mysql_fetch_array ($result);
$userrr = $ROWW ["id"];





$sql = "Select Userid,id from chat_user_list where id= ' $object '";
$result =mysql_query ($sql);
if ($row 1=mysql_fetch_array ($result))
$object = $row 1["userid"];
else {
$object = "Everyone";
$k = 1;}

$select = "Select row from User_message order by row DESC";
$result =mysql_query ($select) or Die ("false fgfg");
$rowlist =mysql_fetch_array ($result) or Die ("false fgs");
$max _row= $rowlist ["Row"];

$row = $max _row+1;
$time 1=date ("g:i");


$sql = "INSERT into User_message (userid,object,message,status,action1,color,row,time1) VALUES (' $userid ', ' $object ', ' $message ', ' $private ', ' $action 1 ', ' $color ', ' $row ', ' $time 1 ') ';

mysql_query ($sql) or Die (Mysql_error ());

if ($k) {$object = "everyone"; $private = 0;}
Else
$object = $row 1["id"];
}

?>
<title>input table</title>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">


<script language= "JavaScript" >
<!--
function User (user) {

Document.form1.object.value=user;
}

function Changnick () {
window.open ("Changnick.php?userid=<?echo $userid;? > "," Changnick "," toolbar=no,directories=no,menubar=no,width=800,height=570,width=340,height=220,status=0 ");
}

-->
</SCRIPT>


<body bgcolor= "#6699FF" text= "#000000" >

<div id= "Layer1" style= "Position:absolute; left:125px; top:4px; width:498px; height:79px; Z-index:1 ">
<form name= "Form1" method= "POST" align= "center" action= " echo $PHP _self >?action=ok ">
<p> <font color= "#6699ff" >.</font>
<input type= "Text" Name= "Object" size= "ten" value= "<?echo $object?>" >
<input type= "hidden" name= "userid" value= "<?echo $userid?>" >
Said
<input type= "hidden" name= "P" value= "1" >
<input type= "text" name= "message" size= ">"
<input type= "Submit" Name= "OK" value= "send" >
</p>
<p> <font color= "#6699FF" >.</font>
<select name= "Action1" >
<option selected value= "Say" > Talk </option>
<option value= "Quietly" > Quietly </option>
<option value= "cheerfully" > Happy </option>
<option value= "Smile" > Smile </option>
<option value= "Ha, ha, ha!" laughs > Laughs </option>
<option value= "Grinning" > Giggle </option>
<option value= "smirking" > smirking </option>
<option value= "Hands on the ground" > All hands </option>
<option value= "Toot mouth" > Beep </option>
<option value= "Going to Cry" > is going to cry </option>
<option value= "Kicking and punching" > Kicking and punching </option>
<option value= "maliciously" > Malicious </option>
<option value= "Regret" > Regret </option>
<option value= "Stare big eyes, very surprised" > surprised </option>
<option value= "Happy" > Happiness </option>
<option value= "rummaging" > Rummaging </option>
<option value= "Sadly" > Sadness </option>
<option value= "Kinky laugh" > Sex laugh </option>
<option value= "Drooling" > Drooling </option>
<option value= "awe-inspiring" > Awe-inspiring </option>
<option value= "angrily" > Angry </option>
<option value= "loudly" > Loud </option>
<option value= "foolishly" > Silly </option>
<option value= "A very satisfied look" > Very satisfied </option>
<option value= "unprepared" > unprepared </option>
<option value= "very innocently" > Innocent </option>
<option value= "mumbling" > Mumbling </option>
<option value= "stare fiercely" > Stare </option>
<option value= "Going to vomit" > want to Vomit </option>
<option value= "feel uncomfortable" > uncomfortable </option>
<option value= "listless" > Listless </option>
<option value= "reluctantly" > reluctantly </option>
<option value= "Foaming foam ground" > Foaming </option>
<option value= "Cannot conceal ecstasy" > Ecstasy </option>
<option value= "Smiling a Hand" > Surrender </option>
<option value= "very politely made a Yi" > Zuoyi </option>
<option value= "Cough!" > sigh with regret </option>
<option value= "deep bow" > Apology </option>
<option value= "Looking out of the window drizzle, can't help eyes Hazy" > Sad </option>
<option value= "Tears to Cry" > Tearful </option>
<option value= "Think of Sad place, tears flow like note" > Cry </option>
<option value= "Cry with a Head" > Weep </option>
<option value= "good fear ..." > Fear </option>
<option value= "feel very peculiar" > Peculiar </option>
<option value= "squint small eye Way" > Squint eye </option>
<option value= "giggle, very generous" > generous </option>
<option value= ' face flushed, ' > Blush </option>
<option value= "cried angrily" > Angry </option>
<option value= "Raise Your Voice" > Loud </option>
<option value= "断喝 of the Foot gas" > 断喝 </option>
<option value= "A Face of Confusion" > confused </option>
<option value= "helplessly shrug" > shrug </option>
<option value= "Knock yourself on the forehead" > Beat brain </option>
<option value= "Watching others laugh, bored very" > boring </option>
<option value= "Gu meditation" > Meditation </option>
<option value= "An innocent Look" > Innocence </option>
<option value= "Uncomfortable" > Ill </option>
</select>
Color
?
$blue = "Blue"; $black = "BLACK"; $red = "red"; $yellow = "yellow"; $zi = "Violet"; $green = "green"; $qing = "Blue";
if ($color = = "#0000FF") $color 1= $blue;
if ($color = = "#000000") $color 1= $black;
if ($color = = "#FF0000") $color 1= $red;
if ($color = = "#FFFF00") $color 1= $yellow;
if ($color = = "#800080") $color 1= $zi;
if ($color = = "#008000") $color 1= $green;
if ($color = = "#00CC00") $color 1= $qing;
?>
<select name= "Color" >
<option selected value= "<?echo $color;? > "><?echo $color 1;?></option>
<option value= "#0000FF" > Blue </option>
<option value= "#000000" > Black </option>
<option value= "#FF0000" > Red </option>
<option value= "#FFFF00" > Yellow </option>
<option value= "#800080" > Violet </option>
<option value= "#008000" > Green </option>
<option value= "#00CC00" > Green </option>
</select>
Private chat
<input type= "checkbox" Name= "Private" value= "1" if ($private) echo "checked";?>>
</p>
</form>
</div>
<div id= "Layer2" style= "Position:absolute; left:34px; top:6px; width:85px; height:24px; Z-index:2 ">
<?echo $userrr;? >
</div>
<div id= "Layer3" style= "Position:absolute; left:68px; top:47px; width:79px; height:25px; Z-index:3 "> Action expression </div>
<div id= "Layer4" style= "Position:absolute; left:412px; top:49px; width:73px; height:24px; Z-index:4 "><a href=" Javascript:changnick () > renamed </a></div>
<div id= "Layer5" style= "Position:absolute; left:508px; top:48px; width:80px; height:26px; Z-index:5 "><a href=" javascript:parent.window.close () > Leave chat room </a></div>
<div id= "Layer6" style= "Position:absolute; left:116px; top:6px; width:32px; height:20px; Z-index:6 "> to </div>

<div id= "Layer7" style= "Position:absolute; left:108px; top:82px; width:427px; height:19px; Z-index:7 ">
<div align= "center" ><font color= "#FF0000" >2001 @ All rights reserved <a href= "Mailto:xiaoyanglg@263.net" > Feit Boys Studio </a></font></div>
</div>
</div>
</body>
Turn from: Dynamic Network production guide www.knowsky.com

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.