@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | - if(!isset($GLOBALS["JATEPath"])) |
|
| 2 | + if (!isset($GLOBALS["JATEPath"])) |
|
| 3 | 3 | $GLOBALS["JATEPath"] = []; |
| 4 | 4 | $commonLocations = array( |
| 5 | 5 | "bower_components/JATE/dist/", |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | "../../dist/" |
| 8 | 8 | ); |
| 9 | 9 | foreach ($commonLocations as $i) |
| 10 | - if(file_exists($i."jate/coreEngine.php")) { |
|
| 10 | + if (file_exists($i."jate/coreEngine.php")) { |
|
| 11 | 11 | array_push($GLOBALS["JATEPath"], $i); |
| 12 | 12 | require_once($i."jate/coreEngine.php"); |
| 13 | 13 | break; |
@@ -13,9 +13,9 @@ |
||
| 13 | 13 | } |
| 14 | 14 | |
| 15 | 15 | function minify_output($_buffer) { |
| 16 | - $search = array ( '/\>[^\S ]+/s', '/[^\S ]+\</s', '/(\s)+/s' ); |
|
| 17 | - $replace = array ( '>', '<', '\\1' ); |
|
| 18 | - if (preg_match("/\<html/i",$_buffer) == 1 && preg_match("/\<\/html\>/i",$_buffer) == 1) |
|
| 16 | + $search = array('/\>[^\S ]+/s', '/[^\S ]+\</s', '/(\s)+/s'); |
|
| 17 | + $replace = array('>', '<', '\\1'); |
|
| 18 | + if (preg_match("/\<html/i", $_buffer) == 1 && preg_match("/\<\/html\>/i", $_buffer) == 1) |
|
| 19 | 19 | $_buffer = preg_replace($search, $replace, utf8_decode($_buffer)); |
| 20 | 20 | return utf8_encode($_buffer); |
| 21 | 21 | } |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | - function htmlParser( $_str) { |
|
| 2 | + function htmlParser($_str) { |
|
| 3 | 3 | return htmlentities($_str, ENT_QUOTES | ENT_IGNORE, "UTF-8"); |
| 4 | 4 | } |
| 5 | 5 | ?> |
@@ -1,17 +1,17 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | class Statistic extends Module { |
| 3 | - public function __construct( $_webApp ) { |
|
| 3 | + public function __construct($_webApp) { |
|
| 4 | 4 | parent::__construct(); |
| 5 | 5 | $pages = []; |
| 6 | 6 | $stats = []; |
| 7 | 7 | $pages = $_webApp->pages; |
| 8 | - foreach ( $pages as $k => $v ) { |
|
| 8 | + foreach ($pages as $k => $v) { |
|
| 9 | 9 | $temp = new $v[0]($v[1]); |
| 10 | 10 | $temp->addDipendences(); |
| 11 | 11 | $stats[$k] = []; |
| 12 | 12 | $stats[$k]["page"] = $v[0]; |
| 13 | 13 | $stats[$k]["css"] = $temp->data["css"]; |
| 14 | - $stats[$k]["js"] = $temp->data["js"]; |
|
| 14 | + $stats[$k]["js"] = $temp->data["js"]; |
|
| 15 | 15 | } |
| 16 | 16 | $this->data = $stats; |
| 17 | 17 | } |
@@ -7,20 +7,20 @@ |
||
| 7 | 7 | parent::__construct(); |
| 8 | 8 | $args = func_get_args(); |
| 9 | 9 | $count = func_num_args(); |
| 10 | - if (method_exists($this,$func='__construct'.$count)) |
|
| 11 | - call_user_func_array(array($this,$func),$args); |
|
| 10 | + if (method_exists($this, $func = '__construct'.$count)) |
|
| 11 | + call_user_func_array(array($this, $func), $args); |
|
| 12 | 12 | } |
| 13 | 13 | public function __construct0() { |
| 14 | 14 | $this->connection = null; |
| 15 | 15 | $this->database = null; |
| 16 | 16 | } |
| 17 | - public function __construct4( $_srv, $_db, $_usr, $_pass) { |
|
| 17 | + public function __construct4($_srv, $_db, $_usr, $_pass) { |
|
| 18 | 18 | $this->connection = "mysql:host=$_srv;dbname=$_db"; |
| 19 | - $this->database = new PDO( $this->connection, $_usr, $_pass,array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'utf8'")); |
|
| 19 | + $this->database = new PDO($this->connection, $_usr, $_pass, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'utf8'")); |
|
| 20 | 20 | $this->info = []; |
| 21 | - $this->info["server"] = $_srv; |
|
| 21 | + $this->info["server"] = $_srv; |
|
| 22 | 22 | $this->info["database"] = $_db; |
| 23 | - $this->info["user"] = $_usr; |
|
| 23 | + $this->info["user"] = $_usr; |
|
| 24 | 24 | $this->info["password"] = $_pass; |
| 25 | 25 | } |
| 26 | 26 | } |
@@ -22,17 +22,17 @@ discard block |
||
| 22 | 22 | $percent; |
| 23 | 23 | foreach (getGitLog() as $i) { |
| 24 | 24 | $cont++; |
| 25 | - if($cont % $nPerCol == 1) |
|
| 25 | + if ($cont % $nPerCol == 1) |
|
| 26 | 26 | echo '<div class="row">'; |
| 27 | - if(isset($i["tag"])) { |
|
| 28 | - $percent = explode(".",$i["tag"]); |
|
| 27 | + if (isset($i["tag"])) { |
|
| 28 | + $percent = explode(".", $i["tag"]); |
|
| 29 | 29 | $percent = 100 * intval($percent[0]) + 10 * intval($percent[1]) + intval($percent[2]); |
| 30 | 30 | } |
| 31 | 31 | ?> |
| 32 | 32 | <div class="col-lg-<?=$dim?>"> |
| 33 | 33 | <div class="well well-sm miniblock"> |
| 34 | 34 | <div class="autor"><b>Autor:</b> <?=$i["author"]?><br></div> |
| 35 | - <div class="tag"><b>Tag:</b> <?php if(isset($i["tag"])) echo $i["tag"]?><br></div> |
|
| 35 | + <div class="tag"><b>Tag:</b> <?php if (isset($i["tag"])) echo $i["tag"]?><br></div> |
|
| 36 | 36 | <div class="date"><b>Date:</b> <?=$i["date"]?><br></div> |
| 37 | 37 | <div class="message"><b>Message:</b> <?=$i["message"]?><br></div> |
| 38 | 38 | <div class="progress"> |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | </div> |
| 45 | 45 | </div> |
| 46 | 46 | <?php |
| 47 | - if($cont % $nPerCol == 0) |
|
| 47 | + if ($cont % $nPerCol == 0) |
|
| 48 | 48 | echo '</div>'; |
| 49 | 49 | } ?> |
| 50 | 50 | </div> |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | - if(isset($GLOBALS["JATEPath"])) |
|
| 2 | + if (isset($GLOBALS["JATEPath"])) |
|
| 3 | 3 | $GLOBALS["JATEPath"] = []; |
| 4 | 4 | $commonLocations = array( |
| 5 | 5 | "bower_components/JATE/dist/", |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | "../../dist/" |
| 8 | 8 | ); |
| 9 | 9 | foreach ($commonLocations as $i) |
| 10 | - if(file_exists($i."jate/coreEngine.php")) { |
|
| 10 | + if (file_exists($i."jate/coreEngine.php")) { |
|
| 11 | 11 | array_push($GLOBALS["JATEPath"], $i); |
| 12 | 12 | require_once($i."jate/coreEngine.php"); |
| 13 | 13 | break; |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | - if(!isset($GLOBALS["JATEPath"])) |
|
| 2 | + if (!isset($GLOBALS["JATEPath"])) |
|
| 3 | 3 | $GLOBALS["JATEPath"] = []; |
| 4 | 4 | $commonLocations = array( |
| 5 | 5 | "bower_components/JATE/dist/", |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | "../../dist/" |
| 8 | 8 | ); |
| 9 | 9 | foreach ($commonLocations as $i) |
| 10 | - if(file_exists($i."jate/coreEngine.php")) { |
|
| 10 | + if (file_exists($i."jate/coreEngine.php")) { |
|
| 11 | 11 | array_push($GLOBALS["JATEPath"], $i); |
| 12 | 12 | require_once($i."jate/coreEngine.php"); |
| 13 | 13 | break; |
@@ -22,17 +22,17 @@ discard block |
||
| 22 | 22 | $percent; |
| 23 | 23 | foreach (getGitLog() as $i) { |
| 24 | 24 | $cont++; |
| 25 | - if($cont % $nPerCol == 1) |
|
| 25 | + if ($cont % $nPerCol == 1) |
|
| 26 | 26 | echo '<div class="row">'; |
| 27 | - if(isset($i["tag"])) { |
|
| 28 | - $percent = explode(".",$i["tag"]); |
|
| 27 | + if (isset($i["tag"])) { |
|
| 28 | + $percent = explode(".", $i["tag"]); |
|
| 29 | 29 | $percent = 100 * intval($percent[0]) + 10 * intval($percent[1]) + intval($percent[2]); |
| 30 | 30 | } |
| 31 | 31 | ?> |
| 32 | 32 | <div class="col-lg-<?=$dim?>"> |
| 33 | 33 | <div class="well well-sm miniblock"> |
| 34 | 34 | <div class="autor"><b>Autor:</b> <?=$i["author"]?><br></div> |
| 35 | - <div class="tag"><b>Tag:</b> <?php if(isset($i["tag"])) echo $i["tag"]?><br></div> |
|
| 35 | + <div class="tag"><b>Tag:</b> <?php if (isset($i["tag"])) echo $i["tag"]?><br></div> |
|
| 36 | 36 | <div class="date"><b>Date:</b> <?=$i["date"]?><br></div> |
| 37 | 37 | <div class="message"><b>Message:</b> <?=$i["message"]?><br></div> |
| 38 | 38 | <div class="progress"> |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | </div> |
| 45 | 45 | </div> |
| 46 | 46 | <?php |
| 47 | - if($cont % $nPerCol == 0) |
|
| 47 | + if ($cont % $nPerCol == 0) |
|
| 48 | 48 | echo '</div>'; |
| 49 | 49 | } ?> |
| 50 | 50 | </div> |