Cheetah
ChBaseFunctions.php
Go to the documentation of this file.
1 <?php
2 
8 ch_import('ChWsbPermalinks');
9 ch_import('ChTemplFormView');
10 ch_import('ChWsbUserStatusView');
11 ch_import('ChWsbModule');
12 
14 {
16 
17  function __construct()
18  {
19  $this -> aSpecialKeys = array('rate' => '', 'rate_cnt' => '');
20  }
21 
23  {
24  $match_n = getProfilesMatch($memberID, $profileID); // impl
25  return DesignProgressPos ( _t("_XX match", $match_n), $GLOBALS['oTemplConfig']->iProfileViewProgressBar, 100, $match_n );
26  }
27 
28  function getProfileZodiac( $profileDate )
29  {
30  return ShowZodiacSign( $profileDate );
31  }
32 
33  function getProfileViewActions( $iProfileId, $bDynamic = false )
34  {
36 
37  $iProfileId = (int)$iProfileId;
38  if (!$iProfileId)
39  return '';
41  if (empty($aProfileInfo))
42  return '';
43 
44  $iViewerId = getLoggedId();
45 
46  // prepare all needed keys
47  $aConfig = array(
48  'url' => CH_WSB_URL_ROOT,
49  'anonym_mode' => '',
50  'member_id' => $iViewerId,
51  'member_pass' => getPassword($iViewerId),
52  );
53  $aMainKeys = array(
54  'cpt_edit', 'cpt_send_letter', 'cpt_fave', 'cpt_befriend', 'cpt_remove_friend', 'cpt_get_mail', 'cpt_share',
55  'cpt_report', 'cpt_block', 'cpt_unblock',
56  // moderation
57  'cpt_activate', 'cpt_ban', 'cpt_delete', 'cpt_delete_spam', 'cpt_feature', 'act_activate', 'act_ban', 'act_feature'
58  );
59 
60  $aMain = array_fill_keys($aMainKeys, '');
61 
62  if (isMember($iViewerId))
63  {
64  $aMain['cpt_edit'] = _t('_EditProfile');
65  $aMain['cpt_send_letter'] = _t('_SendLetter');
66  $aMain['cpt_fave'] = _t('_Fave');
67  $aMain['cpt_remove_fave'] = _t('_Remove Fave');
68  $aMain['cpt_befriend'] = _t('_Befriend');
69  $aMain['cpt_remove_friend'] = _t('_Remove friend');
70  $aMain['cpt_get_mail'] = _t('_Get E-mail');
71  $aMain['cpt_share'] = $this->isAllowedShare($this->_aProfile) ? _t('_Share') : '';
72  $aMain['cpt_report'] = _t('_Report Spam');
73  $aMain['cpt_block'] = _t('_Block');
74  $aMain['cpt_unblock'] = _t('_Unblock');
75  }
76 
77  if ((isAdmin($iViewerId) || isModerator($iViewerId)) AND $iViewerId != $iProfileId)
78  {
79  $sMsgKeyStart = '_adm_btn_mp_';
80 
81  // delete
82  $aMain['cpt_delete'] = _t($sMsgKeyStart . 'delete');
83 
84  // delete spam
85  $aMain['cpt_delete_spam'] = _t($sMsgKeyStart . 'delete_spammer');
86 
87  // activate / deactivate
88  $sTypeActiv = 'activate';
89  if ($aProfileInfo['Status'] == 'Active')
90  {
91  $sTypeActiv = 'de' . $sTypeActiv;
92  }
93  $aMain['cpt_activate'] = _t($sMsgKeyStart . $sTypeActiv);
94  $aMain['act_activate'] = $sTypeActiv;
95 
96  // ban / unban
97  $sTypeBan = 'ban';
98  if (isLoggedBanned($aProfileInfo['ID']))
99  {
100  $sTypeBan = 'un' . $sTypeBan;
101  }
102  $aMain['cpt_ban'] = _t($sMsgKeyStart . $sTypeBan);
103  $aMain['act_ban'] = $sTypeBan;
104 
105  // feature / unfeature
106  $sTypeFeat = 'featured';
107  $aMain['cpt_feature'] = _t('_Feature it');
108  if ((int)$aProfileInfo['Featured'])
109  {
110  $sTypeFeat = 'un' . $sTypeFeat;
111  $aMain['cpt_feature'] = _t('_De-Feature it');
112  }
113  $aMain['act_feature'] = $sTypeFeat;
114  }
115 
116  //--- Subscription integration ---//
118  $sAddon = $oSubscription->getData($bDynamic);
119 
120  $aButton = $oSubscription->getButton($iViewerId, 'profile', '', $iProfileId);
121  $aMain['sbs_profile_title'] = $aButton['title'];
122  $aMain['sbs_profile_script'] = $aButton['script'];
123  //--- Subscription integration ---//
124 
125  $aCheckGreet = checkAction(getLoggedId(), ACTION_ID_SEND_VKISS);
126  $aMain['cpt_greet'] = $aCheckGreet[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED ? _t('_Greet') : '';
127 
128  $aMain = array_merge($aProfileInfo, $aConfig, $aMain);
129 
130  return $sAddon . $this->genObjectsActions($aMain, 'Profile');
131  }
132 
133  function TemplPageAddComponent($sKey)
134  {
135  switch( $sKey ) {
136  case 'something':
137  return false; // return here additional components
138  default:
139  return false; // if you have not such component, return false!
140  }
141  }
142 
151  function genActionLink( &$aObjectParamaters, $aRow, $sCssClass = null, $sTemplateIndexActionLink = 'action')
152  {
153  // ** init some needed variables ;
154  $sOutputHtml = null;
155 
156  $aUsedTemplate = array (
157  'action' => 'action_link.html',
158  'action_symbol' => 'action_link_symbol.html',
159  'action_submenu' => 'action_link_submenu.html',
160  'action_submenu_symbol' => 'action_link_submenu_symbol.html',
161  );
162 
163  // find and replace all special markers ;
164  foreach( $aRow AS $sKeyName => $sKeyValue ) {
165  if ( $sKeyName == 'Caption' ) {
166  $aRow[$sKeyName] = $this -> markerReplace($aObjectParamaters, $sKeyValue, $aRow['Eval'], true);
167  } else {
168  $aRow[$sKeyName] = $this -> markerReplace($aObjectParamaters, $sKeyValue, $aRow['Eval']);
169  }
170  }
171 
172  $sKeyValue = trim($sKeyValue, '{}');
173 
174  if ( array_key_exists($sKeyValue, $this -> aSpecialKeys) ) {
175  return $aRow['Eval'];
176  } else {
177  $sSiteUrl = (preg_match("/^(http|https|ftp|mailto)/", $aRow['Url'])) ? '' : CH_WSB_URL_ROOT;
178  // build the link components ;
179  //$sLinkSrc = (!$aRow['Script']) ? $aRow['Url'] : 'javascript:void(0)';
180 
181  $sScriptAction = ( $aRow['Script'] ) ? ' onclick="' . $aRow['Script'] . '"' : '';
182  $sScriptAction = ($sScriptAction=='' && $aRow['Url']!='') ? " onclick=\"window.open ('{$sSiteUrl}{$aRow['Url']}','_self');\" " : $sScriptAction;
183 
184  if (false === strpos($aRow['Icon'], '.')) {
185  $sIcon = $aRow['Icon'];
186  $sTmpl = $sTemplateIndexActionLink . '_symbol';
187  } else {
188  $sIcon = getTemplateIcon($aRow['Icon']);
189  $sTmpl = $sTemplateIndexActionLink;
190  }
191 
192  if ( $aRow['Caption'] and ($aRow['Url'] or $aRow['Script'] ) ) {
193 
194  $sCssClass = ( $sCssClass ) ? 'class="' . $sCssClass . '"' : null;
195 
196  $aTemplateKeys = array (
197  'action_img_alt' => $aRow['Caption'],
198  'action_img_src' => $sIcon,
199  'action_caption' => $aRow['Caption'],
200  'action_caption_attr' => ch_html_attribute($aRow['Caption']),
201  'extended_css' => $sCssClass,
202  'extended_action' => $sScriptAction,
203  );
204 
205  $sOutputHtml .= $GLOBALS['oSysTemplate'] -> parseHtmlByName( $aUsedTemplate[$sTmpl], $aTemplateKeys );
206  }
207  }
208 
209  return $sOutputHtml;
210  }
211 
220  function markerReplace( &$aMemberSettings, $sTransformText, $sExecuteCode = null, $bTranslate = false )
221  {
222  $aMatches = array();
223  preg_match_all( "/([a-z0-9\-\_ ]{1,})|({([^\}]+)\})/i", $sTransformText, $aMatches );
224  if ( is_array($aMatches) and !empty($aMatches) ) {
225  // replace all founded markers ;
226  foreach( $aMatches[3] as $iMarker => $sMarkerValue ) {
227  if( is_array($aMemberSettings) and array_key_exists($sMarkerValue, $aMemberSettings) and !array_key_exists($sMarkerValue, $this -> aSpecialKeys) ){
228  $sTransformText = str_replace( '{' . $sMarkerValue . '}', $aMemberSettings[$sMarkerValue], $sTransformText);
229  }
230  else if(($sMarkerValue == 'evalResult' || substr($sMarkerValue, 0, 10) == 'evalResult')) {
231  $sExecuteResult = '';
232  if(!empty($sExecuteCode)) {
233  $sExecuteCode = $this -> markerReplace($aMemberSettings, $sExecuteCode);
234  $sExecuteResult = eval($sExecuteCode);
235 
236  /*
237  * Custom keys like 'evalResult...' must be taken from EvalResult array only.
238  * It's needed to correctly serve old EvalResult strings.
239  */
240  if(is_array($sExecuteResult))
241  $sExecuteResult = isset($sExecuteResult[$sMarkerValue]) ? $sExecuteResult[$sMarkerValue] : '';
242  else if($sMarkerValue != 'evalResult')
243  $sExecuteResult = '';
244  }
245 
246  $sTransformText = str_replace( '{' . $sMarkerValue . '}', $sExecuteResult, $sTransformText);
247  } else {
248  // if isset into special keys ;
249  if ( array_key_exists($sMarkerValue, $this -> aSpecialKeys) ) {
250  return $aMemberSettings[$sMarkerValue];
251  } else {
252  // undefined keys
253  switch ($sMarkerValue) {
254  }
255  }
256  }
257  }
258 
259  // try to translate item ;
260  if ( $bTranslate ) {
261  foreach( $aMatches[1] as $iMarker => $sMarkerValue )
262  if ( $sMarkerValue )
263  $sTransformText = str_replace( $sMarkerValue , _t( trim($sMarkerValue) ), $sTransformText);
264  }
265  }
266 
267  return $sTransformText;
268  }
269 
270  function msgBox($sText, $iTimer = 0, $sOnTimer = "")
271  {
272  $iId = time() . mt_rand(1, 1000);
273 
274  return $GLOBALS['oSysTemplate']->parseHtmlByName('messageBox.html', array(
275  'id' => $iId,
276  'msgText' => $sText,
277  'ch_if:timer' => array(
278  'condition' => $iTimer > 0,
279  'content' => array(
280  'id' => $iId,
281  'time' => 1000 * $iTimer,
282  'on_timer' => ch_js_string($sOnTimer, CH_ESCAPE_STR_QUOTE),
283  )
284  )
285  ));
286  }
287 
312  function advMsgBox($sText, $aOptions = array())
313  {
314  $iId = str_replace('.', '', 'AMB-' . microtime(true));
315 
316  $iTimer = (int)$aOptions['timer'];
317  $sOnTimer = $aOptions['onTimer'];
318  $bShowCloseBtn = ($aOptions['showclosebtn'] == '' ? false : $aOptions['showclosebtn']);
319  $bShowTitle = ($aOptions['showtitle'] == '' ? false : $aOptions['showtitle']);
320  $bShowTitleClose = ($aOptions['showtitleclose'] == '' ? false : $aOptions['showtitleclose']);
321  $bShowIcon = ($aOptions['showicon'] == '' ? false : $aOptions['showicon']);
322  $sIcon = ($aOptions['icon'] == '' ? 'info-circle' : $aOptions['icon']);
323  $sIconClass = ($aOptions['iconclass'] == '' ? 'sys-icon icon-large' : $aOptions['iconclass']);
324  $sTitleText = $aOptions['titletext'];
325  $sTitleClass = ($aOptions['titleclass'] == '' ? 'MsgBoxTitle' : $aOptions['titleclass']);
326  $bRemoveFog = ($aOptions['removefog'] == '' ? false : $aOptions['removefog']);
327  $sClass = ($aOptions['class'] == '' ? 'msgbox_content ch-def-font-large' : $aOptions['class']);
328  $sButtonClass = ($aOptions['buttonclass'] == '' ? 'ch-btn' : $aOptions['buttonclass']);
329 
330  $sRemoveFog = ($bRemoveFog ? "$('#ch-popup-fog').remove(); " : '');
331 
332  return $GLOBALS['oSysTemplate']->parseHtmlByName('advMessageBox.html', array(
333  'id' => $iId,
334  'msgText' => $sText,
335  'extracss' => $sExtraCss,
336  'class' => $sClass,
337 
338  'ch_if:timer' => array(
339  'condition' => $iTimer > 0,
340  'content' => array(
341  'id' => $iId,
342  'remove_fog' => $sRemoveFog,
343  'time' => 1000 * $iTimer,
344  'on_timer' => ch_js_string($sOnTimer, CH_ESCAPE_STR_QUOTE),
345  )
346  ),
347  'ch_if:closebtn' => array(
348  'condition' => $bShowCloseBtn,
349  'content' => array(
350  'id' => $iId,
351  'button_class' => $sButtonClass,
352  'btn_text' => _t('_Close'),
353  'remove_fog' => $sRemoveFog,
354  )
355  ),
356  'ch_if:showtitle' => array(
357  'condition' => $bShowTitle,
358  'content' => array(
359  'title' => $sTitleText,
360  'titleclass' => $sTitleClass,
361  )
362  ),
363  'ch_if:showtitleclose' => array(
364  'condition' => $bShowTitleClose,
365  'content' => array(
366  'id' => $iId,
367  'remove_fog' => $sRemoveFog,
368  )
369  ),
370  'ch_if:showicon' => array(
371  'condition' => $bShowIcon,
372  'content' => array(
373  'icon' => $sIcon,
374  'iconclass' => $sIconClass,
375  )
376  )
377  ));
378  }
379 
380  function isAllowedShare(&$aDataEntry)
381  {
382  if($aDataEntry['allow_view_to'] != CH_WSB_PG_ALL)
383  return false;
384  return true;
385  }
386 
387  function loadingBoxInline($sName = '')
388  {
389  return $this->loadingBox($sName, 'sys-loading-inline');
390  }
391 
392  function loadingBox($sName = '', $sClass = '')
393  {
394  return $GLOBALS['oSysTemplate']->parseHtmlByName('loading.html', array(
395  'class' => !empty($sClass) ? ' ' . $sClass : '',
396  'ch_if:show_name' => array(
397  'condition' => !empty($sName),
398  'content' => array(
399  'name' => $sName
400  )
401  ),
402 
403  ));
404  }
405 
420  function popupBox($sName, $sTitle, $sContent, $aActions = array())
421  {
422  $iId = !empty($sName) ? $sName : time();
423 
424  $aButtons = array();
425  foreach($aActions as $sId => $aAction)
426  $aButtons[] = array(
427  'id' => $sId,
428  'title' => htmlspecialchars_adv(_t($aAction['title'])),
429  'class' => isset($aAction['class']) ? ' class="' . $aAction['class'] . '"' : '',
430  'icon' => isset($aAction['icon']) ? '<img src="' . $aAction['icon'] . '" />' : '',
431  'href' => isset($aAction['href']) ? ' href="' . htmlspecialchars_adv($aAction['href']) . '"' : '',
432  'target' => isset($aAction['target']) ? ' target="' . $aAction['target'] . '"' : '',
433  'on_click' => isset($aAction['onclick']) ? ' onclick="' . $aAction['onclick'] . '"' : '',
434  'ch_if:hide_active' => array(
435  'condition' => !isset($aAction['active']) || $aAction['active'] != 1,
436  'content' => array()
437  ),
438  'ch_if:hide_inactive' => array(
439  'condition' => isset($aAction['active']) && $aAction['active'] == 1,
440  'content' => array()
441  )
442  );
443 
444  return $GLOBALS['oSysTemplate']->parseHtmlByName('popup_box.html', array(
445  'id' => $iId,
446  'title' => $sTitle,
447  'ch_repeat:actions' => $aButtons,
448  'content' => $sContent
449  ));
450  }
451 
452  function transBox($content, $isPlaceInCenter = false)
453  {
454  return
455  ($isPlaceInCenter ? '<div class="login_ajax_wrap">' : '') .
456  $GLOBALS['oSysTemplate']->parseHtmlByName('transBox.html', array('content' => $content)) .
457  ($isPlaceInCenter ? '</div>' : '');
458  }
459 
465  function genSexIcon($sSex)
466  {
467  switch( $sSex ) {
468  case 'male' :
469  return getTemplateIcon( 'male.png' );
470  case 'female' :
471  return getTemplateIcon( 'female.png' );
472  case 'men' :
473  return getTemplateIcon( 'male.png' );
474  default :
475  return getTemplateIcon( 'tux.png' );
476  }
477  }
478 
479  function getSexPic($sSex, $sType = 'medium')
480  {
481  $aGenders = array (
482  'female' => 'woman_',
483  'Female' => 'woman_',
484  'male' => 'man_',
485  'Male' => 'man_',
486  );
487  return getTemplateIcon(isset($aGenders[$sSex]) ? $aGenders[$sSex] . $sType . '.gif' : 'visitor_' . $sType . '.gif');
488  }
489 
490  function getMemberAvatar($iId, $sType = 'medium', $bRetina = false)
491  {
492  $sThumbSetting = getParam($sType == 'small' ? 'sys_member_info_thumb_icon' : 'sys_member_info_thumb');
493 
495 
496  ch_import('ChWsbMemberInfo');
497  $o = ChWsbMemberInfo::getObjectInstance($sThumbSetting . ($bRetina ? '_2x' : ''));
498  return $o ? $o->get($aProfile) : '';
499  }
500 
501  function getMemberThumbnail($iId, $sFloat = 'none', $bGenProfLink = false, $sForceSex = 'visitor', $isAutoCouple = true, $sType = 'medium', $aOnline = array(), $sTmplSfx = '')
502  {
503  $bForceSexSite = $bForceSexVacant = false;
504  if(!$bGenProfLink) {
505  if($sForceSex == 'site')
506  $bForceSexSite = true;
507  else if($sForceSex != 'visitor')
508  $bForceSexVacant = true;
509  }
510 
511  $bProfile = false;
512  $aProfile = array();
513  if(!$bForceSexSite) {
515  if(!$aProfile)
516  return '';
517 
518  $bProfile = true;
519  }
520 
521  $bCouple = $bThumb = $bThumbCouple = false;
522  $sThumbUrl = $sThumbUrlTwice = '';
523  $sThumbUrlCouple = $sThumbUrlCoupleTwice = '';
524  $sUserTitle = $sUserTitleCouple = $sUserLink = $sUserInfo = $sUserStatusIcon = $sUserStatusTitle = '';
525 
526  if($bProfile) {
527  $oUserStatusView = ch_instance('ChWsbUserStatusView');
528  $sUserStatusIcon = $oUserStatusView->getStatusIcon($iId, 'icon8');
529  $sUserStatusTitle = $oUserStatusView->getStatus($iId);
530 
531  $sUserLink = getProfileLink($iId);
532  $sUserTitle = $this->getUserTitle($iId);
533  $sUserInfo = $this->getUserInfo($iId);
534 
535  $sThumbSetting = getParam($sType == 'small' ? 'sys_member_info_thumb_icon' : 'sys_member_info_thumb');
536 
537  //--- get first person thumbs
538  ch_import('ChWsbMemberInfo');
539  $o = ChWsbMemberInfo::getObjectInstance($sThumbSetting);
540  $sThumbUrl = $o ? $o->get($aProfile) : '';
541 
542  if(!empty($sThumbUrl)) {
543  $o = ChWsbMemberInfo::getObjectInstance($sThumbSetting . '_2x');
544  $sThumbUrlTwice = $o ? $o->get($aProfile) : '';
545  if(!$sThumbUrlTwice)
546  $sThumbUrlTwice = $sThumbUrl;
547  }
548 
549  $bThumb = !empty($sThumbUrl) && !empty($sThumbUrlTwice);
550 
551  if((int)$aProfile['Couple'] > 0 && $isAutoCouple) {
552  $bCouple = true;
553  $aProfileCouple = getProfileInfo($aProfile['Couple']);
554 
555  $sUserTitleCouple = $this->getUserTitle($aProfile['Couple']);
556 
557  //--- get second person thumbs
558  $o = ChWsbMemberInfo::getObjectInstance($sThumbSetting);
559  $sThumbUrlCouple = $o ? $o->get($aProfileCouple) : '';
560 
561  if(!empty($sThumbUrlCouple)) {
562  $o = ChWsbMemberInfo::getObjectInstance($sThumbSetting . '_2x');
563  $sThumbUrlCoupleTwice = $o ? $o->get($aProfileCouple) : '';
564  if(!$sThumbUrlCoupleTwice)
565  $sThumbUrlCoupleTwice = $sThumbUrlCouple;
566  }
567 
568  $bThumbCouple = !empty($sThumbUrlCouple) && !empty($sThumbUrlCoupleTwice);
569  }
570  }
571 
572  if($bForceSexSite) {
573  $sUserTitle = getParam('site_title');
574  $sUserLink = CH_WSB_URL_ROOT;
575  }
576  else if($bForceSexVacant) {
577  $sUserTitle = _t('_Vacant');
578  $sUserLink = 'javascript:void(0)';
579  }
580 
581  return $GLOBALS['oSysTemplate']->parseHtmlByName($bCouple ? 'thumbnail_couple' . $sTmplSfx . '.html' : 'thumbnail_single' . $sTmplSfx . '.html', array(
582  'iProfId' => $bProfile ? $iId : 0,
583  'sys_thb_float' => 'tbf_' . $sFloat,
584  'classes_add' => ($bGenProfLink ? ' thumbnail_block_with_info' : '') . ($sType != 'medium' ? ' thumbnail_block_icon' : ''),
585  'sys_status_icon' => $sUserStatusIcon,
586  'sys_status_title' => $sUserStatusTitle,
587  'usr_profile_url' => $sUserLink,
588  'ch_if:show_thumbnail_image1' => array(
589  'condition' => $bThumb,
590  'content' => array(
591  'usr_thumb_url0' => $sThumbUrl,
592  'usr_thumb_url0_2x' => $sThumbUrlTwice,
593  'usr_thumb_alt0' => ch_html_attribute($sUserTitle),
594  )
595  ),
596  'ch_if:show_thumbnail_image2' => array(
597  'condition' => $bThumbCouple,
598  'content' => array(
599  'usr_thumb_url1' => $sThumbUrlCouple,
600  'usr_thumb_url1_2x' => $sThumbUrlCoupleTwice,
601  'usr_thumb_alt1' => ch_html_attribute($sUserTitleCouple),
602  )
603  ),
604  'ch_if:show_thumbnail_letter1' => array(
605  'condition' => !$bThumb,
606  'content' => array(
607  'letter' => mb_substr($sUserTitle, 0, 1)
608  )
609  ),
610  'ch_if:show_thumbnail_letter2' => array(
611  'condition' => !$bThumbCouple,
612  'content' => array(
613  'letter' => mb_substr($sUserTitleCouple, 0, 1)
614  )
615  ),
616  'usr_thumb_title0' => $sUserTitle,
617  'ch_if:profileLink' => array(
618  'condition' => $bGenProfLink,
619  'content' => array(
620  'user_title' => $sUserTitle,
621  'user_info' => $sUserInfo,
622  'usr_profile_url' => $sUserLink,
623  ),
624  ),
625  ));
626  }
627 
628  function getMemberIcon($iId, $sFloat = 'none', $bGenProfLink = false, $sTmplSfx = '')
629  {
630  return $this->getMemberThumbnail($iId, $sFloat, $bGenProfLink, 'visitor', false, 'small', array(), $sTmplSfx);
631  }
632 
639  function _getImageShared($aImageInfo, $sType = 'thumb')
640  {
641  return ChWsbService::call('photos', 'get_image', array($aImageInfo, $sType), 'Search');
642  }
643 
645  {
646  $sUrl = $GLOBALS['oSysTemplate']->getIconUrl($sName);
647  return !empty($sUrl) ? $sUrl : $GLOBALS['oSysTemplate']->getIconUrl('spacer.gif');
648  }
649 
651  {
652  $sUrl = $GLOBALS['oSysTemplate']->getImageUrl($sName);
653  return !empty($sUrl) ? $sUrl : $GLOBALS['oSysTemplate']->getImageUrl('spacer.gif');
654  }
655 
663  function genObjectsActions( &$aKeys, $sActionsType, $bSubMenuMode = false, $sTemplateIndex = 'actions', $sTemplateIndexActionLink = 'action' )
664  {
665  // ** init some needed variables ;
666  $sActionsList = null;
667  $sResponceBlock = null;
668 
669  $aUsedTemplate = array (
670  'actions_submenu' => 'member_actions_list_submenu.html',
671  'actions' => 'member_actions_list.html',
672  'ajaxy_popup' => 'ajaxy_popup_result.html',
673  );
674 
675  // read data from cache file ;
676  $oCache = $GLOBALS['MySQL']->getDbCacheObject();
677  $aActions = $oCache->getData($GLOBALS['MySQL']->genDbCacheKey('sys_objects_actions'));
678 
679  // if cache file empty - will read from db ;
680  if (null === $aActions || empty($aActions[$sActionsType]) ) {
681 
682  $sQuery = "
683  SELECT
684  `Caption`, `Icon`, `Url`, `Script`, `Eval`, `bDisplayInSubMenuHeader`
685  FROM
686  `sys_objects_actions`
687  WHERE
688  `Type` = '{$sActionsType}'
689  ORDER BY
690  `Order`
691  ";
692 
693  $rResult = db_res($sQuery);
694  while ( $aRow = $rResult->fetch() ) {
695  $aActions[$sActionsType][] = $aRow;
696  }
697 
698  // write data into cache file ;
699  if ( is_array($aActions[$sActionsType]) and !empty($aActions[$sActionsType]) ) {
700  $oCache->setData ($GLOBALS['MySQL']->genDbCacheKey('sys_objects_actions'), $aActions);
701  }
702  }
703  // ** generate actions block ;
704 
705  // contain all systems actions that will procces by self function ;
706  $aCustomActions = array();
707  if ( is_array($aActions[$sActionsType]) and !empty($aActions[$sActionsType]) ) {
708 
709  // need for table's divider ;
710  $iIndex = 0;
711  foreach( $aActions[$sActionsType] as $aRow ) {
712  if ($bSubMenuMode && $aRow['bDisplayInSubMenuHeader']==0)
713  continue;
714 
715  // generate action's link ;
716  $sActionLink = $this -> genActionLink( $aKeys, $aRow, 'menuLink', $sTemplateIndexActionLink );
717 
718  if ( $sActionLink ) {
719  $sActionLinkClass = 'actionItem' . ($iIndex % 2 == 0 ? 'Even' : 'Odd') . ' {evalResultCssClassWrapper}';
720  $sActionLinkClass = $this -> markerReplace($aKeys, $sActionLinkClass, $aRow['Eval']);
721 
722  $aActionsItem[] = array (
723  'action_link_class' => $sActionLinkClass,
724  'action_link' => $sActionLink,
725  );
726 
727  $iIndex++;
728  }
729 
730  // it's system action ;
731  if ( !$aRow['Url'] && !$aRow['Script'] ) {
732  $aCustomActions[] = array (
733  'caption' => $aRow['Caption'],
734  'code' => $aRow['Eval'],
735  );
736  }
737  }
738  }
739 
740  if ( !empty($aActionsItem) ) {
741 
742  // check what response window use ;
743  // is there any value to having this template even if the ID is empty?
744  if (!empty($aKeys['ID'])) {
745  $sResponceBlock = $GLOBALS['oSysTemplate'] -> parseHtmlByName( $aUsedTemplate['ajaxy_popup'], array('object_id' => $aKeys['ID']) );
746  }
747 
748  $aTemplateKeys = array (
749  'ch_repeat:actions' => $aActionsItem,
750  'responce_block' => $sResponceBlock,
751  );
752 
753  $sActionsList = $GLOBALS['oSysTemplate'] -> parseHtmlByName( $aUsedTemplate[$sTemplateIndex], $aTemplateKeys );
754  }
755 
756  //procces all the custom actions ;
757  if ($aCustomActions) {
758  foreach($aCustomActions as $iIndex => $sValue ) {
759  $sActionsList .= eval( $this -> markerReplace($aKeys, $aCustomActions[$iIndex]['code']) );
760  }
761  }
762 
763  return $sActionsList;
764  }
765 
774  function centerContent ($s, $sBlockStyle, $isClearBoth = true)
775  {
776  $sId = 'id' . time() . rand();
777  return '<div id="'.$sId.'">' . $s . ($isClearBoth ? '<div class="clear_both"></div>' : '') . '</div><script>
778  function center_' . $sId . '(sParent) {
779  var oParent = $(sParent);
780  var iAll = $(sParent + " ' . $sBlockStyle . '").size();
781  var iWidthUnit = $(sParent + " ' . $sBlockStyle . ':first").outerWidth(true);
782  var iWidthContainer = oParent.width();
783  var iPerRow = parseInt(iWidthContainer/iWidthUnit);
784  var iLeft = (iWidthContainer - (iAll > iPerRow ? iPerRow * iWidthUnit : iAll * iWidthUnit)) / 2;
785  oParent.css("padding-left", iLeft);
786  }
787 
788  $(document).ready(function() {
789  var sParent = "#' . $sId . '";
790  var oParent = $(sParent);
791  var eImgFirst = oParent.find("img").filter(":not([src*=spacer])").first();
792  if(eImgFirst.length > 0 && !eImgFirst.prop("complete"))
793  eImgFirst.load(function() {
794  center_' . $sId . '(sParent);
795  });
796  else
797  center_' . $sId . '(sParent);
798  });
799  </script>';
800  }
801 
807  function genSiteLogo()
808  {
809  $sLogoUrl = $this->getLogoUrl();
810 
811  if (!$sLogoUrl)
812  return '<a class="mainLogoText" href="' . CH_WSB_URL_ROOT . 'index.php' . '">' . getParam('site_title') . '</a>';
813 
814  $sLogoUrl2x = $this->getLogoUrl(true);
815  $sLogoW = getParam('sys_main_logo_w');
816  $sLogoH = getParam('sys_main_logo_h');
817 
818  $sStyle = $sLogoW ? " style=\"width:{$sLogoW}px; height:auto;\" " : '';
819  $sLogoAttr2x = $sLogoUrl2x ? " src-2x=\"$sLogoUrl2x\" " : '';
820  $sClass = 'mainLogo' . ($sLogoAttr2x ? ' ch-img-retina' : '');
821 
822  return '<a href="' . CH_WSB_URL_ROOT . '"><img ' . $sStyle . ' src="' . $sLogoUrl . '" ' . $sLogoAttr2x . ' class="' . $sClass . '" alt="' . ch_html_attribute(getParam('site_title')) . '" /></a>';
823  }
824 
825  function getLogoUrl($bRetina = false)
826  {
827  global $dir, $site;
828 
829  $sFileName = ($bRetina ? 'retina_' : '') . getParam('sys_main_logo');
830  if (!$sFileName || !file_exists($dir['mediaImages'] . $sFileName))
831  return '';
832 
833  return $site['mediaImages'] . $sFileName;
834  }
835 
841  function genSiteSplash()
842  {
843  $sVisibility = getParam('splash_visibility');
844  $bLogged = getParam('splash_logged') == 'on';
845 
846  if($sVisibility == CH_WSB_SPLASH_VIS_DISABLE || ($sVisibility == CH_WSB_SPLASH_VIS_INDEX && !defined('CH_INDEX_PAGE')) || ($bLogged && isLogged()))
847  return '';
848 
849  $sContent = $GLOBALS['oSysTemplate']->parseHtmlByContent(getParam('splash_code'), array());
850  $sContent = $GLOBALS['oSysTemplate']->parseHtmlByName('splash.html', array(
851  'content' => $sContent
852  ));
853 
854  $GLOBALS['oSysTemplate']->addJs(array('splash.js'));
855  $GLOBALS['oSysTemplate']->addCss(array('splash.css'));
856  return DesignBoxContent('', $sContent, 3);
857  }
858 
864  function genSiteSearch($sText = '')
865  {
866  if(empty($sText))
867  $sText = process_line_output(_t('_Search...'));
868 
869  return $GLOBALS['oSysTemplate']->parseHtmlByName('search_header.html', array(
870  'text' => $sText
871  ));
872  }
873 
880  {
881  ch_import('ChTemplMenuService');
882  $oMenu = new ChTemplMenuService();
883  return '<div class="sys-service-menu-wrp ch-def-margin-sec-right ch-def-padding-right">' . $oMenu->getCode() . '</div>';
884  }
885 
891  function genSiteBottomMenu()
892  {
893  ch_import('ChTemplMenuBottom');
894  $oMenu = new ChTemplMenuBottom();
895  return $oMenu->getCode();
896  }
897 
898  function genNotifyMessage($sMessage, $sDirection = 'left', $isButton = false, $sScript = '')
899  {
900  $sDirStyle = ($sDirection == 'left') ? '' : 'notify_message_none';
901  switch ($sDirection) {
902  case 'none': break;
903  case 'left': break;
904  }
905 
906  $sPossibleID = ($isButton) ? ' id="isButton" ' : '';
907  $sOnClick = $sScript ? ' onclick="' . $sScript . '"' : '';
908 
909  return <<<EOF
910 <div class="notify_message {$sDirStyle}" {$sPossibleID} {$sOnClick}>
911  <table class="notify" cellpadding=0 cellspacing=0><tr><td>{$sMessage}</td></tr></table>
912  <div class="notify_wrapper_close"> </div>
913 </div>
914 EOF;
915  }
916 
917  function getSiteStatBody($aVal, $sMode = '')
918  {
919  $sLink = strlen($aVal['link']) > 0 ? '<a href="'.CH_WSB_URL_ROOT.$aVal['link'].'">{iNum} '._t('_'.$aVal['capt']).'</a>' : '{iNum} '._t('_'.$aVal['capt']) ;
920  if ( $sMode != 'admin' ) {
921  $sBlockId = '';
922  $iNum = strlen($aVal['query']) > 0 ? db_value($aVal['query']) : 0;
923  } else {
924  $sBlockId = "id='{$aVal['name']}'";
925  $iNum = strlen($aVal['adm_query']) > 0 ? db_value($aVal['adm_query']) : 0;
926  if ( strlen($aVal['adm_link']) > 0 ) {
927  if( substr( $aVal['adm_link'], 0, strlen( 'javascript:' ) ) == 'javascript:' ) {
928  $sHref = 'javascript:void(0);';
929  $sOnclick = 'onclick="' . $aVal['adm_link'] . '"';
930  } else {
931  $sHref = $aVal['adm_link'];
932  $sOnclick = '';
933  }
934  $sLink = '<a href="'.$sHref.'" '.$sOnclick.'>{iNum} '._t('_'.$aVal['capt']).'</a>';
935  } else {
936  $sLink = '{iNum} '._t('_'.$aVal['capt']);
937  }
938  }
939 
940  $sLink = str_replace('{iNum}', $iNum, $sLink);
941  $sImg = (false === strpos($aVal['icon'], '.') ? '<i class="sys-icon ' . $aVal['icon'] . '"></i>' : '<img src="' . getTemplateIcon($aVal['icon']) . '" alt="" />');
942  $sCode =
943  '
944  <div class="siteStatUnit" '. $sBlockId .'>
945  ' . $sImg . $sLink . '
946  </div>
947  ';
948 
949  return $sCode;
950  }
951 
952  function genGalleryImages($aImages, $oTemplate = false)
953  {
954  if (!$aImages)
955  return '';
956 
957  $aVars = array (
958  'prefix' => $sPrefix ? $sPrefix : 'id'.time().'_'.rand(1, 999999),
959  'ch_repeat:images_icons' => array (),
960  'ch_repeat:icons' => array (),
961  );
962 
963  $iId = 0;
964  foreach ($aImages as $aImage) {
965  $a = array (
966  'id' => ++$iId,
967  'icon_url' => $aImage['icon_url'],
968  'image_url' => $aImage['image_url'],
969  'title' => $aImage['title'],
970  );
971  $aVars['ch_repeat:images'][] = $a;
972  $aVars['ch_repeat:icons'][] = $a;
973  }
974 
975  if (!$oTemplate)
976  $oTemplate = $GLOBALS['oSysTemplate'];
977 
978  $oTemplate->addJs('jquery.dolGalleryImages.js');
979  $oTemplate->addCss('gallery_images.css');
980  return $oTemplate->parseHtmlByName('gallery_images.html', $aVars);
981  }
982 
995  function sysImage($sImg, $sClassAdd = '', $sAlt = '', $sAttr = '', $sImageType = false, $iSize = 16)
996  {
997  if (!$sImg)
998  return '';
999  if ($sClassAdd)
1000  $sClassAdd = ' ' . $sClassAdd;
1001 
1002  if (false === strpos($sImg, '.')) // return vector icon
1003  return '<i class="sys-icon ' . $sImg . $sClassAdd . '" alt="' . ch_html_attribute($sAlt) . '" ' . $sAttr . '></i>';
1004 
1005  // return pixel icon
1006  switch ($sImageType) {
1007  case 'icon':
1008  $sImg = $this->getTemplateIcon($sImg);
1009  break;
1010  case 'image':
1011  $sImg = $this->getTemplateImage($sImg);
1012  break;
1013  }
1014 
1015  return '<img src="' . $sImg . '" class="' . $sClassAdd . '" alt="' . ch_html_attribute($sAlt) . '" ' . $sAttr . ' border="0" width="' . $iSize . '" height="' . $iSize . '" />';
1016  }
1017 
1018 
1019 
1020  function getUserTitle ($iId)
1021  {
1023  if (!$aProfile)
1024  return false;
1025 
1026  ch_import('ChWsbMemberInfo');
1027  $o = ChWsbMemberInfo::getObjectInstance(getParam('sys_member_info_name'));
1028  return $o ? $o->get($aProfile) : $aProfile['NickName'];
1029  }
1030 
1031  function getUserInfo ($iId)
1032  {
1034  if (!$aProfile)
1035  return false;
1036 
1037  ch_import('ChWsbMemberInfo');
1038  $o = ChWsbMemberInfo::getObjectInstance(getParam('sys_member_info_info'));
1039  return $o ? $o->get($aProfile) : '';
1040  }
1041 
1042  function getLanguageSwitcher($sCurrent)
1043  {
1044  $sOutputCode = '';
1045 
1046  $aLangs = getLangsArrFull();
1047  if(count( $aLangs ) < 2)
1048  return $sOutputCode;
1049 
1050  $sGetTransfer = ch_encode_url_params($_GET, array('lang'));
1051 
1052  $aTmplVars = array();
1053  foreach( $aLangs as $sName => $aLang ) {
1054  $sFlag = $GLOBALS['site']['flags'] . $aLang['Flag'] . '.gif';
1055  $aTmplVars[] = array (
1056  'ch_if:show_icon' => array (
1057  'condition' => $sFlag,
1058  'content' => array (
1059  'icon_src' => $sFlag,
1060  'icon_alt' => $sName,
1061  'icon_width' => 18,
1062  'icon_height' => 12,
1063  ),
1064  ),
1065  'class' => $sName == $sCurrent ? 'sys-bm-sub-item-selected' : '',
1066  'link' => ch_html_attribute($_SERVER['PHP_SELF']) . '?' . $sGetTransfer . 'lang=' . $sName,
1067  'onclick' => '',
1068  'title' => $aLang['Title'],
1069  );
1070  }
1071 
1072  $sOutputCode .= $GLOBALS['oSysTemplate']->parseHtmlByName('popup_switcher.html', array(
1073  'name_method' => 'Language',
1074  'name_block' => 'language',
1075  'ch_repeat:items' => $aTmplVars
1076  ));
1077 
1078  return PopupBox('sys-bm-switcher-language', _t('_sys_bm_popup_cpt_language'), $sOutputCode);
1079  }
1080 
1081  function getTemplateSwitcher($sCurrent)
1082  {
1083  $sOutputCode = "";
1084 
1085  $aTemplates = get_templates_array();
1086  if(count($aTemplates) < 2)
1087  return $sOutputCode;
1088 
1089  $sGetTransfer = ch_encode_url_params($_GET, array('skin'));
1090 
1091  $aTmplVars = array();
1092  foreach($aTemplates as $sName => $sTitle)
1093  $aTmplVars[] = array (
1094  'ch_if:show_icon' => array (
1095  'condition' => false,
1096  'content' => array(),
1097  ),
1098  'class' => $sName == $sCurrent ? 'sys-bm-sub-item-selected' : '',
1099  'link' => ch_html_attribute($_SERVER['PHP_SELF']) . '?' . $sGetTransfer . 'skin=' . $sName,
1100  'onclick' => '',
1101  'title' => $sTitle
1102  );
1103 
1104  $sOutputCode .= $GLOBALS['oSysTemplate']->parseHtmlByName('popup_switcher.html', array(
1105  'name_method' => 'Template',
1106  'name_block' => 'template',
1107  'ch_repeat:items' => $aTmplVars
1108  ));
1109 
1110  return PopupBox('sys-bm-switcher-template', _t('_sys_bm_popup_cpt_design'), $sOutputCode);
1111  }
1112 }
ChTemplMenuService
Definition: ChTemplMenuService.php:14
$sSex
$sSex
Definition: browse.php:24
ChBaseFunctions\loadingBox
loadingBox($sName='', $sClass='')
Definition: ChBaseFunctions.php:392
ChBaseFunctions\genSiteBottomMenu
genSiteBottomMenu()
Definition: ChBaseFunctions.php:891
$sMessage
$sMessage
Definition: actions.inc.php:17
ShowZodiacSign
ShowZodiacSign( $date)
Definition: profiles.inc.php:76
ChBaseFunctions\isAllowedShare
isAllowedShare(&$aDataEntry)
Definition: ChBaseFunctions.php:380
ChWsbMemberInfo\getObjectInstance
static getObjectInstance($sObject)
Definition: ChWsbMemberInfo.php:39
$sOutputHtml
$sOutputHtml
Definition: browse.php:86
ChBaseFunctions\getProfileZodiac
getProfileZodiac( $profileDate)
Definition: ChBaseFunctions.php:28
ACTION_ID_SEND_VKISS
const ACTION_ID_SEND_VKISS
Definition: membership_levels.inc.php:35
$sMode
else $sMode
Definition: antispam.php:362
DesignProgressPos
DesignProgressPos($text, $width, $max_pos, $curr_pos, $progress_num='1')
Definition: design.inc.php:44
ChBaseFunctions\genSiteSplash
genSiteSplash()
Definition: ChBaseFunctions.php:841
ChBaseFunctions\msgBox
msgBox($sText, $iTimer=0, $sOnTimer="")
Definition: ChBaseFunctions.php:270
ChBaseFunctions\$aSpecialKeys
$aSpecialKeys
Definition: ChBaseFunctions.php:15
$oMenu
$oMenu
Definition: bottom_menu_compose.php:29
ChBaseFunctions\getTemplateIcon
getTemplateIcon($sName)
Definition: ChBaseFunctions.php:644
ChBaseFunctions\genObjectsActions
genObjectsActions(&$aKeys, $sActionsType, $bSubMenuMode=false, $sTemplateIndex='actions', $sTemplateIndexActionLink='action')
Definition: ChBaseFunctions.php:663
ch_js_string
ch_js_string($mixedInput, $iQuoteType=CH_ESCAPE_STR_AUTO)
Definition: utils.inc.php:1294
ChBaseFunctions\getUserTitle
getUserTitle($iId)
Definition: ChBaseFunctions.php:1020
$sCode
$sCode
Definition: explanation.php:19
CHECK_ACTION_RESULT_ALLOWED
const CHECK_ACTION_RESULT_ALLOWED
Definition: membership_levels.inc.php:60
ChBaseFunctions\loadingBoxInline
loadingBoxInline($sName='')
Definition: ChBaseFunctions.php:387
getLangsArrFull
getLangsArrFull($bRetIDs=false)
Definition: languages.inc.php:168
ChTemplMenuBottom
Definition: ChTemplMenuBottom.php:14
ch_import
ch_import($sClassName, $aModule=array())
Definition: utils.inc.php:1218
CHECK_ACTION_RESULT
const CHECK_ACTION_RESULT
Definition: membership_levels.inc.php:54
ChBaseFunctions\getMemberIcon
getMemberIcon($iId, $sFloat='none', $bGenProfLink=false, $sTmplSfx='')
Definition: ChBaseFunctions.php:628
$sUrl
$sUrl
Definition: cart.php:15
getPassword
getPassword( $ID='')
Definition: profiles.inc.php:475
getProfilesMatch
getProfilesMatch($iPID1=0, $iPID2=0)
Definition: match.inc.php:122
php
ChBaseFunctions\getMemberAvatar
getMemberAvatar($iId, $sType='medium', $bRetina=false)
Definition: ChBaseFunctions.php:490
$iId
$iId
Definition: license.php:15
isLogged
isLogged()
Definition: profiles.inc.php:24
ChWsbSubscription\getInstance
static getInstance()
Definition: ChWsbSubscription.php:67
ChBaseFunctions\getUserInfo
getUserInfo($iId)
Definition: ChBaseFunctions.php:1031
isLoggedBanned
isLoggedBanned($iCurUserID=0)
Definition: profiles.inc.php:498
isAdmin
isAdmin()
Definition: index.php:649
$oCache
$oCache
Definition: prof.inc.php:10
ChBaseFunctions\centerContent
centerContent($s, $sBlockStyle, $isClearBoth=true)
Definition: ChBaseFunctions.php:774
isModerator
isModerator($iId=0)
Definition: profiles.inc.php:58
$memberID
$memberID
Definition: profile.php:20
get_templates_array
get_templates_array($isAllParams=false)
Definition: utils.inc.php:573
ch_html_attribute
ch_html_attribute($mixedInput)
Definition: utils.inc.php:1324
ChBaseFunctions\getMemberThumbnail
getMemberThumbnail($iId, $sFloat='none', $bGenProfLink=false, $sForceSex='visitor', $isAutoCouple=true, $sType='medium', $aOnline=array(), $sTmplSfx='')
Definition: ChBaseFunctions.php:501
ChBaseFunctions\getTemplateImage
getTemplateImage($sName)
Definition: ChBaseFunctions.php:650
$sType
$sType
Definition: actions.inc.php:11
$_GET
$_GET['debug']
Definition: index.php:67
$iIndex
$iIndex
Definition: bottom_menu_compose.php:142
and
and
Definition: license.txt:18
ChBaseFunctions\genGalleryImages
genGalleryImages($aImages, $oTemplate=false)
Definition: ChBaseFunctions.php:952
ChBaseFunctions\markerReplace
markerReplace(&$aMemberSettings, $sTransformText, $sExecuteCode=null, $bTranslate=false)
Definition: ChBaseFunctions.php:220
getParam
getParam($sParamName, $bUseCache=true)
Definition: db.inc.php:130
ChBaseFunctions\genSexIcon
genSexIcon($sSex)
Definition: ChBaseFunctions.php:465
getLoggedId
getLoggedId()
Definition: profiles.inc.php:32
$sTitle
$sTitle
Definition: actions.inc.php:13
table
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
Definition: license.txt:180
ChBaseFunctions\genSiteServiceMenu
genSiteServiceMenu()
Definition: ChBaseFunctions.php:879
$aProfile
$aProfile
Definition: flash.php:14
ChBaseFunctions\sysImage
sysImage($sImg, $sClassAdd='', $sAlt='', $sAttr='', $sImageType=false, $iSize=16)
Definition: ChBaseFunctions.php:995
ChBaseFunctions\TemplPageAddComponent
TemplPageAddComponent($sKey)
Definition: ChBaseFunctions.php:133
htmlspecialchars_adv
htmlspecialchars_adv($string)
Definition: utils.inc.php:302
$site
$site['ver']
Definition: version.inc.php:8
ChBaseFunctions\getLanguageSwitcher
getLanguageSwitcher($sCurrent)
Definition: ChBaseFunctions.php:1042
ChBaseFunctions\transBox
transBox($content, $isPlaceInCenter=false)
Definition: ChBaseFunctions.php:452
CH_ESCAPE_STR_QUOTE
const CH_ESCAPE_STR_QUOTE
escape quotes only, for js strings enclosed in quotes, for use in
Definition: utils.inc.php:34
ch_instance
ch_instance($sClassName, $aParams=array(), $aModule=array())
Definition: utils.inc.php:1264
ChBaseFunctions\genSiteLogo
genSiteLogo()
Definition: ChBaseFunctions.php:807
global
if(!defined("GLOBAL_MODULE")) define("GLOBAL_MODULE" global
Definition: header.inc.php:25
ChBaseFunctions\popupBox
popupBox($sName, $sTitle, $sContent, $aActions=array())
Definition: ChBaseFunctions.php:420
ChBaseFunctions\advMsgBox
advMsgBox($sText, $aOptions=array())
Definition: ChBaseFunctions.php:312
$sContent
$sContent
Definition: bottom_menu_compose.php:169
_t
_t($key, $arg0="", $arg1="", $arg2="")
Definition: languages.inc.php:509
$sUserInfo
$sUserInfo
Definition: profile.php:70
time
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
Definition: license.txt:56
CH_WSB_PG_ALL
const CH_WSB_PG_ALL
Definition: ChWsbPrivacy.php:12
getProfileLink
getProfileLink( $iID, $sLinkAdd='')
Definition: profiles.inc.php:484
$aConfig
$aConfig
Definition: config.php:8
checkAction
checkAction($iMemberId, $actionID, $performAction=false, $iForcedProfID=0, $isCheckMemberStatus=true)
Definition: membership_levels.inc.php:313
ChBaseFunctions\_getImageShared
_getImageShared($aImageInfo, $sType='thumb')
Definition: ChBaseFunctions.php:639
process_line_output
process_line_output($text, $maxwordlen=100)
Definition: utils.inc.php:328
$aVars
$aVars
Definition: license.php:101
ChBaseFunctions\getSiteStatBody
getSiteStatBody($aVal, $sMode='')
Definition: ChBaseFunctions.php:917
ChBaseFunctions\getTemplateSwitcher
getTemplateSwitcher($sCurrent)
Definition: ChBaseFunctions.php:1081
ChBaseFunctions\getProfileViewActions
getProfileViewActions( $iProfileId, $bDynamic=false)
Definition: ChBaseFunctions.php:33
$s
$s
Definition: embed.php:13
$aProfileInfo
$aProfileInfo
Definition: short_profile_info.php:23
db_res
db_res($query, $bindings=[])
Definition: db.inc.php:39
PopupBox
PopupBox($sName, $sTitle, $sContent, $aActions=array())
Definition: design.inc.php:189
default
Attr AllowedFrameTargets _parent and _top Values should be as validation will be done in a case sensitive manner despite W3C s recommendation XHTML Strict does not permit the target attribute so this directive will have no effect in that doctype XHTML does not enable the Target module by default
Definition: Attr.AllowedFrameTargets.txt:10
$sId
$sId
Definition: actions.inc.php:8
db_value
db_value($query, $bindings=[], $error_checking=true, $index=0)
Definition: db.inc.php:98
getProfileInfo
getProfileInfo($iProfileID=0, $checkActiveStatus=false, $forceCache=false)
Definition: profiles.inc.php:249
ChBaseFunctions\getLogoUrl
getLogoUrl($bRetina=false)
Definition: ChBaseFunctions.php:825
ChBaseFunctions\__construct
__construct()
Definition: ChBaseFunctions.php:17
ChBaseFunctions\getSexPic
getSexPic($sSex, $sType='medium')
Definition: ChBaseFunctions.php:479
$bLogged
$bLogged
Definition: index.php:18
ChBaseFunctions\genActionLink
genActionLink(&$aObjectParamaters, $aRow, $sCssClass=null, $sTemplateIndexActionLink='action')
Definition: ChBaseFunctions.php:151
DesignBoxContent
DesignBoxContent($title, $content, $db_num=0, $caption_item='', $bottom_item='')
Definition: design.inc.php:78
empty
Attr AllowedRel this is empty
Definition: Attr.AllowedRel.txt:7
$o
$o
Definition: cmd.php:193
$oTemplConfig
$oTemplConfig
Definition: params.inc.php:90
ChWsbService\call
static call($mixed, $sMethod, $aParams=array(), $sClass='Module')
Definition: ChWsbService.php:32
$profileID
$profileID
Definition: profile.php:19
ChBaseFunctions\getProfileMatch
getProfileMatch( $memberID, $profileID)
Definition: ChBaseFunctions.php:22
as
as
Definition: Filter.ExtractStyleBlocks.Escaping.txt:10
ChBaseFunctions\genNotifyMessage
genNotifyMessage($sMessage, $sDirection='left', $isButton=false, $sScript='')
Definition: ChBaseFunctions.php:898
$sName
$sName
Definition: ChWsbAdminTools.php:853
false
if(!defined("FALSE_VAL")) define("FALSE_VAL" false
Definition: constants.inc.php:9
ChBaseFunctions\genSiteSearch
genSiteSearch($sText='')
Definition: ChBaseFunctions.php:864
$iProfileId
if( $sMembersList) $iProfileId
Definition: communicator.php:29
$GLOBALS
$GLOBALS['iAdminPage']
Definition: advanced_settings.php:10
or
Voluntary License Schemes The Licensor waives the right to collect whether individually or
Definition: license.txt:37
isMember
isMember($iId=0)
Definition: profiles.inc.php:44
$dir
$dir
Definition: config.php:10
ChBaseFunctions
Definition: ChBaseFunctions.php:14
ch_encode_url_params
ch_encode_url_params($a, $aExcludeKeys=array(), $aOnlyKeys=false)
Definition: utils.inc.php:1675
$oSubscription
$oSubscription
Definition: notifies.php:28