Example #1
0
 function C20Pr()
 {
     $_IMPORT =& $this->IMPORT;
     //创建微信号系统自动创建接待大厅和取消关注组
     if ($_IMPORT['f_wxin_1412311029_010'] != "") {
         $cPrsVAL["f_wxin_1501071059_001"] = "接待大厅";
         //组名
         $cPrsVAL["f_wxin_1501071059_002"] = 0;
         //用户数量
         $cPrsVAL["f_wxin_1501071059_003"] = 1;
         //系统组
         $cPrsVAL["f_wxin_1501071059_E01"] = $_IMPORT['f_wxin_1412311029_010'];
         //公众号
         $cPrsVAL["IM_HND"] = "20";
         $cPrsVAL["IM_PST"] = "1";
         $cPrsVAL["IM_Range"] = "f_wxin_1501071059_000||0";
         $mPrsVAL["f_wxin_1501071059_001"] = "取消关注";
         //组名
         $mPrsVAL["f_wxin_1501071059_002"] = 0;
         //用户数量
         $mPrsVAL["f_wxin_1501071059_003"] = 1;
         //系统组
         $mPrsVAL["f_wxin_1501071059_E01"] = $_IMPORT['f_wxin_1412311029_010'];
         //公众号
         $mPrsVAL["IM_HND"] = "20";
         $mPrsVAL["IM_PST"] = "1";
         $mPrsVAL["IM_Range"] = "f_wxin_1501071059_000||0";
         Common::Start("141231094102", "", $cPrsVAL);
         Common::Start("141231094102", "", $mPrsVAL);
     }
     parent::C20Pr();
 }
Example #2
0
 function Toend()
 {
     $_OBJECT =& $this->APPObj;
     $_IMPORT =& $this->IMPORT;
     $_RESULT =& $this->Result;
     if (strpos("[UD]", $_RESULT->GetField("RowST")) >= 1) {
         $Fo002 = $_RESULT->GetField("f_wire_1507142038_002_OLD");
         $Fn002 = $_RESULT->GetField("f_wire_1507142038_002");
         $Fo004 = $_RESULT->GetField("f_wire_1507142038_004_OLD");
         $Fn004 = $_RESULT->GetField("f_wire_1507142038_004");
         $cUSql = "update t_wire_1507142038 set ";
         $cUSql .= $Fo002 != "" ? "f_wire_1507142038_002=replace(f_wire_1507142038_002,\"" . $Fo002 . "\",\"" . $Fn002 . "\")," : "";
         $cUSql .= $Fo002 != "" ? "f_wire_1507142038_005=replace(f_wire_1507142038_005,\"" . $Fo002 . "\",\"" . $Fn002 . "\") " : "";
         $cUSql .= $Fo002 != "" && $Fo004 != "" ? "," : "";
         $cUSql .= $Fo004 != "" ? "f_wire_1507142038_004=replace(f_wire_1507142038_004,\"" . $Fo004 . "\",\"" . $Fn004 . "\") " : "";
         $cUSql .= "where f_wire_1507142038_002 like \"" . ($Fo002 != "" ? $Fo002 : $Fn002) . ".%\"";
         $cDSql = "delete from t_wire_1507142038 where f_wire_1507142038_002 like \"" . ($Fo002 != "" ? $Fo002 : $Fn002) . ".%\"";
         if ($_RESULT->GetField("RowST") == "U") {
             array_push($_OBJECT["DB"]->Querys, $cUSql);
         }
         if ($_RESULT->GetField("RowST") == "D") {
             array_push($_OBJECT["DB"]->Querys, $cDSql);
         }
         $_OBJECT["DB"]->FillBatch();
     }
     return parent::Toend();
 }
Example #3
0
 function CheckWxin()
 {
     $_OBJECT =& $this->APPObj;
     $_IMPORT =& $this->IMPORT;
     $_RESULT =& $this->Result;
     parent::C11Pr();
     if ($_OBJECT["DB"]->RowsCT($_RESULT->Resval) > 0) {
         $CheckParam["echostr"] = $_IMPORT["echostr"];
         $CheckParam["signature"] = $_IMPORT["signature"];
         $CheckParam["timestamp"] = $_IMPORT["timestamp"];
         $CheckParam["nonce"] = $_IMPORT["nonce"];
         $CheckParam["token"] = $_RESULT->GetField("f_wxin_1412311029_008", 0);
         $CheckStatus = 2;
         if ($this->checkSignature($CheckParam)) {
             $CheckStatus = 1;
             echo $CheckParam["echostr"];
         } else {
             echo false;
         }
         $cPrsVAL["f_wxin_1412311029_003"] = $CheckStatus;
         //验证状态
         $cPrsVAL["f_wxin_1412311029_004"] = date('Y-m-d H:i:s', time());
         //验证时间
         $cPrsVAL["IM_HND"] = "22";
         $cPrsVAL["IM_PST"] = "1";
         $cPrsVAL["IM_Range"] = "f_wxin_1412311029_000||" . $_RESULT->GetField("f_wxin_1412311029_000", 0);
         Common::Start("141231094502", "", $cPrsVAL);
         exit;
     } else {
         echo false;
         exit;
     }
 }
Example #4
0
 function C12Pr()
 {
     $_OBJECT =& $this->APPObj;
     $_IMPORT =& $this->IMPORT;
     $_RESULT =& $this->Result;
     $iKey = 0;
     $cRange = parent::Begin();
     while ($iKey < sizeof($cRange)) {
         if ($_RESULT->GetField("f_wire_1506031750_000", $iKey) != 0) {
             //信号导入表主键
             $cPrsVAL["f_wire_1506031751_P01"] = $_RESULT->GetField("f_wire_1506031750_P01", $iKey);
             //用户编号
             $cPrsVAL["f_wire_1506031751_E01"] = $_RESULT->GetField("f_wire_1506031750_E01", $iKey);
             //从属组织
             $cPrsVAL["f_wire_1506031751_E02"] = $_RESULT->GetField("f_wire_1506031750_E02", $iKey);
             //组织路径
             $cPrsVAL["f_wire_1506031751_C01"] = $_RESULT->GetField("f_wire_1506031750_C01", $iKey);
             //名称路径
             $cPrsVAL["f_wire_1506031751_002"] = $_RESULT->GetField("f_wire_1506031750_002", $iKey);
             //用户密码
             $cPrsVAL["f_wire_1506031751_003"] = $_RESULT->GetField("f_wire_1506031750_011", $iKey);
             //用户名称
             $cPrsVAL["f_wire_1506031751_004"] = $_IMPORT["APars"];
             //区域编号
             $cPrsVAL["f_wire_1506031751_005"] = date('Y-m-d H:i:s', time());
             //导入时间
             $cPrsVAL["IM_HND"] = 20;
             $cPrsVAL["IM_PST"] = 1;
             $cPrsVAL["IM_Range"] = "f_wire_1506031751_000||0";
             Common::Start("150723110801", "", $cPrsVAL);
             $iKey++;
         }
     }
 }
Example #5
0
 function C12Pr()
 {
     $_OBJECT =& $this->APPObj;
     $_IMPORT =& $this->IMPORT;
     $_RESULT =& $this->Result;
     $iKey = 0;
     $cRange = parent::Begin();
     while ($iKey < sizeof($cRange)) {
         if ($_RESULT->GetField("f_wire_1507080936_000", $iKey) != 0) {
             //信号导入表主键
             $cPrsVAL["f_wire_1507151720_P01"] = $_RESULT->GetField("f_wire_1507080936_P01", $iKey);
             //广播编号
             $cPrsVAL["f_wire_1507151720_E02"] = $_RESULT->GetField("f_wire_1507080936_E02", $iKey);
             //设备编号
             $cPrsVAL["f_wire_1507151720_003"] = $_RESULT->GetField("f_wire_1507080936_003", $iKey);
             //广播名称
             $cPrsVAL["f_wire_1507151720_P01"] = $_RESULT->GetField("f_wire_1507080936_P01", $iKey);
             //广播编号
             $cPrsVAL["f_wire_1507151720_004"] = $_RESULT->GetField("f_wire_1507080936_004", $iKey);
             //广播vlan
             $cPrsVAL["f_wire_1507151720_006"] = $_IMPORT["APars"];
             //区域编号
             $cPrsVAL["f_wire_1507151720_007"] = date('Y-m-d H:i:s', time());
             //导入时间
             $cPrsVAL["IM_HND"] = 20;
             $cPrsVAL["IM_PST"] = 1;
             $cPrsVAL["IM_Range"] = "f_wire_1507151720_000||0";
             Common::Start("141124085701", "", $cPrsVAL);
             $iKey++;
         }
     }
 }
Example #6
0
 function C24Pr()
 {
     $_OBJECT =& $this->APPObj;
     $_IMPORT =& $this->IMPORT;
     $_RESULT =& $this->Result;
     $cRange = array();
     $cData = array();
     if (isset($_IMPORT["IM_Range"]) && trim($_IMPORT["IM_Range"]) != "") {
         $mWhere = trim($_IMPORT["IM_Range"]);
         $cRange = explode("||", $mWhere);
         $mWhere = str_replace($cRange[0] . "||", "", $mWhere);
         $cRange = explode("||", $mWhere);
     }
     if (isset($_IMPORT["IM_Data"]) && trim($_IMPORT["IM_Data"]) != "") {
         $cWhere = trim($_IMPORT["IM_Data"]);
         $cData = explode("||", $cWhere);
         $cWhere = str_replace($cWhere[1] . "||", "", $cWhere);
         $cData = explode("||", $cWhere);
     }
     for ($cI = 1; $cI <= sizeof($cData) - 1; $cI++) {
         $cField = "*";
         $cWhere = "{~}f_wxin_1501071059_E01{_}=={_}" . $cData[$cI];
         $cUSafe = "4";
         $cUSort = "f_wxin_1501071059_000 asc";
         $cDWxin_V10C_150513 = Vic_Dir_Search("141231094101.INI", "/" . $this->APPCls->Getvar("RunPath") . "/Sql/", 0, "T");
         $cUsrWK = Common::$_UsrInf->Getvar("UsrWK");
         $_RESULT = $_OBJECT["DB"]->GetSource($cUsrWK, $cUSafe, $cDWxin_V10C_150513, $cField, $cWhere, $cUSort, NULL, -1);
         if ($_OBJECT["DB"]->RowsCT($_RESULT->Resval) > 0) {
             for ($cJ = 0; $cJ < $_OBJECT["DB"]->RowsCT($_RESULT->Resval); $cJ++) {
                 $cSql = "delete  from  t_wxin_1501071059 where f_wxin_1501071059_000=" . $_RESULT->GetField("f_wxin_1501071059_000", $cJ);
                 array_push($_OBJECT["DB"]->Querys, $cSql);
                 $_OBJECT["DB"]->FillBatch();
             }
         }
     }
     parent::C24Pr();
 }
Example #7
0
 function SaoYSao($WInfo, $DevInfo)
 {
     $_OBJECT =& $this->APPObj;
     $_IMPORT =& $this->IMPORT;
     $mMod = isset($_IMPORT["IM_Mod"]) ? $_IMPORT["IM_Mod"] : "";
     //接入模块
     $mUsrID = "";
     $mUsrNA = "";
     //获取设备接入历史数据
     $sIf_AA = "{~}f_wire_1411121421_P01{_}=={_}" . $DevInfo["UserMac"] . "{~}f_wire_1411121421_010{_}=={_}" . $DevInfo["Vlan"];
     $sRs_AA = $this->GetInfo($this->sSql, $sIf_AA);
     //获取关联的用户信息
     $uIf_AA = "{~}f_wire_1506031750_003{_}%%{_}" . $DevInfo["UserMac"] . "|" . $DevInfo["Vlan"];
     $uRs_AA = $this->GetInfo($this->uSql, $uIf_AA);
     if ($_OBJECT["DB"]->RowsCT($uRs_AA->Resval) == 0) {
         //检测是否存在关联用户
         $AccUsrName = $this->MakeUsrID("SUR");
         $uPrsVAL["f_wire_1506031750_P01"] = $AccUsrName;
         //接入用户ID
         $uPrsVAL["f_wire_1506031750_E01"] = $WInfo["Group"][2];
         //用户分组
         $uPrsVAL["f_wire_1506031750_002"] = "123456";
         //登录密码
         $uPrsVAL["f_wire_1506031750_003"] = $DevInfo["UserMac"] . "|" . $DevInfo["Vlan"];
         //设备MAC
         $uPrsVAL["f_wire_1506031750_004"] = 0;
         //启用状态
         $uPrsVAL["f_wire_1506031750_011"] = $AccUsrName;
         //接入用户名称
         $uPrsVAL["AreID"] = $this->areID;
         //接入区域
         $uPrsVAL["IM_PST"] = "1";
         $uPrsVAL["IM_HND"] = "20";
         $uPrsVAL["IM_Range"] = "f_wire_1506031750_000||0";
         Common::Start("150605101704", "", $uPrsVAL);
         $mUsrID = $AccUsrName;
         //接入用户ID
         $mUsrNA = $AccUsrName;
         //接入用户名称
     } else {
         $mUsrID = $uRs_AA->GetField("f_wire_1506031750_P01", 0);
         //接入用户ID
         $mUsrNA = $uRs_AA->GetField("f_wire_1506031750_011", 0);
         //接入用户名称
     }
     //设备接入系统检测
     $_IMPORT["f_wire_1411121421_002"] = $mUsrID;
     //接入用户ID
     $_IMPORT["f_wire_1411121421_003"] = $mUsrNA;
     //接入用户名称
     $_IMPORT["f_wire_1411121421_011"] = 3;
     //认证模式
     if ($_OBJECT["DB"]->RowsCT($sRs_AA->Resval) > 0) {
         //更新接入信息
         $_IMPORT["IM_HND"] = "22";
         $_IMPORT["IM_PST"] = "1";
         $_IMPORT["IM_Range"] = "f_wire_1411121421_P01||" . $DevInfo["UserMac"];
         $_IMPORT["IM_Where"] = "{~}f_wire_1411121421_010{_}=={_}" . $DevInfo["Vlan"];
         parent::C22Pr();
     } else {
         //新增接入信息
         $_IMPORT["f_wire_1411121421_P01"] = $DevInfo["UserMac"];
         //终端设备编号
         $_IMPORT["f_wire_1411121421_004"] = $DevInfo["DevId"];
         //AP出口名称
         $_IMPORT["f_wire_1411121421_005"] = 1;
         //状态,0-禁用,1-启用
         $_IMPORT["f_wire_1411121421_006"] = date('Y-m-d H:i:s', time());
         //接入时间
         $_IMPORT["f_wire_1411121421_007"] = $DevInfo["Params"];
         //跳转参数
         $_IMPORT["f_wire_1411121421_009"] = $mMod;
         //接入模式
         $_IMPORT["f_wire_1411121421_010"] = $DevInfo["Vlan"];
         //vlan
         $_IMPORT["IM_HND"] = "20";
         $_IMPORT["IM_PST"] = "1";
         $_IMPORT["IM_Range"] = "f_wire_1411121421_000||0";
         parent::C20Pr();
     }
 }
Example #8
0
 function Toend()
 {
     $_OBJECT =& $this->APPObj;
     $_IMPORT =& $this->IMPORT;
     $_RESULT =& $this->Result;
     $cCSql = "";
     //用户分组统计更新SQL
     if (strpos("[ID]", $_RESULT->GetField("RowST")) >= 1) {
         foreach ($_RESULT->Resgrd as $iKey => $iVal) {
             $cOpe = $_RESULT->GetField("RowST") == "D" ? "-1" : "+1";
             if (strpos("[ID]", $_RESULT->GetField("RowST")) >= 1) {
                 $cCSql = "UPDATE t_wire_1507142038 SET f_wire_1507142038_006=f_wire_1507142038_006" . $cOpe;
                 $cCSql .= " WHERE f_wire_1507142038_P01 IN('" . str_replace(".", "','", $iVal["f_wire_1506031750_E02"]) . "');";
                 array_push($_OBJECT["DB"]->Querys, $cCSql);
             }
         }
         $_OBJECT["DB"]->FillBatch();
     }
     return parent::Toend();
 }