-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathps_header.php
More file actions
361 lines (352 loc) · 19.5 KB
/
Copy pathps_header.php
File metadata and controls
361 lines (352 loc) · 19.5 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
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
<?php
date_default_timezone_set('PRC');
header("Content-type: text/html; charset=utf-8");
function curPageURL() {
$pageURL = 'http';
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80"){
$pageURL .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
}else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
$result=parse_url($pageURL);
return $result;
}
function is_index(){//名字起错了,就这个样子吧
$temp=curPageURL()["path"];
$result=explode('/', $temp);
//echo $result["path"];//'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
$last=count($result);
//print_r(($result[$last-1]=="test.php"));
return $result[$last-1];
};
function get_query($temp2){
$result=[];
if(array_key_exists("query", $temp2)){
$query=$temp2["query"];
$query_array=explode('&', $query);
foreach ($query_array as $temp_query) {
# code...
$temp_query_array=explode('=', $temp_query);
$result[$temp_query_array[0]]=$temp_query_array[1];
}
$temp_array=[];
$temp_array['photo_id']="12";
$temp_array['topic_id']="3";
$temp_array['user_id']="3";
return $result;
}else{
$temp_array=[];
$temp_array['photo_id']="12";
$temp_array['topic_id']="3";
$temp_array['user_id']="3";
return $temp_array;
};
}
$page_url=curPageURL();
$page_query=get_query($page_url);
function get_photo_id($page_query){
if(array_key_exists('photo_id', $page_query)){
return $page_query['photo_id'];
}else{
return "empty";
}
};
function get_topic_id($page_query){
if(array_key_exists('topic_id', $page_query)){
return $page_query['topic_id'];
}else{
return "empty";
}
}
function get_user_id($page_query){
if(array_key_exists('user_id', $page_query)){
return $page_query['user_id'];
}else{
$page_query['user_id']=3;
return $page_query['user_id'];
}
}
//print_r($page_query);
function get_key_word($page_query){
if(array_key_exists('keyword', $page_query)){
return urldecode($page_query['keyword']);
}else{
return "empty";
}
}
$my_user_id=get_user_id($page_query);
?>
<!DOCTYPE html>
<html>
<head>
<meta name="Generator" content="ECSHOP v3.6.0"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="Keywords" content="网站关键词描述"/>
<meta name="Description" content="网站描述"/>
<meta name="referrer" content="no-referrer" /> <!--可以让img标签预加载网络图片-->
<title><?php
if(is_index()=="index.php"){
echo '校园风景';
}else if (is_index()=="topic.php") {
echo '精彩专题';
}else if (is_index()=="hand_photo.php"){
echo '编辑信息';
}else if(is_index()=="user.php"){
echo '用户信息';
}else if(is_index()=="photo.php"){
//get_photo_title();
echo '照片';
}
?></title>
<?php
if(is_index()=="hand_photo.php"){
echo '<link rel="stylesheet" href="http://www.meisubq.com/static/front/css/reset.css">';
echo '<link rel="stylesheet" href="http://www.meisubq.com/static/front/css/ion.checkRadio.css">';
echo '<link rel="stylesheet" href="http://www.meisubq.com/static/front/css/header.css">';
echo '<link rel="stylesheet" href="http://www.meisubq.com/static/front/css/common.css">';
echo '<link rel="stylesheet" href="http://www.meisubq.com/static/common/layui/css/layui.css">';
echo '<link rel="stylesheet" href="http://www.meisubq.com/static/front/css/login.css">';
echo '<link rel="stylesheet" href="http://www.meisubq.com/static/front/webuploader/webuploader.css">';
echo '<link rel="stylesheet" href="http://www.meisubq.com/static/front/css/edit-info.css">';
echo '<link rel="stylesheet" href="http://www.meisubq.com/static/front/css/easydropdown.css">';
echo '<link rel="stylesheet" href="./css/lf_style.css"/>';
echo '<script src="./js/common.js"></script>';
echo '<link rel="stylesheet" href="./css/style.css">';
echo '<link href="./js/skin/WdatePicker.css" rel="stylesheet" type="text/css"><link id="layuicss-layer" rel="stylesheet" href="http://www.meisubq.com/static/common/layui/css/modules/layer/default/layer.css?v=3.1.1" media="all">';
//echo '<script src="//sgoutong.baidu.com/embed/1551246754/asset/embed/pc_nb.js" charset="UTF-8"></script><link rel="stylesheet" type="text/css" href="//sgoutong.baidu.com/embed/1551246754/asset/embed/css/pc/main.css"><script type="text/javascript" src="//p.qiao.baidu.com/cps2/site/poll?cb=jsonp_bridge_1552472494793_5763948735983571&l=1&v=9117938710011960896&s=11960896&e=24453643&dev=0&auth=%7B%22anonym%22%3A0%2C%22key%22%3A%226848769569247111791eapm9732111027%22%2C%22sn%22%3A%22729123861%22%2C%22id%22%3A%229117938710011960896%22%2C%22from%22%3A4%2C%22token%22%3A%22bridge%22%7D&_time=1552472494793" id="id_jsonp_bridge_1552472494793_5763948735983571" charset="utf-8"></script>';
echo '<link rel="stylesheet" href="./css/css.css">';
}else{
echo '<link rel="stylesheet" href="./css/slicy.css">';
echo '<link rel="stylesheet" href="./css/glide.css">';
echo '<link rel="stylesheet" href="./css/easydropdown.css">';
echo '<link rel="stylesheet" href="./css/jquery-ui.css"/>';
echo '<link rel="stylesheet" href="./css/style.css">';
echo '<link rel="stylesheet" href="./css/lf_style.css"/>';
echo '<link rel="stylesheet" href="./css/dxm_style.css"/>';
echo '<link rel="stylesheet" href="./css/css.css">';
echo '<link rel="stylesheet" href="./css/responsive.css">';
echo '<link rel="stylesheet" href="./css/drag.css">';
};
if(is_index()=="photo.php"){
echo '<link href="https://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" type="text/css">';
echo '<link href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">';
echo '<link href="./css/zyd.comment.css" rel="stylesheet" type="text/css">';
echo '<link href="./css/wangEditor-fullscreen-plugin.css" rel="stylesheet" type="text/css">';
}else if(is_index()!="topic.php"){
echo '<link rel="stylesheet" href="./css/new_style.css"/>';
}
?>
<!--上传图片页面功能-->
<script type="text/javascript" src="./javascript/jquery.form.js"></script>
<script type="text/javascript">
//预览图片
//js本地图片预览,兼容ie[6-9]、火狐、Chrome17+、Opera11+、Maxthon3
function PreviewImage(fileObj, imgPreviewId, divPreviewId) {
var allowExtention = ".jpg,.bmp,.gif,.png"; //允许上传文件的后缀名document.getElementById("hfAllowPicSuffix").value;
var extention = fileObj.value.substring(fileObj.value.lastIndexOf(".") + 1).toLowerCase();
var browserVersion = window.navigator.userAgent.toUpperCase();
if (allowExtention.indexOf(extention) > -1) {
if (fileObj.files) {//HTML5实现预览,兼容chrome、火狐7+等
if (window.FileReader) {
var reader = new FileReader();
reader.onload = function (e) {
document.getElementById(imgPreviewId).setAttribute("src", e.target.result);
}
reader.readAsDataURL(fileObj.files[0]);
} else if (browserVersion.indexOf("SAFARI") > -1) {
alert("不支持Safari6.0以下浏览器的图片预览!");
}
} else if (browserVersion.indexOf("MSIE") > -1) {
if (browserVersion.indexOf("MSIE 6") > -1) {//ie6
document.getElementById(imgPreviewId).setAttribute("src", fileObj.value);
} else {//ie[7-9]
fileObj.select();
if (browserVersion.indexOf("MSIE 9") > -1)
fileObj.blur(); //不加上document.selection.createRange().text在ie9会拒绝访问
var newPreview = document.getElementById(divPreviewId + "New");
if (newPreview == null) {
newPreview = document.createElement("div");
newPreview.setAttribute("id", divPreviewId + "New");
newPreview.style.width = document.getElementById(imgPreviewId).width + "px";
newPreview.style.height = document.getElementById(imgPreviewId).height + "px";
newPreview.style.border = "solid 1px #d2e2e2";
}
newPreview.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale',src='" + document.selection.createRange().text + "')";
var tempDivPreview = document.getElementById(divPreviewId);
tempDivPreview.parentNode.insertBefore(newPreview, tempDivPreview);
tempDivPreview.style.display = "none";
}
} else if (browserVersion.indexOf("FIREFOX") > -1) {//firefox
var firefoxVersion = parseFloat(browserVersion.toLowerCase().match(/firefox\/([\d.]+)/)[1]);
if (firefoxVersion < 7) {//firefox7以下版本
document.getElementById(imgPreviewId).setAttribute("src", fileObj.files[0].getAsDataURL());
} else {//firefox7.0+
document.getElementById(imgPreviewId).setAttribute("src", window.URL.createObjectURL(fileObj.files[0]));
}
} else {
document.getElementById(imgPreviewId).setAttribute("src", fileObj.value);
}
} else {
alert("仅支持" + allowExtention + "为后缀名的文件!");
fileObj.value = ""; //清空选中文件
if (browserVersion.indexOf("MSIE") > -1) {
fileObj.select();
document.selection.clear();
}
fileObj.outerHTML = fileObj.outerHTML;
}
//$("#imageform").submit();
var li1=document.getElementById("myli_1");
var li2=document.getElementById("myli_2");
li2.style="display: none;";
li1.style="";
console.log("执行");
return fileObj.value; //返回路径
};
</script>
<script src="./js/common.js"></script>
<!--css link end-->
<meta name="viewport" content="width=1366"/>
<!-- <script async src="./javascript/e8b0ebdc065d83b84c71bde85f9a2ac7.js"></script> -->
<script charset="utf-8"
src="http://goutong.baidu.com/site/429/e9fe99c2267a6f7a9215a8724ce995b4/b.js?siteId=11146853"></script>
<!-- <script type="text/javascript" async="" src="https://www.google-analytics.com/analytics.js"></script> -->
<script src="https://hm.baidu.com/hm.js?e9fe99c2267a6f7a9215a8724ce995b4"></script>
<!-- <script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-126144440-2"></script> -->
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'UA-126144440-2');
</script>
<!--<link rel="shortcut icon" href="./favicon.ico"/>-->
<link rel="icon" href="./favicon.ico"/>
<!--<link rel="icon" href="./animated_favicon.gif" type="image/gif"/>-->
<link rel="stylesheet" href="./css/temp_activity_2019_01_22.css"/>
<style>
.more-topic-btn a {
display: inline-block;
height: 40px;
line-height: 40px;
padding: 0 20px;
margin: 0 10px;
font-size: 14px;
color: #999;
border: 1px solid #999;
border-radius: 20px;
}
.more-topic-btn {
position: absolute;
right: 20%;
top: 180%;
}
.more-topic-btn a:hover {
border-color: #fc4349;
color: #fc4349;
}
#free-pictures-login {
cursor: pointer;
}
</style>
<script type="text/javascript">
var glide_autoplay = 3000;
</script>
<link rel="stylesheet" href="http://meisupic.com/themes/meisu2017/js/skin/default/layer.css?v=3.0.3303"
id="layuicss-skinlayercss">
<link href="http://meisupic.com/themes/meisu2017/js/skin/WdatePicker.css" rel="stylesheet" type="text/css">
<!-- <script src="http://sgoutong.baidu.com/embed/1547804898/asset/embed/pc_nb.js" charset="UTF-8"></script> -->
<link rel="stylesheet" type="text/css" href="//sgoutong.baidu.com/embed/1547804898/asset/embed/css/pc/main.css">
<!-- <script type="text/javascript" src="//p.qiao.baidu.com/cps2/site/poll?cb=jsonp_bridge_1552203048744_9791668731255698&l=1&v=9117938710011146853&s=11146853&e=24453643&dev=0&auth=%7B%22anonym%22%3A0%2C%22key%22%3A%225534984912114627294swqy9670438334%22%2C%22sn%22%3A%22729409890%22%2C%22id%22%3A%229117938710011146853%22%2C%22from%22%3A4%2C%22token%22%3A%22bridge%22%7D&_time=1552203048744" id="id_jsonp_bridge_1552203008485_7427988791504829" charset="utf-8"></script> -->
</head>
<body id="all_toper" class="bg_fff" style="height: 100%">
<div class="loader" style="z-index: 198910151;display: none">
</div>
<div class="header <?php if(is_index()!="index.php"){echo 'header_black';} ?>">
<div class="wrapper">
<!--LOGO-->
<div class="logo" style="<?php if(is_index()=="hand_photo.php"){echo 'margin-top: 0px; margin-right: 0px;';}?>">
<a href=""><img class="logo-normal" src="<?php if(is_index()=="index.php"){echo './htmlimg/logo.png';}else{echo './htmlimg/logo1.png';}?>"/></a>
</div>
<!--头部左侧-->
<div class="copyr">
<a href="<?php echo './index.php?user_id='.$my_user_id; ?>">首页</a>
<a href="<?php echo './index.php?user_id='.$my_user_id; ?>#h_row3">精选专辑</a>
<a href="./hand_photo.php?user_id=<?php echo $my_user_id;?>">上传图片</a>
<!--<a href="./zhuanti.html">上传图片</a>-->
<a href="./topic.php?topic_id=13&user_id=<?php echo $my_user_id; ?>"><font color="#FC4349">湘潭</font><i class="huodong_top_hot"></i></a>
<!-- <a href="">最新活动</a> -->
</div>
<font id="ECS_MEMBERZONE">
<div id="append_parent"></div>
<div class="nav_bf">
<dl>
<!-- <dt><a href="">套餐价格</a></dt> -->
<dd><a href="" id="login">登录</a></dd>
<dd><span>|</span></dd>
<dd><a href="" id="register">注册</a></dd>
</dl>
</div>
<div class="nav_af" style="display: none">
<ul>
<li class="le le4 <?php if(is_index()=="index.php"){echo 'le5';}else{ /*echo 'selected'*/;} ?> ">
<a href="./user_page.html?user_id=" class="mail">1811...</a>
<span class="arr"></span>
<div class="hdn">
<dl>
<dd><a href="./user.php?user_id=&act=down_list">相关记录</a></dd>
<dd><a href="./user.php?user_id=&act=profile">账户管理</a></dd>
<dd><a id="logout_button" class="last">退出</a></dd>
</dl>
</div>
</li>
</ul>
</div>
</font>
</div>
</div>
<?php if(is_index()!=="index.php"&&is_index()!==""&&is_index()!=="researcher_relsult.php"){
echo '<div class="toper">';
echo ' <div class="wrapper">';
echo ' <h2 style="margin-top: 0px;">探索我们的世界!</h2>';
echo ' <div class="form">';
echo ' <form action="./researcher_relsult.php" method="get" id="myform">';
echo ' <input class="s_clearall" type="hidden" value="" name="offset" id="s_offset">';
echo ' <input class="s_clearall" type="hidden" value="" name="sort" id="s_sort">';
echo ' <input class="s_clearall" type="hidden" value="" name="phototype" id="s_phototype">';
echo ' <input class="s_clearall" type="hidden" value="" name="orientation" id="s_orientation">';
echo ' <input class="s_clearall" type="hidden" value="" name="people_only" id="s_people_only">';
echo ' <input class="s_clearall" type="hidden" value="" name="race" id="s_race">';
echo ' <input class="s_clearall" type="hidden" value="" name="age" id="s_age">';
echo ' <input class="s_clearall" type="hidden" value="" name="gender" id="s_gender">';
echo ' <input class="s_clearall" type="hidden" value="" name="quantity" id="s_quantity">';
echo ' <input class="s_clearall" type="hidden" value="" name="color" id="s_color">';
echo ' <input class="s_clearall" type="hidden" value="" name="categories" id="s_categories">';
echo ' <input class="s_clearall" type="hidden" value="" name="username" id="s_username">';
echo ' <input class="s_clearall" type="hidden" value="" name="exclude_keyword" id="s_exclude_keyword">';
echo ' <div class="type">';
echo ' <!--<h4>全部图片</h4>-->';
echo ' <div class="bt" style="display:none">';
echo ' <i class="n1"></i>';
echo ' <i class="n2"></i>';
echo ' </div>';
echo ' <div class="dropdown"><span class="old"><select class="" onchange="changeSearch(\'phototypesearch\',this.options[this.options.selectedIndex].value)" id="EasyDropDownF7E7D1">';
echo ' <option value="" class="label">搜索图片</option>';
echo ' <option value="" class="label">全部图片</option>';
echo ' <option value="photo">照片</option>';
echo ' <option value="vector">矢量图</option>';
echo ' </select></span><span class="selected">搜索图片</span><span class="carat"></span><div><ul><li>全部图片</li><li>照片</li><li>矢量图</li></ul></div></div>';
echo ' </div>';
echo ' <div class="input">';
echo ' <input type="text" id="big_sereach_input" class="txt" placeholder="输入关键词" name="keyword" id="keyword" value="" autocomplete="off">';
echo ' <input onclick="submitForm()" class="btn" value="" type="submit">';
echo ' </div>';
echo ' <div id="srch_img" class="srch_img" style="display:none"></div>';
echo ' </form>';
echo ' </div>';
echo ' </div>';
echo ' </div>';
}
?>