Cheetah
ChWsbRate.php
Go to the documentation of this file.
1 <?php
2 
8 require_once(CH_DIRECTORY_PATH_INC . 'db.inc.php');
9 require_once(CH_DIRECTORY_PATH_INC . 'design.inc.php');
10 require_once(CH_DIRECTORY_PATH_INC . 'utils.inc.php');
11 require_once(CH_DIRECTORY_PATH_CLASSES . 'ChWsbPageView.php');
12 
13 class ChWsbRate extends ChWsbPageView
14 {
15  var $sType;
16  var $iViewer;
17  // array of headers for rate page
18  var $aPageCaption = array();
19  function __construct($sType)
20  {
21  parent::__construct($sType . '_rate');
22 
23  $this->sType = $sType;
24  $this->iViewer = getLoggedId();
25  }
26 
27  function getVotedItems ()
28  {
29  $ip = getVisitorIP();
30  $oDolVoting = new ChWsbVoting($this->sType, 0, 0);
31  $aVotedItems = $oDolVoting->getVotedItems ($ip);
32  return $this->reviewArray($aVotedItems, $oDolVoting->_aSystem['row_prefix'].'id');
33  }
34 
35  function reviewArray ($aFiles, $sKey = '')
36  {
37  $aList = array();
38  if (is_array($aFiles)) {
39  foreach ($aFiles as $iKey => $aValue) {
40  $aList[$iKey] = $aValue[$sKey];
41  }
42  }
43  return $aList;
44  }
45 
46  //get array or previous rated objects
47  function getRatedSet ()
48  {
49  }
50 
51  //get array or previous rated objects
52  function getRateObject ()
53  {
54  }
55 }
getVisitorIP
getVisitorIP($isProxyCheck=true)
Definition: utils.inc.php:643
ChWsbPageView
Definition: ChWsbPageView.php:99
php
ChWsbVoting
Definition: ChWsbVoting.php:90
ChWsbRate\__construct
__construct($sType)
Definition: ChWsbRate.php:19
getLoggedId
getLoggedId()
Definition: profiles.inc.php:32
ChWsbRate\getRatedSet
getRatedSet()
Definition: ChWsbRate.php:47
ChWsbRate\$sType
$sType
Definition: ChWsbRate.php:15
ChWsbRate\getRateObject
getRateObject()
Definition: ChWsbRate.php:52
ChWsbRate\$iViewer
$iViewer
Definition: ChWsbRate.php:16
ChWsbRate\$aPageCaption
$aPageCaption
Definition: ChWsbRate.php:18
ChWsbRate\getVotedItems
getVotedItems()
Definition: ChWsbRate.php:27
ChWsbRate\reviewArray
reviewArray($aFiles, $sKey='')
Definition: ChWsbRate.php:35
as
as
Definition: Filter.ExtractStyleBlocks.Escaping.txt:10
ChWsbRate
Definition: ChWsbRate.php:14