<?php
include "../../../include/conn.php";
include "../../../include/function.php";
if(!eregi($_SERVER['SERVER_NAME'],$_SERVER['HTTP_REFERER'])){exit();}
?>
var list = new Array();
<?php
	global $db;
	$sql="select S_Name,S_Vdata,S_Addpath,S_ID from s_video where S_Classid<>6 and S_IsHide=0 and S_Reco=5 order by s_id desc";
	$rs=$db->query($sql);
	$num=$db->num_rows($rs);
	if($num==0) echo "";
	$nums=20;
	if($num<$nums){
		$j=$num;
	}else{
		$j=$nums;
	}
	for($i=0;$i<$j;$i++){
		$row=$db->fetch_array($rs);
	$server=$db->getrow("select * from S_Pathip where S_ID=".$row["S_Addpath"]."");
	$S_Urla=substr($row["S_Vdata"],0,7);
	if($S_Urla!="http://"){
		if($server["S_AddPath"]==""){
				$Url=S_SiteDomain.$row["S_Vdata"];
		}else{
				$Url=$server["S_AddPath"].$row["S_Vdata"];
		}
	}else{
				$Url=$row["S_Vdata"];
	}
?>
list[<?php echo $i?>] = new Array(<?php echo $row["S_ID"]?>,'<?php echo $Url?>','<?php echo $row["S_Name"]?>');
<?php
	}
?>