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');
21 $bAjxMod = isset($_SERVER[
'HTTP_X_REQUESTED_WITH'])
22 && $_SERVER[
'HTTP_X_REQUESTED_WITH'] ==
'XMLHttpRequest' ?
true :
false;
25 header(
'Content-Type: text/html; charset=utf-8');
50 if (
false !=
ch_get(
'ConfCode') &&
false !=
ch_get(
'sendto')) {
51 $recipientID = (int)
ch_get(
'sendto');
54 $recipientID = isset($_POST[
'sendto']) ? $_POST[
'sendto'] : -1;
58 $isCheckVisitorGreeting =
true;
60 if (!$recipient || $recipientID ==
$member[
'ID']) {
66 <
table width=
"100%" cellpadding=
"4" cellspacing=
"4" border=
"0">
68 <td align=
"center" class=
"text2">__content__<br /></td>
72 $sResTmpl = ob_get_clean();
75 $sKissKey =
'_Send virtual kiss';
81 (strcmp(
$_GET[
'ConfCode'], base64_encode(base64_encode(crypt(
$_GET[
'from'], CRYPT_EXT_DES ?
"vkiss_sec" :
"vk")))) === 0)
84 $isCheckVisitorGreeting =
false;
91 $_page[
'header_text'] =
_t($sKissKey .
'3');
92 $ret =
$GLOBALS[
'oSysTemplate']->parseHtmlByContent($sResTmpl,
101 switch ($send_result) {
103 $action_result .=
_t_err(
"_VKISS_BAD");
106 $action_result .=
_t_err(
"_VKISS_BAD_COUSE_B");
109 $action_result .=
_t_err(
"_VKISS_BAD_COUSE_C");
112 $action_result .=
_t_err(
"_VKISS_BAD_COUSE_A3");
115 $action_result .=
_t_err(
"_VKISS_BAD_COUSE_X");
118 $action_result .=
_t_err(
"_VKISS_BAD_COUSE_Y");
121 $action_result .=
_t(
"_VKISS_OK");
124 if ($send_result == 0) {
125 $_page[
'header_text'] =
_t($sKissKey .
'2');
127 $_page[
'header_text'] =
_t($sKissKey .
'3');
130 $ret =
$GLOBALS[
'oSysTemplate']->parseHtmlByContent($sResTmpl, array(
'content' => $action_result));
143 if (
'Active' != $recipient[
'Status']) {
157 if (
$logged[
'member'] || !$isCheckVisitorGreeting) {
158 $aTemplate = $rEmailTemplate->getTemplate(
't_VKiss', $_COOKIE[
'memberID']);
160 $aTemplate = $rEmailTemplate->getTemplate(
't_VKiss_visitor');
163 $sConfCode = urlencode(base64_encode(base64_encode(crypt($recipient[
'ID'], CRYPT_EXT_DES ?
"vkiss_sec" :
"vk"))));
166 $sProfileLink = $sender
168 :
'<b>' .
_t(
"_Visitor") .
'</b>';
171 ?
'<a href="' . CH_WSB_URL_ROOT .
'greet.php?fullpage=1&sendto=' .
$member[
'ID'] .
'&from=' . $recipient[
'ID'] .
'&ConfCode=' . $sConfCode .
'">' . CH_WSB_URL_ROOT .
'greet.php?sendto=' .
$member[
'ID'] .
'&from=' . $recipient[
'ID'] .
'&ConfCode=' . $sConfCode .
'</a>'
172 :
'<a href="' . CH_WSB_URL_ROOT .
'communicator.php">' . CH_WSB_URL_ROOT .
'communicator.php</a>';
175 '<ConfCode>' => $sConfCode,
176 '<ProfileReference>' => $sProfileLink,
177 '<VKissLink>' => $sKissLink,
179 '<SiteName>' => CH_WSB_URL_ROOT,
182 $aTemplate[
'Body'] = str_replace(array_keys($aRepl), array_values($aRepl), $aTemplate[
'Body']);
183 $mail_ret =
sendMail($recipient[
'Email'], $aTemplate[
'Subject'], $aTemplate[
'Body'], $recipient[
'ID']);
190 $sender[
'ID'] = (!$sender[
'ID']) ? 0 : $sender[
'ID'];
198 `Sender` = '{$sender['ID']}',
199 `Recipient` = '{$recipient['ID']}',
200 `Subject` = '{$aTemplate['Subject']}',
201 `Text` = '{$aTemplate['Body']}',
212 $kiss_arr =
db_arr(
"SELECT `ID` FROM `sys_greetings` WHERE `ID` = {$member['ID']} AND `Profile` = {$recipient['ID']} LIMIT 1",
215 $result =
db_res(
"INSERT INTO `sys_greetings` ( `ID`, `Profile`, `Number`, `When`, `New` ) VALUES ( {$member['ID']}, {$recipient['ID']}, 1, NOW(), '1' )",
218 $result =
db_res(
"UPDATE `sys_greetings` SET `Number` = `Number` + 1, `New` = '1' WHERE `ID` = {$member['ID']} AND `Profile` = {$recipient['ID']}",
process_db_input($sText, $iStripTags=0)
</code > Be careful enabling this directive if you have a redirector script that does not use the< code > Location</code > HTTP header
$_page_cont[$_ni]['page_main_code']
if(!defined("TRUE_VAL")) define("TRUE_VAL" true
const ACTION_ID_SEND_VKISS
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
db_arr($query, $bindings=[])
and distribute a copy of this License along with the Library You may charge a fee for the physical act of transferring a and you may at your option offer warranty protection in exchange for a fee You may modify your copy or copies of the Library or any portion of thus forming a work based on the and copy and distribute such modifications or work under the terms of Section provided that you also meet all of these other than as an argument passed when the facility is then you must make a good faith effort to ensure in the event an application does not supply such function or table
_t_err( $str, $arg0="", $arg1="", $arg2="")
_t($key, $arg0="", $arg1="", $arg2="")
PageCode($oTemplate=null)
member_auth($member=0, $error_handle=true, $bAjx=false)
getProfileLink( $iID, $sLinkAdd='')
checkAction($iMemberId, $actionID, $performAction=false, $iForcedProfID=0, $isCheckMemberStatus=true)
isBlocked($iFirstProfile, $iSecondProfile)
genAjaxyPopupJS($iTargetID, $sDivID='ajaxy_popup_result_div', $sRedirect='')
db_res($query, $bindings=[])
getProfileInfo($iProfileID=0, $checkActiveStatus=false, $forceCache=false)
MemberSendVKiss($member, $recipient, $isCheckVisitorGreeting=true)
DesignBoxContent($title, $content, $db_num=0, $caption_item='', $bottom_item='')