Repository navigation
Expand file tree
/
Copy pathsearch_dynamic.php
More file actions
253 lines (197 loc) · 6.71 KB
/
Copy pathsearch_dynamic.php
File metadata and controls
253 lines (197 loc) · 6.71 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
<?php
session_start();
if(isset($_COOKIE["name"])&&isset($_COOKIE["pwd"]))
{
$_SESSION["name"]=$_COOKIE["name"];
include('connect.php');
}
header("Cache-Control: max-age=300, must-revalidate");
include 'uploadfile.php';
?>
<!DOCTYPE html>
<html>
<head>
<title>Search-Engine</title>
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="bootstrap/css/bootstrap-theme.min.css" rel="stylesheet" media="screen">
<link href="assets/datatables.min.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="assets/jquery-1.11.3-jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<link href="http://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
<script type="text/javascript">
$(document).ready(function(){
$("#btn-view").hide();
$("#btn-add").click(function(){
$(".content-loader").fadeOut('slow', function()
{
$(".content-loader").fadeIn('slow');
$(".content-loader").load('add_form.php');
$("#btn-add").hide();
$("#btn-view").show();
});
});
$("#btn-view").click(function(){
$("body").fadeOut('slow', function()
{
$("body").load('search_dynamic.php');
$("body").fadeIn('slow');
window.location.href="search_dynamic.php";
});
});
});
</script>
<style type="text/css">
#margin
{
margin-left: 10px;
}
#wrapper:before {
content:'';
float: left;
height: 100%;
}
#wrapper {
height: 100%;
}
#header {
background-color:#000;
}
#result {
border-radius: 10px;
font-weight: bold;
}
/* this is the big trick*/
#result:after {
font-family: comic;
content:'';
display: block;
clear: both;
}
#bg
{
background-color: grey;
}
#login-dp{
min-width: 250px;
padding: 14px 14px 0;
overflow:hidden;
background-color:rgba(255,255,255,.8);
}
#login-dp .help-block{
font-size:12px
}
#login-dp .bottom{
background-color:rgba(255,255,255,.8);
border-top:1px solid #ddd;
clear:both;
padding:14px;
}
#login-dp .social-buttons{
margin:12px 0
}
#login-dp .social-buttons a{
width: 49%;
}
#login-dp .form-group {
margin-bottom: 10px;
}
.bottom {
color: grey;
}
#joinus{
color: grey;
}
</style>
<script type="text/javascript">
function move()
{
location.href = 'search_home2.php?key=' + document.getElementById('search_text').value;
}
</script>
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top topnav" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse">
Menu <i class="fa fa-bars"></i>
</button>
<a class="navbar-brand topnav" href="#">SquareBook</a>
</div>
<ul class="nav navbar-nav navbar-right">
<li><a href="userhome.php"><span class="glyphicon glyphicon-home"></span> Home</a></li>
<li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><b>Upload File</b> <span class="caret"></span></a>
<ul id="login-dp" class="dropdown-menu">
<li>
<div class="row" >
<div class="col-md-12">
<form class="form" role="form" method="post" action="" accept-charset="UTF-8" id="login-nav" enctype="multipart/form-data">
<div class="form-group">
<input id="excelupload" name="excelupload" type="file" class="form-control"/>
</div>
<div class="form-group">
<input name="submit" type="submit" value="Upload" class="btn btn-primary btn-block" />
</div>
</form>
</div>
</div>
</li>
</ul>
</li>
</li>
</li>
<li><a href="search_dynamic.php"><span class="glyphicon glyphicon-user " id="green"></span> <?php echo $_SESSION["name"];?></a></li>
<li><a href="sessionunset.php"><span class="glyphicon glyphicon-log-out"></span> Logout</a></li>
</ul>
</div>
</nav>
<div class="container">
<br />
<br>
<br>
<br>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon">Search</span>
<input type="text" name="search_text" id="search_text" placeholder="Dynamic Search" class="form-control" />
</div>
</div>
<a onclick="move()" class="btn btn-info btn-lg">
<span class="glyphicon glyphicon-edit"></span> Edit
</a>
<br />
<div id="result" class="display">
</div>
</div>
</body>
</html>
<script>
$(document).ready(function(){
$('#search_text').keyup(function(){
var txt = $(this).val();
if(txt != '')
{
$.ajax({
url:"search2.php",
method:"post",
data:{search:txt},
dataType:"text",
success:function(data)
{
$('#result').html(data);
}
});
}
else
{
$('#result').html('');
}
});
});
</script>