@@ -29,23 +29,23 @@ |
||
29 | 29 | parent::__construct(); |
30 | 30 | } |
31 | 31 | |
32 | - function index(){ |
|
32 | + function index() { |
|
33 | 33 | $data['account_info'] = $this->session->userdata['accountinfo']; |
34 | 34 | $data['username'] = $this->session->userdata('user_name'); |
35 | 35 | $data['page_title'] = "Test Mail"; |
36 | - $this->load->view('view_newmail',$data); |
|
36 | + $this->load->view('view_newmail', $data); |
|
37 | 37 | } |
38 | - function customer_mail_result($flag=FALSE){ |
|
38 | + function customer_mail_result($flag = FALSE) { |
|
39 | 39 | $account_info = $this->session->userdata['accountinfo']; |
40 | 40 | $post_array = $this->input->post(); |
41 | - $post_array['accountid']=$account_info['id']; |
|
42 | - $post_array['history_id']=0; |
|
43 | - $post_array['email']=$post_array['to']; |
|
41 | + $post_array['accountid'] = $account_info['id']; |
|
42 | + $post_array['history_id'] = 0; |
|
43 | + $post_array['email'] = $post_array['to']; |
|
44 | 44 | unset($post_array['to']); |
45 | - $this->email_lib->send_email($post_array,$post_array,'','',0,0); |
|
45 | + $this->email_lib->send_email($post_array, $post_array, '', '', 0, 0); |
|
46 | 46 | $this->thanks(); |
47 | 47 | } |
48 | - function thanks(){ |
|
48 | + function thanks() { |
|
49 | 49 | $this->load->view('view_mail_response'); |
50 | 50 | } |
51 | 51 |
@@ -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 | } |
@@ -25,19 +25,19 @@ |
||
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/common"); |
32 | 32 | } |
33 | - function low_balance(){ |
|
34 | - $where = array("posttoexternal"=>0,"notify_flag"=>0,"deleted" => "0","status"=>"0"); |
|
33 | + function low_balance() { |
|
34 | + $where = array("posttoexternal"=>0, "notify_flag"=>0, "deleted" => "0", "status"=>"0"); |
|
35 | 35 | $query = $this->db_model->getSelect("*", "accounts", $where); |
36 | - if($query->num_rows >0){ |
|
36 | + if ($query->num_rows > 0) { |
|
37 | 37 | $account_data = $query->result_array(); |
38 | - foreach($account_data as $data_key =>$accountinfo){ |
|
39 | - if(($accountinfo["balance"]) <= $accountinfo["notify_credit_limit"]){ |
|
40 | - $this->common->mail_to_users("email_low_balance",$accountinfo); |
|
38 | + foreach ($account_data as $data_key =>$accountinfo) { |
|
39 | + if (($accountinfo["balance"]) <= $accountinfo["notify_credit_limit"]) { |
|
40 | + $this->common->mail_to_users("email_low_balance", $accountinfo); |
|
41 | 41 | } |
42 | 42 | } |
43 | 43 | } |
@@ -21,19 +21,19 @@ |
||
21 | 21 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
22 | 22 | ############################################################################### |
23 | 23 | |
24 | -if (!defined('BASEPATH')) |
|
24 | +if ( ! defined('BASEPATH')) |
|
25 | 25 | exit('No direct script access allowed'); |
26 | 26 | |
27 | 27 | /** |
28 | 28 | * Dynamically build forms for display |
29 | 29 | */ |
30 | -class Global_locale{ |
|
30 | +class Global_locale { |
|
31 | 31 | |
32 | 32 | function __construct($library_name = '') { |
33 | 33 | |
34 | 34 | $this->CI = & get_instance(); |
35 | 35 | header("Expires: Tue, 01 Jan 2000 00:00:00 GMT"); |
36 | - header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); |
|
36 | + header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); |
|
37 | 37 | header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0"); |
38 | 38 | header("Cache-Control: post-check=0, pre-check=0", false); |
39 | 39 | header("Pragma: no-cache"); |
@@ -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 | class Refill_coupon_form { |
27 | 28 | function __construct($library_name = '') { |
@@ -21,13 +21,13 @@ discard block |
||
21 | 21 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
22 | 22 | ############################################################################### |
23 | 23 | |
24 | -if (!defined('BASEPATH')) |
|
24 | +if ( ! defined('BASEPATH')) |
|
25 | 25 | exit('No direct script access allowed'); |
26 | 26 | |
27 | 27 | /** |
28 | 28 | * Dynamically build forms for display |
29 | 29 | */ |
30 | -class locale_Menu{ |
|
30 | +class locale_Menu { |
|
31 | 31 | |
32 | 32 | function __construct($library_name = '') { |
33 | 33 | |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | $this->CI->load->model('db_model'); |
36 | 36 | $this->CI->load->library('email'); |
37 | 37 | $this->CI->load->library('session'); |
38 | - $current_locale=$this->CI->session->userdata('user_language'); |
|
38 | + $current_locale = $this->CI->session->userdata('user_language'); |
|
39 | 39 | putenv("LC_ALL=$current_locale"); |
40 | 40 | setlocale(LC_ALL, $current_locale); |
41 | 41 | bindtextdomain(WEBSITE_DOMAIN, FCPATH.'/application/modules/dashboard/language'); |
@@ -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 | class Refill_coupon_form { |
27 | 28 | function __construct($library_name = '') { |
@@ -22,16 +22,16 @@ discard block |
||
22 | 22 | ############################################################################### |
23 | 23 | |
24 | 24 | if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
25 | -class freeswitch_lib{ |
|
25 | +class freeswitch_lib { |
|
26 | 26 | |
27 | - function event_socket_create($host='127.0.0.1', $port='8021', $password='ClueCon') { |
|
27 | + function event_socket_create($host = '127.0.0.1', $port = '8021', $password = 'ClueCon') { |
|
28 | 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)) { |
|
33 | + socket_set_blocking($fp, false); |
|
34 | + while ( ! feof($fp)) { |
|
35 | 35 | $buffer = fgets($fp, 1024); |
36 | 36 | usleep(100); //allow time for reponse |
37 | 37 | if (trim($buffer) == "Content-Type: auth/request") { |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $response = ""; |
55 | 55 | $i = 0; |
56 | 56 | $contentlength = 0; |
57 | - while (!feof($fp)) { |
|
57 | + while ( ! feof($fp)) { |
|
58 | 58 | $buffer = fgets($fp, 4096); |
59 | 59 | if ($contentlength > 0) { |
60 | 60 | $response .= $buffer; |
@@ -42,8 +42,7 @@ discard block |
||
42 | 42 | } |
43 | 43 | } |
44 | 44 | return $fp; |
45 | - } |
|
46 | - else { |
|
45 | + } else { |
|
47 | 46 | return false; |
48 | 47 | } |
49 | 48 | } |
@@ -86,8 +85,7 @@ discard block |
||
86 | 85 | } |
87 | 86 | |
88 | 87 | return $response; |
89 | - } |
|
90 | - else { |
|
88 | + } else { |
|
91 | 89 | // echo "no handle"; |
92 | 90 | } |
93 | 91 | } |
@@ -7,15 +7,15 @@ |
||
7 | 7 | */ |
8 | 8 | |
9 | 9 | $astpp_config = parse_ini_file("/var/lib/astpp/astpp-config.conf"); |
10 | -$config['SERVER_NAME'] = $astpp_config['base_url']; // Your web site url |
|
11 | -$config['CRON_TIME_LIMIT'] = 0; // 0 = no time limit |
|
12 | -$config['argv'] = array("LowBalance"=>"lowbalance/low_balance", |
|
10 | +$config['SERVER_NAME'] = $astpp_config['base_url']; // Your web site url |
|
11 | +$config['CRON_TIME_LIMIT'] = 0; // 0 = no time limit |
|
12 | +$config['argv'] = array("LowBalance"=>"lowbalance/low_balance", |
|
13 | 13 | "Lowcredit"=>"lowcreditlimit/low_creditlimit", |
14 | 14 | "UpdateBalance" => "updateBalance/GetUpdateBalance", |
15 | 15 | "CurrencyUpdate" => "currencyupdate/update_currency", |
16 | 16 | "GenerateInvoice" => "generateInvoice/getInvoiceData", |
17 | 17 | "FeedBack"=>"feedback/customer_feedback_result/TRUE", |
18 | 18 | "BroadcastEmail" => "broadcastemail/broadcast_email"); |
19 | -$config['CRON_BETA_MODE'] = false; // Beta Mode (useful for blocking submissions for testing) |
|
19 | +$config['CRON_BETA_MODE'] = false; // Beta Mode (useful for blocking submissions for testing) |
|
20 | 20 | |
21 | 21 | ?> |
@@ -37,7 +37,7 @@ |
||
37 | 37 | <div class="col-md-4 col-md-offset-4"> <span class="login_error"> |
38 | 38 | <?php if (isset($astpp_notification)){ ?> |
39 | 39 | Login unsuccessful. Please make sure you entered the correct username and password, and that your account is active. |
40 | - <?php }else{ |
|
40 | + <?php } else{ |
|
41 | 41 | echo " "; |
42 | 42 | } |
43 | 43 | $astpp_err_msg = $this->session->flashdata('astpp_signupmsg'); |
@@ -35,9 +35,9 @@ |
||
35 | 35 | <div class="row"> |
36 | 36 | |
37 | 37 | <div class="col-md-4 col-md-offset-4"> <span class="login_error"> |
38 | - <?php if (isset($astpp_notification)){ ?> |
|
38 | + <?php if (isset($astpp_notification)) { ?> |
|
39 | 39 | Login unsuccessful. Please make sure you entered the correct username and password, and that your account is active. |
40 | - <?php }else{ |
|
40 | + <?php } else { |
|
41 | 41 | echo " "; |
42 | 42 | } |
43 | 43 | $astpp_err_msg = $this->session->flashdata('astpp_signupmsg'); |
@@ -38,7 +38,7 @@ |
||
38 | 38 | <div class="col-md-4 col-md-offset-4"> <span class="login_error"> |
39 | 39 | <?php if (isset($astpp_notification)){ ?> |
40 | 40 | Login unsuccessful. Please make sure you entered the correct username and password, and that your account is active. |
41 | - <?php }else{ |
|
41 | + <?php } else{ |
|
42 | 42 | echo " "; |
43 | 43 | } ?> |
44 | 44 | </span></div> <br/> |
@@ -35,9 +35,9 @@ |
||
35 | 35 | <div class="row"> |
36 | 36 | |
37 | 37 | <div class="col-md-4 col-md-offset-4"> <span class="login_error"> |
38 | - <?php if (isset($astpp_notification)){ ?> |
|
38 | + <?php if (isset($astpp_notification)) { ?> |
|
39 | 39 | Login unsuccessful. Please make sure you entered the correct username and password, and that your account is active. |
40 | - <?php }else{ |
|
40 | + <?php } else { |
|
41 | 41 | echo " "; |
42 | 42 | } |
43 | 43 | $astpp_err_msg = $this->session->flashdata('astpp_signupmsg'); |
@@ -208,7 +208,7 @@ |
||
208 | 208 | <?php |
209 | 209 | if($account_data['logo'] != ''){ |
210 | 210 | $logo=$account_data['file']; |
211 | - }else{ |
|
211 | + } else{ |
|
212 | 212 | $logo=$account_data['logo']; |
213 | 213 | } |
214 | 214 | if($logo != ''){ |
@@ -198,13 +198,13 @@ |
||
198 | 198 | </div> |
199 | 199 | </div> |
200 | 200 | <?php |
201 | - if($account_data['logo'] != ''){ |
|
202 | - $logo=$account_data['file']; |
|
203 | - }else{ |
|
204 | - $logo=$account_data['logo']; |
|
201 | + if ($account_data['logo'] != '') { |
|
202 | + $logo = $account_data['file']; |
|
203 | + } else { |
|
204 | + $logo = $account_data['logo']; |
|
205 | 205 | } |
206 | - if($logo != ''){ |
|
207 | - $file_name= base_url()."upload/$logo"; |
|
206 | + if ($logo != '') { |
|
207 | + $file_name = base_url()."upload/$logo"; |
|
208 | 208 | ?> |
209 | 209 | |
210 | 210 | <div class='col-md-12 no-padding'> |