Файл: adultscript-2.0.3-pro/files/admin/modules/video/components/queue.php
Строк: 36
<?php
defined('_VALID') or die('Restricted Access!');
class VComponent_Admin_video_queue extends VModule_Admin_video
{
private $db;
private $vcfg;
public function __construct()
{
parent::__construct();
$this->db = VF::factory('database');
$this->vcfg = VF::cfg('module.video');
}
public function render()
{
$errors = array();
$messages = array();
$warnings = array();
$page = (isset($_GET['page'])) ? (int) trim($_GET['page']) : 1;
$sql_count = "SELECT COUNT(*) AS total_videos
FROM #__video_queue";
$total_videos = $this->db->get_field($sql_count, 'total_videos');
$pagination = VPagination::get($page, $total_videos, 20);
$sql = "SELECT q.video_id, q.add_time, q.conv_time,
v.title, o.filename, o.size,
o.method, o.ip
FROM #__video_queue AS q
INNER JOIN #__video AS v ON (v.video_id = q.video_id)
INNER JOIN #__video_orig AS o ON (o.video_id = q.video_id)
ORDER BY q.add_time DESC
LIMIT ".$pagination['limit'];
$videos = $this->db->get_rows($sql);
$tpl = VF::factory('template');
$tpl->menu = 'video';
$tpl->submenu = 'video_tools';
$tpl->extramenu = 'video_queue';
$tpl->meta_title = 'Admin::Video::Queue';
$tpl->vcfg = $this->vcfg;
$tpl->videos = $videos;
$tpl->pagination = $pagination;
$tpl->load(array('header', 'video_queue', 'footer'));
$tpl->display();
}
}
?>