-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmin-vote.php
184 lines (143 loc) · 5.73 KB
/
admin-vote.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
<?php
/************** BASIC CONFIG *************************/
define('_VALID_PHP', true);
$menu = 'ADMIN_WISHLIST';
$submenu = 'ADMIN_WISHLIST_MONTH';
require_once 'init.php';
use Carbon\Carbon;
if (!$user->logged_in) {
//redirect_to(SITEURL.'/index.php');
}
if(isset($_GET['s']) && $_GET['s'] != ''){
$sponsor_id = $_GET['s'];
}else{
rd('admin-month.php');
}
if(isset($_GET['w']) && $_GET['w'] != ''){
$wish_id = $_GET['w'];
$wish_detail = $fz->getWishByID($wish_id);
}else{
rd('admin-month.php');
}
if(isset($_GET['wp']) && $_GET['wp'] != ''){
$wp_id= $_GET['wp'];
$votes = $fz->getVoteByWpID($wp_id);
}else{
rd('admin-month.php');
}
$pname = $wish_detail->title.' Vote List';
/************** END BASIC CONFIG *********************/
?>
<?php include BACK_INC.'header.php'; ?>
<body class="page-container-bg-solid page-header-fixed page-sidebar-closed-hide-logo">
<?php include BACK_INC.'htmlheader.php'; ?>
<!-- BEGIN CONTAINER -->
<div class="page-container">
<?php include BACK_INC.'menu.php'; ?>
<div class="page-content-wrapper">
<!-- BEGIN CONTENT BODY -->
<div class="page-content">
<!-- BEGIN PAGE HEAD-->
<div class="page-head">
<!-- BEGIN PAGE TITLE -->
<div class="page-title">
<h1><?php echo $pname; ?>
<small>
<!-- bootstrap form controls and more -->
</small>
</h1>
</div>
<!-- END PAGE TITLE -->
</div>
<!-- END PAGE HEAD-->
<!-- BEGIN PAGE BREADCRUMB -->
<ul class="page-breadcrumb breadcrumb">
<li>
<a href="admin-dashboard.php">Dashboard</a>
<i class="fa fa-circle"></i>
</li>
<li>
<span>Wish List Voting</span>
<i class="fa fa-circle"></i>
</li>
<li>
<a href="admin-month.php?s=<?php echo $sponsor_id; ?>">Month Setting</a>
<i class="fa fa-circle"></i>
</li>
<li>
<span class="active"><?php echo $pname; ?></span>
</li>
</ul>
<!-- END PAGE BREADCRUMB -->
<!-- BEGIN PAGE BASE CONTENT -->
<div class="row">
<div class="col-md-12 ">
<!-- BEGIN SAMPLE FORM PORTLET-->
<div class="portlet light bordered">
<div class="portlet-title">
<div class="caption font-red-sunglo">
<i class="icon-settings font-red-sunglo"></i>
<span class="caption-subject bold uppercase">Vote List For <?php echo $wish_detail->title; ?> </span>
</div>
</div>
<div class="portlet-body form">
<div id="getting-started"></div>
<div class="row">
<div class="col-md-6">
<h4 class="pull-left">Vote List</h4>
</div>
<div class="col-md-12">
<?php
if(isset($_SESSION['noti']) && $_SESSION['noti'] != ''){
if($_SESSION['noti']['status'] == 'error'){
echo '<div class="alert alert-danger"><button type="button" class="close" data-dismiss="alert"><span>×</span></button>'.$_SESSION['noti']['msg'].'</div>';
}elseif($_SESSION['noti']['status'] == 'success'){
echo '<div class="alert alert-success"><button type="button" class="close" data-dismiss="alert"><span>×</span></button>'.$_SESSION['noti']['msg'].'</div>';
}
unset($_SESSION['noti']);
}
// pre($votes);
?>
<table class="table table-bordered table-hover" id="sample_1">
<thead>
<tr>
<th class="text-center">Name</th>
<th class="text-center">Email</th>
<th class="text-center" width="15%">Action</th>
</tr>
</thead>
<tbody>
<?php
foreach($votes as $key => $row){
?>
<tr>
<td class="text-center"><?php echo $row->firstname.' '.$row->lastname; ?></td>
<td class="text-center"><?php echo $row->email; ?></td>
<td class="text-center">
<a href="admin-userprofile.php?id=<?php echo $row->user_id; ?>" target="_blank"><button class="btn btn-sm btn-success"><i class="fa fa-search"></i></button></a>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
<!-- here -->
</div>
<!-- END SAMPLE FORM PORTLET-->
</div>
</div>
<!-- END PAGE BASE CONTENT -->
</div>
<!-- END CONTENT BODY -->
</div>
</div>
<!-- END CONTAINER -->
<script type="text/javascript">
$(document).ready(function(){
});
</script>
<?php include BACK_INC.'htmlfooter.php'; ?>