コード例 #1
0
ファイル: joinus.php プロジェクト: rjdesign/Ilch-1.2
    $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 />';
    }
    $name = $xname;
コード例 #2
0
ファイル: wars.php プロジェクト: kveldscholten/Ilch-1.1
     $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') {
     $tpl->out(4);
     $sqla = 'WHERE status = 3 ' . (!empty($wheres) ? ' AND ' . implode(' AND ', $wheres) : '');
     // seiten funktion
     $limit = $allgAr['wars_last_limit'];
     // Limit
     if (isset($_POST['page']) and is_numeric($_POST['page']) and $_POST['page'] >= 1) {
         $menu->set_url(2, 'p' . intval($_POST['page']));
     }
     $page = $menu->getA(2) == 'p' ? $menu->getE(2) : 1;
     $MPL = db_make_sites($page, $sqla, $limit, "?wars-last", 'wars');
     $MPL = preg_replace('%-p(\\d+)"%', '$0 onclick="return loadLWPage($1);"', $MPL);
     $anfang = ($page - 1) * $limit;
コード例 #3
0
ファイル: allg.php プロジェクト: kveldscholten/Ilch-1.1
                $checkedn = 'checked';
                $checkedj = '';
            }
            echo '<input type="radio" name="' . $row['schl'] . '" value="1" ' . $checkedj . ' > ja';
            echo '&nbsp;&nbsp;';
            echo '<input type="radio" name="' . $row['schl'] . '" value="0" ' . $checkedn . ' > nein';
        } elseif ($row['typ'] == 's') {
            $vname = $row['schl'];
            echo '<select name="' . $row['schl'] . '">' . ${$vname} . '</select>';
        } elseif ($row['typ'] == 'textarea') {
            echo '<textarea cols="55" rows="3" name="' . $row['schl'] . '">' . $row['wert'] . '</textarea>';
        } elseif ($row['typ'] == 'grecht') {
            $grl = dblistee($allgAr[$row['schl']], "SELECT id,name FROM prefix_grundrechte ORDER BY id ASC");
            echo '<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");
            echo '<select name="' . $row['schl'] . '">' . $grl . '</select>';
        } elseif ($row['typ'] == 'password') {
            echo '<input size="50" type="password" name="' . $row['schl'] . '" value="***" />';
        }
        echo '</td></tr>' . "\n\n";
        $ch = $row['kat'];
    }
    echo '<tr class="Cdark"><td></td><td><input type="submit" value="Absenden" name="submit"></td></tr>';
    echo '</table>';
    echo get_antispam('admin_allg', 0, true);
    echo '</form>';
} elseif ($csrfCheck) {
    $abf = 'SELECT * FROM `prefix_config` ORDER BY kat';
    $erg = db_query($abf);
    while ($row = db_fetch_assoc($erg)) {
コード例 #4
0
ファイル: adminmenu.php プロジェクト: rjdesign/Ilch-1.2
         $class = $class == 'Cmite' ? 'Cnorm' : 'Cmite';
         $tpl->set_ar_out(array('class' => $class, 'id' => $row['id'], 'name' => $row['name'], 'url' => $row['url'], 'pos' => $row['pos']), 4);
     }
     // Tabellenuebergang
     $tpl->out(1);
     // Aendern oder Einfuegen
     if ($aid == 'edit') {
         $mid = $menu->get(3);
         $erg = db_query('SELECT `pos`, `menu` FROM `prefix_modules` WHERE `id` = ' . $mid);
         $row = db_fetch_assoc($erg);
         $kat = getKats($row['menu']);
         $modul = dblistee($mid, 'SELECT `id`, `name` FROM `prefix_modules` WHERE (`menu` = "" AND (`gshow` = 1 OR `ashow` = 1)) OR `id` = ' . $mid . ' ORDER BY `name` ASC');
         $tpl->set_ar_out(array('aname' => 'Eintrag bearbeiten', 'modul' => $modul, 'kat' => $kat, 'pos' => $row['pos'], 'ANTISPAM' => get_antispam('adminuser_action', 0, true)), 5);
     } else {
         $kat = getKats();
         $modul = dblistee('', 'SELECT `id`, `name` FROM `prefix_modules` WHERE `menu` = "" AND (`gshow` = 1 OR `ashow` = 1) ORDER BY `name` ASC');
         $tpl->set_ar_out(array('aname' => 'Eintrag hinzuf&uuml;gen', 'modul' => $modul, 'kat' => $kat, 'pos' => $row['pos'], 'ANTISPAM' => get_antispam('adminuser_action', 0, true)), 5);
     }
     // Template-Footer
     $tpl->out(2);
     break;
 case 'del':
     // Betroffene Modul-ID
     $mid = $menu->get(3);
     // Aktuelle Position und Menus abfragen
     $erg = db_query('SELECT `pos`, `menu` FROM `prefix_modules` WHERE `id` = ' . $mid . ' LIMIT 0, 1');
     $row = db_fetch_assoc($erg);
     // Postitionen des alten Menues neu speichern und Modul-Kat zuruecksetzen
     db_query('UPDATE `prefix_modules` SET `pos` = `pos` -1 WHERE `menu` = "' . $row['menu'] . '" AND `pos` > ' . $row['pos']);
     db_query('UPDATE `prefix_modules` SET `menu` = "", `pos` = NULL WHERE `id` = ' . $mid);
     wd('admin.php?modules-adminmenu', 'Eintrag gel&ouml;scht');
コード例 #5
0
ファイル: archiv.php プロジェクト: kveldscholten/Ilch-1.1
         $class = $class == 'Cmite' ? 'Cnorm' : 'Cmite';
         $row['class'] = $class;
         $tpl->set_ar($row);
         $tpl->out(1);
     }
     // downs
     $tpl->set_out('frei', $frei, 2);
     // cat
     if ($menu->getA(2) == 'E') {
         $erg = db_query("SELECT id,cat as Ccat, recht as Crecht, name as Cname,pos as Cpos,`desc` as Cdesc FROM prefix_downcats WHERE id = '" . $menu->getE(2) . "'");
         $_Cilch = db_fetch_assoc($erg);
         $_Cilch['Cpkey'] = $menu->getE(2);
     } else {
         $_Cilch = array('Ccat' => '', 'Cpkey' => '', 'Cpos' => '', 'Cname' => '', 'Crecht' => '', 'Cdesc' => '');
     }
     $_Cilch['Crecht'] = dblistee($_Cilch['Crecht'], "SELECT id,name FROM prefix_grundrechte ORDER BY id DESC");
     archiv_downs_admin_selectcats('0', '', $_Cilch['Ccat'], $_Cilch['Ccat']);
     $_Cilch['Ccat'] = '<option value="0">Keine</option>' . $_Cilch['Ccat'];
     archiv_downs_admin_showcats(0, '');
     $tpl->set_ar($_ilch);
     $tpl->set_ar($_Cilch);
     $tpl->out(3);
     $design->footer();
     break;
     // # # # # # # # # # # # # # # # # # #
     // Links
 // # # # # # # # # # # # # # # # # # #
 // Links
 case 'links':
     $design = new design('Admins Area', 'Admins Area', 2);
     $design->header();
コード例 #6
0
ファイル: user.php プロジェクト: kveldscholten/Ilch-1.1
                    $tpl->set('page', $page);
                    $txt = $tpl->get(0);
                    unset($tpl);
                    icmail($_POST['email'], 'Admin hat dich angelegt', $txt);
                }
                $msg = 'Benutzer angelegt <a href="javascript:closeThisWindow()">Fenster schließen</a>';
            }
        }
        $pass = '';
        $email = '';
        $recht = '';
        if (isset($_POST['pass'])) {
            $pass = $_POST['pass'];
        }
        if (isset($_POST['email'])) {
            $email = $_POST['email'];
        }
        if (isset($_POST['recht'])) {
            $recht = $_POST['recht'];
        } else {
            $recht = '-1';
        }
        $tpl = new tpl('user/new_user', 1);
        $tpl->set('msg', $msg);
        $tpl->set('pass', $pass);
        $tpl->set('email', $email);
        $tpl->set('recht', dblistee($recht, "SELECT id,name FROM prefix_grundrechte ORDER BY id ASC"));
        $tpl->set('antispam', get_antispam('adminuser_create', 0, true));
        $tpl->out(0);
        break;
}
コード例 #7
0
ファイル: fightus.php プロジェクト: kveldscholten/Ilch-1.1
    # 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);
}
$design->footer();
コード例 #8
0
ファイル: gallery.php プロジェクト: rjdesign/Ilch-1.2
$class = 0;
$abf = "SELECT `id`,`besch`,`datei_name`,`endung` FROM `prefix_gallery_imgs` WHERE `cat` = " . $azk;
$erg = db_query($abf);
$i = 0;
while ($row = db_fetch_assoc($erg)) {
    $class = $class == 'Cmite' ? 'Cnorm' : 'Cmite';
    $row['class'] = $class;
    if ($i != 0 and $i % $allgAr['gallery_imgs_per_line'] == 0) {
        echo '</tr><tr>';
    }
    $tpl->set_ar_out($row, 1);
    $i++;
}
// links
$tpl->out(2);
// cat
if ($menu->getA(1) == 'E') {
    $erg = db_query("SELECT `id`,`cat` as `Ccat`, `recht` as `Crecht`, `name` as `Cname`,`pos` as `Cpos`,`besch` as `Cdesc` FROM `prefix_gallery_cats` WHERE `id` = '" . $menu->getE(1) . "'");
    $_Cilch = db_fetch_assoc($erg);
    $_Cilch['Cpkey'] = $menu->getE(1);
} else {
    $_Cilch = array('Ccat' => '', 'Cpkey' => '', 'Cpos' => '', 'Cname' => '', 'Crecht' => '', 'Cdesc' => '');
}
// $_Cilch['Crecht'] = arlistee($_Cilch['Crecht'],getFuerAr());
gallery_admin_selectcats('0', '', $_Cilch['Ccat'], $_Cilch['Ccat']);
$_Cilch['Ccat'] = '<option value="0">Keine</option>' . $_Cilch['Ccat'];
$_Cilch['Crecht'] = dblistee($_Cilch['Crecht'], "SELECT `id`,`name` FROM `prefix_grundrechte` ORDER BY `id` DESC");
gallery_admin_showcats(0, '');
$tpl->set_ar($_Cilch);
$tpl->out(3);
$design->footer();
コード例 #9
0
}
if (isset($_GET['m']) and $_GET['m'] == 'm') {
    if (isset($_POST['sub'])) {
        # immer alle loeschen und dann alle eintragen fals gewuenscht hort sich doch
        # logisch an und ist es auch.
        $mid = escape($_POST['md'], 'integer');
        $gr = escape($_POST['gr'], 'integer');
        db_query("DELETE FROM prefix_modulerights USING prefix_modulerights, prefix_user WHERE prefix_user.id = prefix_modulerights.uid AND prefix_modulerights.mid = " . $mid . " AND prefix_user.recht = " . $gr);
        if ($_POST['ak'] == 1) {
            db_query("INSERT INTO prefix_modulerights (mid,uid) SELECT " . $mid . " as mid, id as uid FROM prefix_user WHERE recht = " . $gr);
        }
        wd(array('Grundrechten' => 'admin.php?grundrechte', 'Userverwalten' => 'admin.php?user', 'zur&uuml;ck zu Modulrechte' => 'admin.php?grundrechte=0&amp;m=m'), 'Die ge&uuml;nschte Operation wurde ausgef&uuml;hrt... Bitte &uuml;berpr&uuml;fen!!', 66);
        $design->footer(1);
    }
    $grl = dblistee('', "SELECT id, name FROM prefix_grundrechte ORDER BY id ASC");
    $mdl = dblistee('', "SELECT id, name FROM prefix_modules ORDER BY name");
    ?>

  <form action="admin.php?grundrechte=0&amp;m=m" method="POST">
  <table cellpadding="2" cellspacing="0" border="0">
    <tr>
      <td>Allen</td>
      <td><select name="gr"><?php 
    echo $grl;
    ?>
</select></td>
      <td>das Modulrecht</td>
      <td><select name="md"><?php 
    echo $mdl;
    ?>
</select></td>
コード例 #10
0
ファイル: wars.php プロジェクト: rjdesign/Ilch-1.2
     }
 }
 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);
     }
コード例 #11
0
ファイル: fightus.php プロジェクト: rjdesign/Ilch-1.2
    $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 = '<option></option>';
    $clancountry .= arlistee($clancountry, get_nationality_array());
    $squad = '<option></option>';
    $squad .= dblistee($squad, "SELECT `id`,`name` FROM `prefix_groups` WHERE `show_fightus` = 1 ORDER BY pos");
    $tpl = new tpl('fightus.htm');
    foreach ($far as $v) {
        if ($x > 0 and empty($_POST[$v])) {
            $fehler .= '&middot;&nbsp;' . 'Bitte ' . $lang[$v] . ' angeben!<br />';
        }
        $tpl->set($v, ${$v});
    }
    $tpl->set('FEHLER', '<div id="formfehler">' . $fehler . '</div>');
    $tpl->set('ANTISPAM', get_antispam('fightus', 120));
    $tpl->out(0);
}
$design->footer();