Browse Source

Merge pull request #9 from kvazar-network/master

Update from master
sqlite
d47081 11 months ago committed by GitHub
parent
commit
ee8836ab95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      config-default.php
  2. 7
      public/index.php
  3. 9
      public/index.phtml
  4. 2
      public/robots.txt
  5. 4
      public/rss.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', '');
define('PAGE_LIMIT', 10); define('PAGE_LIMIT', 10);
define('CACHE_ENABLED', false); define('CACHE_ENABLED', false);

7
public/index.php

@ -1,13 +1,14 @@
<?php <?php
require_once('../config.php'); require_once(__DIR__ . '/../config.php');
require_once('../library/icon.php'); require_once(__DIR__ . '/../library/icon.php');
require_once('../library/sqlite.php'); require_once(__DIR__ . '/../library/sqlite.php');
$query = isset($_GET['q']) ? preg_replace('/[^\w\s]+/u', '', urldecode($_GET['q'])) : ''; $query = isset($_GET['q']) ? preg_replace('/[^\w\s]+/u', '', urldecode($_GET['q'])) : '';
$ns = ''; $ns = '';
$tx = ''; $tx = '';
$page = 0; $page = 0;
$rss = false;
if (isset($_SERVER['REQUEST_URI'])) { if (isset($_SERVER['REQUEST_URI'])) {

9
public/index.phtml

@ -4,26 +4,25 @@
<link rel="stylesheet" type="text/css" href="<?php echo BASE_URL; ?>css/app.css?v=9" /> <link rel="stylesheet" type="text/css" href="<?php echo BASE_URL; ?>css/app.css?v=9" />
<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 (!$tx) { ?>
<link rel="icon" type="image/png" href="<?php echo BASE_URL; ?>image.php?hash=<?php echo $namespaceHash; ?>&radius=30" /> <meta name="robots" content="noindex,follow" />
<?php } ?> <?php } ?>
<link rel="icon" type="image/png" href="<?php echo BASE_URL; ?>image.php?hash=<?php echo $namespaceHash; ?>&radius=30" />
<?php if ($ns) { ?> <?php if ($ns) { ?>
<?php if ($page) { ?> <?php if ($page) { ?>
<title><?php echo $namespaceValue ? $namespaceValue : $ns; ?> | PART <?php echo $page; ?> | KVAZAR</title> <title><?php echo $namespaceValue ? $namespaceValue : $ns; ?> | PART <?php echo $page; ?> | KVAZAR</title>
<meta name="robots" content="noindex,follow" />
<?php } else { ?> <?php } else { ?>
<title><?php echo $namespaceValue ? $namespaceValue : $ns; ?> | KVAZAR</title> <title><?php echo $namespaceValue ? $namespaceValue : $ns; ?> | KVAZAR</title>
<?php } ?> <?php } ?>
<?php } else { ?> <?php } else { ?>
<?php if ($page) { ?> <?php if ($page) { ?>
<title>KVAZAR | PART <?php echo $page; ?></title> <title>KVAZAR | PART <?php echo $page; ?></title>
<meta name="robots" content="noindex,follow" />
<?php } else if ($tx) { ?> <?php } else if ($tx) { ?>
<title><?php echo $tx && isset($data[0]['key']) ? $data[0]['key'] : $tx; ?> | <?php echo ($namespaceValue ? $namespaceValue : ($namespaceHash ? $namespaceHash : false)); ?> | KVAZAR</title> <title><?php echo $tx && isset($data[0]['key']) ? $data[0]['key'] : $tx; ?> | <?php echo ($namespaceValue ? $namespaceValue : ($namespaceHash ? $namespaceHash : false)); ?> | KVAZAR</title>
<?php } else if ($query) { ?> <?php } else if ($query) { ?>
<title>KVAZAR | SEARCH | <?php echo $query; ?></title> <title>KVAZAR | SEARCH | <?php echo $query; ?></title>
<?php } else { ?> <?php } else { ?>
<title>KVAZAR | TODAY</title> <title>KVAZAR</title>
<?php } ?> <?php } ?>
<?php } ?> <?php } ?>
</head> </head>

2
public/robots.txt

@ -1,2 +1,2 @@
User-Agent: * User-Agent: *
Sitemap: https://kvazar.today/sitemap.xml Sitemap: /sitemap.xml

4
public/rss.phtml

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel> <channel>
<atom:link href="<?php echo BASE_URL; ?><?php echo ($ns ? $ns . '/rss' : <atom:link href="<?php echo BASE_URL; ?><?php echo ($ns ? $ns . '/rss' :
($query ? '?q=' . $query . '&amp;rss' : 'rss')); ?>" rel="self" type="application/rss+xml"></atom:link> ($query ? '?q=' . $query . '&amp;rss' : 'rss')); ?>" rel="self" type="application/rss+xml"></atom:link>
<title>KVAZAR - <?php echo ($namespaceValue ? $namespaceValue : <title>KVAZAR - <?php echo ($namespaceValue ? $namespaceValue :
($namespaceHash ? $namespaceHash : ($namespaceHash ? $namespaceHash :
($query ? 'SEARCH - ' . $query : 'TODAY'))); ?></title> ($query ? 'SEARCH - ' . $query : false))); ?></title>
<description>Observe Kevacoin Universe</description> <description>Observe Kevacoin Universe</description>
<link><?php echo BASE_URL; ?><?php echo ($ns ? $ns : ($query ? '?q=' . $query : false)); ?></link> <link><?php echo BASE_URL; ?><?php echo ($ns ? $ns : ($query ? '?q=' . $query : false)); ?></link>
<?php foreach ($data as $item) { ?> <?php foreach ($data as $item) { ?>

Loading…
Cancel
Save