@@ -27,12 +27,12 @@ discard block |
||
27 | 27 | class CI_Cart { |
28 | 28 | |
29 | 29 | // These are the regular expression rules that we use to validate the product ID and product name |
30 | - var $product_id_rules = '\.a-z0-9_-'; // alpha-numeric, dashes, underscores, or periods |
|
31 | - var $product_name_rules = '\.\:\-_ a-z0-9'; // alpha-numeric, dashes, underscores, colons or periods |
|
30 | + var $product_id_rules = '\.a-z0-9_-'; // alpha-numeric, dashes, underscores, or periods |
|
31 | + var $product_name_rules = '\.\:\-_ a-z0-9'; // alpha-numeric, dashes, underscores, colons or periods |
|
32 | 32 | |
33 | 33 | // Private variables. Do not change! |
34 | 34 | var $CI; |
35 | - var $_cart_contents = array(); |
|
35 | + var $_cart_contents = array(); |
|
36 | 36 | |
37 | 37 | |
38 | 38 | /** |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | public function __construct($params = array()) |
44 | 44 | { |
45 | 45 | // Set the super object to a local variable for use later |
46 | - $this->CI =& get_instance(); |
|
46 | + $this->CI = & get_instance(); |
|
47 | 47 | |
48 | 48 | // Are any config settings being passed manually? If so, set them |
49 | 49 | $config = array(); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | var $block_elements = 'address|blockquote|div|dl|fieldset|form|h\d|hr|noscript|object|ol|p|pre|script|table|ul'; |
31 | 31 | |
32 | 32 | // Elements that should not have <p> and <br /> tags within them. |
33 | - var $skip_elements = 'p|pre|ol|ul|dl|object|table|h\d'; |
|
33 | + var $skip_elements = 'p|pre|ol|ul|dl|object|table|h\d'; |
|
34 | 34 | |
35 | 35 | // Tags we want the parser to completely ignore when splitting the string. |
36 | 36 | var $inline_elements = 'a|abbr|acronym|b|bdo|big|br|button|cite|code|del|dfn|em|i|img|ins|input|label|map|kbd|q|samp|select|small|span|strong|sub|sup|textarea|tt|var'; |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | // [2] = <closing tag> |
125 | 125 | // Etc... |
126 | 126 | // } |
127 | - $chunks = preg_split('/(<(?:[^<>]+(?:"[^"]*"|\'[^\']*\')?)+>)/', $str, -1, PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY); |
|
127 | + $chunks = preg_split('/(<(?:[^<>]+(?:"[^"]*"|\'[^\']*\')?)+>)/', $str, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); |
|
128 | 128 | |
129 | 129 | // Build our finalized string. We cycle through the array, skipping tags, and processing the contained text |
130 | 130 | $str = ''; |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | { |
144 | 144 | if (preg_match("#".$this->skip_elements."#", $match[2])) |
145 | 145 | { |
146 | - $process = ($match[1] == '/') ? TRUE : FALSE; |
|
146 | + $process = ($match[1] == '/') ? TRUE : FALSE; |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | if ($match[1] == '') |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | return $str; |
325 | 325 | } |
326 | 326 | |
327 | - if (strpos($str, "\n") === FALSE && ! in_array($this->last_block_element, $this->inner_block_required)) |
|
327 | + if (strpos($str, "\n") === FALSE && ! in_array($this->last_block_element, $this->inner_block_required)) |
|
328 | 328 | { |
329 | 329 | return $str; |
330 | 330 | } |
@@ -341,7 +341,7 @@ discard block |
||
341 | 341 | // We trim off the right-side new line so that the closing </p> tag |
342 | 342 | // will be positioned immediately following the string, matching |
343 | 343 | // the behavior of the opening <p> tag |
344 | - $str = '<p>'.rtrim($str).'</p>'; |
|
344 | + $str = '<p>'.rtrim($str).'</p>'; |
|
345 | 345 | } |
346 | 346 | |
347 | 347 | // Remove empty paragraphs if they are on the first line, as this |
@@ -367,7 +367,7 @@ discard block |
||
367 | 367 | */ |
368 | 368 | function _protect_characters($match) |
369 | 369 | { |
370 | - return str_replace(array("'",'"','--',' '), array('{@SQ}', '{@DQ}', '{@DD}', '{@NBS}'), $match[0]); |
|
370 | + return str_replace(array("'", '"', '--', ' '), array('{@SQ}', '{@DQ}', '{@DD}', '{@NBS}'), $match[0]); |
|
371 | 371 | } |
372 | 372 | |
373 | 373 | // -------------------------------------------------------------------- |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | */ |
382 | 382 | function nl2br_except_pre($str) |
383 | 383 | { |
384 | - $ex = explode("pre>",$str); |
|
384 | + $ex = explode("pre>", $str); |
|
385 | 385 | $ct = count($ex); |
386 | 386 | |
387 | 387 | $newstr = ""; |
@@ -26,39 +26,39 @@ discard block |
||
26 | 26 | */ |
27 | 27 | class CI_Pagination { |
28 | 28 | |
29 | - var $base_url = ''; // The page we are linking to |
|
29 | + var $base_url = ''; // The page we are linking to |
|
30 | 30 | var $prefix = ''; // A custom prefix added to the path. |
31 | 31 | var $suffix = ''; // A custom suffix added to the path. |
32 | 32 | |
33 | - var $total_rows = 0; // Total number of items (database results) |
|
33 | + var $total_rows = 0; // Total number of items (database results) |
|
34 | 34 | var $per_page = 10; // Max number of items you want shown per page |
35 | - var $num_links = 2; // Number of "digit" links to show before/after the currently viewed page |
|
36 | - var $cur_page = 0; // The current page being viewed |
|
37 | - var $use_page_numbers = FALSE; // Use page number for segment instead of offset |
|
38 | - var $first_link = '‹ First'; |
|
35 | + var $num_links = 2; // Number of "digit" links to show before/after the currently viewed page |
|
36 | + var $cur_page = 0; // The current page being viewed |
|
37 | + var $use_page_numbers = FALSE; // Use page number for segment instead of offset |
|
38 | + var $first_link = '‹ First'; |
|
39 | 39 | var $next_link = '>'; |
40 | 40 | var $prev_link = '<'; |
41 | 41 | var $last_link = 'Last ›'; |
42 | - var $uri_segment = 3; |
|
43 | - var $full_tag_open = ''; |
|
42 | + var $uri_segment = 3; |
|
43 | + var $full_tag_open = ''; |
|
44 | 44 | var $full_tag_close = ''; |
45 | 45 | var $first_tag_open = ''; |
46 | 46 | var $first_tag_close = ' '; |
47 | - var $last_tag_open = ' '; |
|
47 | + var $last_tag_open = ' '; |
|
48 | 48 | var $last_tag_close = ''; |
49 | - var $first_url = ''; // Alternative URL for the First Page. |
|
50 | - var $cur_tag_open = ' <strong>'; |
|
49 | + var $first_url = ''; // Alternative URL for the First Page. |
|
50 | + var $cur_tag_open = ' <strong>'; |
|
51 | 51 | var $cur_tag_close = '</strong>'; |
52 | 52 | var $next_tag_open = ' '; |
53 | 53 | var $next_tag_close = ' '; |
54 | 54 | var $prev_tag_open = ' '; |
55 | 55 | var $prev_tag_close = ''; |
56 | - var $num_tag_open = ' '; |
|
56 | + var $num_tag_open = ' '; |
|
57 | 57 | var $num_tag_close = ''; |
58 | - var $page_query_string = FALSE; |
|
58 | + var $page_query_string = FALSE; |
|
59 | 59 | var $query_string_segment = 'per_page'; |
60 | 60 | var $display_pages = TRUE; |
61 | - var $anchor_class = ''; |
|
61 | + var $anchor_class = ''; |
|
62 | 62 | |
63 | 63 | /** |
64 | 64 | * Constructor |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | } |
141 | 141 | |
142 | 142 | // Determine the current page number. |
143 | - $CI =& get_instance(); |
|
143 | + $CI = & get_instance(); |
|
144 | 144 | |
145 | 145 | if ($CI->config->item('enable_query_strings') === TRUE OR $this->page_query_string === TRUE) |
146 | 146 | { |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | $this->cur_page = $CI->input->get($this->query_string_segment); |
150 | 150 | |
151 | 151 | // Prep the current page - no funny business! |
152 | - $this->cur_page = (int) $this->cur_page; |
|
152 | + $this->cur_page = (int)$this->cur_page; |
|
153 | 153 | } |
154 | 154 | } |
155 | 155 | else |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | $this->cur_page = $CI->uri->segment($this->uri_segment); |
160 | 160 | |
161 | 161 | // Prep the current page - no funny business! |
162 | - $this->cur_page = (int) $this->cur_page; |
|
162 | + $this->cur_page = (int)$this->cur_page; |
|
163 | 163 | } |
164 | 164 | } |
165 | 165 | |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | |
203 | 203 | if ( ! $this->use_page_numbers) |
204 | 204 | { |
205 | - $this->cur_page = floor(($this->cur_page/$this->per_page) + 1); |
|
205 | + $this->cur_page = floor(($this->cur_page / $this->per_page) + 1); |
|
206 | 206 | } |
207 | 207 | |
208 | 208 | // Calculate the start and end numbers. These determine |
@@ -218,21 +218,21 @@ discard block |
||
218 | 218 | } |
219 | 219 | else |
220 | 220 | { |
221 | - $this->base_url = rtrim($this->base_url, '/') .'/'; |
|
221 | + $this->base_url = rtrim($this->base_url, '/').'/'; |
|
222 | 222 | } |
223 | 223 | |
224 | 224 | // And here we go... |
225 | 225 | $output = ''; |
226 | 226 | |
227 | 227 | // Render the "First" link |
228 | - if ($this->first_link !== FALSE AND $this->cur_page > ($this->num_links + 1)) |
|
228 | + if ($this->first_link !== FALSE AND $this->cur_page > ($this->num_links + 1)) |
|
229 | 229 | { |
230 | 230 | $first_url = ($this->first_url == '') ? $this->base_url : $this->first_url; |
231 | 231 | $output .= $this->first_tag_open.'<a '.$this->anchor_class.'href="'.$first_url.'">'.$this->first_link.'</a>'.$this->first_tag_close; |
232 | 232 | } |
233 | 233 | |
234 | 234 | // Render the "previous" link |
235 | - if ($this->prev_link !== FALSE AND $this->cur_page != 1) |
|
235 | + if ($this->prev_link !== FALSE AND $this->cur_page != 1) |
|
236 | 236 | { |
237 | 237 | if ($this->use_page_numbers) |
238 | 238 | { |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | if ($this->display_pages !== FALSE) |
260 | 260 | { |
261 | 261 | // Write the digit links |
262 | - for ($loop = $start -1; $loop <= $end; $loop++) |
|
262 | + for ($loop = $start - 1; $loop <= $end; $loop++) |
|
263 | 263 | { |
264 | 264 | if ($this->use_page_numbers) |
265 | 265 | { |
@@ -26,55 +26,55 @@ discard block |
||
26 | 26 | */ |
27 | 27 | class CI_Image_lib { |
28 | 28 | |
29 | - var $image_library = 'gd2'; // Can be: imagemagick, netpbm, gd, gd2 |
|
29 | + var $image_library = 'gd2'; // Can be: imagemagick, netpbm, gd, gd2 |
|
30 | 30 | var $library_path = ''; |
31 | - var $dynamic_output = FALSE; // Whether to send to browser or write to disk |
|
31 | + var $dynamic_output = FALSE; // Whether to send to browser or write to disk |
|
32 | 32 | var $source_image = ''; |
33 | - var $new_image = ''; |
|
34 | - var $width = ''; |
|
33 | + var $new_image = ''; |
|
34 | + var $width = ''; |
|
35 | 35 | var $height = ''; |
36 | 36 | var $quality = '90'; |
37 | 37 | var $create_thumb = FALSE; |
38 | 38 | var $thumb_marker = '_thumb'; |
39 | - var $maintain_ratio = TRUE; // Whether to maintain aspect ratio when resizing or use hard values |
|
40 | - var $master_dim = 'auto'; // auto, height, or width. Determines what to use as the master dimension |
|
39 | + var $maintain_ratio = TRUE; // Whether to maintain aspect ratio when resizing or use hard values |
|
40 | + var $master_dim = 'auto'; // auto, height, or width. Determines what to use as the master dimension |
|
41 | 41 | var $rotation_angle = ''; |
42 | 42 | var $x_axis = ''; |
43 | 43 | var $y_axis = ''; |
44 | 44 | |
45 | 45 | // Watermark Vars |
46 | - var $wm_text = ''; // Watermark text if graphic is not used |
|
47 | - var $wm_type = 'text'; // Type of watermarking. Options: text/overlay |
|
46 | + var $wm_text = ''; // Watermark text if graphic is not used |
|
47 | + var $wm_type = 'text'; // Type of watermarking. Options: text/overlay |
|
48 | 48 | var $wm_x_transp = 4; |
49 | 49 | var $wm_y_transp = 4; |
50 | - var $wm_overlay_path = ''; // Watermark image path |
|
51 | - var $wm_font_path = ''; // TT font |
|
52 | - var $wm_font_size = 17; // Font size (different versions of GD will either use points or pixels) |
|
53 | - var $wm_vrt_alignment = 'B'; // Vertical alignment: T M B |
|
54 | - var $wm_hor_alignment = 'C'; // Horizontal alignment: L R C |
|
55 | - var $wm_padding = 0; // Padding around text |
|
56 | - var $wm_hor_offset = 0; // Lets you push text to the right |
|
57 | - var $wm_vrt_offset = 0; // Lets you push text down |
|
58 | - var $wm_font_color = '#ffffff'; // Text color |
|
59 | - var $wm_shadow_color = ''; // Dropshadow color |
|
60 | - var $wm_shadow_distance = 2; // Dropshadow distance |
|
61 | - var $wm_opacity = 50; // Image opacity: 1 - 100 Only works with image |
|
50 | + var $wm_overlay_path = ''; // Watermark image path |
|
51 | + var $wm_font_path = ''; // TT font |
|
52 | + var $wm_font_size = 17; // Font size (different versions of GD will either use points or pixels) |
|
53 | + var $wm_vrt_alignment = 'B'; // Vertical alignment: T M B |
|
54 | + var $wm_hor_alignment = 'C'; // Horizontal alignment: L R C |
|
55 | + var $wm_padding = 0; // Padding around text |
|
56 | + var $wm_hor_offset = 0; // Lets you push text to the right |
|
57 | + var $wm_vrt_offset = 0; // Lets you push text down |
|
58 | + var $wm_font_color = '#ffffff'; // Text color |
|
59 | + var $wm_shadow_color = ''; // Dropshadow color |
|
60 | + var $wm_shadow_distance = 2; // Dropshadow distance |
|
61 | + var $wm_opacity = 50; // Image opacity: 1 - 100 Only works with image |
|
62 | 62 | |
63 | 63 | // Private Vars |
64 | - var $source_folder = ''; |
|
64 | + var $source_folder = ''; |
|
65 | 65 | var $dest_folder = ''; |
66 | - var $mime_type = ''; |
|
66 | + var $mime_type = ''; |
|
67 | 67 | var $orig_width = ''; |
68 | 68 | var $orig_height = ''; |
69 | 69 | var $image_type = ''; |
70 | - var $size_str = ''; |
|
70 | + var $size_str = ''; |
|
71 | 71 | var $full_src_path = ''; |
72 | 72 | var $full_dst_path = ''; |
73 | - var $create_fnc = 'imagecreatetruecolor'; |
|
74 | - var $copy_fnc = 'imagecopyresampled'; |
|
75 | - var $error_msg = array(); |
|
76 | - var $wm_use_drop_shadow = FALSE; |
|
77 | - var $wm_use_truetype = FALSE; |
|
73 | + var $create_fnc = 'imagecreatetruecolor'; |
|
74 | + var $copy_fnc = 'imagecopyresampled'; |
|
75 | + var $error_msg = array(); |
|
76 | + var $wm_use_drop_shadow = FALSE; |
|
77 | + var $wm_use_truetype = FALSE; |
|
78 | 78 | |
79 | 79 | /** |
80 | 80 | * Constructor |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | $this->thumb_marker = ''; |
255 | 255 | } |
256 | 256 | |
257 | - $xp = $this->explode_name($this->dest_image); |
|
257 | + $xp = $this->explode_name($this->dest_image); |
|
258 | 258 | |
259 | 259 | $filename = $xp['name']; |
260 | 260 | $file_ext = $xp['ext']; |
@@ -405,13 +405,13 @@ discard block |
||
405 | 405 | // Reassign the width and height |
406 | 406 | if ($this->rotation_angle == 90 OR $this->rotation_angle == 270) |
407 | 407 | { |
408 | - $this->width = $this->orig_height; |
|
409 | - $this->height = $this->orig_width; |
|
408 | + $this->width = $this->orig_height; |
|
409 | + $this->height = $this->orig_width; |
|
410 | 410 | } |
411 | 411 | else |
412 | 412 | { |
413 | - $this->width = $this->orig_width; |
|
414 | - $this->height = $this->orig_height; |
|
413 | + $this->width = $this->orig_width; |
|
414 | + $this->height = $this->orig_height; |
|
415 | 415 | } |
416 | 416 | |
417 | 417 | |
@@ -502,13 +502,13 @@ discard block |
||
502 | 502 | // if ($this->image_library == 'gd2' AND function_exists('imagecreatetruecolor') AND $v2_override == FALSE) |
503 | 503 | if ($this->image_library == 'gd2' AND function_exists('imagecreatetruecolor')) |
504 | 504 | { |
505 | - $create = 'imagecreatetruecolor'; |
|
506 | - $copy = 'imagecopyresampled'; |
|
505 | + $create = 'imagecreatetruecolor'; |
|
506 | + $copy = 'imagecopyresampled'; |
|
507 | 507 | } |
508 | 508 | else |
509 | 509 | { |
510 | - $create = 'imagecreate'; |
|
511 | - $copy = 'imagecopyresized'; |
|
510 | + $create = 'imagecreate'; |
|
511 | + $copy = 'imagecopyresized'; |
|
512 | 512 | } |
513 | 513 | |
514 | 514 | $dst_img = $create($this->width, $this->height); |
@@ -694,8 +694,8 @@ discard block |
||
694 | 694 | // With NetPBM we have to create a temporary image. |
695 | 695 | // If you try manipulating the original it fails so |
696 | 696 | // we have to rename the temp file. |
697 | - copy ($this->dest_folder.'netpbm.tmp', $this->full_dst_path); |
|
698 | - unlink ($this->dest_folder.'netpbm.tmp'); |
|
697 | + copy($this->dest_folder.'netpbm.tmp', $this->full_dst_path); |
|
698 | + unlink($this->dest_folder.'netpbm.tmp'); |
|
699 | 699 | @chmod($this->full_dst_path, FILE_WRITE_MODE); |
700 | 700 | |
701 | 701 | return TRUE; |
@@ -722,7 +722,7 @@ discard block |
||
722 | 722 | // going to have to figure out how to determine the color |
723 | 723 | // of the alpha channel in a future release. |
724 | 724 | |
725 | - $white = imagecolorallocate($src_img, 255, 255, 255); |
|
725 | + $white = imagecolorallocate($src_img, 255, 255, 255); |
|
726 | 726 | |
727 | 727 | // Rotate it! |
728 | 728 | $dst_img = imagerotate($src_img, $this->rotation_angle, $white); |
@@ -777,7 +777,7 @@ discard block |
||
777 | 777 | for ($i = 0; $i < $height; $i++) |
778 | 778 | { |
779 | 779 | $left = 0; |
780 | - $right = $width-1; |
|
780 | + $right = $width - 1; |
|
781 | 781 | |
782 | 782 | while ($left < $right) |
783 | 783 | { |
@@ -797,7 +797,7 @@ discard block |
||
797 | 797 | for ($i = 0; $i < $width; $i++) |
798 | 798 | { |
799 | 799 | $top = 0; |
800 | - $bot = $height-1; |
|
800 | + $bot = $height - 1; |
|
801 | 801 | |
802 | 802 | while ($top < $bot) |
803 | 803 | { |
@@ -880,10 +880,10 @@ discard block |
||
880 | 880 | $this->get_image_properties(); |
881 | 881 | |
882 | 882 | // Fetch watermark image properties |
883 | - $props = $this->get_image_properties($this->wm_overlay_path, TRUE); |
|
884 | - $wm_img_type = $props['image_type']; |
|
885 | - $wm_width = $props['width']; |
|
886 | - $wm_height = $props['height']; |
|
883 | + $props = $this->get_image_properties($this->wm_overlay_path, TRUE); |
|
884 | + $wm_img_type = $props['image_type']; |
|
885 | + $wm_width = $props['width']; |
|
886 | + $wm_height = $props['height']; |
|
887 | 887 | |
888 | 888 | // Create two image resources |
889 | 889 | $wm_img = $this->image_create_gd($this->wm_overlay_path, $wm_img_type); |
@@ -998,8 +998,8 @@ discard block |
||
998 | 998 | $this->get_image_properties(); |
999 | 999 | |
1000 | 1000 | // Set RGB values for text and shadow |
1001 | - $this->wm_font_color = str_replace('#', '', $this->wm_font_color); |
|
1002 | - $this->wm_shadow_color = str_replace('#', '', $this->wm_shadow_color); |
|
1001 | + $this->wm_font_color = str_replace('#', '', $this->wm_font_color); |
|
1002 | + $this->wm_shadow_color = str_replace('#', '', $this->wm_shadow_color); |
|
1003 | 1003 | |
1004 | 1004 | $R1 = hexdec(substr($this->wm_font_color, 0, 2)); |
1005 | 1005 | $G1 = hexdec(substr($this->wm_font_color, 2, 2)); |
@@ -1033,7 +1033,7 @@ discard block |
||
1033 | 1033 | if ($this->wm_font_size == '') |
1034 | 1034 | $this->wm_font_size = '17'; |
1035 | 1035 | |
1036 | - $fontwidth = $this->wm_font_size-($this->wm_font_size/4); |
|
1036 | + $fontwidth = $this->wm_font_size - ($this->wm_font_size / 4); |
|
1037 | 1037 | $fontheight = $this->wm_font_size; |
1038 | 1038 | $this->wm_vrt_offset += $this->wm_font_size; |
1039 | 1039 | } |
@@ -1058,9 +1058,9 @@ discard block |
||
1058 | 1058 | { |
1059 | 1059 | case "T" : |
1060 | 1060 | break; |
1061 | - case "M": $y_axis += ($this->orig_height/2)+($fontheight/2); |
|
1061 | + case "M": $y_axis += ($this->orig_height / 2) + ($fontheight / 2); |
|
1062 | 1062 | break; |
1063 | - case "B": $y_axis += ($this->orig_height - $fontheight - $this->wm_shadow_distance - ($fontheight/2)); |
|
1063 | + case "B": $y_axis += ($this->orig_height - $fontheight - $this->wm_shadow_distance - ($fontheight / 2)); |
|
1064 | 1064 | break; |
1065 | 1065 | } |
1066 | 1066 | |
@@ -1074,13 +1074,13 @@ discard block |
||
1074 | 1074 | break; |
1075 | 1075 | case "R": |
1076 | 1076 | if ($this->wm_use_drop_shadow) |
1077 | - $x_shad += ($this->orig_width - $fontwidth*strlen($this->wm_text)); |
|
1078 | - $x_axis += ($this->orig_width - $fontwidth*strlen($this->wm_text)); |
|
1077 | + $x_shad += ($this->orig_width - $fontwidth * strlen($this->wm_text)); |
|
1078 | + $x_axis += ($this->orig_width - $fontwidth * strlen($this->wm_text)); |
|
1079 | 1079 | break; |
1080 | 1080 | case "C": |
1081 | 1081 | if ($this->wm_use_drop_shadow) |
1082 | - $x_shad += floor(($this->orig_width - $fontwidth*strlen($this->wm_text))/2); |
|
1083 | - $x_axis += floor(($this->orig_width -$fontwidth*strlen($this->wm_text))/2); |
|
1082 | + $x_shad += floor(($this->orig_width - $fontwidth * strlen($this->wm_text)) / 2); |
|
1083 | + $x_axis += floor(($this->orig_width - $fontwidth * strlen($this->wm_text)) / 2); |
|
1084 | 1084 | break; |
1085 | 1085 | } |
1086 | 1086 | |
@@ -1286,10 +1286,10 @@ discard block |
||
1286 | 1286 | if ( ! is_numeric($this->orig_width) OR ! is_numeric($this->orig_height) OR $this->orig_width == 0 OR $this->orig_height == 0) |
1287 | 1287 | return; |
1288 | 1288 | |
1289 | - $new_width = ceil($this->orig_width*$this->height/$this->orig_height); |
|
1290 | - $new_height = ceil($this->width*$this->orig_height/$this->orig_width); |
|
1289 | + $new_width = ceil($this->orig_width * $this->height / $this->orig_height); |
|
1290 | + $new_height = ceil($this->width * $this->orig_height / $this->orig_width); |
|
1291 | 1291 | |
1292 | - $ratio = (($this->orig_height/$this->orig_width) - ($this->height/$this->width)); |
|
1292 | + $ratio = (($this->orig_height / $this->orig_width) - ($this->height / $this->width)); |
|
1293 | 1293 | |
1294 | 1294 | if ($this->master_dim != 'width' AND $this->master_dim != 'height') |
1295 | 1295 | { |
@@ -1345,14 +1345,14 @@ discard block |
||
1345 | 1345 | $v['width'] = $vals['0']; |
1346 | 1346 | $v['height'] = $vals['1']; |
1347 | 1347 | $v['image_type'] = $vals['2']; |
1348 | - $v['size_str'] = $vals['3']; |
|
1348 | + $v['size_str'] = $vals['3']; |
|
1349 | 1349 | $v['mime_type'] = $mime; |
1350 | 1350 | |
1351 | 1351 | return $v; |
1352 | 1352 | } |
1353 | 1353 | |
1354 | 1354 | $this->orig_width = $vals['0']; |
1355 | - $this->orig_height = $vals['1']; |
|
1355 | + $this->orig_height = $vals['1']; |
|
1356 | 1356 | $this->image_type = $vals['2']; |
1357 | 1357 | $this->size_str = $vals['3']; |
1358 | 1358 | $this->mime_type = $mime; |
@@ -1402,11 +1402,11 @@ discard block |
||
1402 | 1402 | |
1403 | 1403 | if ($vals['new_width'] == 0) |
1404 | 1404 | { |
1405 | - $vals['new_width'] = ceil($vals['width']*$vals['new_height']/$vals['height']); |
|
1405 | + $vals['new_width'] = ceil($vals['width'] * $vals['new_height'] / $vals['height']); |
|
1406 | 1406 | } |
1407 | 1407 | elseif ($vals['new_height'] == 0) |
1408 | 1408 | { |
1409 | - $vals['new_height'] = ceil($vals['new_width']*$vals['height']/$vals['width']); |
|
1409 | + $vals['new_height'] = ceil($vals['new_width'] * $vals['height'] / $vals['width']); |
|
1410 | 1410 | } |
1411 | 1411 | |
1412 | 1412 | return $vals; |
@@ -1489,7 +1489,7 @@ discard block |
||
1489 | 1489 | */ |
1490 | 1490 | function set_error($msg) |
1491 | 1491 | { |
1492 | - $CI =& get_instance(); |
|
1492 | + $CI = & get_instance(); |
|
1493 | 1493 | $CI->lang->load('imglib'); |
1494 | 1494 | |
1495 | 1495 | if (is_array($msg)) |
@@ -28,13 +28,13 @@ discard block |
||
28 | 28 | */ |
29 | 29 | class CI_Table { |
30 | 30 | |
31 | - var $rows = array(); |
|
31 | + var $rows = array(); |
|
32 | 32 | var $heading = array(); |
33 | - var $auto_heading = TRUE; |
|
33 | + var $auto_heading = TRUE; |
|
34 | 34 | var $caption = NULL; |
35 | 35 | var $template = NULL; |
36 | 36 | var $newline = "\n"; |
37 | - var $empty_cells = ""; |
|
37 | + var $empty_cells = ""; |
|
38 | 38 | var $function = FALSE; |
39 | 39 | |
40 | 40 | public function __construct() |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | if ($this->caption) |
269 | 269 | { |
270 | 270 | $out .= $this->newline; |
271 | - $out .= '<caption>' . $this->caption . '</caption>'; |
|
271 | + $out .= '<caption>'.$this->caption.'</caption>'; |
|
272 | 272 | $out .= $this->newline; |
273 | 273 | } |
274 | 274 | |
@@ -383,9 +383,9 @@ discard block |
||
383 | 383 | */ |
384 | 384 | function clear() |
385 | 385 | { |
386 | - $this->rows = array(); |
|
387 | - $this->heading = array(); |
|
388 | - $this->auto_heading = TRUE; |
|
386 | + $this->rows = array(); |
|
387 | + $this->heading = array(); |
|
388 | + $this->auto_heading = TRUE; |
|
389 | 389 | } |
390 | 390 | |
391 | 391 | // -------------------------------------------------------------------- |
@@ -495,7 +495,7 @@ discard block |
||
495 | 495 | */ |
496 | 496 | function _default_template() |
497 | 497 | { |
498 | - return array ( |
|
498 | + return array( |
|
499 | 499 | 'table_open' => '<table border="0" cellpadding="4" cellspacing="0">', |
500 | 500 | |
501 | 501 | 'thead_open' => '<thead>', |
@@ -30,12 +30,12 @@ discard block |
||
30 | 30 | * @author ExpressionEngine Dev Team |
31 | 31 | * @link http://codeigniter.com/user_guide/libraries/zip.html |
32 | 32 | */ |
33 | -class CI_Zip { |
|
33 | +class CI_Zip { |
|
34 | 34 | |
35 | 35 | var $zipdata = ''; |
36 | - var $directory = ''; |
|
36 | + var $directory = ''; |
|
37 | 37 | var $entries = 0; |
38 | - var $file_num = 0; |
|
38 | + var $file_num = 0; |
|
39 | 39 | var $offset = 0; |
40 | 40 | var $now; |
41 | 41 | |
@@ -128,9 +128,9 @@ discard block |
||
128 | 128 | "\x50\x4b\x01\x02\x00\x00\x0a\x00\x00\x00\x00\x00" |
129 | 129 | .pack('v', $file_mtime) |
130 | 130 | .pack('v', $file_mdate) |
131 | - .pack('V',0) // crc32 |
|
132 | - .pack('V',0) // compressed filesize |
|
133 | - .pack('V',0) // uncompressed filesize |
|
131 | + .pack('V', 0) // crc32 |
|
132 | + .pack('V', 0) // compressed filesize |
|
133 | + .pack('V', 0) // uncompressed filesize |
|
134 | 134 | .pack('v', strlen($dir)) // length of pathname |
135 | 135 | .pack('v', 0) // extra field length |
136 | 136 | .pack('v', 0) // file comment length |
@@ -387,12 +387,12 @@ discard block |
||
387 | 387 | $filename .= '.zip'; |
388 | 388 | } |
389 | 389 | |
390 | - $CI =& get_instance(); |
|
390 | + $CI = & get_instance(); |
|
391 | 391 | $CI->load->helper('download'); |
392 | 392 | |
393 | 393 | $get_zip = $this->get_zip(); |
394 | 394 | |
395 | - $zip_content =& $get_zip; |
|
395 | + $zip_content = & $get_zip; |
|
396 | 396 | |
397 | 397 | force_download($filename, $zip_content); |
398 | 398 | } |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | $this->directory = ''; |
415 | 415 | $this->entries = 0; |
416 | 416 | $this->file_num = 0; |
417 | - $this->offset = 0; |
|
417 | + $this->offset = 0; |
|
418 | 418 | } |
419 | 419 | |
420 | 420 | } |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | public function __construct($params) |
38 | 38 | { |
39 | - $this->CI =& get_instance(); |
|
39 | + $this->CI = & get_instance(); |
|
40 | 40 | extract($params); |
41 | 41 | |
42 | 42 | if ($autoload === TRUE) |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | */ |
178 | 178 | function _hover($element = 'this', $over, $out) |
179 | 179 | { |
180 | - $event = "\n\t$(" . $this->_prep_element($element) . ").hover(\n\t\tfunction()\n\t\t{\n\t\t\t{$over}\n\t\t}, \n\t\tfunction()\n\t\t{\n\t\t\t{$out}\n\t\t});\n"; |
|
180 | + $event = "\n\t$(".$this->_prep_element($element).").hover(\n\t\tfunction()\n\t\t{\n\t\t\t{$over}\n\t\t}, \n\t\tfunction()\n\t\t{\n\t\t\t{$out}\n\t\t});\n"; |
|
181 | 181 | |
182 | 182 | $this->jquery_code_for_compile[] = $event; |
183 | 183 | |
@@ -392,10 +392,10 @@ discard block |
||
392 | 392 | * @param string - element |
393 | 393 | * @return string |
394 | 394 | */ |
395 | - function _addClass($element = 'this', $class='') |
|
395 | + function _addClass($element = 'this', $class = '') |
|
396 | 396 | { |
397 | 397 | $element = $this->_prep_element($element); |
398 | - $str = "$({$element}).addClass(\"$class\");"; |
|
398 | + $str = "$({$element}).addClass(\"$class\");"; |
|
399 | 399 | return $str; |
400 | 400 | } |
401 | 401 | |
@@ -436,7 +436,7 @@ discard block |
||
436 | 436 | $extra = ', '.$extra; |
437 | 437 | } |
438 | 438 | |
439 | - $str = "$({$element}).animate({\n$animations\n\t\t}".$speed.$extra.");"; |
|
439 | + $str = "$({$element}).animate({\n$animations\n\t\t}".$speed.$extra.");"; |
|
440 | 440 | |
441 | 441 | return $str; |
442 | 442 | } |
@@ -464,7 +464,7 @@ discard block |
||
464 | 464 | $callback = ", function(){\n{$callback}\n}"; |
465 | 465 | } |
466 | 466 | |
467 | - $str = "$({$element}).fadeIn({$speed}{$callback});"; |
|
467 | + $str = "$({$element}).fadeIn({$speed}{$callback});"; |
|
468 | 468 | |
469 | 469 | return $str; |
470 | 470 | } |
@@ -492,7 +492,7 @@ discard block |
||
492 | 492 | $callback = ", function(){\n{$callback}\n}"; |
493 | 493 | } |
494 | 494 | |
495 | - $str = "$({$element}).fadeOut({$speed}{$callback});"; |
|
495 | + $str = "$({$element}).fadeOut({$speed}{$callback});"; |
|
496 | 496 | |
497 | 497 | return $str; |
498 | 498 | } |
@@ -520,7 +520,7 @@ discard block |
||
520 | 520 | $callback = ", function(){\n{$callback}\n}"; |
521 | 521 | } |
522 | 522 | |
523 | - $str = "$({$element}).hide({$speed}{$callback});"; |
|
523 | + $str = "$({$element}).hide({$speed}{$callback});"; |
|
524 | 524 | |
525 | 525 | return $str; |
526 | 526 | } |
@@ -536,10 +536,10 @@ discard block |
||
536 | 536 | * @param string - element |
537 | 537 | * @return string |
538 | 538 | */ |
539 | - function _removeClass($element = 'this', $class='') |
|
539 | + function _removeClass($element = 'this', $class = '') |
|
540 | 540 | { |
541 | 541 | $element = $this->_prep_element($element); |
542 | - $str = "$({$element}).removeClass(\"$class\");"; |
|
542 | + $str = "$({$element}).removeClass(\"$class\");"; |
|
543 | 543 | return $str; |
544 | 544 | } |
545 | 545 | |
@@ -566,7 +566,7 @@ discard block |
||
566 | 566 | $callback = ", function(){\n{$callback}\n}"; |
567 | 567 | } |
568 | 568 | |
569 | - $str = "$({$element}).slideUp({$speed}{$callback});"; |
|
569 | + $str = "$({$element}).slideUp({$speed}{$callback});"; |
|
570 | 570 | |
571 | 571 | return $str; |
572 | 572 | } |
@@ -594,7 +594,7 @@ discard block |
||
594 | 594 | $callback = ", function(){\n{$callback}\n}"; |
595 | 595 | } |
596 | 596 | |
597 | - $str = "$({$element}).slideDown({$speed}{$callback});"; |
|
597 | + $str = "$({$element}).slideDown({$speed}{$callback});"; |
|
598 | 598 | |
599 | 599 | return $str; |
600 | 600 | } |
@@ -622,7 +622,7 @@ discard block |
||
622 | 622 | $callback = ", function(){\n{$callback}\n}"; |
623 | 623 | } |
624 | 624 | |
625 | - $str = "$({$element}).slideToggle({$speed}{$callback});"; |
|
625 | + $str = "$({$element}).slideToggle({$speed}{$callback});"; |
|
626 | 626 | |
627 | 627 | return $str; |
628 | 628 | } |
@@ -641,7 +641,7 @@ discard block |
||
641 | 641 | function _toggle($element = 'this') |
642 | 642 | { |
643 | 643 | $element = $this->_prep_element($element); |
644 | - $str = "$({$element}).toggle();"; |
|
644 | + $str = "$({$element}).toggle();"; |
|
645 | 645 | return $str; |
646 | 646 | } |
647 | 647 | |
@@ -656,10 +656,10 @@ discard block |
||
656 | 656 | * @param string - element |
657 | 657 | * @return string |
658 | 658 | */ |
659 | - function _toggleClass($element = 'this', $class='') |
|
659 | + function _toggleClass($element = 'this', $class = '') |
|
660 | 660 | { |
661 | 661 | $element = $this->_prep_element($element); |
662 | - $str = "$({$element}).toggleClass(\"$class\");"; |
|
662 | + $str = "$({$element}).toggleClass(\"$class\");"; |
|
663 | 663 | return $str; |
664 | 664 | } |
665 | 665 | |
@@ -686,7 +686,7 @@ discard block |
||
686 | 686 | $callback = ", function(){\n{$callback}\n}"; |
687 | 687 | } |
688 | 688 | |
689 | - $str = "$({$element}).show({$speed}{$callback});"; |
|
689 | + $str = "$({$element}).show({$speed}{$callback});"; |
|
690 | 690 | |
691 | 691 | return $str; |
692 | 692 | } |
@@ -719,7 +719,7 @@ discard block |
||
719 | 719 | } |
720 | 720 | else |
721 | 721 | { |
722 | - $loading_notifier = '<img src=\'' . $this->CI->config->slash_item('base_url') . $this->CI->config->item('javascript_ajax_img') . '\' alt=\'Loading\' />'; |
|
722 | + $loading_notifier = '<img src=\''.$this->CI->config->slash_item('base_url').$this->CI->config->item('javascript_ajax_img').'\' alt=\'Loading\' />'; |
|
723 | 723 | } |
724 | 724 | |
725 | 725 | $updater = "$($container).empty();\n"; // anything that was in... get it out |
@@ -754,7 +754,7 @@ discard block |
||
754 | 754 | { |
755 | 755 | $class = ($class != '') ? '.'.$class : ''; |
756 | 756 | |
757 | - $zebra = "\t\$(\"table{$class} tbody tr:nth-child(even)\").addClass(\"{$odd}\");"; |
|
757 | + $zebra = "\t\$(\"table{$class} tbody tr:nth-child(even)\").addClass(\"{$odd}\");"; |
|
758 | 758 | |
759 | 759 | $this->jquery_code_for_compile[] = $zebra; |
760 | 760 | |
@@ -791,7 +791,7 @@ discard block |
||
791 | 791 | $corner_style = '"'.$corner_style.'"'; |
792 | 792 | } |
793 | 793 | |
794 | - return "$(" . $this->_prep_element($element) . ").corner(".$corner_style.");"; |
|
794 | + return "$(".$this->_prep_element($element).").corner(".$corner_style.");"; |
|
795 | 795 | } |
796 | 796 | |
797 | 797 | // -------------------------------------------------------------------- |
@@ -880,7 +880,7 @@ discard block |
||
880 | 880 | $sort_options = ''; |
881 | 881 | } |
882 | 882 | |
883 | - return "$(" . $this->_prep_element($element) . ").sortable({".$sort_options."\n\t});"; |
|
883 | + return "$(".$this->_prep_element($element).").sortable({".$sort_options."\n\t});"; |
|
884 | 884 | } |
885 | 885 | |
886 | 886 | // -------------------------------------------------------------------- |
@@ -895,7 +895,7 @@ discard block |
||
895 | 895 | */ |
896 | 896 | function tablesorter($table = '', $options = '') |
897 | 897 | { |
898 | - $this->jquery_code_for_compile[] = "\t$(" . $this->_prep_element($table) . ").tablesorter($options);\n"; |
|
898 | + $this->jquery_code_for_compile[] = "\t$(".$this->_prep_element($table).").tablesorter($options);\n"; |
|
899 | 899 | } |
900 | 900 | |
901 | 901 | // -------------------------------------------------------------------- |
@@ -921,7 +921,7 @@ discard block |
||
921 | 921 | |
922 | 922 | } |
923 | 923 | |
924 | - $event = "\n\t$(" . $this->_prep_element($element) . ").{$event}(function(){\n\t\t{$js}\n\t});\n"; |
|
924 | + $event = "\n\t$(".$this->_prep_element($element).").{$event}(function(){\n\t\t{$js}\n\t});\n"; |
|
925 | 925 | $this->jquery_code_for_compile[] = $event; |
926 | 926 | return $event; |
927 | 927 | } |
@@ -943,14 +943,14 @@ discard block |
||
943 | 943 | $external_scripts = implode('', $this->jquery_code_for_load); |
944 | 944 | $this->CI->load->vars(array('library_src' => $external_scripts)); |
945 | 945 | |
946 | - if (count($this->jquery_code_for_compile) == 0 ) |
|
946 | + if (count($this->jquery_code_for_compile) == 0) |
|
947 | 947 | { |
948 | 948 | // no inline references, let's just return |
949 | 949 | return; |
950 | 950 | } |
951 | 951 | |
952 | 952 | // Inline references |
953 | - $script = '$(document).ready(function() {' . "\n"; |
|
953 | + $script = '$(document).ready(function() {'."\n"; |
|
954 | 954 | $script .= implode('', $this->jquery_code_for_compile); |
955 | 955 | $script .= '});'; |
956 | 956 | |
@@ -989,7 +989,7 @@ discard block |
||
989 | 989 | { |
990 | 990 | if ( ! is_array($js)) |
991 | 991 | { |
992 | - $js = array ($js); |
|
992 | + $js = array($js); |
|
993 | 993 | |
994 | 994 | } |
995 | 995 |
@@ -29,9 +29,9 @@ discard block |
||
29 | 29 | var $hostname = ''; |
30 | 30 | var $username = ''; |
31 | 31 | var $password = ''; |
32 | - var $port = 21; |
|
32 | + var $port = 21; |
|
33 | 33 | var $passive = TRUE; |
34 | - var $debug = FALSE; |
|
34 | + var $debug = FALSE; |
|
35 | 35 | var $conn_id = FALSE; |
36 | 36 | |
37 | 37 | |
@@ -417,7 +417,7 @@ discard block |
||
417 | 417 | } |
418 | 418 | |
419 | 419 | // Add a trailing slash to the file path if needed |
420 | - $filepath = preg_replace("/(.+?)\/*$/", "\\1/", $filepath); |
|
420 | + $filepath = preg_replace("/(.+?)\/*$/", "\\1/", $filepath); |
|
421 | 421 | |
422 | 422 | $list = $this->list_files($filepath); |
423 | 423 | |
@@ -647,7 +647,7 @@ discard block |
||
647 | 647 | */ |
648 | 648 | function _error($line) |
649 | 649 | { |
650 | - $CI =& get_instance(); |
|
650 | + $CI = & get_instance(); |
|
651 | 651 | $CI->lang->load('ftp'); |
652 | 652 | show_error($CI->lang->line($line)); |
653 | 653 | } |
@@ -53,12 +53,12 @@ discard block |
||
53 | 53 | |
54 | 54 | public function __construct($config = array()) |
55 | 55 | { |
56 | - $this->CI =& get_instance(); |
|
56 | + $this->CI = & get_instance(); |
|
57 | 57 | $this->CI->load->language('profiler'); |
58 | 58 | |
59 | 59 | if (isset($config['query_toggle_count'])) |
60 | 60 | { |
61 | - $this->_query_toggle_count = (int) $config['query_toggle_count']; |
|
61 | + $this->_query_toggle_count = (int)$config['query_toggle_count']; |
|
62 | 62 | unset($config['query_toggle_count']); |
63 | 63 | } |
64 | 64 | |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | // Let's determine which databases are currently connected to |
161 | 161 | foreach (get_object_vars($this->CI) as $CI_object) |
162 | 162 | { |
163 | - if (is_object($CI_object) && is_subclass_of(get_class($CI_object), 'CI_DB') ) |
|
163 | + if (is_object($CI_object) && is_subclass_of(get_class($CI_object), 'CI_DB')) |
|
164 | 164 | { |
165 | 165 | $dbs[] = $CI_object; |
166 | 166 | } |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | $output .= '<legend style="color:#0000FF;"> '.$this->CI->lang->line('profiler_queries').' </legend>'; |
175 | 175 | $output .= "\n"; |
176 | 176 | $output .= "\n\n<table style='border:none; width:100%;'>\n"; |
177 | - $output .="<tr><td style='width:100%;color:#0000FF;font-weight:normal;background-color:#eee;padding:5px'>".$this->CI->lang->line('profiler_no_db')."</td></tr>\n"; |
|
177 | + $output .= "<tr><td style='width:100%;color:#0000FF;font-weight:normal;background-color:#eee;padding:5px'>".$this->CI->lang->line('profiler_no_db')."</td></tr>\n"; |
|
178 | 178 | $output .= "</table>\n"; |
179 | 179 | $output .= "</fieldset>"; |
180 | 180 | |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | // Key words we want bolded |
188 | 188 | $highlight = array('SELECT', 'DISTINCT', 'FROM', 'WHERE', 'AND', 'LEFT JOIN', 'ORDER BY', 'GROUP BY', 'LIMIT', 'INSERT', 'INTO', 'VALUES', 'UPDATE', 'OR ', 'HAVING', 'OFFSET', 'NOT IN', 'IN', 'LIKE', 'NOT LIKE', 'COUNT', 'MAX', 'MIN', 'ON', 'AS', 'AVG', 'SUM', '(', ')'); |
189 | 189 | |
190 | - $output = "\n\n"; |
|
190 | + $output = "\n\n"; |
|
191 | 191 | |
192 | 192 | $count = 0; |
193 | 193 | |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | $output .= "<tr><td style='width:50%;color:#000;background-color:#ddd;padding:5px'>$_GET[".$key."] </td><td style='width:50%;padding:5px;color:#cd6e00;font-weight:normal;background-color:#ddd;'>"; |
274 | 274 | if (is_array($val)) |
275 | 275 | { |
276 | - $output .= "<pre>" . htmlspecialchars(stripslashes(print_r($val, true))) . "</pre>"; |
|
276 | + $output .= "<pre>".htmlspecialchars(stripslashes(print_r($val, true)))."</pre>"; |
|
277 | 277 | } |
278 | 278 | else |
279 | 279 | { |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | $output .= "<tr><td style='width:50%;padding:5px;color:#000;background-color:#ddd;'>$_POST[".$key."] </td><td style='width:50%;padding:5px;color:#009900;font-weight:normal;background-color:#ddd;'>"; |
323 | 323 | if (is_array($val)) |
324 | 324 | { |
325 | - $output .= "<pre>" . htmlspecialchars(stripslashes(print_r($val, TRUE))) . "</pre>"; |
|
325 | + $output .= "<pre>".htmlspecialchars(stripslashes(print_r($val, TRUE)))."</pre>"; |
|
326 | 326 | } |
327 | 327 | else |
328 | 328 | { |
@@ -439,7 +439,7 @@ discard block |
||
439 | 439 | |
440 | 440 | $output .= "\n\n<table style='width:100%;display:none' id='ci_profiler_httpheaders_table'>\n"; |
441 | 441 | |
442 | - foreach (array('HTTP_ACCEPT', 'HTTP_USER_AGENT', 'HTTP_CONNECTION', 'SERVER_PORT', 'SERVER_NAME', 'REMOTE_ADDR', 'SERVER_SOFTWARE', 'HTTP_ACCEPT_LANGUAGE', 'SCRIPT_NAME', 'REQUEST_METHOD',' HTTP_HOST', 'REMOTE_HOST', 'CONTENT_TYPE', 'SERVER_PROTOCOL', 'QUERY_STRING', 'HTTP_ACCEPT_ENCODING', 'HTTP_X_FORWARDED_FOR') as $header) |
|
442 | + foreach (array('HTTP_ACCEPT', 'HTTP_USER_AGENT', 'HTTP_CONNECTION', 'SERVER_PORT', 'SERVER_NAME', 'REMOTE_ADDR', 'SERVER_SOFTWARE', 'HTTP_ACCEPT_LANGUAGE', 'SCRIPT_NAME', 'REQUEST_METHOD', ' HTTP_HOST', 'REMOTE_HOST', 'CONTENT_TYPE', 'SERVER_PROTOCOL', 'QUERY_STRING', 'HTTP_ACCEPT_ENCODING', 'HTTP_X_FORWARDED_FOR') as $header) |
|
443 | 443 | { |
444 | 444 | $val = (isset($_SERVER[$header])) ? $_SERVER[$header] : ''; |
445 | 445 | $output .= "<tr><td style='vertical-align: top;width:50%;padding:5px;color:#900;background-color:#ddd;'>".$header." </td><td style='width:50%;padding:5px;color:#000;background-color:#ddd;'>".$val."</td></tr>\n"; |