diff --git a/app/db_connector.php b/app/db_connector.php
index d058807..734b7a2 100755
--- a/app/db_connector.php
+++ b/app/db_connector.php
@@ -8,9 +8,10 @@
echo $e->getMessage();
}
-function get_images($pdo) {
- $stmt = $pdo->prepare("SELECT * FROM images;");
- $stmt->execute();
+function get_images($pdo, $search='%', $sort='img_date', $sdir='DESC') {
+ $params = array('search' => $search, 'sort' => $sort, 'sdir' => $sdir);
+ $stmt = $pdo->prepare("SELECT * FROM images WHERE img_title LIKE CONCAT('%', :search ,'%') ORDER BY :sort :sdir;");
+ $stmt->execute($params);
$data = $stmt->fetchAll();
$img_list = '
';
diff --git a/public/image.php b/public/image.php
index c88a2ad..7a389ab 100755
--- a/public/image.php
+++ b/public/image.php
@@ -1,7 +1,46 @@
> chosen file type: image
listing files...
+
+
diff --git a/public/index.php b/public/index.php
index 43db329..ab02f4f 100755
--- a/public/index.php
+++ b/public/index.php
@@ -67,6 +67,7 @@
-
\ No newline at end of file
+
diff --git a/public/resources/stylesheet.css b/public/resources/stylesheet.css
index d69a502..1c4392f 100755
--- a/public/resources/stylesheet.css
+++ b/public/resources/stylesheet.css
@@ -138,3 +138,7 @@ footer {
padding: 1rem;
padding-left: 5rem;
}
+
+.db_utilities {
+ padding: 2rem;
+}