Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
[MODE] Contact WebMaster
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2.08 Mods Completed

2012-08-27 01:32:51
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

<?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]
Capture.PNG
Capture.PNG
Capture2.PNG
Capture2.PNG

Unknown User
2012-08-28 20:50:31
Thank you very mutch, it's work perfectly :)
2012-08-28 22:28:16
Good! YO"" :D
2012-09-09 20:12:05
I tried this, but I get a blank page when I click the link for contact us. Any ideas?
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
2012-09-10 00:00:28
test.... dbconn(false); for dbconn();

or do you have the link?
Unknown User
2012-09-10 00:05:17
Blah so many issues with this...

Formating is just plain bad layout, most of its not even translated, mail function should be sendmail.

Anyway this 1 attached checks out ok in my php editor, i dont know if it works on a site thought this has so many issues its not worth my time fixing to be true 2.08

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6063"]contact.php[/url]
contact.php
Download
Unknown User
2012-09-16 15:38:40
TYVM it's work :)
Unknown User
2012-10-29 14:26:07
"ArcticWolf, post: 85425":
Blah so many issues with this...

Formating is just plain bad layout, most of its not even translated, mail function should be sendmail.

Anyway this 1 attached checks out ok in my php editor, i dont know if it works on a site thought this has so many issues its not worth my time fixing to be true 2.08

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6063"]contact.php[/url]
for me its ok except one...when somebody sent with greek letters i dont see anything in my mail
Unknown User
2012-10-30 03:50:08
try changing



$entete .= "Content-type: text/html; charset=iso-8859-1rn";






to







$entete .= "Content-type: text/html; charset=utf-8rn";

Unknown User
2012-10-30 05:16:41
i have change this charset but the same problem. My mail is from host not gmail,hotmail and others
Unknown User
2012-10-30 13:27:24
try saving the file as utf-8
Unknown User
2012-10-31 04:55:25
no nothing , i change the mail as gmail.com and again nothing.the greek letters are test-ÏεÏÏ (test-????)
Unknown User
2012-10-31 05:46:56
your site send other greek emails? if so I would look at the coding for them and see if any changes.

This page http://www.arclab.com/products/amlc/international-character-sets-charsets-email.html says for greek charset should be windows-1253
Unknown User
2012-11-01 09:32:51
i sent mass mail and greek letters are greek letters in title and description
Unknown User
2012-11-18 13:04:02
Thx, works fine on tt v-2svn :)
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728