17 $aContacts = array ();
20 $r =
db_res (
"SELECT `p`.`ID` FROM `Profiles` AS `p`
21 INNER JOIN `sys_fave_list` AS `h` ON (`h`.`Profile` = `p`.`ID`)
22 WHERE `h`.`ID` = $iId");
23 while ($aRow = $r->fetch())
24 $aAll[$aRow[
'ID']] = $aRow;
27 $r =
db_res (
"SELECT `p`.`ID` FROM `Profiles` AS `p`
28 INNER JOIN `sys_messages` AS `m` ON (`m`.`Sender` = `p`.`ID`)
29 WHERE `p`.`ID` != $iId AND `m`.`Recipient` = $iId");
30 while ($aRow = $r->fetch())
31 $aAll[$aRow[
'ID']] = $aRow;
34 $r =
db_res (
"SELECT `p`.`ID` FROM `Profiles` AS `p`
35 INNER JOIN `sys_messages` AS `m` ON (`m`.`Recipient` = `p`.`ID`)
36 WHERE `p`.`ID` != $iId AND `m`.`Sender` = $iId");
37 while ($aRow = $r->fetch())
38 $aAll[$aRow[
'ID']] = $aRow;
41 $r =
db_res (
"SELECT `p`.`ID` FROM `sys_friend_list` AS `fr`
42 LEFT JOIN `Profiles` AS `p` ON (`p`.`ID` = `fr`.`Profile`)
43 WHERE `fr`.`ID` = '$iId' AND `fr`.`Profile` != $iId AND `fr`.`Check` = '1'");
44 while ($aRow = $r->fetch())
45 $aAll[$aRow[
'ID']] = $aRow;
48 $r =
db_res (
"SELECT `p`.`ID` FROM `sys_friend_list` AS `fr`
49 LEFT JOIN `Profiles` AS `p` ON (`p`.`ID` = `fr`.`ID`)
50 WHERE `fr`.`Profile` = '$iId' AND `fr`.`ID` != $iId AND `fr`.`Check` = '1'");
51 while ($aRow = $r->fetch())
52 $aAll[$aRow[
'ID']] = $aRow;
58 foreach ($aAll
as $aRow) {
64 $aContacts[] =
new xmlrpcval($a,
'struct');
66 return new xmlrpcval ($aContacts,
"array");
78 $aCountriesList = $oProfileFields->convertValues4Input(
'#!Country');
80 $aCountries = array ();
86 $aCountries[] =
new xmlrpcval($a,
'struct');
88 return new xmlrpcval ($aCountries,
"array");
110 $iIdViewer = (int)$_COOKIE[
'memberID'];
120 $aRet[
'sex'] =
new xmlrpcval($aSexSql[
'Sex']);
121 $aRet[
'age'] =
new xmlrpcval(
age($aSexSql[
'DateOfBirth']));
122 $aRet[
'country'] =
new xmlrpcval(
_t(
$GLOBALS[
'aPreValues'][
'Country'][$aSexSql[
'Country']][
'LKey']));
123 $aRet[
'city'] =
new xmlrpcval($aSexSql[
'City']);
124 $aRet[
'status'] =
new xmlrpcval($aSexSql[
'UserStatusMessage']);
129 $aRet[
'countPhotos'] =
new xmlrpcval($oChWsbXMLRPCMedia->_getMediaCount(
'photo',
$iId, $iIdViewer));
130 $aRet[
'countVideos'] =
new xmlrpcval($oChWsbXMLRPCMedia->_getMediaCount(
'video',
$iId, $iIdViewer));
131 $aRet[
'countSounds'] =
new xmlrpcval($oChWsbXMLRPCMedia->_getMediaCount(
'music',
$iId, $iIdViewer));
135 $oZ =
new ChWsbAlerts(
'mobile',
'user_info',
$iId, $iIdViewer, array(
'profile' => &$aSexSql,
'return_data' => &$aRet));
144 $iIdViewer = (int)$_COOKIE[
'memberID'];
146 $sImageKey = ucfirst ($sImage);
165 'CountPhotos' =>
new xmlrpcval($oChWsbXMLRPCMedia->_getMediaCount(
'photo',
$iId, $iIdViewer)),
166 'CountVideos' =>
new xmlrpcval($oChWsbXMLRPCMedia->_getMediaCount(
'video',
$iId, $iIdViewer)),
167 'CountSounds' =>
new xmlrpcval($oChWsbXMLRPCMedia->_getMediaCount(
'music',
$iId, $iIdViewer)),
173 $oZ =
new ChWsbAlerts(
'mobile',
'user_info2', $a[
'ID'], $iIdViewer, array(
'profile' => &$a,
'return_data' => &$aRet));
179 public static function getMenu ($sMenu, $aMarkersReplace = array ())
181 $aDefaultMarkers = array (
182 'site_url' => CH_WSB_URL_ROOT,
183 'xmlrpc_url' => CH_WSB_URL_ROOT .
'xmlrpc/',
185 $aMarkersReplace = array_merge($aDefaultMarkers, $aMarkersReplace);
186 $aKeys = array_keys($aMarkersReplace);
187 $aValues = array_values($aMarkersReplace);
188 foreach ($aKeys
as $k => $v)
189 $aKeys[$k] =
'{' . $v .
'}';
192 $aRecords =
$GLOBALS[
'MySQL']->getAll(
"SELECT * FROM `sys_menu_mobile` WHERE `page` = ? AND `active` = 1 ORDER BY `order`", [$sMenu]);
195 $oZ =
new ChWsbAlerts(
'mobile',
'menu', 0, 0, array(
'menu' => $sMenu,
'data' => &$aRecords,
'markers_replace' => &$aMarkersReplace));
198 foreach ($aRecords
as $r) {
200 if ($r[
'eval_hidden']) {
201 if ($aMarkersReplace)
202 $sVal = str_replace($aKeys, $aValues, $r[
'eval_hidden']);
211 if ($sVal && $aMarkersReplace)
212 $sVal = str_replace($aKeys, $aValues, $sVal);
213 $a[
'bubble'] =
new xmlrpcval($sVal ? @eval($sVal) :
'');
217 if ($sVal && $aMarkersReplace)
218 $sVal = str_replace($aKeys, $aValues, $sVal);
236 return (
int)
db_value(
"SELECT `ID` FROM `Profiles` WHERE `NickName` = '$sUser' LIMIT 1");
245 $_COOKIE[
"memberID" ] =
$iId;
258 if (
'English' == $sLang || !preg_match(
'/^[a-zA-Z]+$/', $sLang))
260 $_GET[
'lang'] = $sLang;
263 require_once( CH_DIRECTORY_PATH_ROOT .
"langs/lang-{$sCurrentLanguage}.php" );
271 function service ($sModuleUri, $sMethod, $aParams = array(), $sClass =
'Module')
274 'facebook_connect|login' => 1,
275 'facebook_connect|supported' => 1,
277 if (!isset($a[$sModuleUri .
'|' . $sMethod]))
284 if (is_array($mixed)) {
285 foreach ($mixed
as $k => $v) {