include 'admin/packages.php'; } elseif ($action == 'admin') { include 'admin/packages_admin.php'; } elseif ($action == 'profilefield') { include 'admin/profilefield.php'; } elseif ($action == 'posts') { include 'admin/posts.php'; } elseif ($action == 'logout') { $slog->sid_logout(); echo head(); ok('admin.php', $lang->phrase('admin_successfully_logged_off')); } elseif ($action == 'locate') { $url = $gpc->get('url', none); if (!empty($url)) { $db->close(); sendStatusCode(307, $url); exit; } else { echo head(); if (!empty($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], 'action=locate') === false) { $url = htmlspecialchars($_SERVER['HTTP_REFERER']); } else { $url = 'javascript:history.back(-1);'; } error($url, $lang->phrase('admin_choose_valid_location_option')); } } else { if (strlen($action) == 0) { include 'admin/frames.php'; } else { $error = true;
$_POST['name'] = $user[0]; } else { $error[] = $lang->phrase('pm_toname_notfound'); } } ($code = $plugins->load('pm_save_errorhandling')) ? eval($code) : null; BBProfile($bbcode); $_POST['topic'] = $bbcode->parseTitle($_POST['topic']); if (count($error) > 0 || !empty($_POST['Preview'])) { $data = array('topic' => $_POST['topic'], 'comment' => $_POST['comment'], 'name' => $_POST['name'], 'outgoing' => $_POST['temp']); ($code = $plugins->load('pm_save_errordata')) ? eval($code) : null; $fid = save_error_data($data); if (!empty($_POST['Preview'])) { $slog->updatelogged(); $db->close(); sendStatusCode(307, $config['furl'] . '/pm.php?action=preview&fid=' . $fid . SID2URL_JS_x); exit; } else { error($error, "pm.php?action=new&fid=" . $fid . SID2URL_x); } } else { set_flood(); $date = time(); ($code = $plugins->load('pm_save_queries')) ? eval($code) : null; $db->query("\n\t\tINSERT INTO {$db->pre}pm (topic,pm_from,pm_to,comment,date,dir)\n\t\tVALUES ('{$_POST['topic']}','{$my->id}','{$_POST['name']}','{$_POST['comment']}','{$date}','1')\n\t\t"); if ($_POST['temp'] == 1) { $db->query("\n\t\t\tINSERT INTO {$db->pre}pm (topic,pm_from,pm_to,comment,date,dir,status)\n\t\t\tVALUES ('{$_POST['topic']}','{$_POST['name']}','{$my->id}','{$_POST['comment']}','{$date}','2','1')\n\t\t\t"); } $lang_dir = $lang->getdir(true); $result = $db->query("SELECT name, mail, opt_pmnotify, language FROM {$db->pre}user WHERE id = '{$_POST['name']}'"); $row = $slog->cleanUserData($db->fetch_assoc($result));
} } elseif ($_GET['action'] == "about2") { if ($my->p['useabout'] == 0) { errorLogin($lang->phrase('not_allowed'), "editprofile.php"); } $error = array(); if (strxlen($_POST['about']) > $config['maxaboutlength']) { $error[] = $lang->phrase('about_too_long'); } ($code = $plugins->load('editprofile_about2_start')) ? eval($code) : null; if (count($error) > 0 || !empty($_POST['Preview'])) { $fid = save_error_data($_POST['about']); if (!empty($_POST['Preview'])) { $slog->updatelogged(); $db->close(); sendStatusCode(307, $config['furl'] . '/editprofile.php?action=about&job=preview&fid=' . $fid . SID2URL_JS_x); exit; } else { error($error, "editprofile.php?action=about&fid=" . $fid . SID2URL_x); } } else { ($code = $plugins->load('editprofile_about2_query')) ? eval($code) : null; $db->query("UPDATE {$db->pre}user SET about = '{$_POST['about']}' WHERE id = '{$my->id}'"); ok($lang->phrase('data_success'), "editprofile.php?action=about" . SID2URL_x); } } elseif ($_GET['action'] == "about") { if ($my->p['useabout'] == 0) { errorLogin($lang->phrase('not_allowed'), "editprofile.php"); } $breadcrumb->Add($lang->phrase('editprofile_about')); echo $tpl->parse("header");
$db->close(); sendStatusCode(307, 'showtopic.php?id=' . $info['id'] . '&page=' . $pgs . $qUrl . SID2URL_JS_x . '#p' . $mylast[1]); exit; } elseif ($_GET['action'] == 'jumpto') { $result = $db->query("SELECT date, id FROM {$db->pre}replies WHERE topic_id = '{$info['id']}' AND id = '{$_GET['topic_id']}'"); $mylast = $db->fetch_num($result); $sql_order = iif($last['post_order'] == 1, '<', '>'); $result = $db->query("SELECT COUNT(*) AS count FROM {$db->pre}replies WHERE topic_id = '{$info['id']}' AND date {$sql_order} '{$mylast[0]}'"); $new = $db->fetch_assoc($result); $tp = $info['posts'] + 1 - $new['count']; $pgs = ceil($tp / $last['topiczahl']); if ($pgs < 1) { $pgs = 1; } $db->close(); sendStatusCode(307, 'showtopic.php?id=' . $info['id'] . '&page=' . $pgs . $qUrl . SID2URL_JS_x . '#p' . $mylast[1]); exit; } ($code = $plugins->load('showtopic_redirect')) ? eval($code) : null; $prefix = ''; if ($info['prefix'] > 0) { $prefix_obj = $scache->load('prefix'); $prefix_arr = $prefix_obj->get($info['board']); if (isset($prefix_arr[$info['prefix']])) { $prefix = $prefix_arr[$info['prefix']]['value']; $prefix = $lang->phrase('showtopic_prefix_title'); } } $topforums = get_headboards($fc, $last, TRUE); $breadcrumb->Add($last['name'], "showforum.php?id=" . $last['id'] . SID2URL_x); $breadcrumb->Add($prefix . $info['topic']);
$result = $db->query("SELECT * FROM {$db->pre}filetypes WHERE extension LIKE '%{$_GET['type']}%'"); $nr = $db->num_rows($result); $cache = array(); while ($row = $db->fetch_assoc($result)) { $row['extension'] = str_replace(',', ', ', $row['extension']); $cache[] = $row; } echo $tpl->parse("popup/header"); ($code = $plugins->load('popup_filetypes_prepared')) ? eval($code) : null; echo $tpl->parse("popup/filetypes"); ($code = $plugins->load('popup_filetypes_end')) ? eval($code) : null; } elseif ($_GET['action'] == "showpost") { sendStatusCode(307, 'showtopic.php?action=jumpto&topic_id='.$_GET['id'].SID2URL_JS_x); } elseif ($_GET['action'] == "edithistory") { echo $tpl->parse("popup/header"); ($code = $plugins->load('popup_edithistory_query')) ? eval($code) : null; $result = $db->query(" SELECT r.ip, r.topic_id, r.board, r.edit, r.id, r.topic, r.date, u.name as uname, r.name as gname, u.id as mid, u.groups, r.email as gmail, r.guest FROM {$db->pre}replies AS r LEFT JOIN {$db->pre}user AS u ON r.name = u.id AND r.guest = '0' WHERE r.id = '{$_GET['id']}' LIMIT 1 "); $found = $db->num_rows($result); if ($found == 1) {
$htaccess[] = ""; } $filesystem->file_put_contents('.htaccess', implode("\r\n", $htaccess)); } $breadcrumb = new breadcrumb(); $breadcrumb->Add($config['fname'], 'index.php'); $phpdoc = new OutputDoc($config['gzip']); $phpdoc->Start($config['gzcompression']); define('PAGE_IS_GZIPPED', $config['gzip'] == 1 && $phpdoc->Encoding()); ($code = $plugins->load('frontend_init')) ? eval($code) : null; // Global and important functions (not for cron and external) if (defined('TEMPNOFUNCINIT') == false || $config['foffline'] && defined('TEMPSHOWLOG') == false) { define('SCRIPT_START_TIME', benchmarktime()); $slog = new slog(); $my = $slog->logged(); $lang->init($my->language); $tpl = new tpl(); $slog->checkBan(); } if ($config['foffline'] && defined('TEMPSHOWLOG') == false) { $my->p = $slog->Permissions(); if ($my->p['admin'] != 1) { $offline = file_get_contents('data/offline.php'); sendStatusCode(503, 3600); ($code = $plugins->load('frontend_init_offline')) ? eval($code) : null; echo $tpl->parse("offline"); $phpdoc->Out(); $db->close(); exit; } }
$id = $gpc->get('id', int); $result = $db->query('SELECT id, active, required, position FROM ' . $db->pre . 'plugins WHERE id = "' . $id . '"'); $row = $db->fetch_assoc($result); if ($db->num_rows($result) == 0) { echo head(); error('admin.php?action=packages&job=plugins', $lang->phrase('admin_packages_err_specified_id_is_not_correct')); } elseif ($row['required'] == 1) { echo head(); error('admin.php?action=packages&job=plugins', $lang->phrase('admin_packages_err_this_plugin_is_required_you_cannot_change_the_status')); } else { $active = $row['active'] == 1 ? 0 : 1; $db->query('UPDATE ' . $db->pre . 'plugins SET active = "' . $active . '" WHERE id = "' . $id . '"'); $filesystem->unlink('cache/modules/' . $plugins->_group($row['position']) . '.php'); $delobj = $scache->load('components'); $delobj->delete(); sendStatusCode(307, $config['furl'] . '/admin.php?action=packages&job=plugins'); } } elseif ($job == 'plugins_delete') { echo head(); $id = $gpc->get('id', int); $result = $db->query("SELECT id, required FROM {$db->pre}plugins WHERE id = '{$id}' LIMIT 1"); $row = $db->fetch_assoc($result); if ($db->num_rows($result) == 0) { error('admin.php?action=packages&job=plugins', $lang->phrase('admin_packages_err_specified_plugin_not_found')); } elseif ($row['required'] == 1) { error('admin.php?action=packages&job=plugins', $lang->phrase('admin_packages_err_specified_plugin_is_required_by_a_package_and_cannot_be_deleted')); } else { ?> <table class="border" border="0" cellspacing="0" cellpadding="4" align="center"> <tr><td class="obox"><?php echo $lang->phrase('admin_packages_head_delete_plugin');
if ($attempts > 0) { $can_try = $lang->phrase('log_x_attempts'); } else { $can_try = ''; } error($lang->phrase('log_wrong_data'), "log.php?action=login&redirect=" . rawurlencode($loc) . SID2URL_x); } } else { clear_login_attempts(); ok($lang->phrase('log_msglogin'), $loc); } } elseif ($_GET['action'] == "logout") { if (!$my->vlogin) { $slog->updatelogged(); $db->close(); sendStatusCode(307, $config['furl'] . '/log.php'); exit; } else { $loc = getRedirectURL(); ($code = $plugins->load('log_logout')) ? eval($code) : null; $slog->sid_logout(); ok($lang->phrase('log_msglogout'), $loc); } } elseif ($_GET['action'] == "pwremind") { if ($my->vlogin) { error($lang->phrase('log_already_logged')); } $breadcrumb->Add($lang->phrase('log_pwremind_title')); echo $tpl->parse("header"); echo $tpl->parse("menu"); ($code = $plugins->load('log_pwremind_form_start')) ? eval($code) : null;
$error[] = $lang->phrase('edit_reason_too_short'); } if (!isset($prefix[$_POST['opt_0']]) && $last['prefix'] == 1) { $error[] = $lang->phrase('prefix_not_optional'); } ($code = $plugins->load('edit_save_errorhandling')) ? eval($code) : null; BBProfile($bbcode); $_POST['topic'] = $bbcode->parseTitle($_POST['topic']); if (count($error) > 0 || !empty($_POST['Preview'])) { $data = array('topic' => $_POST['topic'], 'comment' => $_POST['comment'], 'prefix' => $_POST['opt_0'], 'dosmileys' => $_POST['dosmileys'], 'dowords' => $_POST['dowords'], 'about' => $_POST['about']); ($code = $plugins->load('edit_save_errordata')) ? eval($code) : null; $fid = save_error_data($data); if (!empty($_POST['Preview'])) { $slog->updatelogged(); $db->close(); sendStatusCode(307, $config['furl'] . "/edit.php?action=preview&id={$info['id']}&fid=" . $fid . SID2URL_JS_x); exit; } else { error($error, "edit.php?id={$info['id']}&fid=" . $fid . SID2URL_x); } } else { $info['edit'] .= $my->name . "\t" . time() . "\t" . $_POST['about'] . "\t" . $my->ip . "\n"; ($code = $plugins->load('edit_save_queries')) ? eval($code) : null; $db->query("\n\t\t\t\tUPDATE {$db->pre}replies\n\t\t\t\tSET edit = '{$info['edit']}', topic = '{$_POST['topic']}', comment = '{$_POST['comment']}', dosmileys = '{$_POST['dosmileys']}', dowords = '{$_POST['dowords']}'\n\t\t\t\tWHERE id = '{$_GET['id']}'\n\t\t\t\t"); if ($info['tstart'] == '1') { $db->query("\n\t\t\t\t\tUPDATE {$db->pre}topics\n\t\t\t\t\tSET prefix = '{$_POST['opt_0']}', topic = '{$_POST['topic']}'\n\t\t\t\t\tWHERE id = '{$info['topic_id']}'\n\t\t\t\t\t"); } ok($lang->phrase('data_success'), 'showtopic.php?action=jumpto&id=' . $info['topic_id'] . '&topic_id=' . $info['id'] . SID2URL_x); } } } else {
} $having .= " LEFT JOIN {$db->pre}forums AS f ON f.id = r.board "; $sql_where .= " AND f.invisible != '2' "; ($code = $plugins->load('search_search_query')) ? eval($code) : null; $result = $db->query("\n\tSELECT r.topic_id\n\tFROM {$db->pre}replies AS r {$having}\n\tWHERE {$sql_where}\n\tGROUP BY r.topic_id\n\tLIMIT {$config['maxsearchresults']}\n\t"); $searchresult = array(); while ($row = $db->fetch_assoc($result)) { $searchresult[] = $row['topic_id']; } if (count($searchresult) > 0) { $data = array('ids' => $searchresult, 'ignored' => $ignored, 'used' => $used, 'search' => $gpc->get('search', str), 'name' => $gpc->get('name', str), 'boards' => $gpc->get('boards', arr_int), 'opt_0' => $gpc->get('opt_0', int), 'opt_1' => $gpc->get('opt_1', int), 'opt_2' => $gpc->get('opt_2', int), 'temp' => $gpc->get('temp', int), 'temp2' => $gpc->get('temp2', int), 'sort' => $gpc->get('sort', str), 'order' => $gpc->get('order', str)); $fid = md5(microtime()); file_put_contents('cache/search/' . $fid . '.inc.php', serialize($data)); $slog->updatelogged(); $db->close(); sendStatusCode(307, $config['furl'] . '/search.php?action=result&fid=' . $fid . SID2URL_JS_x); exit; } else { error($lang->phrase('search_nothingfound'), 'search.php' . SID2URL_1); } } elseif ($_GET['action'] == "result") { $fid = $gpc->get('fid'); if (!is_hash($fid)) { error($lang->phrase('query_string_error'), 'search.php' . SID2URL_1); } $file = "cache/search/{$fid}.inc.php"; if (!file_exists($file)) { error($lang->phrase('search_doesntexist'), 'search.php' . SID2URL_1); } $data = file_get_contents($file); $data = unserialize($data);
echo $lang->phrase('admin_lang_form_save'); ?> " /></td> </tr> </table> </form> <?php echo foot(); } elseif ($job == 'phrase_add2') { echo head(); $varname = $gpc->get('varname', none); $text = $gpc->get('text', none); $file = base64_decode($gpc->get('file', none)); $language = $gpc->get('langt', none); $c = new manageconfig(); foreach ($language as $id => $t) { if (empty($t)) { $t = $text; } $c->getdata("language/{$id}/{$file}", 'lang'); $c->updateconfig($varname, str, $t); $c->savedata(); } if (strpos($file, 'javascript.lng.php') !== false) { $delobj = $scache->load('loadlanguage'); $delobj->delete(); } ok('admin.php?action=language&job=phrase_file&file=' . urlencode(base64_encode($file))); } else { sendStatusCode(307, $config['furl'] . '/admin.php?action=language&job=manage'); }
$d = $gpc->get('id', str); $key = $gpc->get('key', int); if ($key == 3 || $key == 4) { $data = file('data/feedcreator.inc.php'); $n = array(); foreach ($data as $r) { $row = explode('|', $r); $row = array_map('trim', $row); if (strtoupper($row[0]) == strtoupper($d)) { $row[$key] = invert($row[$key]); } $n[] = implode('|', $row); } $filesystem->file_put_contents('data/feedcreator.inc.php', implode("\n", $n)); } sendStatusCode(307, $config['furl'].'/admin.php?action=misc&job=feedcreator'); } elseif ($job == 'feedcreator_add') { echo head(); $name = $gpc->get('name', str); $class = $gpc->get('class', str); $active = $gpc->get('active', str); $dl = $gpc->get('dl', str); $dir = realpath('./classes/feedcreator/').DIRECTORY_SEPARATOR; $inserterrors = array(); require("classes/class.upload.php"); $my_uploader = new uploader(); $my_uploader->max_filesize(200*1024); $my_uploader->file_types(array('php'));
UpdateBoardLastStats($_POST['opt_0']); } ok($lang->phrase('x_entries_moved'), 'showforum.php?id=' . $board . SID2URL_x); } elseif ($_GET['action'] == "delete") { if ($my->mp[0] == 1 && $my->mp[4] == 0) { errorLogin($lang->phrase('not_allowed'), 'manageforum.php?action=index&id=' . $board . '&type=' . $_GET['action'] . SID2URL_x); } if (count($_POST['delete']) == 0) { $slog->updatelogged(); $db->close(); if (empty($_GET['action'])) { $url = 'showforum.php?id=' . $board . SID2URL_JS_x; } else { $url = 'manageforum.php?action=index&id=' . $board . '&type=' . $_GET['action'] . SID2URL_JS_x; } sendStatusCode(307, $config['furl'] . '/' . $url); exit; } $ids = implode(',', $_POST['delete']); if ($config['updatepostcounter'] == 1 && $info['count_posts'] == 1) { $result = $db->query("SELECT COUNT(*) AS posts, name FROM {$db->pre}replies WHERE guest = '0' AND topic_id IN({$ids}) GROUP BY name"); while ($row = $db->fetch_assoc($result)) { $db->query("UPDATE {$db->pre}user SET posts = posts-{$row['posts']} WHERE id = '{$row['name']}'"); } } $db->query("DELETE FROM {$db->pre}replies WHERE topic_id IN({$ids})"); $anz = $db->affected_rows(); $uresult = $db->query("SELECT id, source FROM {$db->pre}uploads WHERE topic_id IN({$ids})"); while ($urow = $db->fetch_assoc($uresult)) { $filesystem->unlink('uploads/topics/' . $urow['source']); $thumb = 'uploads/topics/thumbnails/' . $urow['id'] . get_extension($urow['source'], true);
$uploaddata['file'] = $db->escape_string($uploaddata['file']); $uploaddata['source'] = $db->escape_string($uploaddata['source']); $db->query("INSERT INTO {$db->pre}uploads (file,source,tid,mid,topic_id) VALUES ('{$uploaddata['file']}','{$uploaddata['source']}','{$tid}','{$upper}','{$upinfo['topic_id']}')"); } } ($code = $plugins->load('attachments_upload_save_add_end')) ? eval($code) : null; if (count($inserterrors) > 0) { echo $tpl->parse('popup/header'); error($inserterrors, 'attachments.php?type='.$_GET['type'].'&id='.$_GET['id'].SID2URL_x); } else { $slog->updatelogged(); $db->close(); sendStatusCode(307, $config['furl'].'/attachments.php?type='.$_GET['type'].'&id='.$_GET['id'].SID2URL_JS_x); exit; } } } else { echo $tpl->parse("popup/header"); $filetypes = implode($lang->phrase('listspacer'), explode(',',$config['tpcfiletypes'])); $filesize = formatFilesize($config['tpcfilesize']); if ($_GET['type'] == 'edit' && ($my->mp[0] == 1 || $upinfo['name'] == $my->id)) { $result = $db->query('SELECT id, file, source FROM '.$db->pre.'uploads WHERE mid = "'.$upinfo['name'].'" AND tid = "'.$upinfo['id'].'"'); } elseif ($_GET['type'] == 'newtopic' || $_GET['type'] == 'addreply') { $result = $db->query('SELECT id, file, source FROM '.$db->pre.'uploads WHERE mid = "'.$my->id.'" AND topic_id = "'.$upinfo['id'].'" AND tid = "0"');
$row->rating = round(array_sum($ratings)/$ratingcounter*50)+50; } else { $row->rating = $lang->phrase('profile_na'); } } ($code = $plugins->load('profile_member_prepared')) ? eval($code) : null; echo $tpl->parse("profile/index"); ($code = $plugins->load('profile_member_end')) ? eval($code) : null; } else { $group = 'fallback_no_username_group'; ($code = $plugins->load('profile_member_fallback')) ? eval($code) : null; echo $tpl->parse("profile/guest"); } } else { $db->close(); sendStatusCode(301, 'members.php'); exit; } ($code = $plugins->load('profile_end')) ? eval($code) : null; $slog->updatelogged(); $zeitmessung = t2(); echo $tpl->parse("footer"); $phpdoc->Out(); $db->close(); ?>
$data = array('topic' => $_POST['topic'], 'comment' => $_POST['comment'], 'prefix' => $_POST['opt_0'], 'dosmileys' => $_POST['dosmileys'], 'dowords' => $_POST['dowords'], 'vote' => $_POST['opt_2'], 'replies' => $_POST['temp'], 'guest' => 1, 'human' => $human, 'digest' => $digest, 'name' => null, 'email' => null, 'guest' => 0); if (!$my->vlogin) { if ($config['guest_email_optional'] == 0 && empty($_POST['email'])) { $data['email'] = ''; } else { $data['email'] = $_POST['email']; } $data['name'] = $_POST['name']; $data['guest'] = 1; } ($code = $plugins->load('newtopic_save_errordata')) ? eval($code) : null; $fid = save_error_data($data, $fid); if (!empty($_POST['Preview'])) { $slog->updatelogged(); $db->close(); sendStatusCode(307, $config['furl'] . "/newtopic.php?action=preview&id={$board}&fid=" . $fid . SID2URL_JS_x); exit; } else { error($error, "newtopic.php?id={$board}&fid=" . $fid . SID2URL_x); } } else { set_flood(FLOOD_TYPE_POSTING); $date = time(); if ($my->vlogin) { $guest = 0; } else { $guest = 1; } ($code = $plugins->load('newtopic_save_savedata')) ? eval($code) : null; $db->query("\n\t\tINSERT INTO {$db->pre}topics (board,topic,name,date,last,last_name,prefix,vquestion)\n\t\tVALUES ('{$board}','{$_POST['topic']}','{$pnameid}','{$date}','{$date}','{$pnameid}','{$_POST['opt_0']}','')\n\t\t"); $tredirect = $db->insert_id();
forum_opt($info); echo $tpl->parse("header"); echo $tpl->parse("menu"); ($code = $plugins->load('misc_board_rules_prepared')) ? eval($code) : null; echo $tpl->parse("misc/board_rules"); ($code = $plugins->load('misc_board_rules_end')) ? eval($code) : null; } elseif ($_GET['action'] == "error") { $my->p = $slog->Permissions(); $errid = $gpc->get('id', int); if ($errid != 400 && $errid != 404 && $errid != 403) { $errid = 500; // internal server error } sendStatusCode($errid); ($code = $plugins->load('misc_error_prepared')) ? eval($code) : null; $breadcrumb->Add($lang->phrase('htaccess_error_'.$errid)); echo $tpl->parse("header"); echo $tpl->parse("misc/error"); } ($code = $plugins->load('misc_end')) ? eval($code) : null; $slog->updatelogged(); if ($tpl->tplsent("header")) { $zeitmessung = t2(); echo $tpl->parse("footer"); } $phpdoc->Out(); $db->close();
} elseif ($job == 'cat_move' || $job == 'forum_move') { $id = $gpc->get('id', int); $move = $gpc->get('move', int); if (!is_id($id)) { echo head(); error('admin.php?action=forums&job=manage', $lang->phrase('admin_forum_not_found_id')); } $table = iif($job == 'cat_move', "{$db->pre}categories", "{$db->pre}forums"); $cache = iif($job == 'cat_move', "categories", "cat_bid"); $op = iif($move == 1, "+", "-"); $db->query("UPDATE {$table} SET position = position{$op}1 WHERE id = '{$id}' LIMIT 1"); $delobj = $scache->load('forumtree'); $delobj->delete(); $delobj = $scache->load($cache); $delobj->delete(); sendStatusCode(307, $config['furl'] . '/admin.php?action=forums&job=manage'); } elseif ($job == 'rights') { echo head(); $id = $gpc->get('id', int); if ($id == 0) { error('admin.php?action=forums&job=manage', $lang->phrase('admin_forum_not_found_id')); } $result = $db->query("SELECT f.*, g.name, g.title, g.guest, g.core FROM {$db->pre}fgroups AS f LEFT JOIN {$db->pre}groups AS g ON g.id = f.gid WHERE f.bid = '{$id}' ORDER BY f.gid"); $cache = array(); $colspan = count($glk_forums) + 2; ?> <form name="form" method="post" action="admin.php?action=forums&job=rights_delete&id=<?php echo $id; ?> "> <table class="border">
if (!defined('VISCACHA_CORE')) { define('VISCACHA_CORE', '1'); } require_once "data/config.inc.php"; if ($config['indexpage'] == SCRIPTNAME && !defined('IS_INCLUDED')) { require_once "classes/function.phpcore.php"; sendStatusCode(301, 'index.php'); exit; } require_once "classes/function.viscacha_frontend.php"; if ($plugins->countPlugins('portal') == 0) { if ($config['indexpage'] == SCRIPTNAME) { error($lang->phrase('docs_not_found'), 'forum.php' . SID2URL_1); } else { $slog->updatelogged(); $db->close(); sendStatusCode(301, 'index.php'); exit; } } $my->p = $slog->Permissions(); $my->pb = $slog->GlobalPermissions(); $breadcrumb->Add($lang->phrase('portal_title')); echo $tpl->parse("header"); BBProfile($bbcode); ($code = $plugins->load('portal')) ? eval($code) : null; $slog->updatelogged(); $zeitmessung = t2(); echo $tpl->parse("footer"); $phpdoc->Out(); $db->close();
<p align="center"><?php echo $lang->phrase('admin_design_really_delete_this_data'); ?> </p> <p align="center"> <a href="admin.php?action=designs&job=design_delete2&id=<?php echo $id; ?> "><img border="0" alt="<?php echo $lang->phrase('admin_design_yes'); ?> " src="admin/html/images/yes.gif"> <?php echo $lang->phrase('admin_design_yes'); ?> </a>     <a href="javascript: history.back(-1);"><img border="0" alt="<?php echo $lang->phrase('admin_design_no'); ?> " src="admin/html/images/no.gif"> <?php echo $lang->phrase('admin_design_no'); ?> </a> </p> </td></tr> </table> <?php echo foot(); } else { sendStatusCode(307, $config['furl'] . '/admin.php?action=designs&job=design'); }
$row['replace'] = str_replace('{folder}', $config['smileypath'], $row['replace']); if (file_exists($row['replace'])) { $filesystem->unlink($row['replace']); } } $db->query('DELETE FROM ' . $db->pre . 'smileys WHERE id IN (' . implode(',', $deleteid) . ')'); $anz = $db->affected_rows(); } else { $anz = $lang->phrase('admin_bbc_no'); } echo head(); ok('admin.php?action=bbcodes&job=smileys', $lang->phrase('admin_bbc_entries_deleted')); } elseif ($job == 'smileys_edit') { $editid = $gpc->get('id', arr_int); if (count($editid) == 0) { sendStatusCode(307, $config['furl'] . '/admin.php?action=bbcodes&job=smileys'); exit; } $result = $db->query('SELECT * FROM ' . $db->pre . 'smileys WHERE id IN (' . implode(',', $editid) . ')'); echo head(); $num_smileys = count($editid); ?> <form name="form" method="post" enctype="multipart/form-data" action="admin.php?action=bbcodes&job=smileys_edit2"> <table class="border"> <tr> <td class="obox"><?php echo $lang->phrase('admin_bbc_edit_smileys'); ?> </td> </tr> <tr>
$data = array('topic' => $_POST['topic'], 'comment' => $_POST['comment'], 'dosmileys' => $_POST['dosmileys'], 'dowords' => $_POST['dowords'], 'id' => $id, 'digest' => $digest, 'guest' => 0, 'human' => $human, 'name' => null, 'email' => null); if (!$my->vlogin) { if ($config['guest_email_optional'] == 0 && empty($_POST['email'])) { $data['email'] = ''; } else { $data['email'] = $_POST['email']; } $data['guest'] = 1; $data['name'] = $_POST['name']; } ($code = $plugins->load('addreply_save_errordata')) ? eval($code) : null; $fid = save_error_data($data, $fid); if (!empty($_POST['Preview'])) { $slog->updatelogged(); $db->close(); sendStatusCode(307, $config['furl'] . "/addreply.php?action=preview&id={$id}&fid=" . $fid . SID2URL_JS_x); exit; } else { error($error, "addreply.php?id={$id}&fid=" . $fid . SID2URL_x); } } else { set_flood(FLOOD_TYPE_POSTING); if ($my->vlogin) { $guest = 0; } else { $guest = 1; } $date = time(); ($code = $plugins->load('addreply_save_queries')) ? eval($code) : null; $db->query("\n\t\tUPDATE {$db->pre}topics\n\t\tSET last_name = '{$pnameid}', last = '{$date}', posts = posts+1\n\t\tWHERE id = '{$id}'\n\t\t"); $db->query("\n\t\tINSERT INTO {$db->pre}replies (board,topic,topic_id,name,comment,dosmileys,dowords,email,date,ip,guest,edit,report)\n\t\tVALUES ('{$info['board']}','{$_POST['topic']}','{$id}','{$pnameid}','{$_POST['comment']}','{$_POST['dosmileys']}','{$_POST['dowords']}','{$_POST['email']}','{$date}','{$my->ip}','{$guest}','','')\n\t\t");
} $db->query('UPDATE ' . $db->pre . 'menu SET active = "' . $pos . '" WHERE id = ' . $id); $plug = $gpc->get('plug', int); if ($plug > 0) { $result = $db->query("SELECT position FROM {$db->pre}plugins WHERE id = '{$plug}'"); if ($db->num_rows($result) > 0) { $module_sql = ", module = '{$plug}'"; $row = $db->fetch_assoc($result); $filesystem->unlink('cache/modules/' . $plugins->_group($row['position']) . '.php'); // Do not do that anymore, because it may be required // $db->query("UPDATE {$db->pre}plugins SET active = '{$pos}' WHERE id = '{$plug}' LIMIT 1"); } } $delobj = $scache->load('modules_navigation'); $delobj->delete(); sendStatusCode(307, $config['furl'] . '/admin.php?action=cms&job=nav'); } elseif ($job == 'nav_addplugin') { echo head(); $id = $gpc->get('id', int); $sort = $db->query("SELECT id, name, position FROM {$db->pre}menu WHERE sub = '0' ORDER BY position, ordering, id"); $plugs = $db->query("SELECT id, name FROM {$db->pre}plugins WHERE position = 'navigation' ORDER BY ordering"); $groups = $db->query("SELECT id, name FROM {$db->pre}groups"); $pos = parseNavPosSetting(); ?> <form name="form" method="post" action="admin.php?action=cms&job=nav_addplugin2"> <table class="border" border="0" cellspacing="0" cellpadding="4" align="center"> <tr> <td class="obox" colspan="2"><?php echo $lang->phrase('admin_cms_nav_add_plugin'); ?> </td>
} $db->query('UPDATE ' . $db->pre . 'menu SET active = "' . $pos . '" WHERE id = ' . $id); $plug = $gpc->get('plug', int); if ($plug > 0) { $result = $db->query("SELECT position FROM {$db->pre}plugins WHERE id = '{$plug}'"); if ($db->num_rows($result) > 0) { $module_sql = ", module = '{$plug}'"; $row = $db->fetch_assoc($result); $filesystem->unlink('cache/modules/' . $plugins->_group($row['position']) . '.php'); // Do not do that anymore, because it may be required // $db->query("UPDATE {$db->pre}plugins SET active = '{$pos}' WHERE id = '{$plug}' LIMIT 1"); } } $delobj = $scache->load('modules_navigation'); $delobj->delete(); sendStatusCode(307, $config['furl'] . '/editorcp.php?action=cms&job=nav'); } elseif ($job == 'nav_addplugin') { echo head(); $id = $gpc->get('id', int); $sort = $db->query("SELECT id, name, position FROM {$db->pre}menu WHERE sub = '0' ORDER BY position, ordering, id"); $plugs = $db->query("SELECT id, name FROM {$db->pre}plugins WHERE position = 'navigation' ORDER BY ordering"); $groups = $db->query("SELECT id, name FROM {$db->pre}groups"); $pos = parseNavPosSetting(); ?> <form name="form" method="post" action="editorcp.php?action=cms&job=nav_addplugin2"> <table class="border" border="0" cellspacing="0" cellpadding="4" align="center"> <tr> <td class="obox" colspan="2"><?php echo $lang->phrase('admin_cms_nav_add_plugin'); ?> </td>