<!-- #include file="include/skin.asp" -->
<%
select case action
case "video"
  call url_video()
case "music"
  call url_music()
case else
  call url_else()
end select

call web_clear(0)

sub url_else()
  call format_redirect("./")
end sub

sub url_video()
  dim fid,vid
  fid=trim(request.querystring("fid"))
  if not int_true(fid) then fid=0
  sql="select top 1 id from video_fix where f_id="&fid
  set rs=joekoe_cms.exec(sql,1)
  if rs.eof then
    rs.close
    call url_else()
  end if
  vid=rs(0)
  rs.close
  call format_redirect("video_view.asp?id="&vid)
end sub

sub url_music()
  dim music_id,did
  music_id=trim(request.querystring("music_id"))
  if not int_true(music_id) then music_id=0
  sql="select top 1 d_id from music where id="&music_id
  set rs=joekoe_cms.exec(sql,1)
  if rs.eof then
    rs.close
    call url_else()
  end if
  did=rs(0)
  rs.close
  call format_redirect("music_disk_view.asp?id="&did&"&music_id="&music_id)
end sub
%>