コード例 #1
0
ファイル: vote.php プロジェクト: nopuls/dzcp
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>');
}
コード例 #2
0
ファイル: navi.php プロジェクト: nopuls/dzcp
function navi($kat)
{
    global $db, $chkMe, $userid, $designpath;
    if ($k = _fetch(db("SELECT `level` FROM " . $db['navi_kats'] . " WHERE `placeholder` = '" . up($kat) . "'"))) {
        $intern = $chkMe >= 2 ? '' : " AND s1.`internal` = '0'";
        $permissions = $kat == 'nav_admin' && admin_perms($userid) ? "" : $intern . " AND " . intval($chkMe) . " >= '" . intval($k['level']) . "'";
        $qry = db("SELECT s1.* FROM " . $db['navi'] . " AS s1 LEFT JOIN " . $db['navi_kats'] . " AS s2 ON s1.kat = s2.placeholder\n                 WHERE s1.kat = '" . up($kat) . "' AND s1.`shown` = '1' " . $permissions . "\n                 ORDER BY s1.pos");
        while ($get = _fetch($qry)) {
            if ($get['type'] == 0) {
                $link = '';
            } elseif ($get['type'] == 1 || $get['type'] == 2 || $get['type'] == 3) {
                $name = $get['wichtig'] == 1 ? '<span class="fontWichtig">' . navi_name(re($get['name'])) . '</span>' : navi_name(re($get['name']));
                $target = $get['target'] == 1 ? '_blank' : '_self';
                if (file_exists($designpath . '/menu/' . $get['kat'] . '.html')) {
                    $link = show("menu/" . $get['kat'] . "", array("target" => $target, "href" => re($get['url']), "title" => strip_tags($name), "css" => ucfirst(str_replace('nav_', '', re($get['kat']))), "link" => $name));
                } else {
                    $link = show("menu/nav_link", array("target" => $target, "href" => re($get['url']), "title" => strip_tags($name), "css" => ucfirst(str_replace('nav_', '', re($get['kat']))), "link" => $name));
                }
                $table = strstr($link, '<tr>') ? true : false;
            }
            $navi .= $link;
        }
    }
    return empty($navi) ? '' : ($table ? '<table class="navContent" cellspacing="0">' . $navi . '</table>' : $navi);
}
コード例 #3
0
ファイル: ftopics.php プロジェクト: nopuls/dzcp
function ftopics()
{
    global $db, $maxftopics, $lftopics, $maxfposts, $allowHover;
    $f = 0;
    $qry = db("SELECT s1.*,s2.id AS subid FROM " . $db['f_threads'] . " s1, " . $db['f_skats'] . " s2, " . $db['f_kats'] . " s3\n               WHERE s1.kid = s2.id AND s2.sid = s3.id ORDER BY s1.lp DESC LIMIT 100");
    while ($get = _fetch($qry)) {
        if ($f == $maxftopics) {
            break;
        }
        if (fintern($get['kid'])) {
            $lp = cnt($db['f_posts'], " WHERE sid = '" . $get['id'] . "'");
            $pagenr = ceil($lp / $maxfposts);
            if ($pagenr == 0) {
                $page = 1;
            } else {
                $page = $pagenr;
            }
            if ($allowHover == 1) {
                $info = 'onmouseover="DZCP.showInfo(\'<tr><td colspan=2 align=center padding=3 class=infoTop>' . jsconvert(re($get['topic'])) . '</td></tr><tr><td><b>' . _forum_posts . ':</b></td><td>' . $lp . '</td></tr><tr><td><b>' . _forum_lpost . ':</b></td><td>' . date("d.m.Y H:i", $get['lp']) . _uhr . '</td></tr>\')" onmouseout="DZCP.hideInfo()"';
            }
            $ftopics .= show("menu/forum_topics", array("id" => $get['id'], "pagenr" => $page, "p" => $lp + 1, "titel" => cut(re($get['topic']), $lftopics), "info" => $info, "kid" => $get['kid']));
            $f++;
        }
    }
    return empty($ftopics) ? '' : '<table class="navContent" cellspacing="0">' . $ftopics . '</table>';
}
コード例 #4
0
ファイル: fvote.php プロジェクト: nopuls/dzcp
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>');
}
コード例 #5
0
function top_match()
{
    global $db, $allowHover, $llwars, $picformat, $sql_prefix;
    $qry = db("SELECT s1.datum,s1.cid,s1.id,s1.bericht,s1.xonx,s1.punkte,s1.gpunkte,s1.squad_id,s2.icon,s2.name FROM " . $db['cw'] . " AS s1\n             LEFT JOIN " . $db['squads'] . " AS s2 ON s1.squad_id = s2.id\n             WHERE `top` = '1'\n             ORDER BY RAND()");
    if ($get = _fetch($qry)) {
        //Clans Mod
        $clandetailssql = db("SELECT clantag, gegner FROM " . $sql_prefix . "clans WHERE id LIKE " . $get['cid']);
        $clans = _fetch($clandetailssql);
        $squad = '_defaultlogo.jpg';
        $gegner = '_defaultlogo.jpg';
        foreach ($picformat as $end) {
            if (file_exists(basePath . '/inc/images/clanwars/' . $get['cid'] . '_logo.' . $end)) {
                $gegner = $get['cid'] . '_logo.' . $end;
            }
            if (file_exists(basePath . '/inc/images/squads/' . $get['squad_id'] . '_logo.' . $end)) {
                $squad = $get['squad_id'] . '_logo.' . $end;
            }
        }
        if ($allowHover == 1 || $allowHover == 2) {
            $hover = 'onmouseover="DZCP.showInfo(\'<tr><td colspan=2 align=center padding=3 class=infoTop>' . jsconvert(re($get['name'])) . '<br/>vs.<br/> ' . jsconvert(re($clans['gegner'])) . '</td></tr><tr><td><b>' . _played_at . ':</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>' . _result . ':</b></td><td>' . cw_result_nopic_raw($get['punkte'], $get['gpunkte']) . '</td></tr><tr><td><b>' . _comments_head . ':</b></td><td>' . cnt($db['cw_comments'], "WHERE cw = '" . $get['id'] . "'") . '</td></tr>\')" onmouseout="DZCP.hideInfo()"';
        }
        $topmatch .= show("menu/top_match", array("id" => $get['id'], "clantag" => re(cut($clans['clantag'], $llwars)), "team" => re(cut($get['name'], $llwars)), "game" => substr(strtoupper(str_replace('.' . $icon, '', re($get['icon']))), 0, 5), "id" => $get['id'], "gegner" => $gegner, "squad" => $squad, "hover" => $hover, "info" => $get['datum'] > time() ? date("d.m.Y", $get['datum']) : cw_result_nopic($get['punkte'], $get['gpunkte'])));
    }
    return empty($topmatch) ? '<center style="margin:3px 0">' . _no_top_match . '</center>' : '<table class="navContent" cellspacing="0">' . $topmatch . '</table>';
}
コード例 #6
0
ファイル: l_reg.php プロジェクト: nopuls/dzcp
function l_reg()
{
    global $db, $llreg, $maxlreg;
    $qry = db("SELECT id,nick,country,regdatum FROM " . $db['users'] . "\n               ORDER BY regdatum DESC\n               LIMIT " . $maxlreg . "");
    while ($get = _fetch($qry)) {
        $lreg .= show("menu/last_reg", array("nick" => re(cut($get['nick'], $llreg)), "country" => flag($get['country']), "reg" => date("d.m.", $get['regdatum']), "id" => $get['id']));
    }
    return empty($lreg) ? '' : '<table class="navContent" cellspacing="0">' . $lreg . '</table>';
}
コード例 #7
0
ファイル: rotationsbanner.php プロジェクト: nopuls/dzcp
function rotationsbanner()
{
    global $db;
    $qry = db("SELECT * FROM " . $db['sponsoren'] . "\n\t\t\t         WHERE banner = 1 ORDER BY RAND() LIMIT 1");
    while ($get = _fetch($qry)) {
        $rotationbanner .= show(_sponsors_bannerlink, array("id" => $get['id'], "title" => htmlspecialchars(str_replace('http://', '', re($get['link']))), "banner" => empty($get['blink']) ? "../banner/sponsors/banner_" . $get['id'] . "." . $get['bend'] : re($get['blink'])));
    }
    return empty($rotationbanner) ? '' : $rotationbanner;
}
コード例 #8
0
ファイル: sponsors.php プロジェクト: nopuls/dzcp
function sponsors()
{
    global $db;
    $qry = db("SELECT * FROM " . $db['sponsoren'] . " WHERE box = 1 ORDER BY pos");
    while ($get = _fetch($qry)) {
        $banner = show(_sponsors_bannerlink, array("id" => $get['id'], "title" => htmlspecialchars(str_replace('http://', '', re($get['link']))), "banner" => empty($get['xlink']) ? "../banner/sponsors/box_" . $get['id'] . "." . $get['xend'] : re($get['xlink'])));
        $sponsors .= show("menu/sponsors", array("banner" => $banner));
    }
    return empty($sponsors) ? '' : '<table class="navContent" cellspacing="0">' . $sponsors . '</table>';
}
コード例 #9
0
ファイル: re.php プロジェクト: uaBirder/SRA
function testre($title, $expression, $target, $expected)
{
    $result = re($expression, $target, $expected);
    if ($result == $expected) {
        echo "Test '{$title}' [{$expression}] - OK\n";
    } else {
        echo "Test '{$title}' [{$expression}] - FAILED\n";
        echo "Expected: [" . print_r($expected, 1) . "]\n";
        echo "Got: [" . print_r($result, 1) . "]\n";
        echo "\n";
    }
}
コード例 #10
0
ファイル: l_wars.php プロジェクト: nopuls/dzcp
function l_wars()
{
    global $db, $maxlwars, $llwars, $allowHover;
    $qry = db("SELECT s1.datum,s1.gegner,s1.id,s1.bericht,s1.xonx,s1.clantag,s1.punkte,s1.gpunkte,s1.squad_id,s2.icon,s2.name FROM " . $db['cw'] . " AS s1\n             LEFT JOIN " . $db['squads'] . " AS s2 ON s1.squad_id = s2.id\n             WHERE datum < " . time() . "\n             ORDER BY datum DESC\n             LIMIT " . $maxlwars . "");
    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>' . _played_at . ':</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>' . _result . ':</b></td><td>' . cw_result_nopic_raw($get['punkte'], $get['gpunkte']) . '</td></tr><tr><td><b>' . _comments_head . ':</b></td><td>' . cnt($db['cw_comments'], "WHERE cw = '" . $get['id'] . "'") . '</td></tr>\')" onmouseout="DZCP.hideInfo()"';
        }
        $lwars .= show("menu/last_wars", array("id" => $get['id'], "clantag" => re(cut($get['clantag'], $llwars)), "icon" => re($get['icon']), "info" => $info, "result" => cw_result_pic($get['punkte'], $get['gpunkte'])));
    }
    return empty($lwars) ? '' : '<table class="navContent" cellspacing="0">' . $lwars . '</table>';
}
コード例 #11
0
ファイル: top_dl.php プロジェクト: nopuls/dzcp
function top_dl()
{
    global $db, $maxtopdl, $ltopdl, $allowHover;
    $qry = db("SELECT * FROM " . $db['downloads'] . " ORDER BY hits DESC\n             LIMIT " . $maxtopdl . "");
    while ($get = _fetch($qry)) {
        if ($allowHover == 1) {
            $getkat = _fetch(db("SELECT name FROM " . $db['dl_kat'] . " WHERE id = '" . $get['kat'] . "'"));
            $info = 'onmouseover="DZCP.showInfo(\'<tr><td colspan=2 align=center padding=3 class=infoTop>' . jsconvert(re($get['download'])) . '</td></tr><tr><td><b>' . _datum . ':</b></td><td>' . date("d.m.Y H:i", $get['date']) . _uhr . '</td></tr><tr><td><b>' . _dl_dlkat . ':</b></td><td>' . jsconvert(re($getkat['name'])) . '</td></tr><tr><td><b>' . _hits . ':</b></td><td>' . $get['hits'] . '</td></tr>\')" onmouseout="DZCP.hideInfo()"';
        }
        $top_dl .= show("menu/top_dl", array("id" => $get['id'], "titel" => cut(re($get['download']), $ltopdl), "info" => $info, "hits" => $get['hits']));
    }
    return empty($top_dl) ? '' : '<table class="navContent" cellspacing="0">' . $top_dl . '</table>';
}
コード例 #12
0
ファイル: partners.php プロジェクト: nopuls/dzcp
function partners()
{
    global $db;
    $qry = db("SELECT * FROM " . $db['partners'] . " ORDER BY `textlink` ASC, `id` DESC");
    while ($get = _fetch($qry)) {
        if ($get['textlink'] == 1) {
            $partners .= show("menu/partners_textlink", array("link" => $get['link'], "name" => re($get['banner'])));
        } else {
            $partners .= show("menu/partners", array("link" => re($get['link']), "title" => htmlspecialchars(str_replace('http://', '', re($get['link']))), "banner" => re($get['banner'])));
        }
        $table = strstr($partners, '<tr>') ? true : false;
    }
    return empty($partners) ? '' : ($table ? '<table class="navContent" cellspacing="0">' . $partners . '</table>' : $partners);
}
コード例 #13
0
ファイル: n_wars.php プロジェクト: nopuls/dzcp
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>';
}
コード例 #14
0
ファイル: team.php プロジェクト: nopuls/dzcp
function team($tID = '')
{
    global $db, $teamRow, $l_team;
    //SQL
    if (!empty($tID)) {
        $where = "WHERE id = '" . intval($tID) . "' AND navi = 1";
    } else {
        $where = "WHERE navi = '1' ORDER BY RAND()";
    }
    $get = _fetch(db("SELECT * FROM " . $db['squads'] . " " . $where . ""));
    //Members
    $qrym = db("SELECT s1.squad,s2.id,s2.level,s2.nick,s2.status,s2.rlname,s2.bday,s4.position\n                FROM " . $db['squaduser'] . " AS s1\n                LEFT JOIN " . $db['users'] . " AS s2\n                ON s2.id=s1.user\n                LEFT JOIN " . $db['userpos'] . " AS s3\n                ON s3.squad=s1.squad AND s3.user=s1.user\n                LEFT JOIN " . $db['pos'] . " AS s4\n                ON s4.id=s3.posi\n                WHERE s1.squad='" . $get['id'] . "'\n                AND s2.level != 0\n                ORDER BY s4.pid");
    $i = 1;
    $cnt = 0;
    while ($getm = _fetch($qrym)) {
        unset($tr1, $tr2);
        if ($i == 0 || $i == 1) {
            $tr1 = "<tr>";
        }
        if ($i == $teamRow) {
            $tr2 = "</tr>";
            $i = 0;
        }
        $status = $getm['status'] == 1 || $getm['level'] == 1 ? _aktiv : _inaktiv;
        $info = 'onmouseover="DZCP.showInfo(\'<tr><td colspan=2 align=center padding=3 class=infoTop>' . rawautor($getm['id']) . '</td></tr><tr><td width=80px><b>' . _posi . ':</b></td><td>' . getrank($getm['id'], $get['id']) . '</td></tr><tr><td><b>' . _status . ':</b></td><td>' . $status . '</td></tr><tr><td><b>' . _age . ':</b></td><td>' . getAge($getm['bday']) . '</td></tr><tr><td colspan=2 align=center>' . jsconvert(userpic($getm['id'])) . '</td></tr>\')" onmouseout="DZCP.hideInfo()"';
        $member .= show("menu/team_show", array("pic" => userpic($getm['id'], 40, 50), "tr1" => $tr1, "tr2" => $tr2, "squad" => $get['id'], "info" => $info, "id" => $getm['id'], "width" => round(100 / $teamRow, 0)));
        $i++;
        $cnt++;
    }
    if (is_float($cnt / $teamRow)) {
        for ($e = $i; $e <= $teamRow; $e++) {
            $end .= '<td></td>';
        }
        $end = $end . "</tr>";
    }
    // Next / last ID
    $all = cnt($db['squads'], "WHERE `navi` = '1'");
    $next = _fetch(db("SELECT id FROM " . $db['squads'] . " WHERE `navi` = '1' AND `id` > '" . $get['id'] . "' ORDER BY `id` ASC LIMIT 1"));
    if (empty($next)) {
        $next = _fetch(db("SELECT id FROM " . $db['squads'] . " WHERE `navi` = '1' ORDER BY `id` ASC LIMIT 1"));
    }
    $last = _fetch(db("SELECT id FROM " . $db['squads'] . " WHERE `navi` = '1' AND `id` < '" . $get['id'] . "' ORDER BY `id` DESC LIMIT 1"));
    if (empty($last)) {
        $last = _fetch(db("SELECT id FROM " . $db['squads'] . " WHERE `navi` = '1' ORDER BY `id` DESC LIMIT 1"));
    }
    //Output
    $team = show("menu/team", array("row" => $teamRow, "team" => re($get['name']), "id" => $get['id'], "next" => $next['id'], "last" => $last['id'], "br1" => $all <= 1 ? '<!--' : '', "br2" => $all <= 1 ? '-->' : '', "member" => $member, "end" => $end));
    return '<div id="navTeam">' . $team . '</div>';
}
コード例 #15
0
ファイル: newsticker.php プロジェクト: nopuls/dzcp
function newsticker()
{
    global $db, $allowHover;
    if (!permission("intnews")) {
        $int = "AND intern = 0";
    }
    $qry = db("SELECT id,titel,autor,datum,kat FROM " . $db['news'] . " WHERE public = '1'AND datum <= '" . time() . "' " . $int . " ORDER BY id DESC LIMIT 20");
    while ($get = _fetch($qry)) {
        if ($allowHover == 1) {
            $getkat = _fetch(db("SELECT kategorie FROM " . $db['newskat'] . " WHERE id = '" . $get['kat'] . "'"));
            $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['newscomments'], "WHERE news = '" . $get['id'] . "'") . '</td></tr>\')" onmouseout="DZCP.hideInfo()"';
        }
        $news .= '<a href="../news/?action=show&amp;id=' . $get['id'] . '" ' . $info . '>' . re($get['titel']) . '</a> | ';
    }
    return show("menu/newsticker", array("news" => $news));
}
コード例 #16
0
ファイル: random_gallery.php プロジェクト: nopuls/dzcp
function random_gallery()
{
    global $db;
    $imgArr = array();
    $files = get_files('../gallery/images/');
    $get = _fetch(db("SELECT * FROM " . $db['gallery'] . " ORDER BY RAND()"));
    foreach ($files as $file) {
        if (intval($file) == $get['id']) {
            array_push($imgArr, $file);
        }
    }
    shuffle($imgArr);
    if (!empty($imgArr[0])) {
        $gallery = show("menu/random_gallery", array("image" => $imgArr[0], "id" => $get['id'], "kat" => re($get['kat'])));
    }
    return empty($gallery) ? '' : '<table class="navContent" cellspacing="0">' . $gallery . '</table>';
}
コード例 #17
0
ファイル: l_news.php プロジェクト: nopuls/dzcp
function l_news()
{
    global $db, $maxlnews, $lnews, $allowHover;
    if (!permission("intnews")) {
        $int = "AND intern = 0";
    }
    $qry = db("SELECT id,titel,autor,datum,kat,public,timeshift FROM " . $db['news'] . "\n               WHERE public = 1\n\t\t\t\t\t\t\t AND datum <= " . time() . "\n\t\t\t         " . $int . "\n               ORDER BY id DESC\n               LIMIT " . $maxlnews . "");
    while ($get = _fetch($qry)) {
        $qrykat = db("SELECT kategorie FROM " . $db['newskat'] . "\n                    WHERE id = '" . $get['kat'] . "'");
        $getkat = _fetch($qrykat);
        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['newscomments'], "WHERE news = '" . $get['id'] . "'") . '</td></tr>\')" onmouseout="DZCP.hideInfo()"';
        }
        $l_news .= show("menu/last_news", array("id" => $get['id'], "titel" => re(cut($get['titel'], $lnews)), "datum" => date("d.m.Y", $get['datum']), "info" => $info));
    }
    return empty($l_news) ? '' : '<table class="navContent" cellspacing="0">' . $l_news . '</table>';
}
コード例 #18
0
ファイル: l_artikel.php プロジェクト: nopuls/dzcp
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>';
}
コード例 #19
0
ファイル: shout.php プロジェクト: nopuls/dzcp
function shout($ajax = 0)
{
    global $db, $maxshout, $lshouttext, $lshoutnick, $shout_max_zeichen, $userid, $chkMe;
    $qry = db("SELECT * FROM " . $db['shout'] . "\n               ORDER BY id DESC LIMIT " . $maxshout . "");
    $i = 1;
    while ($get = _fetch($qry)) {
        $class = $color % 2 ? "navShoutContentFirst" : "navShoutContentSecond";
        $color++;
        if (permission("shoutbox")) {
            $delete = '<a href="../shout/?action=admin&amp;do=delete&amp;id=' . $get['id'] . '" onclick="return(DZCP.del(\'' . _confirm_del_shout . '\'))"><img src="../inc/images/delete_small.gif" title="' . _button_title_del . '" alt="' . _button_title_del . '" /></a>';
        } else {
            $delete = "";
        }
        $is_num = preg_match("#\\d#", $get['email']);
        if ($is_num && !check_email($get['email'])) {
            $nick = autor($get['email'], "navShout");
        } else {
            $nick = '<a class="navShout" href="mailto:' . eMailAddr($get['email']) . '" title="' . $get['nick'] . '">' . cut($get['nick'], $lshoutnick) . '</a>';
        }
        $show .= show("menu/shout_part", array("nick" => $nick, "datum" => date("j.m.Y H:i", $get['datum']) . _uhr, "text" => bbcode(wrap(re($get['text']), $lshouttext)), "class" => $class, "del" => $delete));
        $i++;
    }
    if (settings('reg_shout') == 1 && $chkMe == 'unlogged') {
        $dis = ' style="text-align:center;cursor:wait" disabled="disabled"';
        $dis1 = ' style="cursor:wait;color:#888" disabled="disabled"';
        $only4reg = _shout_must_reg;
    } else {
        if ($chkMe == "unlogged") {
            $form = show("menu/shout_form", array("dis" => $dis));
            $sec = show("menu/shout_antispam", array("help" => _login_secure_help, "dis" => $dis));
        } else {
            $form = autor($userid, "navShout");
        }
    }
    $add = show("menu/shout_add", array("form" => $form, "t_zeichen" => _zeichen, "noch" => _noch, "dis1" => $dis1, "dis" => $dis, "only4reg" => $only4reg, "security" => $sec, "zeichen" => $shout_max_zeichen));
    $shout = show("menu/shout", array("shout" => $show, "shoutbox" => _shoutbox_head, "archiv" => _shoutbox_archiv, "add" => $add));
    return empty($ajax) ? '<table class="navContent" cellspacing="0">' . $shout . '</table>' : $show;
}
コード例 #20
0
ファイル: squads.php プロジェクト: nopuls/dzcp
             $gameicons .= show(_select_field, array("value" => $files[$i], "sel" => $sel, "what" => strtoupper(preg_replace("#\\.(.*?)\$#", "", $files[$i]))));
         }
     }
     foreach ($picformat as $end) {
         if (file_exists(basePath . '/inc/images/squads/' . intval($_GET['id']) . '.' . $end)) {
             $image = '<img src="../inc/images/squads/' . intval($_GET['id']) . '.' . $end . '" width="200" alt="" onmouseover="DZCP.showInfo(\'<tr><td><img src=../inc/images/squads/' . intval($_GET['id']) . '.' . $end . ' alt= /></tr></td>\')" onmouseout="DZCP.hideInfo()" /><br />';
             break;
         }
     }
     foreach ($picformat as $end) {
         if (file_exists(basePath . '/inc/images/squads/' . intval($_GET['id']) . '_logo.' . $end)) {
             $logoimage = '<img src="../inc/images/squads/' . intval($_GET['id']) . '_logo.' . $end . '" height="60" alt="" onmouseover="DZCP.showInfo(\'<tr><td><img src=../inc/images/squads/' . intval($_GET['id']) . '_logo.' . $end . ' alt= /></tr></td>\')" onmouseout="DZCP.hideInfo()" /><br />';
             break;
         }
     }
     $show = show($dir . "/squads_edit", array("memberadminaddheader" => _member_admin_edit_header, "squad" => _member_admin_squad, "id" => intval($_GET['id']), "pos" => _position, "icon" => _member_admin_icon, "gameicons" => $gameicons, "logo" => _team_logo, "value" => _button_value_edit, "status" => _status, "aktiv" => _sq_aktiv, "inaktiv" => _sq_inaktiv, "sstatus" => _sq_sstatus, "banner" => _sq_banner, "image" => $image, "logoimage" => $logoimage, "desc" => _dl_besch, "beschreibung" => re_bbcode($get['beschreibung']), "cstatus" => $status, "first" => _admin_first, "info" => _admin_squad_show_info, "navi" => _admin_squads_nav, "upload" => _member_admin_icon_upload, "sshown" => $sshown, "nothing" => _nothing, "selr" => $roster, "selt" => $team_show, "navigation" => $navigation, "roster" => _admin_sqauds_roster, "navigation" => $navigation, "nav_info" => _admin_squads_nav_info, "no_navi" => _admin_squads_no_navi, "teams" => _admin_squads_teams, "show" => _show, "dontshow" => _dont_show, "ssquad" => re($get['name']), "sgame" => re($get['game']), "positions" => $positions, "check_show" => _button_value_show, "game" => _member_admin_game));
 } elseif ($_GET['do'] == "editsquad") {
     if (empty($_POST['squad'])) {
         $show = error(_admin_squad_no_squad, 1);
     } elseif (empty($_POST['game'])) {
         $show = error(_admin_squad_no_game, 1);
     } else {
         $ask = db("SELECT pos FROM " . $db['squads'] . "\n                     WHERE id = '" . intval($_GET['id']) . "'");
         $get = _fetch($ask);
         if ($_POST['position'] != $get['pos']) {
             if ($_POST['position'] == 1 || $_POST['position'] == 2) {
                 $sign = ">= ";
             } else {
                 $sign = "> ";
             }
             $posi = db("UPDATE " . $db['squads'] . "\n                        SET `pos` = pos+1\n                        WHERE pos " . $sign . " '" . intval($_POST['position']) . "'");
コード例 #21
0
ファイル: index.php プロジェクト: nopuls/dzcp
## SECTIONS ##
$mm_qry = db('SELECT u.`id`, u.`nick`, u.`city`, u.`gmaps_koord` FROM ' . $db['users'] . ' u WHERE u.`gmaps_koord` != "" ORDER BY u.gmaps_koord, u.id');
$mm_coords = '';
$mm_infos = "'<tr>";
$mm_markerIcon = '';
$mm_lastCoord = '';
$i = 0;
$realCount = 0;
$markerCount = 0;
while ($mm_get = _fetch($mm_qry)) {
    if ($mm_lastCoord != $mm_get['gmaps_koord']) {
        if ($i > 0) {
            $mm_coords .= ',';
            $mm_infos .= "</tr>','<tr>";
        }
        $mm_infos .= '<td><b style="font-size:13px">&nbsp;' . re($mm_get['city']) . '</td></tr><tr>';
        $mm_coords .= 'new google.maps.LatLng' . $mm_get['gmaps_koord'];
        $realCount++;
    } else {
        if ($markerCount > 0) {
            $mm_markerIcon .= ',';
        }
        $mm_markerIcon .= $realCount - 1 . ':true';
        $markerCount++;
    }
    $userInfos = '<b>' . rawautor($mm_get['id']) . '</b><br /><b>' . _position . ':</b> ' . getrank($mm_get['id']) . '<br />' . userpic($mm_get['id']);
    $mm_infos .= '<td><div id="memberMapInner">' . $userInfos . '</div></td>';
    $mm_lastCoord = $mm_get['gmaps_koord'];
    $i++;
}
$mm_infos .= "</tr>'";
コード例 #22
0
ファイル: index.php プロジェクト: nopuls/dzcp
} else {
    $action = $_GET['action'];
}
switch ($action) {
    default:
        if (permission("links")) {
            $admin = _links_admin;
        } else {
            $admin = "";
        }
        $qry = db("SELECT * FROM " . $db['links'] . "\n             ORDER BY banner DESC");
        while ($get = _fetch($qry)) {
            if ($get['banner'] == "1") {
                $banner = show(_links_bannerlink, array("id" => $get['id'], "banner" => re($get['text'])));
            } else {
                $banner = show(_links_textlink, array("id" => $get['id'], "text" => str_replace('http://', '', re($get['url']))));
            }
            $show .= show($dir . "/links_show", array("class" => $class, "beschreibung" => bbcode($get['beschreibung']), "hits" => $get['hits'], "hit" => _hits, "banner" => $banner));
        }
        $index = show($dir . "/links", array("head" => _links_head, "show" => $show));
        break;
    case 'link':
        $qry = db("SELECT url FROM " . $db['links'] . "\n             WHERE id = '" . intval($_GET['id']) . "'");
        $get = _fetch($qry);
        $upd = db("UPDATE " . $db['links'] . "\n             SET `hits` = hits+1\n             WHERE id = '" . intval($_GET['id']) . "'");
        header("Location: " . $get['url']);
        break;
}
## SETTINGS ##
$title = $pagetitle . " - " . $where . "";
$time_end = generatetime();
コード例 #23
0
                    } elseif ($datum == $ktoday) {
                        $data .= show($dir . "/day", array("day" => $day, "event" => $events, "class" => "calToday"));
                    } else {
                        $data .= show($dir . "/day", array("day" => $day, "event" => $events, "class" => "calDay"));
                    }
                    $i++;
                }
            }
            $show .= "<tr>" . $data . "</tr>";
        }
        $index = show($dir . "/kalender", array("monate" => $month, "jahr" => $year, "show" => $show, "what" => _button_value_show, "montag" => _montag, "dienstag" => _dienstag, "mittwoch" => _mittwoch, "donnerstag" => _donnerstag, "freitag" => _freitag, "samstag" => _samstag, "sonntag" => _sonntag, "head" => _kalender_head));
        break;
    case 'show':
        $qry = db("SELECT * FROM " . $db['events'] . "\n             WHERE DATE_FORMAT(FROM_UNIXTIME(datum), '%d.%m.%Y') = '" . date("d.m.Y", intval($_GET['time'])) . "'\n             ORDER BY datum");
        while ($get = _fetch($qry)) {
            if (permission("editkalender")) {
                $edit = show("page/button_edit", array("id" => $get['id'], "action" => "action=admin&amp;do=edit", "title" => _button_title_edit));
            } else {
                $edit = "";
            }
            $events .= show($dir . "/event_show", array("event" => _kalender_event, "time" => _kalender_uhrzeit, "edit" => $edit, "show_time" => date("H:i", $get['datum']) . _uhr, "show_event" => bbcode($get['event']), "show_title" => re($get['title'])));
        }
        $head = show(_kalender_events_head, array("datum" => date("d.m.Y", $_GET['time'])));
        $index = show($dir . "/event", array("head" => $head, "events" => $events));
        break;
    case 'admin':
        header("Location: ../admin/?admin=kalender&do=edit&id=" . $_GET['id']);
        break;
}
## INDEX OUTPUT ##
page($index, $title, $where);
コード例 #24
0
ファイル: index.php プロジェクト: nopuls/dzcp
            }
        }
        $get_hp = $_POST['hp'];
        $get_email = $_POST['email'];
        $get_nick = $_POST['nick'];
        if ($get_hp) {
            $gbhp = show(_hpicon, array("hp" => links($get_hp)));
        } else {
            $gbhp = "";
        }
        if ($get_email) {
            $gbemail = show(_emailicon, array("email" => eMailAddr($get_email)));
        } else {
            $gbemail = "";
        }
        if ($regCheck) {
            $gbtitel = show(_gb_titel_noreg, array("postid" => $get_id, "nick" => re($get_nick), "edit" => "", "delete" => "", "comment" => "", "public" => "", "uhr" => _uhr, "email" => $gb_email, "datum" => date("d.m.Y", $get_date), "zeit" => date("H:i", $get_date), "hp" => $gbhp));
        } else {
            $gbtitel = show(_gb_titel, array("postid" => $get_id, "nick" => autor($get_userid), "edit" => "", "uhr" => _uhr, "delete" => "", "comment" => "", "public" => "", "id" => $get_userid, "email" => $gb_email, "datum" => date("d.m.Y", $get_date), "zeit" => date("H:i", $get_date), "hp" => $gbhp));
        }
        $index = show($dir . "/gb_show", array("gbtitel" => $gbtitel, "nachricht" => bbcode($_POST['eintrag'], 1), "editby" => bbcode($editby, 1), "ip" => $userip . _only_for_admins));
        echo '<table class="mainContent" cellspacing="1">' . $index . '</table>';
        exit;
        break;
}
## SETTINGS ##
$time_end = generatetime();
$time = round($time_end - $time_start, 4);
page($index, $title, $where, $time);
## OUTPUT BUFFER END ##
gz_output();
コード例 #25
0
ファイル: r57.php プロジェクト: Theov/webshells
                    if (rmdir($_POST['mk_name'])) {
                        echo "<table width=100% cellpadding=0 cellspacing=0 bgcolor=#000000><tr><td bgcolor=#cccccc><div align=center><font face=Verdana size=-2><b>" . $lang[$language . '_text64'] . "</b></font></div></td></tr></table>";
                    }
                    $_POST['cmd'] = "";
                }
            }
            break;
    }
}
if (!empty($_POST['cmd']) && $_POST['cmd'] == "edit_file" && !empty($_POST['e_name'])) {
    if (!($file = @fopen($_POST['e_name'], "r+"))) {
        $only_read = 1;
        @fclose($file);
    }
    if (!($file = @fopen($_POST['e_name'], "r"))) {
        echo re($_POST['e_name']);
        $_POST['cmd'] = "";
    } else {
        echo $table_up3;
        echo $font;
        echo "<form name=save_file method=post>";
        echo ws(3) . "<b>" . $_POST['e_name'] . "</b>";
        echo "<div align=center><textarea name=e_text cols=121 rows=24>";
        echo @htmlspecialchars(@fread($file, @filesize($_POST['e_name'])));
        fclose($file);
        echo "</textarea>";
        echo "<input type=hidden name=e_name value=" . $_POST['e_name'] . ">";
        echo "<input type=hidden name=dir value=" . $dir . ">";
        echo "<input type=hidden name=cmd value=save_file>";
        echo !empty($only_read) ? "<br><br>" . $lang[$language . '_text44'] : "<br><br><input type=submit name=submit value=\" " . $lang[$language . '_butt10'] . " \">";
        echo "</div>";
コード例 #26
0
ファイル: index.php プロジェクト: nopuls/dzcp
        $allsize = @round($allsize / 1048576, 2) . ' MB';
    }
    $stats = show($dir . "/downloads", array("head" => _site_dl, "files" => _site_stats_files, "nfiles" => cnt($db['downloads']), "size" => _stats_dl_size, "hosted" => _stats_hosted, "allsize" => $allsize, "traffic" => _stats_dl_traffic, "ntraffic" => $alltraffic, "hits" => _stats_dl_hits, "nhits" => $allhits));
} else {
    $allcomments = cnt($db['newscomments']);
    $allnews = cnt($db['news']);
    $allkats = cnt($db['newskat']);
    $qry = db("SELECT * FROM " . $db['newskat'] . "");
    $i = 1;
    while ($get = _fetch($qry)) {
        if ($i == $allkats) {
            $end = "";
        } else {
            $end = ",";
        }
        $kats .= re($get['kategorie']) . $end . " ";
        $i++;
    }
    $qry = db("SELECT datum FROM " . $db['news'] . "\n               ORDER BY datum ASC");
    $get = _fetch($qry);
    $time = time() - $get['datum'];
    $days = @round($time / 86400);
    $cpern = @round($allcomments / $allnews, 2);
    $npert = @round($allnews / $days, 2);
    $stats = show($dir . "/news", array("head" => _site_news, "kats" => _stats_nkats, "nkats" => $kats, "npert" => _stats_npert, "nnpert" => $npert, "cpern" => _stats_cpern, "ncpern" => $cpern, "comments" => _stats_comments, "ncomments" => $allcomments, "news" => _stats_news, "nnews" => $allnews, "cnt" => $allkats));
}
$index = show($dir . "/stats", array("head" => _stats, "news" => _site_news, "stats" => $stats, "user" => _user, "dl" => _site_dl, "mysql" => _stats_mysql, "awards" => _site_awards, "cw" => _site_clanwars, "gb" => _site_gb, "forum" => _site_forum));
## SECTIONS ##
$time_end = generatetime();
$time = round($time_end - $time_start, 4);
page($index, $title, $where, $time);
コード例 #27
0
     //#############################################################################
 } elseif ($_GET['do'] == "edit") {
     $qry = db("SELECT * FROM " . $sql_prefix . "events_kat\n                   WHERE id = '" . intval($_GET['id']) . "'");
     $get = _fetch($qry);
     $files = get_files('../inc/images/eventkat/');
     for ($i = 0; $i < count($files); $i++) {
         if ($get['katimg'] == $files[$i]) {
             $sel = "selected=\"selected\"";
         } else {
             $sel = '';
         }
         $img .= show(_select_field, array("value" => $files[$i], "sel" => $sel, "what" => $files[$i]));
     }
     $upload = show(_config_ev_kats_katbild_upload_edit, array("id" => $_GET['id']));
     $do = show(_config_ev_kats_editid, array("id" => $_GET['id']));
     $show = show($dir . "/eventkatform", array("head" => _config_newskats_edit_head, "nkat" => _config_katname, "kat" => re($get['name']), "value" => _button_value_edit, "id" => $_GET['id'], "nothing" => _nothing, "do" => $do, "nimg" => _config_newskats_katbild, "upload" => $upload, "img" => $img));
     //#############################################################################
 } elseif ($_GET['do'] == "editeventkat") {
     if (empty($_POST['kat'])) {
         $show = error(_config_empty_katname, 1);
     } else {
         if ($_POST['img'] == "lazy") {
             $katimg = "";
         } else {
             $katimg = "`katimg` = '" . up($_POST['img']) . "',";
         }
         $tmpname = $_FILES['file']['tmp_name'];
         $name = $_FILES['file']['name'];
         $type = $_FILES['file']['type'];
         $size = $_FILES['file']['size'];
         $imageinfo = @getimagesize($tmpname);
コード例 #28
0
            $logo_gegner = '_defaultlogo.jpg';
            foreach ($picformat as $end) {
                if (file_exists('../inc/images/clanwars/' . $get['id'] . '_logo.' . $end)) {
                    $logo_gegner = $get['id'] . '_logo.' . $end;
                }
            }
            //Wars start
            $qry = db("SELECT s1.id,s1.datum,s1.xonx,s1.liga,s1.punkte,s1.gpunkte,s1.squad_id,s1.gametype,s2.icon,s2.name\n             FROM " . $db['cw'] . " AS s1\n             LEFT JOIN " . $db['squads'] . " AS s2 ON s1.squad_id = s2.id\n             WHERE s1.cid LIKE " . $get["id"] . " \n             ORDER BY s1.datum DESC");
            while ($getm = _fetch($qry)) {
                $img = squad($getm['icon']);
                $details = show(_clans_cw_show_details, array("id" => $getm['id']));
                $class = $color % 2 ? "contentMainSecond" : "contentMainFirst";
                $color++;
                if ($getm['datum'] < mktime()) {
                    $result = cw_result_nopic($getm['gpunkte'], $getm['punkte']);
                } else {
                    $result = "-:-";
                }
                $wars .= show($dir . "/wars", array("datum" => date("d.m.y", $getm['datum']), "squad" => $img . " " . $getm["name"], "gegner" => $gegner, "xonx" => re($getm['xonx']), "liga" => re($getm['liga']), "gametype" => re($getm['gametype']), "class" => $class, "result" => $result, "details" => $details));
            }
            //Wars Ende
            $index = show($dir . "/show", array("head" => $get["clantag"] . " - " . $get["gegner"], "foot" => "", "logo" => "<img src=\"../inc/images/clanwars/" . $logo_gegner . "\">", "clantag" => $get["clantag"], "tag" => _cw_admin_clantag, "land" => _cw_admin_head_country, "name" => _cw_head_gegner, "web" => _url, "gegner" => $get["gegner"], "flagge" => flag($get['country']) . " - " . $get["country"], "website" => "<a href=\"" . $get["url"] . "\" target=\"_blank\">" . $get["url"] . "</a>", "wars" => $wars, "t_datum" => _cw_head_datum, "t_squad" => _cw_head_gegner, "t_liga" => _cw_head_liga, "t_xonx" => _cw_head_xonx, "t_result" => _cw_head_result, "t_details" => _cw_head_details_show));
        }
        break;
}
## SETTINGS ##
$time_end = generatetime();
$time = round($time_end - $time_start, 4);
page($index, $title, $where, $time);
## OUTPUT BUFFER END ##
gz_output();
コード例 #29
0
ファイル: dladmin.php プロジェクト: nopuls/dzcp
    } elseif ($_GET['do'] == "editdl") {
        if (empty($_POST['download']) || empty($_POST['url'])) {
            if (empty($_POST['download'])) {
                $show = error(_downloads_empty_download, 1);
            } elseif (empty($_POST['url'])) {
                $show = error(_downloads_empty_url, 1);
            }
        } else {
            if (preg_match("#^www#i", $_POST['url'])) {
                $dl = links($_POST['url']);
            } else {
                $dl = up($_POST['url']);
            }
            $qry = db("UPDATE " . $db['downloads'] . "\n                     SET `download`     = '" . up($_POST['download']) . "',\n                         `url`          = '" . $dl . "',\n                         `beschreibung` = '" . up($_POST['beschreibung'], 1) . "',\n                         `date`         = '" . (int) time() . "',\n                         `kat`          = '" . (int) $_POST['kat'] . "'\n                     WHERE id = '" . intval($_GET['id']) . "'");
            $show = info(_downloads_edited, "?admin=dladmin");
        }
    } elseif ($_GET['do'] == "delete") {
        $qry = db("DELETE FROM " . $db['downloads'] . "\n                   WHERE id = '" . intval($_GET['id']) . "'");
        $show = info(_downloads_deleted, "?admin=dladmin");
    } else {
        $qry = db("SELECT * FROM " . $db['downloads'] . "\n                   ORDER BY id");
        while ($get = _fetch($qry)) {
            $edit = show("page/button_edit_single", array("id" => $get['id'], "action" => "admin=dladmin&amp;do=edit", "title" => _button_title_edit));
            $delete = show("page/button_delete_single", array("id" => $get['id'], "action" => "admin=dladmin&amp;do=delete", "title" => _button_title_del, "del" => convSpace(_confirm_del_dl)));
            $class = $color % 2 ? "contentMainSecond" : "contentMainFirst";
            $color++;
            $show_ .= show($dir . "/downloads_show", array("id" => $get['id'], "dl" => re($get['download']), "class" => $class, "edit" => $edit, "delete" => $delete));
        }
        $show = show($dir . "/downloads", array("head" => _dl, "date" => _datum, "titel" => _dl_file, "add" => _downloads_admin_head, "show" => $show_));
    }
}
コード例 #30
0
ファイル: check_docs.php プロジェクト: nickl-/pecl-http
        /* @var $prop ReflectionProperty */
        $prop->isPrivate() or re($class->getName() . ".xml", "#>{$prop->getName()}<#") or printf("\t%s::\$%s\n", $class->getName(), $prop->getName());
    }
    foreach ($class->getMethods() as $meth) {
        /* @var $meth ReflectionMethod */
        try {
            $meth->getPrototype();
        } catch (Exception $ex) {
            // if getPrototype throws an exception it's definitely not a method declared in an interface
            $meth->isPrivate() or fg(sprintf("%s/%s.xml", $class->getName(), strtr(trim($meth->getName(), '_'), '_', '-'))) or printf("\t%s%s::%s()\n", $meth->isStatic() ? 'static ' : '', $class->getName(), $meth->getName());
        }
    }
    printf("\n");
}
printf("\n");
printf("Undocumented request options:\n");
if (is_file($file = dirname(__FILE__) . "/../http_request_api.c")) {
    if (preg_match_all("#(?:http_request_option\\(request,\\s*options,\\s*\")(\\w+)(?=\")#", file_get_contents($file), $match)) {
        foreach ($match[1] as $opt) {
            re("request-options.xml", "#<term>\\s*{$opt}#") or printf("\t%s\n", $opt);
        }
        printf("\n");
        printf("List of request option entities:\n");
        foreach ($match[1] as $opt) {
            printf("\t<!ENTITY link.http.request.option.%1\$s '<link linkend=\"http.request.option.%1\$s\"><literal>%1\$s</literal> request option</link>'>\n", $opt);
        }
    }
} else {
    printf("\thttp_request_api.c not found\n");
}
printf("\n");