This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License 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', 'search'); define('VISCACHA_CORE', '1'); include "data/config.inc.php"; include "classes/function.viscacha_frontend.php"; $zeitmessung1 = t1(); $slog = new slog(); $my = $slog->logged(); $lang->init($my->language); $tpl = new tpl(); $my->p = $slog->Permissions(); $my->pb = $slog->GlobalPermissions(); if ($my->p['search'] == 0) { error($lang->phrase('query_string_error')); } $breadcrumb->Add($lang->phrase('search')); ($code = $plugins->load('search_start')) ? eval($code) : null; if ($_GET['action'] == "search") { if ($config['floodsearch'] == 1) { if (flood_protect() == FALSE) { error($lang->phrase('flood_control')); }
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License 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', 'attachments'); include "data/config.inc.php"; include "classes/function.viscacha_frontend.php"; $zeitmessung1 = t1(); $slog = new slog(); $my = $slog->logged(); $lang->init($my->language); $tpl = new tpl(); if ($config['tpcallow'] == 0 && $_GET['action'] == "thumbnail") { include 'classes/graphic/class.thumbnail.php'; $thumb = new thumbnail(); $thumb->create_error('#0 ' . $lang->phrase('thumb_error')); } elseif ($config['tpcallow'] == 0) { error($lang->phrase('upload_switched_off')); } if ($_GET['action'] == "thumbnail") { include 'classes/graphic/class.thumbnail.php'; $thumb = new thumbnail(); if (!$_GET['id']) { $thumb->create_error('#1 ' . $lang->phrase('thumb_error'));
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License 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', 'showtopic'); define('VISCACHA_CORE', '1'); include "data/config.inc.php"; include "classes/function.viscacha_frontend.php"; $zeitmessung1 = t1(); $slog = new slog(); $my = $slog->logged(); $lang->init($my->language); $tpl = new tpl(); ($code = $plugins->load('showtopic_topic_query')) ? eval($code) : null; $result = $db->query(' SELECT id, topic, posts, sticky, status, last, board, vquestion, prefix FROM ' . $db->pre . 'topics WHERE id = ' . $_GET['id'] . ' LIMIT 1 ', __LINE__, __FILE__); $info = $gpc->prepare($db->fetch_assoc($result)); $my->p = $slog->Permissions($info['board']); $my->mp = $slog->ModPermissions($info['board']); $error = array(); if ($db->num_rows($result) < 1) {
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License 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', 'managetopic'); define('VISCACHA_CORE', '1'); include "data/config.inc.php"; include "classes/function.viscacha_frontend.php"; $zeitmessung1 = t1(); $slog = new slog(); $my = $slog->logged(); $lang->init($my->language); $tpl = new tpl(); $action = $gpc->get('action', none); $result = $db->query(' SELECT board, mark, id, last_name, prefix, topic FROM ' . $db->pre . 'topics WHERE id = "' . $_GET['id'] . '" LIMIT 1 ', __LINE__, __FILE__); if ($db->num_rows($result) != 1) { error($lang->phrase('query_string_error')); } $info = $db->fetch_assoc($result); $info['last_name'] = $gpc->prepare($info['last_name']);
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License 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', 'images'); include "data/config.inc.php"; include "classes/function.viscacha_frontend.php"; $zeitmessung1 = t1(); $slog = new slog(); $my = $slog->logged(); $lang->init($my->language); if ($_GET['action'] == 'vote') { $result = $db->query('SELECT id, topic, posts, sticky, status, last, board, vquestion, prefix FROM ' . $db->pre . 'topics WHERE id = ' . $_GET['id'] . ' LIMIT 1', __LINE__, __FILE__); $info = $gpc->prepare($db->fetch_assoc($result)); require_once 'classes/class.charts.php'; $PG = new PowerGraphic(); $skin = $gpc->get('skin', int, 1); $modus = $gpc->get('modus', int, 1); $PG->title = $info['vquestion']; $PG->axis_y = $lang->phrase('vote_export_votes'); $PG->type = $modus; $PG->skin = $skin; $PG->dp = $lang->phrase('decpoint'); $PG->ds = $lang->phrase('thousandssep');
$htaccess[] = "RewriteCond %{HTTP_HOST} ^www\\." . preg_quote($host) . "\$ [NC]"; $htaccess[] = "RewriteRule ^(.*)\$ http://" . $host . "/\$1 [R=301,L]"; $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;
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ error_reporting(E_ALL); DEFINE('SCRIPTNAME', 'admin'); include "data/config.inc.php"; include "admin/data/config.inc.php"; if (empty($config['cryptkey']) || empty($config['database']) || empty($config['dbsystem'])) { trigger_error('Viscacha is currently not installed. How to install Viscacha is described in the file "_docs/readme.txt"!', E_USER_ERROR); } if (empty($config['dbpw']) || empty($config['dbuser'])) { trigger_error('You have specified database authentification data that is not safe. Please change your database user and the database password!', E_USER_ERROR); } include "admin/lib/function.viscacha_backend.php"; $benchmark = benchmarktime(); $job = $gpc->get('job', str); $slog = new slog(); $my = $slog->logged(); $my->p = $slog->Permissions(); if (!isset($my->settings['admin_interface'])) { $my->settings['admin_interface'] = $admconfig['nav_interface']; } ($code = $plugins->load('admin_start')) ? eval($code) : null; if ($my->p['admin'] == 1) { if ($action == "frames") { include 'admin/frames.php'; } elseif ($action == 'index') { include 'admin/start.php'; } elseif ($action == 'settings') { include 'admin/settings.php'; } elseif ($action == 'spider') { include 'admin/spider.php';
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License 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', 'profile'); include "data/config.inc.php"; include "classes/function.viscacha_frontend.php"; $zeitmessung1 = t1(); $slog = new slog(); $my = $slog->logged(); $lang->init($my->language); $tpl = new tpl(); $my->p = $slog->Permissions(); $is_guest = false; $is_member = false; $url_ext = ''; $guest = $gpc->get('guest', int); $memberdata_obj = $scache->load('memberdata'); $memberdata = $memberdata_obj->get(); if (isset($memberdata[$_GET['id']])) { $username = $memberdata[$_GET['id']]; } else { $username = $lang->phrase('fallback_no_username'); }
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License 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', 'team'); include "data/config.inc.php"; include "classes/function.viscacha_frontend.php"; $zeitmessung1 = t1(); $slog = new slog(); $my = $slog->logged(); $lang->init($my->language); $tpl = new tpl(); $my->p = $slog->Permissions(); if ($my->p['team'] == 0) { errorLogin(); } $breadcrumb->Add($lang->phrase('team')); echo $tpl->parse("header"); echo $tpl->parse("menu"); $mymodules->load('team_top'); $team = $slog->getTeamID(); $cache = array(); $t = array_merge($team['admin'], $team['gmod']); foreach ($t as $row) {
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License 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', 'newtopic'); 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); $catbid = $scache->load('cat_bid'); $fc = $catbid->get(); if (empty($board) || !isset($fc[$board])) { error($lang->phrase('query_string_error')); } $last = $fc[$board]; forum_opt($last, 'posttopics'); if ($config['tpcallow'] == 1 && $my->p['attachments'] == 1) { $p_upload = 1; } else { $p_upload = 0;
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License 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', 'pm'); include "data/config.inc.php"; include "classes/function.viscacha_frontend.php"; $zeitmessung1 = t1(); $slog = new slog(); $my = $slog->logged(); $lang->init($my->language); $tpl = new tpl(); $my->p = $slog->Permissions(); if ($my->p['pm'] == 0 || !$my->vlogin) { errorLogin(); } $breadcrumb->Add($lang->phrase('editprofile_pm'), 'pm.php' . SID2URL_x); if ($_GET['action'] == 'show') { BBProfile($bbcode); ($code = $plugins->load('pm_show_query')) ? eval($code) : null; $result = $db->query("\n\tSELECT p.dir, p.status, p.id, p.topic, p.comment, p.date, u.fullname, u.groups, u.hp, u.pic, u.mail, u.regdate, u.location, u.name, p.pm_from as mid \n\tFROM {$db->pre}pm AS p \n\t\tLEFT JOIN {$db->pre}user AS u ON p.pm_from=u.id \n\tWHERE p.pm_to = '" . $my->id . "' AND p.id = '{$_GET['id']}' \n\tORDER BY p.date ASC\n\t", __LINE__, __FILE__); if ($db->num_rows() != 1) { error($lang->phrase('query_string_error'), 'pm.php' . SID2URL_1); }
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License 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', 'search'); include "data/config.inc.php"; include "classes/function.viscacha_frontend.php"; $zeitmessung1 = t1(); $slog = new slog(); $my = $slog->logged(); $lang->init($my->language); $tpl = new tpl(); $my->p = $slog->Permissions(); $my->pb = $slog->GlobalPermissions(); if ($my->p['search'] == 0) { error($lang->phrase('query_string_error')); } $breadcrumb->Add($lang->phrase('search')); // Suchanfragen längerfristig speichern können! // Googlify if ($_GET['action'] == "search") { if ($config['floodsearch'] == 1) { if (flood_protect() == FALSE) { error($lang->phrase('flood_control'));
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License 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', 'external'); include "data/config.inc.php"; DEFINE('TEMPSHOWLOG', 1); include "classes/function.viscacha_frontend.php"; $slog = new slog(); $my = $slog->logged(); $lang->init($my->language); $tpl = new tpl(); $my->p = $slog->Permissions(); $my->pb = $slog->GlobalPermissions(); if ($config['syndication'] == 0) { errorLogin(); } // Get the correct formatted timzone $posneg = $my->timezone[0]; if ($posneg != '+' && $posneg != '-') { $posneg = '+'; $mtz = $my->timezone; } else { $mtz = substr($my->timezone, 1);
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License 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', 'profile'); define('VISCACHA_CORE', '1'); include "data/config.inc.php"; include "classes/function.viscacha_frontend.php"; $zeitmessung1 = t1(); $slog = new slog(); $my = $slog->logged(); $lang->init($my->language); $tpl = new tpl(); $my->p = $slog->Permissions(); $is_guest = false; $is_member = false; $url_ext = ''; $guest = $gpc->get('guest', int); $memberdata_obj = $scache->load('memberdata'); $memberdata = $memberdata_obj->get(); if (isset($memberdata[$_GET['id']])) { $username = $memberdata[$_GET['id']]; } else { $username = $lang->phrase('fallback_no_username'); }
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License 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', 'log'); DEFINE('TEMPSHOWLOG', 1); include "data/config.inc.php"; include "classes/function.viscacha_frontend.php"; $zeitmessung1 = t1(); $slog = new slog(); $my = $slog->logged(); $lang->init($my->language); $tpl = new tpl(); $my->p = $slog->Permissions(); if ($_GET['action'] == "login2") { $loc = strip_tags($gpc->get('location', none, 'index.php' . SID2URL_1)); $file = basename($loc); if ($file = 'log.php') { $loc = 'index.php' . SID2URL_1; } if ($my->vlogin) { viscacha_header($loc); } if (!$slog->sid_login()) { error($lang->phrase('log_wrong_data'), "log.php?action=login&location=" . urlencode($loc) . SID2URL_x);
$my = $slog->logged(); $lang->init($my->language); $tpl = new tpl(); ob_start(); include 'data/banned.php'; $banned = ob_get_contents(); ob_end_clean(); ($code = $plugins->load('frontend_init_banned')) ? eval($code) : null; echo $tpl->parse("banned"); $phpdoc->Out(); $db->close(); exit; } } } if ($config['foffline'] && defined('TEMPSHOWLOG') == false && SCRIPTNAME != 'external') { $slog = new slog(); $my = $slog->logged(); $my->p = $slog->Permissions(); if ($my->p['admin'] != 1) { $lang->init($my->language); $tpl = new tpl(); $offline = file_get_contents('data/offline.php'); ($code = $plugins->load('frontent_init_offline')) ? eval($code) : null; echo $tpl->parse("offline"); $phpdoc->Out(); $db->close(); exit; } unset($slog, $my); }
but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License 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'); define('VISCACHA_CORE', '1'); 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 {
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License 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', 'editprofile'); define('VISCACHA_CORE', '1'); include "data/config.inc.php"; include "classes/function.viscacha_frontend.php"; $zeitmessung1 = t1(); $slog = new slog(); $my = $slog->logged(); $lang->init($my->language); $tpl = new tpl(); if ($_GET['action'] != "addabo" && $_GET['action'] != "copy") { $my->p = $slog->Permissions(); } if (!$my->vlogin) { errorLogin($lang->phrase('not_allowed'), 'log.php'); } include_once "classes/function.profilefields.php"; $breadcrumb->Add($lang->phrase('editprofile_title'), 'editprofile.php' . SID2URL_1); ($code = $plugins->load('editprofile_start')) ? eval($code) : null; if ($_GET['action'] == "pw2") { $error = array(); if ($_POST['type'] != $_POST['pwx']) {
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License 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', 'misc'); define('VISCACHA_CORE', '1'); include "data/config.inc.php"; include "classes/function.viscacha_frontend.php"; $zeitmessung1 = t1(); $slog = new slog(); $my = $slog->logged(); $lang->init($my->language); $tpl = new tpl(); if ($_GET['action'] == "boardin") { $board = $gpc->get('board', int); $catbid = $scache->load('cat_bid'); $fc = $catbid->get(); if (empty($board) || !isset($fc[$board])) { error($lang->phrase('query_string_error')); } $row = $fc[$board]; if ($row['opt'] == 'pw') { $my->p = $slog->Permissions($board); if ($row['optvalue'] == $_POST['pw']) { $my->pwfaccess[$board] = $row['optvalue'];
function logged() { global $config, $db, $phpdoc, $gpc; // Alte Sessions (nach bestimmter Zeit, die geprüft wird) löschen if ($this->SessionDel() == true) { $sessionsave = $config['sessionsave'] * 60; $old = time() - $sessionsave; $db->query("DELETE FROM {$db->pre}session WHERE active <= '" . $old . "'", __LINE__, __FILE__); } $sessionid = $gpc->get('s', str); if (empty($sessionid) || strlen($sessionid) != $config['sid_length']) { $sessionid = FALSE; $this->querysid = FALSE; } $vdata = $gpc->save_str(getcookie('vdata')); $vlastvisit = $gpc->save_int(getcookie('vlastvisit')); $vhash = $gpc->save_str(getcookie('vhash')); // Read additional data if (!empty($vdata)) { $this->cookies = TRUE; $this->cookiedata = explode("|", $vdata); } else { $this->cookiedata = array(0, ''); } if (!empty($vlastvisit)) { $this->cookies = TRUE; $this->cookielastvisit = $vlastvisit; } else { $this->cookielastvisit = 0; } if (isset($vhash)) { $this->cookies = TRUE; if (strlen($vhash) != $config['sid_length']) { $this->sid = ''; } else { $this->sid = $vhash; } } elseif ($sessionid) { $this->sid = $sessionid; } else { $this->sid = ''; } if (empty($this->sid)) { $result = $db->query('SELECT sid FROM ' . $db->pre . 'session WHERE ip = "' . $this->ip . '" AND mid = "0" LIMIT 1', __LINE__, __FILE__); if ($db->num_rows() == 1) { $sidrow = $db->fetch_assoc($result); $this->sid = $sidrow['sid']; $this->querysid = TRUE; } } // Checke nun die Session if (empty($this->sid)) { if (SCRIPTNAME != 'external') { $my = $this->sid_new(); } else { $my->vlogin = FALSE; } } else { $my = $this->sid_load(); } $expire = $config['sessionsave'] + 1 * 60; makecookie($config['cookie_prefix'] . '_vhash', $this->sid, $expire); if ($gpc->get('action') == "markasread" || !isset($my->mark)) { $my->mark = array(); } else { $my->mark = unserialize(html_entity_decode($my->mark, ENT_QUOTES)); } if (!is_array($my->mark)) { $my->mark = array(); } if ($my->vlogin) { makecookie($config['cookie_prefix'] . '_vdata', $my->id . "|" . $my->pw); } else { $my->id = 0; } if (!isset($my->pwfaccess)) { $my->pwfaccess = array(); } else { $my->pwfaccess = unserialize(html_entity_decode($my->pwfaccess, ENT_QUOTES)); } if (!is_array($my->pwfaccess)) { $my->pwfaccess = array(); } if (!isset($my->settings)) { $my->settings = array(); } else { $my->settings = unserialize(html_entity_decode($my->settings, ENT_QUOTES)); } if (!is_array($my->settings)) { $my->settings = array(); } if (!isset($my->timezone) || $my->timezone == NULL) { $my->timezone = $config['timezone']; } $my->timezonestr = ''; if ($my->timezone != 0) { if ($my->timezone[0] != '+' && $my->timezone > 0) { $my->timezonestr = '+' . $my->timezone; } else { $my->timezonestr = $my->timezone; } } $cache = cache_loaddesign(); $q_tpl = $gpc->get('design', int); if (isset($my->template) == false || isset($cache[$my->template]) == false) { $my->template = $config['templatedir']; } if (isset($my->settings['q_tpl']) && isset($cache[$my->settings['q_tpl']])) { $my->template = $my->settings['q_tpl']; } if (isset($cache[$q_tpl])) { //if ($gpc->get('admin', int) != 1) { $my->settings['q_tpl'] = $q_tpl; //} $my->template = $q_tpl; } $my->templateid = $cache[$my->template]['template']; $my->imagesid = $cache[$my->template]['images']; $my->cssid = $cache[$my->template]['stylesheet']; $my->smileyfolder = $cache[$my->template]['smileyfolder']; $cache2 = cache_loadlanguage(); $q_lng = $gpc->get('lang', int); if (isset($my->language) == false || isset($cache2[$my->language]) == false) { $my->language = $config['langdir']; } if (isset($my->settings['q_lng']) && isset($cache2[$my->settings['q_lng']]) != false) { $my->language = $my->settings['q_lng']; } if (isset($cache2[$q_lng]) != false) { $my->settings['q_lng'] = $q_lng; $my->language = $q_lng; } if (isset($my->lastvisit) && !$my->clv) { $my->clv = $my->lastvisit; } if (!isset($my->opt_hidebad)) { $my->opt_hidebad = 0; } if (!isset($my->opt_showsig)) { $my->opt_showsig = 1; } if ($this->bi[1] == 'e') { $slog = new slog(); $my = $slog->logged(); global $lang; $lang->init($my->language); $tpl = new tpl(); ob_start(); include 'data/banned.php'; $banned = ob_get_contents(); ob_end_clean(); echo $tpl->parse("banned"); $phpdoc->Out(); $db->close(); exit; } $this->sid2url(); return $my; }
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License 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', 'ajax'); define('VISCACHA_CORE', '1'); include "data/config.inc.php"; DEFINE('TEMPSHOWLOG', 1); 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;
/** * Bans a user. * * After calling the function exit() is called and script ends. * Connection to database is closed. Template 'banned' will be shown. * Error Message is loaded from 'data/banned.php'-file. */ function banish() { global $config, $db, $phpdoc, $gpc, $lang, $plugins; $slog = new slog(); $my = $slog->logged(); $lang->init($my->language); $tpl = new tpl(); ob_start(); include 'data/banned.php'; $banned = ob_get_contents(); ob_end_clean(); ($code = $plugins->load('permissions_banish')) ? eval($code) : null; echo $tpl->parse("banned"); $phpdoc->Out(); $db->close(); exit; }
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License 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', 'showtopic'); include "data/config.inc.php"; include "classes/function.viscacha_frontend.php"; $zeitmessung1 = t1(); $slog = new slog(); $my = $slog->logged(); $lang->init($my->language); $tpl = new tpl(); ($code = $plugins->load('showtopic_topic_query')) ? eval($code) : null; $result = $db->query(' SELECT id, topic, posts, sticky, status, last, board, vquestion, prefix FROM ' . $db->pre . 'topics WHERE id = ' . $_GET['id'] . ' LIMIT 1 ', __LINE__, __FILE__); $info = $gpc->prepare($db->fetch_assoc($result)); $my->p = $slog->Permissions($info['board']); $my->mp = $slog->ModPermissions($info['board']); $error = array(); if ($db->num_rows($result) < 1) {
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License 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', 'print'); include "data/config.inc.php"; include "classes/function.viscacha_frontend.php"; $zeitmessung1 = t1(); $slog = new slog(); $my = $slog->logged(); $lang->init($my->language); $tpl = new tpl(); ($code = $plugins->load('print_topic_query')) ? eval($code) : null; $result = $db->query(' SELECT topic, posts, sticky, status, last, board, vquestion, prefix FROM ' . $db->pre . 'topics WHERE id = ' . $_GET['id'] . ' LIMIT 1 ', __LINE__, __FILE__); $info = $gpc->prepare($db->fetch_assoc($result)); $my->p = $slog->Permissions($info['board']); $error = array(); if ($db->num_rows($result) < 1) { $error[] = $lang->phrase('query_string_error');
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License 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', 'images'); define('VISCACHA_CORE', '1'); include "data/config.inc.php"; include "classes/function.viscacha_frontend.php"; $zeitmessung1 = t1(); $slog = new slog(); $my = $slog->logged(); $my->p = $slog->Permissions(); $lang->init($my->language); function ImageHexColorAllocate(&$image, $string) { sscanf($string, "%2x%2x%2x", $red, $green, $blue); return ImageColorAllocate($image, $red, $green, $blue); } ($code = $plugins->load('images_start')) ? eval($code) : null; if ($_GET['action'] == 'vote') { $result = $db->query(' SELECT id, topic, posts, sticky, status, last, board, vquestion, prefix FROM ' . $db->pre . 'topics WHERE id = ' . $_GET['id'] . ' LIMIT 1