Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for installs not made at root of web server #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions about.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
</head>
<body>

<form action="/" method="get">
<a href="/"><font size=6 color="#008000">Frog</font><font size=6 color="#000000">Find!</font></a> Leap again: <input type="text" size="30" name="q" value="<?php echo urldecode($query) ?>">
<form action="./" method="get">
<a href="./"><font size=6 color="#008000">Frog</font><font size=6 color="#000000">Find!</font></a> Leap again: <input type="text" size="30" name="q" value="<?php echo urldecode($query) ?>">
<input type="submit" value="Ribbbit!">
</form>
<hr>
Expand Down
56 changes: 28 additions & 28 deletions choose_edition.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,36 +20,36 @@
<center>
<small>Basic HTML Google News for vintage computers. Built by <a href="https://youtube.com/ActionRetro" target="_blank"><b>Action Retro</b></a> on YouTube. Tested on Netscape 1.1 through 4 on a Mac SE/30.</small>
<p><h2>CHOOSE YOUR EDITION:</h2></p>
<p><a href='/index.php?section=nation&loc=US'>United States</a></p>
<p><a href='/index.php?section=nation&loc=JP'>Japan</a></p>
<p><a href='/index.php?section=nation&loc=UK'>United Kingdom</a></p>
<p><a href='./index.php?section=nation&loc=US'>United States</a></p>
<p><a href='./index.php?section=nation&loc=JP'>Japan</a></p>
<p><a href='./index.php?section=nation&loc=UK'>United Kingdom</a></p>
<p>Spain (RIP)</p>
<p><a href='/index.php?section=nation&loc=CA'>Canada</a></p>
<p><a href='/index.php?section=nation&loc=DE'>Deutschland</a></p>
<p><a href='/index.php?section=nation&loc=IT'>Italia</a></p>
<p><a href='/index.php?section=nation&loc=FR'>France</a></p>
<p><a href='/index.php?section=nation&loc=AU'>Australia</a></p>
<p><a href='/index.php?section=nation&loc=TW'>Taiwan</a></p>
<p><a href='/index.php?section=nation&loc=NL'>Nederland</a></p>
<p><a href='/index.php?section=nation&loc=BR'>Brasil</a></p>
<p><a href='/index.php?section=nation&loc=TR'>Turkey</a></p>
<p><a href='/index.php?section=nation&loc=BE'>Belgium</a></p>
<p><a href='/index.php?section=nation&loc=GR'>Greece</a></p>
<p><a href='/index.php?section=nation&loc=IN'>India</a></p>
<p><a href='/index.php?section=nation&loc=MX'>Mexico</a></p>
<p><a href='/index.php?section=nation&loc=DK'>Denmark</a></p>
<p><a href='/index.php?section=nation&loc=AR'>Argentina</a></p>
<p><a href='/index.php?section=nation&loc=CH'>Switzerland</a></p>
<p><a href='/index.php?section=nation&loc=CL'>Chile</a></p>
<p><a href='/index.php?section=nation&loc=AT'>Austria</a></p>
<p><a href='/index.php?section=nation&loc=KR'>Korea</a></p>
<p><a href='/index.php?section=nation&loc=IE'>Ireland</a></p>
<p><a href='/index.php?section=nation&loc=CO'>Colombia</a></p>
<p><a href='/index.php?section=nation&loc=PL'>Poland</a></p>
<p><a href='/index.php?section=nation&loc=PT'>Portugal</a></p>
<p><a href='/index.php?section=nation&loc=PK'>Pakistan</a></p>
<p><a href='./index.php?section=nation&loc=CA'>Canada</a></p>
<p><a href='./index.php?section=nation&loc=DE'>Deutschland</a></p>
<p><a href='./index.php?section=nation&loc=IT'>Italia</a></p>
<p><a href='./index.php?section=nation&loc=FR'>France</a></p>
<p><a href='./index.php?section=nation&loc=AU'>Australia</a></p>
<p><a href='./index.php?section=nation&loc=TW'>Taiwan</a></p>
<p><a href='./index.php?section=nation&loc=NL'>Nederland</a></p>
<p><a href='./index.php?section=nation&loc=BR'>Brasil</a></p>
<p><a href='./index.php?section=nation&loc=TR'>Turkey</a></p>
<p><a href='./index.php?section=nation&loc=BE'>Belgium</a></p>
<p><a href='./index.php?section=nation&loc=GR'>Greece</a></p>
<p><a href='./index.php?section=nation&loc=IN'>India</a></p>
<p><a href='./index.php?section=nation&loc=MX'>Mexico</a></p>
<p><a href='./index.php?section=nation&loc=DK'>Denmark</a></p>
<p><a href='./index.php?section=nation&loc=AR'>Argentina</a></p>
<p><a href='./index.php?section=nation&loc=CH'>Switzerland</a></p>
<p><a href='./index.php?section=nation&loc=CL'>Chile</a></p>
<p><a href='./index.php?section=nation&loc=AT'>Austria</a></p>
<p><a href='./index.php?section=nation&loc=KR'>Korea</a></p>
<p><a href='./index.php?section=nation&loc=IE'>Ireland</a></p>
<p><a href='./index.php?section=nation&loc=CO'>Colombia</a></p>
<p><a href='./index.php?section=nation&loc=PL'>Poland</a></p>
<p><a href='./index.php?section=nation&loc=PT'>Portugal</a></p>
<p><a href='./index.php?section=nation&loc=PK'>Pakistan</a></p>
</center>
<small><a href="/index.php?loc=<?php echo $loc ?>">< Back to <font color="#9400d3">68k.news</font> <?php echo $loc ?>front page</a></small>
<small><a href="./index.php?loc=<?php echo $loc ?>">< Back to <font color="#9400d3">68k.news</font> <?php echo $loc ?>front page</a></small>
<p><center><small>Powered by Mozilla Readability (Andres Rey PHP Port) and SimplePie</small></p>
</body>
</html>
2 changes: 1 addition & 1 deletion image.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<body">
<small><a href="<?php echo $_SERVER['HTTP_REFERER'] . '?loc=' . strtoupper($loc) ?>">< Back to article</a></small>
<p><small><b>Viewing image:</b> <?php echo $url ?></small></p>
<img src="/image_compressed.php?i=<?php echo $url; ?>">
<img src="./image_compressed.php?i=<?php echo $url; ?>">
<br><br>
<small><a href="<?php echo $_SERVER['HTTP_REFERER'] . '?loc=' . strtoupper($loc) ?>">< Back to article</a></small>
</body>
Expand Down
8 changes: 4 additions & 4 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
// result link, redirected through our proxy
$result_link = explode('class="result__a" href="', $result_blocks[$x])[1];
$result_topline = explode('">', $result_link);
$result_link = str_replace( '//duckduckgo.com/l/?uddg=', '/read.php?a=', $result_topline[0]);
$result_link = str_replace( '//duckduckgo.com/l/?uddg=', './read.php?a=', $result_topline[0]);
// result title
$result_title = str_replace("</a>","",explode("\n", $result_topline[1]));
// result display url
Expand Down Expand Up @@ -66,8 +66,8 @@ function clean_str($str) {

<?php if($show_results) { // there's a search query in q, so show search results ?>

<form action="/" method="get">
<a href="/"><font size=6 color="#008000">Frog</font><font size=6 color="#000000">Find!</font></a> Leap again: <input type="text" size="30" name="q" value="<?php echo urldecode($query) ?>">
<form action="./" method="get">
<a href="./"><font size=6 color="#008000">Frog</font><font size=6 color="#000000">Find!</font></a> Leap again: <input type="text" size="30" name="q" value="<?php echo urldecode($query) ?>">
<input type="submit" value="Ribbbit!">
</form>
<hr>
Expand All @@ -81,7 +81,7 @@ function clean_str($str) {
<center><h3>The Search Engine for Vintage Computers</h3></center>
<br><br>
<center>
<form action="/" method="get">
<form action="./" method="get">
Leap to: <input type="text" size="30" name="q"><br>
<input type="submit" value="Ribbbit!">
</center>
Expand Down
6 changes: 3 additions & 3 deletions read.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
$readable_article = str_replace( 'em>', 'i>', $readable_article ); //change <em> to <i>

$readable_article = clean_str($readable_article);
$readable_article = str_replace( 'href="http', 'href="/read.php?a=http', $readable_article ); //route links through proxy
$readable_article = str_replace( 'href="http', 'href="./read.php?a=http', $readable_article ); //route links through proxy

} catch (ParseException $e) {
$error_text .= 'Sorry! ' . $e->getMessage() . '<br>';
Expand All @@ -73,8 +73,8 @@ function clean_str($str) {
</head>
<body>
<p>
<form action="/read.php" method="get">
<a href="/">Back to <b><font color="#008000">Frog</font><font color="000000">Find!</font></a></b> | Browsing URL: <input type="text" size="38" name="a" value="<?php echo $article_url ?>">
<form action="./read.php" method="get">
<a href="./">Back to <b><font color="#008000">Frog</font><font color="000000">Find!</font></a></b> | Browsing URL: <input type="text" size="38" name="a" value="<?php echo $article_url ?>">
<input type="submit" value="Go!">
</form>
</p>
Expand Down