Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's
Author Message
deeporl
New Member
New Member



Joined: Sep 26, 2005
Posts: 18

PostPosted: Sat Nov 19, 2005 2:13 pm Reply with quote

Ok sorry but I have no clue when it comes to PHP-Nuke. I can edit it and install it and what not but can't make from scratch. I haven't been able to find a ready to use form letter that will send the info to an e-mail when you click submit and then redirect you to the home page. So basically if someone knows of a place I can download this or has one they will share let me know. Thanks a ton. Oh and I can probably edit the aspects of the form if you just have a few types in there.
 
View user's profile Send private message
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Sat Nov 19, 2005 3:00 pm Reply with quote

Well you could always look at the Feedback module. That's the basic code that you'll need to create a form and send emails

_________________
- Star Wars Rebellion Network -

Need help? Nuke Patched Core, Coding Services, Webmaster Services 
View user's profile Send private message Visit poster's website
deeporl







PostPosted: Sat Nov 19, 2005 5:32 pm Reply with quote

Ok so I got it figured out thanks for the help. But I do have 2 minor issues I'd appriciate if someone could tell me how to fix. Basically what happens is the whole thing sends like it should but the 2 message box's. They send the Sender's Prefered Position: and What Vehicle Sender Wants: but it doesn't send the information that goes in those boxes. So here are the 2 files can someone please tell me what to change.

index.php
Code:


<?php

if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
    die ("You can't access this file directly...");
}

require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);

/**********************************/
/* Configuration                  */
/*                                */
/* You can change this:           */
/* $index = 0; (right side off)   */
/**********************************/
$index = 1;
$subject = "$sitename "._APPLICATION."";
/**********************************/

include("header.php");
$cookie[0] = intval($cookie[0]);
if ($cookie[1] != "") {
    $row = $db->sql_fetchrow($db->sql_query("SELECT name, username, user_email FROM ".$user_prefix."_users WHERE user_id='$cookie[0]'"));
    if ($row['name'] != "") {
   $sender_name = $row['name'];
    } else {
   $sender_name = $row['username'];
    }
    $sender_email = $row['user_email'];
}

$form_block = "
    <center><font class=\"title\"><b>$sitename: "._APPLICATIONTITLE."</b></font>
    <br><br><font class=\"content\">"._APPLICATIONNOTE."</font>
    <FORM METHOD=\"post\" ACTION=\"modules.php?name=$module_name\">
    <P><strong>"._YOURNAME.":</strong><br>
    <INPUT type=\"text\" NAME=\"sender_name\" VALUE=\"$sender_name\" SIZE=50></p>
    <P><strong>"._YOUREMAIL.":</strong><br>
    <INPUT type=\"text\" NAME=\"sender_email\" VALUE=\"$sender_email\" SIZE=50></p>
    <P><strong>"._APAGE.":</strong><br>
    <INPUT type=\"text\" NAME=\"sender_age\" VALUE=\"$sender_age\" SIZE=5></p>
    <P><strong>"._APXFIRE.":</strong><br>
    <INPUT type=\"text\" NAME=\"sender_xfire\" VALUE=\"$sender_xfire\" SIZE=50></p>
    <P><strong>"._APMSN.":</strong><br>
    <INPUT type=\"text\" NAME=\"sender_msn\" VALUE=\"$sender_msn\" SIZE=50></p>
    <P><strong>"._APMIC1.":</strong><br>
    <INPUT type=\"text\" NAME=\"sender_mic1\" VALUE=\"$sender_mic1\" SIZE=5></p>
    <P><strong>"._APMIC2.":</strong><br>
    <INPUT type=\"text\" NAME=\"sender_mic2\" VALUE=\"$sender_mic2\" SIZE=50></p>
    <P><strong>"._APBF2.":</strong><br>
    <INPUT type=\"text\" NAME=\"sender_bf2\" VALUE=\"$sender_bf2\" SIZE=50></p>
    <P><strong>"._APPOSITION.":</strong><br>
    <TEXTAREA NAME=\"message\" COLS=30 ROWS=5 WRAP=virtual>$position</TEXTAREA></p>
    <P><strong>"._APVEHICLE1.":</strong><br>
    <INPUT type=\"text\" NAME=\"sender_vehicle1\" VALUE=\"$sender_vehicle1\" SIZE=50></p>
    <P><strong>"._APVEHICLE2.":</strong><br>
    <TEXTAREA NAME=\"message\" COLS=30 ROWS=5 WRAP=virtual>$vehicle2</TEXTAREA></p>
    <INPUT type=\"hidden\" name=\"opi\" value=\"ds\">
    <P><INPUT TYPE=\"submit\" NAME=\"submit\" VALUE=\""._SEND."\"></p>
    </FORM></center>
";

OpenTable();
if ($opi != "ds") {
    echo "$form_block";
} elseif ($opi == "ds") {
    if ($sender_name == "") {
   $name_err = "<center><font class=\"option\"><b><i>"._APENTERNAME."</i></b></font></center><br>";
   $send = "no";
    }
    if ($sender_email == "") {
   $email_err = "<center><font class=\"option\"><b><i>"._APENTEREMAIL."</i></b></font></center><br>";
   $send = "no";
    }
    if ($message == "") {
       $message_err = "<center><font class=\"option\"><b><i>"._APENTERMESSAGE."</i></b></font></center><br>";
   $send = "no";
    }
    if ($send != "no") {
   $sender_name = removecrlf($sender_name);
   $sender_email = removecrlf($sender_email);
   $msg = "$sitename\n\n";
   $msg .= ""._SENDERNAME.": $sender_name\n";
   $msg .= ""._SENDEREMAIL.": $sender_email\n";
   $msg .= ""._SENDERAGE.": $sender_age\n";
   $msg .= ""._SENDERXFIRE.": $sender_xfire\n";
   $msg .= ""._SENDERMSN.": $sender_msn\n";
   $msg .= ""._SENDERMIC1.": $sender_mic1\n";
   $msg .= ""._SENDERMIC2.": $sender_mic2\n";
   $msg .= ""._SENDERBF2.": $sender_bf2\n";
   $msg .= ""._SENDERPOSITION.": $position\n";
   $msg .= ""._SENDERVEHICLE1.": $sender_vehicle1\n";
   $msg .= ""._SENDERVEHICLE2.": $vehicle2\n\n";
   $to = $adminmail;
   $mailheaders = "From: $sender_name <$sender_email>\n";
   $mailheaders .= "Reply-To: $sender_email\n\n";
   mail($to, $subject, $msg, $mailheaders);
   echo "<P><center>"._APMAILSENT."</center></p>";
   echo "<P><center>"._APTHANKSFORCONTACT."</center></p>";
    } elseif ($send == "no") {
   OpenTable2();
   echo "$name_err";
   echo "$email_err";
   echo "$message_err";
   CloseTable2();
   echo "<br><br>";
   echo "$form_block"; 
    }
}

CloseTable();   
include("footer.php");

?>


and the lang_eng.php
Code:


<?php

define("_SEND","Send");
define("_YOURNAME","Your Name");
define("_MESSAGE","Message");
define("_YOUREMAIL","Your Email");
define("_APPLICATIONNOTE","Thinking of joining the XSF clan? Well all you have to do is sign up for the forum and answer these questions. Note that it is very important that you have an Xfire or MSN account and a mic. This is how our clan communicates with each other and if you can't communicate with us effectivly then we can't perform as a unit. Just fill out the application below and hit send!");
define("_APPLICATIONTITLE","Clan Application");
define("_APPLICATION","APPLICATION");
define("_APENTERNAME","ERROR: Please enter your name!");
define("_APENTEREMAIL","ERROR: Please enter your e-mail address!");
define("_APENTERMESSAGE","ERROR: Please enter a position!");
define("_SENDEREMAIL","Sender's Email");
define("_SENDERNAME","Sender's Name");
define("_SENDERAGE","Sender's Age");
define("_SENDERXFIRE","Sender's Xfire");
define("_SENDERMSN","Sender's MSN");
define("_SENDERBF2","Sender's BF2 Log On");
define("_SENDERMIC1","Does Sender Have Mic");
define("_SENDERMIC2","Will Sender Buy Mic");
define("_SENDERPOSITION","Sender's Prefered Position");
define("_SENDERVEHICLE1","Does Sender Want Vehicle");
define("_SENDERVEHICLE2","What Vehicle Sender Wants");
define("_APMAILSENT","Mail has been sent!");
define("_APTHANKSFORCONTACT","Thank you for appling");
define("_APAGE", "Age");
define("_APXFIRE", "Xfire Account Name");
define("_APMSN", "MSN Account Name");
define("_APMIC1", "Do You Have A Mic");
define("_APMIC2", "If Not Are You Willing To Get One");
define("_APBF2", "BF2 Sign On Name");
define("_APPOSITION", "What Position Would You Like To Play");
define("_APVEHICLE1", "Do You Want To Man A Vehicle");
define("_APVEHICLE2", "If So What Vehicle And Position");

?>
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©