forked from Ksardarion/php_project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
60 lines (55 loc) · 1.62 KB
/
index.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
51
52
53
54
55
56
57
58
59
<?php
include_once ("php/init.php");
?>
<!DOCTYPE html>
<html>
<head>
<title>I-24 CM</title>
<link rel="stylesheet" href="public/css/reg.css">
<link rel="stylesheet" href="public/css/contactList.css">
<script src="public/js/reg.js"></script>
</head>
<body>
<?php
if (!empty($user_id)) {
echo "Hello ".$user_login;
echo "<a href='/contact/addContact.php'>Add contact</a>";
echo "<a href='exit?yes'>LogOut</a>";
include_once ("php/contactList.php");
?>
<?php
} else {
?>
<div class="container">
<div class="title">
<h1>Start page</h1>
<p>of contact mannager</p>
</div>
<form id="authForm" action="php/login" method="post">
<div class="reg-cont">
<div class="fancy-input">
<div class="input-container">
<input required="required" name="login"/>
<label data-placeholder="Username" data-placeholder-short="Login"><span class="sr-only">Username</span></label>
</div>
</div>
<div class="fancy-input">
<div class="input-container">
<input type="password" required="required" name="password"/>
<label data-placeholder="Password" data-placeholder-short="Pass"><span class="sr-only">Password</span></label>
</div>
</div>
<div class="fancy-input hide" style="display: none;">
<div class="input-container">
<input type="password" id="pass2" name="password2"/>
<label data-placeholder="Password confirm" data-placeholder-short="confirm"><span class="sr-only">Password confirm</span></label>
</div>
</div>
<input type="submit" value="login"/>
</div>
</form>
<a href="#" id="signup">sign up</a>
<div>
<?php } ?>
</body>
</html>