Completed
Push — v3.0 ( 23635d...e28df5 )
by Samir
23s
created
web_interface/astpp/system/helpers/html_helper.php 1 patch
Braces   +15 added lines, -25 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
  * CodeIgniter
4 6
  *
@@ -123,8 +125,7 @@  discard block
 block discarded – undo
123 125
 				$atts .= ' ' . $key . '="' . $val . '"';
124 126
 			}
125 127
 			$attributes = $atts;
126
-		}
127
-		elseif (is_string($attributes) AND strlen($attributes) > 0)
128
+		} elseif (is_string($attributes) AND strlen($attributes) > 0)
128 129
 		{
129 130
 			$attributes = ' '. $attributes;
130 131
 		}
@@ -146,8 +147,7 @@  discard block
 block discarded – undo
146 147
 			if ( ! is_array($val))
147 148
 			{
148 149
 				$out .= $val;
149
-			}
150
-			else
150
+			} else
151 151
 			{
152 152
 				$out .= $_last_list_item."\n";
153 153
 				$out .= _list($type, $val, '', $depth + 4);
@@ -222,13 +222,11 @@  discard block
 block discarded – undo
222 222
 				if ($index_page === TRUE)
223 223
 				{
224 224
 					$img .= ' src="'.$CI->config->site_url($v).'"';
225
-				}
226
-				else
225
+				} else
227 226
 				{
228 227
 					$img .= ' src="'.$CI->config->slash_item('base_url').$v.'"';
229 228
 				}
230
-			}
231
-			else
229
+			} else
232 230
 			{
233 231
 				$img .= " $k=\"$v\"";
234 232
 			}
@@ -266,8 +264,7 @@  discard block
 block discarded – undo
266 264
 			if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/doctypes.php'))
267 265
 			{
268 266
 				include(APPPATH.'config/'.ENVIRONMENT.'/doctypes.php');
269
-			}
270
-			elseif (is_file(APPPATH.'config/doctypes.php'))
267
+			} elseif (is_file(APPPATH.'config/doctypes.php'))
271 268
 			{
272 269
 				include(APPPATH.'config/doctypes.php');
273 270
 			}
@@ -281,8 +278,7 @@  discard block
 block discarded – undo
281 278
 		if (isset($_doctypes[$type]))
282 279
 		{
283 280
 			return $_doctypes[$type];
284
-		}
285
-		else
281
+		} else
286 282
 		{
287 283
 			return FALSE;
288 284
 		}
@@ -322,31 +318,26 @@  discard block
 block discarded – undo
322 318
 					if ($index_page === TRUE)
323 319
 					{
324 320
 						$link .= 'href="'.$CI->config->site_url($v).'" ';
325
-					}
326
-					else
321
+					} else
327 322
 					{
328 323
 						$link .= 'href="'.$CI->config->slash_item('base_url').$v.'" ';
329 324
 					}
330
-				}
331
-				else
325
+				} else
332 326
 				{
333 327
 					$link .= "$k=\"$v\" ";
334 328
 				}
335 329
 			}
336 330
 
337 331
 			$link .= "/>";
338
-		}
339
-		else
332
+		} else
340 333
 		{
341 334
 			if ( strpos($href, '://') !== FALSE)
342 335
 			{
343 336
 				$link .= 'href="'.$href.'" ';
344
-			}
345
-			elseif ($index_page === TRUE)
337
+			} elseif ($index_page === TRUE)
346 338
 			{
347 339
 				$link .= 'href="'.$CI->config->site_url($href).'" ';
348
-			}
349
-			else
340
+			} else
350 341
 			{
351 342
 				$link .= 'href="'.$CI->config->slash_item('base_url').$href.'" ';
352 343
 			}
@@ -389,8 +380,7 @@  discard block
 block discarded – undo
389 380
 		if ( ! is_array($name))
390 381
 		{
391 382
 			$name = array(array('name' => $name, 'content' => $content, 'type' => $type, 'newline' => $newline));
392
-		}
393
-		else
383
+		} else
394 384
 		{
395 385
 			// Turn single array into multidimensional
396 386
 			if (isset($name['name']))
Please login to merge, or discard this patch.
web_interface/astpp/system/helpers/directory_helper.php 1 patch
Braces   +4 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
  * CodeIgniter
4 6
  *
@@ -60,8 +62,7 @@  discard block
 block discarded – undo
60 62
 				if (($directory_depth < 1 OR $new_depth > 0) && @is_dir($source_dir.$file))
61 63
 				{
62 64
 					$filedata[$file] = directory_map($source_dir.$file.DIRECTORY_SEPARATOR, $new_depth, $hidden);
63
-				}
64
-				else
65
+				} else
65 66
 				{
66 67
 					$filedata[] = $file;
67 68
 				}
Please login to merge, or discard this patch.
web_interface/astpp/system/helpers/array_helper.php 1 patch
Braces   +4 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
  * CodeIgniter
4 6
  *
@@ -104,8 +106,7 @@  discard block
 block discarded – undo
104 106
 			if (isset($array[$item]))
105 107
 			{
106 108
 				$return[$item] = $array[$item];
107
-			}
108
-			else
109
+			} else
109 110
 			{
110 111
 				$return[$item] = $default;
111 112
 			}
Please login to merge, or discard this patch.
web_interface/astpp/system/helpers/url_helper.php 1 patch
Braces   +8 added lines, -11 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
  * CodeIgniter
4 6
  *
@@ -147,8 +149,7 @@  discard block
 block discarded – undo
147 149
 		if ( ! is_array($uri))
148 150
 		{
149 151
 			$site_url = ( ! preg_match('!^\w+://! i', $uri)) ? site_url($uri) : $uri;
150
-		}
151
-		else
152
+		} else
152 153
 		{
153 154
 			$site_url = site_url($uri);
154 155
 		}
@@ -296,8 +297,7 @@  discard block
 block discarded – undo
296 297
 					}
297 298
 					$x[] = '"';
298 299
 				}
299
-			}
300
-			else
300
+			} else
301 301
 			{
302 302
 				for ($i = 0; $i < strlen($attributes); $i++)
303 303
 				{
@@ -316,8 +316,7 @@  discard block
 block discarded – undo
316 316
 			if ($ordinal < 128)
317 317
 			{
318 318
 				$x[] = "|".$ordinal;
319
-			}
320
-			else
319
+			} else
321 320
 			{
322 321
 				if (count($temp) == 0)
323 322
 				{
@@ -482,8 +481,7 @@  discard block
 block discarded – undo
482 481
 		{
483 482
 			$search		= '_';
484 483
 			$replace	= '-';
485
-		}
486
-		else
484
+		} else
487 485
 		{
488 486
 			$search		= '-';
489 487
 			$replace	= '_';
@@ -577,8 +575,7 @@  discard block
 block discarded – undo
577 575
 			if ($javascript == TRUE)
578 576
 			{
579 577
 				$att .= $key . '=' . $val . ',';
580
-			}
581
-			else
578
+			} else
582 579
 			{
583 580
 				$att .= ' ' . $key . '="' . $val . '"';
584 581
 			}
Please login to merge, or discard this patch.
web_interface/astpp/system/helpers/date_helper.php 1 patch
Braces   +31 added lines, -25 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
  * CodeIgniter
4 6
  *
@@ -53,8 +55,7 @@  discard block
 block discarded – undo
53 55
 			}
54 56
 
55 57
 			return $system_time;
56
-		}
57
-		else
58
+		} else
58 59
 		{
59 60
 			return time();
60 61
 		}
@@ -84,11 +85,13 @@  discard block
 block discarded – undo
84 85
 {
85 86
 	function mdate($datestr = '', $time = '')
86 87
 	{
87
-		if ($datestr == '')
88
-			return '';
88
+		if ($datestr == '') {
89
+					return '';
90
+		}
89 91
 
90
-		if ($time == '')
91
-			$time = now();
92
+		if ($time == '') {
93
+					$time = now();
94
+		}
92 95
 
93 96
 		$datestr = str_replace('%\\', '', preg_replace("/([a-z]+?){1}/i", "\\\\\\1", $datestr));
94 97
 		return date($datestr, $time);
@@ -165,8 +168,7 @@  discard block
 block discarded – undo
165 168
 		if ($time <= $seconds)
166 169
 		{
167 170
 			$seconds = 1;
168
-		}
169
-		else
171
+		} else
170 172
 		{
171 173
 			$seconds = $time - $seconds;
172 174
 		}
@@ -302,8 +304,9 @@  discard block
 block discarded – undo
302 304
 {
303 305
 	function local_to_gmt($time = '')
304 306
 	{
305
-		if ($time == '')
306
-			$time = time();
307
+		if ($time == '') {
308
+					$time = time();
309
+		}
307 310
 
308 311
 		return mktime( gmdate("H", $time), gmdate("i", $time), gmdate("s", $time), gmdate("m", $time), gmdate("d", $time), gmdate("Y", $time));
309 312
 	}
@@ -399,8 +402,7 @@  discard block
 block discarded – undo
399 402
 		if ($fmt == 'us')
400 403
 		{
401 404
 			$r .= date('h', $time).':'.date('i', $time);
402
-		}
403
-		else
405
+		} else
404 406
 		{
405 407
 			$r .= date('H', $time).':'.date('i', $time);
406 408
 		}
@@ -463,8 +465,7 @@  discard block
 block discarded – undo
463 465
 		if (isset($ex['2']) && preg_match('/[0-9]{1,2}/', $ex['2']))
464 466
 		{
465 467
 			$sec  = (strlen($ex['2']) == 1) ? '0'.$ex['2'] : $ex['2'];
466
-		}
467
-		else
468
+		} else
468 469
 		{
469 470
 			// Unless specified, seconds get set to zero.
470 471
 			$sec = '00';
@@ -474,14 +475,17 @@  discard block
 block discarded – undo
474 475
 		{
475 476
 			$ampm = strtolower($split['2']);
476 477
 
477
-			if (substr($ampm, 0, 1) == 'p' AND $hour < 12)
478
-				$hour = $hour + 12;
478
+			if (substr($ampm, 0, 1) == 'p' AND $hour < 12) {
479
+							$hour = $hour + 12;
480
+			}
479 481
 
480
-			if (substr($ampm, 0, 1) == 'a' AND $hour == 12)
481
-				$hour =  '00';
482
+			if (substr($ampm, 0, 1) == 'a' AND $hour == 12) {
483
+							$hour =  '00';
484
+			}
482 485
 
483
-			if (strlen($hour) == 1)
484
-				$hour = '0'.$hour;
486
+			if (strlen($hour) == 1) {
487
+							$hour = '0'.$hour;
488
+			}
485 489
 		}
486 490
 
487 491
 		return mktime($hour, $min, $sec, $month, $day, $year);
@@ -508,8 +512,9 @@  discard block
 block discarded – undo
508 512
 		$CI =& get_instance();
509 513
 		$CI->lang->load('date');
510 514
 
511
-		if ($default == 'GMT')
512
-			$default = 'UTC';
515
+		if ($default == 'GMT') {
516
+					$default = 'UTC';
517
+		}
513 518
 
514 519
 		$menu = '<select name="'.$name.'"';
515 520
 
@@ -599,8 +604,9 @@  discard block
 block discarded – undo
599 604
 			return $zones;
600 605
 		}
601 606
 
602
-		if ($tz == 'GMT')
603
-			$tz = 'UTC';
607
+		if ($tz == 'GMT') {
608
+					$tz = 'UTC';
609
+		}
604 610
 
605 611
 		return ( ! isset($zones[$tz])) ? 0 : $zones[$tz];
606 612
 	}
Please login to merge, or discard this patch.
web_interface/astpp/system/helpers/smiley_helper.php 1 patch
Braces   +6 added lines, -7 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
  * CodeIgniter
4 6
  *
@@ -96,8 +98,7 @@  discard block
 block discarded – undo
96 98
 					}
97 99
 				}
98 100
 EOF;
99
-		}
100
-		else
101
+		} else
101 102
 		{
102 103
 			if (is_array($alias))
103 104
 			{
@@ -111,8 +112,7 @@  discard block
 block discarded – undo
111 112
 		if ($inline)
112 113
 		{
113 114
 			return '<script type="text/javascript" charset="utf-8">/*<![CDATA[ */'.$r.'// ]]></script>';
114
-		}
115
-		else
115
+		} else
116 116
 		{
117 117
 			return $r;
118 118
 		}
@@ -232,8 +232,7 @@  discard block
 block discarded – undo
232 232
 		if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/smileys.php'))
233 233
 		{
234 234
 		    include(APPPATH.'config/'.ENVIRONMENT.'/smileys.php');
235
-		}
236
-		elseif (file_exists(APPPATH.'config/smileys.php'))
235
+		} elseif (file_exists(APPPATH.'config/smileys.php'))
237 236
 		{
238 237
 			include(APPPATH.'config/smileys.php');
239 238
 		}
Please login to merge, or discard this patch.
web_interface/astpp/system/helpers/form_helper.php 1 patch
Braces   +49 added lines, -54 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
  * CodeIgniter
4 6
  *
@@ -81,10 +83,11 @@  discard block
 block discarded – undo
81 83
 if(!function_exists('form_breadcrumb')){
82 84
     function form_breadcrumb($info=''){
83 85
      $form=false;
84
-     if(!empty($info))
85
- 	$form.="<div class='breadcrumb'>
86
+     if(!empty($info)) {
87
+      	$form.="<div class='breadcrumb'>
86 88
 	        <a href='".$info['url']."'>".$info['name']."</a>
87
-		</div>";
89
+		</div>";
90
+     }
88 91
     return $form;
89 92
     }
90 93
 }
@@ -108,8 +111,7 @@  discard block
 block discarded – undo
108 111
 		if (is_string($attributes))
109 112
 		{
110 113
 			$attributes .= ' enctype="multipart/form-data"';
111
-		}
112
-		else
114
+		} else
113 115
 		{
114 116
 			$attributes['enctype'] = 'multipart/form-data';
115 117
 		}
@@ -154,8 +156,7 @@  discard block
 block discarded – undo
154 156
 		if ( ! is_array($value))
155 157
 		{
156 158
 			$form .= '<input type="hidden" name="'.$name.'" value="'.form_prep($value, $name).'" />'."\n";
157
-		}
158
-		else
159
+		} else
159 160
 		{
160 161
 			foreach ($value as $k => $v)
161 162
 			{
@@ -212,7 +213,7 @@  discard block
 block discarded – undo
212 213
                    		</span>
213 214
                    </div>
214 215
                </div>';
215
-        }else{
216
+        } else{
216 217
         	return "<div class='col-md-5 no-padding'><image "._parse_form_attributes($data, $defaults).$extra." /></div>";
217 218
         }	
218 219
 		
@@ -306,8 +307,7 @@  discard block
 block discarded – undo
306 307
 		if ( ! is_array($data) OR ! isset($data['value']))
307 308
 		{
308 309
 			$val = $value;
309
-		}
310
-		else
310
+		} else
311 311
 		{
312 312
 			$val = $data['value'];
313 313
 			unset($data['value']); // textareas don't use the value attribute
@@ -376,22 +376,25 @@  discard block
 block discarded – undo
376 376
 			}
377 377
 		}
378 378
 
379
-		if ($extra != '') $extra = ' '.$extra;
379
+		if ($extra != '') {
380
+			$extra = ' '.$extra;
381
+		}
380 382
 		$multiple = (count($selected) > 1 && strpos($extra, 'multiple') === FALSE) ? ' multiple="multiple"' : '';
381 383
                 if(is_array($name)){
382 384
                      $str=null;
383 385
                      foreach($name as $key=>$value){
384
-                      if($key !='class' && $key!='disabled')
385
-                      $str.=$key."='$value' ";
386
+                      if($key !='class' && $key!='disabled') {
387
+                                            $str.=$key."='$value' ";
388
+                      }
386 389
                      }
387 390
                      if(isset($name['disabled']) && $name['disabled']== 'disabled'){
388 391
                       $str.='disabled = "disabled"';
389 392
                      }
390 393
                                $form = '<select '.$str." class='col-md-5 form-control selectpicker ".$name['class'].$extra."' data-live-search='true'>\n";
391
-                }else{
394
+                } else{
392 395
                     if(!empty($extra)){
393 396
                         $form = '<select  name="'.$name.'"' .$multiple." class='col-md-5 form-control selectpicker ".$extra."' data-live-search='true'>\n";
394
-                    }else{
397
+                    } else{
395 398
                         $form = '<select  name="'.$name.'"' .$multiple." class='col-md-5 form-control selectpicker' data-live-search='true'>\n";
396 399
                     }
397 400
                 }
@@ -415,8 +418,7 @@  discard block
 block discarded – undo
415 418
 				}
416 419
 
417 420
 				$form .= '</optgroup>'."\n";
418
-			}
419
-			else
421
+			} else
420 422
 			{
421 423
 				$sel = (in_array($key, $selected)) ? ' selected="selected"' : '';
422 424
 
@@ -450,15 +452,16 @@  discard block
 block discarded – undo
450 452
 				$selected = array($_POST[$name]);
451 453
 			}
452 454
 		}
453
-		if ($extra != '') $extra = ' '.$extra;
455
+		if ($extra != '') {
456
+			$extra = ' '.$extra;
457
+		}
454 458
                 $class= isset($name['class']) && !empty($name['class']) ? "col-md-5 form-control selectpicker $name[class]" :"col-md-5 form-control selectpicker";
455 459
 		$multiple = (count($selected) > 1 && strpos($extra, 'multiple') === FALSE) ? ' multiple="multiple"' : '';
456 460
 		if(is_array($name) && !isset($name["id"])){
457 461
                     $form = '<select name="'.$name['name'].'"'." class='$class' data-live-search='true'>\n";
458
-                }else if(is_array($name) && isset($name["id"])){
462
+                } else if(is_array($name) && isset($name["id"])){
459 463
                     $form = '<select name="'.$name['name'].'" id="'.$name['id'].'"'."class='$class' data-live-search='true'>\n";
460
-                }
461
-                else{
464
+                } else{
462 465
                     $form = '<select name="'.$name.'"' .$multiple." class='$class' data-live-search='true'>\n";
463 466
                 }   
464 467
 
@@ -479,8 +482,7 @@  discard block
 block discarded – undo
479 482
 				}
480 483
 
481 484
 				$form .= '</optgroup>'."\n";
482
-			}
483
-			else
485
+			} else
484 486
 			{
485 487
 				$sel = (in_array($key, $selected)) ? ' selected="selected"' : '';
486 488
 
@@ -520,7 +522,9 @@  discard block
 block discarded – undo
520 522
 		/*
521 523
 		  ASTPP  3.0  For Search Display In
522 524
 		*/
523
-		if ($extra != '' && !is_array($extra)) $extra = ' '.$extra;
525
+		if ($extra != '' && !is_array($extra)) {
526
+			$extra = ' '.$extra;
527
+		}
524 528
 	        /**********************************************************/
525 529
 
526 530
 	    $class= isset($name['class']) && !empty($name['class']) ? "col-md-5 form-control selectpicker $name[class]" :"col-md-5 form-control selectpicker";
@@ -533,15 +537,15 @@  discard block
 block discarded – undo
533 537
                 /*********************************/
534 538
 		if(is_array($name) && !isset($name["id"])){
535 539
                     $form = '<select name="'.$name['name'].'"'." class='col-md-5 form-control $class' style='margin-left:5px;' data-live-search='true'>\n";
536
-                }else if(is_array($name) && isset($name["id"])){
540
+                } else if(is_array($name) && isset($name["id"])){
537 541
                     $form = '<select name="'.$name['name'].'" id="'.$name['id'].'"'."class='col-md-5 form-control $class' style='margin-left:5px;' data-live-search='true'>\n";
538
-                }else{
542
+                } else{
539 543
                     $form = '<select name="'.$name.'"' .$multiple." class='col-md-5 form-control $class' style='margin-left:5px;' data-live-search='true'>\n";
540 544
                 }   
541 545
  /*
542 546
 		  ASTPP  3.0  For Search Display In
543 547
 		*/
544
-                }else{
548
+                } else{
545 549
 
546 550
                     $form = '<select name="'.$name['name'].'" id="'.$name['id'].'"'."class='".$extra['class']." $class' style='".$extra['style']."' data-live-search='true'>\n";
547 551
                  }
@@ -562,8 +566,7 @@  discard block
 block discarded – undo
562 566
 				}
563 567
 
564 568
 				$form .= '</optgroup>'."\n";
565
-			}
566
-			else
569
+			} else
567 570
 			{
568 571
 				$sel = (in_array($key, $selected)) ? ' selected="selected"' : '';
569 572
 
@@ -597,7 +600,9 @@  discard block
 block discarded – undo
597 600
 			}
598 601
 		}
599 602
 
600
-		if ($extra != '') $extra = ' '.$extra;
603
+		if ($extra != '') {
604
+			$extra = ' '.$extra;
605
+		}
601 606
 
602 607
 		$multiple = (count($selected) > 1 && strpos($extra, 'multiple') === FALSE) ? ' multiple="multiple"' : '';
603 608
 		$form = '<select name="'.$name.'"'." multiple='multiple' class='select field multiselectable col-md-5 form-control'>\n";
@@ -618,8 +623,7 @@  discard block
 block discarded – undo
618 623
 				}
619 624
 
620 625
 				$form .= '</optgroup>'."\n";
621
-			}
622
-			else
626
+			} else
623 627
 			{
624 628
 				$sel = (in_array($key, $selected)) ? ' selected="selected"' : '';
625 629
 
@@ -657,7 +661,7 @@  discard block
 block discarded – undo
657 661
 		
658 662
 		if(isset($data) && $data != ''){
659 663
 			$name = "'".$data."'";
660
-		}else{
664
+		} else{
661 665
 			$name='';
662 666
 		}
663 667
 		
@@ -676,8 +680,7 @@  discard block
 block discarded – undo
676 680
 			if ($checked == FALSE)
677 681
 			{
678 682
 				unset($data['checked']);
679
-			}
680
-			else
683
+			} else
681 684
 			{
682 685
 				$data['checked'] = 'checked';
683 686
 			}
@@ -685,8 +688,7 @@  discard block
 block discarded – undo
685 688
 		if ($checked == TRUE)
686 689
 		{
687 690
 			$defaults['checked'] = 'checked';
688
-		}
689
-		else
691
+		} else
690 692
 		{
691 693
 			unset($defaults['checked']);
692 694
 		}
@@ -695,7 +697,7 @@  discard block
 block discarded – undo
695 697
 //echo "<pre>".$value; print_r($extra); exit;
696 698
 	    if(isset($extra[$value]) && !empty($extra) && $extra[$value] == '0'){
697 699
 		$class='onoffswitch-inner';
698
-	    }else{
700
+	    } else{
699 701
 		$class='onoffswitch-inner';
700 702
  	    }
701 703
 /*            if(isset($extra) && $extra != ''){
@@ -722,7 +724,7 @@  discard block
 block discarded – undo
722 724
 				return '<div style="width: 49%; text-align: -moz-center; padding: 0;">
723 725
 				<input '._parse_form_attributes($data, $defaults).' type="checkbox" id="switch'.$name.'" name="onoffswitch" class="onoffswitch-checkbox" content="Yes">
724 726
 				<label class="onoffswitch-label" for="switch'.$name.'"><span class="'.$class.'"></span></label></div>';	
725
-		}else{
727
+		} else{
726 728
 				return '<div style="width: 41%; text-align: -moz-center; padding: 0;">
727 729
 				<input  type="checkbox" id="switch'.$name.'" name="onoffswitch"  class="onoffswitch-checkbox" content="Yes">
728 730
 				<label class="onoffswitch-label" for="switch'.$name.'"><span class="'.$class.'"></span></label></div>';
@@ -1055,8 +1057,7 @@  discard block
 block discarded – undo
1055 1057
 				{
1056 1058
 					return '';
1057 1059
 				}
1058
-			}
1059
-			else
1060
+			} else
1060 1061
 			{
1061 1062
 				if (($field == '' OR $value == '') OR ($field != $value))
1062 1063
 				{
@@ -1110,8 +1111,7 @@  discard block
 block discarded – undo
1110 1111
 				{
1111 1112
 					return '';
1112 1113
 				}
1113
-			}
1114
-			else
1114
+			} else
1115 1115
 			{
1116 1116
 				if (($field == '' OR $value == '') OR ($field != $value))
1117 1117
 				{
@@ -1165,8 +1165,7 @@  discard block
 block discarded – undo
1165 1165
 				{
1166 1166
 					return '';
1167 1167
 				}
1168
-			}
1169
-			else
1168
+			} else
1170 1169
 			{
1171 1170
 				if (($field == '' OR $value == '') OR ($field != $value))
1172 1171
 				{
@@ -1415,8 +1414,7 @@  discard block
 block discarded – undo
1415 1414
                             
1416 1415
                             $form .= ' selected="selected" >';
1417 1416
                                 
1418
-			}
1419
-			else
1417
+			} else
1420 1418
 			{
1421 1419
 				$form .= '>';
1422 1420
 			}
@@ -1452,8 +1450,7 @@  discard block
 block discarded – undo
1452 1450
 			if( $key == $selected )
1453 1451
 			{
1454 1452
 				$form .= ' selected>';
1455
-			}
1456
-			else
1453
+			} else
1457 1454
 			{
1458 1455
 				$form .= '>';
1459 1456
 			}
@@ -1492,8 +1489,7 @@  discard block
 block discarded – undo
1492 1489
 			if( $key == $selected )
1493 1490
 			{
1494 1491
 				$form .= ' selected>';
1495
-			}
1496
-			else
1492
+			} else
1497 1493
 			{
1498 1494
 				$form .= '>';
1499 1495
 			}
@@ -1534,8 +1530,7 @@  discard block
 block discarded – undo
1534 1530
 			if( strtolower($value) == strtolower($selected) )
1535 1531
 			{
1536 1532
 				$form .= '  selected="selected">';
1537
-			}
1538
-			else
1533
+			} else
1539 1534
 			{
1540 1535
 				$form .= '>';
1541 1536
 			}
Please login to merge, or discard this patch.
web_interface/astpp/system/helpers/captcha_helper.php 1 patch
Braces   +7 added lines, -9 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
  * CodeIgniter
4 6
  *
@@ -51,8 +53,7 @@  discard block
 block discarded – undo
51 53
 				{
52 54
 					$$key = $val;
53 55
 				}
54
-			}
55
-			else
56
+			} else
56 57
 			{
57 58
 				$$key = ( ! isset($data[$key])) ? $val : $data[$key];
58 59
 			}
@@ -136,8 +137,7 @@  discard block
 block discarded – undo
136 137
 		if (function_exists('imagecreatetruecolor'))
137 138
 		{
138 139
 			$im = imagecreatetruecolor($img_width, $img_height);
139
-		}
140
-		else
140
+		} else
141 141
 		{
142 142
 			$im = imagecreate($img_width, $img_height);
143 143
 		}
@@ -193,8 +193,7 @@  discard block
 block discarded – undo
193 193
 			$font_size = 5;
194 194
 			$x = rand(0, $img_width/($length/3));
195 195
 			$y = 0;
196
-		}
197
-		else
196
+		} else
198 197
 		{
199 198
 			$font_size	= 16;
200 199
 			$x = rand(0, $img_width/($length/1.5));
@@ -208,8 +207,7 @@  discard block
 block discarded – undo
208 207
 				$y = rand(0 , $img_height/2);
209 208
 				imagestring($im, $font_size, $x, $y, substr($word, $i, 1), $text_color);
210 209
 				$x += ($font_size*2);
211
-			}
212
-			else
210
+			} else
213 211
 			{
214 212
 				$y = rand($img_height/2, $img_height-3);
215 213
 				imagettftext($im, $font_size, $angle, $x, $y, $text_color, $font_path, substr($word, $i, 1));
Please login to merge, or discard this patch.
web_interface/astpp/system/helpers/template_inheritance_helper.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -283,8 +283,7 @@
 block discarded – undo
283 283
     	//echo 'tttttttttttt';
284 284
         if (isset($GLOBALS['CI'])) {
285 285
             $GLOBALS['CI']->load->view($GLOBALS['TI_CURRENT_BASE_TEMPLATE']);
286
-        }
287
-        else {
286
+        } else {
288 287
             include realpath( TI_VIEWS_DIR . $GLOBALS['TI_CURRENT_BASE_TEMPLATE']);
289 288
         }
290 289
     }
Please login to merge, or discard this patch.