} elseif ($_GET['type'] == 'edit' && $_GET['id'] > 0) { $result = $db->query("SELECT id, board, name, topic_id FROM {$db->pre}replies WHERE id = '{$_GET['id']}' LIMIT 1", __LINE__, __FILE__); if ($db->num_rows($result) != 1) { $error = TRUE; } $upinfo = $db->fetch_assoc($result); $upinfo['name'] = $gpc->prepare($upinfo['name']); } else { $error = TRUE; } if ($error) { echo $tpl->parse("popup/header"); error($lang->phrase('query_string_error'), 'javascript: self.close();'); } $my->p = $slog->Permissions($upinfo['board']); $my->mp = $slog->ModPermissions($upinfo['board']); if ($my->p['attachments'] != 1) { echo $tpl->parse("popup/header"); errorLogin($lang->phrase('not_allowed'), 'javascript: self.close();'); } if ($_GET['action'] == "save") { if (is_array($_POST['delete']) && count($_POST['delete']) > 0) { if ($my->mp[0] == 1 || $upinfo['name'] == $my->id) { $ids = array(); foreach ($_POST['delete'] as $key => $value) { if (is_int($key) && $key > 0) { $ids[] = $key; } } $result = $db->query('SELECT file FROM ' . $db->pre . 'uploads WHERE mid = "' . $upinfo['name'] . '" AND id IN (' . implode(',', $ids) . ')', __LINE__, __FILE__); while ($row = $db->fetch_array($result)) {
include "classes/function.viscacha_frontend.php"; $slog = new slog(); $my = $slog->logged(); $lang->init($my->language); $tpl = new tpl(); $my->p = $slog->Permissions(); $action = $gpc->get('action', str); viscacha_header("Content-type: text/plain"); send_nocache_header(); ($code = $plugins->load('ajax_start')) ? eval($code) : null; // Schliesst oder oeffnet einen Beitrag mittels AJAX if ($action == 'openclosethread') { $result = $db->query("SELECT status, board FROM {$db->pre}topics WHERE id = '{$_GET['id']}'", __LINE__, __FILE__); $row = $db->fetch_assoc($result); $my->p = $slog->Permissions($row['board']); $my->mp = $slog->ModPermissions($row['board']); $request = 1; if ($my->p['admin'] == 1 || $my->p['gmod'] == 1 || $my->mp[0] == 1) { if ($row['status'] == 0) { $db->query("UPDATE {$db->pre}topics SET status = '1' WHERE id = '{$_GET['id']}'", __LINE__, __FILE__); if ($db->affected_rows() == 1) { $request = 3; } } else { $db->query("UPDATE {$db->pre}topics SET status = '0' WHERE id = '{$_GET['id']}'", __LINE__, __FILE__); if ($db->affected_rows() == 1) { $request = 4; } } } else { $request = 2;
along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ error_reporting(E_ALL); DEFINE('SCRIPTNAME', 'showforum'); include "data/config.inc.php"; include "classes/function.viscacha_frontend.php"; $zeitmessung1 = t1(); $board = $gpc->get('id', int); $slog = new slog(); $my = $slog->logged(); $lang->init($my->language); $tpl = new tpl(); $my->p = $slog->Permissions($board); $my->pb = $slog->GlobalPermissions(); $my->mp = $slog->ModPermissions($board); $catbid = $scache->load('cat_bid'); $fc = $catbid->get(); if (empty($board) || !isset($fc[$board])) { error($lang->phrase('query_string_error')); } $info = $fc[$board]; if ($my->p['admin'] == 1 || $my->p['gmod'] == 1 || $my->mp[0] == 1) { $modcp = true; } else { $modcp = false; } $topforums = get_headboards($fc, $info); $breadcrumb->Add($info['name']); forum_opt($info); echo $tpl->parse("header");
} $last = $fc[$board]; forum_opt($last, 'posttopics'); if ($config['tpcallow'] == 1 && $my->p['attachments'] == 1) { $p_upload = 1; } else { $p_upload = 0; } get_headboards($fc, $last); $breadcrumb->Add($last['name'], "showforum.php?id=" . $last['id'] . SID2URL_x); $breadcrumb->Add($lang->phrase('newtopic_title')); ($code = $plugins->load('newtopic_start')) ? eval($code) : null; if ($_GET['action'] == "startvote") { $result = $db->query("SELECT id, vquestion, name, board FROM {$db->pre}topics WHERE id = '{$_GET['topic_id']}' LIMIT 1", __LINE__, __FILE__); $info = $db->fetch_assoc($result); $my->mp = $slog->ModPermissions($info['board']); $temp = $gpc->get('temp', int, 2); if ($temp < 2) { $temp = 2; } if ($temp > 50) { $temp = 50; } ($code = $plugins->load('newtopic_startvote_start')) ? eval($code) : null; $error = array(); if ($my->p['addvotes'] == 0 || !empty($info['vquestion']) || $info['name'] != $my->id && $my->mp[0] == 0) { $error[] = $lang->phrase('not_allowed'); } if ($db->num_rows() != 1) { $error[] = $lang->phrase('query_string_error'); }
$board = $gpc->get('id', int); $slog = new slog(); $my = $slog->logged(); $lang->init($my->language); $tpl = new tpl(); $catbid = $scache->load('cat_bid'); $fc = $catbid->get(); if (empty($board) || !isset($fc[$board])) { error($lang->phrase('query_string_error')); } $info = $fc[$board]; if ($info['forumzahl'] < 1) { $info['forumzahl'] = $config['forumzahl']; } $my->p = $slog->Permissions($info['id']); $my->mp = $slog->ModPermissions($info['id']); forum_opt($info); $breadcrumb->Add($lang->phrase('teamcp')); echo $tpl->parse("header"); if ($my->vlogin && $my->mp[0] == 1) { ($code = $plugins->load('manageforum_start')) ? eval($code) : null; if ($_GET['action'] == "index") { if ($_GET['type'] == 'open') { $marksql = ' AND status = "1" '; } elseif ($_GET['type'] == 'close') { $marksql = ' AND status = "0" '; } else { // 'close' or 'move' $marksql = ''; } ($code = $plugins->load('manageforum_filter_query')) ? eval($code) : null;