-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.php
145 lines (137 loc) · 5.73 KB
/
home.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
<?php
session_start();
include_once 'include/class.user.php';
$user = new User();
$res=$user->select();
$res1=$user->public_event();
$user_id = $_SESSION['user_id'];
$event_id = $_SESSION['event_id'];
if (!$user->get_session()){
header("location:index.php");
}
if (isset($_GET['q'])){
$user->user_logout();
header("location:index.php");
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>EDiary | Home</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="sign up page">
<meta name="author" content="shrishail sh">
<link href="offcanvas.css" rel="stylesheet">
<link href="css/bootstrap.min.css" rel="stylesheet">
<script type="text/javascript">
function del_id(id)
{
if(confirm('Sure to delete this record ?'))
{
window.location='delete_data.php?delete_id='+id
}
}
function edit_id(id)
{
if(confirm('Sure to edit this record ?'))
{
window.location='editevent.php?edit_id='+id
}
}
</script>
</head>
<body>
<?php include "headerlogin.php"; ?>
<div class="container">
<div class="row row-offcanvas row-offcanvas-right">
<div class="col-xs-12 col-sm-9">
<div class="panel panel-info">
<div class="panel-heading">
<strong> Event's Hosted By You</strong>
</div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-bordered table-hover table-striped">
<thead>
<tr class="text-info">
<th>Id</th>
<th>Date</th>
<th>Event Type</th>
<th>Subject</th>
<th>Details</th>
<th colspan="2">Edit or Delete </th>
</tr>
</thead>
<tbody>
<?php
session_start();
while($row=mysqli_fetch_row($res))
{
?>
<tr>
<td><?php echo $row[0]; ?></td>
<td><?php echo $row[2]; ?></td>
<td><?php echo $row[3]; ?></td>
<td><?php echo $row[4]; ?></td>
<td><?php echo $row[5]; ?></td>
<td align="center"><a href="javascript:edit_id(<?php echo $row[0]; ?>)"><img src="images/b_edit.png" alt="EDIT" /></a></td>
<td align="center"><a href="javascript:del_id(<?php echo $row[0]; ?>)"><img src="images/b_drop.png" alt="DELETE" /></a></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<?php include 'sidebar.php'; ?>
</div>
</div>
<!-- /container -->
<div class="container">
<div class="row row-offcanvas row-offcanvas-right">
<div class="col-xs-12 col-sm-9">
<div class="panel panel-info">
<div class="panel-heading">
<strong> Event's In Your City</strong>
</div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-bordered table-hover table-striped">
<thead>
<tr class="text-info">
<th>Date</th>
<th>Subject</th>
<th>Details</th>
</tr>
</thead>
<tbody>
<?php
session_start();
while($row=mysqli_fetch_row($res1))
{
?>
<tr>
<td ><?php echo $row[0]; ?></td>
<td><?php echo $row[1]; ?></td>
<td><?php echo $row[2]; ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<?php include 'footer.php' ?>
<script src="js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>