-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCampaign.php
More file actions
242 lines (204 loc) · 8.08 KB
/
Campaign.php
File metadata and controls
242 lines (204 loc) · 8.08 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
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
<?php
session_start();
include_once 'Config.php';
if (!isset($_SESSION['user'])) {
header("Location: index.php");
}
$user = $_SESSION['user'];
$sql = "select * from tbl_login where username = '$user'";
$stmt = $pdo->query($sql);
$row = $stmt->fetchObject();
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>RIN- Career Ready Academy</title>
<link href="css/reset.css" rel="stylesheet" type="text/css">
<link href="css/base.css" rel="stylesheet" type="text/css">
<link href="css/style.css" rel="stylesheet" type="text/css">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-y3tfxAZXuh4HwSYylfB+J125MxIs6mR5FOHamPBG064zB+AFeWH94NdvaCBm8qnd" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.2/js/bootstrap.min.js"
integrity="sha384-vZ2WRJMwsjRMW/8U7i6PWi6AlO1L79snBrmgiDpgIWJ82z8eA5lenwvxbMV1PAh7"
crossorigin="anonymous"></script>
</head>
<body>
<div class="section toparea">
<div class="wrapper">
<div class="columns branding">
<div class="tagline"><img src="images/rin.png" width="80" height="65"></div>
</div>
<div class="columns user-area">
<div class="logged-name" style="margin-top: 20px;">Welcome <?php echo $row->username; ?> <a
href="logout.php?logout">Logout</a></div>
</div>
</div>
</div>
<div class="main-nav">
<ul id="accordion" class="accordion">
<li class="default open">
<div class="link"><a href="home.php">Dashboard</a></div>
</li>
<li>
<div class="link"><a href="Demographic.php">Demographic</a></div>
</li>
<li>
<div class="link"><a href="Campaign.php">Campaign</a></div>
</li>
<li>
<div class="link"><a href="System.php">System</a></div>
</li>
</ul>
</div>
<div class="content-area">
<h1>Campaign</h1>
<div class="row ">
<div class="twelve columns card">
<div class="card-content">
<div class="two columns">
<select id="callCount">
<option value="0">Total Miss Calls</option>
<option value="1">Unique Miss Calls</option>
<option value="2">Total Miss Call After Registration</option>
</select>
</div>
<div class="two columns">
<input type="submit" value="Search" onclick="callCountTotal()">
</div>
<div class="two columns">
<h1 id="callCountTotal">Total</h1>
</div>
</div>
</div>
<div class="twelve columns card">
<div class="card-content">
<div class="two columns">
<select id="regCount">
<option value="0">All Registration Count</option>
<option value="1">Count of Drop out during registration</option>
<option value="2">Dropout percentage at each stage of registration</option>
</select>
</div>
<div class="two columns">
<input type="submit" value="Search" onclick="regCountTotal()">
</div>
<div class="two columns">
<h1>Total</h1>
<p id="regCountTotal"></p>
</div>
</div>
</div>
<div class="twelve columns card">
<div class="card-content">
<div class="two columns">
<select id="moduleCount">
<option value="0">Count of each module completion</option>
<option value="1">Count of each module started</option>
<option value="2">Total completion number</option>
<option value="3">Count of Repeat callers after completion</option>
<option value="4">Drop Out Stage(module number)</option>
<option value="5">Drop Out Rate(total drop out/total registered)</option>
<option value="6">Days taken to complete course</option>
</select>
</div>
<div class="two columns">
<input type="submit" value="Search" onclick="moduleCountTotal()">
</div>
<div class="two columns">
<h1>Total</h1>
<p id="moduleCountTotal"></p>
</div>
</div>
</div>
<div class="twelve columns card">
<div class="card-content">
<div class="two columns">
<select id="regionCount">
<option value="0">All Region</option>
<?php
include_once("Config.php");
$conn = new mysqli($Server, $UserID, $Password, $Database);
$sql = "SELECT 10000 AS id, 'others' AS PostalCode UNION ALL SELECT * FROM tbl_postal_code";
$result = $conn->query($sql);
$value = 1;
while ($row = $result->fetch_assoc()) {
$postal_code = $row["PostalCode"];
echo "<option " . "value=" . $value . ">" . $postal_code . "</option>";
$value++;
}
mysqli_close($conn);
?>
</select>
</div>
<div class="two columns">
<input type="submit" value="Search" onclick="regionCountTotal()">
</div>
<div class="two columns">
<h1 id="regionCountTotal">Total</h1>
</div>
</div>
</div>
</div>
</div>
<div style="height: 150px"></div>
</div>
<div class="section footer">
<div class="wrapper">
<div class="columns copyright">
<p>RIN- Career Ready Academy | All Rights Reserved | 2016 | Powered by <span>SSD-Tech</span></p>
</div>
</div>
</div>
<script>
$(document).ready(function () {
//$("#callCountTotal, #regCountTotal, #moduleCountTotal, #regionCountTotal").hide();
});
function callCountTotal() {
var menu = $("#callCount").val();
var urlHit = "CampaignDBApi.php?option=" + 'callCount' + "&menu=" + menu;
var count = $.ajax({
url: urlHit,
success: function (result) {
$("#callCountTotal").html("<h1>Total = " + result + "</h1>");
}
});
}
function regCountTotal() {
var menu = $("#regCount").val();
var urlHit = "CampaignDBApi.php?option=" + 'regCount' + "&menu=" + menu;
var count = $.ajax({
url: urlHit,
success: function (result) {
$("#regCountTotal").html(result);
}
});
}
function moduleCountTotal() {
var menu = $("#moduleCount").val();
var urlHit = "CampaignDBApi.php?option=" + 'moduleCount' + "&menu=" + menu;
var count = $.ajax({
url: urlHit,
success: function (result) {
$("#moduleCountTotal").html(result);
}
});
}
function regionCountTotal() {
var menu = $("#regionCount option:selected").text();
if ($("#regionCount option:selected").val() == 0) {
menu = "all";
}
var urlHit = "CampaignDBApi.php?option=" + 'regionCount' + "&menu=" + menu;
var count = $.ajax({
url: urlHit,
success: function (result) {
$("#regionCountTotal").html("<h1>Total = " + result + "</h1>");
}
});
}
</script>
</body>
</html>