diff --git a/donate.xhtml b/donate.xhtml
index 0dcbb1b..7748335 100644
--- a/donate.xhtml
+++ b/donate.xhtml
@@ -2,11 +2,12 @@
-
diff --git a/index.xhtml b/index.xhtml
index b0dbbff..e1b7034 100644
--- a/index.xhtml
+++ b/index.xhtml
@@ -7,10 +7,11 @@
+
-
-
+ ";
+ echo "
";
+ echo "
";
+ echo "
";
+ echo "";
+ }
+
+ require_once "google.php";
+ require_once "tools.php";
+
+ $page = (int) htmlspecialchars($_REQUEST["p"]);
+ $type = (int) $_REQUEST["type"];
+
+ $start_time = microtime(true);
+ $results = get_google_results($query, $page, $type);
+ $end_time = number_format(microtime(true) - $start_time, 2, '.', '');
+
+ echo "
Fetched the results in $end_time seconds
";
+
+ if ($type == 0) // text search
+ {
+ check_for_special_search($query);
+
+ foreach($results as $result)
+ {
+ $title = $result["title"];
+ $url = $result["url"];
+ $base_url = $result["base_url"];
+ $description = $result["description"];
+
+ echo "
";
+ }
+
+ echo "
";
+
+ if ($page != 0)
+ {
+ print_next_pages(0, "<<", $query);
+ print_next_pages($page - 10, "<", $query);
+ }
+
+ for ($i=$page / 10; $page / 10 + 10 > $i; $i++)
+ {
+ $page_input = $i * 10;
+ $page_button = $i + 1;
+
+ print_next_pages($page_input, $page_button, $query);
+ }
+
+ print_next_pages($page + 10, ">", $query);
+
+ echo "
";
+ }
+ else if ($type == 1) // image search
+ {
+
+ echo "
";
+
+ foreach($results as $result)
+ {
+ $src = $result["base64"];
+ $alt = $result["alt"];
+
+ echo "
";
+ echo "
";
+ echo "";
+ }
+
+ echo "
";
+ }
+ ?>
LibreX
diff --git a/search_frame.php b/search_frame.php
deleted file mode 100644
index fed3f90..0000000
--- a/search_frame.php
+++ /dev/null
@@ -1,97 +0,0 @@
-
-
-
-
-
-
-
-
-
- ";
- echo "
";
- echo "
";
- echo "
";
- echo "";
- }
-
- session_start();
-
- require_once "google.php";
- require_once "tools.php";
-
- $query = $_SESSION["q"];
- $page = (int) htmlspecialchars($_SESSION["p"]);
- $type = (int) $_SESSION["type"];
-
- $start_time = microtime(true);
- $results = get_google_results($query, $page, $type);
- $end_time = number_format(microtime(true) - $start_time, 2, '.', '');
-
- echo "
Fetched the results in $end_time seconds
";
-
- if ($type == 0) // text search
- {
- check_for_special_search($query);
-
- foreach($results as $result)
- {
- $title = $result["title"];
- $url = $result["url"];
- $base_url = $result["base_url"];
- $description = $result["description"];
-
- echo "
";
- }
-
- echo "
";
-
- if ($page != 0)
- {
- print_next_pages(0, "<<", $query);
- print_next_pages($page - 10, "<", $query);
- }
-
- for ($i=$page / 10; $page / 10 + 10 > $i; $i++)
- {
- $page_input = $i * 10;
- $page_button = $i + 1;
-
- print_next_pages($page_input, $page_button, $query);
- }
-
- print_next_pages($page + 10, ">", $query);
-
- echo "
";
- }
- else if ($type == 1) // image search
- {
-
- echo "
";
-
- foreach($results as $result)
- {
- $src = $result["base64"];
- $alt = $result["alt"];
-
- echo "
";
- echo "
";
- echo "";
- }
-
- echo "
";
- }
-
- better_session_destroy();
-
- ?>
-
-
\ No newline at end of file
diff --git a/static/librex.png b/static/librex.png
new file mode 100644
index 0000000..c7e0237
Binary files /dev/null and b/static/librex.png differ
diff --git a/static/styles.css b/static/styles.css
index 8fa2a85..927aab4 100644
--- a/static/styles.css
+++ b/static/styles.css
@@ -4,18 +4,14 @@ html {
font-family: Arial, Helvetica, sans-serif;
font-size: 18px;
+
+ overflow-x: hidden;
}
hr {
margin-top: 30px;
}
-iframe {
- width: 100%;
- height: 80vh;
- max-height: 100vh;
-}
-
img {
border: 1px solid #5f6368;
}
@@ -225,7 +221,7 @@ img {
.page-container {
margin-top:50px;
- margin-bottom:50px;
+ margin-bottom:100px;
margin-left:15%;
}
@@ -259,7 +255,7 @@ img {
}
.result-change button {
- color:#c58af9;
+ color:#bd93f9;
background-color: inherit;
display: inline;
@@ -268,8 +264,6 @@ img {
text-decoration: underline;
font-size: 18px;
-
- margin-top:20px;
}
.result-change button:hover {
@@ -346,6 +340,10 @@ img {
margin:10px;
}
+ #time {
+ margin-top: 60px;
+ }
+
}
@@ -411,4 +409,11 @@ img {
padding: 10px;
border: 1px solid #bdc1c6;
width: 500px;
+}
+
+#logo {
+ vertical-align: middle;
+ width: 80px;
+ height: 80px;
+ border: none;
}
\ No newline at end of file
diff --git a/tools.php b/tools.php
index 8f91832..55feae9 100644
--- a/tools.php
+++ b/tools.php
@@ -6,21 +6,6 @@
return $base_url;
}
- function better_session_destroy()
- {
- $_SESSION = array();
-
- if (ini_get("session.use_cookies")) {
- $params = session_get_cookie_params();
- setcookie(session_name(), '', time() - 42000,
- $params["path"], $params["domain"],
- $params["secure"], $params["httponly"]
- );
- }
-
- session_destroy();
- }
-
function check_for_special_search($query)
{
$query_lower = strtolower($query);