Exemple #1
0
 /// <summary>
 /// 根据调用标识取得内容页内容
 /// </summary>
 /// <param name="call_index">调用标识</param>
 /// <returns></returns>
 protected string get_content(string call_index)
 {
     if (string.IsNullOrEmpty(call_index))
         return "";
     BLL.article bll = new BLL.article();
     if (bll.ContentExists(call_index))
     {
         return bll.GetContentModel(call_index).content;
     }
     return "";
 }
Exemple #2
0
 /// <summary>
 /// 根据调用标识取得内容页内容
 /// </summary>
 /// <param name="call_index">调用标识</param>
 /// <returns></returns>
 protected string get_content(string call_index)
 {
     if (string.IsNullOrEmpty(call_index))
     {
         return("");
     }
     BLL.article bll = new BLL.article();
     if (bll.ContentExists(call_index))
     {
         return(bll.GetContentModel(call_index).content);
     }
     return("");
 }
Exemple #3
0
 /// <summary>
 /// 重写虚方法,此方法将在Init事件前执行
 /// </summary>
 protected override void ShowPage()
 {
     id   = DTRequest.GetQueryInt("id");
     page = DTRequest.GetQueryString("page");
     BLL.article bll = new BLL.article();
     if (id > 0)
     {
         if (!bll.Exists(id))
         {
             HttpContext.Current.Response.Redirect(config.webpath + "error.aspx?msg=" + Utils.UrlEncode("出錯啦,您要瀏覽的頁面不存在或已刪除啦!"));
             return;
         }
         model = bll.GetContentModel(id);
     }
     else if (!string.IsNullOrEmpty(page))
     {
         if (!bll.ContentExists(page))
         {
             HttpContext.Current.Response.Redirect(config.webpath + "error.aspx?msg=" + Utils.UrlEncode("出錯啦,您要瀏覽的頁面不存在或已刪除啦!"));
             return;
         }
         model = bll.GetContentModel(page);
     }
     else
     {
         Server.Transfer("error.aspx");
         return;
     }
     //浏览数+1
     bll.UpdateField(model.id, "click=click+1");
     //跳转URL
     if (model.link_url != null)
     {
         model.link_url = model.link_url.Trim();
     }
     if (!string.IsNullOrEmpty(model.link_url))
     {
         HttpContext.Current.Response.Redirect(model.link_url);
     }
 }
Exemple #4
0
 /// <summary>
 /// 重写虚方法,此方法将在Init事件前执行
 /// </summary>
 protected override void ShowPage()
 {
     id = DTRequest.GetQueryInt("id");
     page = DTRequest.GetQueryString("page");
     BLL.article bll = new BLL.article();
     BLL.sys_channel bll_channel = new BLL.sys_channel();
     if (id > 0)
     {
         if (!bll.Exists(id))
         {
             HttpContext.Current.Response.Redirect(config.webpath + "error.aspx?msg=" + Utils.UrlEncode("出错啦,您要浏览的页面不存在或已删除啦!"));
             return;
         }
         model = bll.GetContentModel(id);
     }
     else if (!string.IsNullOrEmpty(page))
     {
         if (!bll.ContentExists(page))
         {
             HttpContext.Current.Response.Redirect(config.webpath + "error.aspx?msg=" + Utils.UrlEncode("出错啦,您要浏览的页面不存在或已删除啦!"));
             return;
         }
         model = bll.GetContentModel(page);
     }
     else
     {
         Server.Transfer("error.aspx");
         return;
     }
     //浏览数+1
     bll.UpdateField(model.id, "click=click+1");
     //跳转URL
     if (model.link_url != null)
         model.link_url = model.link_url.Trim();
     if (!string.IsNullOrEmpty(model.link_url))
     {
         HttpContext.Current.Response.Redirect(model.link_url);
     }
     channel = bll_channel.GetModel(model.channel_id);
 }