WebCommon/SendMsg.cs

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Net;
using System.IO;
using System.Text;
using System.Configuration;
using System.Text.RegularExpressions;

using WMPT.Model;
using WMPT.DBUtility;
using System.Data;
using System.Data.SqlClient;
using WMPT.SQLServerDAL;

namespace WMPT.WebCommon
{
    /// <summary>
    ///HJSendMsg 的摘要说明
    /// </summary>
    public class SendMsg
    {
        /// <summary>
        /// 发送验证码短信
        /// </summary>
        /// <param name="mobile">手机号</param>
        /// <param name="code">验证码</param>
        /// <returns></returns>
        public static int SendValidCode(string mobile, string code)
        {
            string cont = "您的验证码是:" + code + "。请不要把验证码泄露给其他人。如非本人操作,可不用理会!";
            return send(mobile, cont, 1);
        }

        /// <summary>
        /// 发送短信,带是否验证次数
        /// </summary>
        /// <param name="mobile">手机号</param>
        /// <param name="content">内容</param>
        /// <param name="islimity">0表示不限制次数,1表示要要限制</param>
        /// <returns></returns>
        public static int send(string mobile, string content, int islimity)
        {
            Regex rx = new Regex(@"^[0-9]*$");
            if (rx.IsMatch(mobile) && mobile.Length == 11)
            {

            }
            else
            {
                return 0;
            }

            if ((islimity == 1) && !checkphone(mobile))
            {
                HJlogx.toLog("同一号码,ip一天内发送5次以上:" + mobile);
                return 0;
            }

后面还有 95 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。