コード例 #1
0
ファイル: FileController.cs プロジェクト: youmuyou/wojilu
        public void Download(int id)
        {
            FileItem f = FileItem.findById(id);

            FileItem.AddDownloads(f);

            int urlno = ctx.GetInt("url");

            if (urlno == 1 && strUtil.HasText(f.Url))
            {
                redirectUrl(f.Url);
            }
            else if (urlno == 2 && strUtil.HasText(f.Url2))
            {
                redirectUrl(f.Url2);
            }
            else if (urlno == 3 && strUtil.HasText(f.Url3))
            {
                redirectUrl(f.Url3);
            }

            echoRedirect("网址不存在", to(Show, id));
        }