@@ -1,13 +1,14 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | require_once("jate.php"); |
| 3 | 3 | $connection = null; |
| 4 | - if($jConfig->connection["enable"]) |
|
| 5 | - $connection = new Connection( |
|
| 4 | + if($jConfig->connection["enable"]) { |
|
| 5 | + $connection = new Connection( |
|
| 6 | 6 | $jConfig->connection["server"] |
| 7 | 7 | , $jConfig->connection["database"] |
| 8 | 8 | , $jConfig->connection["user"] |
| 9 | 9 | , $jConfig->connection["password"] |
| 10 | 10 | ); |
| 11 | + } |
|
| 11 | 12 | $webApp = new WebApp(); |
| 12 | 13 | $webApp->addPages($jConfig->pages); |
| 13 | 14 | $webApp->setDefaultPage($jConfig->pages[0]); |
@@ -1,6 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | require_once("main.php"); |
| 3 | - if(!isset($_GET["page"])) $_GET["page"] = "home"; |
|
| 3 | + if(!isset($_GET["page"])) { |
|
| 4 | + $_GET["page"] = "home"; |
|
| 5 | + } |
|
| 4 | 6 | $webApp->fetchPage($_GET["page"]); |
| 5 | 7 | $webApp->draw(); |
| 6 | 8 | ?> |
@@ -22,8 +22,9 @@ discard block |
||
| 22 | 22 | $percent; |
| 23 | 23 | foreach (getGitLog() as $i) { |
| 24 | 24 | $cont++; |
| 25 | - if($cont % $nPerCol == 1) |
|
| 26 | - echo '<div class="row">'; |
|
| 25 | + if($cont % $nPerCol == 1) { |
|
| 26 | + echo '<div class="row">'; |
|
| 27 | + } |
|
| 27 | 28 | if(isset($i["tag"])) { |
| 28 | 29 | $percent = explode(".",$i["tag"]); |
| 29 | 30 | $percent = 100 * intval($percent[0]) + 10 * intval($percent[1]) + intval($percent[2]); |
@@ -32,7 +33,8 @@ discard block |
||
| 32 | 33 | <div class="col-lg-<?=$dim?>"> |
| 33 | 34 | <div class="well well-sm miniblock"> |
| 34 | 35 | <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> |
|
| 36 | + <div class="tag"><b>Tag:</b> <?php if(isset($i["tag"])) { |
|
| 37 | + echo $i["tag"]?><br></div> |
|
| 36 | 38 | <div class="date"><b>Date:</b> <?=$i["date"]?><br></div> |
| 37 | 39 | <div class="message"><b>Message:</b> <?=$i["message"]?><br></div> |
| 38 | 40 | <div class="progress"> |
@@ -46,6 +48,7 @@ discard block |
||
| 46 | 48 | <?php |
| 47 | 49 | if($cont % $nPerCol == 0) |
| 48 | 50 | echo '</div>'; |
| 51 | +} |
|
| 49 | 52 | } ?> |
| 50 | 53 | </div> |
| 51 | 54 | </div> |
@@ -1,14 +1,16 @@ |
||
| 1 | 1 | <?php |
| 2 | - if(!isset($GLOBALS["JATEPath"])) |
|
| 3 | - $GLOBALS["JATEPath"] = []; |
|
| 2 | + if(!isset($GLOBALS["JATEPath"])) { |
|
| 3 | + $GLOBALS["JATEPath"] = []; |
|
| 4 | + } |
|
| 4 | 5 | $commonLocations = array( |
| 5 | 6 | "bower_components/JATE/dist/", |
| 6 | 7 | "vendor/xaberr/jate/dist/", |
| 7 | 8 | "../../dist/" |
| 8 | 9 | ); |
| 9 | - foreach ($commonLocations as $i) |
|
| 10 | - if(file_exists($i."jate/coreEngine.php")) { |
|
| 10 | + foreach ($commonLocations as $i) { |
|
| 11 | + if(file_exists($i."jate/coreEngine.php")) { |
|
| 11 | 12 | array_push($GLOBALS["JATEPath"], $i); |
| 13 | + } |
|
| 12 | 14 | require_once($i."jate/coreEngine.php"); |
| 13 | 15 | break; |
| 14 | 16 | } |
@@ -1,13 +1,14 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | require_once("jate.php"); |
| 3 | 3 | $connection = null; |
| 4 | - if($jConfig->connection["enable"]) |
|
| 5 | - $connection = new Connection( |
|
| 4 | + if($jConfig->connection["enable"]) { |
|
| 5 | + $connection = new Connection( |
|
| 6 | 6 | $jConfig->connection["server"] |
| 7 | 7 | , $jConfig->connection["database"] |
| 8 | 8 | , $jConfig->connection["user"] |
| 9 | 9 | , $jConfig->connection["password"] |
| 10 | 10 | ); |
| 11 | + } |
|
| 11 | 12 | $webApp = new WebApp(); |
| 12 | 13 | $webApp->addPages($jConfig->pages); |
| 13 | 14 | $webApp->setDefaultPage($jConfig->pages[0]); |
@@ -1,6 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | require_once("main.php"); |
| 3 | - if(!isset($_GET["page"])) $_GET["page"] = "home"; |
|
| 3 | + if(!isset($_GET["page"])) { |
|
| 4 | + $_GET["page"] = "home"; |
|
| 5 | + } |
|
| 4 | 6 | $webApp->fetchPage($_GET["page"]); |
| 5 | 7 | $webApp->draw(); |
| 6 | 8 | ?> |
@@ -22,8 +22,9 @@ discard block |
||
| 22 | 22 | $percent; |
| 23 | 23 | foreach (getGitLog() as $i) { |
| 24 | 24 | $cont++; |
| 25 | - if($cont % $nPerCol == 1) |
|
| 26 | - echo '<div class="row">'; |
|
| 25 | + if($cont % $nPerCol == 1) { |
|
| 26 | + echo '<div class="row">'; |
|
| 27 | + } |
|
| 27 | 28 | if(isset($i["tag"])) { |
| 28 | 29 | $percent = explode(".",$i["tag"]); |
| 29 | 30 | $percent = 100 * intval($percent[0]) + 10 * intval($percent[1]) + intval($percent[2]); |
@@ -32,7 +33,8 @@ discard block |
||
| 32 | 33 | <div class="col-lg-<?=$dim?>"> |
| 33 | 34 | <div class="well well-sm miniblock"> |
| 34 | 35 | <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> |
|
| 36 | + <div class="tag"><b>Tag:</b> <?php if(isset($i["tag"])) { |
|
| 37 | + echo $i["tag"]?><br></div> |
|
| 36 | 38 | <div class="date"><b>Date:</b> <?=$i["date"]?><br></div> |
| 37 | 39 | <div class="message"><b>Message:</b> <?=$i["message"]?><br></div> |
| 38 | 40 | <div class="progress"> |
@@ -46,6 +48,7 @@ discard block |
||
| 46 | 48 | <?php |
| 47 | 49 | if($cont % $nPerCol == 0) |
| 48 | 50 | echo '</div>'; |
| 51 | +} |
|
| 49 | 52 | } ?> |
| 50 | 53 | </div> |
| 51 | 54 | </div> |
@@ -1,14 +1,16 @@ |
||
| 1 | 1 | <?php |
| 2 | - if(!isset($GLOBALS["JATEPath"])) |
|
| 3 | - $GLOBALS["JATEPath"] = []; |
|
| 2 | + if(!isset($GLOBALS["JATEPath"])) { |
|
| 3 | + $GLOBALS["JATEPath"] = []; |
|
| 4 | + } |
|
| 4 | 5 | $commonLocations = array( |
| 5 | 6 | "bower_components/JATE/dist/", |
| 6 | 7 | "vendor/xaberr/jate/dist/", |
| 7 | 8 | "../../dist/" |
| 8 | 9 | ); |
| 9 | - foreach ($commonLocations as $i) |
|
| 10 | - if(file_exists($i."jate/coreEngine.php")) { |
|
| 10 | + foreach ($commonLocations as $i) { |
|
| 11 | + if(file_exists($i."jate/coreEngine.php")) { |
|
| 11 | 12 | array_push($GLOBALS["JATEPath"], $i); |
| 13 | + } |
|
| 12 | 14 | require_once($i."jate/coreEngine.php"); |
| 13 | 15 | break; |
| 14 | 16 | } |
@@ -21,10 +21,11 @@ discard block |
||
| 21 | 21 | $temp = []; |
| 22 | 22 | if (is_dir($_dir)) { |
| 23 | 23 | if ($dirOpened = opendir($_dir)) { |
| 24 | - while (($file = readdir($dirOpened)) !== false) |
|
| 25 | - if( ($file !='.')&&($file !='..') ) |
|
| 24 | + while (($file = readdir($dirOpened)) !== false) { |
|
| 25 | + if( ($file !='.')&&($file !='..') ) |
|
| 26 | 26 | if($_function($file)) |
| 27 | 27 | array_push($temp,$file); |
| 28 | + } |
|
| 28 | 29 | closedir($dirOpened); |
| 29 | 30 | } |
| 30 | 31 | } |
@@ -32,14 +33,16 @@ discard block |
||
| 32 | 33 | } |
| 33 | 34 | function require_subfolder( $_dir = "./" ) { |
| 34 | 35 | $temp = subFolder_file($_dir); |
| 35 | - foreach ($temp as $i) |
|
| 36 | - jRequire($_dir."/".$i); |
|
| 36 | + foreach ($temp as $i) { |
|
| 37 | + jRequire($_dir."/".$i); |
|
| 38 | + } |
|
| 37 | 39 | } |
| 38 | 40 | function require_js( $_dir = "./" ) { |
| 39 | 41 | $tempArray = []; |
| 40 | 42 | $temp = subFolder_file($_dir); |
| 41 | - foreach ($temp as $i) |
|
| 42 | - array_push($tempArray, $_dir."/".$i); |
|
| 43 | + foreach ($temp as $i) { |
|
| 44 | + array_push($tempArray, $_dir."/".$i); |
|
| 45 | + } |
|
| 43 | 46 | return $tempArray; |
| 44 | 47 | } |
| 45 | 48 | ?> |