Cheetah
ChWsbExportFlash.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  'RayBoardBoards' => '`OwnerID` = {profile_id}',
17  'RayBoardUsers' => '`User` = {profile_id}',
18 
19  'RayChatHistory' => '`Sender` = {profile_id}',
20  'RayChatMessages' => '`Sender` = {profile_id}',
21  'RayChatProfiles' => '`ID` = {profile_id}',
22  'RayChatRoomsUsers' => '`User` = {profile_id}',
23 
24  'RayImContacts' => '`SenderID` = {profile_id}',
25  'RayImPendings' => '`SenderID` = {profile_id}',
26 
27  'RayMp3Files' => '`Owner` = {profile_id}',
28 
29  'RayVideoFiles' => '`Owner` = {profile_id}',
30 
31  'RayVideo_commentsFiles' => '`Owner` = {profile_id}',
32  );
33  $this->_sFilesBaseDir = 'flash/modules/';
34  $this->_aTablesWithFiles = array(
35  'RayMp3Files' => array( // table name
36  'ID' => array ( // field name
37  '.mp3', '.ogg', // prefixes & extensions
38  ),
39  ),
40  'RayVideoFiles' => array( // table name
41  'ID' => array ( // field name
42  '.m4v', '.mp4', '.webm', '.flv', '.jpg', '_small.jpg', '_small_2x.jpg', // prefixes & extensions
43  ),
44  ),
45  'RayVideo_commentsFiles' => array( // table name
46  'ID' => array ( // field name
47  '.m4v', '.mp4', '.webm', '.flv', '.jpg', '_small.jpg', '_small_2x.jpg', // prefixes & extensions
48  ),
49  ),
50  );
51  }
52 
53  protected function _getFilePath($sTableName, $sField, $sFileName, $sPrefix, $sExt)
54  {
55  switch ($sTableName) {
56  case 'RayMp3Files':
57  $sPrefix = 'mp3/files/';
58  break;
59  case 'RayVideoFiles':
60  $sPrefix = 'video/files/';
61  break;
62  case 'RayVideo_commentsFiles':
63  $sPrefix = 'video_comments/files/';
64  break;
65  }
66  return $this->_sFilesBaseDir . $sPrefix . $sFileName . $sExt;
67  }
68 }
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
ChWsbExportFlash
Definition: ChWsbExportFlash.php:11
ChWsbExportFlash\_getFilePath
_getFilePath($sTableName, $sField, $sFileName, $sPrefix, $sExt)
Definition: ChWsbExportFlash.php:53
ChWsbExportFlash\__construct
__construct($aSystem)
Definition: ChWsbExportFlash.php:12