-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstarted.php
More file actions
46 lines (36 loc) · 948 Bytes
/
started.php
File metadata and controls
46 lines (36 loc) · 948 Bytes
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
<?php
/**
* started
*
* @package Sngine
* @author Zamblek
*/
// fetch bootstrap
require('bootstrap.php');
// user access
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 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");
?>