@@ -20,20 +20,20 @@ |
||
20 | 20 | // You should have received a copy of the GNU Affero General Public License |
21 | 21 | // along with this program. If not, see <http://www.gnu.org/licenses/>. |
22 | 22 | // ############################################################################## |
23 | -if (! defined ( 'BASEPATH' )) |
|
24 | - exit ( 'No direct script access allowed' ); |
|
23 | +if ( ! defined('BASEPATH')) |
|
24 | + exit ('No direct script access allowed'); |
|
25 | 25 | |
26 | 26 | /** |
27 | 27 | * Dynamically build forms for display |
28 | 28 | */ |
29 | 29 | class Global_locale { |
30 | 30 | function __construct($library_name = '') { |
31 | - $this->CI = & get_instance (); |
|
32 | - header ( "Expires: Tue, 01 Jan 2000 00:00:00 GMT" ); |
|
33 | - header ( "Last-Modified: " . gmdate ( "D, d M Y H:i:s" ) . " GMT" ); |
|
34 | - header ( "Cache-Control: no-store, no-cache, must-revalidate, max-age=0" ); |
|
35 | - header ( "Cache-Control: post-check=0, pre-check=0", false ); |
|
36 | - header ( "Pragma: no-cache" ); |
|
31 | + $this->CI = & get_instance(); |
|
32 | + header("Expires: Tue, 01 Jan 2000 00:00:00 GMT"); |
|
33 | + header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); |
|
34 | + header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0"); |
|
35 | + header("Cache-Control: post-check=0, pre-check=0", false); |
|
36 | + header("Pragma: no-cache"); |
|
37 | 37 | } |
38 | 38 | } |
39 | 39 | ?> |
@@ -20,8 +20,9 @@ |
||
20 | 20 | // You should have received a copy of the GNU Affero General Public License |
21 | 21 | // along with this program. If not, see <http://www.gnu.org/licenses/>. |
22 | 22 | // ############################################################################## |
23 | -if (! defined ( 'BASEPATH' )) |
|
23 | +if (! defined ( 'BASEPATH' )) { |
|
24 | 24 | exit ( 'No direct script access allowed' ); |
25 | +} |
|
25 | 26 | |
26 | 27 | /** |
27 | 28 | * Dynamically build forms for display |
@@ -75,7 +75,7 @@ |
||
75 | 75 | } |
76 | 76 | |
77 | 77 | if ($contentlength > 0) { // is contentlength set |
78 | - // stop reading if all content has been read. |
|
78 | + // stop reading if all content has been read. |
|
79 | 79 | if (strlen ( $response ) >= $contentlength) { |
80 | 80 | break; |
81 | 81 | } |
@@ -20,22 +20,22 @@ discard block |
||
20 | 20 | // You should have received a copy of the GNU Affero General Public License |
21 | 21 | // along with this program. If not, see <http://www.gnu.org/licenses/>. |
22 | 22 | // ############################################################################## |
23 | -if (! defined ( 'BASEPATH' )) { |
|
24 | - exit ( 'No direct script access allowed' ); |
|
23 | +if ( ! defined('BASEPATH')) { |
|
24 | + exit ('No direct script access allowed'); |
|
25 | 25 | } |
26 | 26 | class freeswitch_lib { |
27 | 27 | function event_socket_create($host = '127.0.0.1', $port = '8021', $password = 'ClueCon') { |
28 | - $fp = @fsockopen ( $host, $port, $errno, $errdesc ); |
|
28 | + $fp = @fsockopen($host, $port, $errno, $errdesc); |
|
29 | 29 | // or die("Connection to $host failed"); |
30 | 30 | // socket_set_blocking($fp,false); |
31 | 31 | |
32 | 32 | if ($fp) { |
33 | - socket_set_blocking ( $fp, false ); |
|
34 | - while ( ! feof ( $fp ) ) { |
|
35 | - $buffer = fgets ( $fp, 1024 ); |
|
36 | - usleep ( 100 ); // allow time for reponse |
|
37 | - if (trim ( $buffer ) == "Content-Type: auth/request") { |
|
38 | - fputs ( $fp, "auth $password\n\n" ); |
|
33 | + socket_set_blocking($fp, false); |
|
34 | + while ( ! feof($fp)) { |
|
35 | + $buffer = fgets($fp, 1024); |
|
36 | + usleep(100); // allow time for reponse |
|
37 | + if (trim($buffer) == "Content-Type: auth/request") { |
|
38 | + fputs($fp, "auth $password\n\n"); |
|
39 | 39 | break; |
40 | 40 | } |
41 | 41 | } |
@@ -46,28 +46,28 @@ discard block |
||
46 | 46 | } |
47 | 47 | function event_socket_request($fp, $cmd) { |
48 | 48 | if ($fp) { |
49 | - fputs ( $fp, $cmd . "\n\n" ); |
|
50 | - usleep ( 100 ); // allow time for reponse |
|
49 | + fputs($fp, $cmd."\n\n"); |
|
50 | + usleep(100); // allow time for reponse |
|
51 | 51 | |
52 | 52 | $response = ""; |
53 | 53 | $i = 0; |
54 | 54 | $contentlength = 0; |
55 | - while ( ! feof ( $fp ) ) { |
|
56 | - $buffer = fgets ( $fp, 4096 ); |
|
55 | + while ( ! feof($fp)) { |
|
56 | + $buffer = fgets($fp, 4096); |
|
57 | 57 | if ($contentlength > 0) { |
58 | 58 | $response .= $buffer; |
59 | 59 | } |
60 | 60 | |
61 | 61 | if ($contentlength == 0) { // if contentlenght is already don't process again |
62 | - if (strlen ( trim ( $buffer ) ) > 0) { // run only if buffer has content |
|
63 | - $temparray = explode ( ":", trim ( $buffer ) ); |
|
62 | + if (strlen(trim($buffer)) > 0) { // run only if buffer has content |
|
63 | + $temparray = explode(":", trim($buffer)); |
|
64 | 64 | if ($temparray [0] == "Content-Length") { |
65 | - $contentlength = trim ( $temparray [1] ); |
|
65 | + $contentlength = trim($temparray [1]); |
|
66 | 66 | } |
67 | 67 | } |
68 | 68 | } |
69 | 69 | |
70 | - usleep ( 100 ); // allow time for reponse |
|
70 | + usleep(100); // allow time for reponse |
|
71 | 71 | |
72 | 72 | // optional because of script timeout //don't let while loop become endless |
73 | 73 | if ($i > 10000) { |
@@ -76,11 +76,11 @@ discard block |
||
76 | 76 | |
77 | 77 | if ($contentlength > 0) { // is contentlength set |
78 | 78 | // stop reading if all content has been read. |
79 | - if (strlen ( $response ) >= $contentlength) { |
|
79 | + if (strlen($response) >= $contentlength) { |
|
80 | 80 | break; |
81 | 81 | } |
82 | 82 | } |
83 | - $i ++; |
|
83 | + $i++; |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | return $response; |
@@ -20,24 +20,24 @@ |
||
20 | 20 | // You should have received a copy of the GNU Affero General Public License |
21 | 21 | // along with this program. If not, see <http://www.gnu.org/licenses/>. |
22 | 22 | // ############################################################################## |
23 | -if (! defined ( 'BASEPATH' )) |
|
24 | - exit ( 'No direct script access allowed' ); |
|
23 | +if ( ! defined('BASEPATH')) |
|
24 | + exit ('No direct script access allowed'); |
|
25 | 25 | |
26 | 26 | /** |
27 | 27 | * Dynamically build forms for display |
28 | 28 | */ |
29 | 29 | class locale_Menu { |
30 | 30 | function __construct($library_name = '') { |
31 | - $this->CI = & get_instance (); |
|
32 | - $this->CI->load->model ( 'db_model' ); |
|
33 | - $this->CI->load->library ( 'email' ); |
|
34 | - $this->CI->load->library ( 'session' ); |
|
35 | - $current_locale = $this->CI->session->userdata ( 'user_language' ); |
|
36 | - putenv ( "LC_ALL=$current_locale" ); |
|
37 | - setlocale ( LC_ALL, $current_locale ); |
|
38 | - bindtextdomain ( WEBSITE_DOMAIN, FCPATH . '/application/modules/dashboard/language' ); |
|
39 | - bind_textdomain_codeset ( WEBSITE_DOMAIN, 'UTF-8' ); |
|
40 | - textdomain ( WEBSITE_DOMAIN ); |
|
31 | + $this->CI = & get_instance(); |
|
32 | + $this->CI->load->model('db_model'); |
|
33 | + $this->CI->load->library('email'); |
|
34 | + $this->CI->load->library('session'); |
|
35 | + $current_locale = $this->CI->session->userdata('user_language'); |
|
36 | + putenv("LC_ALL=$current_locale"); |
|
37 | + setlocale(LC_ALL, $current_locale); |
|
38 | + bindtextdomain(WEBSITE_DOMAIN, FCPATH.'/application/modules/dashboard/language'); |
|
39 | + bind_textdomain_codeset(WEBSITE_DOMAIN, 'UTF-8'); |
|
40 | + textdomain(WEBSITE_DOMAIN); |
|
41 | 41 | } |
42 | 42 | } |
43 | 43 |
@@ -20,8 +20,9 @@ |
||
20 | 20 | // You should have received a copy of the GNU Affero General Public License |
21 | 21 | // along with this program. If not, see <http://www.gnu.org/licenses/>. |
22 | 22 | // ############################################################################## |
23 | -if (! defined ( 'BASEPATH' )) |
|
23 | +if (! defined ( 'BASEPATH' )) { |
|
24 | 24 | exit ( 'No direct script access allowed' ); |
25 | +} |
|
25 | 26 | |
26 | 27 | /** |
27 | 28 | * Dynamically build forms for display |
@@ -3,17 +3,17 @@ |
||
3 | 3 | if (! defined ( 'BASEPATH' )) |
4 | 4 | exit ( 'No direct script access allowed' ); |
5 | 5 | /** |
6 | - * CSVReader Class |
|
7 | - * |
|
8 | - * $Id: csvreader.php 147 2007-07-09 23:12:45Z Pierre-Jean $ |
|
9 | - * |
|
10 | - * Allows to retrieve a CSV file content as a two dimensional array. |
|
11 | - * The first text line shall contains the column names. |
|
12 | - * |
|
13 | - * @author Pierre-Jean Turpeau |
|
14 | - * @link http://www.codeigniter.com/wiki/CSVReader |
|
15 | - * |
|
16 | - */ |
|
6 | + * CSVReader Class |
|
7 | + * |
|
8 | + * $Id: csvreader.php 147 2007-07-09 23:12:45Z Pierre-Jean $ |
|
9 | + * |
|
10 | + * Allows to retrieve a CSV file content as a two dimensional array. |
|
11 | + * The first text line shall contains the column names. |
|
12 | + * |
|
13 | + * @author Pierre-Jean Turpeau |
|
14 | + * @link http://www.codeigniter.com/wiki/CSVReader |
|
15 | + * |
|
16 | + */ |
|
17 | 17 | class CSVReader { |
18 | 18 | var $fields; |
19 | 19 | /** |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (! defined ( 'BASEPATH' )) |
|
4 | - exit ( 'No direct script access allowed' ); |
|
3 | +if ( ! defined('BASEPATH')) |
|
4 | + exit ('No direct script access allowed'); |
|
5 | 5 | /** |
6 | 6 | * CSVReader Class |
7 | 7 | * |
@@ -33,8 +33,8 @@ discard block |
||
33 | 33 | * @return array |
34 | 34 | */ |
35 | 35 | function parse_text($p_Text) { |
36 | - $lines = explode ( "\n", $p_Text ); |
|
37 | - return $this->parse_lines ( $lines ); |
|
36 | + $lines = explode("\n", $p_Text); |
|
37 | + return $this->parse_lines($lines); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
@@ -46,19 +46,19 @@ discard block |
||
46 | 46 | * @return array |
47 | 47 | */ |
48 | 48 | function parse_file($p_Filepath, $config_variable, $check_header_flag = false) { |
49 | - $lines = file ( $p_Filepath ); |
|
49 | + $lines = file($p_Filepath); |
|
50 | 50 | // Giving line numbers |
51 | - for($i = 0; $i < sizeof ( $lines ); $i ++) { |
|
51 | + for ($i = 0; $i < sizeof($lines); $i++) { |
|
52 | 52 | |
53 | - if (trim ( $lines [$i] ) != "") { |
|
54 | - $columnname = explode ( $this->separator, $lines [$i] ); |
|
55 | - for($i = 0; $i < sizeof ( $columnname ); $i ++) { |
|
53 | + if (trim($lines [$i]) != "") { |
|
54 | + $columnname = explode($this->separator, $lines [$i]); |
|
55 | + for ($i = 0; $i < sizeof($columnname); $i++) { |
|
56 | 56 | $columnname [$i] = $columnname [$i]; |
57 | 57 | } |
58 | 58 | break; |
59 | 59 | } |
60 | 60 | } |
61 | - return $this->parse_lines ( $lines, $config_variable, $check_header_flag ); |
|
61 | + return $this->parse_lines($lines, $config_variable, $check_header_flag); |
|
62 | 62 | } |
63 | 63 | /** |
64 | 64 | * Parse an array of text lines containing CSV formatted data. |
@@ -71,40 +71,40 @@ discard block |
||
71 | 71 | function parse_lines($p_CSVLines, $config_variable, $check_header_flag = false) { |
72 | 72 | // echo "<pre>"; |
73 | 73 | $t = 0; |
74 | - $content = array (); |
|
75 | - $custom_array = array (); |
|
74 | + $content = array(); |
|
75 | + $custom_array = array(); |
|
76 | 76 | $i = 0; |
77 | 77 | $flag_data = false; |
78 | 78 | $data_arr [0] = $config_variable; |
79 | - $field_name_arr = array_keys ( $config_variable ); |
|
80 | - foreach ( $p_CSVLines as $line_num => $line ) { |
|
81 | - $line = trim ( $line ); |
|
82 | - if (! empty ( $line )) { |
|
79 | + $field_name_arr = array_keys($config_variable); |
|
80 | + foreach ($p_CSVLines as $line_num => $line) { |
|
81 | + $line = trim($line); |
|
82 | + if ( ! empty ($line)) { |
|
83 | 83 | // skip empty lines |
84 | - $elements = explode ( $this->separator, $line ); |
|
84 | + $elements = explode($this->separator, $line); |
|
85 | 85 | |
86 | - if (array_filter ( $elements, 'trim' )) { |
|
86 | + if (array_filter($elements, 'trim')) { |
|
87 | 87 | $custom_array [] = $elements; |
88 | 88 | } |
89 | - $i ++; |
|
89 | + $i++; |
|
90 | 90 | } |
91 | 91 | } |
92 | 92 | |
93 | 93 | if ($check_header_flag == 'on') { |
94 | - unset ( $custom_array [0] ); |
|
94 | + unset ($custom_array [0]); |
|
95 | 95 | } |
96 | - foreach ( $custom_array as $data ) { |
|
96 | + foreach ($custom_array as $data) { |
|
97 | 97 | $j = 0; |
98 | - foreach ( $data as $key => $value ) { |
|
99 | - $value = str_replace ( '"', '', $value ); |
|
100 | - $value = str_replace ( "'", '', $value ); |
|
101 | - if (isset ( $field_name_arr [$j] )) { |
|
98 | + foreach ($data as $key => $value) { |
|
99 | + $value = str_replace('"', '', $value); |
|
100 | + $value = str_replace("'", '', $value); |
|
101 | + if (isset ($field_name_arr [$j])) { |
|
102 | 102 | $field_key_value = $config_variable [$field_name_arr [$j]]; |
103 | - $value = strip_slashes ( trim ( $value ) ); |
|
104 | - $value = preg_replace ( '#<script.*</script>#is', '', $value ); |
|
105 | - if (isset ( $field_key_value ) && ! empty ( $field_key_value )) |
|
106 | - $content [$field_key_value] = strip_tags ( filter_var ( $value, FILTER_SANITIZE_STRING ) ); |
|
107 | - $j ++; |
|
103 | + $value = strip_slashes(trim($value)); |
|
104 | + $value = preg_replace('#<script.*</script>#is', '', $value); |
|
105 | + if (isset ($field_key_value) && ! empty ($field_key_value)) |
|
106 | + $content [$field_key_value] = strip_tags(filter_var($value, FILTER_SANITIZE_STRING)); |
|
107 | + $j++; |
|
108 | 108 | } |
109 | 109 | } |
110 | 110 | $data_arr [] = $content; |
@@ -1,7 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (! defined ( 'BASEPATH' )) |
|
3 | +if (! defined ( 'BASEPATH' )) { |
|
4 | 4 | exit ( 'No direct script access allowed' ); |
5 | +} |
|
5 | 6 | /** |
6 | 7 | * CSVReader Class |
7 | 8 | * |
@@ -102,8 +103,9 @@ discard block |
||
102 | 103 | $field_key_value = $config_variable [$field_name_arr [$j]]; |
103 | 104 | $value = strip_slashes ( trim ( $value ) ); |
104 | 105 | $value = preg_replace ( '#<script.*</script>#is', '', $value ); |
105 | - if (isset ( $field_key_value ) && ! empty ( $field_key_value )) |
|
106 | - $content [$field_key_value] = strip_tags ( filter_var ( $value, FILTER_SANITIZE_STRING ) ); |
|
106 | + if (isset ( $field_key_value ) && ! empty ( $field_key_value )) { |
|
107 | + $content [$field_key_value] = strip_tags ( filter_var ( $value, FILTER_SANITIZE_STRING ) ); |
|
108 | + } |
|
107 | 109 | $j ++; |
108 | 110 | } |
109 | 111 | } |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (! defined ( 'BASEPATH' )) { |
|
4 | - exit ( 'No direct script access allowed' ); |
|
3 | +if ( ! defined('BASEPATH')) { |
|
4 | + exit ('No direct script access allowed'); |
|
5 | 5 | } |
6 | 6 | /** |
7 | 7 | * |
@@ -16,9 +16,9 @@ discard block |
||
16 | 16 | // -------------------------------------------------------------------- |
17 | 17 | var $CI; |
18 | 18 | function __construct() { |
19 | - parent::__construct (); |
|
20 | - $this->CI = & get_instance (); |
|
21 | - $this->CI->load->library ( 'user_agent' ); |
|
19 | + parent::__construct(); |
|
20 | + $this->CI = & get_instance(); |
|
21 | + $this->CI->load->library('user_agent'); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | /** |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * @return bool |
36 | 36 | */ |
37 | 37 | public function write_log($level = 'info', $msg, $php_error = FALSE) { |
38 | - $level = strtoupper ( $level ); |
|
38 | + $level = strtoupper($level); |
|
39 | 39 | |
40 | 40 | // if ( ! isset($this->_levels[$level]) OR ($this->_levels[$level] > $this->_threshold)) |
41 | 41 | // if($this->CI->config->item('api_debug_log') == FALSE) |
@@ -43,21 +43,21 @@ discard block |
||
43 | 43 | return FALSE; |
44 | 44 | } |
45 | 45 | |
46 | - $filepath = Common_model::$global_config ['system_config'] ['log_path'] . 'api_' . date ( 'Y-m-d' ) . '.log'; |
|
46 | + $filepath = Common_model::$global_config ['system_config'] ['log_path'].'api_'.date('Y-m-d').'.log'; |
|
47 | 47 | $message = ''; |
48 | 48 | |
49 | - if (! $fp = @fopen ( $filepath, FOPEN_WRITE_CREATE )) { |
|
49 | + if ( ! $fp = @fopen($filepath, FOPEN_WRITE_CREATE)) { |
|
50 | 50 | return FALSE; |
51 | 51 | } |
52 | 52 | |
53 | - $message .= "[" . date ( $this->_date_fmt ) . "] [" . $this->CI->input->ip_address () . "] [" . $_SERVER ['HTTP_USER_AGENT'] . "] [" . $level . "] " . $msg . "\n"; |
|
53 | + $message .= "[".date($this->_date_fmt)."] [".$this->CI->input->ip_address()."] [".$_SERVER ['HTTP_USER_AGENT']."] [".$level."] ".$msg."\n"; |
|
54 | 54 | |
55 | - flock ( $fp, LOCK_EX ); |
|
56 | - fwrite ( $fp, $message ); |
|
57 | - flock ( $fp, LOCK_UN ); |
|
58 | - fclose ( $fp ); |
|
55 | + flock($fp, LOCK_EX); |
|
56 | + fwrite($fp, $message); |
|
57 | + flock($fp, LOCK_UN); |
|
58 | + fclose($fp); |
|
59 | 59 | |
60 | - @chmod ( $filepath, FILE_WRITE_MODE ); |
|
60 | + @chmod($filepath, FILE_WRITE_MODE); |
|
61 | 61 | return TRUE; |
62 | 62 | } |
63 | 63 | } |
@@ -6,7 +6,7 @@ |
||
6 | 6 | <div class="padding-b-10 col-md-12 no-padding"> |
7 | 7 | |
8 | 8 | <?php |
9 | - $this->db->select('*'); |
|
9 | + $this->db->select('*'); |
|
10 | 10 | $this->db->where('domain',$_SERVER['HTTP_HOST']); |
11 | 11 | $result=$this->db->get('invoice_conf'); |
12 | 12 | if($result->num_rows() > 0){ |
@@ -7,15 +7,15 @@ discard block |
||
7 | 7 | |
8 | 8 | <?php |
9 | 9 | $this->db->select('*'); |
10 | - $this->db->where('domain',$_SERVER['HTTP_HOST']); |
|
11 | - $result=$this->db->get('invoice_conf'); |
|
12 | - if($result->num_rows() > 0){ |
|
13 | - $result=$result->result_array(); |
|
10 | + $this->db->where('domain', $_SERVER['HTTP_HOST']); |
|
11 | + $result = $this->db->get('invoice_conf'); |
|
12 | + if ($result->num_rows() > 0) { |
|
13 | + $result = $result->result_array(); |
|
14 | 14 | $footer = $result[0]['website_footer']; |
15 | - }else{ |
|
15 | + } else { |
|
16 | 16 | $footer = ''; |
17 | 17 | } |
18 | - if($footer != '' && ($this->session->userdata['logintype'] == 2 || $this->session->userdata['logintype'] ==-1)){ ?> |
|
18 | + if ($footer != '' && ($this->session->userdata['logintype'] == 2 || $this->session->userdata['logintype'] == -1)) { ?> |
|
19 | 19 | <div class="pull-left col-md-3"> |
20 | 20 | <span><?php echo gettext("Powered by")?> </span> |
21 | 21 | <a href="http://www.astppbilling.org" target="_blank"> |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | |
41 | 41 | <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>--> |
42 | 42 | </span> |
43 | - <?php } else if($this->session->userdata['logintype'] ==0 || $this->session->userdata['logintype'] == 1){ |
|
43 | + <?php } else if ($this->session->userdata['logintype'] == 0 || $this->session->userdata['logintype'] == 1) { |
|
44 | 44 | |
45 | 45 | $user_footer = $this->session->userdata('user_footer'); |
46 | 46 | if ($user_footer != '') { |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | |
53 | 53 | </div> |
54 | 54 | |
55 | - <? } } else{ ?> |
|
55 | + <? } } else { ?> |
|
56 | 56 | <div class="pull-left col-md-3"> |
57 | 57 | <span><?php echo gettext('Powered by')?> </span> |
58 | 58 | <a href="http://www.astppbilling.org" target="_blank"> |
@@ -12,7 +12,7 @@ |
||
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 != '' && ($this->session->userdata['logintype'] == 2 || $this->session->userdata['logintype'] ==-1)){ ?> |
@@ -61,92 +61,91 @@ |
||
61 | 61 | <div class="sidebar collapse"> |
62 | 62 | |
63 | 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; |
|
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 | 70 | } |
71 | 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; |
|
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 | 89 | } |
90 | 90 | } |
91 | 91 | } |
92 | 92 | } |
93 | - foreach($new_menu_info as $key=>$value){ |
|
94 | - foreach($value as $subvalue){ |
|
95 | - $menu_info[$subvalue['menu_label']]=$subvalue['module_url']; |
|
93 | + foreach ($new_menu_info as $key=>$value) { |
|
94 | + foreach ($value as $subvalue) { |
|
95 | + $menu_info[$subvalue['menu_label']] = $subvalue['module_url']; |
|
96 | 96 | } |
97 | 97 | } |
98 | 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); |
|
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 | 102 | } |
103 | 103 | } |
104 | - if(!empty($menu_info)){ |
|
104 | + if ( ! empty($menu_info)) { |
|
105 | 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]) |
|
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 | 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; |
|
110 | + base_url().$value.$uri_arr[2]."/" : base_url().$value; |
|
111 | + $value_flag = false; |
|
112 | + if ($acc_info['type'] == '3' || $acc_info['type'] == '0') { |
|
113 | + if ($value == "user/user_ipmap/" && $acc_info['allow_ip_management'] == '1') { |
|
114 | + $value_flag = false; |
|
115 | + }elseif (in_array('user/user_sipdevices/', $menu_info) && $value == "user/user_sipdevices/" && common_model::$global_config['system_config']['opensips'] == 0) { |
|
116 | + $value_flag = false; |
|
117 | + } else { |
|
118 | + $value_flag = true; |
|
120 | 119 | } |
121 | - }else{ |
|
122 | - 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; |
|
120 | + } else { |
|
121 | + if (common_model::$global_config['system_config']['opensips'] == 1) { |
|
122 | + if ($value != "accounts/".$entity_name."_opensips/") { |
|
123 | + $value_flag = true; |
|
124 | + } else { |
|
125 | + $value_flag = false; |
|
127 | 126 | } |
128 | 127 | } |
129 | - 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; |
|
128 | + if (common_model::$global_config['system_config']['opensips'] == 0) { |
|
129 | + if ($value != "accounts/".$entity_name."_sipdevices/") { |
|
130 | + $value_flag = true; |
|
131 | + } else { |
|
132 | + $value_flag = false; |
|
134 | 133 | } |
135 | 134 | } |
136 | - if(common_model::$global_config['system_config']['enterprise'] == 0 ){ |
|
137 | - if(common_model::$global_config['system_config']['opensips']== 0 && $value == "accounts/".$entity_name."_sipdevices/"){ |
|
138 | - $value_flag=true; |
|
135 | + if (common_model::$global_config['system_config']['enterprise'] == 0) { |
|
136 | + if (common_model::$global_config['system_config']['opensips'] == 0 && $value == "accounts/".$entity_name."_sipdevices/") { |
|
137 | + $value_flag = true; |
|
139 | 138 | } |
140 | - if(common_model::$global_config['system_config']['opensips']== 0 && $value == "accounts/".$entity_name."_opensips/"){ |
|
141 | - $value_flag=false; |
|
139 | + if (common_model::$global_config['system_config']['opensips'] == 0 && $value == "accounts/".$entity_name."_opensips/") { |
|
140 | + $value_flag = false; |
|
142 | 141 | } |
143 | 142 | } |
144 | 143 | } |
145 | 144 | |
146 | - if($value_flag){ |
|
147 | - $class = ($value == $uri_arr[0]."/".$uri_arr[1]."/" ) ? 'active' : ''; |
|
148 | - if($i==0) |
|
149 | - $class=($uri_arr[1]== $entity_name."_save") ? 'active': $class; |
|
145 | + if ($value_flag) { |
|
146 | + $class = ($value == $uri_arr[0]."/".$uri_arr[1]."/") ? 'active' : ''; |
|
147 | + if ($i == 0) |
|
148 | + $class = ($uri_arr[1] == $entity_name."_save") ? 'active' : $class; |
|
150 | 149 | |
151 | 150 | echo "<li class='$class'><a href ='$url'>".gettext($key)."</a></li>"; |
152 | 151 | } |
@@ -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 | } |
@@ -145,8 +145,9 @@ discard block |
||
145 | 145 | |
146 | 146 | if($value_flag){ |
147 | 147 | $class = ($value == $uri_arr[0]."/".$uri_arr[1]."/" ) ? 'active' : ''; |
148 | - if($i==0) |
|
149 | - $class=($uri_arr[1]== $entity_name."_save") ? 'active': $class; |
|
148 | + if($i==0) { |
|
149 | + $class=($uri_arr[1]== $entity_name."_save") ? 'active': $class; |
|
150 | + } |
|
150 | 151 | |
151 | 152 | echo "<li class='$class'><a href ='$url'>".gettext($key)."</a></li>"; |
152 | 153 | } |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | ?> |
18 | 18 | </title> |
19 | 19 | <?php $user_favicon = $this->session->userdata('user_favicon'); ?> |
20 | -<?php if($user_favicon) { ?> |
|
20 | +<?php if ($user_favicon) { ?> |
|
21 | 21 | <link rel="icon" href="<? echo base_url(); ?>upload/<? echo $user_favicon ?>"/> |
22 | 22 | <?php } else { ?> |
23 | 23 | <link rel="icon" href="<? echo base_url(); ?>assets/images/favicon.ico"/> |
@@ -137,65 +137,65 @@ discard block |
||
137 | 137 | <li> |
138 | 138 | |
139 | 139 | <?php |
140 | - $acc_info=$this->session->userdata('accountinfo'); |
|
141 | - if($this->session->userdata('userlevel_logintype') != '0'){?> |
|
142 | - <a href="<?php echo base_url();?>dashboard/" class=""> <? } else{?> |
|
143 | - <a href="<?php echo base_url();?>user/user/" class=""> |
|
140 | + $acc_info = $this->session->userdata('accountinfo'); |
|
141 | + if ($this->session->userdata('userlevel_logintype') != '0') {?> |
|
142 | + <a href="<?php echo base_url(); ?>dashboard/" class=""> <? } else {?> |
|
143 | + <a href="<?php echo base_url(); ?>user/user/" class=""> |
|
144 | 144 | <? } |
145 | - if($this->session->userdata('logintype')!=2 && $this->session->userdata('logintype')!=4){ |
|
146 | - $result=(array)$this->db->get_where('accounts',array("id"=>$acc_info['id']),1)->first_row(); |
|
147 | - $variable =$result['posttoexternal']==1 ? 'Credit' : gettext('Bal'); |
|
148 | - $amount=$result['posttoexternal']==1 ? $result['credit_limit']-$result['balance'] :$result['balance']; |
|
145 | + if ($this->session->userdata('logintype') != 2 && $this->session->userdata('logintype') != 4) { |
|
146 | + $result = (array)$this->db->get_where('accounts', array("id"=>$acc_info['id']), 1)->first_row(); |
|
147 | + $variable = $result['posttoexternal'] == 1 ? 'Credit' : gettext('Bal'); |
|
148 | + $amount = $result['posttoexternal'] == 1 ? $result['credit_limit'] - $result['balance'] : $result['balance']; |
|
149 | 149 | |
150 | 150 | |
151 | - $value= $this->common_model->calculate_currency($amount,'','',true); |
|
152 | - if($value >0){ |
|
153 | - $color='#397A13'; |
|
151 | + $value = $this->common_model->calculate_currency($amount, '', '', true); |
|
152 | + if ($value > 0) { |
|
153 | + $color = '#397A13'; |
|
154 | 154 | } |
155 | - if($value < 0){ |
|
156 | - $color='#EE0E43'; |
|
155 | + if ($value < 0) { |
|
156 | + $color = '#EE0E43'; |
|
157 | 157 | } |
158 | - if($value == 0){ |
|
159 | - $color='#1A1919'; |
|
158 | + if ($value == 0) { |
|
159 | + $color = '#1A1919'; |
|
160 | 160 | } |
161 | 161 | $balance_str = '<span style="color:'.$color.'; font-size: 10px;"><b>('.$variable.' : '.$value.')</b></span>'; |
162 | - }else{ |
|
162 | + } else { |
|
163 | 163 | $balance_str = ''; |
164 | 164 | } |
165 | 165 | |
166 | - $logged_user=$acc_info['first_name']." ".$acc_info['last_name']; |
|
166 | + $logged_user = $acc_info['first_name']." ".$acc_info['last_name']; |
|
167 | 167 | ?> |
168 | 168 | <span> |
169 | 169 | <span class="profile_name"> |
170 | 170 | <?= $logged_user?> |
171 | 171 | </span> |
172 | - <label class="profile_label no-margin"><?php echo $balance_str;?> |
|
172 | + <label class="profile_label no-margin"><?php echo $balance_str; ?> |
|
173 | 173 | </label> |
174 | 174 | </span> |
175 | 175 | </a> |
176 | 176 | <ul class="dropdown-box"> |
177 | - <? if($this->session->userdata('userlevel_logintype') != '0' && $this->session->userdata('userlevel_logintype') != '3'){?> |
|
178 | - <li><a href="<?php echo base_url();?>dashboard/"><i class="fa fa-home"></i> <?php echo gettext('Dashboard'); ?></a></li> |
|
179 | - <? } else{?> |
|
180 | - <li><a href="<?php echo base_url();?>user/user/"><i class="fa fa-home"></i> <?php echo gettext('Dashboard'); ?></a></li> |
|
177 | + <? if ($this->session->userdata('userlevel_logintype') != '0' && $this->session->userdata('userlevel_logintype') != '3') {?> |
|
178 | + <li><a href="<?php echo base_url(); ?>dashboard/"><i class="fa fa-home"></i> <?php echo gettext('Dashboard'); ?></a></li> |
|
179 | + <? } else {?> |
|
180 | + <li><a href="<?php echo base_url(); ?>user/user/"><i class="fa fa-home"></i> <?php echo gettext('Dashboard'); ?></a></li> |
|
181 | 181 | <? }?> |
182 | 182 | |
183 | -<? if($this->session->userdata('userlevel_logintype') != '-1'){ |
|
183 | +<? if ($this->session->userdata('userlevel_logintype') != '-1') { |
|
184 | 184 | ?> |
185 | - <li><a href="<?php echo base_url();?>user/user_myprofile/"><i class= "fa fa-user"></i> |
|
185 | + <li><a href="<?php echo base_url(); ?>user/user_myprofile/"><i class= "fa fa-user"></i> |
|
186 | 186 | <?php echo gettext('My Profile'); ?></a></li> |
187 | 187 | <? |
188 | 188 | }?> |
189 | 189 | |
190 | - <? if($this->session->userdata('userlevel_logintype') == '-1'){?> |
|
190 | + <? if ($this->session->userdata('userlevel_logintype') == '-1') {?> |
|
191 | 191 | <li style="-moz-border-radius: 5px 5px 5px 5px;-webkit-border-radius: 5px 5px 5px 5px;border-radius: 5px 5px 5px 5px;"><a href="https://github.com/iNextrix/ASTPP/issues" target="_blank"><i class= "fa fa-bug"></i> <?php echo gettext('Report a Bug'); ?></a></li> |
192 | 192 | <?}?> |
193 | - <? if($this->session->userdata('userlevel_logintype') == '-1'){?> |
|
193 | + <? if ($this->session->userdata('userlevel_logintype') == '-1') {?> |
|
194 | 194 | <li><a href="https://astppdoc.atlassian.net/wiki/display/ASTPP/Welcome+to+ASTPP" target="_blank"><i class="fa fa-file-text"></i> Documentation</a></li> |
195 | 195 | <li><a href="http://www.astppbilling.org/mobile-dialers/" target="_blank"><i class="fa fa-mobile fa-lg" aria-hidden="true"></i> Get App</a></li> |
196 | 196 | <?}?> |
197 | 197 | |
198 | - <li><a href="<?php echo base_url();?>logout"><i class="fa fa-power-off"></i> Log out</a></li> |
|
198 | + <li><a href="<?php echo base_url(); ?>logout"><i class="fa fa-power-off"></i> Log out</a></li> |
|
199 | 199 | </ul> |
200 | 200 | </li> |
201 | 201 | </ul> |
@@ -211,47 +211,47 @@ discard block |
||
211 | 211 | |
212 | 212 | <?php |
213 | 213 | $menu_info = unserialize($this->session->userdata("menuinfo")); |
214 | - foreach($menu_info as $menu_key => $menu_values){ |
|
214 | + foreach ($menu_info as $menu_key => $menu_values) { |
|
215 | 215 | ?> |
216 | 216 | |
217 | 217 | <?php |
218 | - if(common_model::$global_config['system_config']['opensips']== 0 && $menu_key !='SIP Devices'){ |
|
218 | + if (common_model::$global_config['system_config']['opensips'] == 0 && $menu_key != 'SIP Devices') { |
|
219 | 219 | echo '<li><a href="#">'.gettext($menu_key).'<b class="caret"></b></a>'; |
220 | 220 | } |
221 | - if(common_model::$global_config['system_config']['opensips']== 1 && $menu_key != 'Opensips'){ |
|
221 | + if (common_model::$global_config['system_config']['opensips'] == 1 && $menu_key != 'Opensips') { |
|
222 | 222 | echo '<li><a href="#">'.gettext($menu_key).'<b class="caret"></b></a>'; |
223 | 223 | } |
224 | 224 | ?> |
225 | 225 | |
226 | 226 | <ul class="dropdown-menu"> |
227 | - <? foreach($menu_values as $sub_menu_key => $sub_menu_values){?> |
|
227 | + <? foreach ($menu_values as $sub_menu_key => $sub_menu_values) {?> |
|
228 | 228 | |
229 | - <? if($sub_menu_key === 0){ ?> |
|
230 | - <? foreach($sub_menu_values as $sub_key => $sub_menu_lables){ |
|
231 | - if((common_model::$global_config['system_config']['paypal_status']== 1 && strtolower($sub_menu_lables["menu_label"]) =='recharge')|| (common_model::$global_config['system_config']['enterprise']== 0 && $sub_menu_lables["menu_label"] =='Opensips devices') || (common_model::$global_config['system_config']['enterprise']== 0 && $sub_menu_lables["menu_label"] =='Opensips') || (common_model::$global_config['system_config']['opensips']== 1 && $sub_menu_lables["menu_label"] =='Dispatcher list') || (common_model::$global_config['system_config']['opensips']== 1 && $sub_menu_lables["menu_label"] =='Opensips devices') || (common_model::$global_config['system_config']['opensips']== 1 && $sub_menu_lables["menu_label"] =='Opensips') || (common_model::$global_config['system_config']['enterprise']== 1 && common_model::$global_config['system_config']['opensips']== 0 && $sub_menu_lables["menu_label"] =='SIP Devices') || (($acc_info['type'] == '3' || $acc_info['type'] == '0') && $acc_info['allow_ip_management'] == '1' && strtolower($sub_menu_lables["menu_label"]) == 'ip settings')){ |
|
232 | - }else{?> |
|
233 | - <li><a href="<?php echo base_url().$sub_menu_lables["module_url"];?>"><?php echo gettext($sub_menu_lables["menu_label"]);?></a></li> |
|
229 | + <? if ($sub_menu_key === 0) { ?> |
|
230 | + <? foreach ($sub_menu_values as $sub_key => $sub_menu_lables) { |
|
231 | + if ((common_model::$global_config['system_config']['paypal_status'] == 1 && strtolower($sub_menu_lables["menu_label"]) == 'recharge') || (common_model::$global_config['system_config']['enterprise'] == 0 && $sub_menu_lables["menu_label"] == 'Opensips devices') || (common_model::$global_config['system_config']['enterprise'] == 0 && $sub_menu_lables["menu_label"] == 'Opensips') || (common_model::$global_config['system_config']['opensips'] == 1 && $sub_menu_lables["menu_label"] == 'Dispatcher list') || (common_model::$global_config['system_config']['opensips'] == 1 && $sub_menu_lables["menu_label"] == 'Opensips devices') || (common_model::$global_config['system_config']['opensips'] == 1 && $sub_menu_lables["menu_label"] == 'Opensips') || (common_model::$global_config['system_config']['enterprise'] == 1 && common_model::$global_config['system_config']['opensips'] == 0 && $sub_menu_lables["menu_label"] == 'SIP Devices') || (($acc_info['type'] == '3' || $acc_info['type'] == '0') && $acc_info['allow_ip_management'] == '1' && strtolower($sub_menu_lables["menu_label"]) == 'ip settings')) { |
|
232 | + } else {?> |
|
233 | + <li><a href="<?php echo base_url().$sub_menu_lables["module_url"]; ?>"><?php echo gettext($sub_menu_lables["menu_label"]); ?></a></li> |
|
234 | 234 | <?}?> |
235 | 235 | <?} ?> |
236 | - <?php }else{ |
|
237 | - if(common_model::$global_config['system_config']['opensips']==0 && $menu_key !='System Configuration'){ ?> |
|
238 | - <li><a href="#"><span><?=$sub_menu_key;?></span><i class="fa fa-caret-right pull-right"></i></a> |
|
239 | - <? } if(common_model::$global_config['system_config']['opensips']==1) {?> |
|
240 | - <li><a href="#"><span><?=$sub_menu_key;?></span><i class="fa fa-caret-right pull-right"></i></a> |
|
241 | - <?php }if(($acc_info['type']==3 || $acc_info['type']== 0) && $acc_info['allow_ip_management']== 1 && strtolower($sub_menu_lables["menu_label"]) !='ip settings'){ ?> |
|
242 | - <li><a href="#"><span><?=$sub_menu_key;?></span><i class="fa fa-caret-right pull-right"></i></a> |
|
236 | + <?php } else { |
|
237 | + if (common_model::$global_config['system_config']['opensips'] == 0 && $menu_key != 'System Configuration') { ?> |
|
238 | + <li><a href="#"><span><?=$sub_menu_key; ?></span><i class="fa fa-caret-right pull-right"></i></a> |
|
239 | + <? } if (common_model::$global_config['system_config']['opensips'] == 1) {?> |
|
240 | + <li><a href="#"><span><?=$sub_menu_key; ?></span><i class="fa fa-caret-right pull-right"></i></a> |
|
241 | + <?php }if (($acc_info['type'] == 3 || $acc_info['type'] == 0) && $acc_info['allow_ip_management'] == 1 && strtolower($sub_menu_lables["menu_label"]) != 'ip settings') { ?> |
|
242 | + <li><a href="#"><span><?=$sub_menu_key; ?></span><i class="fa fa-caret-right pull-right"></i></a> |
|
243 | 243 | <? } |
244 | 244 | ?> |
245 | 245 | <div class="col-4"><div class="col-md-6 no-padding"> |
246 | 246 | <ul class="col-12 padding-x-8"> |
247 | - <? foreach($sub_menu_values as $sub_menu_lables){ |
|
248 | - if($sub_menu_lables['menu_label'] != 'Configuration'){ |
|
249 | - if(common_model::$global_config['system_config']['opensips']==0 && $sub_menu_lables["menu_label"] !='SIP Devices'){ |
|
247 | + <? foreach ($sub_menu_values as $sub_menu_lables) { |
|
248 | + if ($sub_menu_lables['menu_label'] != 'Configuration') { |
|
249 | + if (common_model::$global_config['system_config']['opensips'] == 0 && $sub_menu_lables["menu_label"] != 'SIP Devices') { |
|
250 | 250 | ?> |
251 | - <li><a href="<?php echo base_url().$sub_menu_lables["module_url"];?>"><?php echo gettext($sub_menu_lables["menu_label"]);?></a></li> |
|
251 | + <li><a href="<?php echo base_url().$sub_menu_lables["module_url"]; ?>"><?php echo gettext($sub_menu_lables["menu_label"]); ?></a></li> |
|
252 | 252 | <? } |
253 | - if(common_model::$global_config['system_config']['opensips']== 1 && $sub_menu_key !='opensips'){ ?> |
|
254 | - <li><a href="<?php echo base_url().$sub_menu_lables["module_url"];?>"><?=$sub_menu_lables["menu_label"];?></a></li> |
|
253 | + if (common_model::$global_config['system_config']['opensips'] == 1 && $sub_menu_key != 'opensips') { ?> |
|
254 | + <li><a href="<?php echo base_url().$sub_menu_lables["module_url"]; ?>"><?=$sub_menu_lables["menu_label"]; ?></a></li> |
|
255 | 255 | <? } |
256 | 256 | } |
257 | 257 | } ?> |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | $color='#1A1919'; |
160 | 160 | } |
161 | 161 | $balance_str = '<span style="color:'.$color.'; font-size: 10px;"><b>('.$variable.' : '.$value.')</b></span>'; |
162 | - }else{ |
|
162 | + } else{ |
|
163 | 163 | $balance_str = ''; |
164 | 164 | } |
165 | 165 | |
@@ -229,11 +229,11 @@ discard block |
||
229 | 229 | <? if($sub_menu_key === 0){ ?> |
230 | 230 | <? foreach($sub_menu_values as $sub_key => $sub_menu_lables){ |
231 | 231 | if((common_model::$global_config['system_config']['paypal_status']== 1 && strtolower($sub_menu_lables["menu_label"]) =='recharge')|| (common_model::$global_config['system_config']['enterprise']== 0 && $sub_menu_lables["menu_label"] =='Opensips devices') || (common_model::$global_config['system_config']['enterprise']== 0 && $sub_menu_lables["menu_label"] =='Opensips') || (common_model::$global_config['system_config']['opensips']== 1 && $sub_menu_lables["menu_label"] =='Dispatcher list') || (common_model::$global_config['system_config']['opensips']== 1 && $sub_menu_lables["menu_label"] =='Opensips devices') || (common_model::$global_config['system_config']['opensips']== 1 && $sub_menu_lables["menu_label"] =='Opensips') || (common_model::$global_config['system_config']['enterprise']== 1 && common_model::$global_config['system_config']['opensips']== 0 && $sub_menu_lables["menu_label"] =='SIP Devices') || (($acc_info['type'] == '3' || $acc_info['type'] == '0') && $acc_info['allow_ip_management'] == '1' && strtolower($sub_menu_lables["menu_label"]) == 'ip settings')){ |
232 | - }else{?> |
|
232 | + } else{?> |
|
233 | 233 | <li><a href="<?php echo base_url().$sub_menu_lables["module_url"];?>"><?php echo gettext($sub_menu_lables["menu_label"]);?></a></li> |
234 | 234 | <?}?> |
235 | 235 | <?} ?> |
236 | - <?php }else{ |
|
236 | + <?php } else{ |
|
237 | 237 | if(common_model::$global_config['system_config']['opensips']==0 && $menu_key !='System Configuration'){ ?> |
238 | 238 | <li><a href="#"><span><?=$sub_menu_key;?></span><i class="fa fa-caret-right pull-right"></i></a> |
239 | 239 | <? } if(common_model::$global_config['system_config']['opensips']==1) {?> |
@@ -32,7 +32,7 @@ |
||
32 | 32 | $lang['currency_decimal'] = 'The %s Field may contain only numeric and decimals EX(99999.99999)'; |
33 | 33 | $lang['password_check'] = "The %s field is not match with your old password."; |
34 | 34 | $lang['did_account_checking'] = "This %s have not sufficient amount to purchase this DID"; |
35 | -$lang['phn_number'] = "The %s field is Invalid."; |
|
35 | +$lang['phn_number'] = "The %s field is Invalid."; |
|
36 | 36 | |
37 | 37 | /* End of file form_validation_lang.php */ |
38 | 38 | /* Location: ./system/language/english/form_validation_lang.php */ |