摘要: var regex = /^[\u4e00-\u9fa5\w]{4,12}$/; //昵称长度在4-12个字节之间,由中文,英文字母、数字和下划线组成var regex = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/; //请输入有效的手机号码//手机var pp=/^(13[0-9]|15[0|3|6|7|8|9]|18[0-9])\d{8}$/;//电话var reTel=/^([\+][0-9]{1,3}[ \.\-])?([\(]{1}[0-9]{2,6}[\)])?([0-9 \.\-\/]{3,20})((x|ex... 阅读全文
posted @ 2012-11-13 18:21 一千零一夜 阅读(245) 评论(0) 推荐(0)
摘要: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="ReceiverEmail_List.aspx.cs" Inherits="Web_Admin_ReceiverEmail_ReceiverEmail_List" %><%@ Register src="../ascx/navigation.ascx" tagname="navigation" tagprefix="uc1" % 阅读全文
posted @ 2012-11-13 17:53 一千零一夜 阅读(328) 评论(0) 推荐(0)
摘要: using System;using System.Collections.Generic;using Comm;/// <summary>///ShowPage 的摘要说明/// </summary>public class ShowPage : System.Web.UI.Page{ protected Util gjShowPage = new Util(); protected MySqlExecute mseShowPage = new MySqlExecute(); public ShowPage() { base.PreInit += new... 阅读全文
posted @ 2012-11-13 17:51 一千零一夜 阅读(229) 评论(0) 推荐(0)
摘要: using System.Web;using System.Data;using System;/// <summary>///Util 的摘要说明/// </summary>public class Util{ /// <summary> /// 过滤字符串中的html代码 /// </summary> /// <param name="Str">传入字符串</param> /// <returns>过滤后的字符串</returns> public string LostHTM 阅读全文
posted @ 2012-11-13 17:50 一千零一夜 阅读(201) 评论(0) 推荐(0)
摘要: function isSQL(st){ var in_str = "'|and|exec|insert|select|delete|update|count|*|%|chr|mid|master|truncate|char|declare|;|or|-|+|,"; var arrStr = in_str.split('|'); var l = arrStr.length; for(var i = 0; i < l; i++) { if(st.indexOf(arrStr[i]) >= 0) return true; } return fa 阅读全文
posted @ 2012-11-13 17:48 一千零一夜 阅读(883) 评论(0) 推荐(0)
摘要: using System;using System.Collections.Generic;using System.Text;using System.Collections;using System.Text.RegularExpressions; /*----------------------------------------------------------------------------- * 公司: * 作者: 肖品 * 文件描述: 中文获取拼音 * 创建时间: 2011-8-27 9:40:58 * 版本: v1.0 ----... 阅读全文
posted @ 2012-11-13 17:47 一千零一夜 阅读(894) 评论(0) 推荐(0)
摘要: private static string getPinYin(string text) { char pinyin; byte[] array; System.Text.StringBuilder sb = new System.Text.StringBuilder(text.Length); foreach (char c in text) { pinyin = c; array = System.Text.Encoding.Default.GetBytes(new ch... 阅读全文
posted @ 2012-11-13 17:47 一千零一夜 阅读(599) 评论(0) 推荐(0)
摘要: protected void Page_Load(object sender, EventArgs e) { string sql = "a|b|c|d| | |e|f|g|h|i|j|k"; System.Text.RegularExpressions.Regex ze = new System.Text.RegularExpressions.Regex("\\s"); sql= ze.Replace(sql,""); System.Text.RegularExpressions.Regex ze1 = new System.... 阅读全文
posted @ 2012-11-13 17:46 一千零一夜 阅读(658) 评论(0) 推荐(0)
摘要: ALTER proc [dbo].[pageing]( @tableName varchar(255), --表名 @showField varchar(1000), --显示的字段 @orderField varchar(255), --排序的字段 @pa... 阅读全文
posted @ 2012-11-13 17:45 一千零一夜 阅读(294) 评论(0) 推荐(0)
摘要: using System;using System.Data;using System.Configuration;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;/// <summary>///BasePage 的摘 阅读全文
posted @ 2012-11-13 17:44 一千零一夜 阅读(487) 评论(0) 推荐(0)
摘要: declare @t varchar(255),@c varchar(255)declare table_cursor cursor for select a.name,b.namefrom sysobjects a,syscolumns b ,systypes cwhere a.id=b.id and a.xtype='u' and c.namein ('char', 'nchar', 'nvarchar', 'varchar','text','ntext')declare @st 阅读全文
posted @ 2012-11-13 17:43 一千零一夜 阅读(203) 评论(0) 推荐(0)
摘要: using System.Net.Mail;private bool SendEmail(string astrEachEmail, string bt, string nr) { string strSendEmail = ConfigurationManager.AppSettings["fromMail"]; string strUserName = ConfigurationManager.AppSettings["mailAccount"]; string strPassWord = AllTableHelp.jieMi(Configu... 阅读全文
posted @ 2012-11-13 17:43 一千零一夜 阅读(153) 评论(0) 推荐(0)
摘要: using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using System.Web.Caching;namespace SpaceTime{ /// <summary> /// VsC 阅读全文
posted @ 2012-11-13 17:42 一千零一夜 阅读(255) 评论(0) 推荐(0)
摘要: SqlParameter[] sps = new SqlParameter[] { new SqlParameter("@name", "%" + name + "%") }; 阅读全文
posted @ 2012-11-13 17:41 一千零一夜 阅读(125) 评论(0) 推荐(0)
摘要: private void DropDownListBind() { ddl.Items.Clear(); dt = Productmanage.Instance.GetAllProCate(); if (dt != null) bindTree(dt, 0, 0); ddl.Items.Insert(0, new ListItem("所有分类", "0")); } private void bindTree(DataTable dt, int parentId, int dep) ... 阅读全文
posted @ 2012-11-13 17:40 一千零一夜 阅读(147) 评论(0) 推荐(0)
摘要: convert(varchar(10),H_houseUpdateTime,23)=convert(varchar(10),getdate(),23) 阅读全文
posted @ 2012-11-13 17:33 一千零一夜 阅读(131) 评论(0) 推荐(0)
摘要: create function [dbo].[f_GetPy](@str nvarchar(4000))returns nvarchar(4000)asbegindeclare @strlen int,@re nvarchar(4000)declare @t table(chr nchar(1) collate Chinese_PRC_CI_AS,letter nchar(1))insert into @t(chr,letter) select '吖 ', 'A ' union all select '八 ', ... 阅读全文
posted @ 2012-11-13 17:32 一千零一夜 阅读(172) 评论(0) 推荐(0)
摘要: <style type="text/css"> #bottomNav { background-color: red; z-index: 999; position: fixed; bottom: 0px; left: 0px; width: 100%; _position: absolute; /* for IE6 */ _top: expression(documentEl... 阅读全文
posted @ 2012-11-13 17:32 一千零一夜 阅读(927) 评论(0) 推荐(0)
摘要: var tempColor; $(".listTable tr:even").css("backgroundColor", "#B3D59A"); $(".listTable tr:odd").css("backgroundColor", "#9AB3D5"); $(".listTable tr").mouseover(function () { tempColor = $(this).css("backgroundColor"); $ 阅读全文
posted @ 2012-11-13 17:31 一千零一夜 阅读(204) 评论(0) 推荐(0)
摘要: --完全相同的数据去掉重复select id,orderId from (select row_number() over(order by id) rowId,* from v_order) as tt where rowId in(select min(rowId) from (select row_number() over(order by id) rowId,* from v_order) bb group by id having count(id)>=1) 阅读全文
posted @ 2012-11-13 17:30 一千零一夜 阅读(776) 评论(0) 推荐(0)
摘要: ALTER proc [dbo].[addUser]( @mid int output,@phone nvarchar(20),@regmid int,@pwd nvarchar(30),@relname nvarchar(50), @email nvarchar(200),@tel nvarchar(20),@sex nvarchar(2),@photo nvarchar(300),@IDNum nvarchar(20), @integral decimal(18,2),@flag char(1),@linkkey nvarchar(50),@qq nvarchar(30)... 阅读全文
posted @ 2012-11-13 17:29 一千零一夜 阅读(1082) 评论(0) 推荐(0)
摘要: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xml 阅读全文
posted @ 2012-11-13 17:28 一千零一夜 阅读(1724) 评论(0) 推荐(0)
摘要: public static string PostWebRequest(string Data, string URL) { CookieContainer cc = new CookieContainer(); string postData = Data; byte[] byteArray = Encoding.Default.GetBytes(postData); // 转化 HttpWebRequest webRequest2 = (HttpWebRequest)WebRequest.Create(new Uri(URL))... 阅读全文
posted @ 2012-11-13 17:27 一千零一夜 阅读(206) 评论(0) 推荐(0)
摘要: for(i in test){ alert(i);//i就是test的属性名 alert(test.i);//test.i就是属性值} 阅读全文
posted @ 2012-11-13 17:25 一千零一夜 阅读(106) 评论(0) 推荐(0)
摘要: function dhDiv(ee1){ //导航距离屏幕顶部距离 var _defautlTop = $("#"+ee1).offset().top - $(window).scrollTop(); //导航距离屏幕左侧距离 var _defautlLeft = $("#"+ee1).offset().left - $(window).scrollLeft(); //导航默认样式记录,还原初始样式时候需要 var _position = $("#"+ee1).css('position'); ... 阅读全文
posted @ 2012-11-13 17:25 一千零一夜 阅读(4178) 评论(2) 推荐(0)
摘要: <%@ WebHandler Language="C#" Class="ImageWater" %>using System;using System.Web;using System.Drawing;using System.IO;using System.Drawing.Imaging;public class ImageWater : IHttpHandler{ private string imagepath = "~/ImageFiles/"; //图片所在的文件夹 private const string wa 阅读全文
posted @ 2012-11-13 17:24 一千零一夜 阅读(226) 评论(0) 推荐(0)
摘要: /// /// 将原始字串转换为unicode,格式为\u....\u.... /// /// /// private string StringToUnicode(string srcText) { string dst = ""; char[] src = srcText.ToCharArray(); for (int i = 0; i /// 将Unicode字串\u....\u....格式字串转换为原始字符串 ... 阅读全文
posted @ 2012-11-13 17:22 一千零一夜 阅读(1167) 评论(0) 推荐(0)
摘要: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><%@ Register Assembly="PublicControls" Namespace="PublicControls" TagPrefix="mycols" %><!DOCTYPE html PUBLIC "-//W3 阅读全文
posted @ 2012-11-13 17:21 一千零一夜 阅读(177) 评论(0) 推荐(0)
摘要: lazyload.js(function($) {$.fn.lazyload = function(options) {var settings = {threshold : 0,failurelimit : 0,event : "scroll",effect : "show",container : window};if(options) {$.extend(settings, options);}var elements = this;if ("scroll" == settings.event) {$(settings.cont 阅读全文
posted @ 2012-11-13 17:19 一千零一夜 阅读(173) 评论(0) 推荐(0)
摘要: jQuery.cookie = function(name, value, options) { if (typeof value != 'undefined') { // name and value given, set cookie options = options || {}; if (value === null) { value = ''; options.expires = -1; } var expires = ''; if (options.expires... 阅读全文
posted @ 2012-11-13 17:19 一千零一夜 阅读(165) 评论(0) 推荐(0)
摘要: private DataTable GetPagedTable(DataTable dt, int PageIndex, int PageSize) { if (PageIndex == 0) return dt; DataTable newdt = dt.Copy(); newdt.Clear(); int rowbegin = (PageIndex - 1) * PageSize; int rowend = PageIndex * PageSize; if (rowbegin >... 阅读全文
posted @ 2012-11-13 17:15 一千零一夜 阅读(1290) 评论(0) 推荐(0)
摘要: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head> <title>动态加载</title> <style type="text/css">ul{ list-s 阅读全文
posted @ 2012-11-13 17:13 一千零一夜 阅读(310) 评论(0) 推荐(0)
摘要: ajaxLD.aspx.cspublic partial class userCenter_ajaxLD : CenterPage{ protected void Page_Load(object sender, EventArgs e) { Response.Clear(); System.Text.StringBuilder sb = new System.Text.StringBuilder(); int ee3 = DNTRequest.GetFormInt("ee3", 0); if (ee3 > 0) ... 阅读全文
posted @ 2012-11-13 17:11 一千零一夜 阅读(185) 评论(0) 推荐(0)
摘要: using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;using Sy 阅读全文
posted @ 2012-11-13 17:07 一千零一夜 阅读(173) 评论(0) 推荐(0)
摘要: if (fu.PostedFile.InputStream.Length < 1) { Comm.MessageBox.Show("请选择文件"); } string FileName = fu.FileName;//上传文件文件名 string FilePath = fu.PostedFile.FileName;//上传文件完整路径+文件名 if (FileName.ToLower().IndexOf(".txt") == -1) { Comm.Me... 阅读全文
posted @ 2012-11-13 17:07 一千零一夜 阅读(170) 评论(0) 推荐(0)
摘要: $(document).ready(function(){ var _lll= $(window).width(); var _mmm = 0; $(".valuation li img").mouseover(function(e){ titles=$(this).attr("title"); $(this).attr("title",""); $(".valuation li").append("<div class='valtip'>"+ti 阅读全文
posted @ 2012-11-13 17:04 一千零一夜 阅读(559) 评论(0) 推荐(0)
摘要: --获得上级with my as(select * from TB_Area where AreaID=72344566572777472union allselect aa.* from my,TB_Area aa where my.ParentID=aa.AreaID) select * from mygo--获得下级with my as(select * from TB_Area where AreaID=72339069014638592union allselect aa.* from my,TB_Area aa where my.AreaID=aa.ParentID) select 阅读全文
posted @ 2012-11-13 16:43 一千零一夜 阅读(154) 评论(0) 推荐(0)
摘要: if exists(select [name] from sys.objects where [name]='updateChild' and [type]='TR')drop trigger updateChildgocreate trigger updateChildon TB_ProductTypefor updateasif update(Pids) or update(Pid) or update([Level])begin update TB_ProductType set Pids=replace(pt.Pids,d.Pids,i.Pids), [ 阅读全文
posted @ 2012-11-13 16:42 一千零一夜 阅读(202) 评论(0) 推荐(0)
摘要: #region 防止钓鱼string host = request.UrlReferrer.Host;if (string.Compare(host, request.Url.Host) > 0){ return;}#endregionStringBuilder sb = new StringBuilder();//如果UrlReferrer为空,禁止盗链 if (context.Request.UrlReferrer.Host == null) {sb.Append("禁止"); } else { // 如果UrlReferrer中不包含自己站点主机域名,则禁止盗链 阅读全文
posted @ 2012-11-13 16:41 一千零一夜 阅读(539) 评论(0) 推荐(0)
摘要: public string getUrlPara(string sUrl, string paraName) { string sReg = "(?:\\?|&){1}" + paraName + "=([^&]*)"; System.Text.RegularExpressions.Regex re = new System.Text.RegularExpressions.Regex(sReg, System.Text.RegularExpressions.RegexOptions.IgnoreCase); return re.Match 阅读全文
posted @ 2012-11-13 16:34 一千零一夜 阅读(665) 评论(0) 推荐(0)