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

4
public/index.php

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

18
public/index.phtml

@ -1,11 +1,11 @@ @@ -1,11 +1,11 @@
<!DOCTYPE html>
<html>
<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 name="description" content="Open Source Content Exploring Platform for Kevacoin Blockchain" />
<?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 if ($ns) { ?>
<?php if ($page) { ?>
@ -29,7 +29,7 @@ @@ -29,7 +29,7 @@
<div class="t-center px-16 pt-54">
<div class="mx-a mw-560 px-16">
<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>
<?php if ($ns) { ?>
<div class="mx-a mw-560 px-16 pb-16">
@ -48,18 +48,18 @@ @@ -48,18 +48,18 @@
<?php if (!$ns) { ?>
<div class="mx-a mw-560 mb-16">
<?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']; ?>" />
</a>
<?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']; ?>" />
</a>
<?php } ?>
</div>
<?php } ?>
<?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 } ?>
<div class="f-s-16 mb-16 of-a">
<?php echo $item['key']; ?>
@ -80,18 +80,18 @@ @@ -80,18 +80,18 @@
<?php if (!$tx && ($newer !== false || $older !== false)) { ?>
<div class="t-center pt-16 pb-27">
<?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 if ($newer !== false && $older !== false) { ?>
|
<?php } ?>
<?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 } ?>
</div>
<?php } ?>
<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" />
<!--<button class="p-8 cursor-pointer" type="submit">Search</button>-->
</form>

Loading…
Cancel
Save