diff --git a/changelog.php b/changelog.php index b30f3e3..bc628db 100644 --- a/changelog.php +++ b/changelog.php @@ -1,19 +1,105 @@ - +Changelog message deleted!"; + $updateCache = true; + } + } else { + if ($status) { + // POST update + if ($changelogId > 0) { + mysql_update("UPDATE `znote_changelog` SET `text`='$changelogText' WHERE `id`='$changelogId' LIMIT 1;"); + echo "

Changelog message updated!

"; + $updateCache = true; + } else { + // POST create + $time = time(); + mysql_insert("INSERT INTO `znote_changelog` (`text`, `time`, `report_id`, `status`) VALUES ('$changelogText', '$time', '0', '35');"); + echo "

Changelog message created!

"; + $updateCache = true; + } + } + } + if ($action === 2) { + $old = mysql_select_single("SELECT `text` FROM `znote_changelog` WHERE `id`='$changelogId' LIMIT 1;"); + } + // HTML to create or update + ?> +

Add or update changelog

+
+ +
+ +
+

Changelog

hasExpired() || $updateCache === true) { + $changelogs = mysql_select_multi("SELECT `id`, `text`, `time`, `report_id`, `status` FROM `znote_changelog` ORDER BY `id` DESC;"); + + $cache->setContent($changelogs); + $cache->save(); +} else { + $changelogs = $cache->load(); +} +if (isset($changelogs) && !empty($changelogs) && $changelogs !== false) { ?> + Delete"; + } + ?> + + + + - +

Currently no change logs submitted.

\ No newline at end of file
ChangelogsUpdate

+
+ + + +
+
+
+ + + +
+