diff --git a/assets/style.css b/assets/style.css index da0e000..0a15fc9 100644 --- a/assets/style.css +++ b/assets/style.css @@ -35,7 +35,7 @@ text-decoration: underline; } -.preview h1 { +.preview h1, h2 { margin: 0; padding: 0; margin-bottom: 5px; diff --git a/index.php b/index.php index 87d65a3..854740e 100644 --- a/index.php +++ b/index.php @@ -22,9 +22,10 @@ error_reporting(E_ALL); setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING ); if (isset($_GET['q']) && preg_replace('/\s+/', '', $_GET['q']) != '') { - $db = new PDO("sqlite:db.sqlite"); $sql = 'SELECT * FROM indexed WHERE 1=1'; @@ -43,7 +44,6 @@ if (isset($_GET['q']) && preg_replace('/\s+/', '', $_GET['q']) != '') { } $sql = $sql . ';'; - $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING ); $stmt = $db->prepare($sql); $stmt->execute($params); @@ -93,6 +93,35 @@ if (isset($_GET['q']) && preg_replace('/\s+/', '', $_GET['q']) != '') { if (!$results) echo '
No results.
'; +} else { +?> + +
+

welcome to searpl

+i am an open source search +engine that can find stuff :3 +
+ +
+normal words inputted will be tags, a -tag will blacklist the tag and +there is also unsorted SQL LIKE syntax. +
+more stuff like site: coming soon! +
+ +
+i have + +query('SELECT id FROM indexed ORDER BY id DESC LIMIT 1')->fetchColumn(); +?> + pages indexed, using + +mb of storage +
+