Code Duplication    Length = 20-20 lines in 3 locations

mod/event_calendar/start.php 3 locations

@@ 189-208 (lines=20) @@
186
	$page_type = $page[0];
187
	switch ($page_type) {
188
		case 'list':
189
			if (isset($page[1])) {
190
				$start_date = $page[1];
191
				if (isset($page[2])) {
192
					$display_mode = $page[2];
193
					if (isset($page[3])) {
194
						$filter_mode = $page[3];
195
						if (isset($page[4])) {
196
							$region = $page[4];
197
						} else {
198
							$region = '';
199
						}
200
					} else {
201
						$filter_mode = '';
202
					}
203
				} else {
204
					$display_mode = '';
205
				}
206
			} else {
207
				$start_date = 0;
208
			}
209
			echo event_calendar_get_page_content_list($page_type, 0, $start_date, $display_mode, $filter_mode, $region);
210
			break;
211
		case 'view':
@@ 239-258 (lines=20) @@
236
			group_gatekeeper();
237
			if (isset($page[1])) {
238
				$group_guid = $page[1];
239
				if (isset($page[2])) {
240
					$start_date = $page[2];
241
					if (isset($page[3])) {
242
					$display_mode = $page[3];
243
					if (isset($page[4])) {
244
						$filter_mode = $page[4];
245
						if (isset($page[5])) {
246
							$region = $page[5];
247
						} else {
248
							$region = '';
249
						}
250
					} else {
251
						$filter_mode = '';
252
					}
253
					} else {
254
						$display_mode = '';
255
					}
256
				} else {
257
					$start_date = '';
258
				}
259
			} else {
260
				$group_guid = 0;
261
			}
@@ 269-288 (lines=20) @@
266
				$username = $page[1];
267
				$user = get_user_by_username($username);
268
				$user_guid = $user->guid;
269
				if (isset($page[2])) {
270
					$start_date = $page[2];
271
					if (isset($page[3])) {
272
					$display_mode = $page[3];
273
					if (isset($page[4])) {
274
						$filter_mode = $page[4];
275
						if (isset($page[5])) {
276
							$region = $page[5];
277
						} else {
278
							$region = '';
279
						}
280
					} else {
281
						$filter_mode = '';
282
					}
283
					} else {
284
						$display_mode = '';
285
					}
286
				} else {
287
					$start_date = '';
288
				}
289
			} else {
290
				$group_guid = 0;
291
			}