Example #1
0
     while ($r = db_fetch_assoc($qry)) {
         $dbwlps[] = (int) $r['wlp'];
     }
     foreach ($wlps as $k => $v) {
         if (!in_array($k, $dbwlps)) {
             unset($wlps[$k]);
         }
     }
 } else {
     $teams = dblistee('', "SELECT `id`, `name` FROM `prefix_groups` ORDER BY `name`");
 }
 if (isset($_POST['wlp']) and !empty($_POST['wlp'])) {
     $wlp = arlistee($_POST['wlp'], $wlps);
     $wheres[] = 'wlp = ' . escape($_POST['wlp'], 'integer');
 } else {
     $wlp = arlistee('', $wlps);
 }
 if (isset($_POST['spiel']) and !empty($_POST['spiel'])) {
     $game = dblistee($_POST['spiel'], "SELECT DISTINCT `game`,`game` FROM `prefix_wars` " . (count($wheres) ? $sqla . implode(' AND ', $wheres) : '') . " ORDER BY `game`");
     $wheres[] = 'game = "' . escape($_POST['spiel'], 'string') . '"';
 } else {
     $game = dblistee('', "SELECT DISTINCT `game`,`game` FROM `prefix_wars` " . (count($wheres) ? $sqla . implode(' AND ', $wheres) : '') . " ORDER BY `game`");
 }
 if (isset($_POST['typ']) and !empty($_POST['typ'])) {
     $mtyp = dblistee($_POST['typ'], "SELECT DISTINCT `mtyp`,`mtyp` FROM `prefix_wars` " . (count($wheres) ? $sqla . implode(' AND ', $wheres) : '') . " ORDER BY `mtyp`");
     $wheres[] = 'mtyp = "' . escape($_POST['typ'], 'string') . '"';
 } else {
     $mtyp = dblistee('', "SELECT DISTINCT `mtyp`,`mtyp` FROM `prefix_wars` " . (count($wheres) ? $sqla . implode(' AND ', $wheres) : '') . " ORDER BY `mtyp`");
 }
 $tpl->set_ar_out(array('tid' => $teams, 'game' => $game, 'typ' => $mtyp, 'wlp' => $wlp), 3);
 if ($menu->get(1) == 'last') {
Example #2
0
            $tpl->set('checked' . $i, 'checked="checked"');
        }
    }
} else {
    $tpl->set('checked1', 'checked="checked"');
}
if ($such != 'augt' and $such != 'aeit' and $such != 'aubt') {
    $tpl->set('search', escape_for_fields($such), 0);
}
if (isset($_GET['days'])) {
    $days = $_GET['days'] == 0 ? 360 : intval($_GET['days']);
} else {
    $days = 360;
}
$days_ar = array(360 => 'alle Beiträge (1 Jahr)', 1 => '1 Tag', 7 => '7 Tage', 14 => '2 Wochen', 30 => '1 Monat', 90 => '3 Monate', 180 => '6 Monate');
$tpl->set('days', arlistee($days, $days_ar));
$tpl->out(0);
if (!empty($such) or !empty($autor)) {
    $page = 1;
    if (isset($_GET['page'])) {
        $page = str_replace('-p', '', $_GET['page']);
    }
    $limit = 25;
    // Limit
    $anfang = ($page - 1) * $limit;
    $x = time() - 3600 * 24 * $days;
    $such = str_replace('-', '', $such);
    $such = str_replace('=', '', $such);
    $such = str_replace('&', '', $such);
    $serar = explode(' ', $such);
    $str_forum = '';
Example #3
0
$joinusspam = true;
if (loggedin()) {
    $ch_name = true;
} elseif (isset($_POST['sub']) and $name == $xname and !empty($name) and 0 == db_result(db_query("SELECT COUNT(*) FROM `prefix_user` WHERE `name_clean` = BINARY '" . get_lower($name) . "'"), 0)) {
    $ch_name = true;
}
if (isset($_POST['sub'])) {
    if (chk_antispam('joinus') != true) {
        $fehler .= '&middot;&nbsp;' . $lang['incorrectspam'] . '<br/>';
        $joinusspam = false;
    }
}
if (count($far) != $x or $ch_name == false or $joinusspam == false) {
    $tpl = new tpl('joinus.htm');
    $skill = '<option></option>';
    $skill .= arlistee($skill, $skill_ar);
    $squad = '<option></option>';
    $squad .= dblistee($squad, "SELECT `id`,`name` FROM `prefix_groups` WHERE `show_joinus` = 1 ORDER BY `pos`");
    if (loggedin()) {
        $name = $_SESSION['authname'];
    }
    foreach ($far as $v) {
        if ($x > 0 and empty($_POST[$v])) {
            $fehler .= '&middot;&nbsp;' . 'Bitte ' . $lang[$v] . ' angeben!<br />';
        }
        $tpl->set($v, ${$v});
    }
    if ($x > 0 and $name != $xname) {
        $fehler .= '&middot;&nbsp;' . $lang['wrongnickname'] . '<br />';
    } elseif ($x > 0 and $ch_name == false) {
        $fehler .= '&middot;&nbsp;' . $lang['namealreadyinuse'] . '<br />';
Example #4
0
if (isset($_POST['subform']) and chk_antispam('smtpconf', true)) {
    if (!empty($_POST['smtp_pass'])) {
        require_once 'include/includes/class/AzDGCrypt.class.inc.php';
        $cr64 = new AzDGCrypt(DBDATE . DBUSER . DBPREF);
        $smtp['smtp_pass'] = $cr64->crypt($_POST['smtp_pass']);
    }
    unset($_POST['smtp_pass']);
    foreach ($keys as $key) {
        if (isset($_POST[$key])) {
            $smtp[$key] = $_POST[$key];
        }
    }
    if (!isset($_POST['smtp_pop3beforesmtp'])) {
        $smtp['smtp_pop3beforesmtp'] = 0;
    }
    $smtpsql = escape(serialize($smtp), 'textarea');
    db_query('UPDATE `prefix_allg` SET `t1` = "' . $smtpsql . '" WHERE `k` = "smtpconf"');
    if (mysql_affected_rows() == 0) {
        echo '<h2>Es wurden keine &Auml;nderungen vorgenommen!</h2>';
    } else {
        echo '<h2>&Auml;nderungen gespeichert</h2>';
    }
}
//Formular ausgeben
$tpl = new tpl('smtpconf', 1);
$smtp['smtp'] = $allgAr['mail_smtp'] ? 1 : 0;
$smtp['smtp_selauth'] = arlistee($smtp['smtp_auth'], $authMethods);
$smtp['smtp_pass'] = (isset($smtp['smtp_pass']) and !empty($smtp['smtp_pass'])) ? 1 : 0;
$smtp['antispam'] = get_antispam('smtpconf', 0, true);
$tpl->set_ar_out($smtp, 0);
$design->footer();
Example #5
0
         $c = $menu->getE(2);
     } else {
         $c = 0;
     }
     $_ilch = array('cat' => $c, 'creater' => '', 'surl' => '', 'ssurl' => '', 'pkey' => '', 'pos' => '', 'version' => '', 'name' => '', 'url' => '', 'desc' => '', 'descl' => '', 'datum' => '');
     unset($c);
 }
 // wenn der link von archiv upload kommt ist dllink gesetzt
 $dllink = '';
 if (isset($_REQUEST['dllink'])) {
     $dllink = $_REQUEST['dllink'];
 } else {
     $dllink = $_ilch['url'];
 }
 $_ilch['newurl'] = $_ilch['url'];
 $_ilch['url'] = arlistee($dllink, get_downloads_ar());
 $_ilch['url'] = '<option value="neu">andere:</option>' . $_ilch['url'];
 archiv_downs_admin_selectcats('0', '', $_ilch['cat'], $_ilch['cat']);
 $_ilch['cat'] = '<option value="0">Keine</option>' . $_ilch['cat'];
 if (!isset($azk)) {
     $azk = 0;
     if ($menu->getA(2) == 'S' or $menu->getA(2) == 'E') {
         $azk = $menu->getE(2);
         if ($menu->get(2) == 'Sa') {
             $azk = -1;
         }
     }
 }
 // wenn userupload on und writeable dann koennen user
 // dateien hochladen, also wird als kategorie link noch ein "freischalt" link hinzugefueght.
 $frei = '';
Example #6
0
$sAPIURL = 'http://' . $sRegion . '.battle.net/api/wow/';
$sRequestURL = $sAPIURL . 'realm/status';
$sResponse = @file_get_contents($sRequestURL, true);
$decode = json_decode($sResponse, true);
$realms = array();
foreach ($decode['realms'] as $realm) {
    $realms[] = htmlentities($realm['name']);
}
$realms = array_combine($realms, $realms);
$csrfCheck = chk_antispam('admin_allg', true);
if (empty($_POST['submit']) || !$csrfCheck) {
    $gfx = admin_allg_gfx($allgAr['gfx']);
    $smodul = admin_allg_smodul($allgAr['smodul']);
    $wars_last_komms = admin_allg_wars_last_komms($allgAr['wars_last_komms']);
    $serverregion = admin_allg_serverregion($allgAr['serverregion']);
    $realmname = arlistee($allgAr['realmname'], $realms);
    echo '<table cellpadding="0" cellspacing="0" border="0"><tr><td><img src="include/images/icons/admin/konfiguration.png" /></td><td width="30"></td><td valign="bottom"><h1>Konfiguration</h1></td></tr></table>';
    echo '<form action="admin.php?allg" method="POST">';
    echo '<table cellpadding="3" cellspacing="1" class="border" border="0">';
    #	echo '<tr class="Chead"><td colspan="2"><b>Konfiguration</b></td></tr>';
    $ch = '';
    $abf = 'SELECT * FROM `prefix_config` ORDER BY kat,pos,typ ASC';
    $erg = db_query($abf);
    while ($row = db_fetch_assoc($erg)) {
        if ($ch != $row['kat']) {
            echo '<tr><td colspan="2" class="Cdark"><b>' . $row['kat'] . '</b></td></tr>';
        }
        echo '<tr><td class="Cmite">' . $row['frage'] . '</td>';
        echo '<td class="Cnorm">';
        if ($row['typ'] == 'input') {
            echo '<input size="50" type="text" name="' . $row['schl'] . '" value="' . $row['wert'] . '">';
Example #7
0
    $clanpage = get_homepage($clanpage);
    # als upcoming war vormerken (kategorie 1)
    db_query("INSERT INTO prefix_wars (datime,`status`,gegner,tag,page,mail,icq,wo,tid,`mod`,game,mtyp,land,txt) VALUES ('" . $datum . "','1','" . $clanname . "','" . $clantag . "','" . $clanpage . "','" . $mailaddy . "','" . $icqnumber . "','" . $meetingplace . "','" . $squad . "','" . $xonx . "','" . $game . "','" . $matchtype . "','" . $clancountry . "','" . $message . "')");
    # pm an den leader
    sendpm($_SESSION['authid'], $row['mod1'], 'Fightus Anfrage', $txt, -1);
    # Wenn Co Leader != Leader
    if ($row['mod1'] != $row['mod2']) {
        sendpm($_SESSION['authid'], $row['mod2'], 'Fightus Anfrage', $txt, -1);
    }
    if ($row['mod3'] != $row['mod2'] and $row['mod1'] != $row['mod3']) {
        sendpm($_SESSION['authid'], $row['mod3'], 'Fightus Anfrage', $txt, -1);
    }
    # informieren
    echo sprintf($lang['leaderofxalert'], $row['name']);
} else {
    $clancountry = arlistee($clancountry, get_nationality_array());
    $squad = '<option value="0">choose</option>';
    $squad .= dblistee($squad, "SELECT id,name FROM prefix_groups WHERE show_fightus = 1 ORDER BY pos");
    if (empty($meetingtime)) {
        $meetingtime = date('d.m.Y - H:i:s');
    }
    $tpl = new tpl('fightus.htm');
    foreach ($far as $v) {
        if ($x > 0 and empty($_POST[$v])) {
            echo 'missing: ' . $lang[$v] . '<br />';
        }
        $tpl->set($v, ${$v});
    }
    $tpl->set('ANTISPAM', get_antispam('fightus', 120));
    $tpl->out(0);
}
Example #8
0
     $anfang = ($page - 1) * $limit;
     $class = '';
     $grundrechte = simpleArrayFromQuery('SELECT `id`,`name` FROM `prefix_grundrechte` ORDER BY `id` ASC');
     $users = allRowsFromQuery('SELECT `name`,`recht`,`id` FROM `prefix_user` WHERE `name` LIKE "' . $q . '" ORDER BY `recht`,`posts` DESC LIMIT ' . $anfang . ',' . $limit, 'id');
     $userids = array_keys($users);
     $modulerights = allRowsFromQuery('SELECT * FROM `prefix_modulerights` WHERE `uid` < 1 OR `uid` IN (' . implode(',', $userids) . ') ORDER BY `uid`');
     $modulenames = simpleArrayFromQuery('SELECT `id`, `name` FROM `prefix_modules` WHERE `fright` = 1');
     foreach ($users as $row) {
         $class = $class == 'Cmite' ? 'Cnorm' : 'Cmite';
         $row['class'] = $class;
         $row['grouplist'] = user_get_group_list($row['id']);
         $row['modslist'] = user_get_mod_list($row['id'], $row['recht'], $modulenames, $modulerights);
         if (strlen($row['modslist']) > 90) {
             $row['modslist'] = substr($row['modslist'], 0, 87) . '...';
         }
         $row['recht'] = arlistee($row['recht'], $grundrechte);
         $tpl->set_ar_out($row, 1);
     }
     $tpl->set_out('MPL', $MPL, 2);
     $design->footer();
     break;
     // gruppen zugehoerigkeiten eines users aendern
 // gruppen zugehoerigkeiten eines users aendern
 case 'gruppen':
     $uid = $menu->get(2);
     if (isset($_POST['usergroups']) and chk_antispam('adminuser_action', true)) {
         $erg = db_query("SELECT `id` FROM `prefix_groups`");
         while ($row = db_fetch_assoc($erg)) {
             $ck = db_count_query("SELECT COUNT(`uid`) FROM `prefix_groupusers` WHERE `uid` = " . $uid . " AND `gid` = " . $row['id']);
             if ($ck == 0 and isset($_POST['grprhave'][$row['id']][$uid])) {
                 db_query("INSERT INTO `prefix_groupusers` (`uid`,`gid`,`fid`) VALUES ( " . $uid . ", " . $row['id'] . ", 3 )");
Example #9
0
            echo '<tr><td>schon in der Datenbank oder Datei nicht vorhanden</td><td>' . $url . '</td><td>' . $emo . '</td><td>' . $ent . '</td></tr>';
        } else {
            db_query("INSERT INTO prefix_smilies (emo,ent,url) VALUES ('" . $emo . "','" . $ent . "','" . $url . "')");
            echo '<tr><td>eingetragen</td><td><img src="include/images/smiles/' . $url . '"></td><td>' . $emo . '</td><td>' . $ent . '</td></tr>';
        }
    }
    echo '</table><br /><br />';
}
$ar = array('url' => '', 'ent' => '', 'emo' => '', 'id' => '');
if ($menu->getA(1) == 'e' and is_numeric($menu->getE(1))) {
    $ar = db_fetch_assoc(db_query("SELECT url, ent, emo, id FROM prefix_smilies WHERE id = " . $menu->getE(1)));
}
$smilies_ar = getsmiliear();
$ar['surl'] = empty($ar['url']) ? key($smilies_ar) : $ar['url'];
$ar['url'] = arlistee($ar['url'], $smilies_ar);
$ar['pakfile'] = arlistee('', getpakar());
$tpl = new tpl('smilies', 1);
$tpl->set_ar_out($ar, 0);
$i = 0;
$class = 'Cnorm';
$o = opendir('include/images/smiles');
while ($f = readdir($o)) {
    if ($f == '.' or $f == '..' or 0 != db_result(db_query("SELECT COUNT(*) FROM prefix_smilies WHERE url = '" . $f . "'"), 0)) {
        continue;
    }
    # eintrage wenn vorhanden...
    if (isset($_POST['chk'][$f])) {
        if ($_POST['ak'] == 1) {
            $ent = escape($_POST['ent'][$f], 'string');
            $emo = escape($_POST['emo'][$f], 'string');
            $url = escape($f, 'string');
Example #10
0
 }
 if (!empty($_GET['pkey'])) {
     $erg = db_query("SELECT DATE_FORMAT(`datime`,'%d.%m.%Y.%H.%i.%s') as `datime`, `id`,`status`,`gegner`,`tag`,`page`,`mail`,`icq`,`wo`,`tid`,`mod`,`game`,`mtyp`,`land`,`txt` FROM `prefix_wars` WHERE `id` = '" . $_GET['pkey'] . "'");
     $_ilch = db_fetch_assoc($erg);
     list($_ilch['day'], $_ilch['mon'], $_ilch['jahr'], $_ilch['stu'], $_ilch['min'], $_ilch['sek']) = explode('.', $_ilch['datime']);
     $_ilch['kalck'] = db_result(db_query("SELECT COUNT(*) FROM `prefix_kalender` WHERE `text` LIKE '%more-" . $_GET['pkey'] . "]%'"), 0, 0) == 1 ? ' checked' : '';
     $_ilch['pkey'] = $_GET['pkey'];
 } else {
     $_ilch = array('tag' => '', 'mail' => '', 'icq' => '', 'wo' => '', 'pkey' => '', 'wlp' => '', 'erg1' => '', 'erg2' => '', 'gegner' => '', 'page' => 'http://', 'mtyp' => '', 'tid' => 0, 'land' => '', 'txt' => '', 'mod' => '', 'game' => '', 'day' => date('d'), 'mon' => date('m'), 'jahr' => date('Y'), 'stu' => date('H'), 'min' => date('i'), 'sek' => date('s'), 'kalck' => '');
 }
 $_ilch['msg'] = isset($msg) ? $msg : '';
 $_ilch['tid'] = dblistee($_ilch['tid'], "SELECT `id`, `name` FROM `prefix_groups` ORDER BY `name`");
 $_ilch['mod'] = dblistee($_ilch['mod'], "SELECT DISTINCT `mod`,`mod` FROM `prefix_wars` ORDER BY `mod`");
 $_ilch['game'] = dblistee($_ilch['game'], "SELECT DISTINCT `game`,`game` FROM `prefix_wars` ORDER BY `game`");
 $_ilch['mtyp'] = dblistee($_ilch['mtyp'], "SELECT DISTINCT `mtyp`,`mtyp` FROM `prefix_wars` ORDER BY `mtyp`");
 $_ilch['land'] = arlistee($_ilch['land'], get_nationality_array());
 $_ilch['ANTISPAM'] = get_antispam('adminuser_action', 0, true);
 $tpl->set_ar_out($_ilch, 0);
 $page = $menu->getA(2) == 'p' ? $menu->getE(2) : 1;
 $class = '';
 if ($page == 1) {
     $abf = "SELECT `id`,`gegner`,`game` FROM `prefix_wars` WHERE `status` = 1 ORDER BY `id` DESC";
     $erg = db_query($abf);
     while ($r = db_fetch_assoc($erg)) {
         $class = $class == 'Cmite' ? 'Cnorm' : 'Cmite';
         $r['class'] = $class;
         $r['game'] = get_wargameimg($r['game']);
         $tpl->set_ar($r);
         $tpl->out(1);
     }
 }
Example #11
0
     $ar['zeigenno'] = $ar['zeigen'] == 1 ? '' : 'checked';
     $ar['joinusja'] = $ar['show_joinus'] == 1 ? 'checked' : '';
     $ar['joinusno'] = $ar['show_joinus'] == 1 ? '' : 'checked';
     $ar['fightusja'] = $ar['show_fightus'] == 1 ? 'checked' : '';
     $ar['fightusno'] = $ar['show_fightus'] == 1 ? '' : 'checked';
 } else {
     $ar = array('name' => '', 'img' => '', 'mod1' => '', 'mod2' => '', 'mod3' => '', 'mod4' => '', 'zeigenja' => '', 'zeigenno' => 'checked', 'ak' => 'ins', 'gid' => '', 'fightusja' => '', 'fightusno' => 'checked', 'joinusja' => '', 'joinusno' => 'checked');
 }
 $ar['mods1'] = dbliste($ar['mod1'], $tpl, 'mods1', "SELECT id,name FROM prefix_user WHERE recht <= -4 ORDER BY name");
 $ar['mods2'] = dbliste($ar['mod2'], $tpl, 'mods2', "SELECT id,name FROM prefix_user WHERE recht <= -4 ORDER BY name");
 $ar['mods3'] = dbliste($ar['mod3'], $tpl, 'mods3', "SELECT id,name FROM prefix_user WHERE recht <= -4 ORDER BY name");
 $ar['mods4'] = dbliste($ar['mod4'], $tpl, 'mods4', "SELECT id,name FROM prefix_user WHERE recht <= -4 ORDER BY name");
 $ar['mods2'] = '<option value="0">keiner</option>' . $ar['mods2'];
 $ar['mods3'] = '<option value="0">keiner</option>' . $ar['mods3'];
 $ar['mods4'] = '<option value="0">keiner</option>' . $ar['mods4'];
 $ar['pic'] = arlistee($ar['img'], get_teampic_ar());
 $ar['pic'] = '<option value="0">kein Bild<option>' . $ar['pic'];
 $ar['msg'] = empty($msg) ? '' : '<table width="50%" cellpadding="2" cellspacing="1" border="0" class="border"><tr><td class="Cnorm"><b>Nachricht:</b>&nbsp;' . $msg . '</td></tr></table>';
 $ar['joinu'] = '';
 if (0 < db_result(db_query("SELECT COUNT(*) FROM prefix_usercheck WHERE ak = 4"), 0)) {
     $ar['joinu'] = '<a href="admin.php?groups-joinus"><b>Joinus Anfragen bearbeiten</b></a><br /><br />';
 }
 $tpl->set_ar_out($ar, 0);
 $class = 'Cnorm';
 $erg = db_query("SELECT name,id FROM prefix_groups ORDER BY pos ASC");
 while ($row = db_fetch_assoc($erg)) {
     $row['useranz'] = db_count_query("SELECT COUNT(uid) FROM prefix_groupusers WHERE gid = " . $row['id']);
     $class = $class == 'Cnorm' ? 'Cmite' : 'Cnorm';
     $row['class'] = $class;
     $tpl->set_ar_out($row, 1);
 }
Example #12
0
            $grl = dblistee($allgAr[$row['schl']], "SELECT id,name FROM prefix_grundrechte ORDER BY id ASC");
            $input = '<select name="' . $row['schl'] . '">' . $grl . '</select>';
        } elseif ($row['typ'] == 'grecht2') {
            $grl = dblistee($allgAr[$row['schl']], "SELECT id,name FROM prefix_grundrechte WHERE id >= -2 ORDER BY id ASC");
            $input = '<select name="' . $row['schl'] . '">' . $grl . '</select>';
        } elseif ($row['typ'] == 'password') {
            $input = '<input size="50" type="password" name="' . $row['schl'] . '" value="***" />';
        } elseif ($row['typ'] == 'select' and !is_null($row['typextra'])) {
            $typextra = json_decode($row['typextra'], true);
            if (isset($typextra['values'])) {
                if (isset($typextra['keys'])) {
                    $teAr = array_combine($typextra['keys'], $typextra['values']);
                } else {
                    $teAr = array_combine($typextra['values'], $typextra['values']);
                }
                $grl = arlistee($allgAr[$row['schl']], $teAr);
                $input = '<select name="' . $row['schl'] . '">' . $grl . '</select>';
            } else {
                $input = 'Fehler in Datenbank!';
            }
        }
        $tpl->set_ar_out(array('frage' => $row['frage'], 'input' => $input, 'schl' => $row['schl'], 'help' => is_null($row['helptext']) ? 0 : 1, 'helptext' => $row['helptext']), 4);
    }
    // Kategorien-Ende ausgeben, falls nötig
    if ($katid != 0) {
        $tpl->out(5);
    }
    // Template-Footer ausgeben
    $tpl->set('antispam', get_antispam('admin_allg', 1, true));
    $tpl->out(6);
} elseif (chk_antispam('admin_allg', true)) {