using System; using System.Collections.Generic; using System.Linq; using System.Text; /// /// 常用字符串 /// public static class DString { #region CHAR public const char CHAR_COMMA = ','; public const char CHAR_POINT = '.'; public const char CHAR_QM = '?'; public const char CHAR_EQ = '='; public const char CHAR_UNDERLINE = '_'; #endregion #region 符号 /// /// 省略号 /// public const string OMITTED = "..."; /// /// 点 /// public const string POINT = "."; /// /// 替换点 /// public const string POINT_R = @"\."; /// /// W /// public const string W = @"\W"; /// /// 逗号 /// public const string COMMA = ","; /// /// 问号 /// public const string QM = "?"; /// /// 等号 /// public const string EQ = "="; /// /// 且 /// public const string AMP = "&"; /// /// 两个下滑线 /// public const string UNDERLINE_T = "__"; /// /// 三个下滑线 /// public const string UNDERLINE_TH = "___"; /// /// 分割线 /// public const string SPLIT = "|"; /// /// 错误 /// public const string ERROR = "×"; /// /// 正确 /// public const string RIGHT = "√"; #endregion #region SQL /// /// SQL相似 /// public const string SQL_LIKE = "%{0}%"; /// /// 删除指定表指定字段值的数据 /// public const string SQL_DELETE_DATA = "DELETE FROM {0} WHERE {1}='{2}'"; /// /// 提取指定表指定字段的数据 /// public const string SQL_GET_VALUE = "SELECT {0} FROM {1} WHERE {2}='{3}'"; /// /// 根据条件提取表 /// public const string SQL_GET_TABLE = "SELECT * FROM {0} WHERE {1}='{2}'"; /// /// 更新数据 /// public const string SQL_UPDATE_DATA = "UPDATE {0} SET {1}='{2}',UpdateTimeD='{3}' WHERE SysIdD='{4}' "; /// /// 提取文章 /// public const string SQL_GET_ARTICLE = @"SELECT TOP {0} * FROM ArticleD WHERE TypeD='{1}' AND StatusD=1 ORDER BY ReleaseTimeD DESC,IsTopD DESC,SortD ASC,ClickNumD DESC,UpdateTimeD DESC"; /// /// 提取图文 /// public const string SQL_GET_PIC_ARTICLE = @"SELECT TOP {0} * FROM ArticleD WHERE TypeD='{1}' AND StatusD=1 And PicD<>'~/UpImages/Pic/Pic.jpg' ORDER BY ReleaseTimeD DESC,IsTopD DESC,SortD ASC,ClickNumD DESC,UpdateTimeD DESC"; /// /// 根据父类提取商品分类 /// public const string SQL_GET_GOODSTYPE = @"SELECT TOP {0} * FROM GoodsTypeD WHERE ParentD='{1}' AND StatusD=1 ORDER BY SortD ASC,UpdateTimeD DESC"; /// /// 根据大类提取商品 /// public const string SQL_GET_BGOODS = @"SELECT TOP {0} * FROM GoodsD WHERE StatusD=1 AND BigTypeD='{1}' ORDER BY ReleaseTimeD DESC,IsTopD DESC,UpdateTimeD DESC,ClickNumD DESC"; #endregion #region 页面转换 /// /// 网址 /// public const string STRING_URL = "http://{0}{1}?{2}"; /// /// HOST /// public const string STRING_HOST = "HTTP_HOST"; /// /// PATH_INFO /// public const string STRING_PATH_INFO = "PATH_INFO"; /// /// QUERY_STRING /// public const string STRING_QUERY_STRING = "QUERY_STRING"; /// /// ASPX /// public const string STRING_ASPX = ".aspx"; /// /// ASPX /// public const string STRING_ASPX0 = "{0}.aspx"; /// /// ASPX /// public const string STRING_ASPX01 = "{0}.aspx?{1}"; /// /// HTML /// public const string STRING_HTML = ".html"; /// /// HTML /// public const string STRING_HTML0 = "{0}.html"; /// /// HTML /// public const string STRING_HTML01 = "{0}___{1}.html"; #endregion #region 防HTML注入 /// /// 防止注入 /// public const string STRING_SCRIPT = @""; /// /// 防止注入 /// public const string STRING_HREFSCRIPT = @" href *= *[\s\S]*script *:"; /// /// 防止注入 /// public const string HTML_EVEN = @" on[\s\S]*="; /// /// 防止注入 /// public const string STRING_IFRAME = @""; /// /// 防止注入 /// public const string HTML_IFRAMESET = @""; /// /// 防止注入 /// public const string HTML_EVEN_R = " _disibledevent="; #endregion #region 字符串 /// /// 提示 /// public const string ALERT = "提示"; /// /// 升序 /// public const string ASC = "ASC"; /// /// 降序 /// public const string DESC = "DESC"; /// /// 提取NHI配置用 /// public const string PROPERTY = "property"; /// /// 小文件名 /// public const string MIN = "Min"; /// /// 字符串 /// public const string CHAR = "2,3,4,5,6,7,8,9,a,b,c,d,e,f,g,h,i,j,k,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,P,Q,R,S,T,U,V,W,X,Y,Z"; /// /// 数字 /// public const string NUM = "0,1,2,3,4,5,6,7,8,9"; /// /// 汉字码 /// public const string CN = "0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f"; /// /// 汉字编码 /// public const string GBK = "gb2312"; /// /// 验证码 /// public const string VAL_CODE = "ValCode"; /// /// 字体 /// public const string FONT_ARIAL = "Arial"; /// /// 图像类型 /// public const string IMAGE_GIF = "image/Gif"; /// /// 图像类型 /// public const string IMAGE_JPG = "image/jpeg"; /// /// 文件 /// public const string FILE_INFO = "file_info"; /// /// 图像类型是否存在 /// public const string IMAGE_TYPE_LIST = ".gif.jpg.bmp.png"; /// /// 日期格式 /// public const string DATE = "yyyy-MM-dd"; /// /// 日期格式分钟 /// public const string DATE_TIME_MINUTE = "yyyy/MM/dd HH:mm"; /// /// 排序字段 /// public const string SORT_EXPRESSION = "SortExpression"; /// /// 排序方向 /// public const string SORT_DIRECTION = "SortDirection"; /// /// 文件 /// public const string FILEDATA = "Filedata"; /// /// Id /// public const string ID = "Id"; /// /// 是否有权限 /// public const string HAVE_POWER = "HavePower"; /// /// 后台用户登陆 /// public const string MUSER_ID = "MUserId"; public const string MUSER_NAME = "MUserName"; public const string MUSER_PASSWD = "MUserPasswd"; #endregion #region 表格绑定 /// /// 新增 /// public const string ADD_TITLE = "新增"; /// /// 编辑 /// public const string EDIT_TITLE = "编辑"; /// /// 编辑 /// public const string EDIT = "Edit"; /// /// 添加 /// public const string ADD = "Add"; /// /// 删除 /// public const string DELETE = "Delete"; /// /// 编辑 /// public const string LBF_EDIT = "lbf_Edit"; /// /// 删除 /// public const string LBF_DELETE = "lbf_Delete"; /// /// 置顶 /// public const string CB_ISTOP = "cb_IsTopD"; /// /// 状态 /// public const string CB_STATUSD = "cb_StatusD"; /// /// 编辑地址 /// public const string LBF_EDIT_URL = "Edit.aspx?IsReturn=1&Id="; /// /// 是否返回 /// public const string IS_RETURN = "IsReturn"; /// /// 是否更新 /// public const string IS_UPDATE = "IsUpdate"; /// /// 主类 /// public const string MAIN_TYPE = "主类"; /// /// 全部 /// public const string MAIN_ALL = "全部"; #endregion #region 导出表格 public const string CONTENT_DIS = "content-disposition"; public const string EXCLE_NAME = "attachment; filename=T_{0}.xls"; public const string EXCLE_MINI = "application/excel"; public const string TABLE_TOP = ""; public const string TABLE_TD = ""; public const string TABLE_TR_END = ""; public const string TABLE_TR_TOP = ""; public const string TABLE_END = "
{0}
"; public const string CHECKBOK_CHECK = "box-grid-static-checkbox"; public const string CHECKBOK_UNCHECK = "box-grid-static-checkbox-uncheck"; #endregion #region 脚本 public const string SCRIPT_RELOAD = "location.href=location.href;"; #endregion #region 配置索引 /// /// 网站开关 /// public const string SideSwitch = "SideSwitch"; /// /// 静态开关 /// public const string StaticSwitch = "StaticSwitch"; /// /// 网站地址 /// public const string SideUrl = "SideUrl"; /// /// 网站标题 /// public const string SideName = "SideName"; /// /// 网站关键字 /// public const string KeyWords = "KeyWords"; /// /// 网站描述 /// public const string Description = "Description"; /// /// 版权 /// public const string Copyright = "Copyright"; /// /// 注册协议 /// public const string RegistrationAgreement = "RegistrationAgreement"; /// /// 支付宝账号 /// public const string PayTreasureAccount = "PayTreasureAccount"; /// /// 合作者省份证ID /// public const string PartnersIdentity = "PartnersIdentity"; /// /// 安全效验码 /// public const string SafetyCheckCode = "SafetyCheckCode"; #endregion #region 数字 public const string NUM_0 = "0"; public const string NUM_1 = "1"; #endregion #region ICON public const string ICON_PACKAGE = "~/Management/Icons/package.png"; public const string ICON_FOLDER = "~/Management/Icons/folder.png"; public const string ICON_USER = "~/Management/Icons/user.png"; public const string ICON_IMAGE_EDIT = "~/Management/Icons/image_edit.png"; public const string ICON_PALETTE = "~/Management/Icons/palette.png"; public const string ICON_PAGE = "~/Management/Icons/images.png"; public const string ICON_LINK = "~/Management/Icons/link.png"; public const string ICON_CART_FULL = "~/Management/Icons/cart_full.png"; public const string ICON_SHIELD = "~/Management/Icons/shield.png"; public const string ICON_USER_SUIT_BLACK = "~/Management/Icons/user_suit_black.png"; #endregion #region 地址 /// /// 后台登陆地址 /// public const string PAGE_MLOGIN = "~/Management/Login.aspx"; /// /// 后台地址 /// public const string PAGE_M = "~/Management/Default.aspx"; /// /// /// public const string PAGE_Info = "Info/Info.aspx?Id={0}"; /// /// 编辑地址 /// public const string EDIT_URL = "Edit.aspx?Id="; #endregion }