Cheetah
index.php
Go to the documentation of this file.
1 <?php
2 
8 ch_import('Module', $aModule);
9 ch_import('ChTemplProfileView');
10 ch_import('ChTemplProfileGenerator');
11 ch_import('ChTemplConfig');
12 
14 {
15  var $_sOwner;
16  var $_oWall;
17 
18  function __construct($sOwner, &$oWall)
19  {
20  $this->_sOwner = $sOwner;
21  $this->_oWall = &$oWall;
22 
23  $this->oProfileGen = new ChTemplProfileGenerator(getId($sOwner, 0));
24  $this->aConfSite = $GLOBALS['site'];
25  $this->aConfDir = $GLOBALS['dir'];
27  }
28  function getBlockCode_Post()
29  {
30  $sResult = '';
31 
32  if(!empty($this->_sOwner))
33  $sResult = $this->_oWall->servicePostBlockProfileTimeline($this->_sOwner, 'username');
34  else if(isLogged())
35  $sResult = $this->_oWall->servicePostBlockProfileTimeline(getLoggedId());
36 
37  return !empty($sResult) ? $sResult : MsgBox(_t('_wall_msg_no_results'));
38  }
39  function getBlockCode_View()
40  {
41  $sResult = '';
42 
43  if(!empty($this->_sOwner))
44  $sResult = $this->_oWall->serviceViewBlockProfileTimeline($this->_sOwner, -1, -1, '', '', 'username');
45  else if(isLogged())
46  $sResult = $this->_oWall->serviceViewBlockProfileTimeline(getLoggedId());
47 
48  return !empty($sResult) ? $sResult : MsgBox(_t('_wall_msg_no_results'));
49  }
50  function getCode()
51  {
52  if(!empty($this->_sOwner)) {
53  $aOwner = $this->_oWall->_oDb->getUser($this->_sOwner, 'username');
54  if((int)$aOwner['id'] == 0)
55  return MsgBox(_t('_wall_msg_page_not_found'));
56  }
57 
58  return parent::getCode();
59  }
60 }
61 
64 
65 $iIndex = 1;
66 $_page['name_index'] = $iIndex;
67 $_page['css_name'] = 'cmts.css';
68 $_page['js_name'] = 'ChWsbCmts.js';
69 $_page['header'] = _t('_wall_page_caption');
70 
73 $sOwnerUsername = isset($aRequest[0]) ? process_db_input($aRequest[0], CH_TAGS_STRIP) : '';
75 $_page_cont[$iIndex]['page_main_code'] = $oSubscription->getData() . $oWallPage->getCode();
76 
77 $oWall->_oTemplate->setPageTitle((!empty($sOwnerUsername) ? _t('_wall_page_caption', ucfirst($sOwnerUsername)) : _t('_wall_page_caption_my')) );
78 PageCode($oWall->_oTemplate);
process_db_input
process_db_input($sText, $iStripTags=0)
Definition: utils.inc.php:256
ChWallPage
Definition: index.php:14
MsgBox
MsgBox($sText, $iTimer=0)
Definition: design.inc.php:175
ChWallPage\$_oWall
$_oWall
Definition: index.php:16
$sResult
$sResult
Definition: advanced_settings.php:26
$aModule
$aModule
Definition: classifieds.php:21
ch_import
ch_import($sClassName, $aModule=array())
Definition: utils.inc.php:1218
ChWsbPageView\__construct
__construct( $sPageName)
Definition: ChWsbPageView.php:114
ChTemplProfileGenerator
Definition: ChTemplProfileGenerator.php:11
$oWall
$oWall
Definition: index.php:72
php
ChWallPage\$_sOwner
$_sOwner
Definition: index.php:15
isLogged
isLogged()
Definition: profiles.inc.php:24
ChWallPage\getBlockCode_View
getBlockCode_View()
Definition: index.php:39
ChWsbSubscription\getInstance
static getInstance()
Definition: ChWsbSubscription.php:67
$sOwnerUsername
$sOwnerUsername
Definition: index.php:73
$oWallPage
$oWallPage
Definition: index.php:74
$oSubscription
$oSubscription
Definition: index.php:71
ChWallPage\getCode
getCode()
Definition: index.php:50
getLoggedId
getLoggedId()
Definition: profiles.inc.php:32
$GLOBALS
$GLOBALS['aRequest']
Definition: index.php:10
global
if(!defined("GLOBAL_MODULE")) define("GLOBAL_MODULE" global
Definition: header.inc.php:25
_t
_t($key, $arg0="", $arg1="", $arg2="")
Definition: languages.inc.php:509
ChWallPage\__construct
__construct($sOwner, &$oWall)
Definition: index.php:18
$_page
$_page['name_index']
Definition: index.php:47
PageCode
PageCode($oTemplate=null)
Definition: design.inc.php:91
ChTemplProfileView
Definition: ChTemplProfileView.php:11
CH_TAGS_STRIP
const CH_TAGS_STRIP
Definition: utils.inc.php:22
ChWallPage\getBlockCode_Post
getBlockCode_Post()
Definition: index.php:28
$iIndex
$iIndex
Definition: index.php:18
empty
Attr AllowedRel this is empty
Definition: Attr.AllowedRel.txt:7
$_page_cont
$_page_cont[$_ni]['page_main_code']
Definition: index.php:58
ChWallModule
Definition: ChWallModule.php:40