From 87ffa36c1bfa49259e48d94f09e64f83632f0071 Mon Sep 17 00:00:00 2001 From: Maksymilian Jopek Date: Thu, 13 Apr 2023 15:47:15 +0200 Subject: v1.0.0 --- main.php | 122 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 main.php (limited to 'main.php') diff --git a/main.php b/main.php new file mode 100644 index 0000000..5a0d62a --- /dev/null +++ b/main.php @@ -0,0 +1,122 @@ +setAttribute(PDO::ATTR_EMULATE_PREPARES, false); +$stmt = $pdo->prepare("SELECT * FROM `cms_card`"); +$stmt->execute(); +$cards = $stmt->fetchAll(PDO::FETCH_ASSOC); +?> + + + + + + + + + + + + + + + CMS - Main + + + +
+
+
+ 40) + $title = substr($card["title"], 0, 40) . "..."; + else + $title = $card["title"]; + if (strlen($card["body"]) > 250) + $body = substr($card["body"], 0, 250) . "..."; + else + $body = $card["body"]; + $i++; + echo " +
+
News $i
+
+
$title
+

$body

+ Read whole +
+
+ "; + } ?> +
+
+
Advertisement
+
+
By our thing
+

Out thing is better than those other things

+ Go somewhere +
+ +

+ Edit cards'; + ?> + Logout +

+ + + + + -- cgit v1.3.1