@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
1 | +<?php if ( ! defined('BASEPATH')) { |
|
2 | + exit('No direct script access allowed'); |
|
3 | +} |
|
2 | 4 | |
3 | 5 | $_doctypes = array( |
4 | 6 | 'xhtml11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">', |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( ! defined('CRON')) exit('CLI script access allowed only'); |
|
1 | +<?php if ( ! defined('CRON')) { |
|
2 | + exit('CLI script access allowed only'); |
|
3 | +} |
|
2 | 4 | |
3 | 5 | /* |
4 | 6 | |-------------------------------------------------------------------------- |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
1 | +<?php if ( ! defined('BASEPATH')) { |
|
2 | + exit('No direct script access allowed'); |
|
3 | +} |
|
2 | 4 | /* |
3 | 5 | | ------------------------------------------------------------------- |
4 | 6 | | AUTO-LOADER |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | if(isset($user_header) && $user_header!='') { ?> |
11 | 11 | <? start_block_marker('page-title') ?><? end_block_marker() ?> | <?php echo $user_header; ?> |
12 | 12 | <?php |
13 | - }else{ ?> |
|
13 | + } else{ ?> |
|
14 | 14 | <? start_block_marker('page-title') ?><? end_block_marker() ?> | ASTPP - Open Source Voip Billing Solution |
15 | 15 | <?php |
16 | 16 | } |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | $color='#1A1919'; |
152 | 152 | } |
153 | 153 | $balance_str = '<span style="color:'.$color.'; font-size: 10px;"><b>('.$variable.' : '.$value.')</b></span>'; |
154 | - }else{ |
|
154 | + } else{ |
|
155 | 155 | $balance_str = ''; |
156 | 156 | } |
157 | 157 | |
@@ -223,11 +223,11 @@ discard block |
||
223 | 223 | if((common_model::$global_config['system_config']['paypal_status']== 1 && strtolower($sub_menu_lables["menu_label"]) =='recharge') ||(common_model::$global_config['system_config']['opensips']== 1 && $sub_menu_lables["menu_label"] =='Opensips')|| |
224 | 224 | (common_model::$global_config['system_config']['opensips']== 0 && $sub_menu_lables["menu_label"] =='SIP Devices') || |
225 | 225 | (($acc_info['type'] == '3' || $acc_info['type'] == '0') && $acc_info['allow_ip_management'] == '1' && strtolower($sub_menu_lables["menu_label"]) == 'ip settings')){ |
226 | - }else{?> |
|
226 | + } else{?> |
|
227 | 227 | <li><a href="<?php echo base_url().$sub_menu_lables["module_url"];?>"><?php echo gettext($sub_menu_lables["menu_label"]);?></a></li> |
228 | 228 | <?}?> |
229 | 229 | <?} ?> |
230 | - <?php }else{ |
|
230 | + <?php } else{ |
|
231 | 231 | if(common_model::$global_config['system_config']['opensips']==0 && $menu_key !='System Configuration'){ ?> |
232 | 232 | <li><a href=""><span><?=$sub_menu_key;?></span><i class="fa fa-caret-right pull-right"></i></a> |
233 | 233 | <? } if(common_model::$global_config['system_config']['opensips']==1) {?> |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | ? unserialize(CUSTOMEREDIT_ARRAY) :($uri_arr[0]=="accounts"&& $entity_name =='provider' |
77 | 77 | ? unserialize(PROVIDEREDIT_ARRAY) :($uri_arr[0]=="accounts"&& $entity_name =='reseller' |
78 | 78 | ? unserialize(RESELLEREDIT_ARRAY) : ($uri_arr[0] =="package" ? unserialize(PACKAGEEDIT_ARRAY):false) )))); |
79 | - }else{ |
|
79 | + } else{ |
|
80 | 80 | $menu_info=null; |
81 | 81 | $current_menu_url=$uri_arr[0]."/".$uri_arr[1]."/"; |
82 | 82 | $new_menu_info=array(); |
@@ -113,23 +113,23 @@ discard block |
||
113 | 113 | if($acc_info['type'] == '3' || $acc_info['type'] == '0'){ |
114 | 114 | if($value == "user/user_ipmap/" && $acc_info['allow_ip_management'] == '1'){ |
115 | 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){ |
|
116 | + } elseif(in_array('user/user_sipdevices/',$menu_info) && $value == "user/user_sipdevices/" && common_model::$global_config['system_config']['opensips']== 0){ |
|
117 | 117 | $value_flag=false; |
118 | - }else{ |
|
118 | + } else{ |
|
119 | 119 | $value_flag=true; |
120 | 120 | } |
121 | - }else{ |
|
121 | + } else{ |
|
122 | 122 | if(common_model::$global_config['system_config']['opensips'] == 1 ){ |
123 | 123 | if($value != "accounts/".$entity_name."_opensips/"){ |
124 | 124 | $value_flag=true; |
125 | - }else{ |
|
125 | + } else{ |
|
126 | 126 | $value_flag=false; |
127 | 127 | } |
128 | 128 | } |
129 | 129 | if(common_model::$global_config['system_config']['opensips']== 0 ){ |
130 | 130 | if($value != "accounts/".$entity_name."_sipdevices/"){ |
131 | 131 | $value_flag=true; |
132 | - }else{ |
|
132 | + } else{ |
|
133 | 133 | $value_flag=false; |
134 | 134 | } |
135 | 135 | } |
@@ -137,8 +137,9 @@ discard block |
||
137 | 137 | |
138 | 138 | if($value_flag){ |
139 | 139 | $class = ($value == $uri_arr[0]."/".$uri_arr[1]."/" ) ? 'active' : ''; |
140 | - if($i==0) |
|
141 | - $class=($uri_arr[1]== $entity_name."_save") ? 'active': $class; |
|
140 | + if($i==0) { |
|
141 | + $class=($uri_arr[1]== $entity_name."_save") ? 'active': $class; |
|
142 | + } |
|
142 | 143 | |
143 | 144 | echo "<li class='$class'><a href ='$url'>$key</a></li>"; |
144 | 145 | } |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | if($result->num_rows() > 0){ |
13 | 13 | $result=$result->result_array(); |
14 | 14 | $footer = $result[0]['website_footer']; |
15 | - }else{ |
|
15 | + } else{ |
|
16 | 16 | $footer = ''; |
17 | 17 | } |
18 | 18 | if($footer != ''){ ?> |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | <button class="btn no-padding" title="Français" id="close-image" type="button" name="fr_FR" value="fr_FR" onclick="get_lang('fr_FR')" ;=""><img style="width: 20px; height: 18px;vertical-align:top;" src="<?php echo base_url(); ?>assets/images/flags/france.png"></button> </div> |
25 | 25 | |
26 | 26 | </div> |
27 | - <?php }else{ |
|
27 | + <?php } else{ |
|
28 | 28 | if($this->session->userdata['logintype'] == 2){ ?> |
29 | 29 | <div class="pull-left col-md-3"> |
30 | 30 | <span>Powered by </span> |
@@ -51,11 +51,11 @@ discard block |
||
51 | 51 | <a href="mailto:[email protected]?subject=Feedback :&body=ASTPP" style=" margin-left: 7%; font-weight: bold; color: #216397;text-shadow: 0px 1px 1px #FFF;">FEEDBACK</a> |
52 | 52 | </span> |
53 | 53 | |
54 | - <?php }else{ |
|
54 | + <?php } else{ |
|
55 | 55 | $user_footer = $this->session->userdata('user_footer'); |
56 | 56 | if( $user_footer != '') { ?> |
57 | 57 | <div class="col-md-offset-4 col-md-4"><?=$user_footer ?> </div> |
58 | - <?}else{?> |
|
58 | + <?} else{?> |
|
59 | 59 | <div class="col-md-offset-4 col-md-4">Copyright @ <?php echo date("Y"); ?> <a style="color:#3989c0;" href="http://www.inextrix.com" target="_blank"> Inextrix Technologies Pvt. Ltd</a>. All Rights Reserved. |
60 | 60 | |
61 | 61 | </div> |
@@ -37,7 +37,9 @@ |
||
37 | 37 | { |
38 | 38 | public function load($file = 'config', $use_sections = FALSE, $fail_gracefully = FALSE, $_module = '') { |
39 | 39 | |
40 | - if (in_array($file, $this->is_loaded, TRUE)) return $this->item($file); |
|
40 | + if (in_array($file, $this->is_loaded, TRUE)) { |
|
41 | + return $this->item($file); |
|
42 | + } |
|
41 | 43 | |
42 | 44 | $_module OR $_module = CI::$APP->router->fetch_module(); |
43 | 45 | list($path, $file) = Modules::find($file, $_module, 'config/'); |
@@ -91,7 +91,9 @@ discard block |
||
91 | 91 | list($class) = CI::$APP->router->locate(explode('/', $module)); |
92 | 92 | |
93 | 93 | /* controller cannot be located */ |
94 | - if (empty($class)) return; |
|
94 | + if (empty($class)) { |
|
95 | + return; |
|
96 | + } |
|
95 | 97 | |
96 | 98 | /* set the module directory */ |
97 | 99 | $path = APPPATH.'controllers/'.CI::$APP->router->fetch_directory(); |
@@ -112,7 +114,9 @@ discard block |
||
112 | 114 | public static function autoload($class) { |
113 | 115 | |
114 | 116 | /* don't autoload CI_ prefixed classes or those using the config subclass_prefix */ |
115 | - if (strstr($class, 'CI_') OR strstr($class, config_item('subclass_prefix'))) return; |
|
117 | + if (strstr($class, 'CI_') OR strstr($class, config_item('subclass_prefix'))) { |
|
118 | + return; |
|
119 | + } |
|
116 | 120 | |
117 | 121 | /* autoload Modular Extensions MX core classes */ |
118 | 122 | if (strstr($class, 'MX_') AND is_file($location = dirname(__FILE__).'/'.substr($class, 3).EXT)) { |
@@ -150,8 +154,9 @@ discard block |
||
150 | 154 | /* load config or language array */ |
151 | 155 | include $location; |
152 | 156 | |
153 | - if ( ! isset($$type) OR ! is_array($$type)) |
|
154 | - show_error("{$location} does not contain a valid {$type} array"); |
|
157 | + if ( ! isset($$type) OR ! is_array($$type)) { |
|
158 | + show_error("{$location} does not contain a valid {$type} array"); |
|
159 | + } |
|
155 | 160 | |
156 | 161 | $result = $$type; |
157 | 162 | } |
@@ -183,10 +188,13 @@ discard block |
||
183 | 188 | foreach($modules as $module => $subpath) { |
184 | 189 | $fullpath = $location.$module.'/'.$base.$subpath; |
185 | 190 | |
186 | - if ($base == 'libraries/' AND is_file($fullpath.ucfirst($file_ext))) |
|
187 | - return array($fullpath, ucfirst($file)); |
|
191 | + if ($base == 'libraries/' AND is_file($fullpath.ucfirst($file_ext))) { |
|
192 | + return array($fullpath, ucfirst($file)); |
|
193 | + } |
|
188 | 194 | |
189 | - if (is_file($fullpath.$file_ext)) return array($fullpath, $file); |
|
195 | + if (is_file($fullpath.$file_ext)) { |
|
196 | + return array($fullpath, $file); |
|
197 | + } |
|
190 | 198 | } |
191 | 199 | } |
192 | 200 | |
@@ -198,11 +206,14 @@ discard block |
||
198 | 206 | |
199 | 207 | /* load the route file */ |
200 | 208 | if ( ! isset(self::$routes[$module])) { |
201 | - if (list($path) = self::find('routes', $module, 'config/') AND $path) |
|
202 | - self::$routes[$module] = self::load_file('routes', $path, 'route'); |
|
209 | + if (list($path) = self::find('routes', $module, 'config/') AND $path) { |
|
210 | + self::$routes[$module] = self::load_file('routes', $path, 'route'); |
|
211 | + } |
|
203 | 212 | } |
204 | 213 | |
205 | - if ( ! isset(self::$routes[$module])) return; |
|
214 | + if ( ! isset(self::$routes[$module])) { |
|
215 | + return; |
|
216 | + } |
|
206 | 217 | |
207 | 218 | /* parse module routes */ |
208 | 219 | foreach (self::$routes[$module] as $key => $val) { |
@@ -38,27 +38,34 @@ |
||
38 | 38 | public function load($langfile, $lang = '', $return = FALSE, $add_suffix = TRUE, $alt_path = '', $_module = '') { |
39 | 39 | |
40 | 40 | if (is_array($langfile)) { |
41 | - foreach($langfile as $_lang) $this->load($_lang); |
|
41 | + foreach($langfile as $_lang) { |
|
42 | + $this->load($_lang); |
|
43 | + } |
|
42 | 44 | return $this->language; |
43 | 45 | } |
44 | 46 | |
45 | 47 | $deft_lang = CI::$APP->config->item('language'); |
46 | 48 | $idiom = ($lang == '') ? $deft_lang : $lang; |
47 | 49 | |
48 | - if (in_array($langfile.'_lang'.EXT, $this->is_loaded, TRUE)) |
|
49 | - return $this->language; |
|
50 | + if (in_array($langfile.'_lang'.EXT, $this->is_loaded, TRUE)) { |
|
51 | + return $this->language; |
|
52 | + } |
|
50 | 53 | |
51 | 54 | $_module OR $_module = CI::$APP->router->fetch_module(); |
52 | 55 | list($path, $_langfile) = Modules::find($langfile.'_lang', $_module, 'language/'.$idiom.'/'); |
53 | 56 | |
54 | 57 | if ($path === FALSE) { |
55 | 58 | |
56 | - if ($lang = parent::load($langfile, $lang, $return, $add_suffix, $alt_path)) return $lang; |
|
59 | + if ($lang = parent::load($langfile, $lang, $return, $add_suffix, $alt_path)) { |
|
60 | + return $lang; |
|
61 | + } |
|
57 | 62 | |
58 | 63 | } else { |
59 | 64 | |
60 | 65 | if($lang = Modules::load_file($_langfile, $path, 'lang')) { |
61 | - if ($return) return $lang; |
|
66 | + if ($return) { |
|
67 | + return $lang; |
|
68 | + } |
|
62 | 69 | $this->language = array_merge($this->language, $lang); |
63 | 70 | $this->is_loaded[] = $langfile.'_lang'.EXT; |
64 | 71 | unset($lang); |