-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCommonController.php
More file actions
132 lines (99 loc) · 3.43 KB
/
Copy pathCommonController.php
File metadata and controls
132 lines (99 loc) · 3.43 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
<?php
//this controller is separate from the another for security reason to control path authorization.
$whitelist = array(
'1217.0.0.1',
'::1'
);
// display error info when in localhost (not in production)
if(in_array($_SERVER['REMOTE_ADDR'], $whitelist)){
// not valid
ini_set('display_errors', 'On');
ini_set('html_errors', 0);
}
$process = $_GET['p'];
if ($process == 'vregister'){
$register = new register();
$register->checkReg('d_voter');
}elseif ($process == 'vlogin'){
$login = new login();
$login->process('d_voter');
}elseif ($process == 'register'){
$register = new register();
$register->checkReg('d_student');
}elseif ($process == 'login'){
$login = new login();
$login->process('d_student');
}elseif ($process == 'upload'){
$si = new studentIndex();
$si->upload();
}elseif ($process == 'json'){
$si = new studentIndex();
$si->jsonDetail();
}elseif ($process == 'logout'){
$login = new login();
$login->clearSession();
}elseif ($process == 'panel'){
$posters = new posters();
$posters->loadPanel();
}elseif ($process == 'UndergraduateCE' || $process == 'PostgraduateCE' || $process == 'PostgraduatePM' || $process == 'UndergraduatePM'){
$posters = new posters();
$posters->loadImages($process);
}elseif ($process == 'populateVotesUndergraduateCE'){
$posters = new posters();
$posters->populateVotes('UndergraduateCE');
}elseif ($process == 'populateVotesPostgraduateCE'){
$posters = new posters();
$posters->populateVotes('PostgraduateCE');
}elseif ($process == 'populateVotesUndergraduatePM'){
$posters = new posters();
$posters->populateVotes('UndergraduatePM');
}elseif ($process == 'populateVotesPostgraduatePM'){
$posters = new posters();
$posters->populateVotes('PostgraduatePM');
}elseif ($process == 'loadImages2014'){
$posters = new posters();
$posters->loadImages2014();
}elseif ($process == '2015PostgraduateCE'){
$posters = new posters();
$posters->loadImagesYearType('2015', 'PostgraduateCE');
}elseif ($process == '2015Undergraduate'){
$posters = new posters();
$posters->loadImagesYearType('2015', 'Undergraduate');
}elseif ($process == '2016PostgraduateCE'){
$posters = new posters();
$posters->loadImagesYearType('2016', 'PostgraduateCE');
}elseif ($process == '2016UndergraduateCE'){
$posters = new posters();
$posters->loadImagesYearType('2016', 'UndergraduateCE');
}elseif ($process == '2016PostgraduatePM'){
$posters = new posters();
$posters->loadImagesYearType('2016', 'PostgraduatePM');
}elseif ($process == '2016UndergraduatePM'){
$posters = new posters();
$posters->loadImagesYearType('2016', 'UndergraduatePM');
}elseif ($process == 'posterDetail'){
$posters = new posters();
$posters->posterDetail();
}elseif ($process == 'search'){
$posters = new posters();
$posters->search();
}elseif ($process == 'submitVoteUndergraduateCE'){
$submitVote = new submitVote();
$submitVote->process('UndergraduateCE');
}elseif ($process == 'submitVotePostgraduateCE'){
$submitVote = new submitVote();
$submitVote->process('PostgraduateCE');
}elseif ($process == 'submitVoteUndergraduatePM'){
$submitVote = new submitVote();
$submitVote->process('UndergraduatePM');
}elseif ($process == 'submitVotePostgraduatePM'){
$submitVote = new submitVote();
$submitVote->process('PostgraduatePM');
}elseif ($process == 'rep'){
$report = new Report();
$report->analyse();
}elseif ($process == 'posterTitle'){
$report = new Report();
$report->getAllPosterTitle();
}
?>