Ejemplo n.º 1
0
 $result = $db->query("SELECT board, id, topic_id, topic, comment, date, name, email, dosmileys FROM {$db->pre}replies WHERE id = '{$_GET['id']}'", __LINE__, __FILE__);
 $row = $gpc->prepare($db->fetch_assoc($result));
 $error = array();
 if ($db->num_rows($result) < 1) {
     $error[] = $lang->phrase('query_string_error');
 }
 $my->p = $slog->Permissions($row['board']);
 if ($my->p['forum'] == 0) {
     $error[] = $lang->phrase('not_allowed');
 }
 if (count($error) > 0) {
     errorLogin($error, 'forum.php' . SID2URL_1);
 }
 $result = $db->query("SELECT status, prefix FROM {$db->pre}topics WHERE id = {$row['topic_id']} LIMIT 1");
 $topic = $db->fetch_assoc($result);
 $fc = cache_cat_bid();
 $last = $fc[$row['board']];
 forum_opt($last['opt'], $last['optvalue'], $last['id']);
 $memberdata = cache_memberdata();
 if (empty($row['email']) && isset($memberdata[$row['name']])) {
     $row['name'] = $memberdata[$row['name']];
 }
 $row['date'] = gmdate($lang->phrase('dformat1'), times($row['date']));
 $bbcode = initBBCodes();
 $bbcode->setSmileys($row['dosmileys']);
 $bbcode->setReplace($config['wordstatus']);
 if ($topic['status'] == 2) {
     $row['comment'] = $bbcode->ReplaceTextOnce($row['comment'], 'moved');
 }
 $text = $bbcode->parse($row['comment'], 'plain');
 if (!empty($my->notice)) {
 function getBoards()
 {
     if (count($this->boards) == 0) {
         $this->boards = array_keys(cache_cat_bid());
     }
     return $this->boards;
 }
Ejemplo n.º 3
0
 if ($my->p['wwo'] == 0) {
     errorLogin();
 }
 $breadcrumb->Add($lang->phrase('wwo_detail_title'));
 echo $tpl->parse("header");
 echo $tpl->parse("menu");
 $wwo = array();
 $wwo['i'] = 0;
 $wwo['r'] = 0;
 $wwo['g'] = 0;
 $wwo['b'] = 0;
 $inner['wwo_bit_bot'] = '';
 $inner['wwo_bit_member'] = '';
 $inner['wwo_bit_guest'] = '';
 // Foren cachen
 $cat_cache = cache_cat_bid();
 // Wraps cachen
 $wrap_cache = cache_wraps();
 // Mitglieder
 $memberdata = cache_memberdata();
 // Cache
 $cache = array();
 $lang->group('wwo');
 $mymodules->load('misc_wwo_top');
 $result = $db->query("SELECT ip, mid, active, wiw_script, wiw_action, wiw_id, remoteaddr FROM {$db->pre}session ORDER BY active DESC", __LINE__, __FILE__);
 while ($row = $gpc->prepare($db->fetch_object($result))) {
     $wwo['i']++;
     $bot = 0;
     $time = gmdate($lang->phrase('dformat3'), times($row->active));
     if (isset($memberdata[$row->mid])) {
         $row->name = $memberdata[$row->mid];
Ejemplo n.º 4
0
 } else {
     // $_GET['type'] == 'lastvisit'
     if ($my->clv < 1) {
         $count = 0;
         echo $tpl->parse("search/active");
     }
     $timestamp = $my->clv;
 }
 $mymodules->load('search_active_top');
 if (!isset($count)) {
     $sqlwhere = " last > '{$timestamp}' ";
     $result = $db->query("\n    \tSELECT prefix, vquestion, posts, mark, id, board, topic, date, status, last, last_name, sticky, name \n    \tFROM {$db->pre}topics WHERE" . $sqlwhere . $slog->sqlinboards('board') . " \n    \tORDER BY last DESC", __LINE__, __FILE__);
     $count = $db->num_rows($result);
     if ($count > 0) {
         $temp = pages($count, 'forumzahl', "search.php?action=result&amp;fid=" . $_GET['fid'] . SID2URL_x . "&amp;");
         $forums = cache_cat_bid();
         $prefix = cache_prefix();
         $memberdata = cache_memberdata();
         $inner['index_bit'] = '';
         while ($row = $gpc->prepare($db->fetch_object($result))) {
             $pref = '';
             $showprefix = '';
             if ($row->prefix > 0 && isset($prefix[$row->board][$row->prefix])) {
                 $showprefix = $prefix[$row->board][$row->prefix];
             }
             if (is_id($row->name) && isset($memberdata[$row->name])) {
                 $row->mid = $row->name;
                 $row->name = $memberdata[$row->name];
             } else {
                 $row->mid = FALSE;
             }
Ejemplo n.º 5
0
} elseif ($job == 'manage') {
    viscacha_header('Pragma: no-cache');
    echo head();
    ?>
	<form name="form" method="post" action="admin.php?action=forums&job=manage2">
	<table class="border">
	<tr><td class="obox" colspan="3">Manage Forums & Categories</td></tr>
	<tr> 
	<td class="ubox" width="50%"><b>Title</b></td>
	<td class="ubox" width="20%"><b>Ordering</b></td> 
	<td class="ubox" width="30%"><b>Action</b></td> 
	</tr>
	<?php 
    $tree = cache_forumtree();
    $categories = cache_categories();
    $boards = cache_cat_bid();
    ForumSubs($tree, $categories, $boards);
    ?>
	</table>
	</form>
	<?php 
    echo foot();
} elseif ($job == 'updatestats') {
    echo head();
    UpdateBoardStats($gpc->get('id', int));
    ok('admin.php?action=forums&job=manage', 'Statistics were refreshed successfully!');
} elseif ($job == 'move') {
    $id = $gpc->get('temp1', str);
    if (empty($id)) {
        error('admin.php?action=forums&job=manage', 'Forum or Category was not found');
    }