Ejemplo n.º 1
0
 /// <summary>
 /// ��ʼ���Ѿ��ϴ��ļ�(�޸�ʱʹ��)
 /// </summary>
 /// <param name="inputIds">�ϴ�ͼƬ��ż���</param>
 /// <param name="inputFiles">�ϴ�ͼƬ</param>
 /// <param name="maxAmount">�������</param>
 /// <param name="infoId">��ϢId</param>
 public static void InitUploadFile(ref string inputIds,ref string inputFiles,int maxAmount,long infoId, Model.AttachmentItem item)
 {
     string ids = "", files = "";
     if (infoId > 0)
     {
         DataTable dt = new XYECOM.Business.Attachment().GetDataTable(infoId, item, XYECOM.Model.UploadFileType.File);
         foreach (DataRow dr in dt.Rows)
         {
             ids += "" == ids ? dr["AT_ID"].ToString() : "|" + dr["AT_ID"].ToString();
             files += "" == files ?   Path.GetFileName(dr["AT_Path"].ToString()) : "|" + Path.GetFileName(dr["AT_Path"].ToString());
         }
     }
     inputIds = ids;
     inputFiles = files;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// ��ʼ���ļ��ϴ�
        /// </summary>
        /// <param name="page">��ǰҳ�������ֵΪthis</param>
        /// <param name="tableName">��Ŀ����Ӧ�ı�����</param>
        /// <param name="maxAmount">�������ϴ����ļ�����</param>
        /// <param name="id">��Ŀ���ݵ�id ������Ϊ0</param>
        private static void SetUpload(object page, Model.AttachmentItem item, string maxAmount, string iswatermark, Int64 id)
        {
            string ids = "", files = "";
            if (id > 0)
            {
                DataTable dt = new XYECOM.Business.Attachment().GetDataTable(id, item, XYECOM.Model.UploadFileType.Image);
                foreach (DataRow dr in dt.Rows)
                {
                    ids += "" == ids ? dr["AT_ID"].ToString() : "|" + dr["AT_ID"].ToString();
                    files += "" == files ? dr["S_URL"].ToString() + dr["AT_Path"].ToString() : "|" + dr["S_URL"].ToString() + dr["AT_Path"].ToString();
                }
            }

            BasePage objpage = (BasePage)page;
            objpage.tablename = Business.Attachment.GetDescTableName(item);
            objpage.maxamount = maxAmount;
            objpage.iswatermark = iswatermark;
            objpage.ids = ids;
            objpage.files = files;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// д�����ݿ�
        /// </summary>
        /// <param name="tabName">Ŀ�����</param>
        /// <param name="id">���Id</param>
        /// <param name="fileFormat">�洢��ʽ</param>
        /// <param name="fileType">�ļ�����</param>
        /// <param name="fileURL">�����</param>
        /// <param name="sconfigid">���������</param>
        /// <returns>Ӱ������</returns>
        private static Int64 SaveDataBase(string tabName, Int64 id, string fileFormat, Model.UploadFileType fileType,string fileURL, int sconfigid)
        {
            XYECOM.Model.AttachmentInfo fileinfo = new XYECOM.Model.AttachmentInfo();

            Int64 atid = 0;

            if (0 < id)
            {
                fileinfo = new XYECOM.Business.Attachment().GetItem(id);
                if (fileinfo == null)
                {
                    fileinfo = new XYECOM.Model.AttachmentInfo();
                    id = 0;
                }
            }

            fileinfo.At_FileFormat = fileFormat;

            if (0 < id)
            {
                //ɾ��ԭ��ͼƬ
                XYECOM.Model.ServerInfo ffileconfig = new XYECOM.Business.Server().GetItem(fileinfo.S_ID);
                if (null != ffileconfig)
                {
                    string filepath = ffileconfig.S_Path + fileinfo.At_Path;
                    if (File.Exists(filepath))
                        File.Delete(filepath);

                    foreach (string ifile in fileinfo.SmallImg.Images)
                    {
                        filepath = ffileconfig.S_Path + ifile;
                        if (File.Exists(filepath))
                            File.Delete(filepath);
                    }
                }
                fileinfo.S_ID = sconfigid;
                fileinfo.At_Path = fileURL;
                fileinfo.ThumbnailImg = "";
                fileinfo.At_ID = id;
                fileinfo.At_Index = 0;
                new XYECOM.Business.Attachment().Update(fileinfo);
            }
            else
            {
                fileinfo.At_Path = fileURL;
                fileinfo.DescTabID = -1;
                fileinfo.At_FileType = fileType == Model.UploadFileType.Image?"image":"file";
                fileinfo.DescTabName = tabName;
                fileinfo.S_ID = sconfigid;
                fileinfo.At_Remark = "";
                new XYECOM.Business.Attachment().Insert(fileinfo, out atid);
            }
            return atid;
        }
Ejemplo n.º 4
0
        /// <summary>
        /// �����ϴ��ļ���Ϣ���������ݿ⣩
        /// </summary>
        /// <param name="id">��ϢId</param>
        private static void SavaUploadFile(Int64 id)
        {
            string DelIDs = XYECOM.Core.XYRequest.GetFormString("_Upload_DelIDs");
            string UpIDs = XYECOM.Core.XYRequest.GetFormString("_Upload_UpIDs");
            string TableName = XYECOM.Core.XYRequest.GetFormString("_Upload_TabName");

            XYECOM.Business.Attachment obj = new XYECOM.Business.Attachment();
            //ɾ����Ϣ
            if ("" != DelIDs)
            {
                obj.Delete(DelIDs);

                //ɾ������ʱͬʱ���¸�����Ӧ����Ϣ�� IsHasImage �ֶε�ֵ
                //IsHasImage �ֶα�ʾ��Ϣ�Ƿ����ͼƬ
                if (id > 0)
                    obj.UpdateInfoIsHasImage(TableName, id);
            }
            //������Ϣ
            if ("" != UpIDs)
            {
                obj.Update(UpIDs, id);
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// �޸���Ϣ����ͼƬindex
        /// </summary>
        /// <param name="tableName">Ŀ�����</param>
        /// <param name="id">���</param>
        /// <param name="IsCreateThumbnailImg">�Ƿ񴴽�����ͼ</param>
        private static void UpdateInex(string tableName, Int64 id, bool IsCreateThumbnailImg)
        {
            XYECOM.Business.Attachment obj = new XYECOM.Business.Attachment();
            XYECOM.Model.AttachmentInfo info = XYECOM.Business.Attachment.GetTop1Info(tableName, id.ToString());
            //û������ͼ������Ϣ���˳�
            if (null == info) return;
            //�Ѿ���������ͼ���Ƴ�
            if ("" != info.ThumbnailImg) return;

            if (IsCreateThumbnailImg)
            {
                //��������ͼ
                CreateThumbnailImgByInfo(info);
            }

            info.At_Index = 1;
            obj.Update(info);
        }
Ejemplo n.º 6
0
 /// <summary>
 /// ��̨ͼƬ������ʼ��
 /// </summary>
 /// <param name="inputids">�ϴ�ͼƬ��ż���</param>
 /// <param name="inputfiles">�ϴ����ļ�</param>
 /// <param name="tableName">Ŀ�����</param>
 /// <param name="maxAmount">�������</param>
 /// <param name="iswatermark">�Ƿ�����</param>
 /// <param name="id">���</param>
 private static void SetUpload(ref string inputids, ref string inputfiles, Model.AttachmentItem item, string maxAmount, string iswatermark, Int64 id)
 {
     string ids = "", files = "";
     if (id > 0)
     {
         DataTable dt = new XYECOM.Business.Attachment().GetDataTable(id, item, XYECOM.Model.UploadFileType.Image);
         foreach (DataRow dr in dt.Rows)
         {
             ids += "" == ids ? dr["AT_ID"].ToString() : "|" + dr["AT_ID"].ToString();
             files += "" == files ? dr["S_URL"].ToString() + dr["AT_Path"].ToString() : "|" + dr["S_URL"].ToString() + dr["AT_Path"].ToString();
         }
     }
     inputids = ids;
     inputfiles = files;
 }
Ejemplo n.º 7
0
        public void ProcessRequest(HttpContext c)
        {
            context = c;

            string ip = XYECOM.Core.XYRequest.GetIP();

            //IP判断
            if (XYECOM.Configuration.Security.Instance._ForbidIP.Contains(ip))
            {
                context.Response.Write("-禁止访问-");
                context.Response.End();
            }

            string strId = XYECOM.Core.XYRequest.GetQueryString("f");

            strId = strId.Substring(37,strId.Length-40);

            long Id = XYECOM.Core.MyConvert.GetInt64(strId);

            if (Id <= 0)
            {
                context.Response.Write("-无效参数-");
                context.Response.End();
            }

            XYECOM.Model.AttachmentInfo info = new XYECOM.Business.Attachment().GetItem(Id);

            if (null == info)
            {
                context.Response.Write("-文件不存在或已经被删除-");
                context.Response.End();
            }

            //XYECOM.Model.ServerInfo serverInfo = new XYECOM.Business.Server().GetItem(info.S_ID);

            string filePath = context.Server.MapPath("/upload/" + info.At_Path);

            System.IO.FileInfo fileInfo = new System.IO.FileInfo(filePath);

            if (!fileInfo.Exists)
            {
                context.Response.Write("-文件不存在或已经被删除-");
                context.Response.End();
            }

            try
            {
                context.Response.Clear();
                context.Response.ClearHeaders();
                context.Response.BufferOutput = false;

                context.Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(System.IO.Path.GetFileName(filePath), System.Text.Encoding.UTF8));
                context.Response.AppendHeader("Content-Length", fileInfo.Length.ToString());
                context.Response.ContentType = "application/octet-stream";
                context.Response.WriteFile(filePath);
                context.Response.Flush();
                context.Response.End();
            }
            catch
            {
                context.Response.Write("-下载失败!-");
                context.Response.End();
            }
        }
Ejemplo n.º 8
0
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            XYECOM.Business.Attachment bll = new XYECOM.Business.Attachment();

            string ids = "";

            foreach (GridViewRow GR in this.gvList.Rows)
            {
                if (((CheckBox)(GR.FindControl("chkExport"))).Checked == true)
                {
                    ids += "," + this.gvList.DataKeys[GR.DataItemIndex].Value.ToString();
                }
            }

            if (ids.IndexOf(",") == 0)
            {
                ids = ids.Substring(1);
                int i = bll.Delete(ids);
                if (i >= 0)
                {
                    BindData();
                }
                else
                {
                    this.ClientScript.RegisterClientScriptBlock(GetType(), "01", "<script>sAlert(\"ɾ��ʧ�ܣ�\")</script>");
                }
            }
        }
Ejemplo n.º 9
0
        protected void btnDeleteAllTemp_Click(object sender, EventArgs e)
        {
            Business.Attachment bll = new XYECOM.Business.Attachment();

            int result = bll.DeleteAllTemp();

            if (result > 0)
                Alert("��ɾ����������" + result + "��", "", true);
            else
                Alert("����������", "", true);

            DataBind();
        }
Ejemplo n.º 10
0
        /// <summary>
        /// �滻��ǩ�ֶ�Ϊ��ʵ����
        /// </summary>
        /// <param name="index">������</param>
        /// <param name="labelFlagName">��ǩ��ʶ����</param>
        /// <param name="labelBody">��ǩ����</param>
        /// <param name="dataRow">������</param>
        /// <param name="queryParam">��ǩ��ʽ����</param>
        /// <returns></returns>
        public string ReplaceField(int index, string labelFlagName, string labelBody, DataRow dataRow, LabelQueryParameterInfo queryParam)
        {
            List<XYECOM.Configuration.ModuleItemInfo> moduleItems = new List<XYECOM.Configuration.ModuleItemInfo>();

            labelFlagName = labelFlagName.ToLower().Trim();

            labelBody = labelBody.Replace("{i}", index.ToString());

            #region  ϵͳ�ֶ�
            if (labelBody.Contains("{SY:XY_WebURL}"))
            {
                labelBody = labelBody.Replace("{SY:XY_WebURL}", webInfo.WebDomain);
            }
            if (labelBody.Contains("{SY:XY_TemplatePath}"))
            {
                labelBody = labelBody.Replace("{SY:XY_TemplatePath}", templateInfo.Path);
            }
            //if (str.IndexOf("{SY:XY_Coptright}") > 0)
            //{
            //    str = str.Replace("{SY:XY_Coptright}", "XYECS!b2b");
            //}
            if (labelBody.Contains("{SY:XY_Version}"))
            {
                labelBody = labelBody.Replace("{SY:XY_Version}", System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Web.HttpContext.Current.Server.MapPath("/bin/XYECOM.Web.dll")).FileVersion);
            }
            #endregion

            #region ��������

            if (labelBody.Contains("{WI:XY_URL}"))
            {
                if (IsHaveColumn(dataRow, "FL_URL"))
                    labelBody = labelBody.Replace("{WI:XY_URL}", dataRow["FL_URL"].ToString());
            }

            if (labelBody.Contains("{WI:XY_ALT}"))
            {
                if (queryParam.IsFriendLinkAlt)
                {
                    if (IsHaveColumn(dataRow, "FL_Alt"))
                        labelBody = labelBody.Replace("{WI:XY_ALT}", dataRow["FL_Alt"].ToString());
                }
                else
                {
                    labelBody = labelBody.Replace("{WI:XY_ALT}", "");
                }
            }

            if (labelBody.Contains("{WI:XY_SRC}"))
            {
                if (dataRow["FL_Font"].ToString() == "Image")
                {
                    if (IsHaveColumn(dataRow, "At_Path"))
                        labelBody = labelBody.Replace("{WI:XY_SRC}", dataRow["S_URL"].ToString() + dataRow["At_Path"].ToString());
                }
                else
                {
                    if (IsHaveColumn(dataRow, "FL_Font"))
                        labelBody = labelBody.Replace("{WI:XY_SRC}", dataRow["FL_Font"].ToString());
                }
            }
            if (labelBody.Contains("{WI:XY_Font}"))
            {
                if (IsHaveColumn(dataRow, "FL_Font"))
                    labelBody = labelBody.Replace("{WI:XY_Font}", dataRow["FL_Font"].ToString());
            }

            #endregion

            #region ��Ѷ��Ŀ

            string allDomainName = "";
            if (labelBody.Contains("{NT:XY_Title}"))
            {
                if (IsHaveColumn(dataRow, "NT_Name"))
                    labelBody = labelBody.Replace("{NT:XY_Title}", dataRow["NT_Name"].ToString());
            }
            if (labelBody.Contains("{NT:XY_URL}"))
            {
                if (dataRow["DomainName"].ToString() != "")
                {
                    allDomainName = webInfo.GetSubDomain(dataRow["DomainName"].ToString());
                }
                if (dataRow["NT_TempletAddress"].ToString() != "")
                    labelBody = labelBody.Replace("{NT:XY_URL}", webInfo.WebDomain + "news/" + dataRow["NT_EnName"].ToString() + "/" + dataRow["NT_TempletAddress"].ToString().Substring(0, dataRow["NT_TempletAddress"].ToString().IndexOf('.')) + "." + webInfo.WebSuffix);
                else
                {
                    if (webInfo.IsBogusStatic)
                    {
                        if (webInfo.IsNewsDomain && dataRow["DomainName"].ToString() != "")
                        {
                            labelBody = labelBody.Replace("{NT:XY_URL}", allDomainName + "channel-" + dataRow["NT_ID"].ToString() + "." + webInfo.WebSuffix);
                        }
                        else
                        {
                            labelBody = labelBody.Replace("{NT:XY_URL}", webInfo.WebDomain + "news/channel-" + dataRow["NT_ID"].ToString() + "." + webInfo.WebSuffix);
                        }
                    }
                    else
                    {
                        if (webInfo.IsNewsDomain && dataRow["DomainName"].ToString() != "")
                        {
                            labelBody = labelBody.Replace("{NT:XY_URL}", allDomainName + "channel." + webInfo.WebSuffix + "?nt_id=" + dataRow["NT_ID"].ToString());
                        }
                        else
                        {
                            labelBody = labelBody.Replace("{NT:XY_URL}", webInfo.WebDomain + "news/channel." + webInfo.WebSuffix + "?nt_id=" + dataRow["NT_ID"].ToString());
                        }
                    }
                }
            }
            #endregion

            #region ������Ϣ
            if (labelFlagName.Equals("newslist") || labelFlagName.Equals("newspagelist"))
            {
                if (labelBody.Contains("{NS:XY_ID}"))
                    labelBody = labelBody.Replace("{NS:XY_ID}", dataRow["NS_ID"].ToString());

                if (labelBody.Contains("{NS:XY_TitleAll}"))
                {
                    string newsName = XYECOM.Business.FiltrateKeyWord.LeachKeyWord(dataRow["NS_NewsName"].ToString());

                    if (!dataRow["NS_TitleStyle"].ToString().Trim().Equals(""))
                    {
                        newsName = "<font style=" + dataRow["NS_TitleStyle"].ToString().Trim() + ">" + newsName + "</font>";
                    }

                    labelBody = labelBody.Replace("{NS:XY_TitleAll}", newsName);
                }

                if (labelBody.Contains("{NS:XY_Title}"))
                {
                    string newsName = XYECOM.Core.Utils.IsLength(queryParam.TitleFontNumbers, XYECOM.Business.FiltrateKeyWord.LeachKeyWord(dataRow["NS_NewsName"].ToString()));

                    if (!dataRow["NS_TitleStyle"].ToString().Trim().Equals(""))
                    {
                        newsName = "<font style=" + dataRow["NS_TitleStyle"].ToString().Trim() + ">" + newsName + "</font>";
                    }

                    labelBody = labelBody.Replace("{NS:XY_Title}", newsName);
                }

                if (labelBody.Contains("{NS:XY_TName}"))
                    labelBody = labelBody.Replace("{NS:XY_TName}", dataRow["NT_Name"].ToString());

                if (labelBody.Contains("{NS:XY_STName}"))
                    labelBody = labelBody.Replace("{NS:XY_STName}", dataRow["NT_NessName"].ToString());

                if (labelBody.Contains("{NS:XY_TURL}"))
                {
                    if (dataRow["DomainName"].ToString() != "")
                    {
                        allDomainName = webInfo.GetSubDomain(dataRow["DomainName"].ToString());
                    }
                    string channelId = dataRow["NT_ID"].ToString();
                    string subChannelFolder = dataRow["NT_TempletFolderAddress"].ToString().Trim();

                    if (!subChannelFolder.Equals("")) subChannelFolder = subChannelFolder + "/";

                    channelId = Core.Utils.RemoveStartComma(channelId);

                    channelId = channelId.Substring(0, channelId.IndexOf(','));

                    if (webInfo.IsBogusStatic)
                    {
                        if (webInfo.IsNewsDomain && dataRow["DomainName"].ToString() != "")
                        {
                            labelBody = labelBody.Replace("{NS:XY_TURL}", allDomainName + "channel-" + channelId + "." + webInfo.WebSuffix);
                        }
                        else
                        {
                            labelBody = labelBody.Replace("{NS:XY_TURL}", webInfo.WebDomain + "news/" + subChannelFolder + "channel-" + channelId + "." + webInfo.WebSuffix);
                        }
                    }
                    else
                    {
                        if (webInfo.IsNewsDomain && dataRow["DomainName"].ToString() != "")
                        {
                            labelBody = labelBody.Replace("{NS:XY_TURL}", allDomainName + "channel." + webInfo.WebSuffix + "?nt_id=" + channelId);
                        }
                        else
                        {
                            labelBody = labelBody.Replace("{NS:XY_TURL}", webInfo.WebDomain + "news/" + subChannelFolder + "channel." + webInfo.WebSuffix + "?nt_id=" + channelId);
                        }
                    }
                }
                if (labelBody.Contains("{NS:XY_CurtTitle}"))
                    labelBody = labelBody.Replace("{NS:XY_CurtTitle}", XYECOM.Business.FiltrateKeyWord.LeachKeyWord(dataRow["NS_TwoName"].ToString()));
                if (labelBody.Contains("{NS:XY_NaviContentAll}"))
                    labelBody = labelBody.Replace("{NS:XY_NaviContentAll}", XYECOM.Business.FiltrateKeyWord.LeachKeyWord(dataRow["NS_NewsLess"].ToString()));
                if (labelBody.Contains("{NS:XY_NaviContent}"))
                    labelBody = labelBody.Replace("{NS:XY_NaviContent}", XYECOM.Core.Utils.IsLength(queryParam.NewsLeadinFontNumber, XYECOM.Business.FiltrateKeyWord.LeachKeyWord(XYECOM.Core.Utils.RemoveHTML(dataRow["NS_NewsLess"].ToString()))));
                if (labelBody.Contains("{NS:XY_Content}"))
                    labelBody = labelBody.Replace("{NS:XY_Content}", XYECOM.Business.FiltrateKeyWord.LeachKeyWord(dataRow["NS_NewsNote"].ToString()));
                if (labelBody.Contains("{NS:XY_Author}"))
                    labelBody = labelBody.Replace("{NS:XY_Author}", dataRow["NS_NewsAuthor"].ToString());
                if (labelBody.Contains("{NS:XY_Source}"))
                    labelBody = labelBody.Replace("{NS:XY_Source}", dataRow["NS_NewsOrigin"].ToString());
                if (labelBody.Contains("{NS:XY_KeyWord}"))
                    labelBody = labelBody.Replace("{NS:XY_KeyWord}", XYECOM.Business.FiltrateKeyWord.LeachKeyWord(dataRow["NS_KeyWord"].ToString()));
                if (labelBody.Contains("{NS:XY_Date}"))
                {
                    if (queryParam.DateFormat != "")
                        labelBody = labelBody.Replace("{NS:XY_Date}", FormatDateTime(dataRow["NS_AddTime"].ToString(), queryParam.DateFormat));
                    else
                        labelBody = labelBody.Replace("{NS:XY_Date}", dataRow["NS_AddTime"].ToString());
                }
                if (labelBody.Contains("{NS:XY_Link}"))
                {
                    if (dataRow["DomainName"].ToString() != "")
                    {
                        allDomainName = webInfo.GetSubDomain(dataRow["DomainName"].ToString());
                    }
                    if (IsHaveColumn(dataRow, "NS_LinkAddress"))
                    {
                        if (dataRow["NS_LinkAddress"].ToString() != "")
                            labelBody = labelBody.Replace("{NS:XY_Link}", dataRow["NS_LinkAddress"].ToString());
                        else
                        {
                            string subChannelFolder = dataRow["NT_TempletFolderAddress"].ToString().Trim();
                            if (!subChannelFolder.Equals("")) subChannelFolder = subChannelFolder + "/";

                            if (webInfo.IsBogusStatic)
                                if (webInfo.IsNewsDomain && dataRow["DomainName"].ToString() != "")
                                {
                                    labelBody = labelBody.Replace("{NS:XY_Link}", allDomainName + "content-" + dataRow["NS_ID"].ToString() + "." + webInfo.WebSuffix);
                                }
                                else
                                {
                                    labelBody = labelBody.Replace("{NS:XY_Link}", webInfo.WebDomain + "news/" + subChannelFolder + "content-" + dataRow["NS_ID"].ToString() + "." + webInfo.WebSuffix);
                                }
                            else
                            {
                                if (webInfo.IsNewsDomain && dataRow["DomainName"].ToString() != "")
                                {
                                    labelBody = labelBody.Replace("{NS:XY_Link}", allDomainName + "content." + webInfo.WebSuffix + "?ns_id=" + dataRow["NS_ID"].ToString());
                                }
                                else
                                {
                                    labelBody = labelBody.Replace("{NS:XY_Link}", webInfo.WebDomain + "news/" + subChannelFolder + "content." + webInfo.WebSuffix + "?ns_id=" + dataRow["NS_ID"].ToString());
                                }
                            }
                        }
                    }
                }
                if (labelBody.Contains("{NS:XY_URL}"))
                {
                    string subChannelFolder = dataRow["NT_TempletFolderAddress"].ToString().Trim();
                    if (!subChannelFolder.Equals("")) subChannelFolder = subChannelFolder + "/";
                    if (dataRow["DomainName"].ToString() != "")
                    {
                        allDomainName = webInfo.GetSubDomain(dataRow["DomainName"].ToString());
                    }

                    if (dataRow["NS_Type"].ToString() == "3")
                    {
                        if (dataRow["NS_LinkAddress"].ToString() != "")
                            labelBody = labelBody.Replace("{NS:XY_URL}", dataRow["NS_LinkAddress"].ToString());
                        else
                        {
                            if (webInfo.IsBogusStatic)
                                if (webInfo.IsNewsDomain && dataRow["DomainName"].ToString() != "")
                                {
                                    labelBody = labelBody.Replace("{NS:XY_URL}", allDomainName + "content-" + dataRow["NS_ID"].ToString() + "." + webInfo.WebSuffix);
                                }
                                else
                                {
                                    labelBody = labelBody.Replace("{NS:XY_URL}", webInfo.WebDomain + "news/" + subChannelFolder + "content-" + dataRow["NS_ID"].ToString() + "." + webInfo.WebSuffix);
                                }
                            else
                            {
                                if (webInfo.IsNewsDomain && dataRow["DomainName"].ToString() != "")
                                {
                                    labelBody = labelBody.Replace("{NS:XY_URL}", allDomainName + "content." + webInfo.WebSuffix + "?ns_id=" + dataRow["NS_ID"].ToString());
                                }
                                else
                                {
                                    labelBody = labelBody.Replace("{NS:XY_URL}", webInfo.WebDomain + "news/" + subChannelFolder + "content." + webInfo.WebSuffix + "?ns_id=" + dataRow["NS_ID"].ToString());
                                }
                            }

                        }
                    }
                    else
                    {
                        if (dataRow["NS_HTMLPage"].ToString() != "")
                            labelBody = labelBody.Replace("{NS:XY_URL}", webInfo.WebDomain + dataRow["NS_HTMLPage"].ToString());
                        else
                        {
                            if (webInfo.IsBogusStatic)
                                if (webInfo.IsNewsDomain && dataRow["DomainName"].ToString() != "")
                                {
                                    labelBody = labelBody.Replace("{NS:XY_URL}", allDomainName + "content-" + dataRow["NS_ID"].ToString() + "." + webInfo.WebSuffix);
                                }
                                else
                                {
                                    labelBody = labelBody.Replace("{NS:XY_URL}", webInfo.WebDomain + "news/" + subChannelFolder + "content-" + dataRow["NS_ID"].ToString() + "." + webInfo.WebSuffix);
                                }
                            else
                            {
                                if (webInfo.IsNewsDomain && dataRow["DomainName"].ToString() != "")
                                {
                                    labelBody = labelBody.Replace("{NS:XY_URL}", allDomainName + "content." + webInfo.WebSuffix + "?ns_id=" + dataRow["NS_ID"].ToString());
                                }
                                else
                                {
                                    labelBody = labelBody.Replace("{NS:XY_URL}", webInfo.WebDomain + "news/" + subChannelFolder + "content." + webInfo.WebSuffix + "?ns_id=" + dataRow["NS_ID"].ToString());
                                }
                            }
                        }
                    }
                }

                if (labelBody.Contains("{NS:XY_Click}"))
                    labelBody = labelBody.Replace("{NS:XY_Click}", dataRow["NS_Count"].ToString());

                //��ѶͼƬ��ַ(Ϊ����֮ǰ�ֶα���)
                if (labelBody.Contains("{NS:XY_SmallPicPath}"))
                {
                    if (IsHaveColumn(dataRow, "IsHasImage"))
                    {
                        if (dataRow["IsHasImage"].ToString() != "0")
                        {
                            long infoId = Core.MyConvert.GetInt64(dataRow["NS_ID"].ToString());

                            string imgUrl = Business.Attachment.GetInfoDefaultImgHref(XYECOM.Model.AttachmentItem.News, infoId);

                            labelBody = labelBody.Replace("{NS:XY_SmallPicPath}", imgUrl);
                        }
                        else
                        {
                            if (!dataRow["NS_PicUrl"].ToString().Equals(""))
                            {
                                labelBody = labelBody.Replace("{NS:XY_PicPath}", dataRow["NS_PicUrl"].ToString());
                            }
                            else
                            {
                                labelBody = labelBody.Replace("{NS:XY_SmallPicPath}", SYS_NOIMAGE_PATH);
                            }
                        }
                    }
                }
                //��ѶͼƬ��ַ
                if (labelBody.Contains("{NS:XY_PicPath}"))
                {
                    if (IsHaveColumn(dataRow, "IsHasImage"))
                    {
                        if (dataRow["IsHasImage"].ToString() != "0")
                        {
                            long infoId = Core.MyConvert.GetInt64(dataRow["NS_ID"].ToString());

                            string imgUrl = Business.Attachment.GetInfoDefaultImgHref(XYECOM.Model.AttachmentItem.News, infoId);

                            labelBody = labelBody.Replace("{NS:XY_PicPath}", imgUrl);
                        }
                        else
                        {
                            if (!dataRow["NS_PicUrl"].ToString().Equals(""))
                            {
                                labelBody = labelBody.Replace("{NS:XY_PicPath}", dataRow["NS_PicUrl"].ToString());
                            }
                            else
                            {
                                labelBody = labelBody.Replace("{NS:XY_PicPath}", SYS_NOIMAGE_PATH);
                            }
                        }
                    }
                }

                if (labelBody.Contains("{NS:XY_Attachment}"))
                {
                    if (IsHaveColumn(dataRow, "NS_ID"))
                    {
                        string attachment = "";
                        long infoId = Core.MyConvert.GetInt64(dataRow["NS_ID"].ToString());

                        XYECOM.Business.Attachment attBll = new XYECOM.Business.Attachment();

                        DataTable dt = attBll.GetDataTable(infoId, XYECOM.Model.AttachmentItem.News, XYECOM.Model.UploadFileType.File);

                        string divfmt = "<div class=\"attachment\"><a href=\"{0}\">����{1}</a></div>";

                        int aIndex = 1;
                        foreach (DataRow row in dt.Rows)
                        {
                            XYECOM.Model.ServerInfo info = new XYECOM.Business.Server().GetItem(Core.MyConvert.GetInt32(row["S_ID"].ToString()));
                            attachment += string.Format(divfmt, info.S_URL + row["At_Path"], aIndex++);
                        }
                        labelBody = labelBody.Replace("{NS:XY_Attachment}", attachment);
                    }
                }

                //������ʶ
                if (labelBody.Contains("{NS:XY_AreaFlag}"))
                {
                    string areaName = "";
                    if (IsHaveColumn(dataRow, "AreaIds"))
                    {
                        //=========================================================================/
                        int aId = XYECOM.Core.MyConvert.GetInt32(dataRow["AreaIds"].ToString().Split(',')[1]);

                        if (aId > 0)
                        {
                            XYECOM.Model.AreaInfo aInfo = new XYECOM.Business.Area().GetItem(aId);
                            if (null != aInfo) areaName = aInfo.Name;
                        }
                        //=========================================================================/
                    }
                    labelBody = labelBody.Replace("{NS:XY_AreaFlag}", areaName);
                }
            }
            #endregion

            return labelBody;
        }