Project

General

Profile

1
<?php
2
if (!defined('WB_PATH')) die(header('Location: index.php'));
3

    
4
/*
5
$DB_HOST = DB_HOST;
6
$DB_NAME = DB_NAME ;
7
$DB_USER = DB_USERNAME;
8
$DB_PASS = DB_PASSWORD;
9
$link = mysql_connect($DB_HOST, $DB_USER, $DB_PASS);
10
mysql_select_db ( $DB_NAME, $link );
11
*/
12

    
13
if(!function_exists('directory_list')) { require(WB_PATH.'/framework/functions.php'); }
14

    
15
$CachePath = WB_PATH.'/temp/mediacache';
16
// $ListFile = ADMIN_PATH.'/media/MediaBlackList'; // WhiteList   BlackList
17
$ListFile = ADMIN_PATH.'/media/MediaWhiteList'; // WhiteList   BlackList
18

    
19
$link = $database->db_handle;
20
$Dse = new DseTwo();
21
$Dse->db_handle = $link;
22
$Dse->db_name = DB_NAME;
23
$Dse->base_dir = WB_PATH.MEDIA_DIRECTORY;
24
$Dse->table_prefix = TABLE_PREFIX;
25
$Dse->cache_dir = $CachePath;
26

    
27
$Dse->addControllList($ListFile, DseTwo::USE_WHITELIST );  // $type const USE_ALL / USE_BLACKLIST / USE_WHITELIST
28

    
29
if(!empty($directory)) {
30
	$usedFiles = $Dse->getMatchesFromDir( $directory, DseTwo::RETURN_USED);
31
}
32

    
(6-6/14)