<?php
defined (
'main'
)
or
die
(
'no direct access'
);
$abf
=
"SELECT * FROM prefix_user WHERE id = "
.
$menu
->get(2);
$erg
= db_query(
$abf
);
$DA_IS_WAS_FAUL
= FALSE;
if
( @db_num_rows(
$erg
) <> 1 ) {
$DA_IS_WAS_FAUL
= TRUE;
}
$row
= db_fetch_assoc(
$erg
);
if
(
$row
[
'opt_mail'
] == 0 ) {
$DA_IS_WAS_FAUL
= TRUE;
}
if
(
$DA_IS_WAS_FAUL
=== TRUE ) {
header (
'location: index.php?'
.
$allAr
[
'smodul'
] );
exit
();
}
$title
=
$allgAr
[
'title'
].
' :: Bewerbung an '
;
$hmenu
=
$extented_forum_menu
.
'<a class="smalfont" href="?bewerbung">Bewerbung</a><b> » </b> Bewerbung an '
.
$extented_forum_menu_sufix
;
$design
=
new
design (
$title
,
$hmenu
, 1);
$design
->header();
$tpl
=
new
tpl (
'bewerbung.htm'
);
$tpl
->out(0);
if
( !
array_key_exists
(
'klicktime'
,
$_SESSION
) ) {
$_SESSION
[
'klicktime'
] =
''
;
}
#
var
defination
$mail
=
"die email des Empfängers"
;
$_POST
[
'absender'
] = ( isset(
$_POST
[
'absender'
]) ? trim (
$_POST
[
'absender'
]) :
''
);
$_POST
[
'titel'
] = ( isset(
$_POST
[
'titel'
]) ? trim (
$_POST
[
'titel'
]) :
''
);
$_POST
[
'inhalt'
] = ( isset(
$_POST
[
'inhalt'
]) ? trim (
$_POST
[
'inhalt'
]) :
''
);
$header
=
'From: webmaster@example.com'
.
"\r\n"
.
'Reply-To: webmaster@example.com'
.
"\r\n"
.
'X-Mailer: PHP/'
. phpversion();
if
(
empty
(
$_POST
[
'titel'
]) OR
empty
(
$_POST
[
'absender'
]) OR
empty
(
$_POST
[
'inhalt'
]) OR
$_SESSION
[
'klicktime'
] > (time() - 60) ) {
if
( !
empty
(
$_POST
[
'absenden'
]) ) {
$fehler
=
'<font color="#FF0000">Fehler:</font><br>'
;
if
(
$_SESSION
[
'klicktime'
] > (time() - 60) ) {
$fehler
.=
' - Bitte nicht so schnell eMails Schreiben<br>'
;
}
if
( !
empty
(
$_POST
[
'absender'
]) ==
''
) {
$fehler
.=
' - Bitte einen Absender angeben<br>'
;
}
if
( !
empty
(
$_POST
[
'geschlecht'
]) ==
''
) {
$fehler
.=
' - Bitte ein Geschlecht angeben<br>'
;
}
if
( !
empty
(
$_POST
[
'alter'
]) ==
''
) {
$fehler
.=
' - Bitte ein Alter angeben<br>'
;
}
if
( !
empty
(
$_POST
[
'skype'
]) ==
''
) {
$fehler
.=
' - Bitte Skype Namen angeben<br>'
;
}
if
( !
empty
(
$_POST
[
'titel'
]) ==
''
) {
$fehler
.=
' - Bitte einen Bewerbungs Titel angeben<br>'
;
}
if
( !
empty
(
$_POST
[
'inhalt'
]) ==
''
) {
$fehler
.=
' - Bitte eine Bewerbung schreiben<br>'
;
}
}
else
{
$fehler
=
''
;
}
echo
$fehler
;
?>
<form name=
"bewerbung"
action=
"index.php?bewerbung<?php echo $menu->get(2) ?>"
method=
"POST"
enctype=
"text/html"
>
<table width=
"558"
height=
"717"
align=
"center"
border=
"0"
cellpadding=
"0"
cellspacing=
"0"
>
<tr>
<td width=
"558"
height=
"102"
align=
"center"
valign=
"middle"
background=
"/include/images/bewerbung_01.gif"
><font color=
"#FFFFFF"
size=
"+3"
>Whitesharks Bewerbung</font> </td>
</tr>
<tr>
<td width=
"558"
height=
"615"
align=
"center"
valign=
"top"
background=
"/include/images/bewerbung_02.gif"
>
<table width=
"100%"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
>
<tr>
<td width=
"250"
> <font color=
"#FFFFFF"
>Absender:</font></td>
<td>
<input type=
"text"
name=
"absender"
value=
"<?php echo $_POST['absender']; ?>"
size=
"20"
maxlength=
"50"
/></td>
</tr>
<tr>
<td width=
"250"
> <font color=
"#FFFFFF"
>Geschlecht:</font><br />
<input type=
"radio"
name=
"geschlecht"
value=
"Männlich"
/>
<font color=
"#FFFFFF"
>Mann
<input type=
"radio"
name=
"geschlecht"
value=
"Weiblich"
/>
Frau</font></td>
</tr>
<tr>
<td width=
"250"
> <font color=
"#FFFFFF"
>Alter</font> </td>
<td> <input type=
"text"
name=
"alter"
value=
"<?php echo $_POST['alter']; ?>"
size=
"7"
maxlength=
"50"
/><br /></td>
</tr>
<tr>
<td width=
"250"
height=
"15"
> </td>
</tr>
<tr>
<td width=
"250"
> <font color=
"#FFFFFF"
>Skype:</font> </td>
<td> <input type=
"text"
name=
"skype"
value=
"<?php echo $_POST['skype']; ?>"
size=
"20"
maxlength=
"50"
/><br /></td>
</tr>
<tr>
<td width=
"250"
height=
"15"
> </td>
</tr>
<tr>
<td width=
"250"
> <font color=
"#FFFFFF"
>Bewerbungs Titel:</font> </td>
<td><input type=
"text"
name=
"titel"
value=
"<?php echo $_POST['titel']; ?>"
size=
"40"
maxlength=
"50"
/></td>
</tr>
</table>
<u><font color=
"#FFFFFF"
>Bewerbung</font></u><br />
<textarea name=
"inhalt"
rows=
"15"
cols=
"60"
><?php
echo
$_POST
[
'inhalt'
]; ?>
</textarea>
<br />
<table width=
"65%"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
>
<tr>
<td height=
"52"
align=
"center"
><input type=
"submit"
name=
"absenden"
value=
"<?php echo $lang['formsub']; ?>"
/></td>
</tr>
</table>
</table>
</form>
<?php
}
else
{
$_SESSION
[
'klicktime'
] = time();
if
( 1 ==
$row
[
'opt_mail'
] ) {
icmail (
$mail
,
strip_tags
(
$_POST
[
'titel'
]),
strip_tags
(
$_POST
[
'inhalt'
]),
'SeitenKontakt <'
.escape_for_email(
$_POST
[
'absender'
],
$header
).
'>'
);
wd (
'index.php?forum'
,
'Die eMail wurde erfolgreich versendet'
);
}
else
{
header (
'location: index.php?'
.
$allAr
[
'smodul'
] );
exit
();
}
}
$tpl
->out(2);
$design
->footer();
?>