<%FAScript version=1;%> <%cache( true );%> <% include( \blocks\serversetup.fsp ); if( common.urlparameterexists( "aname" ) ) // if coming from the home page { aname = common.urlparameter( "aname" ); @collect.folder( loc, aname ); } if( common.urlparameterexists( "id" ) ) // if coming from the archive page { id = common.urlparameter( "id" ); @collect.folder( id ); } weeklyvideoid = collect.item.parentid; table = collect.item->dyndo.table; field=table.field( "objname" ); title = field.value; delete field; field=table.field( "category" ); category = field.value; delete field; field=table.field( "objdesc" ); description = field.value( false, 0, false); delete field; field = table.field( "objfilename" ); objfilename = field.value; delete field; delete table; bBonusVideo=false; if( category == 1 ) { bBonusVideo=true; } // Check to see if AVI file exists biPodFileExists=false; ipodfilename = objfilename + ".m4v"; if( common.fileexists( "\" + ipodfilename ) ) { biPodFileExists=true; } // Check to see if AVI file exists bMpegFileExists=false; mpegfilename = objfilename + ".wmv"; if( common.fileexists( "\" + mpegfilename ) ) { bMpegFileExists=true; } // If we are in bonus video mode, then we also want to get a list of ids of bonus video clips bidlist=""; if( bBonusVideo ) { @collect.album( weeklyvideoid ); while( collect.folderlist( false ) ) { if( collect.item.datatableid == 1014 ) { videoid = collect.item.id; table = collect.item->dyndo.table; field = table.field( "category" ); category = field.value; delete field; delete table; if( category==1 ) { if( bidlist != "" ) { bidlist = bidlist + "," + collect.folder.id; } if( bidlist == "" ) { bidlist = collect.folder.id; } } } @collect.folder; common.record.next; } } %> Random 1 - <%title;%>


<%title;%>
<%description;%> <% if( (bBonusVideo==true) && (bidlist!="") ) {%>



Additional Bonus Features
    <% while( common.stringlist( ",", bidlist ) ) { @collect.folder( common.string.value ); videoname = collect.item.name; // Do not output current bonus Clips if( common.string.value != id ) { %>
  • <%videoname;%>
  • <% } if( common.string.value == id ) { %>
  • <%videoname;%>
  • <% } @common.string; common.record.next; } %>
<% } %>