-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpanel.php
150 lines (130 loc) · 3.56 KB
/
panel.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
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<?php if(!defined('INCHK')) die('You are not allowed to execute this file directly'); ?>
<div id="toppanel">
<div id="panel">
<div class="content clearfix">
<div class="left">
<h1>The Sliding jQuery Panel</h1>
<h2>A register/login solution</h2>
<p class="grey">
You are free to use this login and registration system in you sites!
</p>
<h2>A Big Thanks</h2>
<p class="grey">
This tutorial was built on top of
<a href="http://web-kreation.com/index.php/tutorials/nice-clean-sliding-login-panel-built-with-jquery" title="Go to site">Web-Kreation</a>'s amazing sliding panel.
</p>
</div>
<?php
if(!$_SESSION['id']):
?>
<div class="left">
<!-- Login Form -->
<form class="clearfix" action="" method="post">
<h1>Member Login</h1>
<?php
if($_SESSION['msg']['login-err']) {
echo '
<div class="err">
' . $_SESSION['msg']['login-err'] . '
</div>';
unset($_SESSION['msg']['login-err']);
}
?>
<label class="grey" for="username">
Username:
</label>
<input class="field" type="text" name="username" id="username" value="" size="23" />
<label class="grey" for="password">
Password:
</label>
<input class="field" type="password" name="password" id="password" size="23" />
<label>
<input name="rememberMe" id="rememberMe" type="checkbox" checked="checked" value="1" />
Remember me
</label>
<div class="clear">
</div>
<input type="submit" name="submit" value="Login" class="bt_login" />
</form>
</div>
<div class="left right">
<!-- Register Form -->
<form action="" method="post">
<h1>Not a member yet? Sign Up!</h1>
<?php
if($_SESSION['msg']['reg-err']) {
echo '
<div class="err">
' . $_SESSION['msg']['reg-err'] . '
</div>';
unset($_SESSION['msg']['reg-err']);
}
if($_SESSION['msg']['reg-success']) {
echo '
<div class="success">
' . $_SESSION['msg']['reg-success'] . '
</div>';
unset($_SESSION['msg']['reg-success']);
}
?>
<label class="grey" for="username">
Username:
</label>
<input class="field" type="text" name="username" id="username" value="" size="23" />
<label class="grey" for="email">
Email:
</label>
<input class="field" type="text" name="email" id="email" size="23" />
<label>
A password will be e-mailed to you.
</label>
<input type="submit" name="submit" value="Register" class="bt_register" />
</form>
</div>
<?php
else:
?>
<div class="left">
<h1>Members panel</h1>
<p>
You can put member-only data here
</p>
<a href="registered.php">View a special member page</a>
<p>
- or -
</p>
<a href="?logoff">Log off</a>
</div>
<div class="left right">
<h1>Muzik panel</h1>
<p>Getting Started:</p>
<a href="?page=newalbum">Add new Album</a><br/>
<a href="?page=addsongs">Add new Song</a>
</div>
<?php
endif;
?>
</div>
</div> <!-- /login -->
<!-- The tab on top -->
<div class="tab">
<ul class="login">
<li class="left">
</li>
<li>
Hello <?php echo $_SESSION['usr'] ? $_SESSION['usr'] : 'Guest';?>!
</li>
<li class="sep">
|
</li>
<li id="toggle">
<a id="open" class="open" href="#"><?php echo $_SESSION['id'] ? 'Open Panel' : 'Log In | Register';?></a>
<a id="close" style="display: none;" class="close" href="#">Close Panel</a>
</li>
<li class="right">
</li>
</ul>
</div>
</div>