-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Diemen Design
committed
Jul 13, 2020
1 parent
b5c9e08
commit e3a1859
Showing
88 changed files
with
12,237 additions
and
661 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v0.0.16 | ||
v0.0.17 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
* @author Dennis Suitters <[email protected]> | ||
* @copyright 2014-2019 Diemen Design | ||
* @license http://opensource.org/licenses/MIT MIT License | ||
* @version 0.0.15 | ||
* @version 0.0.17 | ||
* @link https://github.com/DiemenDesign/AuroraCMS | ||
* @notes This PHP Script is designed to be executed using PHP 7+ | ||
* @changes v0.0.4 Fix Tooltips. | ||
|
@@ -17,6 +17,7 @@ | |
* @changes v0.0.12 Fix Multiple Media Adding. | ||
* @changes v0.0.15 Fix truncating file extensions for 3 or 4 character length extensions. | ||
* @changes v0.0.15 Add Edit Media information button. | ||
* @changes v0.0.17 Add Business Hours. | ||
*/ | ||
$getcfg=true; | ||
require'db.php'; | ||
|
@@ -162,6 +163,49 @@ function svg2($svg,$class=null,$size=null){ | |
window.top.window.toastr["error"]("The URL entered is not valid!"); | ||
<?php } | ||
break; | ||
case'add_hours': | ||
$from=filter_input(INPUT_POST,'from',FILTER_SANITIZE_STRING); | ||
$to=filter_input(INPUT_POST,'to',FILTER_SANITIZE_STRING); | ||
$timefrom=filter_input(INPUT_POST,'timefrom',FILTER_SANITIZE_NUMBER_INT); | ||
$timeto=filter_input(INPUT_POST,'timeto',FILTER_SANITIZE_NUMBER_INT); | ||
$info=filter_input(INPUT_POST,'info',FILTER_SANITIZE_STRING); | ||
$q=$db->prepare("INSERT INTO `".$prefix."choices` (uid,contentType,username,password,tis,tie,title) VALUES (0,'hours',:f,:t,:tis,:tie,:info)"); | ||
$q->execute([ | ||
':f'=>$from, | ||
':t'=>$to, | ||
':tis'=>$timefrom, | ||
':tie'=>$timeto, | ||
':info'=>$info | ||
]); | ||
$id=$db->lastInsertId(); | ||
$e=$db->errorInfo(); | ||
if(is_null($e[2])){?> | ||
window.top.window.$('#hours').append(`<?php | ||
echo'<div id="l_'.$id.'" class="form-group row">'. | ||
'<div class="input-group col-12">'. | ||
'<div class="input-group-text">From</div>'. | ||
'<input type="text" class="form-control" value="'.ucfirst($from).'" readonly>'. | ||
'<div class="input-group-text">To</div>'. | ||
'<input type="text" class="form-control" value="'.ucfirst($to).'" readonly>'. | ||
'<div class="input-group-text">Time From</div>'. | ||
'<input type="text" class="form-control" value="'.$timefrom.'" readonly>'. | ||
'<div class="input-group-text">Time From</div>'. | ||
'<input type="text" class="form-control" value="'.$timeto.'" readonly>'. | ||
'<div class="input-group-text">Additional Info</div>'. | ||
'<input type="text" class="form-control" value="'.$info.'" readonly>'. | ||
'<div class="input-group-append">'. | ||
'<form target="sp" action="core/purge.php">'. | ||
'<input type="hidden" name="id" value="'.$id.'">'. | ||
'<input type="hidden" name="t" value="choices">'. | ||
'<button class="btn btn-secondary trash" data-tooltip="tooltip" data-title="Delete" aria-label="Delete">'.svg2('trash').'</button>'. | ||
'</form>'. | ||
'</div>'. | ||
'</div>'. | ||
'</div>';?>`); | ||
<?php }else{?> | ||
window.top.window.toastr["error"]("There was an issue adding the Hours Data!"); | ||
<?php } | ||
break; | ||
case'add_option': | ||
$rid=filter_input(INPUT_POST,'rid',FILTER_SANITIZE_NUMBER_INT); | ||
$ttl=filter_input(INPUT_POST,'ttl',FILTER_SANITIZE_STRING); | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,12 +7,14 @@ | |
* @author Dennis Suitters <[email protected]> | ||
* @copyright 2014-2019 Diemen Design | ||
* @license http://opensource.org/licenses/MIT MIT License | ||
* @version 0.0.10 | ||
* @version 0.0.17 | ||
* @link https://github.com/DiemenDesign/AuroraCMS | ||
* @notes This PHP Script is designed to be executed using PHP 7+ | ||
* @changes v0.0.3 Fix AutoPublishing | ||
* @changes v0.0.10 Replace {} to [] for PHP7.4 Compatibilty. | ||
* @changes v0.0.10 Move other platform security checks so they only check when enabled. | ||
* @changes v0.0.17 Add rank selection to menu retrieval query. | ||
* @changes v0.0.17 Fix Swap Memory calculation when None is used. | ||
*/ | ||
define('UNICODE','UTF-8'); | ||
$getcfg=true; | ||
|
@@ -196,7 +198,7 @@ function getmemstats(){ | |
'total'=>$memtotal*1024, | ||
'used'=>$memused*1024, | ||
'swap'=>$memswap, | ||
'swapused'=>$memswap - $memswapfree | ||
'swapused'=>($memswap==$memswapfree?0:$memswap - $memswapfree) | ||
]; | ||
return$mem; | ||
} | ||
|
@@ -607,8 +609,8 @@ function page($args=false){ | |
'logout'=>['front','logout'], | ||
''=>['front','index'] | ||
]; | ||
$s=$db->prepare("SELECT * FROM `".$prefix."menu` WHERE active=1"); | ||
$s->execute(); | ||
$s=$db->prepare("SELECT * FROM `".$prefix."menu` WHERE active=1 AND rank<=:rank"); | ||
$s->execute([':rank'=>$_SESSION['rank']]); | ||
while($r=$s->fetch(PDO::FETCH_ASSOC)){ | ||
if(method_exists('front',$r['contentType']))$routes[$r['contentType']]=['front',$r['contentType']]; | ||
else$routes[$r['contentType']]=['front','content']; | ||
|
Oops, something went wrong.