1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
<?php include('coremain/bar.php'); include('coremain/fieldset_top.php'); import_request_variables('pG', 'p_'); if($p_username_!="") { $username_=trim($p_username_); } if($p_email!="") { $email=trim($p_email); } if ($username_!="") { $sql="SELECT email,user , pass FROM main_user WHERE email='$email' and user='$username_'"; $result=mysql_query($sql); $data=mysql_fetch_array($result); if($data[0]!=""){ echo"<center><br><br><b>ชื่อล็อกอินของคุณคือ :</b> $data[user]<br> <b>รหัสผ่านของคุณคือ :</b> $data[pass]<br><br>"; echo "<a href='index.php?link=login'>เข้าสู่ระบบ</a>"; echo"<br><br></center>";
include('coremain/fieldset_bottom.php'); include('coremain/block2.php'); exit; }else{ echo "<center><br><br>ไม่มีข้อมูลที่ป้อนอยู่ในระบบ<br>กรุณาป้อนข้อมูลใหม่อีกครั้ง<br><br></center>"; echo "<meta http-equiv=refresh content=2;URL=index.php?link=get_password&link1=login>"; } } else { echo"<form action='index.php?link=get_password&link1=login' method='post' name='add' onSubmit='return checkadd()'>"; echo"<table width='98%' border='0' cellspacing='1' align='center' cellpadding='0'>"; echo"<tr>"; echo" <td width='30%'></td>"; echo" <td width='18%'><img src='coremain/image/bullet_news.gif'> ชื่อล็อกอินของท่าน</td> "; echo" <td><input name='username_' type='text'></td> "; echo"</tr>"; echo"<tr>"; echo" <td></td>"; echo" <td><img src='coremain/image/bullet_news.gif'> อีเมล์ :</td> "; echo" <td><input name='email' type='text'></td> "; echo"</tr>"; echo"<tr height='60'>"; echo" <td colspan='3' align=center><INPUT TYPE='submit' value='ลืมรหัสผ่าน' onmouseover=this.style.cursor='hand'></td>"; echo"</tr>"; echo "</table>"; }
include('coremain/fieldset_bottom.php'); ?> <script language="javascript"> function checkadd() { if(document.add.username_.value=="") { alert("กรุณากรอก ชื่อล็อกอินของท่าน !") ; document.add.username_.focus() ; return false ; } else if(document.add.email.value=="") { alert("กรุณากรอก อีเมล์ !") ; document.add.email.focus() ; return false ; } else if(add.email.value.indexOf('@')==-1) { alert("อีเมล์ของคุณไม่ถูกต้อง") ; document.add.email.focus() ; return false ; } else if(add.email.value.indexOf('.')==-1) { alert("อีเมล์ของคุณไม่ถูกต้อง") ; document.add.email.focus() ; return false ; } else return true ; } </script>
|