-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvotes1.php
More file actions
83 lines (77 loc) · 2.18 KB
/
votes1.php
File metadata and controls
83 lines (77 loc) · 2.18 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
<?php
include("connection.php");
?>
<html>
<head>
<?php
include("script.php");
?>
<style>
.error {color: #FF0000;}
</style>
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="http://iiitu.ac.in/">
<a class="navbar-brand page-scroll" href="#page-top"><img src="image/Capture_7.png" style="width:110px;" class="img-responsive" alt=""></a>
</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav navbar-right">
<li><a href="logout.php"><span class="glyphicon glyphicon-log-out"></span>LOGOUT</a></li>
</ul>
</div>
</div>
</nav>
<?php
echo"<br><br><br>
<div class='container-fluid'>
<div class='row'>
<div class='col-md-12'>
<div class='panel panel-primary min_h'>
<div class=well well-sm><h3><strong>SELECT CATEGORY</strong></h2></div> ";
if(isset($_REQUEST['act']))
{
$act=$_REQUEST['act'];
$cname=$_REQUEST['name'];
$sql = "SHOW TABLES FROM $cname";
$result = mysqli_query($con,$sql);
if (!$result) {
echo "DB Error, could not list tables\n\n";
echo 'MySQL Error: ' . mysqli_error($con);
exit;
}
while ($row = mysqli_fetch_row($result))
{
echo "<div class='row'><div class='col-md-1'></div><div class='col-md-4'><a href='$row[0].php?class=$row[0]&&name=$cname' class='btn btn-primary'>$row[0]</a></div></div><br>";
}
$ss="SELECT * FROM $cname.voter_login";
$ar=mysqli_query($con,$ss);
$numm=mysqli_num_rows($ar);
$qw="select max_votes from catinfo where catname='$cname'";
$qww=mysqli_query($con,$qw);
$arow=mysqli_fetch_row($qww);
if($numm>(10))
{
echo "<div class='row'><div class='col-md-1'></div><div class='col-md-5'><a href='result.php?class=results&&name=$cname' class='btn btn-primary'>Results</a></div></div><br>";
}
}
echo"</div>
</div>
</div>
</div>
<br><br></div>";
echo "</div>";
?>
</div>
<?php
include("footer_2.php"); ?>
</body>
</html>