Cheetah
ChEventsModule.php
Go to the documentation of this file.
1 <?php
2 
8 function ch_events_import($sClassPostfix, $aModuleOverwright = array())
9 {
11  $a = $aModuleOverwright ? $aModuleOverwright : $aModule;
12  if (!$a || $a['uri'] != 'events') {
13  $oMain = ChWsbModule::getInstance('ChEventsModule');
14  $a = $oMain->_aModule;
15  }
16  ch_import($sClassPostfix, $a);
17 }
18 
19 ch_import('ChWsbTwigModule');
20 ch_import('ChWsbPaginate');
21 ch_import('ChWsbAlerts');
22 
23 define('CH_EVENTS_PHOTOS_CAT', 'Events');
24 define('CH_EVENTS_PHOTOS_TAG', 'events');
25 
26 define('CH_EVENTS_VIDEOS_CAT', 'Events');
27 define('CH_EVENTS_VIDEOS_TAG', 'events');
28 
29 define('CH_EVENTS_SOUNDS_CAT', 'Events');
30 define('CH_EVENTS_SOUNDS_TAG', 'events');
31 
32 define('CH_EVENTS_FILES_CAT', 'Events');
33 define('CH_EVENTS_FILES_TAG', 'events');
34 
35 define('CH_EVENTS_MAX_FANS', 1000);
36 
128 {
131 
133  {
134  parent::__construct($aModule);
135  $this->_sFilterName = 'ch_events_filter';
136  $this->_sPrefix = 'ch_events';
137 
138  $GLOBALS['oChEventsModule'] = &$this;
139  ch_import('Privacy', $aModule);
140  $this->_oPrivacy = new ChEventsPrivacy($this);
141  }
142 
143  function actionHome()
144  {
145  parent::_actionHome(_t('_ch_events_main'));
146  }
147 
148  function actionVideos($sUri)
149  {
150  parent::_actionVideos($sUri, _t('_ch_events_caption_videos'));
151  }
152 
153  function actionPhotos($sUri)
154  {
155  parent::_actionPhotos($sUri, _t('_ch_events_caption_photos'));
156  }
157 
158  function actionSounds($sUri)
159  {
160  parent::_actionSounds($sUri, _t('_ch_events_caption_sounds'));
161  }
162 
163  function actionFiles($sUri)
164  {
165  parent::_actionFiles($sUri, _t('_ch_events_caption_files'));
166  }
167 
168  function actionComments($sUri)
169  {
170  parent::_actionComments($sUri, _t('_ch_events_caption_comments'));
171  }
172 
173  function actionBrowseParticipants($sUri)
174  {
175  parent::_actionBrowseFans($sUri, 'isAllowedViewParticipants', 'getFansBrowse',
176  $this->_oDb->getParam('ch_events_perpage_browse_participants'), 'browse_participants/',
177  _t('_ch_events_caption_participants'));
178  }
179 
180  function actionView($sUri)
181  {
182  parent::_actionView($sUri, _t('_ch_events_msg_pending_approval'));
183  }
184 
185  function actionUploadPhotos($sUri)
186  {
187  parent::_actionUploadMedia($sUri, 'isAllowedUploadPhotos', 'images', array('images_choice', 'images_upload'),
188  _t('_ch_events_caption_upload_photos'));
189  }
190 
191  function actionUploadVideos($sUri)
192  {
193  parent::_actionUploadMedia($sUri, 'isAllowedUploadVideos', 'videos', array('videos_choice', 'videos_upload'),
194  _t('_ch_events_caption_upload_videos'));
195  }
196 
197  function actionUploadSounds($sUri)
198  {
199  parent::_actionUploadMedia($sUri, 'isAllowedUploadSounds', 'sounds', array('sounds_choice', 'sounds_upload'),
200  _t('_ch_events_caption_upload_sounds'));
201  }
202 
203  function actionUploadFiles($sUri)
204  {
205  parent::_actionUploadMedia($sUri, 'isAllowedUploadFiles', 'files', array('files_choice', 'files_upload'),
206  _t('_ch_events_caption_upload_files'));
207  }
208 
209  function actionBroadcast($iEntryId)
210  {
211  parent::_actionBroadcast($iEntryId, _t('_ch_events_caption_broadcast'),
212  _t('_ch_events_msg_broadcast_no_participants'), _t('_ch_events_msg_broadcast_message_sent'));
213  }
214 
215  function actionInvite($iEntryId)
216  {
217  parent::_actionInvite($iEntryId, 'ch_events_invitation',
218  $this->_oDb->getParam('ch_events_max_email_invitations'), _t('_ch_events_invitation_sent'),
219  _t('_ch_events_no_users_msg'), _t('_ch_events_caption_invite'));
220  }
221 
222  function _getInviteParams($aDataEntry, $aInviter)
223  {
224  return array(
225  'EventName' => $aDataEntry['Title'],
226  'EventLocation' => _t($GLOBALS['aPreValues']['Country'][$aDataEntry['Country']]['LKey']) . (trim($aDataEntry['City']) ? ', ' . $aDataEntry['City'] : '') . ', ' . $aDataEntry['Place'],
227  'EventStart' => getLocaleDate($aDataEntry['EventStart'], CH_WSB_LOCALE_DATE),
228  'EventUrl' => CH_WSB_URL_ROOT . $this->_oConfig->getBaseUri() . 'view/' . $aDataEntry['EntryUri'],
229  'InviterUrl' => $aInviter ? getProfileLink($aInviter['ID']) : 'javascript:void(0);',
230  'InviterNickName' => $aInviter ? getNickName($aInviter['ID']) : _t('_ch_events_user_unknown'),
231  'InvitationText' => nl2br(process_pass_data(strip_tags($_POST['inviter_text']))),
232  );
233  }
234 
235  function actionCalendar($iYear = '', $iMonth = '')
236  {
237  parent::_actionCalendar($iYear, $iMonth, _t('_ch_events_calendar'));
238  }
239 
240  function actionSearch($sKeyword = '', $sCountry = '')
241  {
242  if (!$this->isAllowedSearch()) {
243  $this->_oTemplate->displayAccessDenied();
244 
245  return;
246  }
247 
248  $this->_oTemplate->pageStart();
249 
250  if ($sKeyword) {
251  $_GET['Keyword'] = $sKeyword;
252  }
253  if ($sCountry) {
254  $_GET['Country'] = explode(',', $sCountry);
255  }
256 
257  if (is_array($_GET['Country']) && 1 == count($_GET['Country']) && !$_GET['Country'][0]) {
258  unset($_GET['Country']);
259  unset($sCountry);
260  }
261 
262  if ($sCountry || $sKeyword) {
263  $_GET['submit_form'] = 1;
264  }
265 
266  ch_events_import('FormSearch');
267  $oForm = new ChEventsFormSearch ();
268  $oForm->initChecker();
269 
270  if ($oForm->isSubmittedAndValid()) {
271 
272  ch_events_import('SearchResult');
273  $o = new ChEventsSearchResult('search', $oForm->getCleanValue('Keyword'), $oForm->getCleanValue('Country'));
274 
275  if ($o->isError) {
276  $this->_oTemplate->displayPageNotFound();
277 
278  return;
279  }
280 
281  if ($s = $o->processing()) {
282  echo $s;
283  } else {
284  $this->_oTemplate->displayNoData();
285 
286  return;
287  }
288 
289  $this->isAllowedSearch(true); // perform search action
290 
291  $this->_oTemplate->addCss(array('unit.css', 'main.css', 'twig.css'));
292  $this->_oTemplate->pageCode($o->aCurrent['title'], false, false);
293 
294  return;
295 
296  }
297 
298  echo $oForm->getCode();
299  $this->_oTemplate->addCss('main.css');
300  $this->_oTemplate->pageCode(_t('_ch_events_caption_search'));
301  }
302 
303  function actionAdd()
304  {
305  parent::_actionAdd(_t('_ch_events_caption_add'));
306  }
307 
308  function actionEdit($iEntryId)
309  {
310  parent::_actionEdit($iEntryId, _t('_ch_events_caption_edit'));
311  }
312 
313  function actionDelete($iEntryId)
314  {
315  parent::_actionDelete($iEntryId, _t('_ch_events_event_was_deleted'));
316  }
317 
318  function actionMarkFeatured($iEntryId)
319  {
320  parent::_actionMarkFeatured($iEntryId, _t('_ch_events_msg_added_to_featured'),
321  _t('_ch_events_msg_removed_from_featured'));
322  }
323 
324  function actionJoin($iEntryId, $iProfileId)
325  {
326  parent::_actionJoin($iEntryId, $iProfileId, _t('_ch_events_event_joined_already'),
327  _t('_ch_events_event_joined_already_pending'), _t('_ch_events_event_join_success'),
328  _t('_ch_events_event_join_success_pending'), _t('_ch_events_event_leave_success'));
329  }
330 
331  function actionParticipants($iEventId)
332  {
333  header('Content-type:text/html;charset=utf-8');
334 
335  $iEventId = (int)$iEventId;
336  if (!($aEvent = $this->_oDb->getEntryByIdAndOwner($iEventId, 0, true))) {
337  echo MsgBox(_t('_Empty'));
338 
339  return;
340  }
341 
342  ch_events_import('PageView');
343  $oPage = new ChEventsPageView ($this, $aEvent);
344  $a = $oPage->getBlockCode_Participants();
345  echo $a[0];
346  exit;
347  }
348 
349  function actionSharePopup($iEntryId)
350  {
351  parent::_actionSharePopup($iEntryId, _t('_ch_events_caption_share_event'));
352  }
353 
354  function actionManageFansPopup($iEntryId)
355  {
356  parent::_actionManageFansPopup($iEntryId, _t('_ch_events_caption_manage_fans'), 'getFans',
357  'isAllowedManageFans', 'isAllowedManageAdmins', CH_EVENTS_MAX_FANS);
358  }
359 
360  function actionTags()
361  {
362  parent::_actionTags(_t('_ch_events_tags'));
363  }
364 
365  function actionCategories()
366  {
367  parent::_actionCategories(_t('_ch_events_categories'));
368  }
369 
370  function actionDownload($iEntryId, $iMediaId)
371  {
372  $aFileInfo = $this->_oDb->getMedia((int)$iEntryId, (int)$iMediaId, 'files');
373 
374  if (!$aFileInfo || !($aDataEntry = $this->_oDb->getEntryByIdAndOwner((int)$iEntryId, 0, true))) {
375  $this->_oTemplate->displayPageNotFound();
376  exit;
377  }
378 
379  if (!$this->isAllowedView($aDataEntry)) {
380  $this->_oTemplate->displayAccessDenied();
381  exit;
382  }
383 
384  parent::_actionDownload($aFileInfo, 'media_id');
385  }
386 
387  // ================================== external actions
388 
395  {
396  if (!$this->_oDb->isAnyPublicContent()) {
397  return '';
398  }
399 
400  ch_import('PageMain', $this->_aModule);
401  $o = new ChEventsPageMain ($this);
402  $o->sUrlStart = CH_WSB_URL_ROOT . '?';
403 
404  $sDefaultHomepageTab = $this->_oDb->getParam('ch_events_homepage_default_tab');
405  $sBrowseMode = $sDefaultHomepageTab;
406  switch ($_GET['ch_events_filter']) {
407  case 'featured':
408  case 'recent':
409  case 'top':
410  case 'popular':
411  case 'upcoming':
412  case $sDefaultHomepageTab:
413  $sBrowseMode = $_GET['ch_events_filter'];
414  break;
415  }
416 
417  return $o->ajaxBrowse(
418  $sBrowseMode,
419  $this->_oDb->getParam('ch_events_perpage_homepage'),
420  array(
421  _t('_ch_events_tab_upcoming') => array(
422  'href' => CH_WSB_URL_ROOT . '?ch_events_filter=upcoming',
423  'active' => 'upcoming' == $sBrowseMode,
424  'dynamic' => true
425  ),
426  _t('_ch_events_tab_featured') => array(
427  'href' => CH_WSB_URL_ROOT . '?ch_events_filter=featured',
428  'active' => 'featured' == $sBrowseMode,
429  'dynamic' => true
430  ),
431  _t('_ch_events_tab_recent') => array(
432  'href' => CH_WSB_URL_ROOT . '?ch_events_filter=recent',
433  'active' => 'recent' == $sBrowseMode,
434  'dynamic' => true
435  ),
436  _t('_ch_events_tab_top') => array(
437  'href' => CH_WSB_URL_ROOT . '?ch_events_filter=top',
438  'active' => 'top' == $sBrowseMode,
439  'dynamic' => true
440  ),
441  _t('_ch_events_tab_popular') => array(
442  'href' => CH_WSB_URL_ROOT . '?ch_events_filter=popular',
443  'active' => 'popular' == $sBrowseMode,
444  'dynamic' => true
445  ),
446  )
447  );
448  }
449 
457  {
458  $iProfileId = (int)$iProfileId;
460  ch_import('PageMain', $this->_aModule);
461  $o = new ChEventsPageMain ($this);
462  $o->sUrlStart = getProfileLink($aProfile['ID']) . '?';
463 
464  return $o->ajaxBrowse(
465  'user',
466  $this->_oDb->getParam('ch_events_perpage_profile'),
467  array(),
469  true,
470  false
471  );
472  }
473 
481  {
482  $iProfileId = (int)$iProfileId;
484  ch_import('PageMain', $this->_aModule);
485  $o = new ChEventsPageMain ($this);
486  $o->sUrlStart = $_SERVER['PHP_SELF'] . '?' . ch_encode_url_params($_GET, array('page'));
487 
488  return $o->ajaxBrowse(
489  'joined',
490  $this->_oDb->getParam('ch_events_perpage_profile'),
491  array(),
493  true,
494  false
495  );
496  }
497 
504  {
505  parent::_serviceGetMemberMenuItem(_t('_ch_events'), _t('_ch_events'), 'calendar');
506  }
507 
514  {
515  if (!$this->isAllowedAdd()) {
516  return '';
517  }
518 
519  return parent::_serviceGetMemberMenuItem(_t('_ch_events_single'), _t('_ch_events_single'), 'calendar', false,
520  '&ch_events_filter=add_event');
521  }
522 
523  function serviceGetWallPost($aEvent)
524  {
525  $aParams = array(
526  'icon' => 'calendar',
527  'txt_object' => '_ch_events_wall_object',
528  'txt_added_new_single' => '_ch_events_wall_added_new',
529  'txt_added_new_title_single' => '_ch_events_wall_added_new_title',
530  'txt_added_new_plural' => '_ch_events_wall_added_new_items',
531  'txt_added_new_title_plural' => '_ch_events_wall_added_new_title_items',
532  'txt_privacy_view_event' => 'view_event',
533  'obj_privacy' => $this->_oPrivacy,
534  'fields' => array(
535  'owner' => 'ResponsibleID',
536  'date' => 'Date'
537  )
538  );
539 
540  return parent::_serviceGetWallPost($aEvent, $aParams);
541  }
542 
543  function serviceGetWallAddComment($aEvent)
544  {
545  $aParams = array(
546  'txt_privacy_view_event' => 'view_event',
547  'obj_privacy' => $this->_oPrivacy
548  );
549 
550  return parent::_serviceGetWallAddComment($aEvent, $aParams);
551  }
552 
556  function serviceGetWallPostComment($aEvent)
557  {
558  $aParams = array(
559  'txt_privacy_view_event' => 'view_event',
560  'obj_privacy' => $this->_oPrivacy
561  );
562 
563  return parent::_serviceGetWallPostComment($aEvent, $aParams);
564  }
565 
566  function serviceGetWallPostOutline($aEvent)
567  {
568  $aItems = array();
569  $aObjectIds = strpos($aEvent['object_id'], ',') !== false ? explode(',',
570  $aEvent['object_id']) : array($aEvent['object_id']);
571  foreach ($aObjectIds as $iId) {
572  $aItem = $this->_oDb->getEntryByIdAndOwner($iId, $aEvent['owner_id'], 1);
573  if ($aItem && $aItem['EventEnd'] > time()) {
574  $aItems[] = $iId;
575  }
576  }
577  if (empty($aItems)) {
578  return '';
579  }
580  $aEvent['object_id'] = join(',', $aItems);
581 
582  $aParams = array(
583  'txt_privacy_view_event' => 'view_event',
584  'obj_privacy' => $this->_oPrivacy,
585  'templates' => array(
586  'grouped' => 'wall_outline_grouped'
587  )
588  );
589 
590  return parent::_serviceGetWallPostOutline($aEvent, 'calendar', $aParams);
591  }
592 
593  function serviceGetSpyPost($sAction, $iObjectId = 0, $iSenderId = 0, $aExtraParams = array())
594  {
595  return parent::_serviceGetSpyPost($sAction, $iObjectId, $iSenderId, $aExtraParams, array(
596  'add' => '_ch_events_spy_post',
597  'change' => '_ch_events_spy_post_change',
598  'join' => '_ch_events_spy_join',
599  'rate' => '_ch_events_spy_rate',
600  'commentPost' => '_ch_events_spy_comment',
601  ));
602  }
603 
605  {
606  $a = array(
607  'change' => _t('_ch_events_sbs_change'),
608  'commentPost' => _t('_ch_events_sbs_comment'),
609  'rate' => _t('_ch_events_sbs_rate'),
610  'join' => _t('_ch_events_sbs_join'),
611  );
612 
613  return parent::_serviceGetSubscriptionParams($sAction, $iEntryId, $a);
614  }
615 
619  function serviceMapInstall()
620  {
621  if (!ChWsbModule::getInstance('ChWmapModule')) {
622  return false;
623  }
624 
625  return ChWsbService::call('wmap', 'part_install', array(
626  'events',
627  array(
628  'part' => 'events',
629  'title' => '_ch_events',
630  'title_singular' => '_ch_events_single',
631  'icon' => 'modules/cheetah/events/|map_marker.png',
632  'icon_site' => 'calendar',
633  'join_table' => 'ch_events_main',
634  'join_where' => $this->_getJoinWhereForWMap(),
635  'join_field_id' => 'ID',
636  'join_field_country' => 'Country',
637  'join_field_city' => 'City',
638  'join_field_state' => '',
639  'join_field_zip' => '',
640  'join_field_address' => 'Place',
641  'join_field_title' => 'Title',
642  'join_field_uri' => 'EntryUri',
643  'join_field_author' => 'ResponsibleID',
644  'join_field_privacy' => 'allow_view_event_to',
645  'permalink' => 'modules/?r=events/view/',
646  )
647  ));
648  }
649 
654  {
655  if (!$this->_oDb->isModule('wmap'))
656  return;
657 
658  return ChWsbService::call('wmap', 'part_update', array(
659  'events',
660  array(
661  'join_where' => $this->_getJoinWhereForWMap(),
662  )
663  ));
664  }
665 
666  // ================================== admin actions
667 
669  {
670  if (!$this->isAdmin()) {
671  $this->_oTemplate->displayAccessDenied();
672 
673  return;
674  }
675 
676  $a = array();
677  $sDir = CH_DIRECTORY_PATH_MODULES . $GLOBALS['aModule']['path'] . 'classes/';
678  if ($h = opendir($sDir)) {
679  while (false !== ($f = readdir($h))) {
680  if ($f == "." || $f == ".." || substr($f, -4) != '.php') {
681  continue;
682  }
683  $s = file_get_contents($sDir . $f);
684  if (preg_match_all("/_t[\s]*\‍([\s]*['\"]{1}(.*?)['\"]{1}[\s]*\‍)/", $s, $m)) {
685  foreach ($m[1] as $sKey) {
686  $a[] = $sKey;
687  }
688  }
689  }
690  closedir($h);
691  }
692 
693  echo '<pre>';
694  echo "\$aLangContent = array(\n";
695  asort($a);
696  foreach ($a as $sKey) {
697  if (preg_match('/^_ch_events/', $sKey)) {
698  echo "\t'$sKey' => '" . (_t($sKey) == $sKey ? '' : _t($sKey)) . "',\n";
699  }
700  }
701  echo ');';
702  echo '</pre>';
703  exit;
704  }
705 
707  {
708  if (!$this->isAdmin()) {
709  $this->_oTemplate->displayAccessDenied();
710 
711  return;
712  }
713 
714  $this->_oTemplate->pageStart();
715 
716  $aMenu = array(
717  'home' => array(
718  'title' => _t('_ch_events_pending_approval'),
719  'href' => CH_WSB_URL_ROOT . $this->_oConfig->getBaseUri() . 'administration/home',
720  '_func' => array(
721  'name' => 'actionAdministrationManage',
722  'params' => array(false, 'administration/home')
723  ),
724  ),
725  'admin_entries' => array(
726  'title' => _t('_ch_events_administration_admin_events'),
727  'href' => CH_WSB_URL_ROOT . $this->_oConfig->getBaseUri() . 'administration/admin_entries',
728  '_func' => array(
729  'name' => 'actionAdministrationManage',
730  'params' => array(true, 'administration/admin_entries')
731  ),
732  ),
733  'create' => array(
734  'title' => _t('_ch_events_administration_create_event'),
735  'href' => CH_WSB_URL_ROOT . $this->_oConfig->getBaseUri() . 'administration/create',
736  '_func' => array('name' => 'actionAdministrationCreateEntry', 'params' => array()),
737  ),
738  'settings' => array(
739  'title' => _t('_ch_events_administration_settings'),
740  'href' => CH_WSB_URL_ROOT . $this->_oConfig->getBaseUri() . 'administration/settings',
741  '_func' => array('name' => 'actionAdministrationSettings', 'params' => array()),
742  ),
743  );
744 
745  if (empty($aMenu[$sUrl])) {
746  $sUrl = 'home';
747  }
748 
749  $aMenu[$sUrl]['active'] = 1;
750  $sContent = call_user_func_array(array($this, $aMenu[$sUrl]['_func']['name']),
751  $aMenu[$sUrl]['_func']['params']);
752 
753  echo $this->_oTemplate->adminBlock($sContent, _t('_ch_events_administration'), $aMenu);
754  $this->_oTemplate->addCssAdmin(array(
755  'admin.css',
756  'unit.css',
757  'main.css',
758  'forms_extra.css',
759  'forms_adv.css',
760  'twig.css'
761  ));
762  $this->_oTemplate->pageCodeAdmin(_t('_ch_events_administration'));
763  }
764 
766  {
767  return parent::_actionAdministrationSettings('Events');
768  }
769 
770  function actionAdministrationManage($isAdminEntries = false, $sUrl = '')
771  {
772  return parent::_actionAdministrationManage($isAdminEntries, '_ch_events_admin_delete',
773  '_ch_events_admin_activate', $sUrl);
774  }
775 
776  // ================================== events
777 
778  function onEventJoinRequest($iEntryId, $iProfileId, $aDataEntry)
779  {
780  parent::_onEventJoinRequest($iEntryId, $iProfileId, $aDataEntry, 'ch_events_join_request', CH_EVENTS_MAX_FANS);
781  }
782 
783  function onEventJoinReject($iEntryId, $iProfileId, $aDataEntry)
784  {
785  parent::_onEventJoinReject($iEntryId, $iProfileId, $aDataEntry, 'ch_events_join_reject');
786  }
787 
788  function onEventFanRemove($iEntryId, $iProfileId, $aDataEntry)
789  {
790  parent::_onEventFanRemove($iEntryId, $iProfileId, $aDataEntry, 'ch_events_fan_remove');
791  }
792 
793  function onEventFanBecomeAdmin($iEntryId, $iProfileId, $aDataEntry)
794  {
795  parent::_onEventFanBecomeAdmin($iEntryId, $iProfileId, $aDataEntry, 'ch_events_fan_become_admin');
796  }
797 
798  function onEventAdminBecomeFan($iEntryId, $iProfileId, $aDataEntry)
799  {
800  parent::_onEventAdminBecomeFan($iEntryId, $iProfileId, $aDataEntry, 'ch_events_admin_become_fan');
801  }
802 
803  function onEventJoinConfirm($iEntryId, $iProfileId, $aDataEntry)
804  {
805  parent::_onEventJoinConfirm($iEntryId, $iProfileId, $aDataEntry, 'ch_events_join_confirm');
806  }
807 
808  // ================================== permissions
809 
810  function isAllowedView($aEvent, $isPerformAction = false)
811  {
812  // admin and owner always have access
813  if ($this->isAdmin() || $aEvent['ResponsibleID'] == $this->_iProfileId) {
814  return true;
815  }
816 
817  // check admin acl
818  $this->_defineActions();
819  $aCheck = checkAction($this->_iProfileId, CH_EVENTS_VIEW, $isPerformAction);
821  return false;
822  }
823 
824  // check user group
825  return $this->_oPrivacy->check('view_event', $aEvent['ID'], $this->_iProfileId);
826  }
827 
828  function isAllowedBrowse($isPerformAction = false)
829  {
830  if ($this->isAdmin()) {
831  return true;
832  }
833  $this->_defineActions();
834  $aCheck = checkAction($this->_iProfileId, CH_EVENTS_BROWSE, $isPerformAction);
835 
837  }
838 
839  function isAllowedSearch($isPerformAction = false)
840  {
841  if ($this->isAdmin()) {
842  return true;
843  }
844  $this->_defineActions();
845  $aCheck = checkAction($this->_iProfileId, CH_EVENTS_SEARCH, $isPerformAction);
846 
848  }
849 
850  function isAllowedAdd($isPerformAction = false)
851  {
852  if ($this->isAdmin()) {
853  return true;
854  }
855  if (!$GLOBALS['logged']['member']) {
856  return false;
857  }
858  $this->_defineActions();
859  $aCheck = checkAction($this->_iProfileId, CH_EVENTS_ADD, $isPerformAction);
860 
862  }
863 
864  function isAllowedEdit($aEvent, $isPerformAction = false)
865  {
866  if ($this->isAdmin() || ($GLOBALS['logged']['member'] && $aEvent['ResponsibleID'] == $this->_iProfileId && isProfileActive($this->_iProfileId))) {
867  return true;
868  }
869  $this->_defineActions();
870  $aCheck = checkAction($this->_iProfileId, CH_EVENTS_EDIT_ANY_EVENT, $isPerformAction);
871 
873  }
874 
875  function isAllowedMarkAsFeatured($aEvent, $isPerformAction = false)
876  {
877  if ($this->isAdmin()) {
878  return true;
879  }
880  $this->_defineActions();
881  $aCheck = checkAction($this->_iProfileId, CH_EVENTS_MARK_AS_FEATURED, $isPerformAction);
882 
884  }
885 
886  function isAllowedBroadcast($aDataEntry, $isPerformAction = false)
887  {
888  if ($this->isAdmin() || ($GLOBALS['logged']['member'] && $aDataEntry['ResponsibleID'] == $this->_iProfileId && isProfileActive($this->_iProfileId))) {
889  return true;
890  }
891  $this->_defineActions();
892  $aCheck = checkAction($this->_iProfileId, CH_EVENTS_BROADCAST_MESSAGE, $isPerformAction);
893 
895  }
896 
897  function isAllowedDelete(&$aEvent, $isPerformAction = false)
898  {
899  if ($this->isAdmin() || ($GLOBALS['logged']['member'] && $aEvent['ResponsibleID'] == $this->_iProfileId && isProfileActive($this->_iProfileId))) {
900  return true;
901  }
902  $this->_defineActions();
903  $aCheck = checkAction($this->_iProfileId, CH_EVENTS_DELETE_ANY_EVENT, $isPerformAction);
904 
906  }
907 
908  function isAllowedActivate(&$aEvent, $isPerformAction = false)
909  {
910  if ($aEvent['Status'] != 'pending') {
911  return false;
912  }
913  if ($this->isAdmin()) {
914  return true;
915  }
916  $this->_defineActions();
917  $aCheck = checkAction($this->_iProfileId, CH_EVENTS_APPROVE, $isPerformAction);
918 
920  }
921 
922  function isAllowedJoin(&$aDataEntry)
923  {
924  if (!$this->_iProfileId) {
925  return false;
926  }
927  if ($aDataEntry['EventEnd'] < time()) {
928  return false;
929  }
930  $isAllowed = $this->_oPrivacy->check('join', $aDataEntry['ID'], $this->_iProfileId);
931 
932  return $isAllowed && $this->_isAllowedJoinByMembership($aDataEntry);
933  }
934 
935  function _isAllowedJoinByMembership(&$aEvent)
936  {
937  if (!$aEvent['EventMembershipFilter']) {
938  return true;
939  }
940 
941  require_once(CH_DIRECTORY_PATH_INC . 'membership_levels.inc.php');
942  $aMemebrshipInfo = getMemberMembershipInfo($this->_iProfileId);
943 
944  return $aEvent['EventMembershipFilter'] == $aMemebrshipInfo['ID'];
945  }
946 
947  function isAllowedSendInvitation(&$aEvent)
948  {
949  return ($aEvent['ResponsibleID'] == $this->_iProfileId && ($GLOBALS['logged']['member'] || $GLOBALS['logged']['admin']) && isProfileActive($this->_iProfileId));
950  }
951 
952  function isAllowedShare(&$aEvent)
953  {
954  if ($aEvent['allow_view_event_to'] != CH_WSB_PG_ALL) {
955  return false;
956  }
957 
958  return true;
959  }
960 
961  function isAllowedViewParticipants(&$aEvent)
962  {
963  if (($aEvent['ResponsibleID'] == $this->_iProfileId && $GLOBALS['logged']['member'] && isProfileActive($this->_iProfileId)) || $this->isAdmin()) {
964  return true;
965  }
966 
967  return $this->_oPrivacy->check('view_participants', $aEvent['ID'], $this->_iProfileId);
968  }
969 
970  function isAllowedComments(&$aEvent)
971  {
972  if (($aEvent['ResponsibleID'] == $this->_iProfileId && $GLOBALS['logged']['member'] && isProfileActive($this->_iProfileId)) || $this->isAdmin()) {
973  return true;
974  }
975 
976  return $this->_oPrivacy->check('comment', $aEvent['ID'], $this->_iProfileId);
977  }
978 
979  function isAllowedUploadPhotos(&$aDataEntry)
980  {
981  if (!ChWsbRequest::serviceExists('photos', 'perform_photo_upload', 'Uploader')) {
982  return false;
983  }
984  if (!$this->_iProfileId) {
985  return false;
986  }
987  if ($this->isAdmin()) {
988  return true;
989  }
990  if (!$this->isMembershipEnabledForImages()) {
991  return false;
992  }
993 
994  return $this->_oPrivacy->check('upload_photos', $aDataEntry['ID'], $this->_iProfileId);
995  }
996 
997  function isAllowedUploadVideos(&$aDataEntry)
998  {
999  if (!ChWsbRequest::serviceExists('videos', 'perform_video_upload', 'Uploader')) {
1000  return false;
1001  }
1002  if (!$this->_iProfileId) {
1003  return false;
1004  }
1005  if ($this->isAdmin()) {
1006  return true;
1007  }
1008  if (!$this->isMembershipEnabledForVideos()) {
1009  return false;
1010  }
1011 
1012  return $this->_oPrivacy->check('upload_videos', $aDataEntry['ID'], $this->_iProfileId);
1013  }
1014 
1015  function isAllowedUploadSounds(&$aDataEntry)
1016  {
1017  if (!ChWsbRequest::serviceExists('sounds', 'perform_music_upload', 'Uploader')) {
1018  return false;
1019  }
1020  if (!$this->_iProfileId) {
1021  return false;
1022  }
1023  if ($this->isAdmin()) {
1024  return true;
1025  }
1026  if (!$this->isMembershipEnabledForSounds()) {
1027  return false;
1028  }
1029 
1030  return $this->_oPrivacy->check('upload_sounds', $aDataEntry['ID'], $this->_iProfileId);
1031  }
1032 
1033  function isAllowedUploadFiles(&$aDataEntry)
1034  {
1035  if (!ChWsbRequest::serviceExists('files', 'perform_file_upload', 'Uploader')) {
1036  return false;
1037  }
1038  if (!$this->_iProfileId) {
1039  return false;
1040  }
1041  if ($this->isAdmin()) {
1042  return true;
1043  }
1044  if (!$this->isMembershipEnabledForFiles()) {
1045  return false;
1046  }
1047 
1048  return $this->_oPrivacy->check('upload_files', $aDataEntry['ID'], $this->_iProfileId);
1049  }
1050 
1051  function isAllowedCreatorCommentsDeleteAndEdit(&$aEvent, $isPerformAction = false)
1052  {
1053  if ($this->isAdmin()) {
1054  return true;
1055  }
1056  if (!$GLOBALS['logged']['member'] || $aEvent['ResponsibleID'] != $this->_iProfileId) {
1057  return false;
1058  }
1059  $this->_defineActions();
1060  $aCheck = checkAction($this->_iProfileId, CH_EVENTS_COMMENTS_DELETE_AND_EDIT, $isPerformAction);
1061 
1063  }
1064 
1065  function isAllowedRate(&$aEvent)
1066  {
1067  if (($aEvent['ResponsibleID'] == $this->_iProfileId && $GLOBALS['logged']['member'] && isProfileActive($this->_iProfileId)) || $this->isAdmin()) {
1068  return true;
1069  }
1070 
1071  return $this->_oPrivacy->check('rate', $aEvent['ID'], $this->_iProfileId);
1072  }
1073 
1074  function isAllowedPostInForum(&$aDataEntry, $iProfileId = -1)
1075  {
1076  if (-1 == $iProfileId) {
1078  }
1079 
1080  return $this->isAdmin() || ($GLOBALS['logged']['member'] && $aEvent['ResponsibleID'] == $iProfileId && isProfileActive($iProfileId)) || $this->_oPrivacy->check('post_in_forum',
1081  $aDataEntry['ID'], $iProfileId);
1082  }
1083 
1084  function isAllowedReadForum(&$aDataEntry, $iProfileId = -1)
1085  {
1086  if (-1 == $iProfileId) {
1088  }
1089 
1090  return $this->isAdmin() || ($GLOBALS['logged']['member'] && $aEvent['ResponsibleID'] == $iProfileId && isProfileActive($iProfileId)) || $this->_oPrivacy->check('view_forum',
1091  $aDataEntry['ID'], $iProfileId);
1092  }
1093 
1094  function isAllowedManageAdmins($aDataEntry)
1095  {
1096  if (($GLOBALS['logged']['member'] || $GLOBALS['logged']['admin']) && $aDataEntry['ResponsibleID'] == $this->_iProfileId && isProfileActive($this->_iProfileId)) {
1097  return true;
1098  }
1099 
1100  return false;
1101  }
1102 
1103  function isAllowedManageFans($aDataEntry)
1104  {
1105  return $this->isEntryAdmin($aDataEntry);
1106  }
1107 
1108  function isFan($aDataEntry, $iProfileId = 0, $isConfirmed = true)
1109  {
1110  if (!$iProfileId) {
1112  }
1113 
1114  return $this->_oDb->isFan($aDataEntry['ID'], $iProfileId, $isConfirmed) ? true : false;
1115  }
1116 
1117  function isEntryAdmin($aDataEntry, $iProfileId = 0)
1118  {
1119  if (!$iProfileId) {
1121  }
1122  if (($GLOBALS['logged']['member'] || $GLOBALS['logged']['admin']) && $aDataEntry['ResponsibleID'] == $iProfileId && isProfileActive($iProfileId)) {
1123  return true;
1124  }
1125 
1126  return $this->_oDb->isGroupAdmin($aDataEntry['ID'], $iProfileId) && isProfileActive($iProfileId);
1127  }
1128 
1129  function _defineActions()
1130  {
1132  'events view',
1133  'events browse',
1134  'events search',
1135  'events add',
1136  'events comments delete and edit',
1137  'events edit any event',
1138  'events delete any event',
1139  'events mark as featured',
1140  'events approve',
1141  'events broadcast message'
1142  ));
1143  }
1144 
1145  // ================================== other function
1146 
1147  function _browseMy(&$aProfile, $sTitle = null)
1148  {
1149  parent::_browseMy($aProfile, _t('_ch_events_block_my_events'));
1150  }
1151 
1152  function _formatDateInBrowse(&$aEvent)
1153  {
1154  return $this->_oTemplate->filterDateUTC($aEvent['EventStart']);
1155  }
1156 
1157  function _formatLocation(&$aEvent, $isCountryLink = false, $isFlag = false)
1158  {
1159  $sFlag = $isFlag ? ' ' . genFlag($aEvent['Country']) : '';
1160  $sCountry = _t($GLOBALS['aPreValues']['Country'][$aEvent['Country']]['LKey']);
1161  if ($isCountryLink) {
1162  $sCountry = '<a href="' . $this->_oConfig->getBaseUri() . 'browse/country/' . strtolower($aEvent['Country']) . '">' . $sCountry . '</a>';
1163  }
1164 
1165  return (trim($aEvent['Place']) ? $aEvent['Place'] . ', ' : '') . (trim($aEvent['City']) ? $aEvent['City'] . ', ' : '') . $sCountry . $sFlag;
1166  }
1167 
1168  function _formatSnippetTextForOutline($aEntryData)
1169  {
1170  return $this->_oTemplate->parseHtmlByName('wall_outline_extra_info', array(
1171  'desc' => $this->_formatSnippetText($aEntryData, 200),
1172  'event_date' => $this->_formatDateInBrowse($aEntryData),
1173  'location' => $this->_formatLocation($aEntryData, false, false),
1174  'participants' => $aEntryData['FansCount'],
1175  ));
1176  }
1177 
1179  {
1180  if ('on' == getParam('ch_events_only_upcoming_events_on_map'))
1181  return "AND `p`.`Status` = 'approved' AND `EventEnd` > UNIX_TIMESTAMP()";
1182  else
1183  return "AND `p`.`Status` = 'approved'";
1184  }
1185 }
process_db_input
process_db_input($sText, $iStripTags=0)
Definition: utils.inc.php:256
header
</code > Be careful enabling this directive if you have a redirector script that does not use the< code > Location</code > HTTP header
Definition: URI.MungeResources.txt:10
CH_WSB_LOCALE_DATE
const CH_WSB_LOCALE_DATE
Definition: utils.inc.php:16
ChEventsModule\actionSounds
actionSounds($sUri)
Definition: ChEventsModule.php:158
ChEventsModule\serviceGetWallPostComment
serviceGetWallPostComment($aEvent)
Definition: ChEventsModule.php:556
ChEventsModule\_getInviteParams
_getInviteParams($aDataEntry, $aInviter)
Definition: ChEventsModule.php:222
ChWsbTwigModule
Definition: ChWsbTwigModule.php:14
ChEventsFormSearch
Definition: ChEventsFormSearch.php:11
ChEventsModule\onEventJoinRequest
onEventJoinRequest($iEntryId, $iProfileId, $aDataEntry)
Definition: ChEventsModule.php:778
true
if(!defined("TRUE_VAL")) define("TRUE_VAL" true
Definition: constants.inc.php:8
ChEventsModule\serviceGetMemberMenuItem
serviceGetMemberMenuItem()
Definition: ChEventsModule.php:503
ChEventsModule\actionSharePopup
actionSharePopup($iEntryId)
Definition: ChEventsModule.php:349
ChEventsModule\_defineActions
_defineActions()
Definition: ChEventsModule.php:1129
ChWsbTwigModule\isMembershipEnabledForVideos
isMembershipEnabledForVideos()
Definition: ChWsbTwigModule.php:2020
MsgBox
MsgBox($sText, $iTimer=0)
Definition: design.inc.php:175
isProfileActive
isProfileActive($iId=0)
Definition: profiles.inc.php:236
ChWsbModule\getInstance
static getInstance($sClassName)
Definition: ChWsbModule.php:89
$f
global $f
Definition: callback.php:13
ChEventsModule\actionAdd
actionAdd()
Definition: ChEventsModule.php:303
ChWsbRequest\serviceExists
static serviceExists($mixedModule, $sMethod, $sClass="Module")
Definition: ChWsbRequest.php:70
ChEventsModule\actionView
actionView($sUri)
Definition: ChEventsModule.php:180
ChEventsModule\isAllowedReadForum
isAllowedReadForum(&$aDataEntry, $iProfileId=-1)
Definition: ChEventsModule.php:1084
ChEventsModule\actionJoin
actionJoin($iEntryId, $iProfileId)
Definition: ChEventsModule.php:324
CHECK_ACTION_RESULT_ALLOWED
const CHECK_ACTION_RESULT_ALLOWED
Definition: membership_levels.inc.php:60
$aModule
$aModule
Definition: classifieds.php:21
ChEventsModule
Definition: ChEventsModule.php:128
ChEventsModule\isAllowedSearch
isAllowedSearch($isPerformAction=false)
Definition: ChEventsModule.php:839
ch_import
ch_import($sClassName, $aModule=array())
Definition: utils.inc.php:1218
ChEventsModule\onEventFanRemove
onEventFanRemove($iEntryId, $iProfileId, $aDataEntry)
Definition: ChEventsModule.php:788
CHECK_ACTION_RESULT
const CHECK_ACTION_RESULT
Definition: membership_levels.inc.php:54
ChEventsModule\_isAllowedJoinByMembership
_isAllowedJoinByMembership(&$aEvent)
Definition: ChEventsModule.php:935
ChWsbTwigModule\isMembershipEnabledForImages
isMembershipEnabledForImages()
Definition: ChWsbTwigModule.php:2015
ChEventsModule\onEventJoinReject
onEventJoinReject($iEntryId, $iProfileId, $aDataEntry)
Definition: ChEventsModule.php:783
ChEventsModule\isAllowedCreatorCommentsDeleteAndEdit
isAllowedCreatorCommentsDeleteAndEdit(&$aEvent, $isPerformAction=false)
Definition: ChEventsModule.php:1051
ChEventsModule\actionInvite
actionInvite($iEntryId)
Definition: ChEventsModule.php:215
ChEventsModule\serviceHomepageBlock
serviceHomepageBlock()
Definition: ChEventsModule.php:394
ChEventsModule\actionFiles
actionFiles($sUri)
Definition: ChEventsModule.php:163
ChEventsModule\isAllowedViewParticipants
isAllowedViewParticipants(&$aEvent)
Definition: ChEventsModule.php:961
$sUrl
$sUrl
Definition: cart.php:15
ChEventsModule\actionTags
actionTags()
Definition: ChEventsModule.php:360
php
ChEventsModule\isAllowedManageFans
isAllowedManageFans($aDataEntry)
Definition: ChEventsModule.php:1103
ChEventsModule\serviceProfileBlockJoined
serviceProfileBlockJoined($iProfileId)
Definition: ChEventsModule.php:480
$iId
$iId
Definition: license.php:15
ChEventsModule\onEventJoinConfirm
onEventJoinConfirm($iEntryId, $iProfileId, $aDataEntry)
Definition: ChEventsModule.php:803
$oPage
$oPage
Definition: search_home.php:83
ChEventsModule\actionManageFansPopup
actionManageFansPopup($iEntryId)
Definition: ChEventsModule.php:354
ChEventsModule\_formatSnippetTextForOutline
_formatSnippetTextForOutline($aEntryData)
Definition: ChEventsModule.php:1168
ChWsbTwigModule\isMembershipEnabledForSounds
isMembershipEnabledForSounds()
Definition: ChWsbTwigModule.php:2025
ChEventsModule\$_oPrivacy
$_oPrivacy
Definition: ChEventsModule.php:130
ChEventsModule\serviceGetMemberMenuItemAddContent
serviceGetMemberMenuItemAddContent()
Definition: ChEventsModule.php:513
CH_SLASHES_NO_ACTION
const CH_SLASHES_NO_ACTION
Definition: utils.inc.php:30
ChEventsModule\isAllowedManageAdmins
isAllowedManageAdmins($aDataEntry)
Definition: ChEventsModule.php:1094
ChEventsModule\actionHome
actionHome()
Definition: ChEventsModule.php:143
ChEventsModule\actionEdit
actionEdit($iEntryId)
Definition: ChEventsModule.php:308
ChEventsModule\isAllowedBroadcast
isAllowedBroadcast($aDataEntry, $isPerformAction=false)
Definition: ChEventsModule.php:886
ChEventsModule\actionGatherLangKeys
actionGatherLangKeys()
Definition: ChEventsModule.php:668
ChEventsModule\actionCalendar
actionCalendar($iYear='', $iMonth='')
Definition: ChEventsModule.php:235
ChEventsModule\actionVideos
actionVideos($sUri)
Definition: ChEventsModule.php:148
$oForm
$oForm
Definition: host_tools.php:42
ChEventsModule\isAllowedComments
isAllowedComments(&$aEvent)
Definition: ChEventsModule.php:970
ChEventsModule\serviceGetWallAddComment
serviceGetWallAddComment($aEvent)
Definition: ChEventsModule.php:543
ChEventsModule\actionUploadVideos
actionUploadVideos($sUri)
Definition: ChEventsModule.php:191
ChWsbTwigModule\isMembershipEnabledForFiles
isMembershipEnabledForFiles()
Definition: ChWsbTwigModule.php:2030
exit
exit
Definition: cart.php:21
ChEventsModule\isFan
isFan($aDataEntry, $iProfileId=0, $isConfirmed=true)
Definition: ChEventsModule.php:1108
$_GET
$_GET['debug']
Definition: index.php:67
ChEventsModule\actionSearch
actionSearch($sKeyword='', $sCountry='')
Definition: ChEventsModule.php:240
ChEventsModule\isAllowedUploadPhotos
isAllowedUploadPhotos(&$aDataEntry)
Definition: ChEventsModule.php:979
getParam
getParam($sParamName, $bUseCache=true)
Definition: db.inc.php:130
ChEventsModule\actionBroadcast
actionBroadcast($iEntryId)
Definition: ChEventsModule.php:209
ChEventsModule\_formatLocation
_formatLocation(&$aEvent, $isCountryLink=false, $isFlag=false)
Definition: ChEventsModule.php:1157
$sTitle
$sTitle
Definition: actions.inc.php:13
ChEventsPrivacy
Definition: ChEventsPrivacy.php:11
ChEventsModule\isEntryAdmin
isEntryAdmin($aDataEntry, $iProfileId=0)
Definition: ChEventsModule.php:1117
ChEventsModule\actionUploadPhotos
actionUploadPhotos($sUri)
Definition: ChEventsModule.php:185
$aProfile
$aProfile
Definition: flash.php:14
ChEventsPageView
Definition: ChEventsPageView.php:11
ChEventsModule\isAllowedView
isAllowedView($aEvent, $isPerformAction=false)
Definition: ChEventsModule.php:810
getNickName
getNickName( $ID='')
Definition: profiles.inc.php:461
ChEventsModule\isAllowedEdit
isAllowedEdit($aEvent, $isPerformAction=false)
Definition: ChEventsModule.php:864
ChEventsModule\isAllowedDelete
isAllowedDelete(&$aEvent, $isPerformAction=false)
Definition: ChEventsModule.php:897
ChEventsModule\isAllowedActivate
isAllowedActivate(&$aEvent, $isPerformAction=false)
Definition: ChEventsModule.php:908
CH_TAGS_NO_ACTION
const CH_TAGS_NO_ACTION
Definition: utils.inc.php:21
ChEventsModule\_browseMy
_browseMy(&$aProfile, $sTitle=null)
Definition: ChEventsModule.php:1147
ChEventsModule\serviceMapInstall
serviceMapInstall()
Definition: ChEventsModule.php:619
ChEventsModule\isAllowedRate
isAllowedRate(&$aEvent)
Definition: ChEventsModule.php:1065
ChEventsModule\isAllowedUploadFiles
isAllowedUploadFiles(&$aDataEntry)
Definition: ChEventsModule.php:1033
ch_events_import
ch_events_import($sClassPostfix, $aModuleOverwright=array())
Definition: ChEventsModule.php:8
ChEventsModule\isAllowedBrowse
isAllowedBrowse($isPerformAction=false)
Definition: ChEventsModule.php:828
ChEventsModule\actionDownload
actionDownload($iEntryId, $iMediaId)
Definition: ChEventsModule.php:370
global
if(!defined("GLOBAL_MODULE")) define("GLOBAL_MODULE" global
Definition: header.inc.php:25
ChEventsModule\actionUploadSounds
actionUploadSounds($sUri)
Definition: ChEventsModule.php:197
ChEventsModule\isAllowedShare
isAllowedShare(&$aEvent)
Definition: ChEventsModule.php:952
ChEventsModule\actionUploadFiles
actionUploadFiles($sUri)
Definition: ChEventsModule.php:203
ChEventsModule\serviceGetWallPost
serviceGetWallPost($aEvent)
Definition: ChEventsModule.php:523
$sContent
$sContent
Definition: bottom_menu_compose.php:169
ChEventsSearchResult
Definition: ChEventsSearchResult.php:11
_t
_t($key, $arg0="", $arg1="", $arg2="")
Definition: languages.inc.php:509
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
ChEventsModule\actionPhotos
actionPhotos($sUri)
Definition: ChEventsModule.php:153
getProfileLink
getProfileLink( $iID, $sLinkAdd='')
Definition: profiles.inc.php:484
CH_EVENTS_MAX_FANS
const CH_EVENTS_MAX_FANS
Definition: ChEventsModule.php:35
ChEventsModule\actionParticipants
actionParticipants($iEventId)
Definition: ChEventsModule.php:331
ChEventsModule\isAllowedUploadSounds
isAllowedUploadSounds(&$aDataEntry)
Definition: ChEventsModule.php:1015
ChEventsModule\isAllowedMarkAsFeatured
isAllowedMarkAsFeatured($aEvent, $isPerformAction=false)
Definition: ChEventsModule.php:875
$aMenu
$aMenu
Definition: categories.php:257
checkAction
checkAction($iMemberId, $actionID, $performAction=false, $iForcedProfID=0, $isCheckMemberStatus=true)
Definition: membership_levels.inc.php:313
ChEventsModule\isAllowedAdd
isAllowedAdd($isPerformAction=false)
Definition: ChEventsModule.php:850
defineMembershipActions
defineMembershipActions($aActionsAll, $sPrefix='CH_')
Definition: membership_levels.inc.php:744
ChEventsModule\isAllowedPostInForum
isAllowedPostInForum(&$aDataEntry, $iProfileId=-1)
Definition: ChEventsModule.php:1074
ChEventsModule\_formatDateInBrowse
_formatDateInBrowse(&$aEvent)
Definition: ChEventsModule.php:1152
$s
$s
Definition: embed.php:13
ChWsbTwigModule\_formatSnippetText
_formatSnippetText($aEntryData, $iMaxLen=300)
Definition: ChWsbTwigModule.php:2044
ChEventsModule\serviceGetWallPostOutline
serviceGetWallPostOutline($aEvent)
Definition: ChEventsModule.php:566
ChEventsModule\serviceGetSubscriptionParams
serviceGetSubscriptionParams($sAction, $iEntryId)
Definition: ChEventsModule.php:604
getMemberMembershipInfo
getMemberMembershipInfo($iMemberId, $iTime='', $bCheckUserStatus=false)
Definition: membership_levels.inc.php:234
process_pass_data
process_pass_data($text, $strip_tags=0)
Definition: utils.inc.php:290
ChWsbTwigModule\isAdmin
isAdmin()
Definition: ChWsbTwigModule.php:1715
ChEventsModule\__construct
__construct(&$aModule)
Definition: ChEventsModule.php:132
$sCountry
$sCountry
Definition: browse.php:26
ChEventsModule\isAllowedSendInvitation
isAllowedSendInvitation(&$aEvent)
Definition: ChEventsModule.php:947
ChEventsPageMain
Definition: ChEventsPageMain.php:11
getProfileInfo
getProfileInfo($iProfileID=0, $checkActiveStatus=false, $forceCache=false)
Definition: profiles.inc.php:249
ChEventsModule\serviceProfileBlock
serviceProfileBlock($iProfileId)
Definition: ChEventsModule.php:456
ChEventsModule\actionAdministrationManage
actionAdministrationManage($isAdminEntries=false, $sUrl='')
Definition: ChEventsModule.php:770
ChEventsModule\isAllowedUploadVideos
isAllowedUploadVideos(&$aDataEntry)
Definition: ChEventsModule.php:997
ChEventsModule\isAllowedJoin
isAllowedJoin(&$aDataEntry)
Definition: ChEventsModule.php:922
ChEventsModule\$_iProfileId
$_iProfileId
Definition: ChEventsModule.php:129
ChEventsModule\onEventAdminBecomeFan
onEventAdminBecomeFan($iEntryId, $iProfileId, $aDataEntry)
Definition: ChEventsModule.php:798
ChEventsModule\actionCategories
actionCategories()
Definition: ChEventsModule.php:365
$sAction
$sAction
Definition: categories.php:274
ChEventsModule\onEventFanBecomeAdmin
onEventFanBecomeAdmin($iEntryId, $iProfileId, $aDataEntry)
Definition: ChEventsModule.php:793
genFlag
genFlag($country)
Definition: utils.inc.php:665
empty
Attr AllowedRel this is empty
Definition: Attr.AllowedRel.txt:7
$o
$o
Definition: cmd.php:193
ChEventsModule\actionDelete
actionDelete($iEntryId)
Definition: ChEventsModule.php:313
ChWsbService\call
static call($mixed, $sMethod, $aParams=array(), $sClass='Module')
Definition: ChWsbService.php:32
getLocaleDate
getLocaleDate($sTimestamp='', $iCode=CH_WSB_LOCALE_DATE_SHORT)
Definition: utils.inc.php:70
ChEventsModule\actionBrowseParticipants
actionBrowseParticipants($sUri)
Definition: ChEventsModule.php:173
ChEventsModule\serviceGetSpyPost
serviceGetSpyPost($sAction, $iObjectId=0, $iSenderId=0, $aExtraParams=array())
Definition: ChEventsModule.php:593
as
as
Definition: Filter.ExtractStyleBlocks.Escaping.txt:10
ChEventsModule\_getJoinWhereForWMap
_getJoinWhereForWMap()
Definition: ChEventsModule.php:1178
ChEventsModule\actionComments
actionComments($sUri)
Definition: ChEventsModule.php:168
ChEventsModule\actionAdministration
actionAdministration($sUrl='')
Definition: ChEventsModule.php:706
ChEventsModule\actionMarkFeatured
actionMarkFeatured($iEntryId)
Definition: ChEventsModule.php:318
ChEventsModule\serviceSetUpcomingEventsOnMap
serviceSetUpcomingEventsOnMap()
Definition: ChEventsModule.php:653
$iProfileId
if( $sMembersList) $iProfileId
Definition: communicator.php:29
$GLOBALS
$GLOBALS['iAdminPage']
Definition: advanced_settings.php:10
ChEventsModule\actionAdministrationSettings
actionAdministrationSettings()
Definition: ChEventsModule.php:765
ch_encode_url_params
ch_encode_url_params($a, $aExcludeKeys=array(), $aOnlyKeys=false)
Definition: utils.inc.php:1675