1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | | PHP-Quelltext <?php
# PHPKIT Web Content Management System
# --------------------------------------------
# Copyright (c) 2002-2007 Gersöne & Schott GbR
#
# This file / the PHPKIT-software is no freeware!
# For further informations please vistit our website
# or contact us via email:
#
# Diese Datei / die PHPKIT-Software ist keine Freeware!
# Für weitere Information besuchen Sie bitte unsere
# Webseite oder kontaktieren uns per E-Mail:
#
# Website : http://www.phpkit.de
# Mail : info@phpkit.de
#
# YOU ARE NOT AUTHORISED TO CREATE ILLEGAL COPIES OF THIS
# FILE AND/OR TO REMOVE THIS INFORMATIONS
#
# SIE SIND NICHT BERECHTIGT, UNRECHTMÄSSIGE KOPIEN DIESER
# DATEI ZU ERSTELLEN UND/ODER DIESE INFORMATIONEN ZU ENTFERNEN
if(!defined('pkFRONTEND') || pkFRONTEND!='public')
die('Direct access to this location is not permitted.');
pkLoadLang('email');
$modehash=array('suggest','user');
$mode=isset($_REQUEST['mode']) && in_array($_REQUEST['mode'],$modehash) ? $_REQUEST['mode'] : NULL;
switch($mode)
{
case 'user' :
if(!pkGetUservalue('id'))
pkEvent('access_refused');
pkLoadFunc('user');
$user_navigation=pkUserNavigation();
if(!pkGetConfig('member_mailer'))
return pkEvent('function_disabled');
$userid=(isset($_REQUEST['userid']) && intval($_REQUEST['userid'])>0) ? intval($_REQUEST['userid']) : 0;
$ACTION=(isset($_POST['action'])) ? $_POST['action'] : 'view';
$userinfo=$DB->fetch_array($DB->query("SELECT user_id, user_nick, user_email, user_emailshow FROM ".$db_tab['user']." WHERE user_id='".$userid."' LIMIT 1"));
if(!$userinfo['user_emailshow']==1)
return pkEvent('email_contact_undesired');
if($ACTION==$_POST['send'] && $_POST['mailer_title']!="" && $_POST['mailer_text']!="")
{
$senderinfo['user_id']=pkGetUservalue('id');
$senderinfo['user_nick']=pkGetUservalue('nick');
$senderinfo['user_email']=pkGetUservalue('email');
$mailer_adress=$userinfo['user_nick']." <".$userinfo['user_email'].">";
$mailer_header="From: ".$senderinfo['user_nick']." <".$senderinfo['user_email'].">";
$mailer_title=$_POST['mailer_title'];
$mailer_text=$_POST['mailer_text'];
eval("\$mailer_body= \"".pkTpl("mailer_text")."\";");
$event=(mailsender($mailer_adress,$mailer_title,$mailer_body,$mailer_header)) ? 'email_sent' : 'email_error';
pkHeaderLocation('','','event='.$event);
}
if($_POST['action']==$lang['send'])
{
$mailer_title=pkEntities($_POST['mailer_title']);
$mailer_text=pkEntities($_POST['mailer_text']);
eval("\$mailer_msg= \"".pkTpl("mailer_msg")."\";");
}
$form_action=pkLink('contact','user');
$userinfo['user_nick']=pkEntities($userinfo['user_nick']);
eval("\$site_body.= \"".pkTpl("mailer")."\";");
break;
#END case user
case 'suggest' :
$error=0;
$ACTION=(isset($_POST['action'])) ? $_POST['action'] : 'view';
if($ACTION==$_POST['cancel'])
{
if(isset($_POST['suggest_url']))
pkHeaderLocation('','',$_POST['suggest_url']);
pkHeaderLocation('start');
}
if($ACTION==$_POST['send'] && ($captcha_check=pkCaptchaCodeValid($ENV->_post(pkCAPTCHAVARNAME))))
{
if(emailcheck($_POST['suggest_email']))
{
$suggest_title=pkGetSpecialLang('suggest_title_plain',pkGetConfig('site_name'));
$mailto=$_POST['suggest_name']." <".$_POST['suggest_email'].">";
if(mailsender($mailto,$suggest_title,$_POST['suggest_text']))
pkHeaderLocation('','','event=suggestion_sent'.(isset($_POST['suggest_url']) ? '&moveto='.urlencode($_POST['suggest_url']) : ''));
pkHeaderLocation('','','event=email_error');
}
else
$error=1;
}
if($ACTION==$_POST['send'] && !$captcha_check)
pkEvent('securitycode_invalid');
if($error==1)
pkEvent('multi_emailaddresses');
if(isset($_REQUEST['suggest_path']))
$suggest_url=pkEntities(urldecode($_REQUEST['suggest_path']));
else
$suggest_url=pkEntities($_POST['suggest_url']);
if(isset($_REQUEST['suggest_email']) && pkEntities($_REQUEST['suggest_email'])!=pkGetLang('email_address'))
$suggest_email=pkEntities($_REQUEST['suggest_email']);
if(isset($_REQUEST['suggest_name']) && pkEntities($_REQUEST['suggest_name'])!=pkGetLang('receiver'))
$suggest_name=pkEntities($_REQUEST['suggest_name']);
if(isset($_POST['suggest_text']) && !empty($_POST['suggest_text']))
$suggest_text=pkEntities($_POST['suggest_text']);
else
{
$link=pkGetConfig('site_url').'/'.pkREQUESTEDFILE.'?'.$suggest_url;
$suggest_text=pkGetSpecialLang('suggest_text',empty($suggest_name) ? ' ' : ' '.$suggest_name,$link);
}
$form_action=pkLink('contact','suggest');
$suggest_url=pkEntities($suggest_url);
$captcha=pkCaptchaField();
eval("\$site_body.= \"".pkTpl("suggest")."\";");
break;
#END case suggest
default :
foreach(array(
'contact',
'your',
'name',
'email',
'subject',
'message',
'copy_to_email',
'send',
'reset',
) as $l) {
$v='L_'.$l;
$$v=pkGetLang($l);
}
$L_contact_text=pkGetLang('contact_text');
$contact_email=$contact_name=$contact_subject=$contact_message=$copy_option='';
if(isset($_POST['action']))
{
$ACTION=$_POST['action'];
$contact_message=$ENV->_post('contact_message');
$contact_subject=$ENV->_post('contact_subject');
$contact_email=$ENV->_post('contact_email');
$contact_name=$ENV->_post('contact_name');
}
else
$ACTION='view';
if($ACTION==$_POST['send'] && ($captcha=pkCaptchaCodeValid($ENV->_post(pkCAPTCHAVARNAME))) && emailcheck($contact_email) && trim($contact_name)!='' && trim($contact_subject)!='' && trim($contact_message)!='')
{
$contact_time=pkTimeFormat(pkTIME,'spoken');
eval("\$contact_title=\"".pkTpl("contact_title")."\";");
eval("\$contact_body_master=\"".pkTpl("contact_body_master")."\";");
eval("\$contact_body_sender=\"".pkTpl("contact_body_sender")."\";");
$header='From: '.$contact_name.' <'.$contact_email.'>';
if(mailsender('',$contact_title,$contact_body_master,$header))
{
if($_POST['contact_copy']==1)
mailsender($contact_email,$contact_title,$contact_body_sender);
pkHeaderLocation('','','event=webmaster_message_sent');
}
pkHeaderLocation('','','event=email_error');
}
if($ACTION!='view')
{
if($_POST['contact_copy']==1)
$copy_option='checked';
if(!$captcha)
eval("\$error_message=\"".pkTpl("captcha_error")."\";");
else
eval("\$error_message=\"".pkTpl("contact_".(emailcheck($contact_email) ? '' : 'mail') ."error")."\";");
}
else
{
$contact_email=pkGetUservalue('email');
$contact_name=pkGetUservalue('nick');
$contact_subject=$ENV->_get('contact_subject');
}
$contact_email=pkEntities($contact_email);
$contact_name=pkEntities($contact_name);
$contact_subject=pkEntities($contact_subject);
$contact_message=pkEntities($contact_message);
$captcha=pkCaptchaField();
eval("\$site_body.=\"".pkTpl("contact")."\";");
break;
#case default
}
?> |