30 $this->aMutualFriends = array();
32 parent::__construct(
$ID, 0);
43 if ($this->_iProfileID) {
46 if ($this->_aProfile) {
53 $this->bPFEditable =
true;
68 if (!$this->oPF->aBlocks) {
72 $this->aPFBlocks = $this->oPF->aBlocks;
75 $this->aCoupleMutualItems = $this->oPF->getCoupleMutualFields();
78 $this->iFriendsPerPage = (int)
getParam(
'friends_per_page');
91 <div
id=
"thin_column">
95 <div
id=
"thick_column">
100 return ob_get_clean();
105 $sVisible = (
$GLOBALS[
'logged'][
'member']) ?
'memb':
'non';
107 $sAddSQL = ($sOldStyle ==
true) ?
" AND `Func`='PFBlock' " :
'';
108 $rBlocks =
db_res(
"SELECT * FROM `sys_page_compose` WHERE `Page` = 'profile' AND `Column`=$column AND FIND_IN_SET( '$sVisible', `Visible` ) {$sAddSQL} ORDER BY `Order`");
109 while ($aBlock = $rBlocks ->fetch()) {
110 $func =
'showBlock' . $aBlock[
'Func'];
111 $this->$func($aBlock[
'Caption'], $aBlock[
'Content']);
129 if ($bMayEdit && $sRet) {
131 '<div class="ch-def-bc-margin">' . $sRet .
'</div>',
133 _t(
'_Edit') => array(
135 'href' =>
'pedit.php?ID=' . $this->_iProfileID,
136 'dynamicPopup' =>
false,
137 'active' => $this->bPFEditable,
144 return empty($sRet) ? $sRet : array(
'<div class="ch-def-bc-margin">' . $sRet .
'</div>', array(), array(),
'');
153 if (!isset($this->aPFBlocks[$iPFBlockID])
or empty($this->aPFBlocks[$iPFBlockID][
'Items'])) {
159 $aItems = $this->aPFBlocks[$iPFBlockID][
'Items'];
163 $aInputsSecond = array();
165 foreach ($aItems
as $aItem) {
166 $sItemName = $aItem[
'Name'];
167 $sValue1 = $this->_aProfile[$sItemName];
168 $sValue2 = $this->_aCouple[$sItemName];
170 if ($aItem[
'Name'] ==
'Age') {
171 $sValue1 = $this->_aProfile[
'DateOfBirth'];
172 $sValue2 = $this->_aCouple[
'DateOfBirth'];
175 if ($this->bPFEditable) {
177 'couple' => $this->bCouple,
182 'profile_id' => $this->_iProfileID,
185 $aInputs[] = $this->oPF->convertEditField2Input($aItem, $aParams, 0);
187 if ($aItem[
'Type'] ==
'pass') {
188 $aItem_confirm = $aItem;
190 $aItem_confirm[
'Name'] .=
'_confirm';
191 $aItem_confirm[
'Caption'] =
'_Confirm password';
192 $aItem_confirm[
'Desc'] =
'_Confirm password descr';
194 $aInputs[] = $this->oPF->convertEditField2Input($aItem_confirm, $aParams, 0);
196 if ($this->bCouple
and !in_array($sItemName, $this->aCoupleMutualItems)) {
197 $aInputsSecond[] = $this->oPF->convertEditField2Input($aItem_confirm, $aInputParams, 1);
201 if ($this->bCouple
and !in_array($sItemName, $this->aCoupleMutualItems)
and $sValue2) {
202 $aInputsSecond[] = $this->oPF->convertEditField2Input($aItem, $aParams, 1);
205 if ($sValue1 || $aItem[
'Type'] ==
'bool') {
208 'name' => $aItem[
'Name'],
209 'caption' =>
_t($aItem[
'Caption']),
210 'value' => $this->oPF->getViewableValue($aItem, $sValue1),
211 'wrap_text' => $aItem[
'Type'] ==
'area',
215 if ($this->bCouple
and !in_array($sItemName, $this->aCoupleMutualItems)
and ($sValue2 || $aItem[
'Type'] ==
'bool')) {
216 $aInputsSecond[] = array(
218 'name' => $aItem[
'Name'],
219 'caption' =>
_t($aItem[
'Caption']),
220 'value' => $this->oPF->getViewableValue($aItem, $sValue2),
227 if (!
empty($aInputsSecond)) {
230 'type' =>
'block_header',
231 'caption' =>
_t(
'_First Person')
237 'type' =>
'block_header',
238 'caption' =>
_t(
'_Second Person'),
242 $aInputs = array_merge($aHeader1, $aInputs, $aHeader2, $aInputsSecond);
245 if (
empty($aInputs)) {
249 if ($this->bPFEditable) {
254 'value' =>
_t(
'_Save'),
262 'value' => $this->_iProfileID,
267 'name' =>
'force_ajax_save',
273 'name' =>
'pf_block',
274 'value' => $iPFBlockID,
279 'name' =>
'do_submit',
285 'action' => CH_WSB_URL_ROOT .
'pedit.php',
286 'onsubmit' =>
"submitViewEditForm(this, $iPageBlockID, " .
ch_html_attribute($_SERVER[
'PHP_SELF']) .
"'?ID={$this->_iProfileID}'); return false;",
287 'name' =>
'edit_profile_form',
290 $aFormParams = array();
293 'name' =>
'view_profile_form',
296 $aFormParams = array(
297 'remove_form' =>
true,
303 'form_attrs' => $aFormAttrs,
304 'params' => $aFormParams,
305 'inputs' => $aInputs,
326 $sProfileThumbnail =
'';
327 $sProfileThumbnail2x =
'';
328 $sProfileThumbnailHref =
'';
330 $bProfileThumbnail =
false;
331 $bProfileThumbnailHref =
false;
333 $aProfileThumbnail =
ChWsbService::call(
'photos',
'profile_photo', array(
$p_arr[
'ID'],
'browse',
'full'),
'Search');
334 if (!
empty($aProfileThumbnail) && is_array($aProfileThumbnail)) {
335 $sProfileThumbnail = $aProfileThumbnail[
'file_url'];
336 $sProfileThumbnailHref = $aProfileThumbnail[
'view_url'];
338 $bProfileThumbnail =
true;
339 $bProfileThumbnailHref =
true;
341 $aProfileThumbnail2x =
ChWsbService::call(
'photos',
'profile_photo', array(
$p_arr[
'ID'],
'browse2x',
'full'),
'Search');
342 if (!
empty($aProfileThumbnail2x) && is_array($aProfileThumbnail2x)) {
343 $sProfileThumbnail2x = $aProfileThumbnail[
'file_url'];
348 $sProfileThumbnailHref =
ChWsbService::call(
'photos',
'get_manage_profile_photo_url', array(
$p_arr[
'ID'],
'profile_album_name'));
350 $bProfileThumbnailHref = !
empty($sProfileThumbnailHref);
353 $sProfileCoverHref =
'';
354 $bProfileCoverHref =
false;
358 $bProfileCoverHref = !
empty($sProfileCoverHref);
361 $sProfileCoverChangeHref =
'';
362 $bProfileCoverChangeHref =
false;
364 $sProfileCoverChangeHref =
ChWsbService::call(
'photos',
'get_manage_profile_photo_url', array(
$p_arr[
'ID'],
'profile_cover_album_name'));
365 $bProfileCoverChangeHref = !
empty($sProfileCoverChangeHref);
373 $sBackgroundClass =
'';
374 if ($bProfileCoverHref) {
375 $sBackground = $sProfileCoverHref;
376 $sBackgroundClass =
' sys-pcb-cover';
377 } elseif ($bProfileThumbnail) {
378 $sBackground = $sProfileThumbnail;
379 $sBackgroundClass =
' sys-pcb-thumbnail';
382 $aTmplVarsMenu = array();
404 $sContent =
$GLOBALS[
'oSysTemplate']->parseHtmlByName(
'profile_cover.html', array(
405 'background_class' => $sBackgroundClass,
406 'ch_if:show_background' => array(
407 'condition' => !
empty($sBackground),
409 'background' => $sBackground
412 'ch_if:show_actions' => array(
413 'condition' => $bProfileOwner,
415 'ch_if:show_action_thumbnail' => array(
416 'condition' => $bProfileThumbnailHref,
418 'href_upload_thumbnail' => $sProfileThumbnailHref
421 'ch_if:show_action_cover' => array(
422 'condition' => $bProfileCoverChangeHref,
424 'href_upload' => $sProfileCoverChangeHref,
429 'ch_if:show_thumbnail_image' => array(
430 'condition' => $bProfileThumbnail,
432 'thumbnail_href' => $sProfileThumbnailHref,
433 'thumbnail' => $sProfileThumbnail,
434 'thumbnail2x' => $sProfileThumbnail2x,
437 'ch_if:show_thumbnail_letter_text' => array(
438 'condition' => !$bProfileThumbnail && !$bProfileThumbnailHref,
440 'letter' => mb_substr($sProfileNickname, 0, 1)
443 'ch_if:show_thumbnail_letter_link' => array(
444 'condition' => !$bProfileThumbnail && $bProfileThumbnailHref,
446 'thumbnail_href' => $sProfileThumbnailHref,
447 'letter' => mb_substr($sProfileNickname, 0, 1)
450 'nickname' => $sProfileNickname,
451 'status' => $sProfileStatus,
452 'ch_repeat:menu_items' => $aTmplVarsMenu,
455 return array(
$sContent, array(), array(),
true);
473 $sActions =
$GLOBALS[
'oFunctions']->getProfileViewActions(
$p_arr[
'ID'],
'Profile');
488 $sQuery =
"SELECT `ID` FROM `sys_friend_list` WHERE `Profile`='" . $aViewer[
'ID'] .
"' AND `Check`=0 LIMIT 1";
489 $mixedCheck =
$GLOBALS[
'MySQL']->getOne($sQuery);
490 if ((
int)$mixedCheck == 0) {
493 $sContent =
_t(
'_pending_friend_request_answer', CH_WSB_URL_ROOT .
"communicator.php?person_switcher=to&communicator_mode=friends_requests");
495 return array(
$sContent, array(), array(),
false);
503 if (!$votes || !$this->oVotingView->isEnabled() ||
isBlocked($this -> _iProfileID,
getLoggedId())) {
507 $ret = $this->oVotingView->getBigVoting();
508 $ret =
$GLOBALS[
'oSysTemplate']->parseHtmlByName(
'default_margin.html', array(
'content' =>
$ret));
522 return $this->oCmtsView->getCommentsFirst();
529 $sAllFriends =
'viewFriends.php?iUser=' . $this -> _iProfileID;
537 $iPages = ceil($iCount / $iLimit);
547 $sqlFrom = (
$iPage - 1) * $iLimit;
551 $sqlLimit =
"LIMIT {$sqlFrom}, {$iLimit}";
556 $aAllFriends =
getMyFriendsEx($this->_iProfileID,
'',
'image', $sqlLimit);
557 $iCurrCount = count($aAllFriends);
560 'ch_repeat:friends' => array()
562 foreach ($aAllFriends
as $iFriendID => $aFriendsPrm) {
563 $aTmplVars[
'ch_repeat:friends'][] = array(
564 'content' =>
get_member_thumbnail($iFriendID,
'none',
true,
'visitor', array(
'is_online' => $aFriendsPrm[5]))
570 'page_url' => CH_WSB_URL_ROOT .
'profile.php',
572 'per_page' => $iLimit,
574 'on_change_page' =>
'return !loadDynamicBlock({id}, \'' . $sProfileLink.
'?page={page}&per_page={per_page}\');',
577 $sPaginate = $oPaginate->getSimplePaginate($sAllFriends);
584 if ($this->_iProfileID == $iViewer) {
587 if ($this->iCountMutFriends > 0) {
594 'ch_repeat:friends' => array()
596 foreach ($this->aMutualFriends
as $iKey => $sValue) {
597 $aTmplVars[
'ch_repeat:friends'][] = array(
601 $sCode =
$GLOBALS[
'oSysTemplate']->parseHtmlByName(
'profile_friends.html', $aTmplVars);
603 if ($this->iCountMutFriends >
$iPerPage) {
605 'page_url' => CH_WSB_URL_ROOT .
'profile.php',
606 'count' => $this->iCountMutFriends,
609 'on_change_page' =>
'return !loadDynamicBlock({id}, \'' .
getProfileLink($this->_iProfileID).
'?page={page}&per_page={per_page}\');',
611 $sPaginate = $oPaginate->getSimplePaginate(
'', -1, -1,
false);
615 return array(
$sCode, array(), $sPaginate,
true);
629 $iViewer = (int)$iViewer;
631 if ($this->iCountMutFriends > 0) {
637 SELECT p.ID AS `friendID` , p.NickName
639 INNER JOIN (SELECT `ID` AS `ID`, `When` FROM `sys_friend_list` WHERE `Profile` = '{$this->_iProfileID}' AND `Check` =1
640 UNION SELECT `Profile` AS `ID`, `When` FROM `sys_friend_list` WHERE `ID` = '{$this->_iProfileID}' AND `Check` =1) AS `f1`
641 ON (`f1`.`ID` = `p`.`ID`)
642 INNER JOIN (SELECT `ID` AS `ID`, `When` FROM `sys_friend_list` WHERE `Profile` = '{$iViewer}' AND `Check` =1
643 UNION SELECT `Profile` AS `ID`, `When` FROM `sys_friend_list` WHERE `ID` = '{$iViewer}' AND `Check` =1) AS `f2`
644 ON (`f2`.`ID` = `p`.`ID`)
645 ORDER BY p.`Avatar` DESC
649 $vResult =
db_res($sQuery);
650 while ($aRow = $vResult ->fetch()) {
651 $this->aMutualFriends[ $aRow[
'friendID'] ] = $aRow[
'NickName'];
656 public function GenSqlConditions(&$aSearchBlocks, &$aRequestParams, $aFilterSortSettings = array())
660 $sPossibleOrder =
'';
664 foreach ($aSearchBlocks
as $iBlockID => $aBlock) {
665 foreach ($aBlock[
'Items']
as $aItem) {
666 if (!isset($aRequestParams[ $aItem[
'Name'] ])) {
670 $sItemName = $aItem[
'Name'];
671 $mValue = $aRequestParams[$sItemName];
673 switch ($aItem[
'Type']) {
676 if ($sItemName ==
'Tags') {
677 $sJoin .=
" INNER JOIN `sys_tags` ON (`sys_tags`.`Type` = 'profile' AND `sys_tags`.`ObjID` = `Profiles`.`ID`) ";
685 $mValue[0] = (int)$mValue[0];
686 $mValue[1] = (int)$mValue[1];
687 $aWhere[] =
"`Profiles`.`$sItemName` >= {$mValue[0]} AND `Profiles`.`$sItemName` <= {$mValue[1]}";
691 $iMin = floor($mValue[0] * 365.25);
692 $iMax = floor($mValue[1] * 365.25);
694 $aWhere[] =
"DATEDIFF( NOW(), `Profiles`.`$sItemName` ) >= $iMin AND DATEDIFF( NOW(), `Profiles`.`$sItemName` ) <= $iMax";
700 if (is_array($mValue)) {
701 $sValue = implode(
',', $mValue);
711 $aMyValues = is_array($mValue) ? $mValue : array($mValue);
713 foreach ($aMyValues
as $sValue) {
715 $aSet[] =
"FIND_IN_SET( '$sValue', `Profiles`.`$sItemName` )";
718 $aWhere[] =
'( ' . implode(
' OR ', $aSet) .
' )';
726 $aWhere[] =
"`Profiles`.`$sItemName`";
730 switch ($aItem[
'Name']) {
732 if ($mValue ==
'-1') {
734 $aWhere[] =
"`Profiles`.`Couple` > `Profiles`.`ID`";
736 $aWhere[] =
"`Profiles`.`Couple` = 0";
742 $aFields = explode(
"\n", $aItem[
'Extra']);
747 $aKeyw[] =
"`Profiles`.`$sField` LIKE '%$sValue%'";
750 $aWhere[] =
'( ' . implode(
' OR ', $aKeyw) .
')';
754 $aWhere[] =
"`ID` = $mValue";
764 if (
getParam(
"ch_zip_enabled") ==
"on" && $aRequestParams[
'distance'] > 0) {
771 $aWhere[] =
"`Profiles`.`Status` = 'Active'";
775 $iOnlineTime = (int)
getParam(
'member_online_time');
776 $aWhere[] =
"`DateLastNav` >= DATE_SUB(NOW(), INTERVAL $iOnlineTime MINUTE)";
781 $sPossibleOrder =
'';
784 $aWhere[] =
"`Profiles`.`Featured` = '1'";
787 $aWhere[] =
"MONTH(`DateOfBirth`) = MONTH(CURDATE()) AND DAY(`DateOfBirth`) = DAY(CURDATE())";
790 $sPossibleOrder =
' ORDER BY `Profiles`.`Rate` DESC, `Profiles`.`RateCount` DESC';
793 $sPossibleOrder =
' ORDER BY `Profiles`.`Views` DESC';
796 $sJoin .=
" INNER JOIN `" . DB_PREFIX .
"ChatProfiles` ON `Profiles`.`ID`= `" . DB_PREFIX .
"ChatProfiles`.`ID` ";
797 $aWhere[] =
"`" . DB_PREFIX .
"ChatProfiles`.`Type`='moder'";
801 switch ($aFilterSortSettings[
'sort']) {
803 $sPossibleOrder =
' ORDER BY `Profiles`.`DateLastNav` DESC';
806 $sPossibleOrder =
' ORDER BY `Profiles`.`DateReg` DESC';
809 $sPossibleOrder =
' ORDER BY `Profiles`.`Rate` DESC, `Profiles`.`RateCount` DESC';
817 $aWhere[] =
"`Profiles`.`Avatar`";
820 $aWhere[] =
"(`Profiles`.`Couple`='0' OR `Profiles`.`Couple`>`Profiles`.`ID`)";
822 return array($aWhere, $sJoin, $sPossibleOrder);
825 public function GenSearchResultBlock($aSearchBlocks, $aRequestParams, $aFilterSortSettings = array(), $sPgnRoot =
'profile.php')
827 if (
empty($aSearchBlocks)) {
828 return array(
'', array(),
'',
'');
832 $iOnlineTime = (int)
getParam(
"member_online_time");
833 $sIsOnlineSQL =
", if(`DateLastNav` > SUBDATE(NOW(), INTERVAL {$iOnlineTime} MINUTE ), 1, 0) AS `is_online`";
835 $sQuery =
'SELECT DISTINCT SQL_CALC_FOUND_ROWS IF( `Profiles`.`Couple`=0, `Profiles`.`ID`, IF( `Profiles`.`Couple`>`Profiles`.`ID`, `Profiles`.`ID`, `Profiles`.`Couple` ) ) AS `ID` ' . $sIsOnlineSQL .
' FROM `Profiles` ';
836 $sQueryCnt =
'SELECT COUNT(DISTINCT IF( `Profiles`.`Couple`=0, `Profiles`.`ID`, IF( `Profiles`.`Couple`>`Profiles`.`ID`, `Profiles`.`ID`, `Profiles`.`Couple` ) )) AS "Cnt" FROM `Profiles` ';
838 list($aWhere, $sJoin, $sPossibleOrder) = $this->
GenSqlConditions($aSearchBlocks, $aRequestParams, $aFilterSortSettings);
840 $sWhere =
' WHERE ' . implode(
' AND ', $aWhere);
843 $sQuery = $sQuery . $sJoin . $sWhere . $sPossibleOrder;
844 $sQueryCnt = $sQueryCnt . $sJoin . $sWhere . $sPossibleOrder;
848 $iCountProfiles = (int)(
db_value($sQueryCnt));
850 $sResults = $sTopFilter =
'';
851 if ($iCountProfiles) {
853 $iCurrentPage = isset(
$_GET[
'page']) ? (int)
$_GET[
'page'] : 1;
854 $iResultsPerPage = isset(
$_GET[
'res_per_page']) ? (int)
$_GET[
'res_per_page'] : 10;
856 if ($iCurrentPage < 1) {
859 if ($iResultsPerPage < 1) {
860 $iResultsPerPage = 10;
863 $iTotalPages = ceil($iCountProfiles / $iResultsPerPage);
865 if ($iTotalPages > 1) {
866 if ($iCurrentPage > $iTotalPages) {
867 $iCurrentPage = $iTotalPages;
870 $sLimitFrom = ($iCurrentPage - 1) * $iResultsPerPage;
871 $sQuery .=
" LIMIT {$sLimitFrom}, {$iResultsPerPage}";
873 list($sPagination, $sTopFilter) = $this->
genSearchPagination($iCountProfiles, $iCurrentPage, $iResultsPerPage, $aFilterSortSettings, $sPgnRoot);
879 $aProfiles = array();
880 $aProfileStatuses = array();
881 $rProfiles =
db_res($sQuery);
882 while (
$aProfile = $rProfiles->fetch()) {
887 $sOutputMode = (isset(
$_REQUEST[
'search_result_mode']) &&
$_REQUEST[
'search_result_mode'] ==
'ext') ?
'ext' :
'sim';
889 $aDBTopMenu = array();
890 foreach (array(
'sim',
'ext' )
as $myMode) {
893 $modeTitle =
_t(
'_Simple');
896 $modeTitle =
_t(
'_Extended');
901 unset($aGetParams[
'search_result_mode']);
903 $aDBTopMenu[$modeTitle] = array(
'href' =>
ch_html_attribute($_SERVER[
'PHP_SELF']) .
"?search_result_mode={$myMode}{$sRequestString}",
'dynamic' =>
false,
'active' => ($myMode == $sOutputMode));
906 if ($sOutputMode ==
'sim') {
907 $sBlockWidthSQL =
"SELECT `PageWidth`, `ColWidth` FROM `sys_page_compose` WHERE `Page`='profile' AND `Func`='ProfileSearch'";
908 $aBlockWidthInfo =
db_arr($sBlockWidthSQL);
910 $iBlockWidth = (int)((
int)$aBlockWidthInfo[
'PageWidth'] ) - 20;
912 $iMaxThumbWidth =
getParam(
'max_thumb_width') + 6;
914 $iDestWidth = $iCountProfiles * ($iMaxThumbWidth + 6);
916 if ($iDestWidth > $iBlockWidth) {
917 $iMaxAllowed = (int)floor($iBlockWidth / ($iMaxThumbWidth + 6));
918 $iDestWidth = $iMaxAllowed * ($iMaxThumbWidth + 6);
921 $sWidthCent = ($iDestWidth > 0) ?
"width:{$iDestWidth}px;" :
'';
923 $sResults .=
'<div class="block_rel_100 ch-def-bc-margin' . ($sOutputMode ==
'sim' ?
'-thd' :
'') .
'">';
926 require_once(CH_DIRECTORY_PATH_ROOT .
'templates/tmpl_'.
$GLOBALS[
'tmpl'].
'/scripts/ChTemplSearchProfile.php');
930 foreach ($aProfiles
as $iProfID) {
934 $aProfileStatus = array(
935 'is_online' => $aProfileStatuses[$iProfID]
939 $sResults .= $oChTemplSearchProfile->displaySearchUnit(
$aProfileInfo);
944 <div
id=
"ajaxy_popup_result_div" style=
"display: none;"></div>
945 <div
class=
"clear_both"></div>
949 return array($sResults, $aDBTopMenu, $sPagination, $sTopFilter);
951 return array(
MsgBox(
_t(
'_Empty')), array(),
'',
'');
959 $aDateParams = array();
962 $aDateParams = explode(
'/', $sDate);
966 $sOutputMode = (isset(
$_REQUEST[
'mode']) &&
$_REQUEST[
'mode'] ==
'dob') ?
'dob' :
'dor';
967 $aDBTopMenu = array();
968 foreach (array(
'dob',
'dor' )
as $myMode) {
971 if ($sOutputMode == $myMode) {
972 $oCalendar->setMode(
'dob');
974 $modeTitle =
_t(
'Date of birth');
977 $modeTitle =
_t(
'Date of registration');
982 unset($aGetParams[
'mode']);
984 $aDBTopMenu[$modeTitle] = array(
'href' =>
ch_html_attribute($_SERVER[
'PHP_SELF']) .
"?mode={$myMode}{$sRequestString}",
'dynamic' =>
true,
'active' => ($myMode == $sOutputMode));
988 return array( $oCalendar->display(), $aDBTopMenu );
991 public function genSearchPagination($iCountProfiles, $iCurrentPage, $iResultsPerPage, $aFilterSortSettings = array(), $sPgnRoot =
'')
994 unset($aGetParams[
'page']);
995 unset($aGetParams[
'res_per_page']);
996 unset($aGetParams[
'sort']);
999 $sRequestString = CH_WSB_URL_ROOT . strip_tags($sPgnRoot) .
'?' . substr($sRequestString, 1);
1001 $sPaginTmpl = $sRequestString .
'&res_per_page={per_page}&page={page}&sort={sorting}';
1007 'page_url' => $sPaginTmpl,
1008 'count' => $iCountProfiles,
1009 'per_page' => $iResultsPerPage,
1010 'sorting' => $aFilterSortSettings[
'sort'],
1011 'page' => $iCurrentPage,
1015 $sPagination = $oPaginate->getPaginate();
1018 $aSortingParam = array(
1019 'none' =>
_t(
'_None'),
1020 'activity' =>
_t(
'_Latest activity'),
1021 'date_reg' =>
_t(
'_FieldCaption_DateReg_View'),
1024 $aSortingParam[
'rate'] =
_t(
'_Rate');
1028 $sSortBlock = $oPaginate->getSorting($aSortingParam);
1029 $sSortElement =
'<div class="ordered_block">' . $sSortBlock .
'</div><div class="clear_both"></div>';
1030 $sSortElement =
$GLOBALS[
'oSysTemplate']->parseHtmlByName(
'designbox_top_controls.html', array(
1031 'top_controls' => $sSortElement
1034 return array($sPagination, $sSortElement);
1039 if (!is_array($aGetParams)) {
1044 foreach ($aGetParams
as $sKey => $sValue) {
1045 if ($sValue ===
'') {
1049 if (!is_array($sValue)) {
1050 $sRet .=
'&' . urlencode($sKeyPref . $sKey . $sKeyPostf) .
'=' . urlencode(
process_pass_data($sValue));
1066 $iViewedMemberID = (int)
$p_arr[
'ID'];
1068 if ((!$iMemberID
or !$iViewedMemberID)
or ($iMemberID == $iViewedMemberID)) {
1073 $p_arr[
'url'] = CH_WSB_URL_ROOT;
1074 $p_arr[
'window_width'] = $this->oTemplConfig->popUpWindowWidth;
1075 $p_arr[
'window_height'] = $this->oTemplConfig->popUpWindowHeight;
1076 $p_arr[
'anonym_mode'] = $this->oTemplConfig->bAnonymousMode;
1077 $p_arr[
'member_id'] = $iMemberID;
1080 $sActions =
$GLOBALS[
'oFunctions']->genObjectsActions(
$p_arr,
'Profile',
'cellpadding="0" cellspacing="0"');