HTML
<form action="index.php?fightus" method="POST">
<fieldset>
<legend>{_lang_basicinfo}</legend>
<label style="float:left; width:120px;">{_lang_joininfo}</label>{_lang_plsfilloutallfields}<br />
<label style="float:left; width:120px;">{_lang_clanname}</label><input type="text" name="clanname" value="{clanname}"><br />
<label style="float:left; width:120px;">{_lang_clantag}</label><input type="text" name="clantag" value="{clantag}"><br />
<label style="float:left; width:120px;">{_lang_clanpage}</label><input type="text" name="clanpage" value="{clanpage}"><br />
<label style="float:left; width:120px;">{_lang_clancountry}</label><select name="clancountry">{clancountry}</select><br />
<label style="float:left; width:120px;">{_lang_mailaddy}</label><input type="text" name="mailaddy" value="{mailaddy}"><br />
<label style="float:left; width:120px;">{_lang_icqnumber}</label><input type="text" name="icqnumber" value="{icqnumber}"><br />
<br />
{_lang_matchinfo}
<br />
<label style="float:left; width:120px;">{_lang_meetingplace}</label><input type="text" name="meetingplace" value="{meetingplace}"><br />
<label style="float:left; width:120px;">{_lang_meetingtime}</label><input type="text" name="meetingtime" value="{meetingtime}"><br />
<label style="float:left; width:120px;">{_lang_squad}</label><select name="squad">{squad}</select><br />
<label style="float:left; width:120px;">{_lang_xonx}</label><input type="text" name="xonx" value="{xonx}"><br />
<label style="float:left; width:120px;">{_lang_game}</label><input type="text" name="game" value="{game}"><br />
<label style="float:left; width:120px;">{_lang_matchtype}</label><input type="text" name="matchtype" value="{matchtype}"><br />
<br />
{_lang_otherinfo}
<br />
<label style="float:left; width:120px;">{_lang_message}</label><textarea cols="40" rows="5" name="message">{message}</textarea><br />
{ANTISPAM}
<label style="float:left; width:120px;"> </label><input type="submit" value="{_lang_send2}"><br />
</fieldset>
</form>
PhP
<?php
# Copyright by: Manuel
# Support: www.ilch.de
defined ('main') or die ( 'no direct access' );
$title = $allgAr['title'].' :: Fightus';
$hmenu = 'Fightus';
$design = new design ( $title , $hmenu );
$design->header();
if ( 0 == db_count_query("SELECT COUNT(*) FROM prefix_groups WHERE show_fightus = 1") ) {
echo $lang['noteamthere'];
$design->footer();
exit ();
}
$far = array (
'clanname',
'clanpage',
'clantag',
'clancountry',
'kname',
'mailaddy',
'icqnumber',
'squad',
'meetingplace',
'message',
'xonx',
'matchtype',
'game',
'meetingtime',
);
$x = 0;
foreach ($far as $v) {
if (!empty($_POST[$v])) {
$$v = escape($_POST[$v], 'string');
$x++;
} else {
$$v = '';
}
}
if (count($far) == $x AND chk_antispam('fightus')) {
$squad = escape($squad, 'integer');
$abf = "SELECT `mod1`,`mod2`, `mod3`,name FROM prefix_groups WHERE id = ".$squad;
$erg = db_query($abf);
$row = db_fetch_assoc($erg);
$txt = $lang['fightusrequest'];
list ($datum, $zeit) = explode (' - ', $meetingtime);
$datum = get_datum ($datum);
$datum = $datum." ".$zeit;
$clanpage = get_homepage ($clanpage);
# als upcoming war vormerken (kategorie 1)
db_query("INSERT INTO prefix_fightus (oname, otag, opage, oland, okontaktperson, oemail, oicq, server, datum, tid, xonx, spiel, matchtyp, nachricht) VALUES ('".$clanname."','".$clantag."','".$clanpage."','".$clancountry."','".$kname."','".$mailaddy."','".$icqnumber."','".$meetingplace."','".$datum."','".$squad."','".$xonx."','".$game."','".$matchtype."','".$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();
?>
bin jetzt kein Pro aber es ist ja in beiden drin