Skip to content

Commit

Permalink
Version 3.0.3 dev
Browse files Browse the repository at this point in the history
  • Loading branch information
KRtekTM committed Apr 12, 2014
1 parent 0c1dda0 commit dc9c35f
Show file tree
Hide file tree
Showing 30 changed files with 313 additions and 528 deletions.
6 changes: 6 additions & 0 deletions www/.config - Copy.php
@@ -0,0 +1,6 @@
<?php
$ktsDbHost=""; //name of MySQL server (this computer=localhost)
$ktsDbUser=""; //user name for connection to database
$ktsDbPasswd=""; //password for user
$ktsDbName=""; //database where are tables of KTS
?>
10 changes: 5 additions & 5 deletions www/.config.php
@@ -1,6 +1,6 @@
<?php
$ktsDbHost=""; //name of MySQL server (this computer=localhost)
$ktsDbUser=""; //user name for connection to database
$ktsDbPasswd=""; //password for user
$ktsDbName=""; //database where are tables of KTS
?>
$ktsDbHost="localhost"; //name of MySQL server (this computer=localhost)
$ktsDbUser="root"; //user name for connection to database
$ktsDbPasswd="xrJASR"; //password for user
$ktsDbName="kts3_clean"; //database where are tables of KTS
?>
14 changes: 7 additions & 7 deletions www/admin/.htaccess
@@ -1,13 +1,13 @@
#RewriteBase /admin/
#RewriteBase /admin/
RewriteEngine on
RewriteRule ^p-(.*) index.php?page=$1 [QSA,NC]
#
# Autentizace
AuthUserFile /home/a3672622/public_html/admin/.htpasswd
AuthName "Login to administration of KTS"
AuthType Basic
require valid-user
Options Indexes FollowSymLinks
#AuthUserFile /admin/.htpasswd
#AuthName "Login to administration of KTS"
#AuthType Basic
#require valid-user
#Options Indexes FollowSymLinks

#<IfModule mod_php5.c>
#php_value post_max_size 100M
Expand All @@ -16,4 +16,4 @@ Options Indexes FollowSymLinks
#php_value max_execution_time 259200
#php_value max_input_time 259200
#php_value session.gc_maxlifetime 1200
#</IfModule>
#</IfModule>
2 changes: 1 addition & 1 deletion www/admin/.htpasswd
@@ -1 +1 @@
default:YWirgvp3L7o22
default:YWirgvp3L7o22
2 changes: 1 addition & 1 deletion www/functions/core.php
@@ -1,4 +1,4 @@
<?php
<?php

function cesky_mesic($mesic) {
static $nazvy = array(1 => 'leden', 'únor', 'březen', 'duben', 'květen', 'červen', 'červenec', 'srpen', 'září', 'říjen', 'listopad', 'prosinec');
Expand Down
10 changes: 5 additions & 5 deletions www/functions/drawPage/categories.php
@@ -1,13 +1,13 @@
<?php
$categId = $_GET['cid'];
$categId = $_GET['id'];

$categTitle = $db->QueryValue("title","kts_categories","id='{$categId}'");
$tproc->set("title", $categTitle);

$topicList = $db->QueryArray("id,title","kts_topics","categ='{$categId}'");
$topics = $tproc->loop("Topics", "topicId", "topicTitle");
$topics = $tproc->loop("topics", "topicId", "topicTitle");
foreach ($topicList as $d) {
$topics->push($d[0], $d[1]);
}
$topics->commit();
?>
?>
3 changes: 2 additions & 1 deletion www/functions/drawPage/footer.php
Expand Up @@ -10,6 +10,7 @@
$count = floor((time() - $update)/86400);

$tproc->set("headTemplate", $db->QueryValue("value","kts_config","name='template'"));
$tproc->set("ktsVersion", $db->QueryValue("value","kts_config","name='version'"));
$tproc->set("update", "{$dayName} {$day}. {$month} {$year}");
$tproc->set("count", $count);
?>
?>
2 changes: 1 addition & 1 deletion www/functions/drawPage/htmltmpl.php
Expand Up @@ -734,7 +734,7 @@ function process(&$template, $part=NULL, $direct=FALSE,
$escape = $tokens[$i + _PARAM_ESCAPE];
$global = $tokens[$i + _PARAM_GLOBAL];
$skip_params = TRUE;

# If output of current block is not disabled then append
# the substitued and escaped variable to the output.
if (! in_array($DISABLE_OUTPUT, $output_control)) {
Expand Down
9 changes: 5 additions & 4 deletions www/functions/drawPage/main.php
@@ -1,7 +1,7 @@
<?php
$topicId = $db->QueryValue("value","kts_config","name='mainTopicID'");

$query = $db->QueryArray("*","kts_topics","id='{$topicId}'");
$query = $db->QueryArray("title,value,date","kts_topics","id='{$topicId}'");

foreach ($query as $d) {
require("functions/texy/texy.php");
Expand All @@ -11,9 +11,10 @@
$texy->htmlOutputModule->baseIndent = 1;
$texy->encoding = 'utf-8';

$html = $texy->process($d[3]);
$html = $texy->process($d[1]);

$tproc->set("title", $d[0]);
$tproc->set("content", $html);
$tproc->set("date", $d[4]);
$tproc->set("date", $d[2]);
}
?>
?>
46 changes: 25 additions & 21 deletions www/functions/drawPage/show.php
@@ -1,38 +1,42 @@
<?php
$topicId = $_GET['tid'];
$topicId = $_GET['id'];


$query = $db->QueryArray("*","kts_topics","id='{$topicId}'");
$query = $db->QueryArray("categ,title,value,date","kts_topics","id='{$topicId}'");

foreach ($query as $d) {
$tproc->set("title", $d[2]);
$tproc->set("title", $d[1]);

require("functions/texy/texy.php");

$texy = new Texy();

$texy->htmlOutputModule->baseIndent = 1;
$texy->encoding = 'utf-8';

$html = $texy->process($d[3]);
$html = $texy->process($d[2]);

$html = str_replace("attachment/", "attachment/{$topicId}/", $html);

$tproc->set("content", $html);
$tproc->set("date", $d[4]);
if(is_dir("attachment/{$topicId}")) {
$tproc->set("control", 1);
$albumList = scandir("attachment/{$topicId}/");
$attachments = $tproc->loop("attachments", "title","id");
for($i=0; $i<count($albumList);$i++) {
if($albumList[$i]!="." && $albumList[$i]!="..") {
$attachments->push($albumList[$i],$topicId);
}
$tproc->set("date", $d[3]);
}

if(is_dir("attachment/{$topicId}")) {
$tproc->set("control", 1);
$albumList = scandir("attachment/{$topicId}/");
$attachments = $tproc->loop("attachment", "file", "id");

for($i=0; $i<count($albumList);$i++) {
if($albumList[$i]!="." && $albumList[$i]!="..") {
$attachments->push($albumList[$i],$topicId);
}

$attachments->commit();
}

$attachments->commit();
}
?>
else {
$tproc->set("attachEnabled", 0);
}
?>

6 changes: 3 additions & 3 deletions www/functions/title.php
Expand Up @@ -15,13 +15,13 @@ function ktsTitle($db) {
break;

case 'categories':
$cid = $_GET['cid'];
$cid = $_GET['id'];
$categoryTitle = $db->QueryValue("title","kts_categories","id='{$cid}'");
$title = "{$categoryTitle} - {$portalTitle}";
break;

case 'show':
$tid = $_GET['tid'];
$tid = $_GET['id'];
$topicTitle = $db->QueryValue("title","kts_topics","id='{$tid}'");
$title = "{$topicTitle} - {$portalTitle}";
break;
Expand All @@ -43,4 +43,4 @@ function ktsTitle($db) {

return $title;
}
?>
?>
10 changes: 5 additions & 5 deletions www/templates/kts/404.tmpl
@@ -1,6 +1,6 @@
<div id="container" class="center">
<div id="content">
<img src="images/404.jpg" alt="Error 404 - Page not found" /><br />
<h2>Nejspíš to tu už není, omlouváme se.</h2>
<div id="contentBlock">
<div class="center">
<img src="images/404.jpg" alt="Error 404 - Page not found" /><br />
<h2>Nějak se to pokazilo, omlouváme se :(</h2>
</div>
</div>
</div>
11 changes: 6 additions & 5 deletions www/templates/kts/404.tmplc
@@ -1,6 +1,7 @@
O:8:"Template":6:{s:8:"_version";d:1.2199999999999999733546474089962430298328399658203125;s:5:"_file";s:23:"templates/zpnj/404.tmpl";s:7:"_tokens";a:1:{i:0;s:214:" <div class="innerBlock center">
<div id="content">
<img src="images/404.jpg" alt="Error 404 - Page not found" /><br />
<h2>Nejspíš to tu už není, omlouváme se.</h2>
O:8:"Template":6:{s:8:"_version";d:1.2199999999999999733546474089962430298328399658203125;s:5:"_file";s:22:"templates/kts/404.tmpl";s:7:"_tokens";a:1:{i:0;s:205:" <div id="contentBlock">
<div class="center">
<img src="images/404.jpg" alt="Error 404 - Page not found" /><br />
<h2>Nějak se to pokazilo, omlouváme se :(</h2>
</div>
</div>";}s:15:"_compile_params";a:5:{i:0;b:1;i:1;i:5;i:2;b:1;i:3;b:0;i:4;a:0:{}}s:6:"_mtime";i:1386468888;s:15:"_include_mtimes";a:0:{}}
</div>
";}s:15:"_compile_params";a:5:{i:0;b:1;i:1;i:5;i:2;b:1;i:3;b:0;i:4;a:0:{}}s:6:"_mtime";i:1397264463;s:15:"_include_mtimes";a:0:{}}
30 changes: 16 additions & 14 deletions www/templates/kts/categories.tmpl
@@ -1,14 +1,16 @@
<div id="container">
<div id="content">
<h1>Výpis článků z kategorie: <TMPL_VAR title></h1>
<ul>
<TMPL_LOOP Topics>
<li>
<a href="p-show?tid=<TMPL_VAR topicId>">
<TMPL_VAR topicTitle>
</a>
</li>
</TMPL_LOOP>
</ul>
</div>
</div>
<div id="titleBlock">
<h1>Všechny články z kategorie <TMPL_VAR title></h1>
</div>

<div id="contentBlock">
<ul>
<TMPL_LOOP topics>
<li>
<a href="p-show?id=<TMPL_VAR topicId>">
<TMPL_VAR topicTitle>
</a>
</li>
</TMPL_LOOP>
</ul>
</div>

25 changes: 14 additions & 11 deletions www/templates/kts/categories.tmplc
@@ -1,11 +1,14 @@
O:8:"Template":6:{s:8:"_version";d:1.2199999999999999733546474089962430298328399658203125;s:5:"_file";s:30:"templates/zpnj/categories.tmpl";s:7:"_tokens";a:26:{i:0;s:88:" <div id="container">
<div id="content">
<h1>Výpis článků z kategorie: ";i:1;s:2:"";i:2;s:5:"title";i:3;N;i:4;N;i:5;s:21:"</h1>
<ul>
";i:6;s:2:"";i:7;s:6:"Topics";i:8;N;i:9;N;i:10;s:48:" <li>
<a href="p-show?tid=";i:11;s:2:"";i:12;s:7:"topicId";i:13;N;i:14;N;i:15;s:4:"">
";i:16;s:2:"";i:17;s:10:"topicTitle";i:18;N;i:19;N;i:20;s:35:" </a>
</li>
";i:21;s:2:"";i:22;N;i:23;N;i:24;N;i:25;s:35:" </ul>
</div>
</div>";}s:15:"_compile_params";a:5:{i:0;b:1;i:1;i:5;i:2;b:1;i:3;b:0;i:4;a:0:{}}s:6:"_mtime";i:1390373771;s:15:"_include_mtimes";a:0:{}}
O:8:"Template":6:{s:8:"_version";d:1.2199999999999999733546474089962430298328399658203125;s:5:"_file";s:29:"templates/kts/categories.tmpl";s:7:"_tokens";a:26:{i:0;s:63:" <div id="titleBlock">
<h1>Všechny články z kategorie ";i:1;s:2:"";i:2;s:5:"title";i:3;N;i:4;N;i:5;s:56:"</h1>
</div>

<div id="contentBlock">
<ul>
";i:6;s:2:"";i:7;s:6:"topics";i:8;N;i:9;N;i:10;s:39:" <li>
<a href="p-show?id=";i:11;s:2:"";i:12;s:7:"topicId";i:13;N;i:14;N;i:15;s:4:"">
";i:16;s:2:"";i:17;s:10:"topicTitle";i:18;N;i:19;N;i:20;s:27:" </a>
</li>
";i:21;s:2:"";i:22;N;i:23;N;i:24;N;i:25;s:23:" </ul>
</div>

";}s:15:"_compile_params";a:5:{i:0;b:1;i:1;i:5;i:2;b:1;i:3;b:0;i:4;a:0:{}}s:6:"_mtime";i:1397263235;s:15:"_include_mtimes";a:0:{}}
8 changes: 4 additions & 4 deletions www/templates/kts/footer.tmpl
@@ -1,8 +1,8 @@
<div id="footer">
<!--Poslední aktualizace: <TMPL_VAR update> (před <TMPL_VAR count> dny)<br />
<br />-->
Webdesign & script: <a href="http://krtkovo.eu/" rel="external">Ondřej Kotas (KRtkovo.eu)</a>, powered by <a href="http://kts.krtkovo.eu/" rel="external">KTS</a> |
Dílo je publikováno pod licencí <a href="http://creativecommons.org/licenses/by-sa/4.0/" rel="external">Creative Commons-BY-SA 4.0</a> a <a href="http://www.gnu.org/licenses/gpl-3.0-standalone.html" rel="external">GNU GPL v.3</a> - 2014
Poslední aktualizace: <TMPL_VAR update> (před <TMPL_VAR count> dny)<br />
<br />
Webdesign & script: <a href="http://krtkovo.eu/" rel="external">Ondřej Kotas (KRtkovo.eu)</a>, powered by <a href="https://github.com/KRtkovo-eu/KTS" rel="external">KTS <TMPL_VAR ktsVersion></a><br />
Dílo je publikováno pod licencí <a href="http://creativecommons.org/licenses/by-sa/4.0/" rel="external">Creative Commons-BY-SA 4.0</a> a <a href="http://www.gnu.org/licenses/gpl-3.0-standalone.html" rel="external">GNU GPL v.3</a> - 2014
</div>
</body>
</html>
12 changes: 6 additions & 6 deletions www/templates/kts/footer.tmplc
@@ -1,9 +1,9 @@
O:8:"Template":6:{s:8:"_version";d:1.2199999999999999733546474089962430298328399658203125;s:5:"_file";s:26:"templates/zpnj/footer.tmpl";s:7:"_tokens";a:11:{i:0;s:54:" <div id="footer">
<!--Poslední aktualizace: ";i:1;s:2:"";i:2;s:6:"update";i:3;N;i:4;N;i:5;s:11:" (před ";i:6;s:2:"";i:7;s:5:"count";i:8;N;i:9;N;i:10;s:481:" dny)<br />
<br />-->
Webdesign & script: <a href="http://krtkovo.eu/" rel="external">Ondřej Kotas (KRtkovo.eu)</a>, powered by <a href="http://kts.krtkovo.eu/" rel="external">KTS</a> |
Dílo je publikováno pod licencí <a href="http://creativecommons.org/licenses/by-sa/4.0/" rel="external">Creative Commons-BY-SA 4.0</a> a <a href="http://www.gnu.org/licenses/gpl-3.0-standalone.html" rel="external">GNU GPL v.3</a> - 2014
O:8:"Template":6:{s:8:"_version";d:1.2199999999999999733546474089962430298328399658203125;s:5:"_file";s:25:"templates/kts/footer.tmpl";s:7:"_tokens";a:16:{i:0;s:48:" <div id="footer">
Poslední aktualizace: ";i:1;s:2:"";i:2;s:6:"update";i:3;N;i:4;N;i:5;s:8:" (před ";i:6;s:2:"";i:7;s:5:"count";i:8;N;i:9;N;i:10;s:199:" dny)<br />
<br />
Webdesign & script: <a href="http://krtkovo.eu/" rel="external">Ondřej Kotas (KRtkovo.eu)</a>, powered by <a href="https://github.com/KRtkovo-eu/KTS" rel="external">KTS ";i:11;s:2:"";i:12;s:10:"ktsVersion";i:13;N;i:14;N;i:15;s:285:"</a><br />
Dílo je publikováno pod licencí <a href="http://creativecommons.org/licenses/by-sa/4.0/" rel="external">Creative Commons-BY-SA 4.0</a> a <a href="http://www.gnu.org/licenses/gpl-3.0-standalone.html" rel="external">GNU GPL v.3</a> - 2014
</div>
</body>
</html>
";}s:15:"_compile_params";a:5:{i:0;b:1;i:1;i:5;i:2;b:1;i:3;b:0;i:4;a:0:{}}s:6:"_mtime";i:1392526387;s:15:"_include_mtimes";a:0:{}}
";}s:15:"_compile_params";a:5:{i:0;b:1;i:1;i:5;i:2;b:1;i:3;b:0;i:4;a:0:{}}s:6:"_mtime";i:1397265113;s:15:"_include_mtimes";a:0:{}}
4 changes: 2 additions & 2 deletions www/templates/kts/gallery.tmplc
@@ -1,4 +1,4 @@
O:8:"Template":6:{s:8:"_version";d:1.2199999999999999733546474089962430298328399658203125;s:5:"_file";s:27:"templates/zpnj/gallery.tmpl";s:7:"_tokens";a:36:{i:0;s:111:" <div id="container">
O:8:"Template":6:{s:8:"_version";d:1.2199999999999999733546474089962430298328399658203125;s:5:"_file";s:26:"templates/kts/gallery.tmpl";s:7:"_tokens";a:36:{i:0;s:111:" <div id="container">
<div id="content">
<h1>Alba fotogalerie</h1>
<div id="gallery">
Expand All @@ -11,4 +11,4 @@ O:8:"Template":6:{s:8:"_version";d:1.2199999999999999733546474089962430298328399
";i:31;s:2:"";i:32;N;i:33;N;i:34;N;i:35;s:73:" <div class="clear"></div>
</div>
</div>
</div>";}s:15:"_compile_params";a:5:{i:0;b:1;i:1;i:5;i:2;b:1;i:3;b:0;i:4;a:0:{}}s:6:"_mtime";i:1390366124;s:15:"_include_mtimes";a:0:{}}
</div>";}s:15:"_compile_params";a:5:{i:0;b:1;i:1;i:5;i:2;b:1;i:3;b:0;i:4;a:0:{}}s:6:"_mtime";i:1392526387;s:15:"_include_mtimes";a:0:{}}
5 changes: 2 additions & 3 deletions www/templates/kts/head.tmpl
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta name="author" content="Ondřej Kotas, KRtkovo.eu - design studio" />
<meta name="author" content="Ondřej Kotas, KRtkovo.eu - design studio" />
<meta name="description" content="<TMPL_VAR headDescription>" />
<meta name="keywords" content="<TMPL_VAR headKeywords>" />
<meta name="robots" content="index, follow" />
Expand All @@ -21,5 +21,4 @@
<script type="text/javascript" src="functions/js/lightbox-2.6.min.js"></script>

<script type="text/javascript" src="functions/js/external.js"></script>
<script type="text/javascript" src="functions/js/donnations.js"></script>
</head>
</head>
10 changes: 5 additions & 5 deletions www/templates/kts/head.tmplc
@@ -1,15 +1,15 @@
O:8:"Template":6:{s:8:"_version";d:1.2199999999999999733546474089962430298328399658203125;s:5:"_file";s:24:"templates/zpnj/head.tmpl";s:7:"_tokens";a:21:{i:0;s:213:"<!DOCTYPE HTML>
O:8:"Template":6:{s:8:"_version";d:1.2199999999999999733546474089962430298328399658203125;s:5:"_file";s:23:"templates/kts/head.tmpl";s:7:"_tokens";a:21:{i:0;s:210:"<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta name="author" content="Ondřej Kotas, KRtkovo.eu - design studio" />
<meta name="author" content="Ondřej Kotas, KRtkovo.eu - design studio" />
<meta name="description" content="";i:1;s:2:"";i:2;s:15:"headDescription";i:3;N;i:4;N;i:5;s:39:"" />
<meta name="keywords" content="";i:6;s:2:"";i:7;s:12:"headKeywords";i:8;N;i:9;N;i:10;s:67:"" />
<meta name="robots" content="index, follow" />

<title>";i:11;s:2:"";i:12;s:9:"headTitle";i:13;N;i:14;N;i:15;s:36:"</title>

<link href="templates/";i:16;s:2:"";i:17;s:12:"headTemplate";i:18;N;i:19;N;i:20;s:871:"/style.css" rel="stylesheet" type="text/css" media="screen,projection" />
<link href="templates/";i:16;s:2:"";i:17;s:12:"headTemplate";i:18;N;i:19;N;i:20;s:796:"/style.css" rel="stylesheet" type="text/css" media="screen,projection" />
<link href="lightbox.css" rel="stylesheet" type="text/css" media="screen,projection" />
<link href="favicon.ico" rel="icon" />

Expand All @@ -21,5 +21,5 @@ O:8:"Template":6:{s:8:"_version";d:1.2199999999999999733546474089962430298328399
<script type="text/javascript" src="functions/js/lightbox-2.6.min.js"></script>

<script type="text/javascript" src="functions/js/external.js"></script>
<script type="text/javascript" src="functions/js/donnations.js"></script>
</head>";}s:15:"_compile_params";a:5:{i:0;b:1;i:1;i:5;i:2;b:1;i:3;b:0;i:4;a:0:{}}s:6:"_mtime";i:1392526387;s:15:"_include_mtimes";a:0:{}}
</head>
";}s:15:"_compile_params";a:5:{i:0;b:1;i:1;i:5;i:2;b:1;i:3;b:0;i:4;a:0:{}}s:6:"_mtime";i:1397252926;s:15:"_include_mtimes";a:0:{}}

0 comments on commit dc9c35f

Please sign in to comment.