groupDescription(request.group);
write("Choose a File from the " + request.foldername +" Folder
")
function Cursor_Admin_Folder()
{
//open a cursor of files based on the passed folderid passed from group.html
FileList = database.cursor('SELECT filename, location, description, format, ownerid FROM file WHERE folderid = "'+ request.folderid +'" AND activationdate <= TODAY AND expirationdate >= TODAY ORDER BY filename');
}
function Make_FileTableHeader ()
{
write("");
write("");
write("File | ");
write("Format | ");
write("Owner ID | ");
write("Description |
");
}
function Make_FileTable ()
{
var printhead = "false";
var name = "";
while (FileList.next())
{
/* build a table of the selected values. The following if statement prevents the header from being printed if no data exists to be displayed. */
if(printhead == "false")
{Make_FileTableHeader ();
printhead = "true";}
name = escape(FileList.foldername);
write("" + FileList.filename + " | ");
write("" + FileList.format + " | ");
write("" + FileList.ownerid + " | ");
write("" + FileList.description + " |
");
} //end of while loop
//the following logic prints the "no data found" message if the query result returns nothing.
if(printhead == "true")
{write("
");
write("
");}
else
{ Print_No_Found();}
}
Cursor_Admin_Folder();
Make_FileTable();
// for the submit knowlege button, pass the folder id and group to be added to
");