exit; } /* --- hodnoceni --- */ // nacteni promennych _checkKeys('_POST', array('id')); $id = intval($_POST['id']); $article_exists = false; // kontrola promennych a pristupu $continue = false; $query = DB::query("SELECT art.id,art.title_seo,art.time,art.confirmed,art.public,art.home1,art.home2,art.home3,art.rateon,cat.title_seo AS cat_title_seo FROM `" . _mysql_prefix . "-articles` AS art JOIN `" . _mysql_prefix . "-root` AS cat ON(cat.id=art.home1) WHERE art.id=" . $id); if (DB::size($query) != 0) { $article_exists = true; $query = DB::row($query); if (isset($_POST['r'])) { $r = round($_POST['r'] / 10) * 10; if (_iplogCheck(3, $id) and _xsrfCheck() and $query['rateon'] == 1 and _articleAccess($query) == 1 and $r <= 100 and $r >= 0) { $continue = true; } } } // zapocteni hodnoceni if ($continue) { DB::query("UPDATE `" . _mysql_prefix . "-articles` SET ratenum=ratenum+1,ratesum=ratesum+" . $r . " WHERE id=" . $id); _iplogUpdate(3, $id); } // presmerovani if ($article_exists) { $aurl = _linkArticle($id, $query['title_seo']) . "#ainfo"; } else { $aurl = ""; }
case 1: $tdata = DB::query("SELECT public,var1,var3,level FROM `" . _mysql_prefix . "-root` WHERE id=" . $posttarget . " AND type=1"); if (DB::size($tdata) != 0) { $tdata = DB::row($tdata); if (_publicAccess($tdata['public'], $tdata['level']) and $tdata['var1'] == 1 and $tdata['var3'] != 1) { $continue = true; } } break; // clanek // clanek case 2: $tdata = DB::query("SELECT id,time,confirmed,public,home1,home2,home3,comments,commentslocked FROM `" . _mysql_prefix . "-articles` WHERE id=" . $posttarget); if (DB::size($tdata) != 0) { $tdata = DB::row($tdata); if (_articleAccess($tdata) == 1 and $tdata['comments'] == 1 and $tdata['commentslocked'] == 0) { $continue = true; } } break; // kniha // kniha case 3: $tdata = DB::query("SELECT public,var1,var3,level FROM `" . _mysql_prefix . "-root` WHERE id=" . $posttarget . " AND type=3"); if (DB::size($tdata) != 0) { $tdata = DB::row($tdata); if (_publicAccess($tdata['public'], $tdata['level']) and _publicAccess($tdata['var1']) and $tdata['var3'] != 1) { $continue = true; } } break;
// komentare v sekci a prispevky v knize case 1: case 3: $query = DB::query("SELECT title FROM `" . _mysql_prefix . "-root` WHERE type=" . $type . ($type == 1 ? " AND var1=1" : '') . $public . " AND id=" . $id); $feedtitle = $_lang[$type == 1 ? 'rss.recentcomments' : 'rss.recentposts']; $typelimit = " AND type=" . $type; break; // komentare u clanku // komentare u clanku case 2: $query = DB::query("SELECT id,time,confirmed,public,home1,home2,home3,title FROM `" . _mysql_prefix . "-articles` WHERE id=" . $id . " AND comments=1"); $donottestsource = true; // test pristupu k clanku $custom_cond = false; if (DB::size($query) != 0) { $custom_cond = _articleAccess(DB::row($query)); if ($custom_cond == 1) { $custom_cond = true; } } $feedtitle = $_lang['rss.recentcomments']; $typelimit = " AND type=2"; break; // nejnovejsi clanky // nejnovejsi clanky case 4: if ($id != -1) { $query = DB::query("SELECT title FROM `" . _mysql_prefix . "-root` WHERE type=2" . $public . " AND id=" . $id); $catlimit = " AND (home1=" . $id . " OR home2=" . $id . " OR home3=" . $id . ")"; } else { $donottestsource = true;
/* ---- inicializace jadra ---- */ require './require/load.php'; SL::init('./'); if (!_printart) { exit; } /* ---- vystup ---- */ if (_publicAccess(!_notpublicsite) and isset($_GET['id'])) { $id = intval($_GET['id']); // nacteni dat clanku $query = DB::query("SELECT art.*,cat.title_seo AS cat_title_seo FROM `" . _mysql_prefix . "-articles` AS art JOIN `" . _mysql_prefix . "-root` AS cat ON(cat.id=art.home1) WHERE art.id=" . $id); if (DB::size($query) != 0) { // rozebrani dat, test pristupu $query = DB::row($query); $access = _articleAccess($query); $artlink = _linkArticle($id, $query['title_seo'], $query['cat_title_seo']); $url = _url . "/" . $artlink; define('_indexOutput_url', $artlink); // vypsani obsahu if ($access == 1) { // vlozeni zacatku hlavicky require _indexroot . "require/headstart.php"; ?> <link href="<?php echo _indexroot; ?> plugins/templates/<?php echo _template; ?> /style/print.css" type="text/css" rel="stylesheet" />