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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
<? include("category/common.php");
if (!isset($id)) $id = ""; //20130902 ¼öÁ¤ if (!isset($row)) $row = ""; //20130906 ¼öÁ¤
$qry = " select * from member WHERE Mid = '$id' "; $result = mysql_query($qry);
if( mysql_num_rows($result) > 0){ $row = mysql_fetch_array($result); } if(!isset($row['Mid'])) $row['Mid'] = ""; ?> <html> <head> <title>¾ÆÀ̵ð üũ</title> <meta http-equiv="Content-Type" content="text/html; charset=euc-kr"> <style type="text/css"> .idcheckSection h1{ width:320px; height:35px; padding-left:80px; color:#555; font-size:13px; line-height:35px; font-weight:600; background:url('./img/idcheck_bg.jpg') no-repeat; } .idcheck{ width:400px; } .idcheck h2{ color:#555; font-size:12px; line-height:15px; text-align:center; font-weight:600; } .idcheck p{ text-align:center; } .idcheck input{ vertical-align:middle; } .idcheck input[type=text]{ width:150px; height:29px; margin-right:5px; padding:0 5px; color:#333; font-size:12px; border:1px solid #ccc; } </style> </head>
<body> <div class="idcheckSection"> <h1>¾ÆÀ̵ðÁߺ¹È®ÀÎ</h1> <? if(!$id){ echo(" <div></div> ");
} else if(!$row['Mid']){ echo(" <div class='idcheck'> <h2>½ÅûÇϽоÆÀ̵ð <font color='#ff5a00'><b>[ $id ]</b></font>Àº »ç¿ëÀÌ °¡´ÉÇÑ ¾ÆÀ̵ðÀÔ´Ï´Ù.<br /> ÀÌ ¾ÆÀ̵𸦠»ç¿ëÇϽðڽÀ´Ï±î?<br /> <input type='image' src='./img/iduse_bt.jpg' alt='»ç¿ëÇϱâ' onClick=\"useMemberId('$id');\"style='cursor:pointer'><br /> </h2> </div> "); }else{ echo(" <div class='idcheck'> <h2>½ÅûÇϽоÆÀ̵ð <font size='2' color='#ff5a00'>[ $id ]</font>Àº »ç¿ëÁßÀÎ ¾ÆÀ̵ðÀÔ´Ï´Ù.</h2> </div> "); } ?>
<form method="post" name='idcheck' ACTION="<?=$PHP_SELF?>" onSubmit="return check_id()"> <div class="idcheck"> <h2>¾ÆÀ̵𸦠ÀÔ·ÂÇϽŠÈÄ Áߺ¹Ã¼Å© ¹öưÀ» ´·¯ÁÖ¼¼¿ä.<br />¾ÆÀ̵ð´Â ¿µ¹®/¼ýÀÚ Á¶ÇÕÀ¸·Î 4~12 ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.</h2>
<p><input type="text" name="id" size="10" maxlength='12'><input type='image' src="./img/idcheck_bt.jpg" alt="Áߺ¹È®ÀÎ"></p>
</div> </form>
</table> </body> </html>
<script> function useMemberId(s){ opener.memberJoin.Mid.value = s; self.close(); }
function check_id(){ var memid = idcheck.id.value.trim(); if(memid == ""){ alert("* ¾ÆÀ̵𸦠ÀÔ·ÂÇØÁÖ¼¼¿ä."); idcheck.id.focus(); return false; }
var pattern0 = /(^[a-zA-Z]+$)/; if (!pattern0.test(memid.substring(0,1))){ alert("¾ÆÀ̵ð ù±ÛÀÚ´Â ¿µ¹®À̾î¾ßÇÕ´Ï´Ù."); idcheck.id.focus(); return false; }
if(memid.length < 4 || memid.length > 12){ alert("¾ÆÀ̵ð´Â 4 ~ 12 ÀÚ¸®·Î ÇϼžßÇÕ´Ï´Ù."); idcheck.id.focus(); return false; }
var pattern1 = /(^([a-z0-9]+)([a-z0-9_]+$))/; if (!pattern1.test(memid)){ alert("¾ÆÀ̵ð´Â ¿µ¼Ò¹®ÀÚ, ¼ýÀÚ, _ ¸¸ °¡´ÉÇÕ´Ï´Ù."); idcheck.id.focus(); return false; } return true; }
String.prototype.trim = function(){ return this.replace(/(^\s*)|(\s*$)/g, ""); } </script>
|