Cheetah
ChSoundsSiteMapsSounds.php
Go to the documentation of this file.
1 <?php
2 
8 ch_import('ChWsbSiteMaps');
9 ch_import('ChWsbPrivacy');
10 
15 {
16  protected $_oModule;
17 
18  protected function __construct($aSystem)
19  {
20  parent::__construct($aSystem);
21 
22  $this->_aQueryParts = array (
23  'fields' => "`e`.`ID`, `e`.`Uri`, `e`.`Date`", // fields list
24  'field_date' => "Date", // date field name
25  'field_date_type' => "timestamp", // date field type
26  'table' => "`RayMp3Files` AS `e`", // table name
27  'join' => " INNER JOIN `sys_albums_objects` AS `o` ON (`o`.`id_object` = `e`.`ID`)
28  INNER JOIN `sys_albums` AS `a` ON (`a`.`Type` = 'ch_sounds' AND `a`.`Status` = 'active' AND `a`.`AllowAlbumView` = '" . CH_WSB_PG_ALL . "' AND `a`.`ID` = `o`.`id_album`)", // join SQL part
29  'where' => "AND `e`.`Status` = 'approved'", // SQL condition, without WHERE
30  'order' => " `e`.`Date` ASC ", // SQL order, without ORDER BY
31  );
32 
33  $this->_oModule = ChWsbModule::getInstance('ChSoundsModule');
34  }
35 
36  protected function _genUrl ($a)
37  {
38  return CH_WSB_URL_ROOT . $this->_oModule->_oConfig->getBaseUri() . 'view/' . $a['Uri'];
39  }
40 }
ChWsbModule\getInstance
static getInstance($sClassName)
Definition: ChWsbModule.php:89
ChSoundsSiteMapsSounds\__construct
__construct($aSystem)
Definition: ChSoundsSiteMapsSounds.php:18
ch_import
ch_import($sClassName, $aModule=array())
Definition: utils.inc.php:1218
php
ChSoundsSiteMapsSounds\_genUrl
_genUrl($a)
Definition: ChSoundsSiteMapsSounds.php:36
ChWsbSiteMaps
Definition: ChWsbSiteMaps.php:32
CH_WSB_PG_ALL
const CH_WSB_PG_ALL
Definition: ChWsbPrivacy.php:12
ChSoundsSiteMapsSounds
Definition: ChSoundsSiteMapsSounds.php:15
ChSoundsSiteMapsSounds\$_oModule
$_oModule
Definition: ChSoundsSiteMapsSounds.php:16