forked from osohyun0224/NaverConnect_SW_Project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
check.php
50 lines (49 loc) · 1.38 KB
/
check.php
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
<?php
include ('db_connect.php');
if($_GET["userid"]){
$uid = $_GET["userid"];
$sql = mq("select * from user where id='".$uid."'");
$member = $sql->fetch_array();
if($member==0)
{
?>
<div style='font-family:"malgun gothic"';><?php echo $uid; ?>는 사용가능한 아이디입니다.</div>
<button value="닫기" onclick="id_check()">닫기</button>
<?php
}else{
?>
<div style='font-family:"malgun gothic"; color:red;'><?php echo $uid; ?>중복된아이디입니다.<div>
<button value="닫기" onclick="window.close()">닫기</button>
<?php
}
?>
<?
}
elseif ($_GET["usernic"]) {
$uid = $_GET["usernic"];
$sql = mq("select * from user where nic_name='".$uid."'");
$member = $sql->fetch_array();
if($member==0)
{
?>
<div style='font-family:"malgun gothic"';><?php echo $uid; ?>는 사용가능한 닉네임입니다.</div>
<button value="닫기" onclick="nic_check()">닫기</button>
<?php
}else{
?>
<div style='font-family:"malgun gothic"; color:red;'><?php echo $uid; ?>중복된닉네임입니다.<div>
<button value="닫기" onclick="window.close()">닫기</button>
<?php
}
}
?>
<script>
function id_check(){
opener.document.getElementById("id_ch").value =1;
window.close();
}
function nic_check(){
opener.document.getElementById("nik_ch").value =1;
window.close();
}
</script>