<?php
include_once('./_common.php');

//페이지 아이디값
$page_id = 'video';

include_once(G5_PATH.'/head.php');

$skin_val = $aminaThema['video_skin'];
$skin_dir = 'misc/video';
$skin_name = 'video.skin.php';

if(file_exists(THEMA_PATH.'/skin/'.$skin_name)) {
	$video_skin_path = THEMA_PATH.'/skin';
	$video_skin_url = THEMA_URL.'/skin';
} else if(file_exists(AMINA_PATH.'/'.$skin_dir.'/'.$skin_val.'/'.$skin_name)) {
	$video_skin_path = AMINA_PATH.'/'.$skin_dir.'/'.$skin_val;
	$video_skin_url = AMINA_URL.'/'.$skin_dir.'/'.$skin_val;
} else {
	$video_skin_path = AMINA_PATH.'/'.$skin_dir.'/basic';
	$video_skin_url = AMINA_URL.'/'.$skin_dir.'/basic';
}

$action = 'setting';
include ($video_skin_path.'/video.skin.php'); 

if($q) {
	$keyword = trim($q);
} else {
	//키워드 랜덤 출력
	$keyword = explode(",", $keyword_list);
	if(count($keyword) > 1) shuffle($keyword);
	$keyword = trim($keyword[0]);
}

?>

<script type="text/javascript" src="<?php echo AMINA_URL;?>/js/quvic.js"></script>
<script type="text/javascript" language="JavaScript">
	quvic.MAX_RESULTS_LIST = <?php echo (int)($video_garo * $video_sero);?>;
	quvic.DEFAULT_VIDEO = true;
</script>
<link href="<?php echo $video_skin_url;?>/video.css" type="text/css" rel="stylesheet">
<style>
	#quvicPlayer { position:relative; height: 0; padding-bottom: 56.25%; overflow: hidden; }
	#quvicPlayer iframe, #quvicPlayer object, #quvicPlayer embed { position: absolute;top: 0; left: 0; width: 100%; height:100%; }
	#videolist dt { width:<?php echo (int)(100 / $video_garo);?>%; }
</style>

<?php
	$action = 'search';
	include ($video_skin_path.'/video.skin.php'); 
?>

<script type="text/javascript" language="JavaScript">
	quvic.PresentVideos('search','<?php echo $keyword;?>',1);
</script> 

<?php include_once(G5_PATH.'/tail.php'); ?>
