-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlog_in_make_end.php
More file actions
108 lines (85 loc) · 2.23 KB
/
Copy pathlog_in_make_end.php
File metadata and controls
108 lines (85 loc) · 2.23 KB
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
<?php
if(!isset($_SESSION)){session_start();} //세션이 있으면 넘어가고 없으면 세션을 시작함
?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8" \>
<style>
#picture {
text-align: center;
}
#logo {
width: 800px;
height: 300px;
display: block;
margin: 0 auto;
padding-top: 50px;
padding-bottom: 20px;
text-align: center;
}
</style>
</head>
<body>
<div id=logo>
<a href=login.html><img src=logo.png style="width: 30%; height: auto;" id="logo_img"></a>
</div>
<?php
include "db.php";
$id=$_POST["ID"];
$password=$_POST["password"];
$password2=$_POST["password2"];
$name=$_POST["name"];
$question=$_POST["question"];
$answer=$_POST["answer"];
if($password!=$password2)
{
?>
<div id=picture> <a href=log_in_make.php><img src=fail_idpw.png style="width: 25%; height: auto;"></a> </div>
<?php
}
else if(empty($id))
{
?>
<div id=picture> <a href=log_in_make.php><img src=fail_idpw.png style="width: 25%; height: auto;"></a> </div>
<?php
}
else if(empty($password))
{
?>
<div id=picture> <a href=log_in_make.php><img src=fail_idpw.png style="width: 25%; height: auto;"></a> </div>
<?php
}
else if(!preg_match("/[0-9]+/", $password) || !preg_match("/[a-zA-Z]+/", $password) || strlen($password)<8)
{
?>
<div id=picture> <a href=log_in_make.php><img src=fail_idpw.png style="width: 25%; height: auto;"></a> </div>
<?php
}
else if(empty($name))
{
?>
<div id=picture> <a href=log_in_make.php><img src=fail_name.png style="width: 25%; height: auto;"></a> </div>
<?php
}
else
{
$id_path="/user/".$id."/id";
$pw_path="/user/".$id."/password";
$name_path="/user/".$id."/name";
$count_path="/user/".$id."/project/count";
$increase_path="/user/".$id."/project/increase";
$onlogin_path="/user/".$id."/onlogin";
$firebase->set($id_path, $id);
$firebase->set($pw_path, $password);
$firebase->set($name_path, $name);
$firebase->set($count_path, 0);
$firebase->set($increase_path, 0);
$firebase->set($onlogin_path, true);
?>
<div id=picture> <a href=login.html><img src=make.png style="width: 25%; height: auto;"></a> </div>
<?php
}
?>
</body>
</html>