<? session_start(); ?> <meta http-equiv="Content-Type" content="text/html; charset=windows-874"> <? require_once('Connections/db_connect.php'); $MEM_USER = $HTTP_POST_VARS['MEM_USER']; $MEM_PASS = $HTTP_POST_VARS['MEM_PASS']; $_SESSION['MEM_USER']= $MEM_USER; $_SESSION['MEM_PASS']= $MEM_PASS ; //print $_SESSION['MEM_USER']; //print "<br>".$_SESSION['MEM_PASS']; $sql = "SELECT MEM_PASS FROM member WHERE MEM_USER='$MEM_USER' AND MEM_PASS='$MEM_PASS'"; //$sql = "SELECT * FROM MEMBER WHERE MEM_USER='$MEM_USER' AND MEM_PASS='$MEM_PASS'"; //print $sql; $rs = mysql_query($sql) or die(mysql_error()); $nrow = mysql_num_rows($rs); $row=mysql_fetch_array($rs); //if($nrow >=1){ if($nrow !=0){ // $sql1=" SELECT MEM_SCORE1 FROM MEMBER WHERE MEM_USER = '$MEM_USER' AND MEM_PASS = '$MEM_PASS' "; // //print $sql1; // $rs1 = mysql_query($sql1); // $nrow1 = mysql_num_rows($rs1); // $row1=mysql_fetch_array($rs1); // if($row1==0) { // print " <meta http-equiv=\"refresh\" content=\"0; URL=chap_1.php?ck=0\"> "; // }else { //print " <meta http-equiv=\"refresh\" content=\"0; URL=chap_1.php?ck=0\"> "; //$sql2=" SELECT MEM_PRETEST_VALUE, MEM_SCORE1, MEM_SCORE2, MEM_SCORE3, MEM_SCORE_POST FROM MEMBER WHERE MEM_USER ='$MEM_USER' and MEM_PASS='$MEM_PASS' "; $sql2=" SELECT * FROM member WHERE mem_user ='$MEM_USER' and mem_pass='$MEM_PASS' "; //print $sql2; $rs2 = mysql_query($sql2); $nrow2 = mysql_num_rows($rs2); $row2=mysql_fetch_array($rs2); $score1=$row2['mem_pretest_value']; $score2=$row2['mem_score1']; $score3=$row2['mem_score2']; $score4=$row2['mem_score3']; $score5=$row2['mem_score4']; $score6=$row2['mem_score5']; $score7=$row2['mem_score6']; $score8=$row2['mem_score7']; $score9=$row2['mem_score8']; $score10=$row2['mem_score9']; $score11=$row2['mem_score10']; $score12=$row2['mem_score11']; $score13=$row2['mem_score12']; $score14=$row2['mem_score13']; $score15=$row2['mem_score14']; $score16=$row2['mem_score15']; $score17=$row2['mem_score16']; $score18=$row2['mem_score17']; $score19=$row2['mem_score18']; $score20=$row2['mem_score_post']; //echo "1:".$score1." 2:".$score2." 3:".$score3." 4:".$score4." 5:".$score5; if(($score>0) || ($score1==0)) { //print " <meta http-equiv=\"refresh\" content=\"0; URL=chap_1.php\"> "; print " <meta http-equiv=\"refresh\" content=\"0; URL=chap_1.php?cK=0\"> "; }else if($score2<8) { // print " <meta http-equiv=\"refresh\" content=\"0; URL=test1.php\"> "; print " <meta http-equiv=\"refresh\" content=\"0; URL=chap1.php\"> "; }else if($score3<8) { //print " <meta http-equiv=\"refresh\" content=\"0; URL=test2.php\"> "; print " <meta http-equiv=\"refresh\" content=\"0; URL=chap2.php\"> "; }else if($score4<8) { // print " <meta http-equiv=\"refresh\" content=\"0; URL=test1.php\"> "; print " <meta http-equiv=\"refresh\" content=\"0; URL=chap3.php\"> "; }else if($score5<8) { // print " <meta http-equiv=\"refresh\" content=\"0; URL=test1.php\"> "; print " <meta http-equiv=\"refresh\" content=\"0; URL=chap4.php\"> "; }else if($score6<8) { // print " <meta http-equiv=\"refresh\" content=\"0; URL=test1.php\"> "; print " <meta http-equiv=\"refresh\" content=\"0; URL=chap5.php\"> "; }else if($score7<8) { // print " <meta http-equiv=\"refresh\" content=\"0; URL=test1.php\"> "; print " <meta http-equiv=\"refresh\" content=\"0; URL=chap6.php\"> "; }else if($score8<8) { // print " <meta http-equiv=\"refresh\" content=\"0; URL=test1.php\"> "; print " <meta http-equiv=\"refresh\" content=\"0; URL=chap7.php\"> "; }else if($score9<8) { // print " <meta http-equiv=\"refresh\" content=\"0; URL=test1.php\"> "; print " <meta http-equiv=\"refresh\" content=\"0; URL=chap8.php\"> "; }else if($score10<8) { // print " <meta http-equiv=\"refresh\" content=\"0; URL=test1.php\"> "; print " <meta http-equiv=\"refresh\" content=\"0; URL=chap9.php\"> "; }else if($score11<8) { // print " <meta http-equiv=\"refresh\" content=\"0; URL=test1.php\"> "; print " <meta http-equiv=\"refresh\" content=\"0; URL=chap10.php\"> "; }else if($score12<8) { // print " <meta http-equiv=\"refresh\" content=\"0; URL=test1.php\"> "; print " <meta http-equiv=\"refresh\" content=\"0; URL=chap11.php\"> "; }else if($score13<16) { // print " <meta http-equiv=\"refresh\" content=\"0; URL=test1.php\"> "; print " <meta http-equiv=\"refresh\" content=\"0; URL=chap12.php\"> "; }else if($score14<8) { // print " <meta http-equiv=\"refresh\" content=\"0; URL=test1.php\"> "; print " <meta http-equiv=\"refresh\" content=\"0; URL=chap13.php\"> "; }else if($score15<8) { // print " <meta http-equiv=\"refresh\" content=\"0; URL=test1.php\"> "; print " <meta http-equiv=\"refresh\" content=\"0; URL=chap14.php\"> "; }else if($score16<8) { // print " <meta http-equiv=\"refresh\" content=\"0; URL=test1.php\"> "; print " <meta http-equiv=\"refresh\" content=\"0; URL=chap15.php\"> "; }else if($score17<8) { // print " <meta http-equiv=\"refresh\" content=\"0; URL=test1.php\"> "; print " <meta http-equiv=\"refresh\" content=\"0; URL=chap16.php\"> "; }else if($score18<8) { //print " <meta http-equiv=\"refresh\" content=\"0; URL=test3.php\"> "; print " <meta http-equiv=\"refresh\" content=\"0; URL=chap17.php\"> "; }else if($score19<8) { // print " <meta http-equiv=\"refresh\" content=\"0; URL=test1.php\"> "; print " <meta http-equiv=\"refresh\" content=\"0; URL=chap18.php\"> "; }else if($score20<15) { //print " <meta http-equiv=\"refresh\" content=\"0; URL=test4.php\"> "; print " <meta http-equiv=\"refresh\" content=\"0; URL=test4.php\"> "; }else if (($score1>0)&&($score2>=8)&&($score3>=8)&&($score4>=8)&&($score5>=8)&&($score6>=8)&&($score7>=8)&&($score8>=8)&&($score9>=8)&&($score10>=8)&&($score11>=8)&&($score12>=8)&&($score13>=8)&&($score14>=8)&&($score15>=8)&&($score16>=8)&&($score17>=8)&&($score18>=8)&&($score19>=15)&&($score20>=15)){ print " <meta http-equiv=\"refresh\" content=\"0; URL=chap_1.php?cK=1\"> "; } // } }else { print "<script>"; print "alert('username หรือ password ไม่ถูกต้องค่ะ');"; print "location.href='index.php';"; print "</script>"; } ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง