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 ', __LINE__, __FILE__); $info = $db->fetch_assoc($result);
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) { $error[] = $lang->phrase('query_string_error'); } if ($my->p['forum'] == 0) { $error[] = $lang->phrase('not_allowed'); } if (count($error) > 0) { errorLogin($error, 'forum.php' . SID2URL_1); } $catbid = $scache->load('cat_bid'); $fc = $catbid->get(); $last = $fc[$info['board']]; if ($last['topiczahl'] < 1) {
$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')); } else { $result = $db->query(' SELECT u.id, u.file, t.board FROM ' . $db->pre . 'uploads AS u LEFT JOIN ' . $db->pre . 'topics AS t ON t.id = u.tid WHERE u.id = ' . $_GET['id'], __LINE__, __FILE__); $row = $db->fetch_assoc($result); $my->p = $slog->Permissions($row['board']); $uppath = 'uploads/topics/' . $row['file']; if ($db->num_rows($result) != 1) { $thumb->create_error('#2 ' . $lang->phrase('thumb_error')); } if ($my->p['forum'] == 0 || $my->p['downloadfiles'] == 0) { $thumb->create_error('#3 ' . $lang->phrase('thumb_error')); } if (!file_exists($uppath)) { $thumb->create_error('#4 ' . $lang->phrase('thumb_error')); } $chachepath = 'uploads/topics/thumbnails/' . $row['id'] . get_extension($uppath); $thumb->set_cacheuri($chachepath); if (file_exists($chachepath) == FALSE) { $thumbnail_source = $thumb->create_thumbnail($uppath); $thumb->create_image($thumbnail_source);
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']; ok($lang->phrase('goboardpw_success'), 'showforum.php?id=' . $board); } else { error($lang->phrase('goboardpw_wrong_password')); } } else { $slog->updatelogged(); $db->close(); viscacha_header('Location: showforum.php?id=' . $board . SID2URL_JS_x); exit; } } elseif ($_GET['action'] == "report_post" || $_GET['action'] == "report_post2") { ($code = $plugins->load('showtopic_topic_query')) ? eval($code) : null; $result = $db->query("SELECT r.id, r.report, r.topic_id, r.tstart, r.topic AS title, t.topic, t.status, t.board, t.prefix FROM {$db->pre}replies AS r LEFT JOIN {$db->pre}topics AS t ON r.topic_id = t.id WHERE r.id = '{$_GET['id']}' LIMIT 1", __LINE__, __FILE__);
$codelang = $scache->load('syntaxhighlight'); $clang = $codelang->get(); ($code = $plugins->load('popup_code_start')) ? eval($code) : null; echo $tpl->parse("popup/header"); echo $tpl->parse("popup/code"); ($code = $plugins->load('popup_code_end')) ? eval($code) : null; } elseif ($_GET['action'] == "showpost") { echo $tpl->parse("popup/header"); $sql_select = iif($config['pm_user_status'] == 1, ", IF (s.mid > 0, 1, 0) AS online"); $sql_join = iif($config['pm_user_status'] == 1, "LEFT JOIN {$db->pre}session AS s ON s.mid = u.id"); ($code = $plugins->load('popup_showpost_query')) ? eval($code) : null; $result = $db->query("\n\tSELECT \n\t\tt.status, t.prefix, \n\t\tr.topic_id, r.board, r.edit, r.dosmileys, r.dowords, r.id, r.topic, r.comment, r.date, r.name as gname, r.email as gmail, r.guest, \n\t\tu.id as mid, u.name as uname, u.mail, u.regdate, u.fullname, u.hp, u.signature, u.location, u.gender, u.birthday, u.pic, u.lastvisit, u.icq, u.yahoo, u.aol, u.msn, u.jabber, u.skype, u.groups, \n\t\tf.* {$sql_select}\n\tFROM {$db->pre}replies AS r \n\t\tLEFT JOIN {$db->pre}user AS u ON r.name=u.id \n\t\tLEFT JOIN {$db->pre}topics AS t ON t.id = r.topic_id \n\t\tLEFT JOIN {$db->pre}userfields AS f ON u.id = f.ufid \n\t\t{$sql_join}\n\tWHERE r.id = '{$_GET['id']}' \n\tLIMIT 1\n\t", __LINE__, __FILE__); $found = $db->num_rows($result); if ($found == 1) { $row = $gpc->prepare($db->fetch_object($result)); $my->p = $slog->Permissions($row->board); if (empty($row->topic_id)) { $row->topic_id = $row->id; } } $error = array(); if ($found == 0) { $error[] = $lang->phrase('query_string_error'); } if ($found == 1 && $my->p['forum'] == 0) { $error[] = $lang->phrase('not_allowed'); } if (count($error) > 0) { errorLogin($error, 'javascript:self.close();'); } $catbid = $scache->load('cat_bid');
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; } get_headboards($fc, $last); $breadcrumb->Add($last['name'], "showforum.php?id=" . $last['id'] . SID2URL_x); $breadcrumb->Add($lang->phrase('newtopic_title'));
$zeitmessung1 = t1(); $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 = ''; }
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'); } if ($my->p['profile'] != 1) { errorLogin(); } if ($guest > 0) {