Gå til innhold

Sende fil script?


Anbefalte innlegg

Videoannonse
Annonse
<php>

/*=============

#Ultimate Form Mail Script

#Version 2.5.1 Beta

#

# Copyright 2003 Jack Born © All rights reserved.

# Created 06/29/03 Last Modified 2/1/04

# Jack Born http://www.surefirewebdesign.com

#

# This cannot and will not be inforced but I would appreciate a link back

# to my site:

#

# http://www.surefirewebdesign.com/

#

# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,

# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL

# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR

# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,

# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR

# OTHER DEALINGS IN THE SOFTWARE.

#

==============*/

error_reporting(0);

 

$license = "Put the license here";

 

require_once "class.UFMail.php";

require_once "antispoof/protect.php";

 

/*********************************/

/*This is the only variable you need*/

/*To change*/

/*********************************/

$set['recipient'] = array('[email protected]');

 

$set['website'] = 'www.fittafeis.tk';

$set['redirect'] = 'thanks.php';/*http://www.yoursite.com/somepage.htm  This is the page visitors see after successfully sending you information.  Strongly recommended*/

$set['banlist'] = array('*@somedomain.com', '[email protected]', '[email protected]');

$set['headerfile'] = 'header_file.php';/*A php file if you want custom error pages */

$set['footerfile'] = 'footer_file.php';/*A php file if you want custom error pages */

$set['dropdown_recipient'] = '0'; /*If you have a dropdown list for potential recipients, put 1.  Most will leave to zero... off */

$set['dropdown_name'] = 'send_to'; /*The name of your field for the drop down list... don't use 'recipient' */

$set['dropdown_list'] = $set['recipient'];/*This keeps your email addresses private */

 

 

$set['webmaster_subject'] = 'Contact from your website %s';

$set['webmaster_body_intro'] = "Here is the information sent to you on %s:\n\n";

$set['webmaster_confirm'] = '<br>Sent message to %s';

 

/*********************************/

/*Auto-reply sent to visitor*/

/*********************************/

$set['autoresponder'] = '0';

$set['auto_from_name'] = "Contact Form"; /*Can be whatever you want... visitor sees this in the To: portion of auto reply email*/

$set['auto_from'] = "[email protected]"; /*Very important if you want them to be able to reply to your email */

$set['auto_reply_name'] = "";/*Most leave blank.  Used if you want a different name when your visitor replies to your autoresponder email */

$set['auto_reply'] = ""; /*Most leave blank.  Used if you want a different email addy when your visitor replies to your autoresponder email */

$set['receipt'] = '0'; /*On =1 ... sends copy of posted info to your visitor */

$set['receipt_intro'] = "Here is what you sent us:\n\n";

$set['auto_reply_subject'] = 'Thank you for visiting %s.';

$set['auto_reply_body'] = "We received your information and will be getting back to you shortly.\n\n";

$set['auto_reply_signaturesignature'] = "\n\nSincerely, \n\n" . $set['website'];

$set['auto_reply_confirm'] = 'Sent auto-reply to %s';

 

 

/*********************************/

/*Default field checking functions*/

/*Delete, modify, or add lines if you know what you're doing.*/

/*Playing with these formulas is not for the faint of heart... be careful*/

/*********************************/

 

$set['field_check_eregi'] = array(

'email' => '^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]{2,})+$'

);

 

$set['field_check_ereg'] = array(

'phone' => '(^(.*)[0-9]{3})(.*)([0-9]{3})(.*)([0-9]{4}$)',

'phone_no' => '(^(.*)[0-9]{3})(.*)([0-9]{3})(.*)([0-9]{4}$)'

);

 

/*********************************/

/*File Upload*/

/*********************************/

$set['file_upload'] = '1';

$set['file_max_size'] = '50000';/*Max file size in KB*/

$set['banned_ext'] = array('php', 'phtml', 'cgi', 'pl', 'asp', 'jsp', 'c', 'cfm', 'shtml', 'bat', 'com');

$set['file_max_size_total'] = '50000';/*If more than one file, this is the maximum total upload size for all attachments combined*/

 

/*********************************/

/*Error language*/

/*********************************/

$set['no_email_field'] = '<h2>You need to have a form field named <b>email</b></h2><p>Change your html code in your form so that the email field is named "email"</p>';

$set['error_title'] = '<h2>No email sent</h2><p>%s</p>';

$set['total_file_size_error'] = 'You attempted to send us %d Kb or more in attachments and we only allow %d for security reasons.<br>';

$set['file_size_error'] = "You attempted to send us a %d Kb attachment and we only allow %d for security reasons.<br>";

$set['file_type_error'] = 'You attempted to send us a %s document and it is banned for security reasons.<br>';

$set['required_error'] = '%s is required... but not found<br>';

$set['required_no_error'] = '%s is required... AND found<br>';

$set['referer_error'] = 'Posted info from %s but should be from %s<br>';

$set['invalid_error'] = 'Your %s is invalid<br>';

$set['recipient_error'] = 'The recipient you chose %s was not found<br>';

$set['drop_down_error'] = 'Your drop down form field is missing or does not match<br>';

$set['drop_down_not_in_list_error'] = 'Your drop down selection was not valid<br>';

$set['email_banned'] = 'Your email address is not allowed<br>';

$set['wrong_hash'] = 'You either took longer than %s minutes to complete the form or you are coming from an unauthorized domain.';

 

/*********************************/

/*SMTP Variables*/

/*********************************/

$set['html'] = TRUE; /*HTML emails*/

$set['email_type'] = '1';/*1=smtp, 2=mail(), 3=qmail, 4=sendmail*/

$set['host'] = 'localhost';/*Most don't need to change */

$set['authorization'] = 'false';/*Most don't need to change.  set to 'true' if you need to change */

$set['username'] = '';/*Most don't need to change */

$set['password'] = '';/*Most don't need to change */

$set['html_template'] = "template/email.tpl.php";

 

/*********************************/

/*Anti Spoof*/

/*********************************/

$set['anti_spoof']  = '0';

$set['hash_name'] = 'as_hash';

$set['interval'] = $as->interval;

$set['time_frame']  = $as->time_frame;

 

/*********************************/

/*Testing code language*/

/*********************************/

$set['testing'] = '1'; /*On = 1 ... great for debugging */

$set['testing_title'] = '<h1>Test Results:</h1>';

$set['testing_error'] = '<p>No email would be sent to %s</p>';

$set['timestamp'] = '<p>The form was submitted %s</p>';

 

/*********************************/

/*Miscellaneous*/

/*********************************/

$set['date_format'] = 'l F j, Y'; /*date format for information*/

$set['post_info'] = "%s: %s\n";

$set['ignore_these'] = array('Submit','submit','required', 'Required', $set['hash_name']);

$set['referer_check'] = '0';//Referer check is now deactivated

 

/*=============

Leave these next several lines alone

==============*/

$obj = new UFMail;

$obj->initialize($set); //Gets things going

$obj->check_vars(); //Runs the error checking

$obj->branch(); //Sends the emails

$obj->thanks_page(); /* Redirects if the corresponding variable is set */

?>

</php>

 

 

Dette skulle vist være veldi enklet, trengte bare å sette inn e-post adresse. men hvordan i huleste skal jeg bruke dette her? hva skal jeg f.eks. sette inn i HTML koden min? eller skal jeg ikke sette inn noe? hjelp meg...

Lenke til kommentar

Opprett en konto eller logg inn for å kommentere

Du må være et medlem for å kunne skrive en kommentar

Opprett konto

Det er enkelt å melde seg inn for å starte en ny konto!

Start en konto

Logg inn

Har du allerede en konto? Logg inn her.

Logg inn nå
×
×
  • Opprett ny...