Completed
Pull Request — v3.0 (#136)
by
unknown
25:07
created
web_interface/astpp/application/controllers/lowcreditlimit.php 3 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -22,27 +22,27 @@
 block discarded – undo
22 22
 ###############################################################################
23 23
 
24 24
 class Lowcreditlimit 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/common");
32
-    }
33
-    function low_creditlimit(){
34
-        $where = array("posttoexternal"=>1,"deleted" => "0","status"=>"0");
35
-        $query = $this->db_model->getSelect("*", "accounts", $where);
36
-        if($query->num_rows >0){
37
-            $account_data = $query->result_array();
38
-            foreach($account_data as $data_key =>$account_value){
39
-                if(($account_value["balance"]) >= $account_value["credit_limit"]){
40
-                  $this->common->mail_to_users("email_low_balance",$account_value);   
41
-                }
42
-            }
43
-        }
44
-        exit;
45
-    }
30
+		$this->load->model("db_model");
31
+		$this->load->library("astpp/common");
32
+	}
33
+	function low_creditlimit(){
34
+		$where = array("posttoexternal"=>1,"deleted" => "0","status"=>"0");
35
+		$query = $this->db_model->getSelect("*", "accounts", $where);
36
+		if($query->num_rows >0){
37
+			$account_data = $query->result_array();
38
+			foreach($account_data as $data_key =>$account_value){
39
+				if(($account_value["balance"]) >= $account_value["credit_limit"]){
40
+				  $this->common->mail_to_users("email_low_balance",$account_value);   
41
+				}
42
+			}
43
+		}
44
+		exit;
45
+	}
46 46
 } 
47 47
 ?>
48 48
  
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,19 +25,19 @@
 block discarded – undo
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_creditlimit(){
34
-        $where = array("posttoexternal"=>1,"deleted" => "0","status"=>"0");
33
+    function low_creditlimit() {
34
+        $where = array("posttoexternal"=>1, "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 =>$account_value){
39
-                if(($account_value["balance"]) >= $account_value["credit_limit"]){
40
-                  $this->common->mail_to_users("email_low_balance",$account_value);   
38
+            foreach ($account_data as $data_key =>$account_value) {
39
+                if (($account_value["balance"]) >= $account_value["credit_limit"]) {
40
+                  $this->common->mail_to_users("email_low_balance", $account_value);   
41 41
                 }
42 42
             }
43 43
         }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,9 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
web_interface/astpp/application/controllers/lowbalance.php 3 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -22,26 +22,26 @@
 block discarded – undo
22 22
 ###############################################################################
23 23
 
24 24
 class Lowbalance 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/common");
32
-    }
33
-    function low_balance(){
34
-        $where = array("posttoexternal"=>0,"notify_flag"=>0,"deleted" => "0","status"=>"0");
35
-        $query = $this->db_model->getSelect("*", "accounts", $where);
36
-        if($query->num_rows >0){
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);   
41
-                }
42
-            }
43
-        }
44
-        exit;
45
-    }
30
+		$this->load->model("db_model");
31
+		$this->load->library("astpp/common");
32
+	}
33
+	function low_balance(){
34
+		$where = array("posttoexternal"=>0,"notify_flag"=>0,"deleted" => "0","status"=>"0");
35
+		$query = $this->db_model->getSelect("*", "accounts", $where);
36
+		if($query->num_rows >0){
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);   
41
+				}
42
+			}
43
+		}
44
+		exit;
45
+	}
46 46
 } 
47 47
 ?>
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,19 +25,19 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,9 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
web_interface/astpp/application/errors/error_404.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
 	<div id="container">
58 58
 		<h1><?php echo $heading; ?></h1>
59 59
 		<?php echo $message; ?>
60
-		<? Header("Location: /dashboard/");?>
60
+		<? Header("Location: /dashboard/"); ?>
61 61
 	</div>
62 62
 </body>
63 63
 </html>
64 64
\ No newline at end of file
Please login to merge, or discard this patch.
web_interface/astpp/application/libraries/Timezone.php 3 patches
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -29,64 +29,64 @@
 block discarded – undo
29 29
   }
30 30
 
31 31
   function uset_timezone(){
32
-	    $account_data = $this->CI->session->userdata('accountinfo');
33
-	    return $account_data['timezone_id'] ;
32
+		$account_data = $this->CI->session->userdata('accountinfo');
33
+		return $account_data['timezone_id'] ;
34 34
   }
35 35
   function display_GMT($currDate,$fulldate = 1)
36 36
   {	
37
-      $number = $this->uset_timezone();
38
-      $SERVER_GMT='0';
37
+	  $number = $this->uset_timezone();
38
+	  $SERVER_GMT='0';
39 39
 
40
-      $result=$this->CI->db->query("select gmtoffset from timezone where id =".$number);
41
-      $timezone_offset = $result->result();
40
+	  $result=$this->CI->db->query("select gmtoffset from timezone where id =".$number);
41
+	  $timezone_offset = $result->result();
42 42
 
43
-      $USER_GMT = $timezone_offset['0']->gmtoffset;
43
+	  $USER_GMT = $timezone_offset['0']->gmtoffset;
44 44
 
45
-      $date_time_array = getdate(strtotime($currDate));
45
+	  $date_time_array = getdate(strtotime($currDate));
46 46
       
47
-      $hours = $date_time_array['hours'];
48
-      $minutes = $date_time_array['minutes'];
49
-      $seconds = $date_time_array['seconds'];
50
-      $month = $date_time_array['mon'];
51
-      $day = $date_time_array['mday'];
52
-      $year = $date_time_array['year'];
53
-      $timestamp = mktime($hours, $minutes, $seconds, $month, $day, $year);
47
+	  $hours = $date_time_array['hours'];
48
+	  $minutes = $date_time_array['minutes'];
49
+	  $seconds = $date_time_array['seconds'];
50
+	  $month = $date_time_array['mon'];
51
+	  $day = $date_time_array['mday'];
52
+	  $year = $date_time_array['year'];
53
+	  $timestamp = mktime($hours, $minutes, $seconds, $month, $day, $year);
54 54
 
55
-      $timestamp = $timestamp+($USER_GMT-$SERVER_GMT);
56
-      if ($fulldate == 1) {
55
+	  $timestamp = $timestamp+($USER_GMT-$SERVER_GMT);
56
+	  if ($fulldate == 1) {
57 57
 		$date = date("Y-m-d H:i:s", $timestamp);
58
-      } else {
59
-	      $date = date("Y-m-d", $timestamp);
60
-      }
58
+	  } else {
59
+		  $date = date("Y-m-d", $timestamp);
60
+	  }
61 61
       
62
-      return $date;
62
+	  return $date;
63 63
   }
64 64
 
65 65
   function convert_to_GMT($currDate,$fulldate = 1){
66
-      $number = $this->uset_timezone();
67
-      $SERVER_GMT='0';
66
+	  $number = $this->uset_timezone();
67
+	  $SERVER_GMT='0';
68 68
 
69
-      $result=$this->CI->db->query("select gmtoffset from timezone where id =".$number);
70
-      $timezone_offset = $result->result();
69
+	  $result=$this->CI->db->query("select gmtoffset from timezone where id =".$number);
70
+	  $timezone_offset = $result->result();
71 71
 
72
-      $USER_GMT = $timezone_offset['0']->gmtoffset;
72
+	  $USER_GMT = $timezone_offset['0']->gmtoffset;
73 73
 
74
-      $date_time_array = getdate(strtotime($currDate));
75
-      $hours = $date_time_array['hours'];
76
-      $minutes = $date_time_array['minutes'];
77
-      $seconds = $date_time_array['seconds'];
78
-      $month = $date_time_array['mon'];
79
-      $day = $date_time_array['mday'];
80
-      $year = $date_time_array['year'];
81
-      $timestamp = mktime($hours, $minutes, $seconds, $month, $day, $year);
74
+	  $date_time_array = getdate(strtotime($currDate));
75
+	  $hours = $date_time_array['hours'];
76
+	  $minutes = $date_time_array['minutes'];
77
+	  $seconds = $date_time_array['seconds'];
78
+	  $month = $date_time_array['mon'];
79
+	  $day = $date_time_array['mday'];
80
+	  $year = $date_time_array['year'];
81
+	  $timestamp = mktime($hours, $minutes, $seconds, $month, $day, $year);
82 82
 
83
-      $timestamp = $timestamp - ($SERVER_GMT - $USER_GMT);
84
-      if ($fulldate == 1) {
85
-	      $date = date("Y-m-d H:i:s", $timestamp);
86
-      } else {
87
-	      $date = date("Y-m-d", $timestamp);
88
-      }
89
-      return $date;
83
+	  $timestamp = $timestamp - ($SERVER_GMT - $USER_GMT);
84
+	  if ($fulldate == 1) {
85
+		  $date = date("Y-m-d H:i:s", $timestamp);
86
+	  } else {
87
+		  $date = date("Y-m-d", $timestamp);
88
+	  }
89
+	  return $date;
90 90
   }
91 91
 }
92 92
 ?>
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -22,22 +22,22 @@  discard block
 block discarded – undo
22 22
 ###############################################################################
23 23
 if ( ! defined('BASEPATH')) exit('No direct script access allowed');
24 24
 class Timezone {
25
-  function __construct(){
26
-	$this->CI =& get_instance();
25
+  function __construct() {
26
+	$this->CI = & get_instance();
27 27
 	$this->CI->load->library('session');
28 28
 	$this->CI->load->database();
29 29
   }
30 30
 
31
-  function uset_timezone(){
31
+  function uset_timezone() {
32 32
 	    $account_data = $this->CI->session->userdata('accountinfo');
33
-	    return $account_data['timezone_id'] ;
33
+	    return $account_data['timezone_id'];
34 34
   }
35
-  function display_GMT($currDate,$fulldate = 1)
35
+  function display_GMT($currDate, $fulldate = 1)
36 36
   {	
37 37
       $number = $this->uset_timezone();
38
-      $SERVER_GMT='0';
38
+      $SERVER_GMT = '0';
39 39
 
40
-      $result=$this->CI->db->query("select gmtoffset from timezone where id =".$number);
40
+      $result = $this->CI->db->query("select gmtoffset from timezone where id =".$number);
41 41
       $timezone_offset = $result->result();
42 42
 
43 43
       $USER_GMT = $timezone_offset['0']->gmtoffset;
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
       $year = $date_time_array['year'];
53 53
       $timestamp = mktime($hours, $minutes, $seconds, $month, $day, $year);
54 54
 
55
-      $timestamp = $timestamp+($USER_GMT-$SERVER_GMT);
55
+      $timestamp = $timestamp + ($USER_GMT - $SERVER_GMT);
56 56
       if ($fulldate == 1) {
57 57
 		$date = date("Y-m-d H:i:s", $timestamp);
58 58
       } else {
@@ -62,11 +62,11 @@  discard block
 block discarded – undo
62 62
       return $date;
63 63
   }
64 64
 
65
-  function convert_to_GMT($currDate,$fulldate = 1){
65
+  function convert_to_GMT($currDate, $fulldate = 1) {
66 66
       $number = $this->uset_timezone();
67
-      $SERVER_GMT='0';
67
+      $SERVER_GMT = '0';
68 68
 
69
-      $result=$this->CI->db->query("select gmtoffset from timezone where id =".$number);
69
+      $result = $this->CI->db->query("select gmtoffset from timezone where id =".$number);
70 70
       $timezone_offset = $result->result();
71 71
 
72 72
       $USER_GMT = $timezone_offset['0']->gmtoffset;
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,9 @@
 block discarded – undo
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')) exit('No direct script access allowed');
23
+if ( ! defined('BASEPATH')) {
24
+	exit('No direct script access allowed');
25
+}
24 26
 class Timezone {
25 27
   function __construct(){
26 28
 	$this->CI =& get_instance();
Please login to merge, or discard this patch.
web_interface/astpp/application/libraries/csvreader.php 3 patches
Indentation   +72 added lines, -72 removed lines patch added patch discarded remove patch
@@ -12,96 +12,96 @@
 block discarded – undo
12 12
 */
13 13
 class CSVReader {
14 14
 
15
-    var $fields;        /** columns names retrieved after parsing */
16
-    var $separator = ',';    /** separator used to explode each line */
15
+	var $fields;        /** columns names retrieved after parsing */
16
+	var $separator = ',';    /** separator used to explode each line */
17 17
 
18
-    /**
19
-     * Parse a text containing CSV formatted data.
20
-     *
21
-     * @access    public
22
-     * @param    string
23
-     * @return    array
24
-     */
25
-    function parse_text($p_Text) {
26
-        $lines = explode("\n", $p_Text);
27
-        return $this->parse_lines($lines);
28
-    }
18
+	/**
19
+	 * Parse a text containing CSV formatted data.
20
+	 *
21
+	 * @access    public
22
+	 * @param    string
23
+	 * @return    array
24
+	 */
25
+	function parse_text($p_Text) {
26
+		$lines = explode("\n", $p_Text);
27
+		return $this->parse_lines($lines);
28
+	}
29 29
 
30
-    /**
31
-     * Parse a file containing CSV formatted data.
32
-     *
33
-     * @access    public
34
-     * @param    string
35
-     * @return    array
36
-     */
37
-    function parse_file($p_Filepath,$config_variable,$check_header_flag=false) {
38
-        $lines = file($p_Filepath);
39
-        //Giving line numbers
40
-        for($i=0;$i<sizeof($lines);$i++)
41
-        {
30
+	/**
31
+	 * Parse a file containing CSV formatted data.
32
+	 *
33
+	 * @access    public
34
+	 * @param    string
35
+	 * @return    array
36
+	 */
37
+	function parse_file($p_Filepath,$config_variable,$check_header_flag=false) {
38
+		$lines = file($p_Filepath);
39
+		//Giving line numbers
40
+		for($i=0;$i<sizeof($lines);$i++)
41
+		{
42 42
         
43
-            if(trim($lines[$i]) != "")
44
-            {
45
-                $columnname = explode($this->separator, $lines[$i]);
46
-                for($i=0;$i<sizeof($columnname);$i++)
47
-                {
48
-                    $columnname[$i]=$columnname[$i];
49
-                }
50
-                 break;                    
51
-            }
52
-        }
43
+			if(trim($lines[$i]) != "")
44
+			{
45
+				$columnname = explode($this->separator, $lines[$i]);
46
+				for($i=0;$i<sizeof($columnname);$i++)
47
+				{
48
+					$columnname[$i]=$columnname[$i];
49
+				}
50
+				 break;                    
51
+			}
52
+		}
53 53
 	return $this->parse_lines($lines,$config_variable,$check_header_flag);
54
-    }
55
-    /**
56
-     * Parse an array of text lines containing CSV formatted data.
57
-     *
58
-     * @access    public
59
-     * @param    array
60
-     * @return    array
61
-     */
62
-    function parse_lines($p_CSVLines,$config_variable,$check_header_flag=false) {
54
+	}
55
+	/**
56
+	 * Parse an array of text lines containing CSV formatted data.
57
+	 *
58
+	 * @access    public
59
+	 * @param    array
60
+	 * @return    array
61
+	 */
62
+	function parse_lines($p_CSVLines,$config_variable,$check_header_flag=false) {
63 63
 //     echo "<pre>";
64
-         $t=0;    
65
-         $content=array();
66
-         $custom_array=array();
67
-         $i=0;
68
-         $flag_data=false;
69
-         $data_arr[0]=$config_variable;
70
-         $field_name_arr=array_keys($config_variable);
64
+		 $t=0;    
65
+		 $content=array();
66
+		 $custom_array=array();
67
+		 $i=0;
68
+		 $flag_data=false;
69
+		 $data_arr[0]=$config_variable;
70
+		 $field_name_arr=array_keys($config_variable);
71 71
 	foreach( $p_CSVLines as $line_num => $line )
72
-        {
72
+		{
73 73
 	  $line=trim($line);
74
-          if(!empty($line)){
75
-          // skip empty lines
76
-	      $elements = explode($this->separator, $line);
74
+		  if(!empty($line)){
75
+		  // skip empty lines
76
+		  $elements = explode($this->separator, $line);
77 77
 	      
78
-	      if(array_filter($elements,'trim')) {
78
+		  if(array_filter($elements,'trim')) {
79 79
 		$custom_array[]=$elements;
80
-	      }
81
-	      $i++;
80
+		  }
81
+		  $i++;
82 82
 	   }
83
-        }
83
+		}
84 84
         
85
-        if($check_header_flag == 'on'){
86
-         unset($custom_array[0]);
87
-        }
85
+		if($check_header_flag == 'on'){
86
+		 unset($custom_array[0]);
87
+		}
88 88
 	 foreach($custom_array as $data){
89 89
 	  $j=0;
90 90
 	  foreach($data as $key=>$value){
91
-	    $value=str_replace('"', '', $value);
92
-	    $value=str_replace("'", '', $value);
93
-	    if(isset($field_name_arr[$j])){
94
-	        $field_key_value =$config_variable[$field_name_arr[$j]];
91
+		$value=str_replace('"', '', $value);
92
+		$value=str_replace("'", '', $value);
93
+		if(isset($field_name_arr[$j])){
94
+			$field_key_value =$config_variable[$field_name_arr[$j]];
95 95
 		$value= strip_slashes(trim($value));
96
-                $value = preg_replace('#<script.*</script>#is', '', $value);
97
-                if(isset($field_key_value) && !empty($field_key_value))
96
+				$value = preg_replace('#<script.*</script>#is', '', $value);
97
+				if(isset($field_key_value) && !empty($field_key_value))
98 98
 		  $content[$field_key_value] =  strip_tags(filter_var($value, FILTER_SANITIZE_STRING));                  
99 99
 		$j++;
100
-	    }  
100
+		}  
101 101
 	  }
102 102
 	  $data_arr[]=$content;
103
-        }
104
-        return $data_arr;
105
-    }
103
+		}
104
+		return $data_arr;
105
+	}
106 106
 }
107 107
 ?>
Please login to merge, or discard this patch.
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
1
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2 2
 /**
3 3
 * CSVReader Class
4 4
 *
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
12 12
 */
13 13
 class CSVReader {
14 14
 
15
-    var $fields;        /** columns names retrieved after parsing */
16
-    var $separator = ',';    /** separator used to explode each line */
15
+    var $fields; /** columns names retrieved after parsing */
16
+    var $separator = ','; /** separator used to explode each line */
17 17
 
18 18
     /**
19 19
      * Parse a text containing CSV formatted data.
@@ -34,23 +34,23 @@  discard block
 block discarded – undo
34 34
      * @param    string
35 35
      * @return    array
36 36
      */
37
-    function parse_file($p_Filepath,$config_variable,$check_header_flag=false) {
37
+    function parse_file($p_Filepath, $config_variable, $check_header_flag = false) {
38 38
         $lines = file($p_Filepath);
39 39
         //Giving line numbers
40
-        for($i=0;$i<sizeof($lines);$i++)
40
+        for ($i = 0; $i < sizeof($lines); $i++)
41 41
         {
42 42
         
43
-            if(trim($lines[$i]) != "")
43
+            if (trim($lines[$i]) != "")
44 44
             {
45 45
                 $columnname = explode($this->separator, $lines[$i]);
46
-                for($i=0;$i<sizeof($columnname);$i++)
46
+                for ($i = 0; $i < sizeof($columnname); $i++)
47 47
                 {
48
-                    $columnname[$i]=$columnname[$i];
48
+                    $columnname[$i] = $columnname[$i];
49 49
                 }
50 50
                  break;                    
51 51
             }
52 52
         }
53
-	return $this->parse_lines($lines,$config_variable,$check_header_flag);
53
+	return $this->parse_lines($lines, $config_variable, $check_header_flag);
54 54
     }
55 55
     /**
56 56
      * Parse an array of text lines containing CSV formatted data.
@@ -59,47 +59,47 @@  discard block
 block discarded – undo
59 59
      * @param    array
60 60
      * @return    array
61 61
      */
62
-    function parse_lines($p_CSVLines,$config_variable,$check_header_flag=false) {
62
+    function parse_lines($p_CSVLines, $config_variable, $check_header_flag = false) {
63 63
 //     echo "<pre>";
64
-         $t=0;    
65
-         $content=array();
66
-         $custom_array=array();
67
-         $i=0;
68
-         $flag_data=false;
69
-         $data_arr[0]=$config_variable;
70
-         $field_name_arr=array_keys($config_variable);
71
-	foreach( $p_CSVLines as $line_num => $line )
64
+         $t = 0;    
65
+         $content = array();
66
+         $custom_array = array();
67
+         $i = 0;
68
+         $flag_data = false;
69
+         $data_arr[0] = $config_variable;
70
+         $field_name_arr = array_keys($config_variable);
71
+	foreach ($p_CSVLines as $line_num => $line)
72 72
         {
73
-	  $line=trim($line);
74
-          if(!empty($line)){
73
+	  $line = trim($line);
74
+          if ( ! empty($line)) {
75 75
           // skip empty lines
76 76
 	      $elements = explode($this->separator, $line);
77 77
 	      
78
-	      if(array_filter($elements,'trim')) {
79
-		$custom_array[]=$elements;
78
+	      if (array_filter($elements, 'trim')) {
79
+		$custom_array[] = $elements;
80 80
 	      }
81 81
 	      $i++;
82 82
 	   }
83 83
         }
84 84
         
85
-        if($check_header_flag == 'on'){
85
+        if ($check_header_flag == 'on') {
86 86
          unset($custom_array[0]);
87 87
         }
88
-	 foreach($custom_array as $data){
89
-	  $j=0;
90
-	  foreach($data as $key=>$value){
91
-	    $value=str_replace('"', '', $value);
92
-	    $value=str_replace("'", '', $value);
93
-	    if(isset($field_name_arr[$j])){
94
-	        $field_key_value =$config_variable[$field_name_arr[$j]];
95
-		$value= strip_slashes(trim($value));
88
+	 foreach ($custom_array as $data) {
89
+	  $j = 0;
90
+	  foreach ($data as $key=>$value) {
91
+	    $value = str_replace('"', '', $value);
92
+	    $value = str_replace("'", '', $value);
93
+	    if (isset($field_name_arr[$j])) {
94
+	        $field_key_value = $config_variable[$field_name_arr[$j]];
95
+		$value = strip_slashes(trim($value));
96 96
                 $value = preg_replace('#<script.*</script>#is', '', $value);
97
-                if(isset($field_key_value) && !empty($field_key_value))
98
-		  $content[$field_key_value] =  strip_tags(filter_var($value, FILTER_SANITIZE_STRING));                  
97
+                if (isset($field_key_value) && ! empty($field_key_value))
98
+		  $content[$field_key_value] = strip_tags(filter_var($value, FILTER_SANITIZE_STRING));                  
99 99
 		$j++;
100 100
 	    }  
101 101
 	  }
102
-	  $data_arr[]=$content;
102
+	  $data_arr[] = $content;
103 103
         }
104 104
         return $data_arr;
105 105
     }
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
1
+<?php if (!defined('BASEPATH')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
 * CSVReader Class
4 6
 *
@@ -94,8 +96,9 @@  discard block
 block discarded – undo
94 96
 	        $field_key_value =$config_variable[$field_name_arr[$j]];
95 97
 		$value= strip_slashes(trim($value));
96 98
                 $value = preg_replace('#<script.*</script>#is', '', $value);
97
-                if(isset($field_key_value) && !empty($field_key_value))
98
-		  $content[$field_key_value] =  strip_tags(filter_var($value, FILTER_SANITIZE_STRING));                  
99
+                if(isset($field_key_value) && !empty($field_key_value)) {
100
+                		  $content[$field_key_value] =  strip_tags(filter_var($value, FILTER_SANITIZE_STRING));
101
+                }
99 102
 		$j++;
100 103
 	    }  
101 104
 	  }
Please login to merge, or discard this patch.
web_interface/astpp/application/libraries/astpp/permission.php 3 patches
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -21,42 +21,42 @@
 block discarded – undo
21 21
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
22 22
 ###############################################################################
23 23
 if (!defined('BASEPATH'))
24
-    exit('No direct script access allowed');
24
+	exit('No direct script access allowed');
25 25
 
26 26
 class Permission {
27
-    function __construct($library_name = '') {
28
-        $this->CI = & get_instance();
27
+	function __construct($library_name = '') {
28
+		$this->CI = & get_instance();
29 29
 	$this->CI->load->model("db_model");
30 30
 	$this->CI->load->library('session');
31
-    }
31
+	}
32 32
 
33
-      function get_module_access($user_type){
34
-      $where = array("userlevelid"=>$user_type);
35
-       $modules_arr = $this->CI->db_model->getSelect("module_permissions","userlevels",$where);
36
-      if($modules_arr->num_rows > 0){
33
+	  function get_module_access($user_type){
34
+	  $where = array("userlevelid"=>$user_type);
35
+	   $modules_arr = $this->CI->db_model->getSelect("module_permissions","userlevels",$where);
36
+	  if($modules_arr->num_rows > 0){
37 37
 	$modules_arr = $modules_arr->result_array();
38 38
 	$modules_arr = $modules_arr[0]['module_permissions'];
39 39
 
40
-        $menu_arr = $this->CI->db_model->select("*","menu_modules","id IN ($modules_arr)","priority","asc","","","");
40
+		$menu_arr = $this->CI->db_model->select("*","menu_modules","id IN ($modules_arr)","priority","asc","","","");
41 41
 	$menu_list = array(); 
42 42
 	$permited_modules = array();
43
-        $modules_seq_arr = array();
44
-        $modules_seq_arr = explode(",",$modules_arr);
45
-        $label_arr=array();
46
-            foreach($menu_arr->result_array() as $menu_key =>$menu_value){ 
47
-                   if(!isset($label_arr[$menu_value['menu_label']]) && 	$menu_value['menu_label'] != 'Configuration'){
48
-		    $label_arr[$menu_value['menu_label']]=$menu_value['menu_label'];
49
-                    $menu_value["menu_image"] = ($menu_value["menu_image"] == "")?"Home.png":$menu_value["menu_image"];
50
-                    $menu_list[$menu_value["menu_title"]][$menu_value["menu_subtitle"]][] = array("menu_label" =>trim($menu_value["menu_label"]),
51
-                                                "module_url"=>trim($menu_value["module_url"]),"module"=>trim($menu_value["module_name"]),
52
-                                                "menu_image"=>trim($menu_value["menu_image"]));                    
43
+		$modules_seq_arr = array();
44
+		$modules_seq_arr = explode(",",$modules_arr);
45
+		$label_arr=array();
46
+			foreach($menu_arr->result_array() as $menu_key =>$menu_value){ 
47
+				   if(!isset($label_arr[$menu_value['menu_label']]) && 	$menu_value['menu_label'] != 'Configuration'){
48
+			$label_arr[$menu_value['menu_label']]=$menu_value['menu_label'];
49
+					$menu_value["menu_image"] = ($menu_value["menu_image"] == "")?"Home.png":$menu_value["menu_image"];
50
+					$menu_list[$menu_value["menu_title"]][$menu_value["menu_subtitle"]][] = array("menu_label" =>trim($menu_value["menu_label"]),
51
+												"module_url"=>trim($menu_value["module_url"]),"module"=>trim($menu_value["module_name"]),
52
+												"menu_image"=>trim($menu_value["menu_image"]));                    
53 53
 		   }
54
-                $permited_modules[] = trim($menu_value["module_name"]);
55
-            }                
56
-     	$this->CI->session->set_userdata('permited_modules',serialize($permited_modules));
54
+				$permited_modules[] = trim($menu_value["module_name"]);
55
+			}                
56
+	 	$this->CI->session->set_userdata('permited_modules',serialize($permited_modules));
57 57
 	$this->CI->session->set_userdata('menuinfo',serialize($menu_list));
58 58
   	return true;
59
-      }
60
-    }
59
+	  }
60
+	}
61 61
 }
62 62
 ?> 
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
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
 class Permission {
@@ -30,31 +30,31 @@  discard block
 block discarded – undo
30 30
 	$this->CI->load->library('session');
31 31
     }
32 32
 
33
-      function get_module_access($user_type){
33
+      function get_module_access($user_type) {
34 34
       $where = array("userlevelid"=>$user_type);
35
-       $modules_arr = $this->CI->db_model->getSelect("module_permissions","userlevels",$where);
36
-      if($modules_arr->num_rows > 0){
35
+       $modules_arr = $this->CI->db_model->getSelect("module_permissions", "userlevels", $where);
36
+      if ($modules_arr->num_rows > 0) {
37 37
 	$modules_arr = $modules_arr->result_array();
38 38
 	$modules_arr = $modules_arr[0]['module_permissions'];
39 39
 
40
-        $menu_arr = $this->CI->db_model->select("*","menu_modules","id IN ($modules_arr)","priority","asc","","","");
40
+        $menu_arr = $this->CI->db_model->select("*", "menu_modules", "id IN ($modules_arr)", "priority", "asc", "", "", "");
41 41
 	$menu_list = array(); 
42 42
 	$permited_modules = array();
43 43
         $modules_seq_arr = array();
44
-        $modules_seq_arr = explode(",",$modules_arr);
45
-        $label_arr=array();
46
-            foreach($menu_arr->result_array() as $menu_key =>$menu_value){ 
47
-                   if(!isset($label_arr[$menu_value['menu_label']]) && 	$menu_value['menu_label'] != 'Configuration'){
48
-		    $label_arr[$menu_value['menu_label']]=$menu_value['menu_label'];
49
-                    $menu_value["menu_image"] = ($menu_value["menu_image"] == "")?"Home.png":$menu_value["menu_image"];
44
+        $modules_seq_arr = explode(",", $modules_arr);
45
+        $label_arr = array();
46
+            foreach ($menu_arr->result_array() as $menu_key =>$menu_value) { 
47
+                   if ( ! isset($label_arr[$menu_value['menu_label']]) && $menu_value['menu_label'] != 'Configuration') {
48
+		    $label_arr[$menu_value['menu_label']] = $menu_value['menu_label'];
49
+                    $menu_value["menu_image"] = ($menu_value["menu_image"] == "") ? "Home.png" : $menu_value["menu_image"];
50 50
                     $menu_list[$menu_value["menu_title"]][$menu_value["menu_subtitle"]][] = array("menu_label" =>trim($menu_value["menu_label"]),
51
-                                                "module_url"=>trim($menu_value["module_url"]),"module"=>trim($menu_value["module_name"]),
51
+                                                "module_url"=>trim($menu_value["module_url"]), "module"=>trim($menu_value["module_name"]),
52 52
                                                 "menu_image"=>trim($menu_value["menu_image"]));                    
53 53
 		   }
54 54
                 $permited_modules[] = trim($menu_value["module_name"]);
55 55
             }                
56
-     	$this->CI->session->set_userdata('permited_modules',serialize($permited_modules));
57
-	$this->CI->session->set_userdata('menuinfo',serialize($menu_list));
56
+     	$this->CI->session->set_userdata('permited_modules', serialize($permited_modules));
57
+	$this->CI->session->set_userdata('menuinfo', serialize($menu_list));
58 58
   	return true;
59 59
       }
60 60
     }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,8 +20,9 @@
 block discarded – undo
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 = '') {
Please login to merge, or discard this patch.
astpp/application/libraries/html2pdf/_tcpdf_5.0.002/unicode_data.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -17855,7 +17855,7 @@  discard block
 block discarded – undo
17855 17855
  * at http://www.unicode.org/unicode/reports/tr9/
17856 17856
  */
17857 17857
 global $unicode_mirror;
17858
-$unicode_mirror = array (
17858
+$unicode_mirror = array(
17859 17859
 0x0028=>0x0029,
17860 17860
 0x0029=>0x0028,
17861 17861
 0x003C=>0x003E,
@@ -18298,7 +18298,7 @@  discard block
 block discarded – undo
18298 18298
  * char code=>isolated, final, initial, medial
18299 18299
  */
18300 18300
 global $laa_array;
18301
-$laa_array = array (
18301
+$laa_array = array(
18302 18302
 1570 =>array(65269, 65270, 65269, 65270),
18303 18303
 1571 =>array(65271, 65272, 65271, 65272),
18304 18304
 1573 =>array(65273, 65274, 65273, 65274),
@@ -18312,7 +18312,7 @@  discard block
 block discarded – undo
18312 18312
  * second NSM char code=>substitution char
18313 18313
  */
18314 18314
 global $diacritics;
18315
-$diacritics = array (
18315
+$diacritics = array(
18316 18316
 1612=>64606, # Shadda + Dammatan
18317 18317
 1613=>64607, # Shadda + Kasratan
18318 18318
 1614=>64608, # Shadda + Fatha
@@ -18324,23 +18324,23 @@  discard block
 block discarded – undo
18324 18324
  * Array of character substitutions from UTF-8 unicode to latin1
18325 18325
  */
18326 18326
 global $utf8tolatin;
18327
-$utf8tolatin = array (
18327
+$utf8tolatin = array(
18328 18328
 8364=>128, # Euro1
18329
-338=>140,  # OE
18330
-352=>138,  # Scaron
18331
-376=>159,  # Ydieresis
18332
-381=>142,  # Zcaron2
18329
+338=>140, # OE
18330
+352=>138, # Scaron
18331
+376=>159, # Ydieresis
18332
+381=>142, # Zcaron2
18333 18333
 8226=>149, # bullet3
18334
-710=>136,  # circumflex
18334
+710=>136, # circumflex
18335 18335
 8224=>134, # dagger
18336 18336
 8225=>135, # daggerdbl
18337 18337
 8230=>133, # ellipsis
18338 18338
 8212=>151, # emdash
18339 18339
 8211=>150, # endash
18340
-402=>131,  # florin
18340
+402=>131, # florin
18341 18341
 8249=>139, # guilsinglleft
18342 18342
 8250=>155, # guilsinglright
18343
-339=>156,  # oe
18343
+339=>156, # oe
18344 18344
 8240=>137, # perthousand
18345 18345
 8222=>132, # quotedblbase
18346 18346
 8220=>147, # quotedblleft
@@ -18348,8 +18348,8 @@  discard block
 block discarded – undo
18348 18348
 8216=>145, # quoteleft
18349 18349
 8217=>146, # quoteright
18350 18350
 8218=>130, # quotesinglbase
18351
-353=>154,  # scaron
18352
-732=>152,  # tilde
18351
+353=>154, # scaron
18352
+732=>152, # tilde
18353 18353
 8482=>153, # trademark
18354 18354
 382=>158   # zcaron2
18355 18355
 );
Please login to merge, or discard this patch.
astpp/application/libraries/html2pdf/_tcpdf_5.0.002/config/tcpdf_config.php 2 patches
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -31,22 +31,22 @@  discard block
 block discarded – undo
31 31
 
32 32
 // If you define the constant K_TCPDF_EXTERNAL_CONFIG, the following settings will be ignored.
33 33
 
34
-if (!defined('K_TCPDF_EXTERNAL_CONFIG')) {
34
+if ( ! defined('K_TCPDF_EXTERNAL_CONFIG')) {
35 35
 
36 36
 	// DOCUMENT_ROOT fix for IIS Webserver
37
-	if ((!isset($_SERVER['DOCUMENT_ROOT'])) OR (empty($_SERVER['DOCUMENT_ROOT']))) {
38
-		if(isset($_SERVER['SCRIPT_FILENAME'])) {
39
-			$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF'])));
40
-		} elseif(isset($_SERVER['PATH_TRANSLATED'])) {
41
-			$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0-strlen($_SERVER['PHP_SELF'])));
42
-		}	else {
37
+	if (( ! isset($_SERVER['DOCUMENT_ROOT'])) OR (empty($_SERVER['DOCUMENT_ROOT']))) {
38
+		if (isset($_SERVER['SCRIPT_FILENAME'])) {
39
+			$_SERVER['DOCUMENT_ROOT'] = str_replace('\\', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0 - strlen($_SERVER['PHP_SELF'])));
40
+		} elseif (isset($_SERVER['PATH_TRANSLATED'])) {
41
+			$_SERVER['DOCUMENT_ROOT'] = str_replace('\\', '/', substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0 - strlen($_SERVER['PHP_SELF'])));
42
+		} else {
43 43
 			// define here your DOCUMENT_ROOT path if the previous fails
44 44
 			$_SERVER['DOCUMENT_ROOT'] = '/var/www';
45 45
 		}
46 46
 	}
47 47
 
48 48
 	// Automatic calculation for the following K_PATH_MAIN constant
49
-	$k_path_main = str_replace( '\\', '/', realpath(substr(dirname(__FILE__), 0, 0-strlen('config'))));
49
+	$k_path_main = str_replace('\\', '/', realpath(substr(dirname(__FILE__), 0, 0 - strlen('config'))));
50 50
 	if (substr($k_path_main, -1) != '/') {
51 51
 		$k_path_main .= '/';
52 52
 	}
@@ -55,156 +55,156 @@  discard block
 block discarded – undo
55 55
 	 * Installation path (/var/www/tcpdf/).
56 56
 	 * By default it is automatically calculated but you can also set it as a fixed string to improve performances.
57 57
 	 */
58
-	define ('K_PATH_MAIN', $k_path_main);
58
+	define('K_PATH_MAIN', $k_path_main);
59 59
 
60 60
 	// Automatic calculation for the following K_PATH_URL constant
61 61
 	$k_path_url = $k_path_main; // default value for console mode
62
-	if (isset($_SERVER['HTTP_HOST']) AND (!empty($_SERVER['HTTP_HOST']))) {
63
-		if(isset($_SERVER['HTTPS']) AND (!empty($_SERVER['HTTPS'])) AND strtolower($_SERVER['HTTPS'])!='off') {
62
+	if (isset($_SERVER['HTTP_HOST']) AND ( ! empty($_SERVER['HTTP_HOST']))) {
63
+		if (isset($_SERVER['HTTPS']) AND ( ! empty($_SERVER['HTTPS'])) AND strtolower($_SERVER['HTTPS']) != 'off') {
64 64
 			$k_path_url = 'https://';
65 65
 		} else {
66 66
 			$k_path_url = 'http://';
67 67
 		}
68 68
 		$k_path_url .= $_SERVER['HTTP_HOST'];
69
-		$k_path_url .= str_replace( '\\', '/', substr($_SERVER['PHP_SELF'], 0, -24));
69
+		$k_path_url .= str_replace('\\', '/', substr($_SERVER['PHP_SELF'], 0, -24));
70 70
 	}
71 71
 
72 72
 	/**
73 73
 	 * URL path to tcpdf installation folder (http://localhost/tcpdf/).
74 74
 	 * By default it is automatically calculated but you can also set it as a fixed string to improve performances.
75 75
 	 */
76
-	define ('K_PATH_URL', $k_path_url);
76
+	define('K_PATH_URL', $k_path_url);
77 77
 
78 78
 	/**
79 79
 	 * path for PDF fonts
80 80
 	 * use K_PATH_MAIN.'fonts/old/' for old non-UTF8 fonts
81 81
 	 */
82
-	define ('K_PATH_FONTS', K_PATH_MAIN.'fonts/');
82
+	define('K_PATH_FONTS', K_PATH_MAIN.'fonts/');
83 83
 
84 84
 	/**
85 85
 	 * cache directory for temporary files (full path)
86 86
 	 */
87
-	define ('K_PATH_CACHE', K_PATH_MAIN.'cache/');
87
+	define('K_PATH_CACHE', K_PATH_MAIN.'cache/');
88 88
 
89 89
 	/**
90 90
 	 * cache directory for temporary files (url path)
91 91
 	 */
92
-	define ('K_PATH_URL_CACHE', K_PATH_URL.'cache/');
92
+	define('K_PATH_URL_CACHE', K_PATH_URL.'cache/');
93 93
 
94 94
 	/**
95 95
 	 *images directory
96 96
 	 */
97
-	define ('K_PATH_IMAGES', K_PATH_MAIN.'images/');
97
+	define('K_PATH_IMAGES', K_PATH_MAIN.'images/');
98 98
 
99 99
 	/**
100 100
 	 * blank image
101 101
 	 */
102
-	define ('K_BLANK_IMAGE', K_PATH_IMAGES.'_blank.png');
102
+	define('K_BLANK_IMAGE', K_PATH_IMAGES.'_blank.png');
103 103
 
104 104
 	/**
105 105
 	 * page format
106 106
 	 */
107
-	define ('PDF_PAGE_FORMAT', 'A4');
107
+	define('PDF_PAGE_FORMAT', 'A4');
108 108
 
109 109
 	/**
110 110
 	 * page orientation (P=portrait, L=landscape)
111 111
 	 */
112
-	define ('PDF_PAGE_ORIENTATION', 'P');
112
+	define('PDF_PAGE_ORIENTATION', 'P');
113 113
 
114 114
 	/**
115 115
 	 * document creator
116 116
 	 */
117
-	define ('PDF_CREATOR', 'TCPDF');
117
+	define('PDF_CREATOR', 'TCPDF');
118 118
 
119 119
 	/**
120 120
 	 * document author
121 121
 	 */
122
-	define ('PDF_AUTHOR', 'TCPDF');
122
+	define('PDF_AUTHOR', 'TCPDF');
123 123
 
124 124
 	/**
125 125
 	 * header title
126 126
 	 */
127
-	define ('PDF_HEADER_TITLE', 'TCPDF Example');
127
+	define('PDF_HEADER_TITLE', 'TCPDF Example');
128 128
 
129 129
 	/**
130 130
 	 * header description string
131 131
 	 */
132
-	define ('PDF_HEADER_STRING', "by Nicola Asuni - Tecnick.com\nwww.tcpdf.org");
132
+	define('PDF_HEADER_STRING', "by Nicola Asuni - Tecnick.com\nwww.tcpdf.org");
133 133
 
134 134
 	/**
135 135
 	 * image logo
136 136
 	 */
137
-	define ('PDF_HEADER_LOGO', 'tcpdf_logo.jpg');
137
+	define('PDF_HEADER_LOGO', 'tcpdf_logo.jpg');
138 138
 
139 139
 	/**
140 140
 	 * header logo image width [mm]
141 141
 	 */
142
-	define ('PDF_HEADER_LOGO_WIDTH', 30);
142
+	define('PDF_HEADER_LOGO_WIDTH', 30);
143 143
 
144 144
 	/**
145 145
 	 *  document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch]
146 146
 	 */
147
-	define ('PDF_UNIT', 'mm');
147
+	define('PDF_UNIT', 'mm');
148 148
 
149 149
 	/**
150 150
 	 * header margin
151 151
 	 */
152
-	define ('PDF_MARGIN_HEADER', 5);
152
+	define('PDF_MARGIN_HEADER', 5);
153 153
 
154 154
 	/**
155 155
 	 * footer margin
156 156
 	 */
157
-	define ('PDF_MARGIN_FOOTER', 10);
157
+	define('PDF_MARGIN_FOOTER', 10);
158 158
 
159 159
 	/**
160 160
 	 * top margin
161 161
 	 */
162
-	define ('PDF_MARGIN_TOP', 27);
162
+	define('PDF_MARGIN_TOP', 27);
163 163
 
164 164
 	/**
165 165
 	 * bottom margin
166 166
 	 */
167
-	define ('PDF_MARGIN_BOTTOM', 25);
167
+	define('PDF_MARGIN_BOTTOM', 25);
168 168
 
169 169
 	/**
170 170
 	 * left margin
171 171
 	 */
172
-	define ('PDF_MARGIN_LEFT', 15);
172
+	define('PDF_MARGIN_LEFT', 15);
173 173
 
174 174
 	/**
175 175
 	 * right margin
176 176
 	 */
177
-	define ('PDF_MARGIN_RIGHT', 15);
177
+	define('PDF_MARGIN_RIGHT', 15);
178 178
 
179 179
 	/**
180 180
 	 * default main font name
181 181
 	 */
182
-	define ('PDF_FONT_NAME_MAIN', 'helvetica');
182
+	define('PDF_FONT_NAME_MAIN', 'helvetica');
183 183
 
184 184
 	/**
185 185
 	 * default main font size
186 186
 	 */
187
-	define ('PDF_FONT_SIZE_MAIN', 10);
187
+	define('PDF_FONT_SIZE_MAIN', 10);
188 188
 
189 189
 	/**
190 190
 	 * default data font name
191 191
 	 */
192
-	define ('PDF_FONT_NAME_DATA', 'helvetica');
192
+	define('PDF_FONT_NAME_DATA', 'helvetica');
193 193
 
194 194
 	/**
195 195
 	 * default data font size
196 196
 	 */
197
-	define ('PDF_FONT_SIZE_DATA', 8);
197
+	define('PDF_FONT_SIZE_DATA', 8);
198 198
 
199 199
 	/**
200 200
 	 * default monospaced font name
201 201
 	 */
202
-	define ('PDF_FONT_MONOSPACED', 'courier');
202
+	define('PDF_FONT_MONOSPACED', 'courier');
203 203
 
204 204
 	/**
205 205
 	 * ratio used to adjust the conversion of pixels to user units
206 206
 	 */
207
-	define ('PDF_IMAGE_SCALE_RATIO', 1.25);
207
+	define('PDF_IMAGE_SCALE_RATIO', 1.25);
208 208
 
209 209
 	/**
210 210
 	 * magnification factor for titles
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 	/**
225 225
 	 * reduction factor for small font
226 226
 	 */
227
-	define('K_SMALL_RATIO', 2/3);
227
+	define('K_SMALL_RATIO', 2 / 3);
228 228
 
229 229
 	/**
230 230
 	 * set to true to enable the special procedure used to avoid the overlappind of symbols on Thai language
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 			$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF'])));
40 40
 		} elseif(isset($_SERVER['PATH_TRANSLATED'])) {
41 41
 			$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0-strlen($_SERVER['PHP_SELF'])));
42
-		}	else {
42
+		} else {
43 43
 			// define here your DOCUMENT_ROOT path if the previous fails
44 44
 			$_SERVER['DOCUMENT_ROOT'] = '/var/www';
45 45
 		}
Please login to merge, or discard this patch.
application/libraries/html2pdf/_tcpdf_5.0.002/config/tcpdf_config_alt.php 2 patches
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -30,19 +30,19 @@  discard block
 block discarded – undo
30 30
  */
31 31
 
32 32
 // DOCUMENT_ROOT fix for IIS Webserver
33
-if ((!isset($_SERVER['DOCUMENT_ROOT'])) OR (empty($_SERVER['DOCUMENT_ROOT']))) {
34
-	if(isset($_SERVER['SCRIPT_FILENAME'])) {
35
-		$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF'])));
36
-	} elseif(isset($_SERVER['PATH_TRANSLATED'])) {
37
-		$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0-strlen($_SERVER['PHP_SELF'])));
38
-	}	else {
33
+if (( ! isset($_SERVER['DOCUMENT_ROOT'])) OR (empty($_SERVER['DOCUMENT_ROOT']))) {
34
+	if (isset($_SERVER['SCRIPT_FILENAME'])) {
35
+		$_SERVER['DOCUMENT_ROOT'] = str_replace('\\', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0 - strlen($_SERVER['PHP_SELF'])));
36
+	} elseif (isset($_SERVER['PATH_TRANSLATED'])) {
37
+		$_SERVER['DOCUMENT_ROOT'] = str_replace('\\', '/', substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0 - strlen($_SERVER['PHP_SELF'])));
38
+	} else {
39 39
 		// define here your DOCUMENT_ROOT path if the previous fails
40 40
 		$_SERVER['DOCUMENT_ROOT'] = '/var/www';
41 41
 	}
42 42
 }
43 43
 
44 44
 // Automatic calculation for the following K_PATH_MAIN constant
45
-$k_path_main = str_replace( '\\', '/', realpath(substr(dirname(__FILE__), 0, 0-strlen('config'))));
45
+$k_path_main = str_replace('\\', '/', realpath(substr(dirname(__FILE__), 0, 0 - strlen('config'))));
46 46
 if (substr($k_path_main, -1) != '/') {
47 47
 	$k_path_main .= '/';
48 48
 }
@@ -51,155 +51,155 @@  discard block
 block discarded – undo
51 51
  * Installation path (/var/www/tcpdf/).
52 52
  * By default it is automatically calculated but you can also set it as a fixed string to improve performances.
53 53
  */
54
-define ('K_PATH_MAIN', $k_path_main);
54
+define('K_PATH_MAIN', $k_path_main);
55 55
 
56 56
 // Automatic calculation for the following K_PATH_URL constant
57
-if (isset($_SERVER['HTTP_HOST']) AND (!empty($_SERVER['HTTP_HOST']))) {
58
-	if(isset($_SERVER['HTTPS']) AND (!empty($_SERVER['HTTPS'])) AND strtolower($_SERVER['HTTPS'])!='off') {
57
+if (isset($_SERVER['HTTP_HOST']) AND ( ! empty($_SERVER['HTTP_HOST']))) {
58
+	if (isset($_SERVER['HTTPS']) AND ( ! empty($_SERVER['HTTPS'])) AND strtolower($_SERVER['HTTPS']) != 'off') {
59 59
 		$k_path_url = 'https://';
60 60
 	} else {
61 61
 		$k_path_url = 'http://';
62 62
 	}
63 63
 	$k_path_url .= $_SERVER['HTTP_HOST'];
64
-	$k_path_url .= str_replace( '\\', '/', substr($_SERVER['PHP_SELF'], 0, -24));
64
+	$k_path_url .= str_replace('\\', '/', substr($_SERVER['PHP_SELF'], 0, -24));
65 65
 }
66 66
 
67 67
 /**
68 68
  * URL path to tcpdf installation folder (http://localhost/tcpdf/).
69 69
  * By default it is automatically calculated but you can also set it as a fixed string to improve performances..
70 70
  */
71
-define ('K_PATH_URL', $k_path_url);
71
+define('K_PATH_URL', $k_path_url);
72 72
 
73 73
 /**
74 74
  * path for PDF fonts
75 75
  * use K_PATH_MAIN.'fonts/old/' for old non-UTF8 fonts
76 76
  */
77
-define ('K_PATH_FONTS', K_PATH_MAIN.'fonts/');
77
+define('K_PATH_FONTS', K_PATH_MAIN.'fonts/');
78 78
 
79 79
 /**
80 80
  * cache directory for temporary files (full path)
81 81
  */
82
-define ('K_PATH_CACHE', K_PATH_MAIN.'cache/');
82
+define('K_PATH_CACHE', K_PATH_MAIN.'cache/');
83 83
 
84 84
 /**
85 85
  * cache directory for temporary files (url path)
86 86
  */
87
-define ('K_PATH_URL_CACHE', K_PATH_URL.'cache/');
87
+define('K_PATH_URL_CACHE', K_PATH_URL.'cache/');
88 88
 
89 89
 /**
90 90
  *images directory
91 91
  */
92
-define ('K_PATH_IMAGES', K_PATH_MAIN.'images/');
92
+define('K_PATH_IMAGES', K_PATH_MAIN.'images/');
93 93
 
94 94
 /**
95 95
  * blank image
96 96
  */
97
-define ('K_BLANK_IMAGE', K_PATH_IMAGES.'_blank.png');
97
+define('K_BLANK_IMAGE', K_PATH_IMAGES.'_blank.png');
98 98
 
99 99
 /**
100 100
  * page format
101 101
  */
102
-define ('PDF_PAGE_FORMAT', 'A4');
102
+define('PDF_PAGE_FORMAT', 'A4');
103 103
 
104 104
 /**
105 105
  * page orientation (P=portrait, L=landscape)
106 106
  */
107
-define ('PDF_PAGE_ORIENTATION', 'P');
107
+define('PDF_PAGE_ORIENTATION', 'P');
108 108
 
109 109
 /**
110 110
  * document creator
111 111
  */
112
-define ('PDF_CREATOR', 'TCPDF');
112
+define('PDF_CREATOR', 'TCPDF');
113 113
 
114 114
 /**
115 115
  * document author
116 116
  */
117
-define ('PDF_AUTHOR', 'TCPDF');
117
+define('PDF_AUTHOR', 'TCPDF');
118 118
 
119 119
 /**
120 120
  * header title
121 121
  */
122
-define ('PDF_HEADER_TITLE', 'TCPDF Example');
122
+define('PDF_HEADER_TITLE', 'TCPDF Example');
123 123
 
124 124
 /**
125 125
  * header description string
126 126
  */
127
-define ('PDF_HEADER_STRING', "by Nicola Asuni - Tecnick.com\nwww.tcpdf.org");
127
+define('PDF_HEADER_STRING', "by Nicola Asuni - Tecnick.com\nwww.tcpdf.org");
128 128
 
129 129
 /**
130 130
  * image logo
131 131
  */
132
-define ('PDF_HEADER_LOGO', 'tcpdf_logo.jpg');
132
+define('PDF_HEADER_LOGO', 'tcpdf_logo.jpg');
133 133
 
134 134
 /**
135 135
  * header logo image width [mm]
136 136
  */
137
-define ('PDF_HEADER_LOGO_WIDTH', 30);
137
+define('PDF_HEADER_LOGO_WIDTH', 30);
138 138
 
139 139
 /**
140 140
  *  document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch]
141 141
  */
142
-define ('PDF_UNIT', 'mm');
142
+define('PDF_UNIT', 'mm');
143 143
 
144 144
 /**
145 145
  * header margin
146 146
  */
147
-define ('PDF_MARGIN_HEADER', 5);
147
+define('PDF_MARGIN_HEADER', 5);
148 148
 
149 149
 /**
150 150
  * footer margin
151 151
  */
152
-define ('PDF_MARGIN_FOOTER', 10);
152
+define('PDF_MARGIN_FOOTER', 10);
153 153
 
154 154
 /**
155 155
  * top margin
156 156
  */
157
-define ('PDF_MARGIN_TOP', 27);
157
+define('PDF_MARGIN_TOP', 27);
158 158
 
159 159
 /**
160 160
  * bottom margin
161 161
  */
162
-define ('PDF_MARGIN_BOTTOM', 25);
162
+define('PDF_MARGIN_BOTTOM', 25);
163 163
 
164 164
 /**
165 165
  * left margin
166 166
  */
167
-define ('PDF_MARGIN_LEFT', 15);
167
+define('PDF_MARGIN_LEFT', 15);
168 168
 
169 169
 /**
170 170
  * right margin
171 171
  */
172
-define ('PDF_MARGIN_RIGHT', 15);
172
+define('PDF_MARGIN_RIGHT', 15);
173 173
 
174 174
 /**
175 175
  * default main font name
176 176
  */
177
-define ('PDF_FONT_NAME_MAIN', 'helvetica');
177
+define('PDF_FONT_NAME_MAIN', 'helvetica');
178 178
 
179 179
 /**
180 180
  * default main font size
181 181
  */
182
-define ('PDF_FONT_SIZE_MAIN', 10);
182
+define('PDF_FONT_SIZE_MAIN', 10);
183 183
 
184 184
 /**
185 185
  * default data font name
186 186
  */
187
-define ('PDF_FONT_NAME_DATA', 'helvetica');
187
+define('PDF_FONT_NAME_DATA', 'helvetica');
188 188
 
189 189
 /**
190 190
  * default data font size
191 191
  */
192
-define ('PDF_FONT_SIZE_DATA', 8);
192
+define('PDF_FONT_SIZE_DATA', 8);
193 193
 
194 194
 /**
195 195
  * default monospaced font name
196 196
  */
197
-define ('PDF_FONT_MONOSPACED', 'courier');
197
+define('PDF_FONT_MONOSPACED', 'courier');
198 198
 
199 199
 /**
200 200
  * ratio used to adjust the conversion of pixels to user units
201 201
  */
202
-define ('PDF_IMAGE_SCALE_RATIO', 1.25);
202
+define('PDF_IMAGE_SCALE_RATIO', 1.25);
203 203
 
204 204
 /**
205 205
  * magnification factor for titles
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 /**
220 220
  * reduction factor for small font
221 221
  */
222
-define('K_SMALL_RATIO', 2/3);
222
+define('K_SMALL_RATIO', 2 / 3);
223 223
 
224 224
 /**
225 225
  * set to true to enable the special procedure used to avoid the overlappind of symbols on Thai language
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 		$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF'])));
36 36
 	} elseif(isset($_SERVER['PATH_TRANSLATED'])) {
37 37
 		$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0-strlen($_SERVER['PHP_SELF'])));
38
-	}	else {
38
+	} else {
39 39
 		// define here your DOCUMENT_ROOT path if the previous fails
40 40
 		$_SERVER['DOCUMENT_ROOT'] = '/var/www';
41 41
 	}
Please login to merge, or discard this patch.