Browse Source

Merge pull request #9 from kvazar-network/master

Update from master
sqlite
d47081 1 year 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. 6
      public/rss.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', '');
define('PAGE_LIMIT', 10);
define('CACHE_ENABLED', false);

7
public/index.php

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

9
public/index.phtml

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

2
public/robots.txt

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

6
public/rss.phtml

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

Loading…
Cancel
Save