-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.php
More file actions
304 lines (300 loc) · 7.94 KB
/
init.php
File metadata and controls
304 lines (300 loc) · 7.94 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
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
<?php
//phpinfo();
echo "RUN THIS ONCE ONLY!";
die;
require("station.php");
$con = mysqli_connect("localhost","root","temppassword123!","maindb");
if (mysqli_connect_errno($con)) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$arr = array(
"Jurong East",
"Bukit Batok",
"Bukit Gombak",
"Choa Chu Kang",
"Yew Tee",
"Sungei Kadut",
"Kranji",
"Marsiling",
"Woodlands",
"Admiralty",
"Sembawang",
"Canberra",
"Yishun",
"Khatib",
"Yio Chu Kang",
"Ang Mo Kio",
"Bishan",
"Braddell",
"Toa Payoh",
"Novena",
"Newton",
"Orchard",
"Somerset",
"Dhoby Ghaut",
"City Hall",
"Raffles Place",
"Marina Bay",
"Marina South Pier",
"Pasir Ris",
"Tampines",
"Simei",
"Tanah Merah",
"Bedok",
"Kembangan",
"Eunos",
"Paya Lebar",
"Aljunied",
"Kallang",
"Lavender",
"Bugis",
"City Hall",
"Raffles Place",
"Tanjong Pagar",
"Outram Park",
"Tiong Bahru",
"Redhill",
"Queenstown",
"Commonwealth",
"Buona Vista",
"Dover",
"Clementi",
"Jurong East",
"Chinese Garden",
"Lakeside",
"Boon Lay",
"Pioneer",
"Joo Koon",
"Gul Circle",
"Tuas Crescent",
"Tuas West Road",
"Tuas Link",
"Expo",
"Changi Airport",
"HarbourFront",
"Keppel",
"Outram Park",
"Chinatown",
"Clarke Quay",
"Dhoby Ghaut",
"Little India",
"Farrer Park",
"Boon Keng",
"Potong Pasir",
"Woodleigh",
"Serangoon",
"Kovan",
"Hougang",
"Buangkok",
"Sengkang",
"Punggol",
"Dhoby Ghaut",
"Bras Basah",
"Esplanade",
"Promenade",
"Nicoll Highway",
"Stadium",
"Mountbatten",
"Dakota",
"Paya Lebar",
"MacPherson",
"Tai Seng",
"Bartley",
"Serangoon",
"Lorong Chuan",
"Bishan",
"Marymount",
"Caldecott",
"Bukit Brown",
"Botanic Gardens",
"Farrer Road",
"Holland Village",
"Buona Vista",
"one-north",
"Kent Ridge",
"Haw Par Villa",
"Pasir Panjang",
"Labrador Park",
"Telok Blangah",
"HarbourFront",
"Bayfront",
"Marina Bay",
"Bukit Panjang",
"Cashew",
"Hillview",
"Hume Avenue",
"Beauty World",
"King Albert Park",
"Sixth Avenue",
"Tan Kah Kee",
"Botanic Gardens",
"Stevens",
"Newton",
"Little India",
"Rochor",
"Bugis",
"Promenade",
"Bayfront",
"Downtown",
"Telok Ayer",
"Chinatown",
"Fort Canning",
"Bencoolen",
"Jalan Besar",
"Bendemeer",
"Geylang Bahru",
"Mattar",
"MacPherson",
"Ubi",
"Kaki Bukit",
"Bedok North",
"Bedok Reservoir",
"Tampines West",
"Tampines",
"Tampines East",
"Upper Changi",
"Expo",
"Woodlands North",
"Woodlands",
"Woodlands South",
"Springleaf",
"Lentor",
"Mayflower",
"Bright Hill",
"Upper Thomson",
"Caldecott",
"Mount Pleasant",
"Stevens",
"Napier",
"Orchard Boulevard",
"Orchard",
"Great World",
"Havelock",
"Outram Park",
"Maxwell",
"Shenton Way",
"Marina Bay",
"Marina South",
"Gardens by the Bay"
);
$feedback = array (
"Weird people taking selfie",
"Unable to use Twitter in MRT",
"Unable to use Snapchat in MRT",
"Unable to use Internet in MRT",
"Unable to use Instagram in MRT",
"Unable to use Facebook in MRT",
"Unable to use Carousell in MRT",
"Unable to use Baidu in MRT",
"Unable to send Whatsapp messages in MRT tunnels",
"Unable to send SMSes in MRT tunnels",
"Unable to make phone calls in MRT tunnels",
"Train waits at station for too long",
"Train travels too slowly",
"Train service starts too late",
"Train service ends too early",
"Train frequency too low",
"Train frequency is low during non-peak hours",
"Train doors close too fast",
"Train disruption",
"Train always packed during peak hours",
"Top up machine spoil",
"Too crowded to take selfie",
"There is no internet while the train is underground",
"There are people who are occupying 2 seats",
"There are babies who constantly cries all the time throughout the journey",
"The train is extremely stuffy",
"The train is extremely hot",
"The train is extremely dirty",
"The train is always super crowded",
"The station staff is extremely unhelpful",
"The station lifts are extremely small and always full",
"The signs in the station is extremely misleading",
"The signboard display displayed the wrong timings",
"The MRT Door jammed and caused the MRT to not be able to move off",
"The driver drove the train extremely slowly",
"The air con on the MRT is not working",
"The air con in the station is not working",
"Teenagers public display of affection",
"Station too crowded",
"Station toilet floors wet",
"Station stinks and is unhygenic",
"Station staff rude and unfriendly",
"Station staff are extremely bad at handling train disruptions",
"Station lights faulty. Always flickering",
"Station gantry spoil",
"Station escalators spoil",
"Station escalators slow",
"Station escalators always change direction",
"Sometimes in a rush, train keeps stopping",
"Someone stole my wallet! Made police report",
"Smell people with body odour",
"Scared being stomp-ed",
"People with earphones unaware of their surroundings",
"People with bulky bags",
"People unwilling to move in",
"People unwilling to give up seat",
"People sits all over the floor, disrupting others from navigating the train",
"People rushing in get stuck at door, wasting time",
"People not bothered to queue up",
"People leave their bags lying all over the floor",
"People don't wait for people to alight before boarding",
"People don't give way",
"People continuously complaining about not giving up seats",
"People brought durians onboard train",
"People are talking extremely loudly on the MRT",
"People are blasting music on their phone speakers",
"People are blasting extremely loud music through their earphones",
"People all gather around the MRT door, preventing people from entering the train",
"Occasional dramatic fights and quarrels on the train",
"Not enough hand rails",
"Noisy people talking loudly on phone",
"No space to take selfie",
"No place to put heavy bags",
"No one give seat to NS men",
"No one give seat to elderly",
"No money to travel via MRT",
"No 4G signal in tunnel",
"No 3G signal in tunnel",
"My phone goes 'No Signal' whenever I am underground",
"MRT spends time open and closing doors multiple times",
"Machine eat my money",
"Lost contact lens in train. If found call 91234567",
"Long train waiting times",
"Little kids are running around on the MRT station",
"Little kids are running around on the MRT",
"Late for work because the train service got disrupted",
"Late for work because the train is too slow",
"Late for work because the train is always too crowded",
"Incosiderate people",
"Inconsiderate people taking selfie",
"Inappropriate behaviour",
"Food dropped on the MRT floor, no one clean up",
"Fare hikes again. When will this end?",
"Elderly rushing into trains",
"Cannot drink plain water",
"Cannot drink any beverages",
"Aunties staring at teenagers",
"All of the escalators at the station is not working",
"A wrong anncouncement was made"
);
$h = 0;
foreach ($arr as &$station) {
$rand = rand(1,50);
for($i = 0; $i < $rand; $i++) {
$rand2 = rand(0,100);
if ($rand2 < 75) {
$rand2 = 1;
} else {
$rand2 = 0;
}
$rand3 = rand(0, count($feedback) - 1);
//echo "<br />Doing " . $h . " out of " . count($arr) . " | Iteration: ".$i." out of ".$rand2;
echo "<br />\nDoing " . $h . " out of " . count($arr);
$sql = "INSERT INTO `responses` VALUES (NULL, NULL, '".$station."',". $rand2 .",'".$feedback[$rand3]."');";
$result = mysqli_query($con, $sql);
}
$h++;
}
echo "Done";
?>