Hello!
McGyver mode [url='http://www.torrenttrader.pw/topic/10115-mod-contact/page__hl__contact.php']here[/url] re thank you!
One way for me to thank those who help me here!
Creates a file named contact.php
Add to languages
ENGLISH
[b]FRENCH
[b]Search account-login.php
after add
You could also add.. blocks/navigate_block.php
...I'm not perfect, You to me correct or modify!
UPDATE 15/01/2013[/b][/b]
McGyver mode [url='http://www.torrenttrader.pw/topic/10115-mod-contact/page__hl__contact.php']here[/url] re thank you!
One way for me to thank those who help me here!
Creates a file named contact.php
<?php
//
// TorrentTrader v2.x
// Created by M@f!eusO http://www.topliens.net
// Modified by Mcgyver http://www.visualtracker.net
// Modified by tiloup http://www.diamondsrooms.com
// http://www.torrenttrader.org
//
//
require_once("backend/functions.php");
require_once("backend/config.php");
dbconn();
$site_config["LEFTNAV"] = $site_config["MIDDLENAV"] = $site_config["RIGHTNAV"] = false; # Hide all blocks!
stdhead(T_("WEBMASTER"));
begin_frame(T_("WEBMASTER"));
//Pour tous les paramètres -> 1 = oui ; 0 = non
$sujets = array('Technique','Suggestion','Autre'); // Sujets possibles aux messages (pour en rajouter prenez exemple sur les 3 premiers)
$choix_urgent = 1; // Vous pouvez choisir d'activer ou non la fonction "urgent", ainsi le membre pourra signaler que son mail est urgent ou non
$choix_nom = 1; // Nom obligatoire ?
$votre_mail = 1; // Afficher votre adresse email directement ?
//
// Ne pas modifier ci-dessous
//
if(isset($_POST['envoyer']) && $_POST['envoyer'] == 'ok')
// Si l'on envoye quelque chose
{
$reponse = '<br/>';
$mail = htmlentities($_POST['mail']); // On récupère l'email
$nom = htmlentities($_POST['nom']); // Le nom
$sujet = htmlentities($_POST['sujet']); // Le sujet
$message = nl2br(htmlentities($_POST['message'])); // Le message
$urgent = htmlentities($_POST['urgent']); // On récupère le type du message
if($choix_nom == 1)
// Si le nom est obligatoire
{
if(!empty($nom))
// Si le champ est bien rempli on met 1
{
$Snom = 1;
}
elseif(empty($nom))
// Sinon on met 0
{
$Snom = 0;
}
}
else
// Si le champ n'est pas activé on met 1
{
$Snom = 1;
}
if(!empty($mail) && !empty($message) && $sujet != '' && $Snom == 1)
// On vérifie que l'email, le message et le sujet sont bien présent et on vérifie si tout est correct avec le nom
{
// L'entete du message
$entete = "MIME-Version: 1.0rn";
$entete .= "Content-type: text/html; charset=iso-8859-1rn";
$entete .= "From: <$mail>rn";
$entete .= "Reply-To: $mailrn";
$email = ''; // La variable du message a envoyer
if($urgent == 1) // Si le message est urgent on le signal
$email .= '<strong>Message urgent !!</strong><br />';
if(empty($nom))
$nom = 'NON INDIQUE';
// On créée le message
$email .= 'Vous recevez ce message de votre site <u>' .$site_config['SITENAME']. '</u> pour une raison <strong>' .$sujets[$sujet]. '</strong>.<br />Son email est : ' .$mail. '<br /><br />';
$email .= 'Le message de l'utilisateur <u>' .$nom. '</u> :<br />-----<br />';
$email .= $message;
$email = stripslashes($email);
mail($site_config['SITEEMAIL'], 'Message de ' . $CURUSER["username"] . ': ' .$sujets[$sujet], $email, $entete); // Et on envoye le tout
$reponse .= '' .T_("TRANSFERRED_TO_WEBMASTER"). '<br />'; // on indique que tout s'est bien déroulé.
}
else
{
$reponse .= '' .T_("THANK-YOU_PROPERLY_ALL_FIELDS"). '<br />'; // On indique une erreur
}
}
?>
<form name="form1" method="post" action="">
<p><strong><?php echo $reponse; ?></strong></p>
<fieldset><legend><span style='color:#FFFFFF'><b><i><?php echo T_('CONTACT_SHEET'); ?></i></b></span></legend>
<?php
if($votre_mail == 1)
{
echo '<p>' .T_('EMAIL_WEBMASTER'). ' : <u>' . $site_config['SITEEMAIL'] . '</u></p>';
}
?>
<p><span style='color:#FF0000'>*</span> <label><?php echo T_('YOUR_EMAIL'); ?> : <input type="text" name="mail" value="<? print("" . $CURUSER["email"] . "n");?>"></label></p>
<p><span style='color:#FF0000'>*</span> <label><?php echo T_('YOUR_ACCOUNT_NAME'); ?> : <input type="text" name="nom" value="<? print("" . $CURUSER["username"] . "n");?>"></label></p>
<p><span style='color:#FF0000'>*</span> <?php echo T_('SUBJECT_YOU_MESSAGE'); ?> :
<select name="sujet">
<?php
for($i = 0; $i < count($sujets); $i++)
{
echo '<option value="' .$i. '">' .$sujets[$i]. '</option>';
}
?>
</select>
</p>
<?php
if($choix_urgent == 1)
{
echo '<p>' .T_('YOUR_MESSAGE_IS_IT_URGENT'). ' : ';
echo '<label><input type="radio" name="urgent" value="1"> ' .T_('YES'). '</label> ';
echo '<label><input type="radio" name="urgent" value="0" checked> ' .T_('NO'). '</label>';
echo ' <span style="color:#FF0000">' .T_('PLEASE_ON_NOT_ABUSE_MESSAGE'). '</span></p><br/>';
}
?>
<p><span style='color:#FF0000'>*</span>
<?php echo T_('YOUR_MESSAGE'); ?> : <br/>
<textarea name="message" cols="55" rows="10"></textarea>
</p>
<p>
<input class="btn" type="hidden" name="envoyer" value="ok">
<input class="btn" type="submit" name="Submit" value="SUBMIT / SOUMETTRE" />
<input class="btn" type="reset" name="Submit2" value="RESET / REINITIALISER" />
</p>
<span style="color:#FF0000">*</span> <span style='font-size:medium;'><i><b><?php echo T_('REQUIRED_FIELDS'); ?></b></i></SPAN>
</fieldset>
</form><br/>
<?
end_frame();
stdfoot();
?>
Add to languages
ENGLISH
//Contact WebMaster
$LANG["CONTACT_WEBMASTER"] = "Contact Us";
$LANG["WEBMASTER"] = "Contact the webmaster";
$LANG["CONTACT_SHEET"] = "Contact sheet";
$LANG["EMAIL_WEBMASTER"] = "Email the webmaster";
$LANG["YOUR_EMAIL"] = "Your email";
$LANG["YOUR_ACCOUNT_NAME"] = "Your account name";
$LANG["SUBJECT_YOU_MESSAGE"] = "Subject of your message";
$LANG["PLEASE_ON_NOT_ABUSE_MESSAGE"] = "(Please do not abuse the emergency)";
$LANG["YOUR_MESSAGE_IS_IT_URGENT"] = "Your message is it urgent ?";
$LANG["YOUR_MESSAGE"] = "Your message";
$LANG["REQUIRED_FIELDS"] = "Required fields !";
$LANG["TRANSFERRED_TO_WEBMASTER"] = "Your message has been transferred to the webmaster. Thank you.";
$LANG["THANK-YOU_PROPERLY_ALL_FIELDS"] = "Well thank you completed all fields";
[b]FRENCH
//Contact WebMaster
$LANG["CONTACT_WEBMASTER"] = "Contactez-Nous";
$LANG["WEBMASTER"] = "Contacter le webmaster";
$LANG["CONTACT_SHEET"] = "Feuille de contact";
$LANG["EMAIL_WEBMASTER"] = "Adresse email du webmaster";
$LANG["YOUR_EMAIL"] = "Votre email";
$LANG["YOUR_ACCOUNT_NAME"] = "Votre nom complet";
$LANG["SUBJECT_YOU_MESSAGE"] = "Sujet de votre message";
$LANG["PLEASE_ON_NOT_ABUSE_MESSAGE"] = "(Merci de ne pas abuser de l'urgence)";
$LANG["YOUR_MESSAGE_IS_IT_URGENT"] = "Votre message est-il urgent ?";
$LANG["YOUR_MESSAGE"] = "Votre message";
$LANG["REQUIRED_FIELDS"] = "Champs obligatoires !";
$LANG["TRANSFERRED_TO_WEBMASTER"] = "Votre message a bien été transféré au webmaster. Nous vous remercions.";
$LANG["THANK-YOU_PROPERLY_ALL_FIELDS"] = "Merci de bien completer tous les champs.";
[b]Search account-login.php
<a href="account-recover.php"><?php echo T_("RECOVER_ACCOUNT"); ?></a>after add
| <a href="contact.php"><?php echo T_("CONTACT_WEBMASTER"); ?></a>You could also add.. blocks/navigate_block.php
echo "<li><a href='contact.php'>".T_("CONTACT_WEBMASTER")."</a></li>";...I'm not perfect, You to me correct or modify!
UPDATE 15/01/2013[/b][/b]
