Beispiel #1
0
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>';
}
Beispiel #2
0
function flag($f)
{
    if (func_num_args() > 1) {
        foreach (func_get_args() as $f) {
            if (flag($f)) {
                return true;
            }
        }
        return false;
    }
    global $argv;
    $pre = strlen($f) > 1 ? '--' : '-';
    foreach ($argv as $a) {
        if (preg_match('/^' . $pre . $f . '($|\\s)/', $a)) {
            return true;
        }
    }
    return false;
}
Beispiel #3
0
	<div id="users" style="padding:2px" align="center">
		<table style="width:230px" border="0" cellspacing="0" cellpadding="1">
      <tr>
        <td colspan="2" style="text-align:center">
          <select name="sort" style="width:190px"  class="mceSelect" onchange="sort(this.value)">
            <option value="all">{#dzcp.users_all}</option>
            <option value="clan" <?php 
echo $sel;
?>
>{#dzcp.users_clan}</option>
          </select>
        </td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
<?php 
$qry = db("SELECT id,nick,country FROM " . $db['users'] . "\n               " . $order . "\n               ORDER BY nick");
while ($get = mysql_fetch_array($qry)) {
    echo "<tr>\n";
    echo "  <td>" . flag($get['country']) . " " . $get['nick'] . "</td>\n";
    echo "  <td style=\"text-align:right\"><a href=\"javascript:insertUser(" . $get['id'] . ",'" . addslashes($get['nick']) . "','" . rawflag($get['country']) . "')\"><img src=\"images/insert.gif\" alt=\"insert\" title=\"{#dzcp.users_add_en}" . $get['nick'] . "{#dzcp.users_add_de}\" border=\"0\"></a></td>\n";
    echo "</tr>\n";
}
?>
		</table>
	</div>
</body>
</html>
<?php 
ob_end_flush();
            $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();
Beispiel #5
0
                 $custom_hardware .= show(_profil_custom_mail, array("name" => re(pfields_name($getcustom['name'])), "value" => eMailAddr(re($getcontent[$getcustom['feldname']]))));
             } else {
                 $custom_hardware .= show(_profil_custom, array("name" => re(pfields_name($getcustom['name'])), "value" => re($getcontent[$getcustom['feldname']])));
             }
             $ch++;
         }
     }
     if ($ch != 0) {
         $hardware_head = show(_profil_head_cont, array("what" => _profil_hardware));
     }
     if (empty($get['rlname'])) {
         $rlname = '-';
     } else {
         $rlname = re($get['rlname']);
     }
     $show = show($dir . "/profil_show", array("hardware_head" => $hardware_head, "about" => _profil_about, "rang" => $rang, "country" => flag($get['country']), "rangpic" => $rangpic, "pcity" => _profil_city, "city" => re($get['city']), "prank" => _profile_rank, "stats_hits" => _profil_pagehits, "stats_profilhits" => _profil_profilhits, "stats_msgs" => _profil_msgs, "stats_lastvisit" => _profil_last_visit, "stats_forenposts" => _profil_forenposts, "stats_logins" => _profil_logins, "stats_cws" => _profil_cws, "stats_reg" => _profil_registered, "stats_votes" => _profil_votes, "logins" => userstats($_GET['id'], "logins"), "hits" => userstats($_GET['id'], "hits"), "msgs" => userstats($_GET['id'], "writtenmsg"), "forenposts" => userstats($_GET['id'], "forumposts"), "votes" => userstats($_GET['id'], "votes"), "cws" => userstats($_GET['id'], "cws"), "regdatum" => date("d.m.Y H:i", $get['regdatum']) . _uhr, "lastvisit" => date("d.m.Y H:i", userstats($_GET['id'], "lastvisit")) . _uhr, "contact" => _profil_contact, "preal" => _profil_real, "pemail" => _email, "picq" => _icq, "phlsw" => _hlswstatus, "psteam" => _steamid, "php" => _hp, "hp" => $hp, "pnick" => _nick, "pbday" => _profil_bday, "page" => _profil_age, "psex" => _profil_sex, "gamestuff" => _profil_gamestuff, "xfire" => re($get['hlswid']), "buddyadd" => $buddyadd, "userstats" => _profil_userstats, "pos" => _profil_os, "pcpu" => _profil_cpu, "pram" => _profil_ram, "phdd" => _profil_hdd, "pboard" => _profil_board, "pmaus" => _profil_maus, "nick" => autor($get['id']), "rlname" => $rlname, "bday" => $bday, "age" => getAge($get['bday']), "sex" => $sex, "email" => $email, "icq" => $icq, "icqnr" => $icqnr, "pn" => $pn, "edituser" => $edituser, "hlswid" => $hlsw, "steamid" => $steamid, "steam" => $steam, "onoff" => onlinecheck($get['id']), "clan" => $clan, "picture" => userpic($get['id']), "favos_head" => $favos_head, "sonst" => _profil_sonst, "pich" => _profil_ich, "pposition" => _profil_position, "pstatus" => _profil_status, "position" => getrank($get['id']), "status" => $status, "ich" => bbcode($get['beschreibung']), "custom_about" => $custom_about, "custom_contact" => $custom_contact, "custom_favos" => $custom_favos, "custom_hardware" => $custom_hardware));
 }
 $navi_profil = show(_profil_navi_profil, array("id" => $_GET['id']));
 $navi_gb = show(_profil_navi_gb, array("id" => $_GET['id']));
 $navi_gallery = show(_profil_navi_gallery, array("id" => $_GET['id']));
 $profil_head = show(_profil_head, array("profilhits" => userstats($_GET['id'], "profilhits")));
 $index = show($dir . "/profil", array("profilhead" => $profil_head, "show" => $show, "nick" => autor($_GET['id']), "profil" => $navi_profil, "gb" => $navi_gb, "gallery" => $navi_gallery));
 if ($_GET['do'] == "delete") {
     if ($chkMe == "4" || $_GET['id'] == $userid) {
         $qry = db("DELETE FROM " . $db['usergb'] . "\n                   WHERE user = '******'id']) . "'\n                   AND id = '" . intval($_GET['gbid']) . "'");
         $index = info(_gb_delete_successful, "?action=user&amp;id=" . $_GET['id'] . "&show=gb");
     } else {
         $index = error(_error_wrong_permissions, 1);
     }
 } elseif ($_GET['do'] == "edit") {
     $qry = db("SELECT * FROM " . $db['usergb'] . "\n               WHERE id = '" . intval($_GET['gbid']) . "'");
Beispiel #6
0
     flag($edit && $access >= $level_set_mia, (int) $channel->flags & 0x400, "* MIA", "mia", "Y");
     flag($edit && $access >= $level_set_neverreg, (int) $channel->flags & 0x8, "* Never Register", "neverreg", "Y");
     flag($edit && $access >= $level_set_noforce, (int) $channel->flags & 0x400000, "* No Force", "noforce", "Y");
     flag($edit && $access >= $level_set_notake, (int) $channel->flags & 0x1000000, "* No Take", "notake", "Y");
     flag($edit && $access >= $level_set_suspend, (int) $channel->flags & 0x10, "* Channel Suspension", "suspend", "Y");
     flag($edit && $access >= $level_set_tempman, (int) $channel->flags & 0x20, "* Temp Manager", "tempman", "Y");
     flag($edit && $access >= $level_set_caution, (int) $channel->flags & 0x40, "* Cautioned", "cautioned", "Y");
     flag($edit && $access >= $level_set_caution, (int) $channel->flags & 0x80, "* Manager on vacation", "vacation", "Y");
     flag($edit && $access >= $level_set_secret, (int) $channel->flags & 0x100, "* Channel Locked", "secret", "Y");
     //flag($edit && $access>=$level_set_alwaysop,(int)$channel->flags & 0x00010000," Always Op","alwaysop","Y");
     flag($edit && $access >= $level_set_strictop, (int) $channel->flags & 0x20000, " Strict Op", "strictop", "Y");
     flag($edit && $access >= $level_set_noop, (int) $channel->flags & 0x40000, " No Op", "noop", "Y");
     flag($edit && $access >= $level_set_novoice, (int) $channel->flags & 0x800000, " No Voice", "novoice", "Y");
     flag($edit && $access >= $level_set_autotopic, (int) $channel->flags & 0x80000, " Auto Topic", "autotopic", "Y");
     //flag($edit && $access>=$level_set_oponly,(int)$channel->flags & 0x00100000," Op Only","oponly","Y");
     flag($edit && $access >= $level_set_autojoin, (int) $channel->flags & 0x200000, " Auto Join", "autojoin", "Y");
     $cpurged = 0;
 } else {
     if ($channel->registered_ts == 0) {
         echo "<font size=-1>Purged</font>&nbsp;<img src=images/protect.gif border=0><br>\n";
         $cpurged = 1;
     } else {
         $cpurged = 0;
     }
 }
 number($edit && $access >= $level_set_massdeoppro, $channel->mass_deop_pro, "Mass Deop Protection", "massdeop");
 number($edit && $access >= $level_set_floodpro, $channel->flood_pro, "Flood Protection", "floodpro");
 if ($edit && $access >= $level_set_url) {
     if ($channel->url != "" && !ereg("^http://", $channel->url)) {
         echo "<b>Channel Homepage: </b><input type=text size=50 name=url maxlength=75 value=\"http://" . $channel->url . "\"><br>\n";
     } else {
Beispiel #7
0
function lang_rel_arts($id, $r)
{
    $rl = explode(' ', prmb(26));
    $sp = sep();
    $t = array('eng' => 'english', 'fr' => 'français', 'esp' => 'español', 'de' => 'deutsch');
    if ($rl) {
        foreach ($rl as $k => $v) {
            $lg = $r['lang' . $v];
            if ($lg) {
                $ret .= lka($lg, flag($v) . $sp . $t[$v]) . ' ';
            }
        }
    }
    return $ret;
}
Beispiel #8
0
function langslct($r, $vrf, $id)
{
    $rid = randid('rdio');
    //$r=explode(' ',prmb(26));
    if (is_array($r)) {
        foreach ($r as $k => $v) {
            $c = $v == $vrf ? 'active' : '';
            $ret .= ljb($c, 'radioj', $rid . '\',\'' . $id . '\',\'' . ajx($v) . '\',\'' . $k, flag($v));
        }
    }
    return span(atd($rid) . atc('nbp'), $ret) . hidden($id, $id, $vrf);
}
Beispiel #9
0
 /**
  * Unflag used flags.
  *
  * @AfterScenario
  */
 public function cleanFlags($event)
 {
     if (empty($this->flagged)) {
         // No flags to unflag.
         return;
     }
     // Unflag every flagged flag.
     $account = user_load(1);
     foreach ($this->flagged as $flag) {
         $entity_id = $flag['entity_id'];
         $flag_name = $flag['flag_name'];
         flag('unflag', $flag_name, $entity_id, $account);
     }
     // Clean the flagged flags list.
     $this->flagged = array();
 }
     $titel = show(_eintrag_titel, array("postid" => $get_id, "datum" => date("d.m.Y", $get_date), "zeit" => date("H:i", $get_date) . _uhr, "edit" => $edit, "delete" => $delete));
     $index = show("page/comments_show", array("titel" => $titel, "comment" => bbcode($_POST['comment'], 1), "nick" => $nick, "editby" => bbcode($editedby, 1), "email" => $email, "hp" => $hp, "avatar" => useravatar($get_userid), "onoff" => $onoff, "rank" => getrank($get_userid), "ip" => $userip . _only_for_admins));
     echo '<table class="mainContent" cellspacing="1">' . $index . '</table>';
     exit;
     break;
 case 'preview':
     header("Content-type: text/html; charset=utf-8");
     $qry = db("SELECT * FROM " . $db['squads'] . "\n             WHERE id = '" . intval($_POST['squad']) . "'");
     $get = _fetch($qry);
     $serverpwd = show(_cw_serverpwd, array("cw_serverpwd" => re($_POST['serverpwd'])));
     $img = squad($get['icon']);
     $show = show(_cw_details_squad, array("game" => re($get['game']), "name" => re($get['name']), "id" => $_POST['squad'], "img" => $img));
     //Clans Mod Start
     $clandetailssql = db("SELECT clantag, gegner, url, country FROM " . $sql_prefix . "clans WHERE id LIKE " . $_POST['cid']);
     $clans = _fetch($clandetailssql);
     $flagge = flag($clans['country']);
     $gegner = show(_cw_details_gegner_blank, array("gegner" => re($clans['clantag'] . " - " . $clans['gegner']), "url" => $clans['url']));
     //Clans Mod Ende
     $server = show(_cw_details_server, array("servername" => re($_POST['servername']), "serverip" => re($_POST['serverip'])));
     if ($_POST['punkte'] == "0" && $_POST['gpunkte'] == "0") {
         $result = _cw_no_results;
     } else {
         $result = cw_result_details($_POST['punkte'], $_POST['gpunkte']);
     }
     $editcw = "";
     if ($_POST['bericht']) {
         $bericht = bbcode($_POST['bericht'], 1);
     } else {
         $bericht = "&nbsp;";
     }
     if (!empty($_POST['s1'])) {
Beispiel #11
0
     quote_generation($query, lang('bottom_title'), -1);
     break;
 case 'browse':
     $query = "SELECT * FROM " . db_tablename('quotes') . " WHERE queue=0 ORDER BY id ASC ";
     quote_generation($query, lang('browse_title'), $page[1], $CONFIG['quote_limit'], $CONFIG['page_limit']);
     break;
 case 'change_pw':
     if (isset($_SESSION['logged_in'])) {
         change_pw($page[1], $page[2]);
     }
     break;
 case 'flag':
     if (isset($CONFIG['login_required']) && $CONFIG['login_required'] == 1 && !isset($_SESSION['logged_in'])) {
         break;
     }
     flag($page[1], $page[2]);
     break;
 case 'flag_queue':
     if (isset($_SESSION['logged_in']) && $_SESSION['level'] < USER_NORMAL) {
         flag_queue($page[1]);
     }
     break;
 case 'latest':
     $query = "SELECT * FROM " . db_tablename('quotes') . " WHERE queue=0 ORDER BY id DESC LIMIT " . $limit;
     if (isset($_SESSION['lastvisit'])) {
         $nlatest = $db->getOne("SELECT count(1) FROM " . db_tablename('quotes') . " WHERE queue=0 AND date>=" . $_SESSION['lastvisit']);
         if ($nlatest >= 3 && $nlatest <= $CONFIG['quote_list_limit']) {
             $query = "SELECT * FROM " . db_tablename('quotes') . " WHERE queue=0 AND date>=" . $_SESSION['lastvisit'] . " ORDER BY id DESC";
         }
     }
     quote_generation($query, lang('latest_title'), -1);
Beispiel #12
0
         $onoff = onlinecheck($get_userid);
         $nick = cleanautor($get_userid);
     }
     $titel = show(_eintrag_titel, array("postid" => $get_id, "datum" => date("d.m.Y", $get_date), "zeit" => date("H:i", $get_date) . _uhr, "edit" => $edit, "delete" => $delete));
     $index = show("page/comments_show", array("titel" => $titel, "comment" => bbcode($_POST['comment'], 1), "nick" => $nick, "editby" => bbcode($editedby, 1), "email" => $email, "hp" => $hp, "avatar" => useravatar($get_userid), "onoff" => $onoff, "rank" => getrank($get_userid), "ip" => $userip . _only_for_admins));
     echo '<table class="mainContent" cellspacing="1">' . $index . '</table>';
     exit;
     break;
 case 'preview':
     header("Content-type: text/html; charset=utf-8");
     $qry = db("SELECT * FROM " . $db['squads'] . "\n             WHERE id = '" . intval($_POST['squad']) . "'");
     $get = _fetch($qry);
     $serverpwd = show(_cw_serverpwd, array("cw_serverpwd" => re($_POST['serverpwd'])));
     $img = squad($get['icon']);
     $show = show(_cw_details_squad, array("game" => re($get['game']), "name" => re($get['name']), "id" => $_POST['squad'], "img" => $img));
     $flagge = flag($get['gcountry']);
     $gegner = show(_cw_details_gegner_blank, array("gegner" => re($_POST['clantag'] . " - " . $_POST['gegner']), "url" => links($_POST['url'])));
     $server = show(_cw_details_server, array("servername" => re($_POST['servername']), "serverip" => re($_POST['serverip'])));
     if ($_POST['punkte'] == "0" && $_POST['gpunkte'] == "0") {
         $result = _cw_no_results;
     } else {
         $result = cw_result_details($_POST['punkte'], $_POST['gpunkte']);
     }
     $editcw = "";
     if ($_POST['bericht']) {
         $bericht = bbcode($_POST['bericht'], 1);
     } else {
         $bericht = "&nbsp;";
     }
     if (!empty($_POST['s1'])) {
         $screen1 = '<img src="../inc/images/admin/cwscreen.jpg" alt="" />';
Beispiel #13
0
function steamid($nick, $steamid)
{
    global $db;
    $steamid = str_replace('STEAM_', '', $steamid);
    $qry = db("SELECT id,nick,steamid\n               FROM " . $db['users'] . "\n               WHERE steamid = '" . $steamid . "'");
    if (_rows($qry)) {
        $get = _fetch($qry);
        $result = show(_user_link, array("id" => $get['id'], "nick" => $get['nick'], "country" => flag($get['id'])));
    } else {
        $result = re($nick);
    }
    return $result;
}
 function toggle($table, $id, $field, $value)
 {
     $Herb =& get_instance();
     $query = "SELECT * FROM `" . $table . "` WHERE id = '" . $id . "';";
     $res = $Herb->db->query($query);
     $row = $res->result_array();
     if (flag($row[$field], $value)) {
         deactivate($table, $id, $field, $value);
     } else {
         activate($table, $id, $field, $value);
     }
 }
            $end = strtolower($end[count($end) - 1]);
            if (!empty($tmp)) {
                $img = @getimagesize($tmp);
                foreach ($picformat as $end1) {
                    if (file_exists(basePath . '/inc/images/clanwars/' . intval($_GET['id']) . '_logo.' . $end1)) {
                        @unlink(basePath . '/inc/images/clanwars/' . intval($_GET['id']) . '_logo.' . $end1);
                        break;
                    }
                }
                if ($img[0]) {
                    copy($tmp, basePath . "/inc/images/clanwars/" . intval($_GET['id']) . "_logo." . strtolower($end));
                    @unlink($tmp);
                }
            }
            $show = info(_clans_edited, "?admin=cw_clans");
        }
    } elseif ($_GET['do'] == "delete") {
        $qry = db("DELETE FROM " . $sql_prefix . "clans \n                   WHERE id = '" . intval($_GET['id']) . "'");
        $show = info(_clans_deleted, "?admin=cw_clans");
    } else {
        $qry = db("SELECT * FROM " . $sql_prefix . "clans ORDER BY clantag");
        while ($get = _fetch($qry)) {
            $class = $color % 2 ? "contentMainSecond" : "contentMainFirst";
            $color++;
            $edit = show("page/button_edit_single", array("id" => $get['id'], "action" => "admin=cw_clans&amp;do=edit", "title" => _button_title_edit));
            $delete = show("page/button_delete_single", array("id" => $get['id'], "action" => "admin=cw_clans&amp;do=delete", "title" => _button_title_del, "del" => convSpace(_confirm_del_clans)));
            $show_ .= show($dir . "/clans_show", array("clantag" => re($get['clantag']), "gegner" => re($get['gegner']), "id" => re($get['id']), "flagge" => flag($get['country']), "del" => $delete, "edit" => $edit, "class" => $class));
        }
        $show = show($dir . "/clans", array("head" => _clans_head, "show" => $show_, "add" => _clans_add_head, "edit" => _editicon_blank, "del" => _deleteicon_blank, "name" => _clans_titel));
    }
}
Beispiel #16
0
            }
            return true;
        }
        return -1;
    }
    return false;
}
function flag()
{
    global $admin;
    if ($admin) {
        echo "Welcome admin, flag is: " . FLAG . "<br/>\n";
    } else {
        echo "You are just a crap :((<br/>\n";
    }
}
$t = lolsession_start();
if ($t == true) {
    flag();
} else {
    if (array_key_exists('user', $_POST) and array_key_exists('pass', $_POST)) {
        session_id(newID());
        session_start();
        flag();
    } else {
        if ($t == -1) {
            echo "kotu seyler oldu sanirim :((<br/>\n";
        }
        echo $loginform;
    }
}