-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmessage.php
167 lines (133 loc) · 4.24 KB
/
message.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
<?php
session_start();
require_once("vars.php");
ob_start();
if(!isset($_SESSION["utype"]))
header("location:error.php");
?>
<!--
Author: W3layouts
Author URL: http://w3layouts.com
License: Creative Commons Attribution 3.0 Unported
License URL: http://creativecommons.org/licenses/by/3.0/
-->
<!DOCTYPE HTML>
<html>
<head>
<title>Mosaic a Entertainment Category Flat Bootstrap Responsive Website Template | Home :: w3layouts</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Mosaic Responsive web template, Bootstrap Web Templates, Flat Web Templates, Android Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyEricsson, Motorola web design" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel='stylesheet' type='text/css' />
<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<!-- Graph CSS -->
<link href="css/font-awesome.css" rel="stylesheet">
<!-- jQuery -->
<!-- lined-icons -->
<link rel="stylesheet" href="css/icon-font.min.css" type='text/css' />
<!-- //lined-icons -->
<!-- Meters graphs -->
<script src="js/jquery-1.10.2.min.js"></script>
</head>
<body class="sticky-header left-side-collapsed" onload="initMap()">
<section>
<!-- left side start-->
<div class="left-side sticky-left-side">
<!--logo and iconic logo start-->
<?php
include_once("logo.php")
?>
<!--logo and iconic logo end-->
<div class="left-side-inner">
<!--sidebar nav start-->
<?php
include_once("side2.php")
?>
<!--sidebar nav end-->
</div>
</div>
<!-- app-->
<!-- //app-->
<!-- signup -->
<!-- //signup -->
<!-- left side end-->
<!-- main content start-->
<div class="main-content">
<!-- header-starts -->
<?php
include_once("header.php")
?>
<!--notification menu end -->
<!-- //header-ends -->
<!-- //header-ends -->
<br/><br/><br/>
<h1 align="center">Messages</h1>
<?php
// if(!isset($_SESSION["name"]) or $_SESSION["utype"]!="admin");
// {
// header("location:error.php");
// }
$conn=mysqli_connect(host,usern,pass,dbname) or die ("Error in connection" .mysqli_connect_error());
$q="select * from contactus";
$res=mysqli_query($conn,$q) or die("Error in query" .mysqli_error($conn));
$count=mysqli_affected_rows($conn);
mysqli_close($conn);
if($count=0)
{
print"No Message Found";
}
else
{
print "<table width='800' align='center' >";
print"<tr bgcolor='#CC6633' align='center'>
<td><b>Name</b></td>
<td><b>Mail</b></td>
<td><b>Phone</b></td>
<td><b>Message</b></td>
<td><b>Delete</b></td>
</tr>";
$count=1;
while($x=mysqli_fetch_array($res))
{
if($count%2==0)
{
print "<tr bgcolor='#99CC33' align='center'>";
}
else
{
print "<tr bgcolor='#FFFFFF' align='center'>";
}
print"<td>$x[0]</td>
<td>$x[1]</td>
<td>$x[2]</td>
<td>$x[3]</td>
<td><a href='delmessage.php?mid=$x[4]'>Delete</a></td>
</tr>";
$count++;
}
print "</table>";
}
?>
<h1> </h1>
<div class="clearfix"></div>
<!--body wrapper end-->
</div>
<!--body wrapper end-->
</div>
<!--footer section start-->
<?php
include_once("footer.php")
?>
<!--footer section end-->
<!-- main content end-->
</section>
<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>