-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathheader.php
More file actions
52 lines (50 loc) · 1.67 KB
/
header.php
File metadata and controls
52 lines (50 loc) · 1.67 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
<?php
if (isset($_SESSION["userid"])) $userid = $_SESSION["userid"];
else $userid = "";
if (isset($_SESSION["username"])) $username = $_SESSION["username"];
else $username = "";
if (isset($_SESSION["userlevel"])) $userlevel = $_SESSION["userlevel"];
else $userlevel = "";
if (isset($_SESSION["userpoint"])) $userpoint = $_SESSION["userpoint"];
else $userpoint = "";
?>
<div id="top">
<h3>
<a id = "title" href="index.php">모두의 클래스</a>
<script> // 로그인 되어있을 시에는 class_index.php가 보여짐
var userid = '<?php echo $userid;?>';
if(userid == ""){
}else{
document.getElementById("title").href = "class_index.php";
}
</script>
</h3>
<ul id="top_menu">
<?php
if(!$userid) {
?>
<li><a href="member_form.php">회원가입</a> </li>
<li> | </li>
<li><a href="login_form.php">로그인</a></li>
<?php
} else {
$logged = $username."(".$userid.")님";
?>
<li><?=$logged?> </li>
<li> | </li>
<li><a href="logout.php">로그아웃</a> </li>
<li> | </li>
<li><a href="member_modify_form.php">정보수정</a></li>
<?php
}
?>
<?php
if($userlevel==1) {
?>
<li> | </li>
<li><a href="admin.php">관리자모드</a></li>
<?php
}
?>
</ul>
</div>