-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
310 lines (292 loc) · 12.7 KB
/
index.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
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
<?php
session_start();
$_SESSION['newspage']=2;
$_SESSION['recentpage']=2;
$_SESSION['popularpage']=2;
$token=md5(rand(1234,9876));
$_SESSION['token']=$token;
?>
<head>
<title>The Frontier</title>
<link rel="icon" href="favicon.png" sizes="16x16" type="image/png">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.0/css/materialize.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.2/modernizr.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.0/js/materialize.min.js"></script>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
<script type="text/javascript">
$(window).load(function() {
$(".se-pre-con").fadeOut("slow");
});
$(document).ready(function() {
$(".search").hide();
$(".button-collapse").sideNav();
$('.dropdown-button').dropdown({
inDuration: 300,
outDuration: 225,
constrain_width: false,
hover: true,
gutter: 0,
belowOrigin: false
}
);
});
</script>
</head>
<body>
<?php include_once("analyticstracking.php") ?>
<div id="fb-root"></div>
<script>(function(d, p, id) {
var js, fjs = d.getElementsByTagName(p)[0];
if (d.getElementById(id)) return;
js = d.createElement(p); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.4&appId=144512422311701";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="se-pre-con"></div>
<div class="navbar-fixed">
<nav>
<div style="background-color:#009688;" class="nav-wrapper">
<a href="index.php" style="font-family:forque;padding:5px;" class="brand-logo"><img src="logo.png" height="55"></a>
<a href="#" data-activates="mobile-demo" class="button-collapse"><i class="material-icons">menu</i></a>
<ul class="right hide-on-med-and-down">
<li><div style="width:300px;" class="search"><form method="get" action="search.php"><input autocomplete="off" name="search_term" type="text" placeholder="Search" required></form></div></li>
<li><a><i id="search" class="material-icons">search</i></a></li>
<li><a class="waves-effect" href="news.php">News</a></li>
<li><a class="waves-effect" href="sci-fi.php">Sci-Fi</a></li>
<li><a class="waves-effect" href="reviews.php">Reviews</a></li>
<li><a class="waves-effect" href="gaming.php">Gaming</a></li>
<li><a class="waves-effect" href="gadgets.php">Gadgets</a></li>
<li><a class="waves-effect" href="about.php">About Us</a></li>
</ul>
<ul class="side-nav" id="mobile-demo">
<li><a href="news.php">News</a></li>
<li><a href="sci-fi.php">Sci-Fi</a></li>
<li><a href="reviews.php">Reviews</a></li>
<li><a href="gaming">Gaming</a></li>
<li><a href="gadgets.php">Gadgets</a></li>
<li><a href="about.php">About Us</a></li>
</ul>
</div>
</nav>
</div>
<div style="z-index:1;" class="navbar-fixed">
<nav style="background:#113e42;">
<div class="nav-wrapper">
<div class="row">
<div class="col s3">
<h1 style="color:#757575;font-family:'aileron';line-height: 0%">TRENDING</h1>
</div>
<div class="col s5 center-align">
<h1 style="color:#757575;font-family:'aileron';margin-bottom:10px;line-height: 0%">LATEST</h1>
</div>
<div class="col s4 center-align">
<h1 style="color:#757575;font-family:'aileron';margin-bottom:10px;line-height: 0%">BUZZING</h1>
</div>
</div>
</div>
</nav>
</div>
<div class="fixed-action-btn" style="bottom: 45px; right: 24px;">
<a style="background:url(favicon.png);background-size:cover; background-position:center center;" class="btn-floating btn-large red">
</a>
<ul>
<li><a class="btn-floating red"><i class="material-icons">contact_phone</i></a></li>
<li> <a href='http://www.facebook.com/TheFrontier.in' style='background:url(resources/fbicon.jpg);background-size:cover;' class="btn-floating yellow darken-1"></a></li>
<li><a style='background:url(resources/twittericon.jpg);background-size:cover;' class="btn-floating green"></a></li>
<li><a style='background:url(resources/gplusicon.jpg);background-size:cover;' class="btn-floating blue"></a></li>
</ul>
</div>
<div class="row">
<div class="col s3" id="technews">
<?php
require_once("dbconnection.php");
$sql="select * from TBL_NAME where (Category='TechNews') OR (Category='CurrentAffairs') ORDER BY Id DESC LIMIT 3";
$result=mysqli_query($con,$sql);
$count=mysqli_num_rows($result);
while($row=mysqli_fetch_array($result,MYSQL_ASSOC))
{
$title=$row['Title'];
$date=$row['Date'];
$link=$row['Link'];
$image=$row['Image'];
$author=$row['Author'];
$id=$row['LId'];
$Id=$row['Id'];
echo("<div class='card medium hoverable news'>
<div class='card-image' style='background:url($image); background-size:cover; background-position:center center;'>
<a style='background: rgb(0, 0, 0); background: rgba(0, 0, 0, 0.7);height:100%;width:100%;' class='card-title'>$title</a>
</div>
<div class='card-content'>
<div style='background:url(pics/$author.jpg);background-size:cover; background-position: center center;' class='team1'></div>
<a id='author'>$author</a>
<a id='date'>$date</a>
</div>
<div style='text-align:center;' class='card-action'>
<a style='color:#E65100;' href='$link'>Read Now</a>
</div>
</div>
");
}
?>
<a style="color:#212121;" class="waves-effect waves-teal btn-flat more" id="newsmore">Load More</a>
</div>
<div class="col s5" id="recent">
<?php
require_once("dbconnection.php");
$sql="select * from TBL_NAME ORDER BY Id DESC LIMIT 3";
$result=mysqli_query($con,$sql);
$count=mysqli_num_rows($result);
while($row=mysqli_fetch_array($result,MYSQL_ASSOC))
{
$title=$row['Title'];
$author=$row['Author'];
$date=$row['Date'];
$category=$row['Category'];
$link=$row['Link'];
$image=$row['Image'];
$id=$row['LId'];
$Id=$row['Id'];
$linkenc=urlencode($link);
echo("
<div class='card medium hoverable recent'>
<a class='waves-effect' href='#'><div class='card-image' style='background:url($image); background-size:cover; background-position:center center;'></a>
<a class='dropdown-button btn right' href='#' data-activates='dropdown-recent$Id'>Share</a>
<!-- Dropdown Structure -->
<ul id='dropdown-recent$Id' class='dropdown-content'>
<li><a target='_blank' href='http://www.facebook.com/sharer/sharer.php?u=$link'>Facebook</a></li>
<li><a href='https://www.twitter.com/share?url=$link' target='_blank'>Twitter</a></li>
<li><a href='https://plus.google.com/share?url={$linkenc}' target='_blank'>GPlus</a>
</li>
</ul>
</div>
<div class='card-content'>
<p>
<a><span style='font-size:22px;color:#000;font-weight:bold;' class='card-title'>$title</span></a>
</p>
<div style='background:url(pics/$author.jpg);background-size:cover; background-position: center center;' class='team1'></div>
<a id='author'>$author</a>
<a id='date'>$date</a>
</div>
<div class='card-action'>
<a style='color:#E65100;' class='waves-effect' href='$link'>Read Now</a>
<a style='float:right;color:#E65100;' class='waves-effect' href='$category.php'>$category</a>
</div>
</div>
");
}
?>
<a class="center-align waves-effect waves-teal btn-flat more" id="recentmore">Load More</a>
</div>
<div class="col s4">
<div id="test">
<?php
require_once("dbconnection.php");
$sql="select * from TBL_NAME ORDER BY Views DESC LIMIT 3 ";
$result=mysqli_query($con,$sql);
$count=mysqli_num_rows($result);
while($row=mysqli_fetch_array($result,MYSQL_ASSOC))
{
$title=$row['Title'];
$author=$row['Author'];
$date=$row['Date'];
$category=$row['Category'];
$link=$row['Link'];
$image=$row['Image'];
$id=$row['LId'];
$Id=$row['Id'];
$linkenc=urlencode($link);
echo("
<div class='card medium hoverable'>
<div class='card-image' style='background:url($image); background-size:cover; background-position:center center;'>
<a class='dropdown-button btn right' href='#' data-activates='dropdown-popular$Id'>Share</a>
<!-- Dropdown Structure -->
<ul id='dropdown-popular$Id' class='dropdown-content'>
<li><a target='_blank' href='http://www.facebook.com/sharer/sharer.php?u=$link'>Facebook</a></li>
<li><a href='https://www.twitter.com/share?url=$link' target='_blank'>Twitter</a></li>
<li><a href='https://plus.google.com/share?url={$linkenc}' target='_blank'>GPlus</a>
</li>
</ul>
</div>
<div class='card-content'>
<p>
<a><span style='font-size:18px;color:#000;font-weight:bold;' class='card-title'>$title</span></a>
</p>
<div style='background:url(pics/$author.jpg);background-size:cover; background-position: center center;' class='team1'></div>
<a id='author'>$author</a>
<a id='date'>$date</a>
</div>
<div class='card-action'>
<a style='color:#E65100;' href='$link'>Read Now</a>
<a style='float:right;color:#E65100;' href='#'>$category</a>
</div>
</div>
");
}
?>
<a class="center-align waves-effect waves-teal btn-flat more" id="popularmore">Load More</a>
</div>
</div>
</div>
<footer style="background:#000000;" class="page-footer">
<div class="container">
<div class="row">
<div class="col s4">
<a href="default.php" style="font-family:forque;font-size:22px;">The Frontier</a>
<div class="fb-page" data-href="https://www.facebook.com/TheFrontier.in" data-width="250" data-small-header="false" data-adapt-container-width="false" data-hide-cover="false" data-show-facepile="true" data-show-posts="false"><div class="fb-xfbml-parse-ignore"><blockquote cite="https://www.facebook.com/TheFrontier.in"><a href="https://www.facebook.com/TheFrontier.in">VecTech</a></blockquote></div></div>
</div>
<div class="col s2">
<h3 style="color:#FFFFFF;margin:0;font-size:25px;float:left;">Categories</h3>
<div class="left">
<a href="news.php" style="font-size:18">News</a>
<br/><a href="gadgets.php" style="font-size:18">Gadgets</a>
<br/><a href="sci-fi.php" style="font-size:18">Sci-Fi</a>
<br/><a href="gaming.php" style="font-size:18">Gaming</a>
<br/><a href="reviews.php" style="font-size:18">Reviews</a>
</div>
</div>
<div class="col s2">
<h3 style="color:#FFFFFF;margin:0;font-size:25px;float:left;">Other Stuff</h3>
<div class="left">
<a href="about.php" style="font-size:18">About Us</a>
<br/><a style="font-size:18">Advertise</a>
<br/><a href="about.php#contact" style="font-size:18">Contact Us</a>
</div>
</div>
<div class="col s2">
<h3 style="color:#FFFFFF;margin:0;font-size:25px;float:left;">Connect</h3>
<div class="left">
<img style="margin-right:10px;" src='images/footer/Facebook.png' height="20"><a href='http://www.facebook.com/TheFrontier.in' style="font-size:18">Facebook</a>
<br/> <img style="margin-right:10px;" src='images/footer/Twitter.png' height="20"><a style="font-size:18px;">Twitter</a>
<br/> <img style="margin-right:10px;" src='images/footer/Flipboard.png' height="20"><a style="font-size:18px;">Flipboard</a>
</div>
</div>
<div class="col s2">
<h3 style="color:#FFFFFF;margin:0;font-size:25px;float:left;">Subscribe</h3>
<div class="row">
<div class="input-field col s12">
<input id="email" type="email" class="validate">
<label for="email">Email</label>
<br>
<button class="btn waves-effect waves-light subscribe" type="submit" name="action">Subscribe
<i class="material-icons">send</i>
</button>
</br>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="footer-copyright">
<div class="container">
© 2015 VecTech
<a class="grey-text text-lighten-4 right" href="#!">
</a>
</div>
</div>
</footer>
</body>
</html>