-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
141 lines (129 loc) · 5.42 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
<?php
$link = mysqli_connect('localhost','root','','mini');
if (!$link) {
die('Could not connect to MySQL: ' . mysql_error());
}
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="node_modules\bootstrap\dist\css\bootstrap.css">
<link rel="stylesheet" type="text/css" href="node_modules\bootstrap\dist\css\animate.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="node_modules\bootstrap\dist\js\bootstrap.js"></script>
<style>
h2{
font-size: 150px;
}
h1{
font-size: 50px;
}
h3{
font-size: 75px;
font-weight: bold;
font-style: italic;
}
h4{
font-size: 50px;
font-style: italic;
}
.count{
padding: 100px 0px 0px 300px;
}
.cont{
padding-top: 100px;
}
.carousel-inner{
height:75%;
}
body{
background-image:url("img/bg2.jpg");
color: #fff;
}
</style>
</head>
<body>
<!--navigation menu start-->
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="index.php">FCC Status Viewer</a>
</div>
<ul class="nav navbar-nav">
<li class="active"><a href="index.php">Home</a></li>
<li><a href="userlist.php">User List</a></li>
<li><a href="http://fcc-status.herokuapp.com" target="_blank">Live View</a></li>
<li><a href="userprofile.php">User Profile</a></li>
<li><a href="userexcluder.php">User Excluder</a></li>
<li><a href="activity.php">Activity Report</a></li>
<li><a href="message.php">Message to Campsite</a></li>
</ul>
</div>
</nav>
<!--navigation menu end-->
<!--carousel start -->
<div class="container-fluid">
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<?php
$qry="SELECT * FROM `daily_count` where `u_date`='".date('Y-m-d')."'";
//echo $qry;
$qry2=mysqli_query($link,$qry) or die (mysqli_error($link));
while($row = mysqli_fetch_array($qry2, MYSQL_ASSOC)) {
$pts=$row['pts_count'];
$ucount=$row['u_count'];
}
echo "<div class=\"item active\">
<div class=\"cont\">
<div class=\"row\">
<div class=\"col-lg-12 text-center\">
<h1>Total Problems:".$pts." </h1>
</div>
</div>
<div class=\"row\">
<div class=\"col-lg-12 text-center\">
<h1>Total Problems:".$ucount." </h1>
</div>
</div>
</div>
</div>";
$qry="SELECT `user`.`name`,`user`.`url`,`daily_update`.`points` FROM `daily_update`,`user` WHERE `user`.`uid`=`daily_update`.`uid` and `daily_update`.`r_date`='".date('Y-m-d')."' ORDER BY `daily_update`.`points` DESC limit 3";
//echo $qry;
$qry2=mysqli_query($link,$qry) or die (mysqli_error($link));
$count=0;
while($row = mysqli_fetch_array($qry2, MYSQL_ASSOC)) {
$count++;
$name=$row['name'];
$url=$row['url'];
$points=$row['points'];
echo "<div class=\"item\">
<h1 class=\"col-lg-12 text-center\"><span class=\"label label-primary\">Maximum Problem Solver</span></h1>
<div class=\"row\">
<div class=\"col-lg-6 count\">
<h2>#".$count."</h2>
</div>
<div class=\"col-lg-6\">
<div class=\"cont\">
<h3>".$name."</h3>
<h4>".$points."</h4>
<img src=\"".$url."\"></img>
</div>
</div>
</div>
</div>\n";
}
?>
<!-- Left and right controls -->
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
<!--carousel end -->
</div>
</body>
</html>