Пример #1
0
             case 4:
                 $nobbcode = true;
                 break;
             case 5:
                 if ($query['xhome'] == -1) {
                     if (!_checkboxLoad("delete")) {
                         $backlink = "index.php?m=topic&id=" . $query['id'];
                     } else {
                         $backlink = _linkRoot($query['home']);
                     }
                 } else {
                     $backlink = _addGetToLink("index.php?m=topic&amp;id=" . $query['xhome'], "page=" . _resultPagingGetItemPage(_commentsperpage, "posts", "id<" . $query['id'] . " AND type=5 AND xhome=" . $query['xhome'] . " AND home=" . $query['home'])) . "#post-" . $query['id'];
                 }
                 break;
             case 6:
                 $backlink = "index.php?m=messages&amp;a=list&amp;read=" . $query['home'] . '&amp;page=' . _resultPagingGetItemPage(_messagesperpage, 'posts', 'id<' . $query['id'] . ' AND type=6 AND home=' . $query['home']) . '#post-' . $query['id'];
                 break;
             case 7:
                 $backlink = null;
                 _extend('call', 'posts.' . $query['flag'] . '.edit', array('query' => $query, 'backlink' => &$backlink));
                 if (null === $backlink) {
                     $module .= _formMessage(3, sprintf($_lang['plugin.error'], $query['flag']));
                     return;
                 }
                 break;
             default:
                 $backlink = _indexroot;
                 break;
         }
     }
 }
Пример #2
0
 // vyhledani obrazku
 if ($image) {
     // zaklad dotazu
     $sql = 'SELECT img.id,img.prev,img.full,img.ord,img.home,img.title,gal.title AS gal_title,gal.title_seo,gal.var2 FROM `' . _mysql_prefix . '-images` AS img';
     // join na galerii
     $sql .= ' JOIN `' . _mysql_prefix . '-root` AS gal ON(gal.id=img.home)';
     // podminky
     $sql .= ' WHERE gal.visible=1';
     if ($public) {
         $sql .= ' AND gal.public=1';
     }
     $sql .= ' AND ' . _tmpSearchQuery('img', array('title'));
     // vykonani a nacteni vysledku
     $q = DB::query($sql . ' LIMIT 20');
     while ($r = DB::row($q)) {
         $link = _addGetToLink(_linkRoot($r['home'], $r['title_seo']), 'page=' . _resultPagingGetItemPage($r['var2'], "images", "ord<" . $r['ord'] . " AND home=" . $r['home']));
         $results[] = array($link, $r['gal_title'], ($r['title'] !== '' ? $r['title'] . '<br />' : '') . _galleryImage($r, 'search', 128, 128));
     }
     DB::free($q);
 }
 // extend
 _extend('call', 'mod.search.results', array('results' => &$results, 'query' => $search_query, 'query_sql' => $search_query_sql));
 // vypis vysledku
 if (count($results) != 0) {
     foreach ($results as $item) {
         $module .= "\n<h2 class='list-title'><a href='" . $item[0] . "'>" . $item[1] . "</a></h2>\n<p class='list-perex'>" . $item[2] . "</p>\n";
         if (isset($item[3])) {
             $module .= "<div class='list-info'>" . $item[3] . "</div>\n";
         }
     }
 } else {
Пример #3
0
        $continue = true;
        if (_publicAccess($homedata['public'], $homedata['level'])) {
            $need2login = false;
        } else {
            $need2login = true;
        }
    }
}
/* ---  vystup  --- */
if ($continue) {
    define('_indexOutput_url', "index.php?m=topic&id=" . $id);
    if (!$need2login) {
        // priprava zpetneho odkazu
        $backlink = _linkRoot($homedata['id'], $homedata['title_seo']);
        if (!$query['sticky']) {
            $backlink = _addGetToLink($backlink, "page=" . _resultPagingGetItemPage($homedata['var1'], "posts", "bumptime>" . $query['bumptime'] . " AND xhome=-1 AND type=5 AND home=" . $homedata['id']));
        }
        // zpetny odkaz, titulek
        $module .= "<a href='" . $backlink . "' class='backlink'>&lt; " . $_lang['global.return'] . "</a>\n";
        if (_template_autoheadings) {
            $module .= "<h1>" . $homedata['title'] . "</h1>\n<div class='hr'><hr /></div>\n";
        }
        // ikonky pro spravu
        if (_postAccess($query)) {
            $editlink = " &nbsp;\n<a href='index.php?m=editpost&amp;id=" . $id . "'><img src='" . _templateImage("icons/edit.png") . "' alt='edit' class='icon' title='" . $_lang['mod.editpost'] . "' /></a>\n" . (_loginright_locktopics ? "<a href='index.php?m=locktopic&amp;id=" . $id . "'><img src='" . _templateImage("icons/" . ($query['locked'] == 1 ? 'un' : '') . "lock.png") . "' alt='lock' class='icon' title='" . $_lang['mod.locktopic' . ($query['locked'] == 1 ? '2' : '')] . "' /></a>" : '') . "\n" . (_loginright_stickytopics ? "<a href='index.php?m=stickytopic&amp;id=" . $id . "'><img src='" . _templateImage("icons/" . ($query['sticky'] == 1 ? 'un' : '') . "stick.png") . "' alt='sticky' class='icon' title='" . $_lang['mod.stickytopic' . ($query['sticky'] == 1 ? '2' : '')] . "' /></a>" : '') . "\n" . (_loginright_movetopics ? "<a href='index.php?m=movetopic&amp;id=" . $id . "'><img src='" . _templateImage("icons/move.png") . "' alt='move' class='icon' title='" . $_lang['mod.movetopic'] . "' /></a>" : '');
        } else {
            $editlink = "";
        }
        // nacteni autora a avataru
        $avatar = '';
        if ($query['guest'] == "") {