Browse Source

change URI to URL

pull/8/head
d47081 2 years ago
parent
commit
9595cbcada
  1. 2
      config-default.php
  2. 4
      public/index.php
  3. 18
      public/index.phtml

2
config-default.php

@ -6,7 +6,7 @@ ini_set('display_startup_errors', '1');
error_reporting(E_ALL); error_reporting(E_ALL);
// Application // Application
define('BASE_URL', 'https://kvazar.today'); define('BASE_URL', 'https://kvazar.today/');
define('PAGE_LIMIT', 10); define('PAGE_LIMIT', 10);
define('SEF_MODE', true); define('SEF_MODE', true);
define('CACHE_ENABLED', false); define('CACHE_ENABLED', false);

4
public/index.php

@ -83,9 +83,9 @@ if (SEF_MODE) {
if ($data) { if ($data) {
if (in_array($page, [0, 1])) { if (in_array($page, [0, 1])) {
$older = ($ns ? $ns . '/2' : '/2'); $older = ($ns ? $ns . '/2' : '2');
} else { } else {
$older = ($ns ? $ns . '/' . ($page + 1) : '/' . ($page + 1)); $older = ($ns ? $ns . '/' . ($page + 1) : ($page + 1));
} }
} else { } else {
$older = false; $older = false;

18
public/index.phtml

@ -1,11 +1,11 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<link rel="stylesheet" type="text/css" href="/css/app.css?v=4" /> <link rel="stylesheet" type="text/css" href="<?php echo BASE_URL; ?>css/app.css?v=4" />
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="description" content="Open Source Content Exploring Platform for Kevacoin Blockchain" /> <meta name="description" content="Open Source Content Exploring Platform for Kevacoin Blockchain" />
<?php if ($namespaceHash) { ?> <?php if ($namespaceHash) { ?>
<link rel="icon" type="image/png" href="/image.php?hash=<?php echo $namespaceHash; ?>&radius=30" /> <link rel="icon" type="image/png" href="<?php echo BASE_URL; ?>image.php?hash=<?php echo $namespaceHash; ?>&radius=30" />
<?php } ?> <?php } ?>
<?php if ($ns) { ?> <?php if ($ns) { ?>
<?php if ($page) { ?> <?php if ($page) { ?>
@ -29,7 +29,7 @@
<div class="t-center px-16 pt-54"> <div class="t-center px-16 pt-54">
<div class="mx-a mw-560 px-16"> <div class="mx-a mw-560 px-16">
<div class="mb-20"> <div class="mb-20">
<a class="logo f-s-20 c-0" href="/">KVAZAR</a> <a class="logo f-s-20 c-0" href="<?php echo BASE_URL; ?>">KVAZAR</a>
</div> </div>
<?php if ($ns) { ?> <?php if ($ns) { ?>
<div class="mx-a mw-560 px-16 pb-16"> <div class="mx-a mw-560 px-16 pb-16">
@ -48,18 +48,18 @@
<?php if (!$ns) { ?> <?php if (!$ns) { ?>
<div class="mx-a mw-560 mb-16"> <div class="mx-a mw-560 mb-16">
<?php if (SEF_MODE) { ?> <?php if (SEF_MODE) { ?>
<a href="/<?php echo $item['namehash']; ?>"> <a href="<?php echo BASE_URL; ?><?php echo $item['namehash']; ?>">
<img class="br-50" src="/image.php?hash=<?php echo $item['namehash']; ?>" alt="<?php echo $item['namehash']; ?>" /> <img class="br-50" src="/image.php?hash=<?php echo $item['namehash']; ?>" alt="<?php echo $item['namehash']; ?>" />
</a> </a>
<?php } else { ?> <?php } else { ?>
<a href="/?ns=<?php echo $item['namehash']; ?>"> <a href="<?php echo BASE_URL; ?>?ns=<?php echo $item['namehash']; ?>">
<img class="br-50" src="/image.php?hash=<?php echo $item['namehash']; ?>" alt="<?php echo $item['namehash']; ?>" /> <img class="br-50" src="/image.php?hash=<?php echo $item['namehash']; ?>" alt="<?php echo $item['namehash']; ?>" />
</a> </a>
<?php } ?> <?php } ?>
</div> </div>
<?php } ?> <?php } ?>
<?php if (!$tx) { ?> <?php if (!$tx) { ?>
<a class="d-block" href="/<?php echo (SEF_MODE ? $item['txid'] : '?tx=' . $item['txid']); ?>"> <a class="d-block" href="<?php echo BASE_URL; ?><?php echo (SEF_MODE ? $item['txid'] : '?tx=' . $item['txid']); ?>">
<?php } ?> <?php } ?>
<div class="f-s-16 mb-16 of-a"> <div class="f-s-16 mb-16 of-a">
<?php echo $item['key']; ?> <?php echo $item['key']; ?>
@ -80,18 +80,18 @@
<?php if (!$tx && ($newer !== false || $older !== false)) { ?> <?php if (!$tx && ($newer !== false || $older !== false)) { ?>
<div class="t-center pt-16 pb-27"> <div class="t-center pt-16 pb-27">
<?php if ($newer !== false) { ?> <?php if ($newer !== false) { ?>
<a href="/<?php echo $newer; ?>"<?php echo $newer ? ' rel="nofollow"' : false; ?>>newer</a> <a href="<?php echo BASE_URL; ?><?php echo $newer; ?>"<?php echo $newer ? ' rel="nofollow"' : false; ?>>newer</a>
<?php } ?> <?php } ?>
<?php if ($newer !== false && $older !== false) { ?> <?php if ($newer !== false && $older !== false) { ?>
| |
<?php } ?> <?php } ?>
<?php if ($older !== false) { ?> <?php if ($older !== false) { ?>
<a href="/<?php echo $older; ?>"<?php echo $older ? ' rel="nofollow"' : false; ?>>older</a> <a href="<?php echo BASE_URL; ?><?php echo $older; ?>"<?php echo $older ? ' rel="nofollow"' : false; ?>>older</a>
<?php } ?> <?php } ?>
</div> </div>
<?php } ?> <?php } ?>
<div class="t-center px-16 pb-27"> <div class="t-center px-16 pb-27">
<form name="namespace" action="/" method="GET"> <form name="namespace" action="<?php echo BASE_URL; ?>" method="GET">
<input class="p-8" type="text" name="q" value="<?php echo ($query ? $query : ''); ?>" placeholder="key, value, block, ns, txid" autocomplete="off" /> <input class="p-8" type="text" name="q" value="<?php echo ($query ? $query : ''); ?>" placeholder="key, value, block, ns, txid" autocomplete="off" />
<!--<button class="p-8 cursor-pointer" type="submit">Search</button>--> <!--<button class="p-8 cursor-pointer" type="submit">Search</button>-->
</form> </form>

Loading…
Cancel
Save