-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.php
More file actions
138 lines (130 loc) · 4.46 KB
/
Copy pathstyle.php
File metadata and controls
138 lines (130 loc) · 4.46 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
<?php
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>One city,One tale</title>
<link type="text/css" rel="stylesheet" href="css/style.css">
<script type="text/javascript" src="js/jquery-1.8.3.min.js"/></script>
<script type="text/javascript" src="js/script.js"/></script>
<script type="text/javascript">
window.onload=function(){
$('#search_query').bind('keyup',function(){
var searchtext = $('#search_query').val();
var SEARCHTEXT = searchtext.toUpperCase();
$.ajax({
type:'GET',
url:'search.php',
data:'SEARCHTEXT='+SEARCHTEXT,
datatype:'json',
beforeSend:function(){
},
success:function(data){
if (SEARCHTEXT == '') {
$('#search-suggest').hide();
};
var obj= $.parseJSON(data);
var html='';
$.each(obj,function(key,value){
html+='<li>'+value.CITY+'</li>';
})
$('#search-result').html(html);
$('#search-suggest').show();
},
complete:function(){
}
})
});
$(document).bind('click',function(){
$('#search-suggest').hide();
});
var S = document.getElementById('search-result');
$(S).delegate('li','click',function(){
var keywords = $(this).text().toUpperCase();
//alert(keywords);
$.ajax({
type:'GET',
url:'search.php',
data:'searchCity='+keywords,
datatype:'String',
})
location.href = 'searchCity.php';
});
var topic = document.getElementsByTagName('span');
for(var i =0;i<topic.length;i++){
topic[i].alpha = 0;
topic[i].onmouseover=function(){
startMove(this,40);
}
topic[i].onmouseout=function(){
startMove(this,0);
}
}
}
function startMove(obj,iTarget){
clearInterval(obj.timer);
obj.timer=setInterval(function(){
var speed = 0;
if (obj.alpha > iTarget) {
speed = -10;
}else{
speed = 10;
}
if (obj.alpha == iTarget) {
clearInterval(obj.timer);
}else{
obj.alpha+=speed;
obj.style.filter = 'alpha(opacity:'+obj.alpha+')';
obj.style.opacity = obj.alpha/100;
}
},30)
}
</script>
</head>
<body>
<div id="sidebar" class="side">
<div class="search">
<input tabindex="1" type="text" name="q" id="search_query" placeholder="Search NextSticker" value="" class="search_key" autocomplete="off" required="required">
<input type="submit" id="search_query_submit" class="search_query_submit" value="">
</div>
<div class="suggest" id="search-suggest">
<ul id="search-result">
</ul>
</div>
<div class="bar">
<ul class="sidemenu">
<li id="Discovery" class="item"><a href="dis.php">Discovery</a></li>
<li id="Story" class="item"><a href="story.php">Story</a></li>
<li id="World" class="item"><a href="world.php">World</a></li>
<li id="Style" class="item"><a href="javascript:;">Guide</a></li>
</ul>
</div>
</div>
<div id="top">
<div class="left">
<div id="closeBar" class="select_btn"></div>
</div>
<a href="index.html" class="margin_t_5">NextSticker</a>
<ul class="topbtn" >
<li id="sessionHere"><?PHP echo $_SESSION['nickname'] ?></li>
</ul>
</div>
<div id="outer">
<div class="country-part"></div>
<div id="style-main">
<div class="style-content">
<div class="style-style"><img src="style/istanbul.jpg"><a href="city/Istanbul.php" target="_blank"><span class="style-cover"></span></a></div>
<div class="style-style"><img src="style/tokyo.jpg"><span class="style-cover"></span></div>
<div class="style-style"><img src="style/india.jpg"><span class="style-cover"></span></div>
</div>
<div class="style-content">
<div class="style-style"><img src="style/australia.jpg"><span class="style-cover"></span></div>
<div class="style-style"><img src="style/taibei.jpg"><span class="style-cover"></span></div>
<div class="style-style"><img src="style/vm.jpg"><span class="style-cover"></span></div>
</div>
</div>
</div>
</body>
</html>