@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | $lang['cal_sunday'] = "Sunday"; |
18 | 18 | $lang['cal_monday'] = "Monday"; |
19 | 19 | $lang['cal_tuesday'] = "Tuesday"; |
20 | -$lang['cal_wednesday'] = "Wednesday"; |
|
20 | +$lang['cal_wednesday'] = "Wednesday"; |
|
21 | 21 | $lang['cal_thursday'] = "Thursday"; |
22 | 22 | $lang['cal_friday'] = "Friday"; |
23 | 23 | $lang['cal_saturday'] = "Saturday"; |
@@ -33,15 +33,15 @@ discard block |
||
33 | 33 | $lang['cal_oct'] = "Oct"; |
34 | 34 | $lang['cal_nov'] = "Nov"; |
35 | 35 | $lang['cal_dec'] = "Dec"; |
36 | -$lang['cal_january'] = "January"; |
|
37 | -$lang['cal_february'] = "February"; |
|
36 | +$lang['cal_january'] = "January"; |
|
37 | +$lang['cal_february'] = "February"; |
|
38 | 38 | $lang['cal_march'] = "March"; |
39 | 39 | $lang['cal_april'] = "April"; |
40 | 40 | $lang['cal_mayl'] = "May"; |
41 | 41 | $lang['cal_june'] = "June"; |
42 | 42 | $lang['cal_july'] = "July"; |
43 | 43 | $lang['cal_august'] = "August"; |
44 | -$lang['cal_september'] = "September"; |
|
44 | +$lang['cal_september'] = "September"; |
|
45 | 45 | $lang['cal_october'] = "October"; |
46 | 46 | $lang['cal_november'] = "November"; |
47 | 47 | $lang['cal_december'] = "December"; |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -$lang['migration_none_found'] = "No migrations were found."; |
|
4 | -$lang['migration_not_found'] = "This migration could not be found."; |
|
3 | +$lang['migration_none_found'] = "No migrations were found."; |
|
4 | +$lang['migration_not_found'] = "This migration could not be found."; |
|
5 | 5 | $lang['migration_multiple_version'] = "This are multiple migrations with the same version number: %d."; |
6 | -$lang['migration_class_doesnt_exist'] = "The migration class \"%s\" could not be found."; |
|
6 | +$lang['migration_class_doesnt_exist'] = "The migration class \"%s\" could not be found."; |
|
7 | 7 | $lang['migration_missing_up_method'] = "The migration class \"%s\" is missing an 'up' method."; |
8 | -$lang['migration_missing_down_method'] = "The migration class \"%s\" is missing an 'up' method."; |
|
8 | +$lang['migration_missing_down_method'] = "The migration class \"%s\" is missing an 'up' method."; |
|
9 | 9 | $lang['migration_invalid_filename'] = "Migration \"%s\" has an invalid filename."; |
10 | 10 | |
11 | 11 |
@@ -2,16 +2,16 @@ discard block |
||
2 | 2 | |
3 | 3 | $lang['required'] = "The %s field is required."; |
4 | 4 | $lang['dropdown'] = "Please select %s."; |
5 | -$lang['isset'] = "The %s field must have a value."; |
|
6 | -$lang['valid_email'] = "The %s field must contain a valid email address."; |
|
7 | -$lang['valid_emails'] = "The %s field must contain all valid email addresses."; |
|
8 | -$lang['valid_url'] = "The %s field must contain a valid URL."; |
|
9 | -$lang['valid_ip'] = "The %s field must contain a valid IP."; |
|
5 | +$lang['isset'] = "The %s field must have a value."; |
|
6 | +$lang['valid_email'] = "The %s field must contain a valid email address."; |
|
7 | +$lang['valid_emails'] = "The %s field must contain all valid email addresses."; |
|
8 | +$lang['valid_url'] = "The %s field must contain a valid URL."; |
|
9 | +$lang['valid_ip'] = "The %s field must contain a valid IP."; |
|
10 | 10 | $lang['min_length'] = "The %s field must be at least %s characters in length."; |
11 | 11 | $lang['max_length'] = "The %s field can not exceed %s characters in length."; |
12 | -$lang['exact_length'] = "The %s field must be exactly %s characters in length."; |
|
13 | -$lang['alpha'] = "The %s field may only contain alphabetical characters."; |
|
14 | -$lang['alpha_numeric'] = "The %s field may only contain alpha-numeric characters."; |
|
12 | +$lang['exact_length'] = "The %s field must be exactly %s characters in length."; |
|
13 | +$lang['alpha'] = "The %s field may only contain alphabetical characters."; |
|
14 | +$lang['alpha_numeric'] = "The %s field may only contain alpha-numeric characters."; |
|
15 | 15 | $lang['alpha_dash'] = "The %s field may only contain alpha-numeric characters, underscores, and dashes."; |
16 | 16 | $lang['numeric'] = "The %s field must contain only numbers."; |
17 | 17 | $lang['is_numeric'] = "The %s field must contain only numeric characters."; |
@@ -20,18 +20,18 @@ discard block |
||
20 | 20 | $lang['matches'] = "The %s field does not match the %s field."; |
21 | 21 | $lang['is_unique'] = "The %s field must contain a unique value."; |
22 | 22 | $lang['is_natural'] = "The %s field must contain only positive numbers."; |
23 | -$lang['is_natural_no_zero'] = "The %s field must contain a number greater than zero."; |
|
24 | -$lang['decimal'] = "The %s field must contain a decimal number."; |
|
25 | -$lang['less_than'] = "The %s field must contain a number less than %s."; |
|
26 | -$lang['greater_than'] = "The %s field must contain a number greater than %s."; |
|
27 | -$lang['alpha_dot']= "The %s field may only contain alpha-numeric characters,dashes and dots."; |
|
28 | -$lang['numeric_dot']= "The %s field may only contain numeric and dots."; |
|
29 | -$lang['valid_decimal']= "The %s field may only contain numeric and decimal."; |
|
30 | -$lang['alpha_numeric_space']= "The %s field may only contain only characters,numbers and space."; |
|
31 | -$lang['alpha_space']= "The %s field may only contain only characters and space."; |
|
32 | -$lang['currency_decimal']='The %s Field may contain only numeric and decimals EX(99999.99999)'; |
|
33 | -$lang['password_check']= "The %s field is not match with your old password."; |
|
34 | -$lang['did_account_checking']="This %s have not sufficient amount to purchase this DID"; |
|
23 | +$lang['is_natural_no_zero'] = "The %s field must contain a number greater than zero."; |
|
24 | +$lang['decimal'] = "The %s field must contain a decimal number."; |
|
25 | +$lang['less_than'] = "The %s field must contain a number less than %s."; |
|
26 | +$lang['greater_than'] = "The %s field must contain a number greater than %s."; |
|
27 | +$lang['alpha_dot'] = "The %s field may only contain alpha-numeric characters,dashes and dots."; |
|
28 | +$lang['numeric_dot'] = "The %s field may only contain numeric and dots."; |
|
29 | +$lang['valid_decimal'] = "The %s field may only contain numeric and decimal."; |
|
30 | +$lang['alpha_numeric_space'] = "The %s field may only contain only characters,numbers and space."; |
|
31 | +$lang['alpha_space'] = "The %s field may only contain only characters and space."; |
|
32 | +$lang['currency_decimal'] = 'The %s Field may contain only numeric and decimals EX(99999.99999)'; |
|
33 | +$lang['password_check'] = "The %s field is not match with your old password."; |
|
34 | +$lang['did_account_checking'] = "This %s have not sufficient amount to purchase this DID"; |
|
35 | 35 | |
36 | 36 | |
37 | 37 | /* End of file form_validation_lang.php */ |
@@ -12,20 +12,20 @@ discard block |
||
12 | 12 | |
13 | 13 | // Set index.php location |
14 | 14 | if (isset($config['CRON_CI_INDEX']) && $config['CRON_CI_INDEX']) |
15 | - define('CRON_CI_INDEX', $config['CRON_CI_INDEX']); |
|
15 | + define('CRON_CI_INDEX', $config['CRON_CI_INDEX']); |
|
16 | 16 | else |
17 | - define('CRON_CI_INDEX', '../index.php'); |
|
17 | + define('CRON_CI_INDEX', '../index.php'); |
|
18 | 18 | |
19 | 19 | if (count($argv) <= 2) |
20 | - if (count($config['argv'])) { |
|
21 | - $path = $argv[1]; |
|
22 | - unset($argv[1]); |
|
20 | + if (count($config['argv'])) { |
|
21 | + $path = $argv[1]; |
|
22 | + unset($argv[1]); |
|
23 | 23 | // $argv = array_merge($argv, $config["argv"][$path]); |
24 | - $argv[0] = $argv[0]; |
|
25 | - $argv[1] =$config["argv"][$path]; |
|
26 | - $_SERVER['argv'] = $argv; |
|
27 | - } else |
|
28 | - die('Use: php cron.php controller/method'); |
|
24 | + $argv[0] = $argv[0]; |
|
25 | + $argv[1] =$config["argv"][$path]; |
|
26 | + $_SERVER['argv'] = $argv; |
|
27 | + } else |
|
28 | + die('Use: php cron.php controller/method'); |
|
29 | 29 | |
30 | 30 | // Simulate an HTTP request |
31 | 31 | $_SERVER['PATH_INFO'] = $argv[1]; |
@@ -45,9 +45,9 @@ discard block |
||
45 | 45 | $output = ob_get_contents(); |
46 | 46 | |
47 | 47 | if (CRON_FLUSH_BUFFERS === TRUE) |
48 | - while (@ob_end_flush()); // display buffer contents |
|
49 | - else |
|
50 | - ob_end_clean(); |
|
48 | + while (@ob_end_flush()); // display buffer contents |
|
49 | + else |
|
50 | + ob_end_clean(); |
|
51 | 51 | |
52 | 52 | echo "\n"; |
53 | 53 | ?> |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | unset($argv[1]); |
23 | 23 | // $argv = array_merge($argv, $config["argv"][$path]); |
24 | 24 | $argv[0] = $argv[0]; |
25 | - $argv[1] =$config["argv"][$path]; |
|
25 | + $argv[1] = $config["argv"][$path]; |
|
26 | 26 | $_SERVER['argv'] = $argv; |
27 | 27 | } else |
28 | 28 | die('Use: php cron.php controller/method'); |
@@ -41,11 +41,11 @@ discard block |
||
41 | 41 | ob_start(); |
42 | 42 | |
43 | 43 | // chdir( dirname( CRON_CI_INDEX ) ); |
44 | -require( CRON_CI_INDEX ); // main CI index.php file |
|
44 | +require(CRON_CI_INDEX); // main CI index.php file |
|
45 | 45 | $output = ob_get_contents(); |
46 | 46 | |
47 | 47 | if (CRON_FLUSH_BUFFERS === TRUE) |
48 | - while (@ob_end_flush()); // display buffer contents |
|
48 | + while (@ob_end_flush()); // display buffer contents |
|
49 | 49 | else |
50 | 50 | ob_end_clean(); |
51 | 51 |
@@ -11,21 +11,24 @@ discard block |
||
11 | 11 | define('CRON_BETA_MODE', $config['CRON_BETA_MODE']); |
12 | 12 | |
13 | 13 | // Set index.php location |
14 | -if (isset($config['CRON_CI_INDEX']) && $config['CRON_CI_INDEX']) |
|
14 | +if (isset($config['CRON_CI_INDEX']) && $config['CRON_CI_INDEX']) { |
|
15 | 15 | define('CRON_CI_INDEX', $config['CRON_CI_INDEX']); |
16 | -else |
|
16 | +} else { |
|
17 | 17 | define('CRON_CI_INDEX', '../index.php'); |
18 | +} |
|
18 | 19 | |
19 | -if (count($argv) <= 2) |
|
20 | +if (count($argv) <= 2) { |
|
20 | 21 | if (count($config['argv'])) { |
21 | 22 | $path = $argv[1]; |
23 | +} |
|
22 | 24 | unset($argv[1]); |
23 | 25 | // $argv = array_merge($argv, $config["argv"][$path]); |
24 | 26 | $argv[0] = $argv[0]; |
25 | 27 | $argv[1] =$config["argv"][$path]; |
26 | 28 | $_SERVER['argv'] = $argv; |
27 | - } else |
|
28 | - die('Use: php cron.php controller/method'); |
|
29 | + } else { |
|
30 | + die('Use: php cron.php controller/method'); |
|
31 | + } |
|
29 | 32 | |
30 | 33 | // Simulate an HTTP request |
31 | 34 | $_SERVER['PATH_INFO'] = $argv[1]; |
@@ -44,10 +47,13 @@ discard block |
||
44 | 47 | require( CRON_CI_INDEX ); // main CI index.php file |
45 | 48 | $output = ob_get_contents(); |
46 | 49 | |
47 | -if (CRON_FLUSH_BUFFERS === TRUE) |
|
48 | - while (@ob_end_flush()); // display buffer contents |
|
49 | - else |
|
50 | - ob_end_clean(); |
|
50 | +if (CRON_FLUSH_BUFFERS === TRUE) { |
|
51 | + while (@ob_end_flush()); |
|
52 | +} |
|
53 | +// display buffer contents |
|
54 | + else { |
|
55 | + ob_end_clean(); |
|
56 | + } |
|
51 | 57 | |
52 | 58 | echo "\n"; |
53 | 59 | ?> |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | function __construct() |
42 | 42 | { |
43 | 43 | parent::__construct(); |
44 | - if(!defined( 'CRON' ) ) |
|
44 | + if ( ! defined('CRON')) |
|
45 | 45 | exit(); |
46 | 46 | } |
47 | 47 | |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | function generate_sitemap() |
77 | 77 | { |
78 | 78 | // Live Mode: |
79 | - if( ! CRON_BETA_MODE ) |
|
79 | + if ( ! CRON_BETA_MODE) |
|
80 | 80 | $cron_id = $this->cron->create('Sitemap (Google|Bing|Ask|Yahoo!)'); |
81 | 81 | |
82 | 82 | // Example Code |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | // ... |
90 | 90 | |
91 | 91 | // Sandbox Mode: |
92 | - if( CRON_BETA_MODE ) |
|
92 | + if (CRON_BETA_MODE) |
|
93 | 93 | $this->sitemap->generate_xml(null, false); |
94 | 94 | |
95 | 95 | // Live Mode: |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | echo 'live'; |
98 | 98 | |
99 | 99 | $this->sitemap->generate_xml(); |
100 | - $this->cron->update( $cron_id ); |
|
100 | + $this->cron->update($cron_id); |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | } |
@@ -41,8 +41,9 @@ discard block |
||
41 | 41 | function __construct() |
42 | 42 | { |
43 | 43 | parent::__construct(); |
44 | - if(!defined( 'CRON' ) ) |
|
45 | - exit(); |
|
44 | + if(!defined( 'CRON' ) ) { |
|
45 | + exit(); |
|
46 | + } |
|
46 | 47 | } |
47 | 48 | |
48 | 49 | |
@@ -76,8 +77,9 @@ discard block |
||
76 | 77 | function generate_sitemap() |
77 | 78 | { |
78 | 79 | // Live Mode: |
79 | - if( ! CRON_BETA_MODE ) |
|
80 | - $cron_id = $this->cron->create('Sitemap (Google|Bing|Ask|Yahoo!)'); |
|
80 | + if( ! CRON_BETA_MODE ) { |
|
81 | + $cron_id = $this->cron->create('Sitemap (Google|Bing|Ask|Yahoo!)'); |
|
82 | + } |
|
81 | 83 | |
82 | 84 | // Example Code |
83 | 85 | |
@@ -89,8 +91,9 @@ discard block |
||
89 | 91 | // ... |
90 | 92 | |
91 | 93 | // Sandbox Mode: |
92 | - if( CRON_BETA_MODE ) |
|
93 | - $this->sitemap->generate_xml(null, false); |
|
94 | + if( CRON_BETA_MODE ) { |
|
95 | + $this->sitemap->generate_xml(null, false); |
|
96 | + } |
|
94 | 97 | |
95 | 98 | // Live Mode: |
96 | 99 | else { |
@@ -22,26 +22,26 @@ |
||
22 | 22 | ############################################################################### |
23 | 23 | |
24 | 24 | class Broadcastemail extends CI_Controller { |
25 | - function __construct() |
|
26 | - { |
|
25 | + function __construct() |
|
26 | + { |
|
27 | 27 | parent::__construct(); |
28 | 28 | if(!defined( 'CRON' ) ) |
29 | 29 | exit(); |
30 | - $this->load->model("db_model"); |
|
31 | - $this->load->library("astpp/email_lib"); |
|
32 | - } |
|
33 | - function broadcast_email(){ |
|
30 | + $this->load->model("db_model"); |
|
31 | + $this->load->library("astpp/email_lib"); |
|
32 | + } |
|
33 | + function broadcast_email(){ |
|
34 | 34 | |
35 | - $where = array("status"=>"1"); |
|
36 | - $query = $this->db_model->getSelect("*", "mail_details", $where); |
|
37 | - if($query->num_rows >0){ |
|
38 | - $account_data = $query->result_array(); |
|
39 | - foreach($account_data as $data_key =>$account_value){ |
|
40 | - $account_value['history_id']=$account_value['id']; |
|
41 | - unset($account_value['id']); |
|
42 | - $this->email_lib->send_email('',$account_value,'',$account_value['attachment'],1,0,1); |
|
43 | - } |
|
44 | - } |
|
45 | - } |
|
35 | + $where = array("status"=>"1"); |
|
36 | + $query = $this->db_model->getSelect("*", "mail_details", $where); |
|
37 | + if($query->num_rows >0){ |
|
38 | + $account_data = $query->result_array(); |
|
39 | + foreach($account_data as $data_key =>$account_value){ |
|
40 | + $account_value['history_id']=$account_value['id']; |
|
41 | + unset($account_value['id']); |
|
42 | + $this->email_lib->send_email('',$account_value,'',$account_value['attachment'],1,0,1); |
|
43 | + } |
|
44 | + } |
|
45 | + } |
|
46 | 46 | } |
47 | 47 | ?> |
@@ -25,21 +25,21 @@ |
||
25 | 25 | function __construct() |
26 | 26 | { |
27 | 27 | parent::__construct(); |
28 | - if(!defined( 'CRON' ) ) |
|
28 | + if ( ! defined('CRON')) |
|
29 | 29 | exit(); |
30 | 30 | $this->load->model("db_model"); |
31 | 31 | $this->load->library("astpp/email_lib"); |
32 | 32 | } |
33 | - function broadcast_email(){ |
|
33 | + function broadcast_email() { |
|
34 | 34 | |
35 | 35 | $where = array("status"=>"1"); |
36 | 36 | $query = $this->db_model->getSelect("*", "mail_details", $where); |
37 | - if($query->num_rows >0){ |
|
37 | + if ($query->num_rows > 0) { |
|
38 | 38 | $account_data = $query->result_array(); |
39 | - foreach($account_data as $data_key =>$account_value){ |
|
40 | - $account_value['history_id']=$account_value['id']; |
|
39 | + foreach ($account_data as $data_key =>$account_value) { |
|
40 | + $account_value['history_id'] = $account_value['id']; |
|
41 | 41 | unset($account_value['id']); |
42 | - $this->email_lib->send_email('',$account_value,'',$account_value['attachment'],1,0,1); |
|
42 | + $this->email_lib->send_email('', $account_value, '', $account_value['attachment'], 1, 0, 1); |
|
43 | 43 | } |
44 | 44 | } |
45 | 45 | } |
@@ -25,8 +25,9 @@ |
||
25 | 25 | function __construct() |
26 | 26 | { |
27 | 27 | parent::__construct(); |
28 | - if(!defined( 'CRON' ) ) |
|
29 | - exit(); |
|
28 | + if(!defined( 'CRON' ) ) { |
|
29 | + exit(); |
|
30 | + } |
|
30 | 31 | $this->load->model("db_model"); |
31 | 32 | $this->load->library("astpp/common"); |
32 | 33 | } |
@@ -27,16 +27,16 @@ |
||
27 | 27 | { |
28 | 28 | parent::__construct(); |
29 | 29 | $this->load->model("db_model"); |
30 | - $this->load->library("astpp/common"); |
|
30 | + $this->load->library("astpp/common"); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | |
34 | 34 | function customer_list_status($id){ |
35 | 35 | $post_data = $this->input->post(); |
36 | - $post_data['table']=$this->common->decode($post_data['table']); |
|
37 | - $data['status']=$post_data['status'] =='true'? 0:1; |
|
38 | - $result=$post_data['table'] =='accounts' && $post_data['id'] == 1 ? null:$this->db->update($post_data['table'],$data,array("id"=>$post_data['id'])); |
|
39 | - echo TRUE; |
|
36 | + $post_data['table']=$this->common->decode($post_data['table']); |
|
37 | + $data['status']=$post_data['status'] =='true'? 0:1; |
|
38 | + $result=$post_data['table'] =='accounts' && $post_data['id'] == 1 ? null:$this->db->update($post_data['table'],$data,array("id"=>$post_data['id'])); |
|
39 | + echo TRUE; |
|
40 | 40 | } |
41 | 41 | |
42 | 42 |
@@ -31,11 +31,11 @@ |
||
31 | 31 | } |
32 | 32 | |
33 | 33 | |
34 | - function customer_list_status($id){ |
|
34 | + function customer_list_status($id) { |
|
35 | 35 | $post_data = $this->input->post(); |
36 | - $post_data['table']=$this->common->decode($post_data['table']); |
|
37 | - $data['status']=$post_data['status'] =='true'? 0:1; |
|
38 | - $result=$post_data['table'] =='accounts' && $post_data['id'] == 1 ? null:$this->db->update($post_data['table'],$data,array("id"=>$post_data['id'])); |
|
36 | + $post_data['table'] = $this->common->decode($post_data['table']); |
|
37 | + $data['status'] = $post_data['status'] == 'true' ? 0 : 1; |
|
38 | + $result = $post_data['table'] == 'accounts' && $post_data['id'] == 1 ? null : $this->db->update($post_data['table'], $data, array("id"=>$post_data['id'])); |
|
39 | 39 | echo TRUE; |
40 | 40 | } |
41 | 41 |
@@ -80,10 +80,10 @@ discard block |
||
80 | 80 | |
81 | 81 | $data=array("name"=>$name,"email"=>$email,"feedback"=>$feedback,"first_name"=>$first_name,"last_name"=>$last_name,"city"=>$city,"telephone_1"=>$telephone_1,"account_email"=>$account_email,"company_name"=>$company_name,"address_1"=>$address_1,"address_2"=>$address_2,"telephone_2"=>$telephone_2,"province"=>$province,"serverip"=>$_SERVER['SERVER_ADDR'],"FLAG"=>"FALSE"); |
82 | 82 | |
83 | - $data_new= json_encode($data); |
|
84 | - } |
|
83 | + $data_new= json_encode($data); |
|
84 | + } |
|
85 | 85 | } |
86 | - $ch = curl_init(); |
|
86 | + $ch = curl_init(); |
|
87 | 87 | curl_setopt($ch, CURLOPT_URL, 'http://feedback.astppbilling.org/feedback.php'); |
88 | 88 | curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST'); |
89 | 89 | curl_setopt($ch, CURLOPT_HEADER, 1); |
@@ -95,14 +95,14 @@ discard block |
||
95 | 95 | curl_setopt($ch, CURLINFO_HEADER_OUT, 1); |
96 | 96 | curl_setopt($ch, CURLOPT_POSTFIELDS, $data); |
97 | 97 | |
98 | - $response = curl_exec($ch); |
|
99 | - if(!$flag) |
|
100 | - redirect(base_url() . 'feedback/thanks'); |
|
98 | + $response = curl_exec($ch); |
|
99 | + if(!$flag) |
|
100 | + redirect(base_url() . 'feedback/thanks'); |
|
101 | 101 | |
102 | 102 | |
103 | 103 | } |
104 | 104 | function thanks(){ |
105 | - $this->load->view('view_feedback_response'); |
|
105 | + $this->load->view('view_feedback_response'); |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | } |
@@ -28,59 +28,59 @@ discard block |
||
28 | 28 | parent::__construct(); |
29 | 29 | } |
30 | 30 | |
31 | - function index(){ |
|
31 | + function index() { |
|
32 | 32 | $data['account_info'] = $this->session->userdata['accountinfo']; |
33 | 33 | $data['username'] = $this->session->userdata('user_name'); |
34 | 34 | $data['page_title'] = "Feedback"; |
35 | - $this->load->view('view_feedback',$data); |
|
35 | + $this->load->view('view_feedback', $data); |
|
36 | 36 | } |
37 | - function customer_feedback_result($flag=FALSE){ |
|
38 | - if($flag){ |
|
37 | + function customer_feedback_result($flag = FALSE) { |
|
38 | + if ($flag) { |
|
39 | 39 | $account_info = array(); |
40 | - $this->db->where("accountid","1"); |
|
40 | + $this->db->where("accountid", "1"); |
|
41 | 41 | $res = $this->db->get('invoice_conf'); |
42 | - if($res->num_rows > 0){ |
|
42 | + if ($res->num_rows > 0) { |
|
43 | 43 | $masterdata = $res->result_array(); |
44 | 44 | $account_info = $masterdata['0']; |
45 | 45 | |
46 | - $company_name=$account_info['company_name']; |
|
47 | - $address=$account_info['address']; |
|
48 | - $city=$account_info['city']; |
|
49 | - $province=$account_info['province']; |
|
50 | - $country=$account_info['country']; |
|
51 | - $zipcode=$account_info['zipcode']; |
|
52 | - $telephone=$account_info['telephone']; |
|
53 | - $fax=$account_info['fax']; |
|
54 | - $emailaddress=$account_info['emailaddress']; |
|
55 | - $website=$account_info['website']; |
|
46 | + $company_name = $account_info['company_name']; |
|
47 | + $address = $account_info['address']; |
|
48 | + $city = $account_info['city']; |
|
49 | + $province = $account_info['province']; |
|
50 | + $country = $account_info['country']; |
|
51 | + $zipcode = $account_info['zipcode']; |
|
52 | + $telephone = $account_info['telephone']; |
|
53 | + $fax = $account_info['fax']; |
|
54 | + $emailaddress = $account_info['emailaddress']; |
|
55 | + $website = $account_info['website']; |
|
56 | 56 | |
57 | - $data=array("name"=>"Admin","company_name"=>$company_name,"address"=>$address,"city"=>$city,"province"=>$province,"country"=>$country,"zipcode"=>$zipcode,"telephone"=>$telephone,"fax"=>$fax,"emailaddress"=>$emailaddress,"website"=>$website,"serverip"=>$_SERVER['SERVER_NAME'],"FLAG"=>"TRUE"); |
|
57 | + $data = array("name"=>"Admin", "company_name"=>$company_name, "address"=>$address, "city"=>$city, "province"=>$province, "country"=>$country, "zipcode"=>$zipcode, "telephone"=>$telephone, "fax"=>$fax, "emailaddress"=>$emailaddress, "website"=>$website, "serverip"=>$_SERVER['SERVER_NAME'], "FLAG"=>"TRUE"); |
|
58 | 58 | } |
59 | - }else{ |
|
59 | + } else { |
|
60 | 60 | $account_info = array(); |
61 | - $this->db->where("type","-1"); |
|
61 | + $this->db->where("type", "-1"); |
|
62 | 62 | $res = $this->db->get('accounts'); |
63 | - if($res->num_rows > 0){ |
|
63 | + if ($res->num_rows > 0) { |
|
64 | 64 | $masterdata = $res->result_array(); |
65 | 65 | $account_info = $masterdata['0']; |
66 | 66 | |
67 | - $name=$_REQUEST['name']="Admin"; |
|
68 | - $email=$_REQUEST['email']=$account_info['email']; |
|
69 | - $feedback=$_REQUEST['feedback']; |
|
70 | - $first_name=$account_info['first_name']; |
|
71 | - $last_name=$account_info['last_name']; |
|
72 | - $city=$account_info['city']; |
|
73 | - $telephone_1=$account_info['telephone_1']; |
|
74 | - $account_email=$account_info['email']; |
|
75 | - $company_name=$account_info['company_name']; |
|
76 | - $address_1=$account_info['address_1']; |
|
77 | - $address_2=$account_info['address_2']; |
|
78 | - $telephone_2=$account_info['telephone_2']; |
|
79 | - $province=$account_info['province']; |
|
67 | + $name = $_REQUEST['name'] = "Admin"; |
|
68 | + $email = $_REQUEST['email'] = $account_info['email']; |
|
69 | + $feedback = $_REQUEST['feedback']; |
|
70 | + $first_name = $account_info['first_name']; |
|
71 | + $last_name = $account_info['last_name']; |
|
72 | + $city = $account_info['city']; |
|
73 | + $telephone_1 = $account_info['telephone_1']; |
|
74 | + $account_email = $account_info['email']; |
|
75 | + $company_name = $account_info['company_name']; |
|
76 | + $address_1 = $account_info['address_1']; |
|
77 | + $address_2 = $account_info['address_2']; |
|
78 | + $telephone_2 = $account_info['telephone_2']; |
|
79 | + $province = $account_info['province']; |
|
80 | 80 | |
81 | - $data=array("name"=>$name,"email"=>$email,"feedback"=>$feedback,"first_name"=>$first_name,"last_name"=>$last_name,"city"=>$city,"telephone_1"=>$telephone_1,"account_email"=>$account_email,"company_name"=>$company_name,"address_1"=>$address_1,"address_2"=>$address_2,"telephone_2"=>$telephone_2,"province"=>$province,"serverip"=>$_SERVER['SERVER_ADDR'],"FLAG"=>"FALSE"); |
|
81 | + $data = array("name"=>$name, "email"=>$email, "feedback"=>$feedback, "first_name"=>$first_name, "last_name"=>$last_name, "city"=>$city, "telephone_1"=>$telephone_1, "account_email"=>$account_email, "company_name"=>$company_name, "address_1"=>$address_1, "address_2"=>$address_2, "telephone_2"=>$telephone_2, "province"=>$province, "serverip"=>$_SERVER['SERVER_ADDR'], "FLAG"=>"FALSE"); |
|
82 | 82 | |
83 | - $data_new= json_encode($data); |
|
83 | + $data_new = json_encode($data); |
|
84 | 84 | } |
85 | 85 | } |
86 | 86 | $ch = curl_init(); |
@@ -96,12 +96,12 @@ discard block |
||
96 | 96 | curl_setopt($ch, CURLOPT_POSTFIELDS, $data); |
97 | 97 | |
98 | 98 | $response = curl_exec($ch); |
99 | - if(!$flag) |
|
100 | - redirect(base_url() . 'feedback/thanks'); |
|
99 | + if ( ! $flag) |
|
100 | + redirect(base_url().'feedback/thanks'); |
|
101 | 101 | |
102 | 102 | |
103 | 103 | } |
104 | - function thanks(){ |
|
104 | + function thanks() { |
|
105 | 105 | $this->load->view('view_feedback_response'); |
106 | 106 | } |
107 | 107 |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | |
57 | 57 | $data=array("name"=>"Admin","company_name"=>$company_name,"address"=>$address,"city"=>$city,"province"=>$province,"country"=>$country,"zipcode"=>$zipcode,"telephone"=>$telephone,"fax"=>$fax,"emailaddress"=>$emailaddress,"website"=>$website,"serverip"=>$_SERVER['SERVER_NAME'],"FLAG"=>"TRUE"); |
58 | 58 | } |
59 | - }else{ |
|
59 | + } else{ |
|
60 | 60 | $account_info = array(); |
61 | 61 | $this->db->where("type","-1"); |
62 | 62 | $res = $this->db->get('accounts'); |
@@ -96,8 +96,9 @@ discard block |
||
96 | 96 | curl_setopt($ch, CURLOPT_POSTFIELDS, $data); |
97 | 97 | |
98 | 98 | $response = curl_exec($ch); |
99 | - if(!$flag) |
|
100 | - redirect(base_url() . 'feedback/thanks'); |
|
99 | + if(!$flag) { |
|
100 | + redirect(base_url() . 'feedback/thanks'); |
|
101 | + } |
|
101 | 102 | |
102 | 103 | |
103 | 104 | } |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | { |
28 | 28 | parent::__construct(); |
29 | 29 | $this->load->model('common_model'); |
30 | - $this->load->library('common'); |
|
30 | + $this->load->library('common'); |
|
31 | 31 | $this->load->model('db_model'); |
32 | 32 | $this->load->model('Astpp_common'); |
33 | 33 | } |
@@ -35,19 +35,19 @@ discard block |
||
35 | 35 | $opensips_flag=common_model::$global_config['system_config']['opensips']; |
36 | 36 | $accountid_arr=0; |
37 | 37 | if($opensips_flag == '1'){ |
38 | - $where=array('username'=>$sipnumber); |
|
39 | - $accountid_arr=$this->db_model->getSelect('accountid','sip_devices',$where); |
|
40 | - } |
|
38 | + $where=array('username'=>$sipnumber); |
|
39 | + $accountid_arr=$this->db_model->getSelect('accountid','sip_devices',$where); |
|
40 | + } |
|
41 | 41 | else{ |
42 | - $db_config = Common_model::$global_config['system_config']; |
|
43 | - $opensipdsn = "mysql://" . $db_config['opensips_dbuser'] . ":" . $db_config['opensips_dbpass'] . "@" . $db_config['opensips_dbhost'] . "/" . $db_config['opensips_dbname'] . "?char_set=utf8&dbcollat=utf8_general_ci&cache_on=true&cachedir="; |
|
44 | - $this->opensips_db = $this->load->database($opensipdsn, true); |
|
45 | - $this->opensips_db->where(array("username"=>$sipnumber)); |
|
46 | - $accountnum_arr=$this->opensips_db->get("subscriber"); |
|
47 | - $accountnum_arr=$accountnum_arr->result_array(); |
|
48 | - foreach($accountnum_arr as $value_num){ |
|
49 | - $accountid_arr = $this->db_model->getSelect('id','accounts',array('number'=>$value_num['accountcode'])); |
|
50 | - } |
|
42 | + $db_config = Common_model::$global_config['system_config']; |
|
43 | + $opensipdsn = "mysql://" . $db_config['opensips_dbuser'] . ":" . $db_config['opensips_dbpass'] . "@" . $db_config['opensips_dbhost'] . "/" . $db_config['opensips_dbname'] . "?char_set=utf8&dbcollat=utf8_general_ci&cache_on=true&cachedir="; |
|
44 | + $this->opensips_db = $this->load->database($opensipdsn, true); |
|
45 | + $this->opensips_db->where(array("username"=>$sipnumber)); |
|
46 | + $accountnum_arr=$this->opensips_db->get("subscriber"); |
|
47 | + $accountnum_arr=$accountnum_arr->result_array(); |
|
48 | + foreach($accountnum_arr as $value_num){ |
|
49 | + $accountid_arr = $this->db_model->getSelect('id','accounts',array('number'=>$value_num['accountcode'])); |
|
50 | + } |
|
51 | 51 | } |
52 | 52 | if($accountid_arr == ''){ |
53 | 53 | echo "Please enter proper username of SIP Account"; |
@@ -31,88 +31,88 @@ |
||
31 | 31 | $this->load->model('db_model'); |
32 | 32 | $this->load->model('Astpp_common'); |
33 | 33 | } |
34 | - function index($sipnumber=''){ |
|
35 | - $opensips_flag=common_model::$global_config['system_config']['opensips']; |
|
36 | - $accountid_arr=0; |
|
37 | - if($opensips_flag == '1'){ |
|
38 | - $where=array('username'=>$sipnumber); |
|
39 | - $accountid_arr=$this->db_model->getSelect('accountid','sip_devices',$where); |
|
34 | + function index($sipnumber = '') { |
|
35 | + $opensips_flag = common_model::$global_config['system_config']['opensips']; |
|
36 | + $accountid_arr = 0; |
|
37 | + if ($opensips_flag == '1') { |
|
38 | + $where = array('username'=>$sipnumber); |
|
39 | + $accountid_arr = $this->db_model->getSelect('accountid', 'sip_devices', $where); |
|
40 | 40 | } |
41 | - else{ |
|
41 | + else { |
|
42 | 42 | $db_config = Common_model::$global_config['system_config']; |
43 | - $opensipdsn = "mysql://" . $db_config['opensips_dbuser'] . ":" . $db_config['opensips_dbpass'] . "@" . $db_config['opensips_dbhost'] . "/" . $db_config['opensips_dbname'] . "?char_set=utf8&dbcollat=utf8_general_ci&cache_on=true&cachedir="; |
|
43 | + $opensipdsn = "mysql://".$db_config['opensips_dbuser'].":".$db_config['opensips_dbpass']."@".$db_config['opensips_dbhost']."/".$db_config['opensips_dbname']."?char_set=utf8&dbcollat=utf8_general_ci&cache_on=true&cachedir="; |
|
44 | 44 | $this->opensips_db = $this->load->database($opensipdsn, true); |
45 | 45 | $this->opensips_db->where(array("username"=>$sipnumber)); |
46 | - $accountnum_arr=$this->opensips_db->get("subscriber"); |
|
47 | - $accountnum_arr=$accountnum_arr->result_array(); |
|
48 | - foreach($accountnum_arr as $value_num){ |
|
49 | - $accountid_arr = $this->db_model->getSelect('id','accounts',array('number'=>$value_num['accountcode'])); |
|
46 | + $accountnum_arr = $this->opensips_db->get("subscriber"); |
|
47 | + $accountnum_arr = $accountnum_arr->result_array(); |
|
48 | + foreach ($accountnum_arr as $value_num) { |
|
49 | + $accountid_arr = $this->db_model->getSelect('id', 'accounts', array('number'=>$value_num['accountcode'])); |
|
50 | 50 | } |
51 | 51 | } |
52 | - if($accountid_arr == ''){ |
|
52 | + if ($accountid_arr == '') { |
|
53 | 53 | echo "Please enter proper username of SIP Account"; |
54 | 54 | } |
55 | - if($accountid_arr->num_rows()==0 ){ |
|
56 | - $where=array('number'=>$sipnumber); |
|
57 | - $accountid_arr=$this->db_model->getSelect('id','accounts',$where); |
|
55 | + if ($accountid_arr->num_rows() == 0) { |
|
56 | + $where = array('number'=>$sipnumber); |
|
57 | + $accountid_arr = $this->db_model->getSelect('id', 'accounts', $where); |
|
58 | 58 | } |
59 | - if($accountid_arr->num_rows()>0){ |
|
60 | - $accountid_arr=$accountid_arr->result_array(); |
|
61 | - if($opensips_flag == '1'){ |
|
62 | - foreach($accountid_arr[0] as $key=>$value){ |
|
59 | + if ($accountid_arr->num_rows() > 0) { |
|
60 | + $accountid_arr = $accountid_arr->result_array(); |
|
61 | + if ($opensips_flag == '1') { |
|
62 | + foreach ($accountid_arr[0] as $key=>$value) { |
|
63 | 63 | } |
64 | - if($key== 'id'){ |
|
65 | - $accountid=$accountid_arr[0]['id']; |
|
64 | + if ($key == 'id') { |
|
65 | + $accountid = $accountid_arr[0]['id']; |
|
66 | 66 | } |
67 | - else{ |
|
68 | - $accountid=$accountid_arr[0]['accountid']; |
|
67 | + else { |
|
68 | + $accountid = $accountid_arr[0]['accountid']; |
|
69 | 69 | } |
70 | 70 | } |
71 | - else{ |
|
72 | - $accountid=$accountid_arr[0]['id']; |
|
71 | + else { |
|
72 | + $accountid = $accountid_arr[0]['id']; |
|
73 | 73 | } |
74 | 74 | $to_currency = common_model::$global_config['system_config']['base_currency']; |
75 | - if($accountid > 0){ |
|
76 | - $where=array('id'=>$accountid); |
|
77 | - $balance=$this->db_model->getSelect('balance,currency_id','accounts',$where); |
|
78 | - if($balance->num_rows() > 0){ |
|
75 | + if ($accountid > 0) { |
|
76 | + $where = array('id'=>$accountid); |
|
77 | + $balance = $this->db_model->getSelect('balance,currency_id', 'accounts', $where); |
|
78 | + if ($balance->num_rows() > 0) { |
|
79 | 79 | //get balance,currency using by user from account number. |
80 | 80 | $balance_arr = $balance->result_array(); |
81 | - $balance=$balance_arr['0']['balance']; |
|
82 | - $currency=$balance_arr['0']['currency_id']; |
|
81 | + $balance = $balance_arr['0']['balance']; |
|
82 | + $currency = $balance_arr['0']['currency_id']; |
|
83 | 83 | //Get Base Currency From System which is main currency of system. |
84 | - $base_currency_arr=$this->db_model->getSelect('value','system',array('name'=>'base_currency')); |
|
85 | - $base_currency_arr=$base_currency_arr->result_array(); |
|
86 | - $base_currency=$base_currency_arr['0']['value']; |
|
84 | + $base_currency_arr = $this->db_model->getSelect('value', 'system', array('name'=>'base_currency')); |
|
85 | + $base_currency_arr = $base_currency_arr->result_array(); |
|
86 | + $base_currency = $base_currency_arr['0']['value']; |
|
87 | 87 | //Get basse Currency rate from Currency Name. |
88 | - $base_currency_info=$this->db_model->getSelect('*','currency',array('currency'=>$base_currency)); |
|
89 | - $base_currency_info=$base_currency_info->result_array(); |
|
90 | - $base_currency_rate=$base_currency_info['0']['currencyrate']; |
|
91 | - $base_currency_name=$base_currency_info['0']['currency']; |
|
88 | + $base_currency_info = $this->db_model->getSelect('*', 'currency', array('currency'=>$base_currency)); |
|
89 | + $base_currency_info = $base_currency_info->result_array(); |
|
90 | + $base_currency_rate = $base_currency_info['0']['currencyrate']; |
|
91 | + $base_currency_name = $base_currency_info['0']['currency']; |
|
92 | 92 | //Find Currency Rate of user Currency from its currency_id |
93 | - $where= array('id'=>$currency); |
|
94 | - $user_currency_info=$this->db_model->getSelect("*",'currency',$where); |
|
93 | + $where = array('id'=>$currency); |
|
94 | + $user_currency_info = $this->db_model->getSelect("*", 'currency', $where); |
|
95 | 95 | //user Currency Is deleted or Not |
96 | - if($user_currency_info->num_rows() > 0){ |
|
97 | - $user_currency_info=$user_currency_info->result_array(); |
|
98 | - $user_currency=$user_currency_info['0']['currencyrate']; |
|
99 | - $user_currency_name=$user_currency_info['0']['currency']; |
|
96 | + if ($user_currency_info->num_rows() > 0) { |
|
97 | + $user_currency_info = $user_currency_info->result_array(); |
|
98 | + $user_currency = $user_currency_info['0']['currencyrate']; |
|
99 | + $user_currency_name = $user_currency_info['0']['currency']; |
|
100 | 100 | } |
101 | - else{ |
|
102 | - $user_currency=$base_currency_rate; |
|
103 | - $user_currency_name=$base_currency_name; |
|
101 | + else { |
|
102 | + $user_currency = $base_currency_rate; |
|
103 | + $user_currency_name = $base_currency_name; |
|
104 | 104 | } |
105 | 105 | // Convert Balance of user in user currency |
106 | - $convert_balance=round(($balance * $user_currency)/$base_currency_rate,2); |
|
107 | - $convert_balance=sprintf("%.2f", $convert_balance).' '.$user_currency_name; |
|
106 | + $convert_balance = round(($balance * $user_currency) / $base_currency_rate, 2); |
|
107 | + $convert_balance = sprintf("%.2f", $convert_balance).' '.$user_currency_name; |
|
108 | 108 | echo "Balance : ".$convert_balance; |
109 | 109 | } |
110 | 110 | } |
111 | - else{ |
|
111 | + else { |
|
112 | 112 | echo "0.00 ".$to_currency; |
113 | 113 | } |
114 | 114 | } |
115 | - else{ |
|
115 | + else { |
|
116 | 116 | echo "Please enter proper username of SIP Account"; |
117 | 117 | } |
118 | 118 | } |
@@ -37,8 +37,7 @@ discard block |
||
37 | 37 | if($opensips_flag == '1'){ |
38 | 38 | $where=array('username'=>$sipnumber); |
39 | 39 | $accountid_arr=$this->db_model->getSelect('accountid','sip_devices',$where); |
40 | - } |
|
41 | - else{ |
|
40 | + } else{ |
|
42 | 41 | $db_config = Common_model::$global_config['system_config']; |
43 | 42 | $opensipdsn = "mysql://" . $db_config['opensips_dbuser'] . ":" . $db_config['opensips_dbpass'] . "@" . $db_config['opensips_dbhost'] . "/" . $db_config['opensips_dbname'] . "?char_set=utf8&dbcollat=utf8_general_ci&cache_on=true&cachedir="; |
44 | 43 | $this->opensips_db = $this->load->database($opensipdsn, true); |
@@ -63,12 +62,10 @@ discard block |
||
63 | 62 | } |
64 | 63 | if($key== 'id'){ |
65 | 64 | $accountid=$accountid_arr[0]['id']; |
66 | - } |
|
67 | - else{ |
|
65 | + } else{ |
|
68 | 66 | $accountid=$accountid_arr[0]['accountid']; |
69 | 67 | } |
70 | - } |
|
71 | - else{ |
|
68 | + } else{ |
|
72 | 69 | $accountid=$accountid_arr[0]['id']; |
73 | 70 | } |
74 | 71 | $to_currency = common_model::$global_config['system_config']['base_currency']; |
@@ -97,8 +94,7 @@ discard block |
||
97 | 94 | $user_currency_info=$user_currency_info->result_array(); |
98 | 95 | $user_currency=$user_currency_info['0']['currencyrate']; |
99 | 96 | $user_currency_name=$user_currency_info['0']['currency']; |
100 | - } |
|
101 | - else{ |
|
97 | + } else{ |
|
102 | 98 | $user_currency=$base_currency_rate; |
103 | 99 | $user_currency_name=$base_currency_name; |
104 | 100 | } |
@@ -107,12 +103,10 @@ discard block |
||
107 | 103 | $convert_balance=sprintf("%.2f", $convert_balance).' '.$user_currency_name; |
108 | 104 | echo "Balance : ".$convert_balance; |
109 | 105 | } |
110 | - } |
|
111 | - else{ |
|
106 | + } else{ |
|
112 | 107 | echo "0.00 ".$to_currency; |
113 | 108 | } |
114 | - } |
|
115 | - else{ |
|
109 | + } else{ |
|
116 | 110 | echo "Please enter proper username of SIP Account"; |
117 | 111 | } |
118 | 112 | } |