Improved global variables definition in php files.

This commit is contained in:
alextselegidis 2016-10-06 21:00:58 +02:00
parent ece2374328
commit 4996dd014a
3 changed files with 11 additions and 11 deletions

View file

@ -9,16 +9,16 @@
<script type="text/javascript">
var GlobalVariables = {
'csrfToken': <?php echo json_encode($this->security->get_csrf_hash()); ?>,
'csrfToken' : <?php echo json_encode($this->security->get_csrf_hash()); ?>,
'availableProviders': <?php echo json_encode($available_providers); ?>,
'availableServices' : <?php echo json_encode($available_services); ?>,
'dateFormat' : <?php echo json_encode($date_format); ?>,
'baseUrl' : <?php echo '"' . $base_url . '"'; ?>,
'baseUrl' : <?php echo json_encode($base_url); ?>,
'customers' : <?php echo json_encode($customers); ?>,
'user' : {
'id' : <?php echo $user_id; ?>,
'email' : <?php echo '"' . $user_email . '"'; ?>,
'role_slug' : <?php echo '"' . $role_slug . '"'; ?>,
'email' : <?php echo json_encode($user_email); ?>,
'role_slug' : <?php echo json_encode($role_slug); ?>,
'privileges': <?php echo json_encode($privileges); ?>
}
};

View file

@ -10,14 +10,14 @@
<script type="text/javascript">
var GlobalVariables = {
'csrfToken' : <?php echo json_encode($this->security->get_csrf_hash()); ?>,
'baseUrl' : <?php echo '"' . $base_url . '"'; ?>,
'baseUrl' : <?php echo json_encode($base_url); ?>,
'dateFormat' : <?php echo json_encode($date_format); ?>,
'services' : <?php echo json_encode($services); ?>,
'categories' : <?php echo json_encode($categories); ?>,
'user' : {
'id' : <?php echo $user_id; ?>,
'email' : <?php echo '"' . $user_email . '"'; ?>,
'role_slug' : <?php echo '"' . $role_slug . '"'; ?>,
'email' : <?php echo json_encode($user_email); ?>,
'role_slug' : <?php echo json_encode($role_slug); ?>,
'privileges': <?php echo json_encode($privileges); ?>
}
};

View file

@ -14,17 +14,17 @@
<script type="text/javascript">
var GlobalVariables = {
'csrfToken' : <?php echo json_encode($this->security->get_csrf_hash()); ?>,
'baseUrl' : <?php echo '"' . $base_url . '"'; ?>,
'baseUrl' : <?php echo json_encode($base_url); ?>,
'dateFormat' : <?php echo json_encode($date_format); ?>,
'userSlug' : <?php echo '"' . $role_slug . '"'; ?>,
'userSlug' : <?php echo json_encode($role_slug); ?>,
'settings' : {
'system' : <?php echo json_encode($system_settings); ?>,
'user' : <?php echo json_encode($user_settings); ?>
},
'user' : {
'id' : <?php echo $user_id; ?>,
'email' : <?php echo '"' . $user_email . '"'; ?>,
'role_slug' : <?php echo '"' . $role_slug . '"'; ?>,
'email' : <?php echo json_encode($user_email); ?>,
'role_slug' : <?php echo json_encode($role_slug); ?>,
'privileges': <?php echo json_encode($privileges); ?>
}
};