$sqlprov="select * from {$tbPre}video where cid=$cid and id > $id order by id asc limit 1";
$rsprov=$db->fetchOneArray($sqlprov);
?>
$sqlnext="select * from {$tbPre}video where cid=$cid and id < $id order by id desc limit 1";
$rsnext=$db->fetchOneArray($sqlnext);
?>