-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin_header.php
74 lines (64 loc) · 2.82 KB
/
admin_header.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
<div id="bbdd_hd_wrap">
<div id="bbdd_hd_area" style="transform: translate3d(0px, 0px, 0px); position: fixed; top: 0px;">
<div class="hd_contain">
<div class="hd_logo">
<a href="/admin_index.php">
<img src="static/img/editor_logo.png" alt="변방의북소리 웹진 둥둥 에디터">
<!-- <div class="ad_tag">
관리자
</div> -->
</a>
</div>
<div class="hd_ad_logIn">
<a>
<!-- <img src="static/img/menu-bar.png" alt="관리자 메뉴"> -->
<!-- [로그인] -->
<?php
include 'bbdd_db_conn.php';
// $query = "select * from user_data order by id desc";
// $result = $conn->query($query);
// $total = mysqli_num_rows($result);
session_start();
if (isset($_SESSION['username'])) {
?> <div onclick="location.href='./admin_logout.php'">
<?php
// echo $_SESSION['username'];
echo $_SESSION['author'];
echo " ";
if($_SESSION['cast'] == 'admin') {
echo "관리자";
} else if($_SESSION['cast'] == 'editor') {
echo "에디터";
} else if($_SESSION['cast'] == 'author') {
echo "작가";
}
// echo $_SESSION['cast'];
?>님 [LogOut]</div>
<!-- <button onclick="location.href='./admin_logout.php'">로그아웃</button> -->
<?php
} else {
?> <div onclick="location.href='./admin_login.php'"><h4>[LogIn]</h4></div>
<!-- ?> <button onclick="location.href='./admin_login.php'">로그인</button> -->
<?php }
?>
</a>
</div>
<div class="hd_ad_menu adminMenu">
<a>
<!-- <img src="static/img/menu-bar.png" alt="관리자 메뉴"> -->
[관리자 메뉴]
</a>
</div>
<article class="adArticle adminMenu">
<?php
include 'admin_article.php';
?>
</article>
<div class="hd_menu">
<a>
<img src="static/img/menu-bar.png" alt="메뉴바">
</a>
</div>
</div>
</div>
</div>