-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaccount.php
36 lines (28 loc) · 1.38 KB
/
account.php
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
<?php
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'account');
// ######################### REQUIRE BACK-END ############################
require_once( realpath('include/global.php') );
// ########################### INIT VARIABLES ############################
$navigation = null;
// ########################### IDENTIFY USER #############################
loggedInOrReturn();
setDefaultForLoggedinUser();
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
$renderer -> addJavascriptToHeader('skin/js/account.js', THIS_SCRIPT);
// UserProfile
$profile = new UserProfile();
$website -> input -> clean_array_gpc('p', array('action' => TYPE_NOHTML));
if ( isset($website -> GPC['action']) AND ($website -> GPC['action'] == 'updateprofile') ) {
$profileContent = $profile -> updateCurrentProfile();
}
else {
$profileContent = $profile -> getCurrentProfile();
}
$renderer -> loadTemplate(THIS_SCRIPT . '.htm');
$renderer -> addCustonStyle(array('script' => 'skin/css/account.css'), THIS_SCRIPT);
$renderer -> setVariable('global_navbar', $navigation);
$renderer -> setVariable(THIS_SCRIPT . '_content', $profileContent);
print_output($renderer -> renderTemplate());