Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Commit

Permalink
Updated CKEditor, minor blog improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Vilican committed May 1, 2019
1 parent 385145e commit 500bad8
Show file tree
Hide file tree
Showing 149 changed files with 4,167 additions and 2,354 deletions.
8 changes: 7 additions & 1 deletion admin/content-edit-article.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,18 @@
$message .= 'Titulek musí obsahovat 5 až 48 znaků!<br>';
$err = true;
}

if (date('Y-m-d H:i:s', strtotime($_POST["date"])) != $_POST["date"]) {
$message .= 'Datum není platné!<br>';
$err = true;
}

if ($err) {
$message = '<div class="alert alert-danger"><p><strong>Při ukládání došlo k následujícím chybám:</strong></p><p>'. $message .'</p></div>';
break;
}

$mysql->query("UPDATE `articles` SET `title` = ". $mysql->quote(santise($_POST["title"])) .", `text` = ". $mysql->quote($_POST["content"]) .", `description` = ". $mysql->quote(santise($_POST["description"])) .", `location` = ". $mysql->quote(santise($_POST["location"])) ." WHERE `articles`.`id` = ". $mysql->quote($_GET["id"]) .";");
$mysql->query("UPDATE `articles` SET `title` = ". $mysql->quote(santise($_POST["title"])) .", `text` = ". $mysql->quote($_POST["content"]) .", `description` = ". $mysql->quote(santise($_POST["description"])) .", `location` = ". $mysql->quote(santise($_POST["location"])) .", `date` = ". $mysql->quote(santise($_POST["date"])) ." WHERE `articles`.`id` = ". $mysql->quote($_GET["id"]) .";");
$message = '<div class="alert alert-success"><strong>Stránka upravena</strong></div>';
$art = $mysql->query("SELECT * FROM `articles` WHERE `articles`.`id` = ". $mysql->quote($_GET["id"]) .";")->fetch_assoc();

Expand All @@ -79,6 +84,7 @@
<tr><td>Titulek <span class="text-danger">*</span>:</td><td><input type="text" name="title" class="form-control" value="'. restore_value($art["title"], santise($_POST["title"])) .'"></td></tr>
<tr><td>Popis:</td><td><textarea name="description" class="form-control">'. restore_value($art["description"], santise($_POST["description"])) .'</textarea></td></tr>
<tr><td>Obsah <span class="text-danger">*</span>:</td><td><textarea name="content" class="form-control">'. restore_value($art["text"], $_POST["content"]) .'</textarea>'. $lic .'</td></tr>
<tr><td>Datum <span class="text-danger">*</span>:</td><td><input type="text" name="date" class="form-control" value="'. restore_value($art["date"], santise($_POST["date"])) .'"></td></tr>
<tr><td>&nbsp;</td><td><input type="hidden" name="csrf" value="'. generate_csrf() .'"><input type="submit" name="submit" value="Upravit" class="btn btn-default"></td></tr>
</table></form>';

Expand Down
11 changes: 4 additions & 7 deletions admin/sys.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,11 @@
}

if ($sys["license"] >= 1) {
$lic_notice = '<div class="alert alert-success"><p><strong>Licencovaný systém (PRO)</strong></p><p>a) komerční použití je povoleno<br>b) zpětný odkaz není požadován</p></div>';
} else {
$lic_notice = '<div class="alert alert-success"><p><strong>Licencovaný systém (PRO)</strong></p><p>a) komerční použití je povoleno<br>b) zpětný odkaz není požadován<br>c) děkujeme, že jste podpořili vývoj systému</p></div>';
$whitelabel = '<div class="checkbox"><label><input type="checkbox" name="whitelabel"' . parse_to_checkbox($sys["whitelabel"]) . '> Skrýt zpětné odkazy <span class="label label-warning">PRO</span></label></div>';
} else {
$lic_notice = '<div class="alert alert-warning"><p><strong>Nelicencovaný systém (FREE)</strong></p><p>a) pouze nekomerční použití<br>b) musí zobrazovat zpětný odkaz</p></div>';
}

if ($sys["license"] >= 2) {
$whitelabel = '<div class="checkbox"><label><input type="checkbox" name="whitelabel"' . parse_to_checkbox($sys["whitelabel"]) . '> Skrýt zpětné odkazy <span class="label label-warning">PRO</span></label></div>';
}

$page["title"] = 'Nastavení systému';

Expand Down Expand Up @@ -174,7 +171,7 @@
<div id="sys" class="tab-pane fade">
<div class="row col-md-12">
<div class="panel panel-default">
<div class="panel-heading">WebSys v1.1 Boreas <span class="label label-success">stable</span></div>
<div class="panel-heading">WebSys v1.1.1 Boreas <span class="label label-success">stable</span></div>
<div class="panel-body">
<p>Vytvořil Matyáš Koc</p>
<p>Systém je povoleno využívat jen v souladu s <a href="https://websys.sufix.cz/index.php?p=lic">aktivní licencí</a></p>
Expand Down
4 changes: 2 additions & 2 deletions core/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ function user_menu() {
function article_history() {
global $sys, $mysql;

$menu = "<p>Nejnovější články:</p>";
$menu = "<p><strong>Nejnovější články:</strong></strong></p>";
$articles = $mysql->query("SELECT `id`, `location`, `title` FROM `articles` WHERE `approved` = 1 ORDER BY `date` DESC LIMIT 5;");

while ($article = $articles->fetch_assoc()) {

$menu .= '<a href="index.php?p='. $article["location"] .'&id='. $article["id"] .'"><p class="list-group-item-heading">'. $article["title"] .'</p></a>';
$menu .= '<a href="index.php?p='. $article["location"] .'&id='. $article["id"] .'"><p class="">'. $article["title"] .'</p></a>';

}

Expand Down
Loading

0 comments on commit 500bad8

Please sign in to comment.