-
Notifications
You must be signed in to change notification settings - Fork 2
/
init.php
30 lines (23 loc) · 1017 Bytes
/
init.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
require "config.php";
require "php_file_tree.php";
define('SMARTY_ROOT', $root_directory.'smarty/');
define('SMARTY_DIR', SMARTY_ROOT.'libs/');
require SMARTY_DIR.'Smarty.class.php';
$smarty = new Smarty();
$smarty->template_dir = $root_directory.'themes/'.$theme.'/templates/';
$smarty->compile_dir = SMARTY_ROOT.'templates_c/';
$smarty->config_dir = SMARTY_ROOT.'configs/';
$smarty->cache_dir = SMARTY_ROOT.'cache/';
$smarty->assign('website_root',$root_website);
$smarty->assign('theme_dir',$root_website.'themes/'.$theme.'/');
$allowed = array("mpd", "jpg", "png");
$excluded = array("thumbnail.jpg","thumbnail.png");
$file_list = [];
$arr_ret = php_file_tree("files/", "?file=[link]", $allowed, $excluded, $file_list);
$video_menu = $arr_ret["data"];
$file_list = $arr_ret["file_list"];
$smarty->assign('video_menu',$video_menu);
$smarty->assign('file_list',$file_list);
$smarty->assign('initialVideoBitrate',$initialVideoBitrate);
$smarty->assign('initialAudioBitrate',$initialAudioBitrate);