Hope the english translate is good ^^ :
<?php
//
// TorrentTrader v2.x
// Created by M@f!eusO http://www.topliens.net
// Modified by Mcgyver http://www.visualtracker.net
// http://www.torrenttrader.org
//
//
require_once("backend/functions.php");
require_once("backend/config.php");
dbconn(false);
loggedinonly();
stdhead("Contact");
begin_frame("Contact The Webmaster");
//For all parameters -> 1 = yes; 0 = no
$topic = array('Technical','Suggest','Other'); // Topic suggestion for the message (for added more, use the exempleof the 3 suggestion)
$urgent_choice = 1; // You can choose to actived or no the "urgent" method, therefore the member can warned if his mail si urgent or no
$name_choice = 1; // Forced name ?
$your_mail = 1; // Show directly your mail ?
//
// Don't alter these lines
//
if(isset($_POST['submit']) && $_POST['submit'] == 'ok')
// If we submit something
{
$answer = '<br />';
$mail = htmlentities($_POST['mail']); // recover mail
$name = htmlentities($_POST['name']); // the name
$topic = htmlentities($_POST['topic']); // topic
$message = nl2br(htmlentities($_POST['message'])); // the message
$urgent = htmlentities($_POST['urgent']); // type of message
if($name_choice == 1)
// If name forced
{
if(!empty($name))
// If field corret put 1
{
$Sname = 1;
}
elseif(empty($name))
// If put 0
{
$Sname = 0;
}
}
else
// If field not activated put 1
{
$Sname = 1;
}
if(!empty($mail) && !empty($message) && $topic != '' && $Sname == 1)
// Check if the mail, message and topic are correctly here and showing
{
// Content message
$content = "MIME-Version: 1.0\r\n";
$content .= "Content-type: text/html; charset=iso-8859-1\r\n";
$content .= "From: <$mail>\r\n";
$content .= "Reply-To: $mail\r\n";
$email = ''; // Value of the message to send
if($urgent == 1) // If urgent message
$email .= '<strong>Urgent message !!</strong><br />';
if(empty($name))
$name = 'NA';
// Message created
$email .= 'You receive this message from your site <u>' .$site_config['SITENAME']. '</u> for <strong>' .$topic[$topic]. '</strong> reason.<br />Email from : ' .$mail. '<br /><br />';
$email .= 'The message of <u>' .$name. '</u> is :<br />-----<br />';
$email .= $message;
$email = stripslashes($email);
mail($site_config['SITEEMAIL'], 'Message from ' . $CURUSER["username"] . ': ' .$topic[$topic], $email, $content); // Send the result
$answer .= 'your message was send to the webmaster with success. We thank you.<br />'; // Say all be ok
}
else
{
$answer .= 'Thanks to completed all requiered field.<br />'; // Say if error
}
}
?>
<form name="form1" method="post" action="">
<p><strong><?php echo $answer; ?></strong></p>
<fieldset><legend>Contact sheet</legend>
<?php
if($your_mail == 1)
{
echo '<p>Webmaster email : <u>' . $site_config['SITEEMAIL'] . '</u></p>';
}
?>
<p><label>Your mail : <input type="text" name="mail" value="<? print("" . $CURUSER["email"] . "\n");?>">*</label></p>
<p><label>Your name : <input type="text" name="nom" value="<? print("" . $CURUSER["username"] . "\n");?>">*</label></p>
<p>Topic Message :
<select name="topic">
<?php
for($i = 0; $i < count($topic); $i++)
{
echo '<option value="' .$i. '">' .$topic[$i]. '</option>';
}
?>
</select>*
</p>
<?php
if($urgent_choice == 1)
{
echo '<p>Your message is urgent ? :<br />';
echo '<label><input type="radio" name="urgent" value="1"> Yes</label><br />';
echo '<label><input type="radio" name="urgent" value="0" checked> No</label><br />';
echo '<font color="#FF0000">(Thanks for don't abuse about urgent stuff)</font></p>';
}
?>
<p>
Your message : <br />
<textarea name="message" cols="55" rows="10"></textarea>*
</p>
<p>
<input type="hidden" name="submit" value="ok">
<input type="submit" name="Submit" value="submit">
<input type="reset" name="Submit2" value="refresh">
</p>
<p>* <font color="#FF0000">Required Field</font>.
</fieldset>
</form>
<?
end_frame();
stdfoot();
?>