<?php echo $_SERVER['REMOTE_ADDR']; ?>
<?php ////////////////////////////////// register machine_id by cookie /* 'CREATE TABLE IF NOT EXISTS `machine` '. '( `id` int NOT NULL autoincrement , `description` text, PRIMARY KEY (`id`) )' และเพิ่มฟีลด์ machine_id, timeconnect ใน tb_user */ if( isset($_COOKIE['machine_id'])){ $machine_id=$_COOKIE['machine_id']; }else{ $mysql->query('insert into machine set description = \''.session_id().'\' '); $machine_id=$mysql->insert_id; } setcookie('machine_id', $machine_id, strtotime('+ 30 days')); /////////////////////////////////////////////////////////////// if( isset($_REQUEST['login']) ){ $rs=$mysql->query("select * from tb_user where user_nm='$username' and psw='$psw' "); if($rs->num_rows){ $ro=$rs->fetch_assoc(); if( $machine_id != $ro['machine_id']){ if( $ro['timeconnect']<date('Y-m-d H:i:s', strtotime( '- 1 hours') )){ // time out 1 hours $mysql->query( ' update tb_user '. ' set timeconnect=now(), machine_id = '. $machine_id . ' where user_id = '.$_SESSION['USER_ID']); } else echo 'กำลัง ใช้งานที่เครื่องอื่นอยู่'; }else{ $_SESSION['USER_ID']=$ro['user_id']; $mysql->query('update timeconnect=now() where user_id='.$ro['user_id'] ); } } } //ทุกครั้งที่เปิดไฟล if( $_SESSION['USER_ID']>''){ $msyql->query('update tb_user set timeconnect=now() where user_id='.$_SESSION['USER_ID']); } ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง