Exemplo n.º 1
0
<?php

// kontrola jadra
if (!defined('_core')) {
    exit;
}
// titulek, obsah
$title = $query['title'];
if (_template_autoheadings && $query['autotitle'] == 1) {
    $content .= "<h1>" . $title . "</h1>";
}
_extend('call', 'page.section.aftertitle', $extend_args);
_extend('call', 'page.section.content.before', $extend_args);
$content .= _parseHCM($query['content']);
_extend('call', 'page.section.content.after', $extend_args);
// komentare
if ($query['var1'] == 1 and _comments) {
    require_once _indexroot . 'require/functions-posts.php';
    $content .= _postsOutput(1, $id, $query['var3']);
}
Exemplo n.º 2
0
<?php

// kontrola jadra
if (!defined('_core')) {
    exit;
}
// titulek
$title = $query['title'];
if (_template_autoheadings && $query['autotitle']) {
    $content .= "<h1>" . $query['title'] . _linkRSS($id, 3) . "</h1>\n";
}
_extend('call', 'page.book.aftertitle', $extend_args);
// obsah
_extend('call', 'page.book.content.before', $extend_args);
if ($query['content'] != "") {
    $content .= _parseHCM($query['content']);
}
_extend('call', 'page.book.content.after', $extend_args);
// prispevky
require_once _indexroot . 'require/functions-posts.php';
$content .= _postsOutput(3, $id, array($query['var2'], _publicAccess($query['var1']), $query['var3']));
Exemplo n.º 3
0
                    if ('' !== $author_name['publicname']) {
                        $author_name = $author_name['publicname'];
                    } else {
                        $author_name = $author_name['username'];
                    }
                    $avatar = "<img src='" . $avatar . "' alt='" . $author_name . "' class='topic-avatar' />";
                }
            }
        } else {
            $author = "<span class='post-author-guest' title='" . _showIP($query['ip']) . "'>" . $query['guest'] . "</span>";
        }
        // vystup
        $module .= "\n<h2>" . $_lang['posts.topic'] . ": " . $query['subject'] . _linkRSS($id, 6) . "</h2>\n<p><small>" . $_lang['global.postauthor'] . " " . $author . " " . _formatTime($query['time']) . "</small>" . $editlink . "</p>\n<p>" . $avatar . _parsePost($query['text']) . "</p>\n<div class='cleaner'></div>\n";
        // odpovedi
        require_once _indexroot . 'require/functions-posts.php';
        $module .= _postsOutput(6, $homedata['id'], array(_commentsperpage, _publicAccess($homedata['var3']), $homedata['var2'], $id), $query['locked'] == 1);
    } else {
        $form = _uniForm("notpublic");
        $module .= $form[0];
    }
} else {
    define('_indexOutput_url', "index.php?m=topic");
    if (_template_autoheadings) {
        $module .= "<h1>" . $_lang['global.error404.title'] . "</h1>\n";
    }
    $module .= _formMessage(2, $_lang['posts.topic.notfound']);
    $found = false;
}
/* ---  titulek  --- */
if ($forumtitle != "" and $topictitle != "") {
    define('_indexOutput_title', $forumtitle . " " . _titleseparator . " " . $topictitle);
Exemplo n.º 4
0
         $module .= _formMessage(3, $_lang['global.badinput']);
         break;
     }
     // titulek
     $mod_title = 'mod.messages.read';
     // stavy
     $locked = $q['sender_deleted'] || $q['receiver_deleted'];
     list($role, $role_other) = $q['sender'] == _loginid ? array('sender', 'receiver') : array('receiver', 'sender');
     // citace neprectenych zprav
     $counter = DB::result(DB::query('SELECT COUNT(*) FROM `' . _mysql_prefix . '-posts` WHERE home=' . $q['id'] . ' AND type=6 AND time>' . $q[$role_other . '_readtime']), 0);
     $counter_s = array('', '');
     $counter_s[$role === 'sender' ? 1 : 0] = ' (' . $counter . ')';
     // vystup
     require_once _indexroot . 'require/functions-posts.php';
     $module .= "<h2>" . $_lang['mod.messages.message'] . ": " . $q['subject'] . "</h2>\n<p><small>" . $_lang['global.postauthor'] . ' ' . _linkUser($q['sender']) . $counter_s[0] . ' ' . $_lang['mod.messages.receiver.inview'] . ' ' . _linkUser($q['receiver']) . $counter_s[1] . ' ' . _formatTime($q['time']) . "</small></p>\n";
     $module .= _postsOutput(7, $q['id'], array($locked), false, $_SERVER['REQUEST_URI']);
     // aktualizace casu precteni
     DB::query('UPDATE `' . _mysql_prefix . '-pm` SET ' . $role . '_readtime=UNIX_TIMESTAMP() WHERE id=' . $id);
     break;
 }
 // je vypis
 $list = true;
 // smazani vzkazu
 if (isset($_POST['action'])) {
     // promenne
     $valid = false;
     $delcond = null;
     $delcond_sadd = null;
     $delcond_radd = null;
     // akce
     switch ($_POST['action']) {
Exemplo n.º 5
0
    }
    // druha bunka
    if ($info['infobox'] != null or $rateform_used == false and $info['rateform'] != null) {
        $content .= "<td>";
        if ($info['infobox'] != null) {
            $content .= $info['infobox'];
        }
        if ($rateform_used == false) {
            $content .= $info['rateform'];
        }
        $content .= "</td>";
    }
    // konec tabulky
    $content .= "\n</tr>\n</table>\n";
}
// odkaz na tisk
if (_printart) {
    $content .= "\n<p><a href='" . _indexroot . "printart.php?id=" . $id . "' target='_blank'><img src='" . _templateImage("icons/print.png") . "' alt='print' class='icon' /> " . $_lang['article.print'] . "</a></p>\n";
}
// rozsireni pred komentari
_extend('call', 'article.comments', $extend_args);
// komentare
if ($query['comments'] == 1 and _comments) {
    require_once _indexroot . 'require/functions-posts.php';
    $content .= _postsOutput(2, $id, $query['commentslocked']);
}
// zapocteni precteni
if ($query['confirmed'] == 1 and $query['time'] <= time() and _iplogCheck(2, $id)) {
    DB::query("UPDATE `" . _mysql_prefix . "-articles` SET readed=" . ($query['readed'] + 1) . " WHERE id=" . $id);
    _iplogUpdate(2, $id);
}