-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
114 lines (109 loc) · 3.42 KB
/
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
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
<div class="fixed-top">
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="./index.php"><?php
//----------------------
//版权所有,侵权必究 -
//copyright (C) 2022 pengzekai -
//----------------------
$title=@file_get_contents("./config/title.txt");
echo $title;
?></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="./index.php">首页 <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="./xieyi.php">用户协议</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./upload/">个人中心</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./notecloud/">云笔记</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
我的账号
</a>
<div class="dropdown-menu"aria-labelledby="navbarDropdown">
<?php
$user = $_COOKIE['key'];
header("content-type:text/html;charset=utf-8");
$icon=@file_get_contents("./data/".$user."/icon.txt");
$user_if = $_COOKIE['key'];
if($user_if == "")
{
echo '<center><img width="130px" height="130px" class="img-thumbnail" src="image/1.png"></center>';
}else{
echo '<center><img width="130px" height="130px" class="img-thumbnail" src='.$icon.'></center>';
}
?>
<br>
<div class="card">
<div class="title"><span class="badge badge-light">昵称</span>
<?php
$user=$_COOKIE['key'];
header("content-type:text/html;charset=utf-8");
$nc=@file_get_contents("./data/".$user."/name.txt");
$user_if = $_COOKIE['key'];
if($user_if == "")
{
echo "未登录";
}else{
echo $nc;
}
?>
</div>
<div class="title"><span class="badge badge-light">QQ</span>
<?php
$user=$_COOKIE['key'];
header("content-type:text/html;charset=utf-8");
$qq=@file_get_contents("./data/".$user."/qq.txt");
$user_if = $_COOKIE['key'];
if($user_if == "")
{
echo "未登录";
}else{
echo $qq;
}
?></div>
<div class="title"><span class="badge badge-light">金币</span>
<?php
$user=$_COOKIE['key'];
header("content-type:text/html;charset=utf-8");
$glod=@file_get_contents("./data/".$user."/glod.txt");
$user_if = $_COOKIE['key'];
if($user_if == "")
{
echo "未登录";
}else{
echo $glod;
}
?></div>
<div class="title"><span class="badge badge-light">存储空间</span>
<?php
$user=$_COOKIE['key'];
header("content-type:text/html;charset=utf-8");
$chunchu =@file_get_contents("./data/".$user."/now_user_number.txt");
$user_if = $_COOKIE['key'];
if($user_if == "")
{
echo "未登录";
}else{
echo $chunchu."MB/10240MB(10GB)";
}
?>
<div class="dropdown-divider"></div>
<?php $user_if = $_COOKIE['key'];if($user_if == ""){echo '<a class="dropdown-item" href="login.php">登录</a>';}else{}?>
<?php $user_if = $_COOKIE['key'];if($user_if == ""){echo '<a class="dropdown-item" href="reg.php">注册</a>';}else{}?>
<a class="dropdown-item" href="exit.php">退出</a>
</div>
</li>
</ul>
</div>
</nav>
</div>