Cheetah
ChProfileCustomizeExport.php
Go to the documentation of this file.
1 <?php
2 
8 ch_import('ChWsbExport');
9 
11 {
12  protected function __construct($aSystem)
13  {
14  parent::__construct($aSystem);
15  $this->_aTables = array(
16  'ch_profile_custom_main' => '`user_id` = {profile_id}',
17  'ch_profile_custom_themes' => '`ownerid` = {profile_id}',
18  );
19  $this->_sFilesBaseDir = 'modules/cheetah/profile_customize/data/images/';
20  $this->_aTablesWithFiles = array(
21  'ch_profile_custom_main' => array( // table name
22  'css' => array ( // field name
23  // prefixes & extensions
24  '' => '',
25  's_' => '',
26  ),
27  ),
28  );
29  }
30 
31  protected function _getFilePath($sTableName, $sField, $sFileName, $sPrefix, $sExt)
32  {
33  if (!($a = @unserialize($sFileName)))
34  return false;
35 
36  $sImg = false;
37  foreach ($a as $aa) {
38  foreach ($aa as $r) {
39  if (isset($r['image'])) {
40  $sImg = $r['image'];
41  break;
42  }
43  }
44  }
45 
46  return $this->_sFilesBaseDir . $sPrefix . $sImg . $sExt;
47  }
48 }
ch_import
ch_import($sClassName, $aModule=array())
Definition: utils.inc.php:1218
ChWsbExport
Definition: ChWsbExport.php:29
php
$sExt
$sExt
Definition: get_file.php:14
ChProfileCustomizeExport\_getFilePath
_getFilePath($sTableName, $sField, $sFileName, $sPrefix, $sExt)
Definition: ChProfileCustomizeExport.php:31
ChProfileCustomizeExport
Definition: ChProfileCustomizeExport.php:11
as
as
Definition: Filter.ExtractStyleBlocks.Escaping.txt:10
ChProfileCustomizeExport\__construct
__construct($aSystem)
Definition: ChProfileCustomizeExport.php:12