function fvote($id, $ajax = false) { global $db, $balken_vote_menu, $prev; if (!permission("votes")) { $intern = ' AND intern = 0'; } $qry = db("SELECT * FROM " . $db['votes'] . " WHERE id = '" . $id . "' " . $intern . ""); $get = _fetch($qry); if (_rows($qry)) { $qryv = db("SELECT * FROM " . $db['vote_results'] . " WHERE vid = '" . $get['id'] . "' ORDER BY id ASC"); while ($getv = _fetch($qryv)) { $stimmen = sum($db['vote_results'], " WHERE vid = '" . $get['id'] . "'", "stimmen"); if ($stimmen != 0) { if (ipcheck("vid_" . $get['id']) || isset($_COOKIE[$prev . "vid_" . $get['id']]) || $get['closed'] == 1) { $percent = round($getv['stimmen'] / $stimmen * 100, 1); $rawpercent = round($getv['stimmen'] / $stimmen * 100, 0); $balken = show(_votes_balken, array("width" => $rawpercent)); $votebutton = ""; $results .= show("forum/vote_results", array("answer" => re($getv['sel']), "percent" => $percent, "stimmen" => $getv['stimmen'], "balken" => $balken)); } else { $votebutton = '<input id="contentSubmitFVote" type="submit" value="' . _button_value_vote . '" class="voteSubmit" />'; $results .= show("forum/vote_vote", array("id" => $getv['id'], "answer" => re($getv['sel']))); } } else { $votebutton = '<input id="contentSubmitFVote" type="submit" value="' . _button_value_vote . '" class="voteSubmit" />'; $results .= show("forum/vote_vote", array("id" => $getv['id'], "answer" => re($getv['sel']))); } } $qryf = db("SELECT id,kid FROM " . $db['f_threads'] . " WHERE vote = '" . $get['id'] . "'"); $getf = _fetch($qryf); $vote = show("forum/vote", array("titel" => re($get['titel']), "vid" => $get['id'], "fid" => $getf['id'], "kid" => $getf['kid'], "umfrage" => _forum_vote, "results" => $results, "votebutton" => $votebutton, "stimmen" => $stimmen)); } return empty($vote) ? '' : ($ajax ? $vote : '<div id="navFVote">' . $vote . '</div>'); }
function vote($ajax = false) { global $db, $balken_vote_menu, $prev; $qry = db("SELECT * FROM " . $db['votes'] . " WHERE menu = '1' AND forum = 0"); $get = _fetch($qry); if (_rows($qry)) { $qryv = db("SELECT * FROM " . $db['vote_results'] . " WHERE vid = '" . $get['id'] . "' ORDER BY what"); while ($getv = _fetch($qryv)) { $stimmen = sum($db['vote_results'], " WHERE vid = '" . $get['id'] . "'", "stimmen"); if ($stimmen != 0) { if (ipcheck("vid_" . $get['id']) || isset($_COOKIE[$prev . "vid_" . $get['id']]) || $get['closed'] == 1) { $percent = round($getv['stimmen'] / $stimmen * 100, 1); $rawpercent = round($getv['stimmen'] / $stimmen * 100, 0); $balken = show(_votes_balken, array("width" => $rawpercent)); $votebutton = ""; $results .= show("menu/vote_results", array("answer" => re($getv['sel']), "percent" => $percent, "stimmen" => $getv['stimmen'], "balken" => $balken)); } else { $votebutton = '<input id="contentSubmitVote" type="submit" value="' . _button_value_vote . '" class="voteSubmit" />'; $results .= show("menu/vote_vote", array("id" => $getv['id'], "answer" => re($getv['sel']))); } } else { $votebutton = '<input id="contentSubmitVote" type="submit" value="' . _button_value_vote . '" class="voteSubmit" />'; $results .= show("menu/vote_vote", array("id" => $getv['id'], "answer" => re($getv['sel']))); } } $vote = show("menu/vote", array("titel" => re($get['titel']), "vid" => $get['id'], "results" => $results, "votebutton" => $votebutton, "stimmen" => $stimmen)); } return empty($vote) ? '<center style="margin:2px 0">' . _vote_menu_no_vote . '</center>' : ($ajax ? $vote : '<div id="navVote">' . $vote . '</div>'); }
function counter() { //$sql_prefix hinzufügen global $db, $today, $counter_start, $useronline, $where, $isSpider, $sql_prefix; if (!$isSpider) { $qry2day = db("SELECT visitors FROM " . $db['counter'] . "\n WHERE today = '" . $today . "'"); if (_rows($qry2day)) { $get2day = _fetch($qry2day); $v_today = $get2day['visitors']; } else { $v_today = 0; } $gestern = time() - 86400; $tag = date("j", $gestern); $monat = date("n", $gestern); $jahr = date("Y", $gestern); $yesterday = $tag . "." . $monat . "." . $jahr; $qryyday = db("SELECT visitors FROM " . $db['counter'] . "\n WHERE today = '" . $yesterday . "'"); if (_rows($qryyday)) { $getyday = _fetch($qryyday); $yDay = $getyday['visitors']; } else { $yDay = 0; } $qrystats = db("SELECT SUM(visitors) AS allvisitors,\n MAX(visitors) AS maxvisitors,\n MAX(maxonline) AS maxonline,\n AVG(visitors) AS avgvisitors,\n SUM(visitors) AS allvisitors\n FROM " . $db['counter'] . ""); $getstats = _fetch($qrystats); if (abs(online_reg()) != 0) { $qryo = db("SELECT id FROM " . $db['users'] . "\n WHERE time+'" . $useronline . "'>'" . time() . "'\n AND online = 1\n ORDER BY nick"); while ($geto = _fetch($qryo)) { $ousers .= '<tr><td>' . rawautor($geto['id']) . '</td><td align=right valign=middle><small>' . jsconvert(getrank($geto['id'])) . '</small></td></tr>'; } $info = 'onmouseover="DZCP.showInfo(\'<tr><td colspan=2 align=center padding=3 class=infoTop>' . _online_head . '</td></tr><tr><td><table width=100% cellpadding=0 cellspacing=0>' . $ousers . '</table></td></tr>\')" onmouseout="DZCP.hideInfo()"'; } //Klicks Mod if (strpos($_SERVER['PHP_SELF'], "/admin/") !== false) { $clicksnumber = "-"; } else { if ($_SERVER['QUERY_STRING'] != "") { $whereclicks = $_SERVER['PHP_SELF'] . "?" . $_SERVER['QUERY_STRING']; } else { $whereclicks = $_SERVER['PHP_SELF']; } $clicksrownumber = mysql_num_rows(db("SELECT klicks FROM " . $sql_prefix . "klicks WHERE wo = '" . $whereclicks . "'")); if ($clicksrownumber == 0) { $qry = db("INSERT INTO " . $sql_prefix . "klicks \n SET `wo` = '" . $whereclicks . "',\n `klicks` = '1'"); $clicksnumber = 1; } else { $clicksnumber = mysql_fetch_array(db("SELECT klicks FROM " . $sql_prefix . "klicks WHERE wo = '" . $whereclicks . "'")); $clicksnumber = $clicksnumber[0] + 1; $qry = db("UPDATE " . $sql_prefix . "klicks SET klicks = '" . $clicksnumber . "' WHERE wo LIKE '" . $whereclicks . "'"); } } //Klicks Mod Ende $counter = show("menu/counter", array("v_today" => $v_today, "aufrufe" => $clicksnumber, "v_yesterday" => $yDay, "v_all" => $getstats['allvisitors'] + $counter_start, "v_perday" => round($getstats['avgvisitors'], 2), "v_max" => $getstats['maxvisitors'], "g_online" => abs(online_guests($where) - online_reg()), "u_online" => abs(online_reg()), "info" => $info, "v_online" => $getstats['maxonline'], "head_online" => _head_online, "head_visits" => _head_visits, "head_max" => _head_max, "user" => _cnt_user, "guests" => _cnt_guests, "today" => _cnt_today, "yesterday" => _cnt_yesterday, "all" => _cnt_all, "percentperday" => _cnt_pperday, "perday" => _cnt_perday, "online" => _cnt_online)); return '<table class="navContent" cellspacing="0">' . $counter . '</table>'; } }
function n_wars() { global $db, $maxnwars, $lnwars, $allowHover; $qry = db("SELECT s1.id,s1.datum,s1.clantag,s1.maps,s1.gegner,s1.squad_id,s2.icon,s1.xonx,s2.name FROM " . $db['cw'] . " AS s1\n LEFT JOIN " . $db['squads'] . " AS s2 ON s1.squad_id = s2.id\n WHERE s1.datum > " . time() . "\n ORDER BY s1.datum\n LIMIT " . $maxnwars . ""); if (_rows($qry)) { while ($get = _fetch($qry)) { if ($allowHover == 1 || $allowHover == 2) { $info = 'onmouseover="DZCP.showInfo(\'<tr><td colspan=2 align=center padding=3 class=infoTop>' . jsconvert(re($get['name'])) . '<br/>vs.<br /> ' . jsconvert(re($get['gegner'])) . '</td></tr><tr><td><b>' . _datum . ':</b></td><td>' . date("d.m.Y H:i", $get['datum']) . _uhr . '</td></tr><tr><td><b>' . _cw_xonx . ':</b></td><td>' . jsconvert(re($get['xonx'])) . '</td></tr><tr><td><b>' . _cw_maps . ':</b></td><td>' . jsconvert(re($get['maps'])) . '</td></tr><tr><td><b>' . _comments_head . ':</b></td><td>' . cnt($db['cw_comments'], "WHERE cw = '" . $get['id'] . "'") . '</td></tr>\')" onmouseout="DZCP.hideInfo()"'; } $nwars .= show("menu/next_wars", array("id" => $get['id'], "clantag" => re(cut($get['clantag'], $lnwars)), "icon" => re($get['icon']), "info" => $info, "datum" => date("d.m.:", $get['datum']))); } } return empty($nwars) ? '' : '<table class="navContent" cellspacing="0">' . $nwars . '</table>'; }
function l_artikel() { global $db, $maxlartikel, $lartikel, $allowHover; $qry = db("SELECT id,titel,text,autor,datum,kat,public FROM " . $db['artikel'] . "\n\t\t\t WHERE public = 1\n ORDER BY id DESC\n LIMIT " . $maxlartikel . ""); if (_rows($qry)) { while ($get = _fetch($qry)) { $qrykat = db("SELECT kategorie FROM " . $db['newskat'] . "\n WHERE id = '" . $get['kat'] . "'"); $getkat = _fetch($qrykat); $text = strip_tags($get['text']); if ($allowHover == 1) { $info = 'onmouseover="DZCP.showInfo(\'<tr><td colspan=2 align=center padding=3 class=infoTop>' . jsconvert(re($get['titel'])) . '</td></tr><tr><td><b>' . _datum . ':</b></td><td>' . date("d.m.Y H:i", $get['datum']) . _uhr . '</td></tr><tr><td><b>' . _autor . ':</b></td><td>' . rawautor($get['autor']) . '</td></tr><tr><td><b>' . _news_admin_kat . ':</b></td><td>' . jsconvert(re($getkat['kategorie'])) . '</td></tr><tr><td><b>' . _comments_head . ':</b></td><td>' . cnt($db['acomments'], "WHERE artikel = '" . $get['id'] . "'") . '</td></tr>\')" onmouseout="DZCP.hideInfo()"'; } $l_articles .= show("menu/last_artikel", array("id" => $get['id'], "titel" => re(cut($get['titel'], $lartikel)), "text" => cut(bbcode($text), 260), "datum" => date("d.m.Y", $get['datum']), "info" => $info)); } } return empty($l_articles) ? '' : '<table class="navContent" cellspacing="0">' . $l_articles . '</table>'; }
function counter() { global $db, $today, $counter_start, $useronline, $where, $isSpider; if (!$isSpider) { $qry2day = db("SELECT visitors FROM " . $db['counter'] . "\n WHERE today = '" . $today . "'"); if (_rows($qry2day)) { $get2day = _fetch($qry2day); $v_today = $get2day['visitors']; } else { $v_today = 0; } $gestern = time() - 86400; $tag = date("j", $gestern); $monat = date("n", $gestern); $jahr = date("Y", $gestern); $yesterday = $tag . "." . $monat . "." . $jahr; $qryyday = db("SELECT visitors FROM " . $db['counter'] . "\n WHERE today = '" . $yesterday . "'"); if (_rows($qryyday)) { $getyday = _fetch($qryyday); $yDay = $getyday['visitors']; } else { $yDay = 0; } $qrystats = db("SELECT SUM(visitors) AS allvisitors,\n MAX(visitors) AS maxvisitors,\n MAX(maxonline) AS maxonline,\n AVG(visitors) AS avgvisitors,\n SUM(visitors) AS allvisitors\n FROM " . $db['counter'] . ""); $getstats = _fetch($qrystats); if (abs(online_reg()) != 0) { $qryo = db("SELECT id FROM " . $db['users'] . "\n WHERE time+'" . $useronline . "'>'" . time() . "'\n AND online = 1\n ORDER BY nick"); while ($geto = _fetch($qryo)) { $ousers .= '<tr><td>' . rawautor($geto['id']) . '</td><td align=right valign=middle><small>' . jsconvert(getrank($geto['id'])) . '</small></td></tr>'; } $info = 'onmouseover="DZCP.showInfo(\'<tr><td colspan=2 align=center padding=3 class=infoTop>' . _online_head . '</td></tr><tr><td><table width=100% cellpadding=0 cellspacing=0>' . $ousers . '</table></td></tr>\')" onmouseout="DZCP.hideInfo()"'; } $counter = show("menu/counter", array("v_today" => $v_today, "v_yesterday" => $yDay, "v_all" => $getstats['allvisitors'] + $counter_start, "v_perday" => round($getstats['avgvisitors'], 2), "v_max" => $getstats['maxvisitors'], "g_online" => abs(online_guests($where) - online_reg()), "u_online" => abs(online_reg()), "info" => $info, "v_online" => $getstats['maxonline'], "head_online" => _head_online, "head_visits" => _head_visits, "head_max" => _head_max, "user" => _cnt_user, "guests" => _cnt_guests, "today" => _cnt_today, "yesterday" => _cnt_yesterday, "all" => _cnt_all, "percentperday" => _cnt_pperday, "perday" => _cnt_perday, "online" => _cnt_online)); return '<table class="navContent" cellspacing="0">' . $counter . '</table>'; } }
} } $index = show($dir . "/squads_full", array("member" => empty($member) ? _member_squad_no_entrys : $member, "desc" => empty($get['beschreibung']) ? '' : '<tr><td class="contentMainSecond">' . bbcode($get['beschreibung']) . '</td></tr>', "squad" => $squad, "style" => $style, "back" => _error_back, "id" => intval($_GET['id']))); break; default: $qry = db("SELECT * FROM " . $db['squads'] . " WHERE team_show = 1 ORDER BY pos"); while ($get = _fetch($qry)) { $class = $color % 2 ? "contentMainSecond" : "contentMainFirst"; $color++; $squad = show(_gameicon, array("icon" => $get['icon'])) . ' ' . re($get['name']); $style = ''; foreach ($picformat as $end) { if (file_exists(basePath . '/inc/images/squads/' . intval($get['id']) . '.' . $end)) { $style = 'text-align:center;padding:0'; $squad = '<img src="../inc/images/squads/' . intval($get['id']) . '.' . $end . '" alt="' . re($get['name']) . '" />'; break; } } $show .= show($dir . "/squads_show", array("id" => $get['id'], "squad" => $squad, "style" => $style, "class" => $class, "beschreibung" => bbcode($get['beschreibung']), "squadname" => re($get['name']))); } $cntm = db("SELECT * FROM " . $db['squaduser'] . " GROUP BY user"); $weare = show(_member_squad_weare, array("cm" => _rows($cntm), "cs" => cnt($db['squads'], "WHERE team_show = 1"))); $index = show($dir . "/squads", array("squadhead" => _member_squad_head, "weare" => $weare, "show" => $show)); break; } ## SETTINGS ## $time_end = generatetime(); $time = round($time_end - $time_start, 4); page($index, $title, $where, $time); ## OUTPUT BUFFER END ## gz_output();
function kalender($month = "", $year = "") { global $db, $sql_prefix; if (!empty($month) && !empty($year)) { $monat = cal($month); $jahr = $year; } else { $monat = date("m"); $jahr = date("Y"); } for ($i = 1; $i <= 12; $i++) { $mname = array("1" => _jan, "2" => _feb, "3" => _mar, "4" => _apr, "5" => _mai, "6" => _jun, "7" => _jul, "8" => _aug, "9" => _sep, "10" => _okt, "11" => _nov, "12" => _dez); if ($monat == $i) { $month = $mname[$i]; } } $today = mktime(0, 0, 0, date("n"), date("d"), date("Y")); $i = 1; while ($i <= 31 && checkdate($monat, $i, $jahr)) { unset($event); unset($data); unset($bdays); unset($cws); for ($iw = 1; $iw <= 7; $iw++) { unset($titlecw); unset($titlebd); unset($titleev); $datum = mktime(0, 0, 0, $monat, $i, $jahr); $wday = getdate($datum); $wday = $wday['wday']; if (!$wday) { $wday = 7; } if ($wday != $iw) { $data .= "<td class=\"navKalEmpty\"></td>"; } else { $qry = db("SELECT id,bday FROM " . $db['users'] . " WHERE bday LIKE '" . cal($i) . "." . $monat . ".____" . "'"); if (_rows($qry)) { while ($get = _fetch($qry)) { $bdays = "set"; $titlebd .= '<tr><td><img src=../inc/images/bday.gif class=icon alt= /> ' . jsconvert(_kal_birthday . rawautor($get['id'])) . '</td></tr>'; } } else { $bdays = ""; $titlebd = ""; } $qry = db("SELECT datum,cid FROM " . $db['cw'] . " WHERE DATE_FORMAT(FROM_UNIXTIME(datum), '%d.%m.%Y') = '" . cal($i) . "." . $monat . "." . $jahr . "'"); if (_rows($qry)) { while ($get = _fetch($qry)) { //Clans Mod $clandetailssql = db("SELECT gegner FROM " . $sql_prefix . "clans WHERE id LIKE " . $get['cid']); $clans = _fetch($clandetailssql); $cws = "set"; $titlecw .= '<tr><td><img src=../inc/images/cw.gif class=icon alt= /> ' . jsconvert(_kal_cw . re($clans['gegner'])) . '</td></tr>'; } } else { $cws = ""; $titlecw = ""; } $qry = db("SELECT datum,title FROM " . $db['events'] . " WHERE DATE_FORMAT(FROM_UNIXTIME(datum), '%d.%m.%Y') = '" . cal($i) . "." . $monat . "." . $jahr . "'"); if (_rows($qry)) { while ($get = _fetch($qry)) { $event = "set"; $titleev .= '<tr><td><img src=../inc/images/event.gif class=icon alt= /> ' . jsconvert(_kal_event . re($get['title'])) . '</td></tr>'; } } else { $event = ""; $titleev = ""; } $info = 'onmouseover="DZCP.showInfo(\'<tr><td colspan=2 align=center padding=3 class=infoTop>' . cal($i) . '.' . $monat . '.' . $jahr . '</td></tr>' . $titlebd . $titlecw . $titleev . '\')" onmouseout="DZCP.hideInfo()"'; if ($event == "set" || $cws == "set" || $bdays == "set") { $day = '<a class="navKal" href="../kalender/?m=' . $monat . '&y=' . $jahr . '&hl=' . $i . '" ' . $info . '>' . cal($i) . '</a>'; } else { $day = cal($i); } if (!checkdate($monat, $i, $jahr)) { $data .= '<td class="navKalEmpty"></td>'; } elseif ($datum == $today) { $data .= show("menu/kal_day", array("day" => $day, "id" => "navKalToday")); } else { $data .= show("menu/kal_day", array("day" => $day, "id" => "navKalDays")); } $i++; } } $show .= "<tr>" . $data . "</tr>"; } if ($monat + 1 == 13) { $nm = 1; $ny = $jahr + 1; } else { $nm = $monat + 1; $ny = $jahr; } if ($monat - 1 == 0) { $lm = 12; $ly = $jahr - 1; } else { $lm = $monat - 1; $ly = $jahr; } $kalender = show("menu/kalender", array("monat" => $month, "show" => $show, "year" => $jahr, "nm" => $nm, "ny" => $ny, "lm" => $lm, "ly" => $ly, "montag" => _nav_montag, "dienstag" => _nav_dienstag, "mittwoch" => _nav_mittwoch, "donnerstag" => _nav_donnerstag, "freitag" => _nav_freitag, "samstag" => _nav_samstag, "sonntag" => _nav_sonntag)); return '<div id="navKalender">' . $kalender . '</div>'; }
function getBoardPermissions($checkID = 0, $pos = 0) { global $db, $dir; $qry = db("SELECT id,name FROM " . $db['f_kats'] . " WHERE intern = '1' ORDER BY `kid` ASC"); while ($get = _fetch($qry)) { unset($kats, $fkats, $break); $kats = (empty($katbreak) ? '' : '<div style="clear:both"> </div>') . '<table class="hperc" cellspacing="1"><tr><td class="contentMainTop"><b>' . re($get["name"]) . '</b></td></tr></table>'; $katbreak = 1; $qry2 = db("SELECT kattopic,id FROM " . $db['f_skats'] . " WHERE `sid` = '" . $get['id'] . "' ORDER BY `kattopic` ASC"); while ($get2 = _fetch($qry2)) { $br = $break % 2 ? '<br />' : ''; $break++; $check = db("SELECT * FROM " . $db['f_access'] . " WHERE `" . (empty($pos) ? 'user' : 'pos') . "` = '" . intval($checkID) . "' AND " . (empty($pos) ? 'user' : 'pos') . " != '0'\n AND `forum` = '" . $get2['id'] . "'"); $chk = _rows($check) ? ' checked="checked"' : ''; $fkats .= '<input type="checkbox" class="checkbox" id="board_' . $get2['id'] . '" name="board[' . $get2['get2'] . ']" value="' . $get2['id'] . '"' . $chk . ' /><label for="board_' . $get2['id'] . '"> ' . re($get2['kattopic']) . '</label> ' . $br; } $i_forum .= $kats . $fkats; } return $i_forum; }
} $qry = db("SELECT * FROM " . $db['votes'] . "\n WHERE intern = 0\n\t\t\t\t\t\t\t " . $fvote . "\n ORDER BY datum DESC"); } while ($get = _fetch($qry)) { $qryv = db("SELECT * FROM " . $db['vote_results'] . "\n WHERE vid = '" . $get['id'] . "'\n ORDER BY id"); $results = ""; $check = ""; while ($getv = _fetch($qryv)) { $stimmen = sum($db['vote_results'], " WHERE vid = '" . $get['id'] . "'", "stimmen"); $class = $color % 2 ? "contentMainSecond" : "contentMainFirst"; $color++; $showVoted = ''; if ($get['intern'] == 1) { $vid = "vid_" . $get['id']; $check = db("SELECT * FROM " . $db['ipcheck'] . "\n WHERE what = '" . $vid . "'\n AND ip = '" . $userid . "'"); $ipcheck = _rows($check); if ($stimmen != 0 && ($get['von'] == $userid || permission('votes'))) { $showVoted = ' <a href="?action=showvote&id=' . $get['id'] . '"><img src="../inc/images/lupe.gif" alt="" title="' . _show_who_voted . '" class="icon" /></a>'; } $intern = _votes_intern; } else { $ipcheck = false; $intern = ""; } if (ipcheck("vid_" . $get['id']) || $ipcheck || isset($_COOKIE[$prev . "vid_" . $get['id']]) || $get['closed'] == 1) { $percent = @round($getv['stimmen'] / $stimmen * 100, 2); $rawpercent = @round($getv['stimmen'] / $stimmen * 100, 0); $balken = show(_votes_balken, array("width" => $rawpercent)); $result_head = _votes_results_head; $votebutton = ""; $results .= show($dir . "/votes_results", array("answer" => re($getv['sel']), "percent" => $percent, "lng_stimmen" => _votes_stimmen, "class" => $class, "stimmen" => $getv['stimmen'], "balken" => $balken));
$action = $_GET['action']; } switch ($action) { default: $qry = db("SELECT * FROM " . $db['dl_kat'] . "\n ORDER BY name"); $t = 1; $cnt = 0; while ($get = _fetch($qry)) { if (isset($_GET['kat'])) { $kid = " WHERE id = '" . intval($_GET['kat']) . "'"; } else { $kid = ""; } $qrydl = db("SELECT * FROM " . $db['downloads'] . "\n WHERE kat = '" . $get['id'] . "'\n ORDER BY download"); $show = ""; if (_rows($qrydl)) { $display = "none"; $img = "expand"; while ($getdl = _fetch($qrydl)) { if ($_GET['hl'] == $getdl['id']) { $display = ""; $img = "collapse"; $download = highlight(re($getdl['download'])); } else { $download = re($getdl['download']); } $link = show(_downloads_link, array("id" => $getdl['id'], "download" => $download, "titel" => re($getdl['download']), "target" => $target)); $class = $color % 2 ? "contentMainSecond" : "contentMainFirst"; $color++; $show .= show($dir . "/downloads_show", array("class" => $class, "link" => $link, "kid" => $get['id'], "display" => $display, "beschreibung" => bbcode($getdl['beschreibung']), "hits" => $getdl['hits'])); }
$hp = show(_hpicon_forum, array("hp" => $gett['t_hp'])); } } $nick = autor($gett['t_reg'], '', $gett['t_nick'], $gett['t_email']); if (!empty($_GET['hl']) && $_SESSION['search_type'] == 'autor') { if (preg_match("#" . $_GET['hl'] . "#i", $nick)) { $ftxt['class'] = 'class="highlightSearchTarget"'; } } $lastpost = show($dir . "/forum_posts_show", array("nick" => $nick, "postnr" => "", "text" => $text, "status" => getrank($gett['t_reg']), "avatar" => useravatar($gett['t_reg']), "ip" => $posted_ip, "pn" => $pn, "class" => $ftxt['class'], "icq" => $icq, "hp" => $hp, "email" => $email, "edit" => "", "p" => $i + ($page - 1) * $maxfposts, "delete" => "", "edited" => $gett['edited'], "posts" => $userposts, "date" => _posted_by . date("d.m.y H:i", $gett['t_date']) . _uhr, "signatur" => $sig, "zitat" => "", "onoff" => $onoff, "top" => "", "lp" => cnt($db['f_posts'], " WHERE sid = '" . intval($_GET['id']) . "'") + 1)); } $index = show($dir . "/post", array("titel" => _forum_new_post_head, "nickhead" => _nick, "bbcodehead" => _bbcode, "emailhead" => _email, "zitat" => $zitat, "what" => _button_value_add, "preview" => _preview, "form" => $form, "br1" => "", "br2" => "", "b1" => $u_b1, "b2" => $u_b2, "security" => _register_confirm, "lang" => $language, "lastpost" => $lastpost, "last_post" => _forum_lp_head, "dowhat" => $dowhat, "id" => $_GET['id'], "ip" => _iplog_info, "kid" => $_GET['kid'], "postemail" => $_POST['email'], "posthp" => $_POST['hp'], "postnick" => re($_POST['nick']), "posteintrag" => re_bbcode($_POST['eintrag']), "error" => $error, "eintraghead" => _eintrag)); } else { $spam = 0; $qrydp = db("SELECT * FROM " . $db['f_posts'] . "\n\t\t\t\t\t\t\t\t\t\t WHERE kid = '" . intval($_GET['kid']) . "'\n\t\t\t\t\t\t\t\t\t\t AND sid = '" . intval($_GET['id']) . "'\n\t\t\t\t\t\t\t\t\t\t ORDER BY date DESC\n\t\t\t\t\t\t\t\t\t\t LIMIT 1"); if (_rows($qrydp)) { $getdp = _fetch($qrydp); if (isset($userid)) { if ($userid == $getdp['reg'] && $double_post == 1) { $spam = 1; } else { $spam = 0; } } else { if ($_POST['nick'] == $getdp['nick'] && $double_post == 1) { $spam = 1; } else { $spam = 0; } } } else {
$wieder = ''; if ($getawaya['end'] > time()) { $wieder = _away_to2 . ' <b>' . date("d.m.y", $getawaya['end']) . '</b>'; } if (date("d.m.Y", $getawaya['end']) == date("d.m.Y", time())) { $wieder = _away_today; } $awaya .= show(_user_away_now, array("id" => $getawaya['id'], "user" => autor($getawaya['userid']), "wieder" => $wieder, "what" => $getawaya['titel'])); } } $away_now = show(_user_away_currently, array("ncaway" => _lobby_away, "caway" => $awaya)); } /** Neue Forum Topics anzeigen */ $qryft = db("SELECT s1.t_text,s1.id,s1.topic,s1.kid,s2.kattopic,s3.intern,s1.sticky\n FROM " . $db['f_threads'] . " s1, " . $db['f_skats'] . " s2, " . $db['f_kats'] . " s3\n WHERE s1.kid = s2.id\n AND s2.sid = s3.id\n ORDER BY s1.lp DESC\n LIMIT 10"); $ftopics = ''; if (_rows($qryft) >= 1) { while ($getft = _fetch($qryft)) { if (fintern($getft['kid'])) { $lp = cnt($db['f_posts'], " WHERE sid = '" . $getft['id'] . "'"); $pagenr = ceil($lp / config('m_ftopics')); $page = $pagenr == 0 ? 1 : $pagenr; $getp = db("SELECT text FROM " . $db['f_posts'] . "\n WHERE kid = '" . $getft['kid'] . "'\n AND sid = '" . $getft['id'] . "'\n ORDER BY date DESC\n LIMIT 1", false, true); $text = strip_tags(!empty($getp) ? $getp['text'] : $getft['t_text']); $intern = $getft['intern'] != 1 ? "" : '<span class="fontWichtig">' . _internal . ':</span>'; $wichtig = $getft['sticky'] != 1 ? '' : '<span class="fontWichtig">' . _sticky . ':</span> '; $ftopics .= show($dir . "/userlobby_forum", array("id" => $getft['id'], "pagenr" => $page, "p" => $lp + 1, "intern" => $intern, "wichtig" => $wichtig, "lpost" => cut(re($text), 100), "kat" => re($getft['kattopic']), "titel" => re($getft['topic']), "kid" => $getft['kid'])); } } } // Userlevel if (($lvl = data("level")) == 1) {
} $qrysq = db("SELECT id,name FROM " . $db['squads'] . "\n ORDER BY pos"); while ($getsq = _fetch($qrysq)) { $qrypos = db("SELECT id,position FROM " . $db['pos'] . "\n ORDER BY pid"); $posi = ""; while ($getpos = _fetch($qrypos)) { $check = db("SELECT * FROM " . $db['userpos'] . "\n WHERE posi = '" . $getpos['id'] . "'\n AND squad = '" . $getsq['id'] . "'\n AND user = '******'edit']) . "'"); if (_rows($check)) { $sel = "selected=\"selected\""; } else { $sel = ""; } $posi .= show(_select_field_posis, array("value" => $getpos['id'], "sel" => $sel, "what" => re($getpos['position']))); } $qrysquser = db("SELECT squad FROM " . $db['squaduser'] . "\n WHERE user = '******'edit']) . "'\n AND squad = '" . $getsq['id'] . "'"); if (_rows($qrysquser)) { $check = "checked=\"checked\""; } else { $check = ""; } $esquads .= show(_checkfield_squads, array("id" => $getsq['id'], "check" => $check, "eposi" => $posi, "noposi" => _user_noposi, "squad" => re($getsq['name']))); } $get_identy = show(_admin_user_get_identitat, array("id" => $_GET['edit'])); $editpwd = show($dir . "/admin_editpwd", array("pwd" => _new_pwd, "epwd" => "")); if ($chkMe == 4) { $elevel = show(_elevel_admin_select, array("selu" => $selu, "selt" => $selt, "selm" => $selm, "sela" => $sela, "ruser" => _status_user, "banned" => _admin_level_banned, "trial" => _status_trial, "member" => _status_member, "admin" => _status_admin)); } elseif (permission("editusers")) { $elevel = show(_elevel_perm_select, array("selu" => $selu, "selt" => $selt, "selm" => $selm, "ruser" => _status_user, "banned" => _admin_level_banned, "trial" => _status_trial, "member" => _status_member)); } $index = show($dir . "/admin", array("enick" => re($get['nick']), "user" => intval($_GET['edit']), "value" => _button_value_edit, "eemail" => $get['email'], "eloginname" => $get['user'], "esquad" => $esquads, "editpwd" => $editpwd, "eposi" => $posi, "rechte" => _config_positions_rights, "getpermissions" => getPermissions(intval($_GET['edit'])), "getboardpermissions" => getBoardPermissions(intval($_GET['edit'])), "forenrechte" => _config_positions_boardrights, "showpos" => getrank($_GET['edit']), "nothing" => _nothing, "listck" => empty($get['listck']) ? '' : ' checked="checked"', "clankasse" => _user_list_ck, "auth_info" => _admin_user_clanhead_info, "alvl" => $get['level'], "elevel" => $elevel, "level_info" => _level_info, "gallery" => _admin_user_gallery, "yes" => _yes, "no" => _no, "cw_info" => _cw_info, "edithead" => _admin_user_edithead, "personalhead" => _admin_user_personalhead, "squadhead" => _admin_user_squadhead, "clanhead" => _admin_user_clanhead, "nick" => _nick, "email" => _email, "loginname" => _loginname, "identitat" => _admin_user_identitat, "get" => $get_identy, "squad" => _member_admin_squad, "newsletter" => _member_admin_newsletter, "downloads" => _member_admin_downloads, "links" => _member_admin_links, "votes" => _member_admin_votes, "votesadmin" => _member_admin_votesadmin, "gb" => _member_admin_gb, "forum" => _member_admin_forum, "intnews" => _member_admin_intnews, "intforum" => _member_admin_intforums, "i_forum" => $i_forum, "forums" => _forum, "access" => _access, "news" => _member_admin_news, "clanwars" => _member_admin_clanwars, "posi" => _profil_position, "level" => _admin_user_level, "ck" => _admin_user_clankasse, "sl" => _admin_user_serverliste, "eu" => _admin_user_edituser, "et" => _admin_user_edittactics, "esq" => _admin_user_editsquads, "eserver" => _admin_user_editserver, "ek" => _admin_user_editkalender)); }
$check_user = db("SELECT id FROM " . $db['users'] . "\n\t\t\t\t\t\t\t\t\t\t\tWHERE user = '******'user'] . "'"); $check_nick = db("SELECT id FROM " . $db['users'] . "\n\t\t\t\t\t\t\t\t\t\t\tWHERE nick = '" . $_POST['nick'] . "'"); $check_email = db("SELECT id FROM " . $db['users'] . "\n\t\t\t\t\t\t\t\t\t\t\t WHERE email = '" . $_POST['email'] . "'"); if (empty($_POST['user'])) { $show = error(_empty_user, 1); } elseif (empty($_POST['nick'])) { $show = error(_empty_nick, 1); } elseif (empty($_POST['email'])) { $show = error(_empty_email, 1); } elseif (!check_email($_POST['email'])) { $show = error(_error_invalid_email, 1); } elseif (_rows($check_user)) { $show = error(_error_user_exists, 1); } elseif (_rows($check_nick)) { $show = error(_error_nick_exists, 1); } elseif (_rows($check_email)) { $show = error(_error_email_exists, 1); } else { if (empty($_POST['pwd'])) { $mkpwd = mkpwd(); } else { $mkpwd = $_POST['pwd']; } $pwd = md5($mkpwd); if ($_POST['t'] && $_POST['m'] && $_POST['j']) { $bday = cal($_POST['t']) . "." . cal($_POST['m']) . "." . $_POST['j']; } $qry = db("INSERT INTO " . $db['users'] . "\n\t\t\t\t\t\t\t SET `user` = '" . $_POST['user'] . "',\n\t\t\t\t\t\t\t\t `nick` = '" . $_POST['nick'] . "',\n\t\t\t\t\t\t\t\t `email` = '" . $_POST['email'] . "',\n\t\t\t\t\t\t\t\t `pwd` = '" . $pwd . "',\n\t\t\t\t\t\t\t\t `rlname` = '" . $_POST['rlname'] . "',\n\t\t\t\t\t\t\t\t `sex` = '" . (int) $_POST['sex'] . "',\n\t\t\t\t\t\t\t\t `bday` = '" . $bday . "',\n\t\t\t\t\t\t\t\t `city` = '" . $_POST['city'] . "',\n\t\t\t\t\t\t\t\t `country` = '" . $_POST['land'] . "',\n\t\t\t\t\t\t\t\t `regdatum` = '" . (int) time() . "',\n\t\t\t\t\t\t\t\t `level` = '" . (int) $_POST['level'] . "',\n\t\t\t\t\t\t\t\t `time` = '" . time() . "',\n\t\t\t\t\t\t\t\t `gmaps_koord` = '" . up($_POST['gmaps_koord']) . "',\n\t\t\t\t\t\t\t\t `status` = '1'"); $insert_id = mysql_insert_id(); $protocol = "createuser(" . $_SESSION['id'] . "_" . $insert_id . ")"; $upd = db("INSERT INTO " . $db['ipcheck'] . "\n SET `ip` = '" . $userip . "',\n `what` = '" . $protocol . "',\n `time` = '" . (int) time() . "'");
/** * DZCP - deV!L`z ClanPortal 1.6 Final * http://www.dzcp.de * Menu: Kalender */ function kalender($month = "", $year = "") { global $db, $sql_prefix; if (!empty($month) && !empty($year)) { $monat = cal($month); $jahr = $year; } else { $monat = date("m"); $jahr = date("Y"); } for ($i = 1; $i <= 12; $i++) { $mname = array("1" => _jan, "2" => _feb, "3" => _mar, "4" => _apr, "5" => _mai, "6" => _jun, "7" => _jul, "8" => _aug, "9" => _sep, "10" => _okt, "11" => _nov, "12" => _dez); if ($monat == $i) { $month = $mname[$i]; } } $today = mktime(0, 0, 0, date("n"), date("d"), date("Y")); $i = 1; $show = ''; while ($i <= 31 && checkdate($monat, $i, $jahr)) { $data = ''; $event = ''; $bdays = ''; $cws = ''; for ($iw = 1; $iw <= 7; $iw++) { unset($titlecw); unset($titlebd); unset($titleev); $datum = mktime(0, 0, 0, $monat, $i, $jahr); $wday = getdate($datum); $wday = $wday['wday']; if (!$wday) { $wday = 7; } if ($wday != $iw) { $data .= "<td class=\"navKalEmpty\"></td>"; } else { $titlebd = ''; $bdays = ""; $qry = db("SELECT id,bday FROM " . $db['users'] . " WHERE bday LIKE '" . cal($i) . "." . $monat . ".____" . "'"); if (_rows($qry)) { while ($get = _fetch($qry)) { $bdays = "set"; $titlebd .= '<img src=../inc/images/bday.gif class=icon alt= />' . ' ' . jsconvert(_kal_birthday . rawautor($get['id'])) . '<br />'; } } $cws = ""; $titlecw = ""; $qry = db("SELECT datum,gegner FROM " . $db['cw'] . " WHERE DATE_FORMAT(FROM_UNIXTIME(datum), '%d.%m.%Y') = '" . cal($i) . "." . $monat . "." . $jahr . "'"); if (_rows($qry)) { while ($get = _fetch($qry)) { $cws = "set"; $titlecw .= '<img src=../inc/images/cw.gif class=icon alt= />' . ' ' . jsconvert(_kal_cw . re($get['gegner'])) . '<br />'; } } $event = ""; $titleev = ""; $qry = db("SELECT s1.*, s2.name as katname FROM " . $sql_prefix . "events_info as s1 JOIN " . $sql_prefix . "events_kat as s2\n WHERE s1.kat = s2.id AND DATE_FORMAT(FROM_UNIXTIME(start), '%d.%m.%Y') <= '" . cal($i) . "." . $monat . "." . $jahr . "' AND DATE_FORMAT(FROM_UNIXTIME(ende), '%d.%m.%Y') >= '" . cal($i) . "." . $monat . "." . $jahr . "' AND s1.show = 1"); if (_rows($qry)) { while ($get = _fetch($qry)) { $pfadbild = "inc/images/eventkat/" . $get['kat']; if (file_exists(basePath . "/" . $pfadbild . ".gif")) { $bild = '<img src=../' . $pfadbild . '.gif class=icon alt= />'; } elseif (file_exists(basePath . "/" . $pfadbild . ".jpg")) { $bild = '<img src=../' . $pfadbild . '.jpg class=icon alt= />'; } elseif (file_exists(basePath . "/" . $pfadbild . ".png")) { $bild = '<img src=../' . $pfadbild . '.png class=icon alt= />'; } else { $bild = "<img src=../inc/images/event.gif class=icon alt= />"; } $event = "set"; $titleev .= '<tr><td>' . $bild . jsconvert(re($get['katname']) . ': ' . re($get['name'])) . '</td></tr>'; } } $info = 'onmouseover="DZCP.showInfo(\'' . cal($i) . '.' . $monat . '.' . $jahr . '\', \'' . $titlebd . $titlecw . $titleev . '\')" onmouseout="DZCP.hideInfo()"'; if ($event == "set" || $cws == "set" || $bdays == "set") { $day = '<a class="navKal" href="../kalender/?m=' . $monat . '&y=' . $jahr . '&hl=' . $i . '" ' . $info . '>' . cal($i) . '</a>'; } else { $day = cal($i); } if (!checkdate($monat, $i, $jahr)) { $data .= '<td class="navKalEmpty"></td>'; } elseif ($datum == $today) { $data .= show("menu/kal_day", array("day" => $day, "id" => "navKalToday")); } else { $data .= show("menu/kal_day", array("day" => $day, "id" => "navKalDays")); } $i++; } } $show .= "<tr>" . $data . "</tr>"; } if ($monat + 1 == 13) { $nm = 1; $ny = $jahr + 1; } else { $nm = $monat + 1; $ny = $jahr; } if ($monat - 1 == 0) { $lm = 12; $ly = $jahr - 1; } else { $lm = $monat - 1; $ly = $jahr; } $kalender = show("menu/kalender", array("monat" => $month, "show" => $show, "year" => $jahr, "nm" => $nm, "ny" => $ny, "lm" => $lm, "ly" => $ly, "montag" => _nav_montag, "dienstag" => _nav_dienstag, "mittwoch" => _nav_mittwoch, "donnerstag" => _nav_donnerstag, "freitag" => _nav_freitag, "samstag" => _nav_samstag, "sonntag" => _nav_sonntag)); return '<div id="navKalender">' . $kalender . '</div>'; }
## OUTPUT BUFFER START ## include "../inc/buffer.php"; ## INCLUDES ## include basePath . "/inc/config.php"; include basePath . "/inc/bbcode.php"; ## SETTINGS ## $time_start = generatetime(); lang($language); $where = "Installer"; $title = $pagetitle . " - " . $where . ""; ## INSTALLER ## if (isset($_POST['submit'])) { $qry = db("CREATE TABLE " . $sql_prefix . "klicks (`wo` varchar(64) NOT NULL,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`klicks` int(32) NOT NULL,\n\t\t\t\t\t\t\t\t\t\t\t\t\tPRIMARY KEY (`wo`))"); $qry = db("SELECT * FROM " . $sql_prefix . "klicks"); if (_rows($qry) == '0') { $show = '<tr> <td class="contentHead"><span class="fontGreen"><b>Installation erfolgreich!</b></span></td> </tr> <tr> <td class="contentMainFirst" align="center"> Die benötigten Tabellen konnten erfolgreich erstellt werden.<br> <br> <b>Lösche unbedingt den installer-Ordner!</b> </td> </tr> <tr> <td class="contentBottom"></td> </tr>'; } else { $show = '<tr>
} else { $sticky = ""; } if ($get['closed'] == 1) { $closed = _closedicon; } else { $closed = ""; } $cntpage = cnt($db['f_posts'], " WHERE sid = " . $get['id']); if ($cntpage == 0) { $pagenr = 1; } else { $pagenr = ceil($cntpage / $maxfposts); } $qrylp = db("SELECT date,nick,reg,email FROM " . $db['f_posts'] . "\n WHERE sid = '" . $get['id'] . "'\n ORDER BY date DESC"); if (_rows($qrylp)) { $getlp = _fetch($qrylp); $lpost = show(_forum_thread_lpost, array("nick" => autor($getlp['reg'], '', $getlp['nick'], $getlp['email']), "date" => date("d.m.y H:i", $getlp['date']) . _uhr)); $lpdate = $getlp['date']; } else { $lpost = "-"; $lpdate = ""; } $threadlink = show(_forum_thread_search_link, array("topic" => cut(re($get['topic']), $lforumtopic), "id" => $get['id'], "sticky" => $sticky, "hl" => $_GET['search'], "closed" => $closed, "lpid" => $cntpage + 1, "page" => $pagenr)); $class = $color % 2 ? "contentMainSecond" : "contentMainFirst"; $color++; $results .= show($dir . "/forum_search_results", array("new" => check_new($get['lp']), "topic" => $threadlink, "subtopic" => cut(re($get['subtopic']), $lforumsubtopic), "hits" => $get['hits'], "replys" => cnt($db['f_posts'], " WHERE sid = '" . $get['id'] . "'"), "class" => $class, "lpost" => $lpost, "autor" => autor($get['t_reg'], '', $get['t_nick'], $get['t_email']))); } } $nav = nav($entrys, $maxfsearch, $getstr); $show = show($dir . "/forum_search_show", array("head" => _forum_search_results, "autor" => _autor, "thread" => _forum_thread, "lpost" => _forum_lpost, "nav" => $nav, "results" => $results, "replys" => _forum_replys, "hits" => _hits));
for ($i = 3; $i <= 10; $i++) { if (!empty($_POST['a' . $i . ''])) { if (cnt($db['vote_results'], " WHERE vid = '" . intval($_GET['id']) . "' AND what = 'a" . $i . "'") != 0) { $upd = db("UPDATE " . $db['vote_results'] . "\n SET `sel` = '" . up($_POST['a' . $i . '']) . "'\n WHERE what = 'a" . $i . "'\n AND vid = '" . intval($_GET['id']) . "'"); } else { $ins = db("INSERT INTO " . $db['vote_results'] . "\n SET `vid` = '" . $_GET['id'] . "',\n `what` = 'a" . $i . "',\n `sel` = '" . up($_POST['a' . $i . '']) . "'"); } } if (cnt($db['vote_results'], " WHERE vid = '" . intval($_GET['id']) . "' AND what = 'a" . $i . "'") != 0 && empty($_POST['a' . $i . ''])) { $del = db("DELETE FROM " . $db['vote_results'] . "\n WHERE vid = '" . intval($_GET['id']) . "'\n AND what = 'a" . $i . "'"); } } $show = info(_vote_admin_successful_edited, "?admin=votes"); } elseif ($_GET['do'] == "menu") { $qryv = db("SELECT intern FROM " . $db['votes'] . "\n WHERE id = '" . intval($_GET['id']) . "'\n AND intern = 1"); if (_rows($qryv)) { $show = error(_vote_admin_menu_isintern, 1); } else { $qrys = db("SELECT * FROM " . $db['votes'] . "\n WHERE id = '" . intval($_GET['id']) . "'"); $get = _fetch($qrys); if ($get['menu'] == 1) { $qry = db("UPDATE " . $db['votes'] . "\n SET menu = '0'"); header("Location: ?admin=votes"); } else { $qry = db("UPDATE " . $db['votes'] . "\n SET menu = '0'"); $qry = db("UPDATE " . $db['votes'] . "\n SET menu = '1'\n WHERE id = '" . intval($_GET['id']) . "'"); header("Location: ?admin=votes"); } } } else { $qry = db("SELECT * FROM " . $db['votes'] . "\n\t\t WHERE forum = 0\n ORDER BY datum DESC");
$index = show("page/comments_add", array("titel" => _comments_edit, "nickhead" => _nick, "bbcodehead" => _bbcode, "emailhead" => _email, "sec" => $dir, "security" => _register_confirm, "hphead" => _hp, "b1" => $u_b1, "b2" => $u_b2, "form" => $form, "preview" => _preview, "prevurl" => '../artikel/?action=compreview&id=' . $_GET['id'], "action" => '?action=show&w=k&do=editcom&id=' . $_GET['id'] . '&cid=' . $_GET['cid'], "ip" => _iplog_info, "lang" => $language, "id" => $_GET['id'], "what" => _button_value_edit, "show" => "", "posteintrag" => re_bbcode($getc['comment']), "error" => "", "eintraghead" => _eintrag)); } else { $index = error(_error_edit_post, 1); } } //ende //$inhalt = "Kommentar-Baustelle".$entrys.""; //############################################################################# //############################################################################' // # # # # # # # } else { $inhalt = bbcode($get['beschreibung']); } // # # # # # # # $teilnehmer = db("SELECT uid FROM " . $sql_prefix . "events_user WHERE eid = '" . $get['id'] . "'"); $teilnehmer = _rows($teilnehmer); if ($get['veranstalter'] != '') { $veranstalter = $get['veranstalter'] . " (eingestellt von " . autor($get['autor_id']) . ")"; } else { $veranstalter = autor($get['autor_id']); } if ($get['gmaps'] == '1') { $ort = "<a target='_blank' href='http://maps.google.de/maps?q=" . $get['ort'] . "'>" . $get['ort'] . "</a>"; } else { $ort = $get['ort']; } // BILD $pfadbild = "event/img/" . $_GET['id']; if (file_exists(basePath . "/" . $pfadbild . ".gif")) { $bild = "<img src=\"../" . $pfadbild . ".gif\" style=\"max-width:350px;max-height:400px\" alt=\"\" />"; } elseif (file_exists(basePath . "/" . $pfadbild . ".jpg")) {
$posi = db("UPDATE " . $db['navi'] . "\n\t\t\t\t\t\t\t\t\t\t\t\t\tSET pos = pos+1\n\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE pos " . $sign . " '" . intval($pos) . "'"); $posi = db("UPDATE " . $db['navi'] . "\n\t\t\t\t\t\t\t\t\t\t\t\t\tSET `pos` = '" . (int) $pos . "',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t`kat` = '" . up($kat) . "',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t`name` = '" . up($_POST['squad']) . "',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t`url` = '../squads/?action=shows&id=" . intval($_GET['id']) . "'\n\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE id = '" . intval($get['id']) . "'"); } else { if ($_POST['navi'] == "1" || "2") { $signnav = ">= "; } else { $signnav = "> "; } $kat = preg_replace('/-(\\d+)/', '', $_POST['navi']); $pos = preg_replace("=nav_(.*?)-=", "", $_POST['navi']); db("UPDATE " . $db['navi'] . " SET `pos` = pos+1 WHERE pos " . $signnav . " '" . intval($pos) . "'"); db("INSERT INTO " . $db['navi'] . "\n\t\t\t\t\t\t\t\t\tSET `pos` = '" . (int) $pos . "',\n\t\t\t\t\t\t\t\t\t\t\t`kat` = '" . up($kat) . "',\n\t\t\t\t\t\t\t\t\t\t\t`name` = '" . up($_POST['squad']) . "',\n\t\t\t\t\t\t\t\t\t\t\t`url` = '../squads/?action=shows&id=" . intval($_GET['id']) . "',\n\t\t\t\t\t\t\t\t\t\t\t`shown` = '1',\n\t\t\t\t\t\t\t\t\t\t\t`type` = '2'"); } } else { $qry = db("SELECT * FROM " . $db['navi'] . " WHERE url = '../squads/?action=shows&id=" . intval($_GET['id']) . "'"); if (_rows($qry)) { db("DELETE FROM " . $db['navi'] . " WHERE url = '../squads/?action=shows&id=" . intval($_GET['id']) . "'"); } } $tmp = $_FILES['banner']['tmp_name']; $type = $_FILES['banner']['type']; $end = explode(".", $_FILES['banner']['name']); $end = strtolower($end[count($end) - 1]); if (!empty($tmp)) { foreach ($picformat as $end1) { $img = getimagesize($tmp); if (file_exists(basePath . '/inc/images/squads/' . intval($_GET['id']) . '.' . $end1)) { @unlink(basePath . '/inc/images/squads/' . intval($_GET['id']) . '.' . $end1); break; } }
} elseif (substr($xy, 0, 6) == "UNIQUE") { $def .= " UNIQUE " . substr($xy, 7) . " (" . implode($columns, ", ") . ")"; } else { $def .= " KEY {$xy} (" . implode($columns, ", ") . ")"; } } $def .= "\r\n);\r\n\r\n"; $tabelle = "" . $tabelle; $txt = "#\r\n# Struktur der Tabelle `{$tabelle}`\r\n#\r\n\r\n"; $fd = fopen($file_name, "a+"); fwrite($fd, $txt . $def); fclose($fd); unset($data); if ($tabelle > "") { $qry_i = db("SELECT * FROM {$tabelle}"); $anzahl = _rows($qry_i); $spaltenzahl = mysql_num_fields($qry_i); for ($i = 0; $i < $anzahl; $i++) { $zeile = mysql_fetch_array($qry_i); $data .= "INSERT INTO {$tabelle} ("; for ($spalte = 0; $spalte < $spaltenzahl; $spalte++) { $feldname = mysql_field_name($qry_i, $spalte); if ($spalte == $spaltenzahl - 1) { $data .= $feldname; } else { $data .= $feldname . ","; } } $data .= ") VALUES ("; for ($k = 0; $k < $spaltenzahl; $k++) { if ($k == $spaltenzahl - 1) {