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' );
24 $sTargetsId = isset($_POST[
'list_id']) ? $_POST[
'list_id'] :
'';
29 $bAjxMod = isset($_SERVER[
'HTTP_X_REQUESTED_WITH'])
30 && $_SERVER[
'HTTP_X_REQUESTED_WITH'] ==
'XMLHttpRequest' ?
true :
false;
36 header(
'Content-Type: text/html; charset=utf-8');
118 case 'remove_friend':
148 case 'change_status':
149 if (
$bAjxMod && isset($_POST[
'status']) ) {
155 case 'change_status_message':
171 $GLOBALS[
'_page'][
'header'] =
_t(
'_Error occured');
190 if ($iMemberIdForce) {
191 $iMemberID = (int) $iMemberIdForce;
196 if( $iMemberID && isset($_POST[
'status_message']) ) {
200 $sQuery =
"UPDATE `Profiles` SET `UserStatusMessage`='{$sNewStatusMessage}'
201 , `UserStatusMessageWhen` = UNIX_TIMESTAMP() WHERE `ID` = '{$iMemberID}'";
203 if(
db_res($sQuery, 0) ) {
207 , $iMemberID, $iMemberID, array ($sNewStatusMessage));
233 $sQuery =
"UPDATE `Profiles` SET `UserStatus`='{$sStatus}', `DateLastNav` = NOW()
234 WHERE `ID` = '{$iProfileId}'";
236 if(
db_res($sQuery, 0) ) {
267 if( is_int($mMembers) ) {
271 $aMembers = explode(
',', $mMembers);
273 for($i = 0, $iCountMembers = count($aMembers); $i <= $iCountMembers; $i++) {
282 if(!$sActionResult) {
283 $sActionResult =
MsgBox(
_t(
'_Report about spam was sent') );
286 return $sActionResult;
303 return MsgBox(
_t(
'_Failed to apply changes'));
309 $oCommunicator -> execFunction(
'_deleteRequest',
'sys_friend_list', $aParams, array(1, 1));
311 return MsgBox(
_t(
'_Friend was removed') );
328 return MsgBox(
_t(
'_Failed to apply changes') );
338 return MsgBox(
_t(
'_You have blocked by this profile') );
342 $aFriendsInfo =
db_assoc_arr(
"SELECT * FROM `sys_friend_list`
343 WHERE (`ID`='{$iProfileId}' AND `Profile`='{$iMemberId}')
344 OR (`ID`='{$iMemberId}' AND `Profile` = '{$iProfileId}')");
348 if( isset($aFriendsInfo[
'Check']) && $aFriendsInfo[
'Check'] == 1) {
349 $sOutputCode =
MsgBox(
_t(
'_already_in_friend_list') );
350 }
else if( isset($aFriendsInfo[
'ID'], $aFriendsInfo[
'Check']) ) {
351 if (
$iProfileId == $aFriendsInfo[
'ID'] && $aFriendsInfo[
'Check'] == 0) {
352 $sOutputCode =
MsgBox(
_t(
'_pending_friend_request') );
355 $sQuery =
"UPDATE `sys_friend_list` SET `Check` = '1'
356 WHERE `ID` = '{$iMemberId}' AND `Profile` = '{$iProfileId}';";
358 if (
db_res($sQuery, 0) ) {
359 $sOutputCode =
MsgBox(
_t(
'_User was added to friend list') );
366 $sOutputCode =
MsgBox(
_t(
'_Failed to apply changes') );
370 $sOutputCode =
MsgBox(
_t(
'_Failed to apply changes') );
374 $sQuery =
"INSERT INTO `sys_friend_list` SET
375 `ID` = '{$iProfileId}', `Profile` = '{$iMemberId}', `Check` = '0'";
377 if (
db_res($sQuery, 0) ) {
378 $sOutputCode =
MsgBox(
_t(
'_User was invited to friend list') );
387 $aTemplate = $oEmailTemplate -> getTemplate(
't_FriendRequest',
$iMemberId);
395 'RequestLink' => CH_WSB_URL_ROOT
396 .
'communicator.php?communicator_mode=friends_requests',
399 sendMail( $aRecipient[
'Email'], $aTemplate[
'Subject'], $aTemplate[
'Body'],
'', $aPlus );
401 $sOutputCode =
MsgBox(
_t(
'_Failed to apply changes') );
423 return MsgBox(
_t(
'_Failed to apply changes'));
425 $sQuery =
"INSERT IGNORE INTO `sys_fave_list` SET `ID` = '{$iId}', `Profile` = '{$iProfileId}'";
426 if((
int)
$GLOBALS[
'MySQL']->query($sQuery) > 0) {
427 $sOutputCode =
MsgBox(
_t(
'_User was added to favourites') );
434 $sOutputCode =
MsgBox(
_t(
'_Failed to apply changes'));
453 return MsgBox(
_t(
'_Failed to apply changes'));
455 $sQuery =
"DELETE FROM `sys_fave_list` WHERE `ID`='{$iId}' AND `Profile`='{$iProfileId}'";
456 if((
int)
$GLOBALS[
'MySQL']->query($sQuery) > 0) {
457 $sOutputCode =
MsgBox(
_t(
'_User was removed from favourites'));
464 $sOutputCode =
MsgBox(
_t(
'_Failed to apply changes'));
483 return MsgBox(
_t(
'_Failed to apply changes') );
489 $sOutputCode =
MsgBox(
_t(
'_User was removed from block list') );
491 $sOutputCode =
MsgBox(
_t(
'_Failed to apply changes') );
511 return MsgBox(
_t(
'_Failed to apply changes') );
514 $sQuery =
"REPLACE INTO `sys_block_list`
515 SET `ID` = '{$iProfileId}', `Profile` = '{$iMemberId}'";
517 if(
db_res($sQuery, 0) ) {
518 $sOutputCode =
MsgBox(
_t(
'_User was added to block list') );
526 $sQuery =
"DELETE FROM `sys_friend_list` WHERE
527 (`ID`='{$iProfileId}' AND `Profile`='{$iMemberId}') OR (`ID`='{$iMemberId}'
528 AND `Profile`='{$iProfileId}')";
532 $sOutputCode =
MsgBox(
_t(
'_Failed to apply changes') );
551 if ( isset($_COOKIE[
'menu_position']) ) {
552 $sDefaultValue =
clear_xss($_COOKIE[
'menu_position']);
554 $sDefaultValue =
getParam(
'ext_nav_menu_top_position');
559 'form_attrs' => array (
562 'name' =>
'menu_position_form'
566 'submit_name' =>
'do_submit',
571 'type' =>
'radio_set',
572 'name' =>
'menu_settings',
573 'caption' =>
'Position',
577 'bottom' =>
_t(
'_Bottom'),
578 'static' =>
_t(
'_Static'),
583 'params' => array(3, 6),
584 'error' =>
_t(
'_Error occured'),
586 'value' => $sDefaultValue,
593 'name' =>
'do_submit',
594 'value' =>
_t(
'_Save Changes'),
602 if (
$oForm -> isSubmittedAndValid() ) {
606 <script type="text/javascript">
607 opener.location.reload();
613 setcookie(
"menu_position",
$oForm -> getCleanValue(
'menu_settings')
614 ,
time() + 60 * 60 * 24 * 180);
638 $iViewerId = (int)$iViewerId;
689 $bSendActMail = FALSE;
694 $bSendActMail =
TRUE;
710 $bFeature =
$sType ==
'featured' ?
TRUE : FALSE;
732 return MsgBox(
_t(
'_Failed to apply changes') );
737 $aTemplate = $oEmailTemplate -> getTemplate(
't_SpamReport');
744 $aPlus[
'reporterNick'] =
getNickName($aReporter[
'ID']);
750 $aPlus[
'spamerNick'] =
getNickName($aSpamerInfo[
'ID']);
754 if( !
sendMail(
$site[
'email'], $aTemplate[
'Subject'], $aTemplate[
'Body'],
'', $aPlus ) ) {
755 return MsgBox(
_t(
'_Report about spam failed to sent') );
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
PageListHot($iId, $iProfileId=0)
ActionChangeStatusMessage($iMemberIdForce=0)
URI MungeSecretKey $secret_key</pre >< p > If the output is TRUE
if(!defined("TRUE_VAL")) define("TRUE_VAL" true
db_assoc_arr($query, $bindings=[])
PageListFriendRemove($iProfileId, $iMemberId=0)
PageListControl($sAction, $iViewerId, $iTargetId)
MsgBox($sText, $iTimer=0)
ch_admin_profile_ban_control($iProfileId, $bBan=true, $iDuration=0)
const CHECK_ACTION_RESULT_ALLOWED
PageListBlock($iProfileId, $iMemberId=0)
ch_import($sClassName, $aModule=array())
const CHECK_ACTION_RESULT
sendMail( $sRecipientEmail, $sMailSubject, $sMailBody, $iRecipientID=0, $aPlus=array(), $sEmailFlag='html', $isDisableAlert=false, $bForceSend=false)
_sendSpamReport($iProfileId, $iMemberId)
_setFeature($iTargetId, $sType)
const CHECK_ACTION_MESSAGE
ch_admin_profile_change_status($mixedIds, $sStatus, $bSendActMail=FALSE)
profile_delete($ID, $isDeleteSpammer=false)
PageListMemberMenuSettings($iProfileId, $sAction)
PageListUnBlock($iProfileId, $iMemberId=0)
PageListFriend($iProfileId, $iMemberId=0)
const ACTION_ID_SEND_FRIEND_REQUEST
createUserDataFile( $userID)
getParam($sParamName, $bUseCache=true)
ch_admin_profile_featured_control($iProfileId, $bFeature=TRUE)
ActionChangeStatus($iProfileId, $sStatus='')
_t($key, $arg0="", $arg1="", $arg2="")
that in the case of a Adaptation or at a minimum such credit will if a credit for all contributing authors of the Adaptation or Collection then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors For the avoidance of You may only use the credit required by this Section for the purpose of attribution in the manner set out above by exercising Your rights under this You may not implicitly or explicitly assert or imply any connection sponsorship or endorsement by the Original Licensor and or Attribution as of You or Your use of the without the express prior written permission of the Original Licensor and or Attribution Parties Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable if You Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or You must not modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author s honor or reputation Licensor agrees that in those in which any exercise of the right granted in modification or other derogatory action prejudicial to the Original Author s honor and the Licensor will waive or not as this to the fullest extent permitted by the applicable national to enable You to reasonably exercise Your right under Warranties and Disclaimer UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN LICENSOR OFFERS THE WORK AS IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE STATUTORY OR WITHOUT WARRANTIES OF FITNESS FOR A PARTICULAR OR THE ABSENCE OF LATENT OR OTHER OR THE PRESENCE OF ABSENCE OF WHETHER OR NOT DISCOVERABLE SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED SO SUCH EXCLUSION MAY NOT APPLY TO YOU Limitation on Liability EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES Termination This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License Individuals or entities who have received Adaptations or Collections from You under this will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses and will survive any termination of this License Subject to the above terms and the license granted here is Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time
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)
PageListHotRemove($iId, $iProfileId=0)
genAjaxyPopupJS($iTargetID, $sDivID='ajaxy_popup_result_div', $sRedirect='')
db_res($query, $bindings=[])
getProfileInfo($iProfileID=0, $checkActiveStatus=false, $forceCache=false)
_setStatus($iTargetId, $sAction)
DesignBoxContent($title, $content, $db_num=0, $caption_item='', $bottom_item='')
PageListSpam($iProfileId, $mMembers='')