# Copyright by: Manuel # Support: www.ilch.de defined('main') or die('no direct access'); $title = $allgAr['title'] . ' :: Users :: Profil'; $hmenu = $extented_forum_menu . '<a class="smalfont" href="?user">Users</a><b> » </b> Profil' . $extented_forum_menu_sufix; $design = new design($title, $hmenu, 1); if ($_SESSION['authright'] <= -1) { $csrfCheck = chk_antispam('user_profile_edit', true); if (empty($_POST['submit']) || !$csrfCheck) { $design->header(); $abf = 'SELECT email,wohnort,homepage,aim,msn,icq,yahoo,avatar,status,staat,gebdatum,sig,opt_pm_popup,opt_pm,opt_mail,geschlecht,spezrank FROM `prefix_user` WHERE id = "' . $_SESSION['authid'] . '"'; $erg = db_query($abf); if (db_num_rows($erg) > 0) { $row = db_fetch_assoc($erg); $tpl = new tpl('user/profil_edit'); $row['staat'] = '<option></option>' . arliste($row['staat'], get_nationality_array(), $tpl, 'staat'); $row['geschlecht0'] = $row['geschlecht'] < 1 ? 'checked' : ''; $row['geschlecht1'] = $row['geschlecht'] == 1 ? 'checked' : ''; $row['geschlecht2'] = $row['geschlecht'] == 2 ? 'checked' : ''; if ($row['status'] == 1) { $row['status1'] = 'checked'; $row['status0'] = ''; } else { $row['status1'] = ''; $row['status0'] = 'checked'; } if ($row['opt_mail'] == 1) { $row['opt_mail1'] = 'checked'; $row['opt_mail0'] = ''; } else { $row['opt_mail1'] = '';
} else { debug('Bild wurde NICHT gelöscht..!'); } db_query("DELETE FROM `prefix_opponents` WHERE id = " . $getid . ""); wd('admin.php?opponents', 'Gegner erfolgreich gelöscht', 3); $design->footer(1); } } break; case 'edit': if ($getid != 0 and !empty($getid)) { $getpicname = db_result(db_query("SELECT logo FROM `prefix_opponents` WHERE id = " . $getid . "")); $editqry = db_query("SELECT * FROM `prefix_opponents` WHERE id = " . $getid . ""); $outar = db_fetch_assoc($editqry); $outar['nationen'] = ''; $flagsar = get_nationality_array(); foreach ($flagsar as $key => $value) { if ($outar['nation'] == $key) { $outar['nationen'] .= '<option value="' . $key . '" selected="selected">' . $value . '</option>'; } else { $outar['nationen'] .= '<option value="' . $key . '" >' . $value . '</option>'; } } $outar['aktuellesLogo'] = '<img src="include/images/opponents/thumb_' . $outar['logo'] . '"/>'; if (isset($_POST['editsubmit']) and chk_antispam('adminuser_action', true)) { $editclantag = @escape($_POST['editgegnertag'], 'string'); $editclanname = @escape($_POST['editclanname'], 'string'); $editurl = escape($_POST['editwebsite'], 'url'); $editnation = escape($_POST['editnation'], 'string'); $editicq = escape($_POST['editicq'], 'integer'); $editemail = escape_for_email($_POST['editemail']);
$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); }
} 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); } }