常用函数系列:
public static string Get_ClientIP() 得到客户端IP
public static string Get_CMac(string IP) 得到客户端 CMac 地址
public static string RequestF(string xPName,string xPType,int xLenDef) 安全接收数据系列
public static string Show_Cont(string xStr) 过滤显示字串
public static string Show_jsStr(string xStr) 过滤显示js
安全检测函数:
public static string CheckUrl(string xDirPage) 上页地址认证
public static string Chk_Perm0(string xPerm,string xSys,string xAct) 权限认证系列
public static string Chk_Perm1(string xPerm,string xSys,string xAct) 权限认证系列
public static string Chk_Perm2(string xPerm,string xSys,string xAct) 权限认证系列
邮件发送函数:
public void SendEmail(string xSubj,string xCont,string FmAddr,string ToAddr)
public void SendSmtp(string xSubj,string xCont,string xfrom,string xTo)
加密解密函数:
public static string Enc_PW(string xID,string xPW,int xLen) 改装sha1+md5加密解密函数加密函数
public static string Conv_10toXX(long xNum,int xBase) 10进制 转 XX 进制
public static long Conv_XXto10(string xStr,int xBase) xx进制 转 10 进制
public static string DESDec(string pToDecrypt, string sKey) DES解密
public static string DESEnc(string pToEncrypt, string sKey) DES加密密
public static string DESPeace(string xStr, string xType) 改装DES
public static string DESSwap(string xStr, int xN) DES 改装算法
文件操作函数:
public static string fCreate(string xFile,string xContent) 建立文件
public void ImgCode (Page containsPage,string validateNum) 生成图片认证码
public static string ImgShow(string xPName,int xImgW,int xImgH,int xMaxW,int xMaxH) 按比例大小显示图片
public static DataTable fList(string xPath) 显示文件列表 显示文件夹列表
public static string fRead(string xFile) 文件读取函数
public static ArrayList fUpload(HttpPostedFile xFile,string xPath,string xOrg,int xSize,string xType) 文件上传认证函数
时间/随即字串函数:
public static string Get_AutoID(int xLen) 自动随机 ID 串
public static string Get_HHMMSS() 得到时间HHm
切记,切记 DateTime.Now.Date.ToString("yyyy年MM月dd日"); //MM 要大写,否则会是00,不是真实的月份 private void getDate()
{
date.Text = DateTime.Now.Date.ToString("yyyy年MM月dd日"); //这个随意的:yyyy-MM-dd 也可以
string Temp="";
switch (DateTime.Now.DayOfWeek)
{
case DayO ......