Go to the documentation of this file.
8 require_once(
'inc/header.inc.php' );
9 require_once( CH_DIRECTORY_PATH_INC .
'design.inc.php' );
10 require_once( CH_DIRECTORY_PATH_INC .
'profiles.inc.php' );
11 require_once( CH_DIRECTORY_PATH_CLASSES .
'ChWsbEmailTemplates.php' );
42 $bAjxMod = isset($_SERVER[
'HTTP_X_REQUESTED_WITH'])
43 && $_SERVER[
'HTTP_X_REQUESTED_WITH'] ==
'XMLHttpRequest' ?
true :
false;
46 if (!isset($_POST[
'ID']))
47 return _t_err(
"_No member specified" );
51 return _t_err(
"_PROFILE_NOT_AVAILABLE");
74 switch ( $get_result ) {
76 $action_result =
_t_err(
"_PROFILE_NOT_AVAILABLE" );
79 $action_result =
_t_err(
"_YOUR PROFILE_IS_NOT_ACTIVE" );
82 $action_result =
_t_err(
"_FREEMAIL_NOT_ALLOWED" );
85 $action_result =
_t_err(
"_FREEMAIL_ALREADY_SENT",
$ID );
88 $action_result =
_t_err(
"_FREEMAIL_BLOCK",
$ID );
91 $action_result =
_t_err(
"_FREEMAIL_NOT_KISSED",
$ID );
94 $action_result =
_t_err(
"_FREEMAIL_ERROR");
97 $action_result =
_t(
"_FREEMAIL_SENT", $profile[
'NickName'] );
102 $_page[
'header_text'] =
_t(
"_Contact information not sent" );
104 $_page[
'header_text'] =
_t(
"_Contact information sent" );
107 $ret =
'<div class="soundPop">' . $action_result .
'</div>' .
"\n";
116 header(
'Content-Type: text/html; charset=utf-8');
125 $recipientID = (int)$recipientID;
126 $aRecipientArr =
db_arr(
"SELECT `Email` FROM `Profiles` WHERE `ID` = '$recipientID' AND `Status` = 'Active'", 0 );
128 if (
isBlocked($profile[
'ID'], $recipientID)) {
132 if ( !
db_arr(
"SELECT `ID` FROM `Profiles` WHERE `ID` = '{$profile['ID']}' AND `Status` = 'Active'", 0 ) ) {
141 $aTemplate = $rEmailTemplate -> getTemplate(
't_FreeEmail', $recipientID ) ;
143 if ( $recipientID ) {
144 $recipient = $aRecipientArr[
'Email'];
146 if (
$_GET[
'Email'] )
147 $recipient =
$_GET[
'Email'];
152 $contact_info =
"Email: {$profile['Email']}";
153 if ( strlen( $profile[
'Phone'] ) )
154 $contact_info .=
"\nPhone: {$profile['Phone']}";
155 if ( strlen( $profile[
'HomeAddress'] ) )
156 $contact_info .=
"\nHomeAddress: {$profile['HomeAddress']}";
157 if ( strlen( $profile[
'HomePage'] ) )
158 $contact_info .=
"\nHomePage: {$profile['HomePage']}";
159 if ( strlen( $profile[
'IcqUIN'] ) )
160 $contact_info .=
"\nICQ: {$profile['IcqUIN']}";
163 $aPlus[
'profileContactInfo'] = $contact_info;
164 $aPlus[
'profileNickName'] =
getNickName($profile[
'ID']);
165 $aPlus[
'profileID'] = $profile[
'ID'];
167 $mail_ret =
sendMail( $aRecipientArr[
'Email'], $aTemplate[
'Subject'], $aTemplate[
'Body'], $recipientID, $aPlus,
'html',
false,
true );
</code > Be careful enabling this directive if you have a redirector script that does not use the< code > Location</code > HTTP header
if(!defined("TRUE_VAL")) define("TRUE_VAL" true
MemberFreeEmail( $recipientID, $profile)
MsgBox($sText, $iTimer=0)
const CHECK_ACTION_RESULT_ALLOWED
const CHECK_ACTION_RESULT
sendMail( $sRecipientEmail, $sMailSubject, $sMailBody, $iRecipientID=0, $aPlus=array(), $sEmailFlag='html', $isDisableAlert=false, $bForceSend=false)
const CHECK_ACTION_MESSAGE
showAjaxModeResult($sMessage, $iId)
db_arr($query, $bindings=[])
const ACTION_ID_GET_EMAIL
getParam($sParamName, $bUseCache=true)
_t_err( $str, $arg0="", $arg1="", $arg2="")
_t($key, $arg0="", $arg1="", $arg2="")
PageCode($oTemplate=null)
member_auth($member=0, $error_handle=true, $bAjx=false)
checkAction($iMemberId, $actionID, $performAction=false, $iForcedProfID=0, $isCheckMemberStatus=true)
isBlocked($iFirstProfile, $iSecondProfile)
genAjaxyPopupJS($iTargetID, $sDivID='ajaxy_popup_result_div', $sRedirect='')
getID( $str, $with_email=1)
getProfileInfo($iProfileID=0, $checkActiveStatus=false, $forceCache=false)
DesignBoxContent($title, $content, $db_num=0, $caption_item='', $bottom_item='')
$_page_cont[$_ni]['page_main_code']