Item viewer displays the tracking information for a single digital resource
This class extends the abstract class abstractItemViewer and implements the iItemViewer interface.
상속: SobekCM.Library.ItemViewer.Viewers.abstractItemViewer
예제 #1
0
        /// <summary> Write the item viewer main section as HTML directly to the HTTP output stream </summary>
        /// <param name="Output"> Response stream for the item viewer to write directly to </param>
        /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param>
        public override void Write_Main_Viewer_Section(TextWriter Output, Custom_Tracer Tracer)
        {
            Tracer.Add_Trace("UF_Archives_ItemViewer.Write_Main_Viewer_Section", "");

            // Add the HTML for the image
            Output.WriteLine("<!-- (UF) ARCHIVES ITEM VIEWER OUTPUT -->");

            // Start the citation table
            Output.WriteLine("  <td align=\"left\"><span class=\"sbkTrk_ViewerTitle\">Tracking Information</span></td>");
            Output.WriteLine("</tr>");
            Output.WriteLine("<tr>");
            Output.WriteLine("  <td class=\"sbkTrk_MainArea\">");

            // Add the tabs for related admin viewers (if they exist)
            Tracking_ItemViewer.Write_Tracking_Tabs(Output, CurrentRequest, BriefItem);

            Tracer.Add_Trace("Tracking_ItemViewer.Archives_String", "Displaying archive tracking information");
            if ((archiveTable == null) || (archiveTable.Rows.Count == 0))
            {
                Output.WriteLine("<br /><br /><br /><center><strong>ITEM HAS NO ARCHIVE INFORMATION</strong></center><br /><br /><br />");
            }
            else
            {
                // Now, pull the list of all archived files
                DataColumn filenameColumn      = archiveTable.Columns["Filename"];
                DataColumn sizeColumn          = archiveTable.Columns["Size"];
                DataColumn lastWriteDateColumn = archiveTable.Columns["LastWriteDate"];
                DataColumn archiveDateColumn   = archiveTable.Columns["ArchiveDate"];

                Output.WriteLine("<br />");
                Output.WriteLine("<table border=\"1px\" cellpadding=\"1px\" cellspacing=\"0px\" rules=\"cols\" frame=\"void\" bordercolor=\"#e7e7e7\" width=\"100%\">");
                Output.WriteLine("  <tr align=\"center\" bgcolor=\"#0022a7\" height=\"25px\"><td colspan=\"4\"><span style=\"color: White\"><b>ARCHIVED FILE INFORMATION</b></span></td></tr>");
                Output.WriteLine("  <tr align=\"left\" bgcolor=\"#7d90d5\" height=\"25px\">");
                Output.WriteLine("    <th><span style=\"color: White\">FILENAME</span></th>");
                Output.WriteLine("    <th><span style=\"color: White\">SIZE</span></th>");
                Output.WriteLine("    <th><span style=\"color: White\">LAST WRITE DATE</span></th>");
                Output.WriteLine("    <th><span style=\"color: White\">ARCHIVED DATE</span></th>");
                Output.WriteLine("  </tr>");


                foreach (DataRow thisRow in archiveTable.Rows)
                {
                    Output.WriteLine("  <tr height=\"25px\" >");
                    Output.WriteLine("    <td>" + thisRow[filenameColumn] + "</td>");
                    Output.WriteLine("    <td>" + thisRow[sizeColumn] + "</td>");
                    Output.WriteLine("    <td>" + thisRow[lastWriteDateColumn] + "</td>");
                    Output.WriteLine("    <td>" + thisRow[archiveDateColumn] + "</td>");
                    Output.WriteLine("  </tr>");
                    Output.WriteLine("  <tr><td bgcolor=\"#e7e7e7\" colspan=\"4\"></td></tr>");
                }

                Output.WriteLine("</table>");
            }

            Output.WriteLine("<br /> <br />");

            Output.WriteLine("  </td>");
            Output.WriteLine("  <!-- END (UF) ARCHIVES VIEWER OUTPUT -->");
        }
        /// <summary> Write the item viewer main section as HTML directly to the HTTP output stream </summary>
        /// <param name="Output"> Response stream for the item viewer to write directly to </param>
        /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param>
        public override void Write_Main_Viewer_Section(TextWriter Output, Custom_Tracer Tracer)
        {
            Tracer.Add_Trace("Milestones_ItemViewer.Write_Main_Viewer_Section", "");

            // Add the HTML for the image
            Output.WriteLine("<!-- MILESTONES ITEM VIEWER OUTPUT -->");

            // Start the citation table
            Output.WriteLine("  <td align=\"left\"><span class=\"sbkTrk_ViewerTitle\">Tracking Information</span></td>");
            Output.WriteLine("</tr>");
            Output.WriteLine("<tr>");
            Output.WriteLine("  <td class=\"sbkTrk_MainArea\">");

            // Add the tabs for related admin viewers (if they exist)
            Tracking_ItemViewer.Write_Tracking_Tabs(Output, CurrentRequest, BriefItem);

            Tracer.Add_Trace("Milestones_ItemViewer.Archives_String", "Displaying milestone information");

            Output.WriteLine("<br />");
            Output.WriteLine("<br />");
            Output.WriteLine("<span style=\"font-size:1.1em\">");
            Output.WriteLine("<blockquote>");
            Output.WriteLine("<table width=\"450px\">");
            Output.WriteLine("<tr height=\"20px\" bgcolor=\"#7d90d5\"><td colspan=\"3\"><span style=\"color: White\"><strong> &nbsp; DIGITIZATION MILESTONES</strong></span></td></tr>");
            if (trackingDetails.Milestone_DigitalAcquisition.HasValue)
            {
                Output.WriteLine("<tr><td width=\"25px\">&nbsp;</td><td>Digital Acquisition</td><td>" + trackingDetails.Milestone_DigitalAcquisition.Value.ToShortDateString() + "</td></tr>");
            }
            else
            {
                Output.WriteLine("<tr><td width=\"25px\">&nbsp;</td><td>Digital Acquisition</td><td>n/a</td></tr>");
            }
            Output.WriteLine("<tr><td></td><td bgcolor=\"#e7e7e7\" colspan=\"2\"></td></tr>");

            if (trackingDetails.Milestone_ImageProcessing.HasValue)
            {
                Output.WriteLine("<tr><td width=\"25px\">&nbsp;</td><td>Post-Acquisition Processing</td><td>" + trackingDetails.Milestone_ImageProcessing.Value.ToShortDateString() + "</td></tr>");
            }
            else
            {
                Output.WriteLine("<tr><td width=\"25px\">&nbsp;</td><td>Post-Acquisition Processing</td><td>n/a</td></tr>");
            }
            Output.WriteLine("<tr><td></td><td bgcolor=\"#e7e7e7\" colspan=\"2\"></td></tr>");

            if (trackingDetails.Milestone_QualityControl.HasValue)
            {
                Output.WriteLine("<tr><td width=\"25px\">&nbsp;</td><td>Quality Control Performed</td><td>" + trackingDetails.Milestone_QualityControl.Value.ToShortDateString() + "</td></tr>");
            }
            else
            {
                Output.WriteLine("<tr><td width=\"25px\">&nbsp;</td><td>Quality Control Performed</td><td>n/a</td></tr>");
            }
            Output.WriteLine("<tr><td></td><td bgcolor=\"#e7e7e7\" colspan=\"2\"></td></tr>");

            if (trackingDetails.Milestone_OnlineComplete.HasValue)
            {
                Output.WriteLine("<tr><td width=\"25px\">&nbsp;</td><td>Online Complete</td><td>" + trackingDetails.Milestone_OnlineComplete.Value.ToShortDateString() + "</td></tr>");
            }
            else
            {
                Output.WriteLine("<tr><td width=\"25px\">&nbsp;</td><td>Online Complete</td><td>n/a</td></tr>");
            }
            Output.WriteLine("<tr><td></td><td bgcolor=\"#e7e7e7\" colspan=\"2\"></td></tr>");
            Output.WriteLine("</table>");
            Output.WriteLine("<br />");
            Output.WriteLine("<br />");

            //Output.WriteLine("<table width=\"450px\">");
            //Output.WriteLine("<tr height=\"20px\" bgcolor=\"#7d90d5\"><td colspan=\"3\"><span style=\"color: White\"><strong> &nbsp; PHYSICAL MATERIAL MILESTONES</strong></span></td></tr>");
            //if (trackingDetails.Material_ReceivedDate.HasValue)
            //{
            //    if (currentItem.Tracking.Material_Rec_Date_Estimated)
            //        Output.WriteLine("<tr><td width=\"25px\">&nbsp;</td><td>Materials Received</td><td>" + currentItem.Tracking.Material_Received_Date.Value.ToShortDateString() + " (estimated) </td></tr>");
            //    else
            //        Output.WriteLine("<tr><td width=\"25px\">&nbsp;</td><td>Materials Received</td><td>" + trackingDetails.Material_ReceivedDate.Value.ToShortDateString() + "</td></tr>");
            //}
            //else
            //{
            //    Output.WriteLine("<tr><td width=\"25px\">&nbsp;</td><td>Materials Received</td><td>n/a</td></tr>");
            //}
            //Output.WriteLine("<tr><td></td><td bgcolor=\"#e7e7e7\" colspan=\"2\"></td></tr>");

            //if (trackingDetails.Disposition_Date.HasValue)
            //{
            //    Output.WriteLine("<tr><td width=\"25px\">&nbsp;</td><td>Disposition Date</td><td>" + trackingDetails.Disposition_Date.Value.ToShortDateString() + "</td></tr>");
            //}
            //else
            //{
            //    Output.WriteLine("<tr><td width=\"25px\">&nbsp;</td><td>Disposition Date</td><td>n/a</td></tr>");
            //}
            //Output.WriteLine("<tr><td></td><td bgcolor=\"#e7e7e7\" colspan=\"2\"></td></tr>");

            //if (currentItem.Tracking.Tracking_Box.Length > 0)
            //{
            //    Output.WriteLine("<tr><td width=\"25px\">&nbsp;</td><td>Tracking Box</td><td>" + currentItem.Tracking.Tracking_Box + "</td></tr>");
            //    Output.WriteLine("<tr><td></td><td bgcolor=\"#e7e7e7\" colspan=\"2\"></td></tr>");
            //}

            //Output.WriteLine("</table>");
            //Output.WriteLine("<br />");
            //Output.WriteLine("<br />");

            //if ((currentItem.Tracking.Born_Digital) || (currentItem.Tracking.Disposition_Advice > 0))
            //{
            //    Output.WriteLine("<table width=\"450px\">");
            //    Output.WriteLine("<tr height=\"20px\" bgcolor=\"#7d90d5\"><td colspan=\"3\"><span style=\"color: White\"><strong> &nbsp; PHYSICAL MATERIAL RELATED FIELDS</strong></span></td></tr>");
            //    if (currentItem.Tracking.Born_Digital)
            //    {
            //        Output.WriteLine("<tr><td width=\"25px\">&nbsp;</td><td>Born Digital</td><td>&nbsp;</td></tr>");
            //        Output.WriteLine("<tr><td></td><td bgcolor=\"#e7e7e7\" colspan=\"2\"></td></tr>");

            //    }

            //    if (currentItem.Tracking.Disposition_Advice > 0)
            //    {
            //        Output.WriteLine("<tr><td width=\"25px\">&nbsp;</td><td>Disposition Advice</td><td>" + currentItem.Tracking.Disposition_Advice + "</td></tr>");
            //        Output.WriteLine("<tr><td></td><td bgcolor=\"#e7e7e7\" colspan=\"2\"></td></tr>");
            //    }

            //    Output.WriteLine("</table>");
            //    Output.WriteLine("<br />");
            //    Output.WriteLine("<br />");
            //}

            //Output.WriteLine("<table width=\"450px\">");
            //Output.WriteLine("<tr height=\"20px\" bgcolor=\"#7d90d5\"><td colspan=\"3\"><span style=\"color: White\"><strong> &nbsp; ARCHIVING MILESTONES</strong></span></td></tr>");
            //if ((!currentItem.Tracking.Locally_Archived) && (!currentItem.Tracking.Remotely_Archived))
            //{
            //    Output.WriteLine("<tr><td width=\"25px\">&nbsp;</td><td>NOT ARCHIVED</td><td>&nbsp;</td></tr>");
            //    Output.WriteLine("<tr><td></td><td bgcolor=\"#e7e7e7\" colspan=\"2\"></td></tr>");

            //}
            //else
            //{
            //    if (currentItem.Tracking.Locally_Archived)
            //    {
            //        Output.WriteLine("<tr><td width=\"25px\">&nbsp;</td><td>Locally Stored on CD or Tape</td><td>&nbsp;</td></tr>");
            //        Output.WriteLine("<tr><td></td><td bgcolor=\"#e7e7e7\" colspan=\"2\"></td></tr>");

            //    }

            //    if (currentItem.Tracking.Remotely_Archived)
            //    {
            //        Output.WriteLine("<tr><td width=\"25px\">&nbsp;</td><td>Archived Remotely (FDA)</td><td>&nbsp;</td></tr>");
            //        Output.WriteLine("<tr><td></td><td bgcolor=\"#e7e7e7\" colspan=\"2\"></td></tr>");
            //    }
            //}

            //Output.WriteLine("</table>");
            //Output.WriteLine("<br />");
            //Output.WriteLine("<br />");

            Output.WriteLine("</blockquote>");
            Output.WriteLine("</span>");
            Output.WriteLine("<br />");

            Output.WriteLine("  </td>");
            Output.WriteLine("  <!-- END MILESTONES VIEWER OUTPUT -->");
        }
        /// <summary> Write the item viewer main section as HTML directly to the HTTP output stream </summary>
        /// <param name="Output"> Response stream for the item viewer to write directly to </param>
        /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param>
        public override void Write_Main_Viewer_Section(TextWriter Output, Custom_Tracer Tracer)
        {
            Tracer.Add_Trace("UF_Media_ItemViewer.Write_Main_Viewer_Section", "");

            // Add the HTML for the image
            Output.WriteLine("<!-- (UF) MEDIA ITEM VIEWER OUTPUT -->");

            // Start the citation table
            Output.WriteLine("  <td align=\"left\"><span class=\"sbkTrk_ViewerTitle\">Tracking Information</span></td>");
            Output.WriteLine("</tr>");
            Output.WriteLine("<tr>");
            Output.WriteLine("  <td class=\"sbkTrk_MainArea\">");

            // Add the tabs for related admin viewers (if they exist)
            Tracking_ItemViewer.Write_Tracking_Tabs(Output, CurrentRequest, BriefItem);

            Tracer.Add_Trace("Tracking_ItemViewer.Media_String", "Displaying media archive information");
            if ((mediaTable == null) || (mediaTable.Rows.Count == 0))
            {
                Output.WriteLine("<br /><br /><br /><center><strong>ITEM IS NOT ARCHIVED TO MEDIA</strong></center><br /><br /><br />");
            }
            else
            {
                Output.WriteLine("<br />");
                Output.WriteLine("<table border=\"1px\" cellpadding=\"5px\" cellspacing=\"0px\" rules=\"cols\" frame=\"void\" bordercolor=\"#e7e7e7\" >");
                Output.WriteLine("  <tr align=\"center\" bgcolor=\"#0022a7\"><td colspan=\"5\"><span style=\"color: White\"><b>CD/DVD ARCHIVE</b></span></td></tr>");
                Output.WriteLine("  <tr align=\"left\" bgcolor=\"#7d90d5\">");
                Output.WriteLine("    <th><span style=\"color: White\">CD/DVD NUMBER</span></th>");
                Output.WriteLine("    <th width=\"350px\"><span style=\"color: White\">FILE RANGE</span></th>");
                Output.WriteLine("    <th><span style=\"color: White\">IMAGES</span></th>");
                Output.WriteLine("    <th><span style=\"color: White\">SIZE</span></th>");
                Output.WriteLine("    <th><span style=\"color: White\">DATE BURNED</span></th>");
                Output.WriteLine("  </tr>");

                foreach (DataRow thisRow in mediaTable.Rows)
                {
                    Output.WriteLine("  <tr>");

                    // Add the CD/DVD number
                    Output.WriteLine("    <td>" + thisRow[0] + "</td>");

                    // Add file range
                    if ((thisRow[1] != DBNull.Value) && (thisRow[1].ToString().Length > 0))
                    {
                        Output.WriteLine("    <td width=\"350px\">" + thisRow[1] + "</td>");
                    }
                    else
                    {
                        Output.WriteLine("    <td width=\"350px\">&nbsp;</td>");
                    }

                    // Add images
                    if ((thisRow[2] != DBNull.Value) && (thisRow[2].ToString().Length > 0))
                    {
                        Output.WriteLine("    <td>" + thisRow[2] + "</td>");
                    }
                    else
                    {
                        Output.WriteLine("    <td>&nbsp;</td>");
                    }

                    // Add size
                    if ((thisRow[3] != DBNull.Value) && (thisRow[3].ToString().Length > 0))
                    {
                        Output.WriteLine("    <td>" + thisRow[3] + "</td>");
                    }
                    else
                    {
                        Output.WriteLine("    <td>&nbsp;</td>");
                    }

                    // Add date burned
                    if ((thisRow[4] != DBNull.Value) && (thisRow[4].ToString().Length > 0))
                    {
                        DateTime tempDate;
                        if (DateTime.TryParse(thisRow[4].ToString(), out tempDate))
                        {
                            Output.WriteLine("    <td>" + tempDate.ToShortDateString() + "</td>");
                        }
                        else
                        {
                            Output.WriteLine("    <td>&nbsp;</td>");
                        }
                    }
                    else
                    {
                        Output.WriteLine("    <td>&nbsp;</td>");
                    }

                    Output.WriteLine("  </tr>");
                }
                Output.WriteLine("  <tr><td bgcolor=\"#e7e7e7\" colspan=\"5\"></td></tr>");
                Output.WriteLine("</table>");
            }

            Output.WriteLine("<br /> <br />");


            Output.WriteLine("  </td>");
            Output.WriteLine("  <!-- END (UF) MEDIA VIEWER OUTPUT -->");
        }
        /// <summary> Write the item viewer main section as HTML directly to the HTTP output stream </summary>
        /// <param name="Output"> Response stream for the item viewer to write directly to </param>
        /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param>
        public override void Write_Main_Viewer_Section(TextWriter Output, Custom_Tracer Tracer)
        {
            Tracer.Add_Trace("Directory_ItemViewer.Write_Main_Viewer_Section", "");

            // Add the HTML for the image
            Output.WriteLine("<!-- DIRECTORY ITEM VIEWER OUTPUT -->");

            // Start the citation table
            Output.WriteLine("  <td align=\"left\"><span class=\"sbkTrk_ViewerTitle\">Tracking Information</span></td>");
            Output.WriteLine("</tr>");
            Output.WriteLine("<tr>");
            Output.WriteLine("  <td class=\"sbkTrk_MainArea\">");

            // Add the tabs for related admin viewers (if they exist)
            Tracking_ItemViewer.Write_Tracking_Tabs(Output, CurrentRequest, BriefItem);

            Tracer.Add_Trace("Directory_ItemViewer.Directory_String", "Pulling and displaying files in the image directory");

            try
            {
                string directory = SobekFileSystem.Resource_Network_Uri(BriefItem);
                string url       = SobekFileSystem.Resource_Web_Uri(BriefItem);
                List <SobekFileSystem_FileInfo> files = SobekFileSystem.GetFiles(BriefItem);

                // Get all the file info objects and order by name
                SortedList <string, SobekFileSystem_FileInfo> sortedFiles = new SortedList <string, SobekFileSystem_FileInfo>();
                foreach (SobekFileSystem_FileInfo thisFile in files)
                {
                    sortedFiles.Add(thisFile.Name.ToUpper(), thisFile);
                }

                // Remove the THUMBS.DB file, if it exists
                if (sortedFiles.ContainsKey("THUMBS.DB"))
                {
                    sortedFiles.Remove("THUMBS.DB");
                }

                // Start the file table
                Output.WriteLine("<br />");
                Output.WriteLine("<br />");
                Output.WriteLine("<blockquote>");
                Output.WriteLine(" &nbsp; &nbsp; <a href=\"" + directory + "\">" + directory + "</a>");
                Output.WriteLine("</blockquote>");

                Output.WriteLine("<blockquote>");

                // Add all the page images first
                List <BriefItem_FileGrouping> nodes = BriefItem.Images;
                if ((nodes != null) && (nodes.Count > 0))
                {
                    Output.WriteLine("<span style=\"font-size:1.4em; color:#888888;\"><b>PAGE FILES</b></span><br />");
                    Output.WriteLine("<table border=\"0px\" cellspacing=\"0px\" class=\"statsTable\">");
                    Output.WriteLine("<tr align=\"left\" bgcolor=\"#0022a7\" height=\"20px\" >");
                    Output.WriteLine("<th align=\"left\"><span style=\"color: White\">NAME</span></th>");
                    Output.WriteLine("<th width=\"10px\">&nbsp;</th>");
                    Output.WriteLine("<th align=\"left\" width=\"170px\"><span style=\"color: White\">DATE MODIFIED</span></th>");
                    Output.WriteLine("<th align=\"left\" width=\"180px\"><span style=\"color: White\">TYPE</span></th>");
                    Output.WriteLine("<th width=\"10px\">&nbsp;</th>");
                    Output.WriteLine("<th align=\"right\"><span style=\"color: White\">SIZE</span></th>");
                    Output.WriteLine("</tr>");

                    List <string> file_names_added = new List <string>();
                    foreach (BriefItem_FileGrouping thisNode in nodes)
                    {
                        // Only show pages with files
                        if (thisNode.Files.Count > 0)
                        {
                            // Ensure that if a page is repeated, it only is written once
                            string[] filename_splitter = thisNode.Files[0].Name.Split(".".ToCharArray());

                            string fileName = filename_splitter[0].ToUpper();
                            if (filename_splitter.Length > 1)
                            {
                                fileName = filename_splitter[filename_splitter.Length - 2].ToUpper();
                            }
                            if (!file_names_added.Contains(fileName))
                            {
                                file_names_added.Add(fileName);

                                Output.WriteLine("<tr align=\"left\" bgcolor=\"#7d90d5\">");
                                string pageName = thisNode.Label;
                                if (pageName.Length == 0)
                                {
                                    pageName = "PAGE";
                                }

                                Output.WriteLine("<td colspan=\"6\" ><span style=\"color: White\"><b>" + pageName.ToUpper() + "</b></span></td>");
                                Output.WriteLine("</tr>");

                                // Now, check for each file
                                foreach (BriefItem_File thisFile in thisNode.Files)
                                {
                                    string thisFileUpper = thisFile.Name.ToUpper();
                                    if (sortedFiles.ContainsKey(thisFileUpper))
                                    {
                                        // string file = UI_ApplicationCache_Gateway.Settings.Servers.Image_Server_Network + currentItem.Web.AssocFilePath + thisFile.System_Name;
                                        Add_File_HTML(sortedFiles[thisFileUpper], Output, url, true);
                                        sortedFiles.Remove(thisFileUpper);
                                    }
                                }

                                // Ensure that there still aren't some page files that exist that were not linked
                                string[] other_page_file_endings = { ".JPG", ".JP2", "THM.JPG", ".TXT", ".PRO", ".QC.JPG" };
                                foreach (string thisFileEnder in other_page_file_endings)
                                {
                                    if (sortedFiles.ContainsKey(fileName.ToUpper() + thisFileEnder))
                                    {
                                        //string file = UI_ApplicationCache_Gateway.Settings.Servers.Image_Server_Network + currentItem.Web.AssocFilePath + fileName + thisFileEnder.ToLower();
                                        Add_File_HTML(sortedFiles[fileName.ToUpper() + thisFileEnder], Output, url, true);
                                        sortedFiles.Remove(fileName.ToUpper() + thisFileEnder);
                                    }
                                }
                            }
                        }
                    }

                    // FInish the table
                    Output.WriteLine("</table>");
                    Output.WriteLine("<br /><br />");
                }

                // Add all the metadata files
                Output.WriteLine("<span style=\"font-size:1.4em; color:#888888;\"><b>METADATA FILES</b></span><br />");
                Output.WriteLine("<table border=\"0px\" cellspacing=\"0px\" class=\"statsTable\">");
                Output.WriteLine("<tr align=\"left\" bgcolor=\"#0022a7\" height=\"20px\" >");
                Output.WriteLine("<th align=\"left\"><span style=\"color: White\">NAME</span></th>");
                Output.WriteLine("<th width=\"10px\">&nbsp;</th>");
                Output.WriteLine("<th align=\"left\" width=\"170px\"><span style=\"color: White\">DATE MODIFIED</span></th>");
                Output.WriteLine("<th align=\"left\" width=\"180px\"><span style=\"color: White\">TYPE</span></th>");
                Output.WriteLine("<th width=\"10px\">&nbsp;</th>");
                Output.WriteLine("<th align=\"right\"><span style=\"color: White\">SIZE</span></th>");
                Output.WriteLine("</tr>");

                // Add each metadata file
                List <string> files_handled = new List <string>();
                foreach (string thisFile in sortedFiles.Keys.Where(ThisFile => (ThisFile.IndexOf(".METS.BAK") > 0) || (ThisFile.IndexOf(".METS.XML") > 0) || (ThisFile == "DOC.XML") || (ThisFile == "MARC.XML") || (ThisFile == "CITATION_METS.XML") || (ThisFile == BriefItem.BibID.ToUpper() + "_" + BriefItem.VID + ".HTML")))
                {
                    files_handled.Add(thisFile);
                    Add_File_HTML(sortedFiles[thisFile], Output, url, true);
                }

                // REmove all handled files
                foreach (string thisKey in files_handled)
                {
                    sortedFiles.Remove(thisKey);
                }

                // FInish the table
                Output.WriteLine("</table>");
                Output.WriteLine("<br /><br />");

                // Finally, add all the remaining files
                if (sortedFiles.Count > 0)
                {
                    Output.WriteLine("<span style=\"font-size:1.4em; color:#888888;\"><b>OTHER FILES</b></span><br />");
                    Output.WriteLine("<table border=\"0px\" cellspacing=\"0px\" class=\"statsTable\">");
                    Output.WriteLine("<tr align=\"left\" bgcolor=\"#0022a7\" height=\"20px\" >");
                    Output.WriteLine("<th align=\"left\"><span style=\"color: White\">NAME</span></th>");
                    Output.WriteLine("<th width=\"10px\">&nbsp;</th>");
                    Output.WriteLine("<th align=\"left\" width=\"170px\"><span style=\"color: White\">DATE MODIFIED</span></th>");
                    Output.WriteLine("<th align=\"left\" width=\"180px\"><span style=\"color: White\">TYPE</span></th>");
                    Output.WriteLine("<th width=\"10px\">&nbsp;</th>");
                    Output.WriteLine("<th align=\"right\"><span style=\"color: White\">SIZE</span></th>");
                    Output.WriteLine("</tr>");

                    // Now add all the information
                    foreach (SobekFileSystem_FileInfo thisFile in sortedFiles.Values)
                    {
                        Add_File_HTML(thisFile, Output, url, true);
                    }

                    // FInish the table
                    Output.WriteLine("</table>");
                }
                Output.WriteLine("</blockquote>");
                Output.WriteLine("<br />");
            }
            catch
            {
                Output.WriteLine("<br /><center><strong>UNABLE TO PULL DIRECTORY INFORMATION</strong></center><br />");
            }

            Output.WriteLine("  </td>");
            Output.WriteLine("  <!-- END DIRECTORY VIEWER OUTPUT -->");
        }