-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstarted.php
More file actions
54 lines (43 loc) · 1.16 KB
/
started.php
File metadata and controls
54 lines (43 loc) · 1.16 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
<?php
/**
* started
*
* @package Sngine
* @author Zamblek
*/
// fetch bootloader
require('bootloader.php');
// user access (simple)
if (!$user->_logged_in) {
user_login();
}
try {
// check registration type
if ($system['registration_type'] == "paid" && !$user->_data['user_subscribed']) {
redirect('/packages');
}
// check if already getted started
if (!$system['getting_started'] || $user->_data['user_started']) {
redirect();
}
// get countries
$countries = $user->get_countries();
/* assign variables */
$smarty->assign('countries', $countries);
// get suggested peopel
$new_people = $user->get_new_people(0, true);
/* assign variables */
$smarty->assign('new_people', $new_people);
// finished
if (isset($_GET['finished'])) {
/* update user */
$db->query(sprintf("UPDATE users SET user_started = '1' WHERE user_id = %s", secure($user->_data['user_id'], 'int'))) or _error("SQL_ERROR_THROWEN");
redirect();
}
} catch (Exception $e) {
_error(__("Error"), $e->getMessage());
}
// page header
page_header(__($system['system_title']) . " › " . __("Getting Started"));
// page footer
page_footer("started");