<? ob_start(); include("chatroom/config.php"); $user=(isset($_GET["username"]))?$_GET["username"]:$_GET["user"]; if (empty($room[$roomname])) { $rooms=each($room); $roomname=$rooms[0]; } if (empty($user) || $user=="") include("chatroom/login.php"); else { $usersfile="$data$roomname.user"; $online=false; $validtime=time()-$gap; if (file_exists($usersfile)) { $fr=file($usersfile); $chkuser=strtolower($user); $ip = $_SERVER["REMOTE_ADDR"]; for ($i=0; $i<count($fr) && $online==false; $i++) { $datas=explode("|", $fr[$i]); $online=(strtolower($datas[0])==$chkuser && $datas[1]!=$ip && $validtime<(int)$datas[3]); } } if ($online==false) { setCookie("user", $user, time() + 3600 * 24 * 365); include("chatroom/chat.php"); } else { $user=""; include("chatroom/login.php"); } } ?>
<html> <head> <title><?=$title?> [เข้าระบบ]</title> <meta http-equiv="Content-Type" content="text/html; charset=windows-874"> <link href="../css/Styles.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- .style1 { color: #000099; font-weight: bold; font-size: 24px; } --> </style> </head> <body> <table width=400 border=0 align="center" cellpadding=5 cellspacing=1> <tr> <td align=center valign=middle><span class="style1"> <? if (isset($user) && $user=="") { echo "มีชื่อนี้ Login อยู่ก่อนแล้ว กรุณาเปลี่ยนเป็นชื่ออื่น<br><br>\n"; exit; } ?> </span> <br> <form name="login" method="get" action="" onSubmit="return check()" style="margin:0px;"> <b>ใส่ชื่อคุณ:</b> <input type=text maxlength=12 name=username value="<?=$_COOKIE['user']?>" class=txt autocomplete="off"> <input name="submit" type=submit class=button value=เข้าระบบ></form></td> </tr> </table> </body> </html> <script language=Javascript> //ให้ cursor ไปอยู่ที่ช่อง user document.login.username.focus(); //เลือกข้อความทั้งหมด document.login.username.select(); function check() { var v1=document.login.username; var str = '\'#$%^&ฺ*() +=<>?/|\{}[:;],\"'; var keyV1OK = 0; for (i=0; i<str.length; i++) { if (v1.value.indexOf(str.charAt(i))!= -1) keyV1OK = 1; } if (v1.value.length==0) { alert("กรุณาใส่ชื่อของคุณ"); v1.focus(); return false; } else if (keyV1OK==1) { alert("ชื่อ ไม่ควรมีตัวอักษรเหล่านี้ "+str+" และช่องว่าง"); v1.focus(); return false; } else return true; } </script>
<? $usertime++; //¤Ó¹Ç³àÇÅÒãËÁè if ($usertime>99) $usertime=1; $contenttime++; if ($contenttime>99) $contenttime=1; $f=fopen($timedat, "w"); //ºÑ¹·Ö¡àÇÅÒÅèÒÊØ´ fputs($f, $usertime."\n".$contenttime); fclose($f); } //¤×¹¤èÒÃÒ¡Òà user if ($mytime!=$usertime || $mytime==0) $dat=$usertime.chr(6).implode(chr(5), $useronline_list).chr(6); else $dat="0".chr(6)."0".chr(6); ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง