Poprzedni temat :: Następny temat |
sebonpl Wysłany: Sob 18 Lis, 2006 |
|
|
Prosty formularz kontaktowy. Mo?e komu? si? przyda.
Demo : http://www.nushu.webd.pl/kontakt.php
Prosz? pami?ta? aby w pliku kontakt.php w 67 lini poda? sw?j email / nie wszystko zosta?o spolszczone!!
http://www.nushu.webd.pl/kontakt.zip |
|
kidzior Wysłany: Nie 19 Lis, 2006 |
|
|
Link ju? nie dzia?a! 404. |
|
sebonpl Wysłany: Nie 19 Lis, 2006 |
|
|
ju? chodzi sorki!! |
|
pawel2827 Wysłany: Nie 19 Lis, 2006 |
|
|
wielkie dzieki tego szukalem :mrgreen: |
|
monkey Wysłany: Nie 26 Lis, 2006 |
|
|
Dzi?ki za modyfikacj?, pozdrawiam.
Dodatkowo przet?umaczy?em w ca?o?ci ten formularz dla w?asnego u?ytku z poprawionymi znakami unicode, mo?e komu? si? przyda |
|
DJNeo Wysłany: Nie 26 Lis, 2006 |
|
|
Witam,
w gruncie rzeczy bardzo fajny pomys?, z mi?a checia skorzystam.
Pozdrawiam |
|
tjon Wysłany: Czw 30 Lis, 2006 |
|
|
monkey, przet?umaczy? go do konca http://www.badongo.com/file/1794054 :P |
|
Piotr Wysłany: Nie 17 Gru, 2006 |
|
|
mi on nie dzia?a jak chc? wys?a? wiadomo?? i klikne wy?li to wyskakuje
KodAn Error has occured
Admin has not set a recipient email address in kontakt.php.
Please try again |
|
kidzior Wysłany: Nie 17 Gru, 2006 |
|
|
Piotr napisał/ami on nie dzia?a jak chc? wys?a? wiadomo?? i klikne wy?li to wyskakuje
KodAn Error has occured
Admin has not set a recipient email address in kontakt.php.
Please try again
-CIACH-
EDIT: Pomyli?em si?:
W pliku kontakt.php ustaw sw?j adres e-mail! Uczcie si? angielskiego. :/ |
|
Piotr Wysłany: Nie 17 Gru, 2006 |
|
|
sorki ale ustawi?em |
|
kidzior Wysłany: Nie 17 Gru, 2006 |
|
|
Piotr napisał/asorki ale ustawi?emPode?lij plik kontakt.php. Nie ustawi?e?. ;) |
|
Piotr Wysłany: Pon 18 Gru, 2006 |
|
|
tu
Kod<?php
/***************************************************************************
* kontakt.php
* -------------------
* begin : Thursday, Oct 27, 2005
* copyright : (C) 2005 FuNEnD3R
* email : admin@funender.com
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_kontakt.' . $phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
session_start();
init_userprefs($userdata);
$displayip = decode_ip ($user_ip);
//
// End session management
//
$mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode']: '';
//
// Start output of page
//
$page_title = $lang['Eadmin'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
/*
* Admin Contact Forum Version 1.1.0
*
* Author: FuNEnD3R admin@funender.com - website: www.funender.com
*
*/
if( $mode == 'send' )
{
// Pre-declarations
$error_fields = array();
$error = false;
$from_name = '';
$from_email = '';
$message = '';
/* ***CHANGE THIS ADDRESS TO YOURS*** */
$to_admin= 'piotrlasota@op.pl';
/* ********************************** */
/* NO NEED TO EDIT ANYTHING BELOW THIS LINE */
// Check for empty fields
check_field('', $HTTP_POST_VARS['name']);
check_field('', $HTTP_POST_VARS['primary_email']);
check_field('', $HTTP_POST_VARS['message']);
check_field('', $HTTP_POST_VARS['enquiry']);
// Check to see if any fields were empty
// and stored in the errors array
//
if (sizeof($error_fields) > 0) {
// Loop through error array
foreach($error_fields as $field) {
message_die(GENERAL_ERROR, $lang['ERequired_error']);
}
// Terminate without sending mail
$error = true;
}
if($_POST["kod"] != $_SESSION["new_string"]) {
message_die(GENERAL_ERROR, $lang['code_wrong']);
}
if( !$error )
{
// Strip HTML and escape slashes
$from_name = strip_all($HTTP_POST_VARS['name']);
$from_email = strip_all($HTTP_POST_VARS['primary_email']);
$message = strip_all($HTTP_POST_VARS['message']);
$enquiry = strip_all($HTTP_POST_VARS['enquiry']);
// Validates email address.
$emailcheck = ".+@.+\..+";
if (eregi($emailcheck, $from_email))
{
echo'';
} else {
message_die(GENERAL_ERROR, $lang['EEmail_error']);
}
// Check for empty subject and strip if applicable
$subject = (!empty($HTTP_POST_VARS['subject'])) ? strip_all($HTTP_POST_VARS['subject']) : $lang['ESubject'];
// Strip HTML / backslashes from username
$forum_username = strip_all($HTTP_POST_VARS['forum_username']);
// Email vars
$email_username = $lang['EEmail_username'];
$email_mailname = $lang['EEmail_mailname'];
$email_sendersip = $lang['EEmail_sendersip'];
$email_xmailer = $lang['EEmail_xmailer'];
$email_lookupip = $lang['EEmail_lookupip'];
$email_enquiry = $lang['EEmail_enquiry'];
// Add username to beginning / top of mail
$message = "$from_name'$email_username $forum_username\n$from_name'$email_mailname $from_email\n\n$email_sendersip $displayip\n$email_lookupip: http://whois.sc/$displayip\n\n$email_enquiry: $enquiry\n\n" . strip_all($HTTP_POST_VARS['message']);
// Get users IP addy for mail header
$user_ip = get_ip();
// All fields match criteria, attempt to send mail
if (@mail(
$to_admin,
$subject,
$message,
"From: $from_name <$from_email>\r\n" .
"X-Remote-Addr: $user_ip\r\n" .
"X-Mailer: $email_xmailer"
)) {
// Mail was sent
echo'<meta http-equiv="refresh" content="3;url=' . append_sid($phpbb_root_path . "index.$phpEx") . '">';
message_die(GENERAL_MESSAGE, $message = $lang['ESuccessfully'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid($phpbb_root_path . "index.$phpEx") . '">', '</a>') . '');
}
else {
message_die(GENERAL_ERROR, $lang['EMain_error']);
}
}
}
// Empty field checking function
function check_field($field, $data) {
global $error_fields;
if (empty($data)) {
array_push($error_fields, $field);
}
return;
}
// Grab users IP function
function get_ip() {
if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
return $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
return $_SERVER['REMOTE_ADDR'];
}
}
// Strip html tags etc
function strip_all($string) {
return strip_tags(stripslashes($string));
}
$template->set_filenames(array(
'body' => 'kontakt.tpl'
)
);
$template->assign_vars(array(
'DISPLAY_IP' => $displayip,
'NAME' => $from_name,
'EMAIL' => $from_email,
'USERNAME' => $forum_username,
'MESSAGE' => $message,
'L_EYOUR_NAME' => $lang['EYour_Name'],
'L_EYOUR_EMAIL' => $lang['EYour_Email'],
'L_EFORUM_USERNAME' => $lang['EForum_Username'],
'L_EQUEST_COMMS' => $lang['EQuest_Comms'],
'L_EDENOTES_FIELD' => $lang['Edenotes_field'],
'L_EYOUR_NAME' => $lang['EYour_Name'],
'L_ECLEAR_FORM' => $lang['EClear'],
'L_EAUTH' => $lang['EAuth'],
'L_EYOUR_IP' => $lang['EYour_IP'],
'L_ERECORDED' => $lang['ERecorded'],
'L_ESUBMIT' => $lang['ESubmit'],
'L_EENQUIRY_TYPE' => $lang['EEnquiry'],
'L_EPLEASE_SELECT' => $lang['EPlease_Select'],
'L_OPTION_ONE' => $lang['EOption_One_Text'],
'L_OPTION_TWO' => $lang['EOption_Two_Text'],
'L_OPTION_THREE' => $lang['EOption_Three_Text'],
'L_OPTION_FOUR' => $lang['EOption_Four_Text']
)
);
$template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?> |
|
kidzior Wysłany: Wto 19 Gru, 2006 |
|
|
Sprawd?, czy masz wszystko OK w Panelu Administratora w ustawieniach E-Mial w Konfiguracji. Tutaj wszystko zdaje si? wygl?dac OK. |
|
Piotr Wysłany: Sro 20 Gru, 2006 |
|
|
ustawione jest to |
|
szymel Wysłany: Sob 13 Sty, 2007 |
|
|
Moglbys poszerzyc nieco ten formularz bymozna bylo wybrac do kogo chce sie wyslac wiadomosc? Tzn. konkretnie chodzi mi o wybor sposrod dwoch administratorow bo tylu mam na forum. |
|
|
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
|