1
|
|
|
<? include('header.php'); ?>
|
|
|
|
|
2
|
|
|
<section class="slice color-one">
|
3
|
|
|
<div class="w-section inverse no-padding border_box">
|
4
|
|
|
<div class="container">
|
5
|
|
|
<div class="">
|
6
|
|
|
</div>
|
7
|
|
|
</div>
|
8
|
|
|
</div>
|
9
|
|
|
</div>
|
10
|
|
|
</section>
|
11
|
|
|
<section class="page-wrap">
|
12
|
|
|
<div id="toast-container" class="toast-top-right col-md-6" style="display:none;" >
|
13
|
|
|
<div class="toast fa-check toast-success1">
|
14
|
|
|
<button class="toast-close-button">
|
15
|
|
|
<i class="fa fa-close"></i>
|
16
|
|
|
</button>
|
17
|
|
|
<div class="toast-message">
|
18
|
|
|
Success message
|
19
|
|
|
</div>
|
20
|
|
|
</div>
|
21
|
|
|
</div>
|
22
|
|
|
|
23
|
|
|
<div id="toast-container_error" class="toast-top-right col-md-6" style="display:none;z-index:999"> <!-- style="display:none;" -->
|
24
|
|
|
<div class="toast fa fa-times toast-danger1">
|
25
|
|
|
<button class="toast-close-button">
|
26
|
|
|
<i class="fa fa-close"></i>
|
27
|
|
|
</button>
|
28
|
|
|
<div class="toast-message">
|
29
|
|
|
Error message light
|
30
|
|
|
</div>
|
31
|
|
|
</div>
|
32
|
|
|
</div>
|
33
|
|
|
<?php
|
34
|
|
|
$astpp_msg = false;
|
35
|
|
|
$msg_type = "";
|
36
|
|
|
$astpp_err_msg = $this->session->flashdata('astpp_errormsg');
|
37
|
|
|
if ($astpp_err_msg) {
|
38
|
|
|
$astpp_msg = $astpp_err_msg;
|
39
|
|
|
$msg_type = "error";
|
40
|
|
|
}
|
41
|
|
|
|
42
|
|
|
$astpp_notify_msg = $this->session->flashdata('astpp_notification');
|
43
|
|
|
if ($astpp_notify_msg) {
|
44
|
|
|
$astpp_msg = $astpp_notify_msg;
|
45
|
|
|
$msg_type = "notification";
|
46
|
|
|
}
|
47
|
|
|
if ($astpp_msg) {
|
48
|
|
|
?>
|
49
|
|
|
<script>
|
50
|
|
|
var validate_ERR = '<?= $astpp_msg; ?>';
|
51
|
|
|
var ERR_type = '<?= $msg_type; ?>';
|
52
|
|
|
display_astpp_message(validate_ERR,ERR_type);
|
53
|
|
|
</script>
|
54
|
|
|
<?php } ?>
|
55
|
|
|
<button type="button" class="navbar-toggle nav_sidetoggle collapsed white_bar" data-toggle="collapse" data-target=".sidebar">
|
56
|
|
|
<span class="sr-only">Toggle navigation</span>
|
57
|
|
|
<span class="icon-bar"></span>
|
58
|
|
|
<span class="icon-bar"></span>
|
59
|
|
|
<span class="icon-bar"></span>
|
60
|
|
|
</button>
|
61
|
|
|
<div class="sidebar collapse">
|
62
|
|
|
|
63
|
|
|
<?php
|
64
|
|
|
$uri_string= uri_string();
|
65
|
|
|
$uri_arr=explode("/",$uri_string);
|
66
|
|
|
$entity_name=false;
|
67
|
|
|
if(isset($uri_arr[1]) && !empty($uri_arr[1])){
|
68
|
|
|
$function_explode=explode("_",$uri_arr[1]);
|
69
|
|
|
$entity_name = isset($function_explode[1]) && !empty($function_explode[1]) ? $function_explode[0] : false;
|
70
|
|
|
}
|
71
|
|
|
|
72
|
|
|
$accountinfo=$this->session->userdata('accountinfo');
|
73
|
|
|
if($accountinfo['type'] != 0 && $accountinfo['type'] !=3){
|
74
|
|
|
$menu_info= ($uri_arr[0]=="user"
|
75
|
|
|
? unserialize(RESELLERPROFILE_ARRAY):($uri_arr[0]=="accounts"&& $entity_name =='customer'
|
76
|
|
|
? unserialize(CUSTOMEREDIT_ARRAY) :($uri_arr[0]=="accounts"&& $entity_name =='provider'
|
77
|
|
|
? unserialize(PROVIDEREDIT_ARRAY) :($uri_arr[0]=="accounts"&& $entity_name =='reseller'
|
78
|
|
|
? unserialize(RESELLEREDIT_ARRAY) : ($uri_arr[0] =="package" ? unserialize(PACKAGEEDIT_ARRAY):false) ))));
|
79
|
|
|
}else{
|
80
|
|
|
$menu_info=null;
|
81
|
|
|
$current_menu_url=$uri_arr[0]."/".$uri_arr[1]."/";
|
82
|
|
|
$new_menu_info=array();
|
83
|
|
|
$menus= unserialize($this->session->userdata('menuinfo'));
|
84
|
|
|
foreach($menus as $entity_key=>$entity_menu){
|
85
|
|
|
foreach($entity_menu as $entity_subkey=>$entity_submenu){
|
86
|
|
|
foreach($entity_submenu as $subkey=>$submenus){
|
87
|
|
|
if($submenus['module_url']==$current_menu_url){
|
88
|
|
|
$new_menu_info=$entity_menu;
|
89
|
|
|
}
|
90
|
|
|
}
|
91
|
|
|
}
|
92
|
|
|
}
|
93
|
|
|
foreach($new_menu_info as $key=>$value){
|
94
|
|
|
foreach($value as $subvalue){
|
95
|
|
|
$menu_info[$subvalue['menu_label']]=$subvalue['module_url'];
|
96
|
|
|
}
|
97
|
|
|
}
|
98
|
|
|
}
|
99
|
|
|
if($accountinfo['type']==0 || $accountinfo['type']==3){
|
100
|
|
|
if($uri_arr[0]=='user' && $uri_arr[1] =='user_myprofile' || $uri_arr[0]=='user' && $uri_arr[1]=='user_change_password'){
|
101
|
|
|
$menu_info=unserialize(CUSTOMERPROFILE_ARRAY);
|
102
|
|
|
}
|
103
|
|
|
}
|
104
|
|
|
if(!empty($menu_info)){
|
105
|
|
|
echo "<ul class='sidemenu'>";
|
106
|
|
|
$i=0;
|
107
|
|
|
foreach($menu_info as $key=>$value){
|
108
|
|
|
$url=($entity_name=='provider'||$entity_name =='customer' || $entity_name =='reseller' || $uri_arr[0] =="package") && isset($uri_arr[2]) && !empty($uri_arr[2])
|
109
|
|
|
?
|
110
|
|
|
base_url().$value.$uri_arr[2]."/" :
|
111
|
|
|
base_url().$value;
|
112
|
|
|
$value_flag=false;
|
113
|
|
|
if($acc_info['type'] == '3' || $acc_info['type'] == '0'){
|
114
|
|
|
if($value == "user/user_ipmap/" && $acc_info['allow_ip_management'] == '1'){
|
115
|
|
|
$value_flag=false;
|
116
|
|
|
}elseif(in_array('user/user_sipdevices/',$menu_info) && $value == "user/user_sipdevices/" && common_model::$global_config['system_config']['opensips']== 0){
|
117
|
|
|
$value_flag=false;
|
118
|
|
|
}else{
|
119
|
|
|
$value_flag=true;
|
120
|
|
|
}
|
121
|
|
|
}else{
|
122
|
|
View Code Duplication |
if(common_model::$global_config['system_config']['opensips'] == 1 ){
|
123
|
|
|
if($value != "accounts/".$entity_name."_opensips/"){
|
124
|
|
|
$value_flag=true;
|
125
|
|
|
}else{
|
126
|
|
|
$value_flag=false;
|
127
|
|
|
}
|
128
|
|
|
}
|
129
|
|
View Code Duplication |
if(common_model::$global_config['system_config']['opensips']== 0 ){
|
130
|
|
|
if($value != "accounts/".$entity_name."_sipdevices/"){
|
131
|
|
|
$value_flag=true;
|
132
|
|
|
}else{
|
133
|
|
|
$value_flag=false;
|
134
|
|
|
}
|
135
|
|
|
}
|
136
|
|
|
}
|
137
|
|
|
|
138
|
|
|
if($value_flag){
|
139
|
|
|
$class = ($value == $uri_arr[0]."/".$uri_arr[1]."/" ) ? 'active' : '';
|
140
|
|
|
if($i==0)
|
141
|
|
|
$class=($uri_arr[1]== $entity_name."_save") ? 'active': $class;
|
142
|
|
|
|
143
|
|
|
echo "<li class='$class'><a href ='$url'>$key</a></li>";
|
144
|
|
|
}
|
145
|
|
|
$i++;
|
146
|
|
|
}
|
147
|
|
|
echo "</ul>";
|
148
|
|
|
}
|
149
|
|
|
?>
|
150
|
|
|
</div>
|
151
|
|
|
<? start_block_marker('content') ?><? end_block_marker() ?>
|
152
|
|
|
|
153
|
|
|
|
154
|
|
|
<?php include('footer.php'); ?>
|
155
|
|
|
|
156
|
|
|
|
Short opening tags are disabled in PHP’s default configuration. In such a case, all content of this file is output verbatim to the browser without being parsed, or executed.
As a precaution to avoid these problems better use the long opening tag
<?php
.