Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = OSRequest.GetQueryString("action");

            if (!string.IsNullOrEmpty(_action) && _action == OSEnums.ActionEnum.Edit.ToString())
            {
                this.action = OSEnums.ActionEnum.Edit.ToString();//修改类型
                this.id     = OSRequest.GetQueryInt("id");
                if (this.id == 0)
                {
                    JscriptMsg("传输参数不正确!", "back", "Error");
                    return;
                }
                if (!new BLL.contents.article_attribute_field().Exists(this.id))
                {
                    JscriptMsg("记录不存在或已被删除!", "back", "Error");
                    return;
                }
            }
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("attribute_field", OSEnums.ActionEnum.View.ToString());                                                                             //检查权限
                dlIsPassWord.Visible = dlIsHtml.Visible = dlEditorType.Visible = dlDataType.Visible
                                                                                     = dlDataLength.Visible = dlDataPlace.Visible = dlItemOption.Visible = false; //隐藏相应控件
                if (action == OSEnums.ActionEnum.Edit.ToString())                                                                                                 //修改
                {
                    ShowInfo(this.id);
                }
            }
        }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = OSRequest.GetQueryString("action");

            if (!string.IsNullOrEmpty(_action) && _action == OSEnums.ActionEnum.Edit.ToString())
            {
                this.action = OSEnums.ActionEnum.Edit.ToString();//修改类型
                this.id     = OSRequest.GetQueryInt("id", 0);
                if (this.id < 1)
                {
                    PageErrorMsg("传输参数不正确");
                }
                if (!new BLL.plugins.advert().Exists(this.id))
                {
                    PageErrorMsg("信息不存在或已被删除");
                }
            }
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("advert", OSEnums.ActionEnum.View.ToString()); //检查权限
                if (action == OSEnums.ActionEnum.Edit.ToString())            //修改
                {
                    ShowInfo(this.id);
                }
            }
        }
Beispiel #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = OSRequest.GetQueryString("action");

            if (!string.IsNullOrEmpty(_action) && _action == OSEnums.ActionEnum.Edit.ToString())
            {
                this.action = OSEnums.ActionEnum.Edit.ToString();                //修改类型
                this.id     = OSRequest.GetQueryInt("id");
                if (this.id == 0)
                {
                    JscriptMsg("传输参数不正确!", "back", "Error");
                    return;
                }
                if (!new BLL.users.users().Exists(this.id))
                {
                    JscriptMsg("信息不存在或已被删除!", "back", "Error");
                    return;
                }
            }
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("user_list", OSEnums.ActionEnum.View.ToString()); //检查权限
                TreeBind("is_lock=0");                                          //绑定类别
                groupId             = string.IsNullOrEmpty(ddlGroupId.SelectedValue.ToString()) ? "1" : ddlGroupId.SelectedValue.ToString();
                txtUserName.Text    = Utils.GetUserNumber(groupId);
                txtUserName.Enabled = false;
                if (action == OSEnums.ActionEnum.Edit.ToString())                 //修改
                {
                    ShowInfo(this.id);
                    txtUserName.Visible = true;
                }
                groupId = string.IsNullOrEmpty(ddlGroupId.SelectedValue.ToString()) ? "1" : ddlGroupId.SelectedValue.ToString();
            }
        }
Beispiel #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = OSRequest.GetQueryString("action");

            if (!string.IsNullOrEmpty(_action) && _action == OSEnums.ActionEnum.Edit.ToString())
            {
                this.action = OSEnums.ActionEnum.Edit.ToString();//修改类型
                this.id     = OSRequest.GetQueryInt("id");
                if (this.id == 0)
                {
                    PageErrorMsg("传输参数不正确");
                }
                if (!new BLL.configs.mail_template().Exists(this.id))
                {
                    PageErrorMsg("记录不存在或已被删除");
                }
            }
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("user_mail_template", OSEnums.ActionEnum.View.ToString()); //检查权限
                if (action == OSEnums.ActionEnum.Edit.ToString())                        //修改
                {
                    ShowInfo(this.id);
                }
            }
        }
Beispiel #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = OSRequest.GetQueryString("action");

            if (!string.IsNullOrEmpty(_action) && _action == OSEnums.ActionEnum.Edit.ToString())
            {
                this.action = OSEnums.ActionEnum.Edit.ToString();//修改类型
                this.id     = OSRequest.GetQueryInt("id");
                if (this.id == 0)
                {
                    PageErrorMsg("传输参数不正确");
                }
                if (!new BLL.plugins.advert_banner().Exists(this.id))
                {
                    PageErrorMsg("信息不存在或已被删除");
                }
            }
            else
            {
                this.aid = OSRequest.GetQueryInt("aid");
            }
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("advert", OSEnums.ActionEnum.View.ToString()); //检查权限
                TreeBind();                                                  //绑定广告位
                if (action == OSEnums.ActionEnum.Edit.ToString())            //修改
                {
                    ShowInfo(this.id);
                }
                else if (this.aid > 0)
                {
                    ddlAdvertId.SelectedValue = this.aid.ToString();
                }
            }
        }
Beispiel #6
0
        private void RptBind(string _strWhere, string _orderby)
        {
            this.page = OSRequest.GetQueryInt("page", 1);
            this.ddlProperty.SelectedValue = this.property;
            this.txtKeywords.Text          = this.keywords;
            //图表或列表显示
            BLL.contents.article bll = new BLL.contents.article();
            switch (this.prolistview)
            {
            case "Txt":
                this.rptList1.Visible    = false;
                this.rptList2.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
                this.rptList2.DataBind();
                break;

            default:
                this.rptList2.Visible    = false;
                this.rptList1.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
                this.rptList1.DataBind();
                break;
            }
            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("article_list.aspx", "category_id={0}&keywords={1}&property={2}&page={3}",
                                              category_id.ToString(), this.keywords, this.property, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
Beispiel #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = OSRequest.GetQueryString("action");

            this.id = OSRequest.GetQueryInt("id");

            if (!string.IsNullOrEmpty(_action) && _action == OSEnums.ActionEnum.Edit.ToString())
            {
                this.action = OSEnums.ActionEnum.Edit.ToString();//修改类型
                if (this.id == 0)
                {
                    JscriptMsg("传输参数不正确!", "back", "Error");
                    return;
                }
                if (!new BLL.managers.manager_role().Exists(this.id))
                {
                    JscriptMsg("角色不存在或已被删除!", "back", "Error");
                    return;
                }
            }
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("manager_role", OSEnums.ActionEnum.View.ToString()); //检查权限
                RoleTypeBind();                                                    //绑定角色类型
                NavBind();                                                         //绑定导航
                if (action == OSEnums.ActionEnum.Edit.ToString())                  //修改
                {
                    ShowInfo(this.id);
                }
            }
        }
Beispiel #8
0
        public void ProcessRequest(HttpContext context)
        {
            BLL.contents.article_category   bll   = new BLL.contents.article_category();
            Model.contents.article_category model = new Model.contents.article_category();
            int id   = OSRequest.GetQueryInt("id", -2);
            int type = OSRequest.GetQueryInt("type", -2);   //0上 ;1下

            model = bll.GetModel(id);
            DataTable dt_sx = bll.GetList(0, "parent_id=" + model.parent_id, "sort_id asc,id desc").Tables[0];

            if (dt_sx.Rows != null && dt_sx.Rows.Count > 0)
            {
                for (int i = 0; i < dt_sx.Rows.Count; i++)
                {
                    if (Convert.ToInt32(dt_sx.Rows[i]["ID"]) == id)
                    {
                        if (type == 1)
                        {
                            if ((i + 1) < dt_sx.Rows.Count)
                            {
                                int newId = Convert.ToInt32(dt_sx.Rows[i + 1]["ID"]);
                                //位置互换
                                bll.UpdateField(newId, "sort_id=" + model.sort_id + "");
                                bll.UpdateField(id, "sort_id=" + (bll.GetModel(newId).sort_id + 1) + "");
                                context.Response.Write("OK");
                            }
                            else
                            {
                                context.Response.Write("down");
                            }
                        }
                        else if (type == 0)
                        {
                            if ((i - 1) >= 0)
                            {
                                int newId = Convert.ToInt32(dt_sx.Rows[i - 1]["ID"]);
                                //位置互换
                                bll.UpdateField(newId, "sort_id=" + model.sort_id + "");
                                bll.UpdateField(id, "sort_id=" + (bll.GetModel(newId).sort_id - 1) + "");
                                context.Response.Write("OK");
                            }
                            else
                            {
                                context.Response.Write("up");
                            }
                        }
                        else
                        {
                            context.Response.Write("参数错误");
                        }
                    }
                }
            }
        }
Beispiel #9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ChkAdminLevel("user_list", OSEnums.ActionEnum.View.ToString()); //检查权限
            this.group_id = OSRequest.GetQueryInt("group_id");
            this.keywords = OSRequest.GetQueryString("keywords");

            this.pageSize = GetPageSize(10); //每页数量
            if (!Page.IsPostBack)
            {
                TreeBind("is_lock=0"); //绑定类别
                RptBind("id>0" + CombSqlTxt(this.group_id, this.keywords), "reg_time desc,id desc");
            }
        }
Beispiel #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.aid      = OSRequest.GetQueryInt("aid");
            this.keywords = OSRequest.GetQueryString("keywords");

            this.pageSize = GetPageSize(10); //每页数量
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("advert", OSEnums.ActionEnum.View.ToString()); //检查权限
                TreeBind();                                                  //绑定广告位
                RptBind("id>0" + CombSqlTxt(this.aid, this.keywords), "is_lock asc,sort_id asc,add_time desc");
            }
        }
Beispiel #11
0
        private void RptBind(string _strWhere, string _orderby)
        {
            this.page             = OSRequest.GetQueryInt("page", 1);
            this.txtKeywords.Text = this.keywords;
            BLL.plugins.link bll = new BLL.plugins.link();
            this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
            this.rptList.DataBind();
            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("list.aspx", "keywords={0}&page={1}", this.keywords, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
        private void RptBind(string _strWhere, string _orderby)
        {
            this.page = OSRequest.GetQueryInt("page", 1);
            this.ddlControlType.SelectedValue = this.control_type;
            this.txtKeywords.Text             = this.keywords;
            BLL.contents.article_attribute_field bll = new BLL.contents.article_attribute_field();
            this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("attribute_field_list.aspx", "control_type={0}&keywords={1}&page={2}", this.control_type, this.keywords, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
Beispiel #13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.id = OSRequest.GetQueryInt("id", 0);
            if (this.id < 1)
            {
                PageErrorMsg("传输参数不正确");
            }

            if (!new BLL.plugins.advert().Exists(this.id))
            {
                PageErrorMsg("信息不存在或已被删除");
            }
            if (!Page.IsPostBack)
            {
                model = new BLL.plugins.advert().GetModel(id);
            }
        }
Beispiel #14
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.id = OSRequest.GetQueryInt("id");
     if (this.id == 0)
     {
         PageErrorMsg("传输参数不正确");
     }
     if (!new BLL.plugins.feedback().Exists(this.id))
     {
         PageErrorMsg("记录不存在或已被删除");
     }
     if (!Page.IsPostBack)
     {
         ChkAdminLevel("feedback", OSEnums.ActionEnum.View.ToString()); //检查权限
         ShowInfo(this.id);
     }
 }
Beispiel #15
0
        private void RptBind(string _strWhere, string _orderby)
        {
            this.page             = OSRequest.GetQueryInt("page", 1);
            this.txtKeywords.Text = this.keywords;
            if (this.aid > 0)
            {
                this.ddlAdvertId.SelectedValue = this.aid.ToString();
            }
            BLL.plugins.advert_banner bll = new BLL.plugins.advert_banner();
            this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
            this.rptList.DataBind();
            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("bar_list.aspx", "aid={0}&keywords={1}&page={2}", this.aid.ToString(), this.keywords, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
Beispiel #16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = OSRequest.GetQueryString("action");

            this.channel_id = OSRequest.GetQueryInt("channel_id");

            if (this.channel_id == 0)
            {
                PageErrorMsg("频道参数不正确");
            }

            if (!string.IsNullOrEmpty(_action) && _action == OSEnums.ActionEnum.Edit.ToString())
            {
                this.action = OSEnums.ActionEnum.Edit.ToString();//修改类型
                if (this.id == 0)
                {
                    PageErrorMsg("传输参数不正确");
                }
                if (!new BLL.contents.article_category().Exists(this.id))
                {
                    PageErrorMsg("类别不存在或已被删除");
                }
            }
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("category", OSEnums.ActionEnum.View.ToString()); //检查权限
                TreeBind(this.channel_id);                                     //绑定类别
                FieldBind();                                                   //绑定扩展字段
                if (action == OSEnums.ActionEnum.Edit.ToString())              //修改
                {
                    ShowInfo(this.id);
                }
                else
                {
                    if (this.id > 0)
                    {
                        this.ddlParentId.SelectedValue = this.id.ToString();
                    }
                    txtCallIndex.Attributes.Add("ajaxurl", "../../ashx/admin_ajax.ashx?action=navigation_validate");
                }
            }
        }
Beispiel #17
0
        private void delete_category(HttpContext context)
        {
            //取得管理员登录信息
            Model.managers.manager adminInfo = new Web.UI.ManagePage().GetAdminInfo();
            if (adminInfo == null)
            {
                context.Response.Write("{\"status\": 0, \"msg\": \"未登录或已超时,请重新登录!\"}");
                return;
            }
            int category_id = OSRequest.GetQueryInt("category_id");

            if (category_id == 0)
            {
                context.Response.Write("{\"status\": 0, \"msg\": \"参数错误!\"}");
                return;
            }
            BLL.contents.article_category bll = new BLL.contents.article_category();
            new BLL.managers.manager_log().Add(adminInfo.id, adminInfo.user_name, OSEnums.ActionEnum.Edit.ToString(), "删除栏目:" + bll.GetTitle(category_id)); //记录日志
            bll.Delete(category_id);
            context.Response.Write("{\"status\": 1, \"msg\": \"栏目删除成功!\"}");
        }
Beispiel #18
0
        public void ProcessRequest(HttpContext context)
        {
            int aid = OSRequest.GetQueryInt("id");

            //获得广告位的ID
            if (aid < 1)
            {
                context.Response.Write("document.write('错误提示,请勿提交非法字符!');");
                return;
            }

            //检查广告位是否存在
            BLL.plugins.advert abll = new BLL.plugins.advert();
            if (!abll.Exists(aid))
            {
                context.Response.Write("document.write('错误提示,该广告位不存在!');");
                return;
            }

            //取得该广告位详细信息
            Model.plugins.advert aModel = abll.GetModel(aid);

            //输出该广告位下的广告条,不显示未开始、过期、暂停广告
            BLL.plugins.advert_banner bbll = new BLL.plugins.advert_banner();
            DataSet ds = bbll.GetList("is_lock=0 and datediff(d,start_time,getdate())>=0 and datediff(d,end_time,getdate())<=0 and aid=" + aid);

            if (ds.Tables[0].Rows.Count < 1)
            {
                context.Response.Write("document.write('该广告位下暂无广告内容');");
                return;
            }

            //=================判断广告位类别,输出广告条======================

            //新增,取得站点配置信息
            Model.configs.siteconfig siteConfig = new BLL.configs.siteconfig().loadConfig();      //获得站点配置信息


            switch (aModel.type)
            {
            case 1:     //文字
                context.Response.Write("document.write('<ul>');\n");
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    //如果超出限制广告数量,则退出循环
                    if (i >= aModel.view_num)
                    {
                        break;
                    }
                    DataRow dr = ds.Tables[0].Rows[i];
                    context.Response.Write("document.write('<li>');");
                    context.Response.Write("document.write('<a title=\"" + dr["title"] + "\" target=\"" + aModel.target + "\" href=\"" + dr["link_url"] + "\">" + dr["title"] + "</a>');");
                    context.Response.Write("document.write('</li>');\n");
                }
                context.Response.Write("document.write('</ul>');\n");
                break;

            case 2:     //图片
                if (ds.Tables[0].Rows.Count == 1)
                {
                    DataRow dr = ds.Tables[0].Rows[0];
                    context.Response.Write("document.write('<a title=\"" + dr["title"] + "\" target=\"" + aModel.target + "\" href=\"" + dr["link_url"] + "\">');");
                    context.Response.Write("document.write('<img src=\"" + dr["file_path"] + "\" width=" + aModel.view_width + " height=" + aModel.view_height + " border=0 />');");
                    context.Response.Write("document.write('</a>');");
                }
                else
                {
                    context.Response.Write("document.write('<ul>');\n");
                    for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                    {
                        //如果超出限制广告数量,则退出循环
                        if (i >= aModel.view_num)
                        {
                            break;
                        }
                        DataRow dr = ds.Tables[0].Rows[i];
                        context.Response.Write("document.write('<li>');");
                        context.Response.Write("document.write('<a title=\"" + dr["title"] + "\" target=\"" + aModel.target + "\" href=\"" + dr["link_url"] + "\">');");
                        context.Response.Write("document.write('<img src=\"" + dr["file_path"] + "\" width=" + aModel.view_width + " height=" + aModel.view_height + " border=0 />');");
                        context.Response.Write("document.write('</a>');\n");
                        context.Response.Write("document.write('</li>');\n");
                    }
                    context.Response.Write("document.write('</ul>');\n");
                }
                break;

            case 3:     //幻灯片
                StringBuilder picTitle = new StringBuilder();
                StringBuilder picUrl   = new StringBuilder();
                StringBuilder picLink  = new StringBuilder();
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    //如果超出限制广告数量,则退出循环
                    if (i >= aModel.view_num)
                    {
                        break;
                    }
                    DataRow dr = ds.Tables[0].Rows[i];
                    picUrl.Append(dr["file_path"].ToString());
                    picLink.Append(dr["link_url"].ToString());
                    if (i < ds.Tables[0].Rows.Count - 1)
                    {
                        picUrl.Append("|");
                        picLink.Append("|");
                    }
                }
                context.Response.Write("document.write('<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" d=scriptmain name=scriptmain codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"" + aModel.view_width + "\" height=\"" + aModel.view_height + "\">');\n");
                context.Response.Write("document.write('<param name=\"movie\" value=\"/plugins/focus.swf?width=" + aModel.view_width + "&height=" + aModel.view_height + "&bigSrc=" + picUrl + "&href=" + picLink + "\">');\n");
                context.Response.Write("document.write('<param name=\"quality\" value=\"high\">');\n");
                context.Response.Write("document.write('<param name=\"loop\" value=\"false\">');\n");
                context.Response.Write("document.write('<param name=\"menu\" value=\"false\">');\n");
                context.Response.Write("document.write('<param name=\"wmode\" value=\"transparent\">');\n");
                context.Response.Write("document.write('<embed src=\"/plugins/focus.swf?width=" + aModel.view_width + "&height=" + aModel.view_height + "&bigSrc=" + picUrl + "&href=" + picLink + "\" width=\"" + aModel.view_width + "\" height=\"" + aModel.view_height + "\" loop=\"false\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" menu=\"false\"></embed>');\n");
                context.Response.Write("document.write('</object>');\n");
                break;

            case 4:     //动画
                if (ds.Tables[0].Rows.Count == 1)
                {
                    DataRow dr = ds.Tables[0].Rows[0];
                    context.Response.Write("document.write('<object classid=\"clsid:D27CDB6E-AE6D-11CF-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0\" width=\"" + aModel.view_width + "\" height=\"" + aModel.view_height + "\">');\n");
                    context.Response.Write("document.write('<param name=\"movie\" value=\"" + dr["file_path"] + "\">');\n");
                    context.Response.Write("document.write('<param name=\"quality\" value=\"high\">');\n");
                    context.Response.Write("document.write('<param name=\"wmode\" value=\"transparent\">');\n");
                    context.Response.Write("document.write('<param name=\"menu\" value=\"false\">');\n");
                    context.Response.Write("document.write('<embed src=\"" + dr["file_path"] + "\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + aModel.view_width + "\" height=\"" + aModel.view_height + "\" quality=\"High\" wmode=\"transparent\">');\n");
                    context.Response.Write("document.write('</embed>');\n");
                    context.Response.Write("document.write('</object>');\n");
                }
                else
                {
                    context.Response.Write("document.write('<ul>');\n");
                    for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                    {
                        //如果超出限制广告数量,则退出循环
                        if (i >= aModel.view_num)
                        {
                            break;
                        }
                        DataRow dr = ds.Tables[0].Rows[i];
                        context.Response.Write("document.write('<li>');");
                        context.Response.Write("document.write('<object classid=\"clsid:D27CDB6E-AE6D-11CF-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0\" width=\"" + aModel.view_width + "\" height=\"" + aModel.view_height + "\">');\n");
                        context.Response.Write("document.write('<param name=\"movie\" value=\"" + dr["file_path"] + "\">');\n");
                        context.Response.Write("document.write('<param name=\"quality\" value=\"high\">');\n");
                        context.Response.Write("document.write('<param name=\"wmode\" value=\"transparent\">');\n");
                        context.Response.Write("document.write('<param name=\"menu\" value=\"false\">');\n");
                        context.Response.Write("document.write('<embed src=\"" + dr["file_path"] + "\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + aModel.view_width + "\" height=\"" + aModel.view_height + "\" quality=\"High\" wmode=\"transparent\">');\n");
                        context.Response.Write("document.write('</embed>');\n");
                        context.Response.Write("document.write('</object>');\n");
                        context.Response.Write("document.write('</li>');\n");
                    }
                    context.Response.Write("document.write('</ul>');\n");
                }
                break;

            case 5:    //视频
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    //如果超出限制广告数量,则退出循环
                    if (i >= 1)
                    {
                        break;
                    }
                    DataRow dr = ds.Tables[0].Rows[i];
                    context.Response.Write("document.write('<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0\" width=" + aModel.view_width + " height=" + aModel.view_height + " viewastext>');\n");
                    context.Response.Write("document.write('<param name=\"movie\" value=\"/plugins/player.swf\" />');\n");
                    context.Response.Write("document.write('<param name=\"quality\" value=\"high\" />');\n");
                    context.Response.Write("document.write('<param name=\"allowFullScreen\" value=\"true\" />');\n");
                    context.Response.Write("document.write('<param name=\"FlashVars\" value=\"vcastr_file=" + dr["file_path"].ToString() + "&LogoText=www.auto.cn&BarTransparent=30&BarColor=0xffffff&IsAutoPlay=1&IsContinue=1\" />');\n");
                    context.Response.Write("document.write('</object>');\n");
                }
                break;

            case 6:    //代码
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    //如果超出限制广告数量,则退出循环
                    if (i >= 1)
                    {
                        break;
                    }
                    DataRow       dr = ds.Tables[0].Rows[i];
                    StringBuilder sb = new StringBuilder(dr["content"].ToString());
                    sb.Replace("&lt;", "<");
                    sb.Replace("&gt;", ">");
                    sb.Replace("\"", "'");
                    context.Response.Write("document.write(\"" + sb.ToString() + "\")");
                }
                break;
            }
        }