public void Show(int id) { FileItem f = FileItem.findById(id); if (f == null) { echo(lang("exDataNotFound")); return; } ctx.Page.Title = f.Title; bind("f", f); bindTopList(f.CategoryId); set("location", Location.GetFile(ctx, f)); set("categories", Location.GetSubCategories(ctx, FileCategory.GetById(f.CategoryId))); String url = to(Download, id) + "?url="; String link1 = ""; String link2 = ""; String link3 = ""; if (strUtil.HasText(f.Url)) { link1 = string.Format("<a href=\"{0}\">下载网址1</a>", url + 1); } if (strUtil.HasText(f.Url2)) { link2 = string.Format("<a href=\"{0}\">下载网址2</a>", url + 2); } if (strUtil.HasText(f.Url3)) { link3 = string.Format("<a href=\"{0}\">下载网址3</a>", url + 3); } set("downloadLink1", link1); set("downloadLink2", link2); set("downloadLink3", link3); String previewPic = ""; if (f.HasPreviewPic()) { previewPic = string.Format("<br /><img src=\"{0}\" />", f.PreviewPicMedium); } set("previewPic", previewPic); bindComment(f); FileItem.AddHits(f); }