function Begin() { $_OBJECT =& $this->APPObj; $_IMPORT =& $this->IMPORT; $_RESULT =& $this->Result; if ($this->IN_HND == 20 || $this->IN_HND == 22) { //if(empty($_IMPORT["f_wxin_1411281708_P01"])){$_IMPORT["f_wxin_1411281708_P01"]=$_OBJECT["US"]->Getvar("UsrCO");} if (empty($_IMPORT["f_wxin_1411281708_002"]) || empty($_IMPORT["f_wxin_1411281708_004"])) { $_IMPORT["f_wxin_1411281708_004"] = $_IMPORT["f_wxin_1411281708_003"]; $_IMPORT["f_wxin_1411281708_002"] = $_IMPORT["f_wxin_1411281708_P01"]; } if (!empty($_IMPORT["PID"])) { $cField = "*"; $cWhere = "{~}f_wxin_1411281708_000{_}=={_}" . $_IMPORT["PID"]; $cUSafe = "4"; $cUSort =& $Pagination->PgSort; $cDWxin_V10C_150513 = Vic_Dir_Search("141201092301.INI", "/" . $this->APPCls->Getvar("RunPath") . "/Sql/", 0, "T"); $cUsrWK = Common::$_UsrInf->Getvar("UsrWK"); $cTable = $_OBJECT["DB"]->GetSource($cUsrWK, $cUSafe, $cDWxin_V10C_150513, $cField, $cWhere, "", NULL, 1); if ($_OBJECT["DB"]->RowsCT($cTable->Resval)) { $Fi002 = $cTable->GetField("f_wxin_1411281708_002"); $Fi004 = $cTable->GetField("f_wxin_1411281708_004"); $_IMPORT["f_wxin_1411281708_002"] = $Fi002 . "." . $_IMPORT["f_wxin_1411281708_P01"]; $_IMPORT["f_wxin_1411281708_004"] = $Fi004 . "." . $_IMPORT["f_wxin_1411281708_003"]; $_IMPORT["f_wxin_1411281708_005"] = $Fi002; } } } return parent::Begin(); }
function C10Pr() { if (!session_id()) { session_start(); } //unset($_SESSION['bangding']); /* if(empty($_SESSION['bangding'])){ header('Location: http://58.67.198.90/?IM_SRC=151010100201&act=info');die; }*/ $_OBJECT =& $this->APPObj; $_IMPORT =& $this->IMPORT; $_RESULT =& $this->Result; $ICSql = "update t_fsfy_1510201012 set f_fsfy_1510201012_015 = f_fsfy_1510201012_015 + 1 where f_fsfy_1510201012_000 = " . $_GET['id']; array_push($_OBJECT["DB"]->Querys, $ICSql); $_OBJECT["DB"]->FillBatch(); $cField = "*"; //查找的字段 $cWhere = "{~}t_11.f_fsfy_1510201011_002{_}=={_}" . $_GET['cardid'] . " {~}t_13.f_fsfy_1510201013_002{_}=={_}" . $_GET['baogaodan'] . " {~}f_fsfy_1510201012_000{_}=={_}" . $_GET['id']; //帅选条件 $cUSafe = "4"; //安全级别 $cUSort = ""; //排序 $cDWxin_V10C_150513 = Vic_Dir_Search("151010100204.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); /* echo "<pre>"; print_r($_RESULT->Resgrd);echo "<pre>";die;*/ $this->APPTml->Setvar("list", $_RESULT->Resgrd); }
function K22Pr($iResult, $iKey) { $_OBJECT =& $this->APPObj; $_IMPORT =& $this->IMPORT; $mDMac = $iResult->GetField("f_wire_1411121421_P01", $iKey); //设备MAC $mVlan = $iResult->GetField("f_wire_1411121421_010", $iKey); //接入vlan $mUsrID = $this->MakeUsrID(); //接入用户ID $mUsrNA = $mUsrID; //接入用户名称 $mUsrPS = "123456"; //接入用户密码 //创建用户 $uIf_AA = "{~}f_wire_1506031750_003{_}%%{_}" . $mDMac . "|" . $mVlan; $uDBase = Vic_Dir_Search("150603193303.INI", "/" . $this->APPCls->Getvar("RunPath") . "/Sql/", 0, "T"); $uRs_AA = $_OBJECT["DB"]->GetSource(Common::$_UsrInf->Getvar("UsrWK"), 2, $uDBase, "*", $uIf_AA, "", null, 1); if ($_OBJECT["DB"]->RowsCT($uRs_AA->Resval) > 0) { $mUsrID = $uRs_AA->GetField("f_wire_1506031750_P01"); $mUsrNA = $uRs_AA->GetField("f_wire_1506031750_011"); $mUsrPS = $uRs_AA->GetField("f_wire_1506031750_002"); } else { //查询区域信息 $qIf_AA = "{~}f_wire_1411241716_P01{_}=={_}" . $iResult->GetField("f_wire_1411121421_013", $iKey); $qDBase = Vic_Dir_Search("141124085601.INI", "/" . $this->APPCls->Getvar("RunPath") . "/Sql/", 0, "T"); $qRs_AA = $_OBJECT["DB"]->GetSource(Common::$_UsrInf->Getvar("UsrWK"), 2, $qDBase, "*", $qIf_AA, "", null, 1); if ($_OBJECT["DB"]->RowsCT($qRs_AA->Resval) > 0) { $uPrsVAL["f_wire_1506031750_P01"] = $mUsrID; //接入用户ID $uPrsVAL["f_wire_1506031750_E01"] = $qRs_AA->GetField("f_wire_1411241716_025"); //用户分组 $uPrsVAL["f_wire_1506031750_002"] = $mUsrPS; //登录密码 $uPrsVAL["f_wire_1506031750_003"] = $mDMac . "|" . $mVlan; //设备MAC $uPrsVAL["f_wire_1506031750_004"] = 0; //启用状态 $uPrsVAL["f_wire_1506031750_011"] = $mUsrNA; //接入用户名称 $uPrsVAL["AreID"] = $iResult->GetField("f_wire_1411121421_013", $iKey); //区域编号 $uPrsVAL["IM_PST"] = "1"; $uPrsVAL["IM_HND"] = "20"; $uPrsVAL["IM_Range"] = "f_wire_1506031750_000||0"; Common::Start("150604142704", "", $uPrsVAL); } else { trigger_error("ER@验证出错!", NOTIC); } } //资料补全后操作 $iResult->SetField("f_wire_1411121421_002", $mUsrID, $iKey); //用户编号 $iResult->SetField("f_wire_1411121421_003", $mUsrNA, $iKey); //用户名称 $iResult->SetField("f_wire_1411121421_008", "", $iKey); //清空唯一码 $iResult->SetField("f_wire_1411121421_011", "2", $iKey); //认证模式 }
function C10Pr() { if (empty($_GET['open_id'])) { header('Location: https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxab617f2e3701ed23&redirect_uri=http://dev.369itil.com/?IM_SRC=151010100202&response_type=code&scope=snsapi_userinfo&state=4#wechat_redirect'); die; } else { $_OBJECT =& $this->APPObj; $_IMPORT =& $this->IMPORT; $_RESULT =& $this->Result; $cField = "*"; //查找的字段 $cWhere = "{~}f_fsfy_1510101011_006{_}=={_}" . $_GET['open_id']; //帅选条件 $cUSafe = "4"; //安全级别 $cUSort = ""; //排序 $cDWxin_V10C_150513 = Vic_Dir_Search("151010100103.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); //print_r($_RESULT->Resgrd); $this->APPTml->Setvar("list", $_RESULT->Resgrd); $this->APPTml->Setvar("IM_SRC", $_GET['IM_SRC']); } //$this->APPTml->Setvar("test1",$arr); //print_r($_RESULT);exit; }
function C15Pr() { $_OBJECT =& $this->APPObj; $_IMPORT =& $this->IMPORT; $_RESULT =& $this->Result; $cField = "*"; //查找的字段 //print_r($_POST);die; $cWhere = "{~}f_fsfy_1510201011_003{_}=={_}" . $_POST['mother_name'] . " {~}f_fsfy_1510201011_012{_}=={_}" . $_POST['mobile'] . " {~}f_fsfy_1510201011_005{_}=={_}" . $_POST['birth_date']; //帅选条件 $cUSafe = "4"; //安全级别 $cUSort = ""; //排序 $cDWxin_V10C_150513 = Vic_Dir_Search("151010100000.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); $data = $_RESULT->Resgrd; if ($data[0]['f_fsfy_1510201011_012'] == '') { $arr['rel'] = 1; echo json_encode($arr); //未在医院注册 } else { $arr['rel'] = 2; $arr['cardid'] = $data[0]['f_fsfy_1510201011_002']; echo json_encode($arr); } }
function getAccess_token($User) { $_OBJECT =& $this->APPObj; $_IMPORT =& $this->IMPORT; $bResult = ""; //检查token是否过期 if (isset($_SESSION["Wxin_Token_" . $User]) && time() - $_SESSION["Wxin_Creat_Time_" . $User] < $_SESSION["Wxin_Lift_Time_" . $User]) { $bResult = $_SESSION["Wxin_Token_" . $User]; } else { //查询公众号信息 $cField = "*"; $cWhere = "{~}f_wxin_1412311029_010{_}=={_}" . $User; $cUSafe = "4"; $cUSort = "f_wxin_1412311029_002 asc"; $cDWxin_V10C_150513 = Vic_Dir_Search("141231094501.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); $SendData["appid"] = $_RESULT->GetField("f_wxin_1412311029_006"); $SendData["secret"] = $_RESULT->GetField("f_wxin_1412311029_007"); $_OBJECT["SP"]->Sureface('INC-141215-007_0007/GetToken', $BackAy, $SendData); if ($BackAy["ST"] == "OK") { $ResultAy = json_decode($BackAy["RS"], true); $bResult = $ResultAy["access_token"]; //设置token缓存 $_SESSION["Wxin_Token_" . $User] = $bResult; $_SESSION["Wxin_Creat_Time_" . $User] = time(); $_SESSION["Wxin_Lift_Time_" . $User] = $ResultAy["expires_in"]; } } return $bResult; }
function Begin() { $_OBJECT =& $this->APPObj; $_IMPORT =& $this->IMPORT; if ($this->IN_HND == 20 || $this->IN_HND == 22) { if (empty($_IMPORT["f_wire_1411241716_002"]) || empty($_IMPORT["f_wire_1411241716_004"])) { $_IMPORT["f_wire_1411241716_004"] = $_IMPORT["f_wire_1411241716_003"]; } if (!empty($_IMPORT["PID"])) { $cField = "*"; $cWhere = "{~}f_wire_1411241716_P01{_}=={_}" . $_IMPORT["PID"]; $cUSafe = "4"; $cUSort =& $Pagination->PgSort; $cDBase = Vic_Dir_Search("141124085601.INI", "/" . $this->APPCls->Getvar("RunPath") . "/Sql/", 0, "T"); $cUsrWK = Common::$_UsrInf->Getvar("UsrWK"); $cTable = $_OBJECT["DB"]->GetSource($cUsrWK, $cUSafe, $cDBase, $cField, $cWhere, "", NULL, 1); if ($_OBJECT["DB"]->RowsCT($cTable->Resval)) { $Fi002 = $cTable->GetField("f_wire_1411241716_002"); $Fi004 = $cTable->GetField("f_wire_1411241716_004"); $_IMPORT["f_wire_1411241716_002"] = $Fi002; $_IMPORT["f_wire_1411241716_004"] = $Fi004 . "." . $_IMPORT["f_wire_1411241716_003"]; $_IMPORT["f_wire_1411241716_005"] = $Fi002; } } } return parent::Begin(); }
function K24Pr($iResult, $iKey) { $_OBJECT =& $this->APPObj; $_IMPORT =& $this->IMPORT; $_RESULT =& $this->Result; $cRange = array(); $cString = 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); //查询系统默认组--接待大厅编号 $cField = "*"; $cWhere = "{~}f_wxin_1501071059_E01{_}=={_}" . $_IMPORT["APars"] . "{~}f_wxin_1501071059_001{_}=={_}接待大厅" . "{~}f_wxin_1501071059_003{_}=={_}1"; $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); $cGroup = $_RESULT->GetField("f_wxin_1501071059_P01"); for ($i = 1; $i < sizeof($cRange); $i++) { //查用户组 $cField = "*"; $cWhere = "{~}f_wxin_1501071059_P01{_}=={_}" . $cRange[$i]; $cUSafe = "4"; $cUSort = ""; $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); for ($Ci = 0; $Ci < sizeof($_RESULT->Resgrd); $Ci++) { //查用户 $cField = "*"; $cWhere = "{~}f_wxin_1501070920_E01{_}=={_}" . $cRange[$i]; $cUSafe = "4"; $cUSort = ""; $cDWxin_V10C_150513 = Vic_Dir_Search("141231094201.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); for ($cI = 0; $cI < sizeof($_RESULT->Resgrd); $cI++) { $cBianhao = $_RESULT->GetField("f_wxin_1501070920_000", $cI); $cParent = $_RESULT->GetField("f_wxin_1501070920_E01", $cI); $cPrsVAL["f_wxin_1501070920_E01"] = $cGroup; //组别 $cPrsVAL["IM_HND"] = "22"; $cPrsVAL["IM_PST"] = "1"; $cPrsVAL["IM_Range"] = "f_wxin_1501070920_000||" . $cBianhao; Common::Start("141231094202", "", $cPrsVAL); } $cGroup = $_RESULT->GetField("f_wxin_1501071059_000", $Ci); $cPrsVAL["IM_HND"] = "24"; $cPrsVAL["IM_PST"] = "1"; $cPrsVAL["IM_Range"] = "f_wxin_1501071059_000||" . $cGroup; Common::Start("141231094101", "", $cPrsVAL); } } } }
function GetType() { $_OBJECT =& $this->APPObj; $cIf_AA = ""; $cUSort = "f_fsfy_1510101011_000 ASC"; $cDBase = Vic_Dir_Search("151010101014.INI", "/" . $this->APPCls->Getvar("RunPath") . "/Sql/", 0, "T"); $cRs_AA = $_OBJECT["DB"]->GetSource(Common::$_UsrInf->Getvar("UsrWK"), 4, $cDBase, "*", $cIf_AA, $cUSort, null, -1); return $_OBJECT["DB"]->RowsCT($cRs_AA->Resval) > 0 ? $cRs_AA->Resgrd : false; }
function C30Pr() { //die("343"); require_once Vic_Dir_Search("0000000002.PHP", "/" . $this->APPCls->Getvar("RunPath") . "/Prg/", 0, "T"); echo Wechat_scret; echo "<br/>"; echo '-----------------cheng'; echo "<br/>"; }
function K20Pr($iResult, $iKey) { $_OBJECT =& $this->APPObj; $_IMPORT =& $this->IMPORT; //海珠家园app临时出来方法:Begin// if (isset($_IMPORT["IM_AppID"]) && $_IMPORT["IM_AppID"] == "USS-150625-001") { $_IMPORT["f_wire_1506031750_E01"] = "GOU-150715-009"; $_IMPORT["AreID"] = "ARE-150324-004"; } //海珠家园app临时出来方法:End// //查询分组信息 $cIf_AA = "{~}f_wire_1507142038_P01{_}=={_}" . $_IMPORT["f_wire_1506031750_E01"]; $cDBase = Vic_Dir_Search("150715094602.INI", "/" . $this->APPCls->Getvar("RunPath") . "/Sql/", 0, "T"); $cRs_AA = $_OBJECT["DB"]->GetSource(Common::$_UsrInf->Getvar("UsrWK"), 4, $cDBase, "*", $cIf_AA, null, null, 1); if ($_OBJECT["DB"]->RowsCT($cRs_AA->Resval) > 0) { $iResult->SetField("f_wire_1506031750_E01", $cRs_AA->GetField("f_wire_1507142038_P01"), $iKey); $iResult->SetField("f_wire_1506031750_E02", $cRs_AA->GetField("f_wire_1507142038_002"), $iKey); $iResult->SetField("f_wire_1506031750_C01", $cRs_AA->GetField("f_wire_1507142038_004"), $iKey); //用户导入相应区域:Begin// if (isset($_IMPORT["AreID"]) && $_IMPORT["AreID"]) { $cPrsVAL["f_wire_1506031751_P01"] = $_IMPORT["f_wire_1506031750_P01"]; //用户编号 $cPrsVAL["f_wire_1506031751_E01"] = $cRs_AA->GetField("f_wire_1507142038_P01"); //从属组织 $cPrsVAL["f_wire_1506031751_E02"] = $cRs_AA->GetField("f_wire_1507142038_002"); //组织路径 $cPrsVAL["f_wire_1506031751_C01"] = $cRs_AA->GetField("f_wire_1507142038_004"); //名称路径 $cPrsVAL["f_wire_1506031751_002"] = $_IMPORT["f_wire_1506031750_002"]; //用户密码 $cPrsVAL["f_wire_1506031751_003"] = $_IMPORT["f_wire_1506031750_011"]; //用户名称 $cPrsVAL["f_wire_1506031751_004"] = $_IMPORT["AreID"]; //区域编号 $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); } //用户导入相应区域:End// //分组属性分拆 if ($cRs_AA->GetField("f_wire_1507142038_007")) { $GouPro = explode(",", $cRs_AA->GetField("f_wire_1507142038_007")); foreach ($GouPro as $Key => $Val) { $SendPrams[Common::FindFL("=", 0, $Val)] = Common::FindFL("=", 1, $Val); } } } $SendPrams["revealUsername"] = $_IMPORT["f_wire_1506031750_P01"]; //登录帐号 $SendPrams["password"] = $_IMPORT["f_wire_1506031750_002"]; //登录密码 $_OBJECT["SP"]->Sureface('INC-141127-004_0004/Add', $BackJSN, $SendPrams); //联动AP增加用户 }
function C28Pr() { $_OBJECT =& $this->APPObj; $_RESULT =& $this->Result; $_IMPORT =& $this->IMPORT; //检查用户所属区域合法性 if (isset($_IMPORT["Area"]) && $_IMPORT["Area"]) { $qWhere = "{~}f_wire_1506031751_P01{_}=={_}" . $_IMPORT["f_wire_1506031750_P01"]; $qDBase = Vic_Dir_Search("150723110801.INI", "/" . $this->APPCls->Getvar("RunPath") . "/Sql/", 0, "T"); $qUsrWK = Common::$_UsrInf->Getvar("UsrWK"); $qRs_AA = $_OBJECT["DB"]->GetSource($qUsrWK, 4, $qDBase, "*", $qWhere, "f_wire_1506031751_000 asc", NULL, -1); if ($_OBJECT["DB"]->RowsCT($qRs_AA->Resval) > 0 && $qRs_AA->GetField("f_wire_1411241716_P01") == $_IMPORT["Area"]) { $cWhere = "{~}f_wire_1506031750_P01{_}=={_}" . $_IMPORT["f_wire_1506031750_P01"] . "{~}f_wire_1506031750_002{_}=={_}" . $_IMPORT["f_wire_1506031750_002"]; $cDBase = Vic_Dir_Search("150603193303.INI", "/" . $this->APPCls->Getvar("RunPath") . "/Sql/", 0, "T"); $cUsrWK = Common::$_UsrInf->Getvar("UsrWK"); $uRs_AA = $_OBJECT["DB"]->GetSource($cUsrWK, 4, $cDBase, "*", $cWhere, "f_wire_1506031750_000 asc", NULL, -1); if ($_OBJECT["DB"]->RowsCT($uRs_AA->Resval) > 0) { if ($uRs_AA->GetField("f_wire_1506031750_004") == 0) { if (strstr($uRs_AA->GetField("f_wire_1506031750_003"), $_IMPORT["UserMac"]) == false) { $uPrsVAL["f_wire_1506031750_003"] = $uRs_AA->GetField("f_wire_1506031750_003") ? $uRs_AA->GetField("f_wire_1506031750_003") . "," . $_IMPORT["UserMac"] : $_IMPORT["UserMac"]; //设备MAC域 // $uPrsVAL["IM_PST"] = "1"; // $uPrsVAL["IM_HND"] = "22"; // $uPrsVAL["IM_Range"] = "f_wire_1506031750_P01||".$_IMPORT["f_wire_1506031750_P01"]; // Common::Start("150605101704","",$uPrsVAL); $uCSql = "UPDATE t_wire_1506031750 SET f_wire_1506031750_S06=NOW(),f_wire_1506031750_003='" . $uPrsVAL["f_wire_1506031750_003"] . "' WHERE f_wire_1506031750_P01='" . $_IMPORT["f_wire_1506031750_P01"] . "'"; array_push($_OBJECT["DB"]->Querys, $uCSql); } // $dPrsVAL["f_wire_1411121421_002"] = $uRs_AA->GetField("f_wire_1506031750_P01"); //接入用户ID // $dPrsVAL["f_wire_1411121421_003"] = $uRs_AA->GetField("f_wire_1506031750_011"); //接入用户名称 // $dPrsVAL["f_wire_1411121421_011"] = 4; //认证模式 // $dPrsVAL["IM_PST"] = "1"; // $dPrsVAL["IM_HND"] = "22"; // $dPrsVAL["IM_Range"] = "f_wire_1411121421_P01||".Common::FindFL("|",0,$_IMPORT["UserMac"]); // $dPrsVAL["IM_Where"] = "{~}f_wire_1411121421_010{_}=={_}".Common::FindFL("|",1,$_IMPORT["UserMac"]); // Common::Start("141112093206","",$dPrsVAL); $iCSql = "UPDATE t_wire_1411121421 SET f_wire_1411121421_S06=NOW(),f_wire_1411121421_006=NOW(),f_wire_1411121421_002='" . $uRs_AA->GetField("f_wire_1506031750_P01") . "',f_wire_1411121421_003='" . $uRs_AA->GetField("f_wire_1506031750_011") . "',f_wire_1411121421_011=4 WHERE f_wire_1411121421_P01='" . Common::FindFL("|", 0, $_IMPORT["UserMac"]) . "' AND f_wire_1411121421_010='" . Common::FindFL("|", 1, $_IMPORT["UserMac"]) . "'"; array_push($_OBJECT["DB"]->Querys, $iCSql); $_OBJECT["DB"]->FillBatch(); } else { trigger_error("ER@该帐号已被禁用,请联系管理员!", NOTIC); } } else { trigger_error("ER@帐号或者密码错误!", NOTIC); } } else { trigger_error("ER@该区域不存在该用户!", NOTIC); } } else { trigger_error("ER@该区域不存在该用户!", NOTIC); } }
function C28Pr() { $_OBJECT =& $this->APPObj; $_IMPORT =& $this->IMPORT; $eList = array(); $nList = array(); //去掉头元素 $iList = explode("||", $_IMPORT["APars"]); array_shift($iList); //检查数据是否存在 $rWhere = "{~}f_wire_1507080936_004{_}=={_}" . $_IMPORT["f_wire_1507080936_004"] . "{~}f_wire_1507080936_E02{_}=={_}" . implode("||", $iList); $rDBase = Vic_Dir_Search("150605064303.INI", "/" . $this->APPCls->Getvar("RunPath") . "/Sql/", 0, "T"); $rUsrWK = Common::$_UsrInf->Getvar("UsrWK"); $rRs_AA = $_OBJECT["DB"]->GetSource($rUsrWK, 4, $rDBase, "*", $rWhere, NULL, NULL, -1); if ($_OBJECT["DB"]->RowsCT($rRs_AA->Resval) > 0) { foreach ($rRs_AA->Resgrd as $key => $val) { $eList[] = $val["f_wire_1507080936_E02"]; } } $nList = array_diff($iList, $eList); //广播信息批量增加 if ($_IMPORT["BPars"] == "I") { foreach ($nList as $key => $val) { $rPrsVAL["f_wire_1507080936_E02"] = $val; $rPrsVAL["f_wire_1507080936_003"] = $_IMPORT["f_wire_1507080936_003"]; $rPrsVAL["f_wire_1507080936_004"] = $_IMPORT["f_wire_1507080936_004"]; $rPrsVAL["IM_PST"] = "1"; $rPrsVAL["IM_HND"] = 20; $rPrsVAL["IM_Range"] = "f_wire_1507080936_000||0"; Common::Start("150605064304", "", $rPrsVAL); } } //广播信息批量编辑 if ($_IMPORT["BPars"] == "U" && count($eList) > 0) { $rPrsVAL["f_wire_1507080936_003"] = $_IMPORT["f_wire_1507080936_003_NEW"]; $rPrsVAL["f_wire_1507080936_004"] = $_IMPORT["f_wire_1507080936_004_NEW"]; $rPrsVAL["IM_PST"] = "1"; $rPrsVAL["IM_HND"] = 22; $rPrsVAL["IM_Range"] = "f_wire_1507080936_E02||" . implode("||", $eList); $rPrsVAL["IM_Where"] = "{~}f_wire_1507080936_004{_}=={_}" . $_IMPORT["f_wire_1507080936_004"]; Common::Start("150605064304", "", $rPrsVAL); } //广播信息批量删除 if ($_IMPORT["BPars"] == "D" && count($eList) > 0) { $rPrsVAL["IM_PST"] = "1"; $rPrsVAL["IM_HND"] = 24; $rPrsVAL["IM_Range"] = "f_wire_1507080936_E02||" . implode("||", $eList); $rPrsVAL["IM_Where"] = "{~}f_wire_1507080936_004{_}=={_}" . $_IMPORT["f_wire_1507080936_004"]; Common::Start("150605064303", "", $rPrsVAL); } }
function C11Pr() { $_OBJECT =& $this->APPObj; $_IMPORT =& $this->IMPORT; $_RESULT =& $this->Result; $cField = "*"; $cWhere = ""; $cUSafe = "4"; $cUSort = "f_wsite_1508201422_000 asc"; $cDWxin_V10C_150513 = Vic_Dir_Search("150821100901.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); //print_r($_RESULT->Resgrd); //echo json_encode($_RESULT->Resgrd);exit; //$this->APPTml->Setvar("EX_Result",$_RESULT); }
function C10Pr() { $_OBJECT =& $this->APPObj; $_IMPORT =& $this->IMPORT; $_RESULT =& $this->Result; $cField = "*"; //查找的字段 $cWhere = "{~}f_wsite_1508201444_E01{_}=={_}" . 'TYP-150824-004'; //帅选条件 $cUSafe = "4"; //安全级别 $cUSort = "f_wsite_1508201444_000 asc"; //排序 $cDWxin_V10C_150513 = Vic_Dir_Search("150917105721.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); //print_r($_RESULT->Resgrd); $this->APPTml->Setvar("list", $_RESULT->Resgrd); }
function C10Pr() { $_OBJECT =& $this->APPObj; $_IMPORT =& $this->IMPORT; $_RESULT =& $this->Result; $cField = "*"; //查找的字段 $cWhere = "{~}f_fsfy_1510101040_000{_}=={_}" . $_GET['id']; //帅选条件 $cUSafe = "4"; //安全级别 $cUSort = "f_fsfy_1510101040_000 asc"; //排序 $cDWxin_V10C_150513 = Vic_Dir_Search("151010100216.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); $this->APPTml->Setvar("list", $_RESULT->Resgrd); //$this->APPTml->Setvar("test1",$arr); //print_r($_RESULT);exit; }
function C13Pr() { $_OBJECT =& $this->APPObj; $_IMPORT =& $this->IMPORT; $cField = "f_wire_1411140703_P01,f_wire_1411140703_002"; $cWhere = "{~}f_wire_1411140703_005{_}=={_}1{~}f_wire_1411140703_004{_}=={_}" . $_IMPORT["IM_Type"]; $cUSafe = "4"; $cUSort = "f_wire_1411140703_000 desc"; $cDBase = Vic_Dir_Search("141114071509.INI", "/" . $this->APPCls->Getvar("RunPath") . "/Sql/", 0, "T"); $cUsrWK = Common::$_UsrInf->Getvar("UsrWK"); $_RESULT = $_OBJECT["DB"]->GetSource($cUsrWK, $cUSafe, $cDBase, $cField, $cWhere, $cUSort, NULL, -1); $cOption[0]["id"] = 0; $cOption[0]["text"] = "请选择模版"; for ($cI = 0; $cI < sizeof($_RESULT->Resgrd); $cI++) { $cOption[$cI + 1]["id"] = $_RESULT->GetField("f_wire_1411140703_P01", $cI); //模版编号 $cOption[$cI + 1]["text"] = $_RESULT->GetField("f_wire_1411140703_002", $cI); //模版名称 } echo json_encode($cOption); exit; }
function C13Pr() { $_OBJECT =& $this->APPObj; $_IMPORT =& $this->IMPORT; $cField = "f_wxin_1411281708_000,f_wxin_1411281708_002"; $cWhere = "{~}f_wxin_1411281708_005{_}=={_}1{~}f_wxin_1411281708_004{_}=={_}" . $_IMPORT["IM_Type"]; $cUSafe = "4"; $cUSort = "f_wxin_1411281708_000 desc"; $cDWxin_V10C_150513 = Vic_Dir_Search("141114071509.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); $cOption[0]["id"] = 0; $cOption[0]["text"] = "ÇëÑ¡ÔñÄ£°æ"; for ($cI = 0; $cI < sizeof($_RESULT->Resgrd); $cI++) { $cOption[$cI + 1]["id"] = $_RESULT->GetField("f_wxin_1411281708_000", $cI); //Ä£°æ±àºÅ $cOption[$cI + 1]["text"] = $_RESULT->GetField("f_wxin_1411281708_002", $cI); //Ä£°æÃû³Æ } echo json_encode($cOption); exit; }
function C10Pr() { echo "调用接口"; die; $_OBJECT =& $this->APPObj; $_IMPORT =& $this->IMPORT; $_RESULT =& $this->Result; $cField = "*"; //查找的字段 $cWhere = ""; //帅选条件 $cUSafe = "4"; //安全级别 $cUSort = "f_wsite_150825103020_000 asc"; //排序 $cDWxin_V10C_150513 = Vic_Dir_Search("150825103020.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); //print_r($_RESULT->Resgrd); $this->APPTml->Setvar("list", $_RESULT->Resgrd); //$this->APPTml->Setvar("test1",$arr); }
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(); }
function C10Pr() { $_OBJECT =& $this->APPObj; $_IMPORT =& $this->IMPORT; $_RESULT =& $this->Result; $succ_result = 0; $error_result = 0; if (!empty($_FILES['inport_file'])) { //print_r($_FILES['inport_file']);exit; $file = $_FILES['inport_file']; $max_size = "2000000"; //最大文件限制(单位:byte) $fname = $file['name']; $ftype = strtolower(substr(strrchr($fname, '.'), 1)); //文件格式 $uploadfile = $file['tmp_name']; if ($_SERVER['REQUEST_METHOD'] == 'POST') { if (is_uploaded_file($uploadfile)) { if ($file['size'] > $max_size) { echo "Import file is too large"; exit; } if ($ftype != 'xls') { echo "Import file type is error"; exit; } } else { echo "上传文件不能为空"; exit; } } //die; //error_reporting(0); require_once './Fsfy_V10C_151008/Prg/0000000000/phpexcel/Classes/PHPExcel.php'; require_once './Fsfy_V10C_151008/Prg/0000000000/phpexcel/Classes/PHPExcel/IOFactory.php'; require_once './Fsfy_V10C_151008/Prg/0000000000/phpexcel/Classes/PHPExcel/Reader/Excel5.php'; /**对excel里的日期进行格式转化*/ $objReader = PHPExcel_IOFactory::createReader('Excel5'); //use excel2007 for 2007 format //$objPHPExcel = $objReader->load('test.xls'); $objPHPExcel = $objReader->load($uploadfile); $sheet = $objPHPExcel->getSheet(0); $highestRow = $sheet->getHighestRow(); // 取得总行数 $highestColumn = $sheet->getHighestColumn(); // 取得总列数 $arr_result = array(); $strs = array(); //echo 666989;die; $arr_result = NULL; for ($j = 2; $j <= $highestRow; $j++) { unset($arr_result); unset($strs); for ($k = 'A'; $k <= $highestColumn; $k++) { //读取单元格 //$arr_result.= $objPHPExcel->getActiveSheet()->getCell("$k$j")->getValue().','; $excel_data[$k] = $objPHPExcel->getActiveSheet()->getCell("{$k}{$j}")->getValue(); } $cPrsVAL["f_fsfy_1510201011_S01"] = "{ECAFBD3E-4739-7267-B02A-0341390581E8}"; //卡片号 $cPrsVAL["f_fsfy_1510201011_S05"] = "*****@*****.**"; //卡片号 $cPrsVAL["f_fsfy_1510201011_001"] = $excel_data['A']; // $cPrsVAL["f_fsfy_1510201011_002"] = $excel_data['B']; //卡片号 $cPrsVAL["f_fsfy_1510201011_003"] = $excel_data['C']; //母亲姓名 $cPrsVAL["f_fsfy_1510201011_004"] = $excel_data['D']; //消息类型 $cPrsVAL["f_fsfy_1510201011_005"] = $this->excelTime($excel_data['E']); $cPrsVAL["f_fsfy_1510201011_006"] = $excel_data['F']; //对话类型 $cPrsVAL["f_fsfy_1510201011_007"] = $excel_data['G']; //文本内容 $cPrsVAL["f_fsfy_1510201011_008"] = $excel_data['H']; //公众号 $cPrsVAL["f_fsfy_1510201011_009"] = $excel_data['I']; //床号 $cPrsVAL["f_fsfy_1510201011_010"] = $excel_data['J']; // $cPrsVAL["f_fsfy_1510201011_011"] = $excel_data['K']; //归属组 $cPrsVAL["f_fsfy_1510201011_012"] = $excel_data['L']; //手机号 $cPrsVAL["IM_HND"] = "20"; $cPrsVAL["IM_PST"] = "1"; $cPrsVAL["IM_Range"] = "f_fsfy_1510201011_000||0"; //print_r($cPrsVAL); die; Common::Start("151010100111", "", $cPrsVAL); header('Location: http://58.67.198.90/?IM_SRC=151010100111'); } } $_POST['cardid'] = 10086; $cField = "*"; //查找的字段 if (!empty($_POST['cardid'])) { $cWhere = "{~}f_fsfy_1510201011_002{_}=={_}" . $_POST['cardid']; } else { $cWhere = ""; //帅选条件 } $cUSafe = "4"; //安全级别 $cUSort = "f_fsfy_1510201011_000 asc"; //排序 $cDWxin_V10C_150513 = Vic_Dir_Search("151010100111.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); $this->APPTml->Setvar("list", $_RESULT->Resgrd); //$this->APPTml->Setvar("test1",$arr); //print_r($_RESULT);exit; }
function GetInfo($cSql, $cIf_AA, $cUSort = null) { $_OBJECT =& $this->APPObj; $_IMPORT =& $this->IMPORT; $cDBase = Vic_Dir_Search($cSql . ".INI", "/" . $this->APPCls->Getvar("RunPath") . "/Sql/", 0, "T"); $cRs_AA = $_OBJECT["DB"]->GetSource(Common::$_UsrInf->Getvar("UsrWK"), 2, $cDBase, "*", $cIf_AA, $cUSort, null, -1); return $cRs_AA; }
function C17Pr() { //不能重复绑定 $_OBJECT =& $this->APPObj; $_IMPORT =& $this->IMPORT; $_RESULT =& $this->Result; $cField = "*"; //查找的字段 $cWhere = "{~}f_fsfy_151010100200_001{_}=={_}" . $_POST['mother_name'] . " {~}f_fsfy_151010100200_002{_}=={_}" . $_POST['mobile'] . " {~}f_fsfy_151010100200_004{_}=={_}" . $_POST['open_id']; //帅选条件 $cUSafe = "4"; //安全级别 $cUSort = ""; //排序 $cDWxin_V10C_150513 = Vic_Dir_Search("151010100200.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); $data = $_RESULT->Resgrd; if (!empty($data[0]['f_fsfy_151010100200_002'])) { echo 3; die; //已经绑定 } else { //未绑定则入库 $cPrsVAL["f_fsfy_151010100200_S01"] = "{ECAFBD3E-4739-7267-B02A-0341390581E8}"; $cPrsVAL["f_fsfy_151010100200_001"] = $_POST['mother_name']; $cPrsVAL["f_fsfy_151010100200_002"] = $_POST['mobile']; $cPrsVAL["f_fsfy_151010100200_003"] = $_POST['birth_date']; //出生日期 $cPrsVAL["f_fsfy_151010100200_004"] = $_POST['open_id']; //openid $userinfo_json['openid'] $cPrsVAL["IM_HND"] = "20"; $cPrsVAL["IM_PST"] = "1"; $cPrsVAL["IM_Range"] = "f_fsfy_151010100200_000||0"; //echo $_POST['mother_name']; Common::Start("151010100202", "", $cPrsVAL); $_SESSION['bangding'] = $_POST['open_id']; if ($_POST['state'] == 1) { header('Location: http://58.67.198.90/?IM_SRC=151010100200&open_id=' . $_POST['open_id']); } else { if ($_POST['state'] == 2) { header('Location: http://58.67.198.90/?IM_SRC=151010100203&open_id=' . $_POST['open_id']); } } } }
function C17Pr() { date_default_timezone_set('Europe/London'); /** PHPExcel */ require_once './Fsfy_V10C_151008/Prg/0000000000/phpexcel/Classes/PHPExcel.php'; // Create new PHPExcel object $objPHPExcel = new PHPExcel(); // Set properties $objPHPExcel->getProperties()->setCreator("Maarten Balliauw")->setLastModifiedBy("Maarten Balliauw")->setTitle("Office 2007 XLSX Test Document")->setSubject("Office 2007 XLSX Test Document")->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.")->setKeywords("office 2007 openxml php")->setCategory("Test result file"); $objPHPExcel->getActiveSheet()->mergeCells('A1:G1'); $objPHPExcel->getActiveSheet()->getStyle('A1')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); $objPHPExcel->getActiveSheet()->getColumnDimension('C')->setAutoSize(true); //调单元格宽度 $objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(20); $objPHPExcel->getActiveSheet()->getColumnDimension('E')->setWidth(20); // Add some data $_OBJECT =& $this->APPObj; $_IMPORT =& $this->IMPORT; $_RESULT =& $this->Result; $cField = "*"; //查找的字段 $cWhere = ""; //帅选条件 $cUSafe = "4"; //安全级别 $cUSort = ""; //排序 $cDWxin_V10C_150513 = Vic_Dir_Search("151010100119.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); $data = $_RESULT->Resgrd; $objPHPExcel->setActiveSheetIndex(0)->setCellValue('A2', "卡片号")->setCellValue('B2', '检测项目')->setCellValue('C2', '出生医院')->setCellValue('D2', '姓名')->setCellValue('E2', '性别')->setCellValue('F2', '出生日期')->setCellValue('G2', '手机号')->setCellValue('H2', '查阅次数 ')->setCellValue('I2', '解释结果 ')->setCellValue('J2', '发送状态 ')->setCellValue('K2', '发送状态 '); /* ->setCellValue('J2', '解释结果 ') ->setCellValue('K2', '发送状态 ') ->setCellValue('L2', '发送状态 ');*/ $i = 3; foreach ($data as $key => $val) { $al1 = "A" . $i; $al2 = "B" . $i; $al3 = "C" . $i; $al4 = "D" . $i; $al5 = "E" . $i; $al6 = "F" . $i; $al7 = "G" . $i; $al8 = "H" . $i; $al9 = "I" . $i; $a20 = "J" . $i; $a21 = "K" . $i; /* $al9 = "J".$i; $a20 = "K".$i; $a21 = "L".$i;*/ /* $21 = "L".$i;*/ $objPHPExcel->setActiveSheetIndex(0)->setCellValue($al1, $val['f_fsfy_1510201011_002'])->setCellValue($al2, $val['f_fsfy_1510201012_005'])->setCellValue($al3, $val['f_fsfy_1510201011_007'])->setCellValue($al4, $val['f_fsfy_1510201011_003'])->setCellValue($al5, $val['f_fsfy_1510201011_004'])->setCellValue($al6, $val['f_fsfy_1510201011_005'])->setCellValue($al7, $val['f_fsfy_1510201011_012'])->setCellValue($al8, $val['f_fsfy_1510201012_015'])->setCellValue($al9, $val['f_fsfy_1510201012_012'])->setCellValue($a20, $val['f_fsfy_1510201012_016'])->setCellValue($a21, $val['f_fsfy_1510201012_017']); $i++; } // Rename sheet $objPHPExcel->getActiveSheet()->setTitle('筛查报告'); // Set active sheet index to the first sheet, so Excel opens this as the first sheet $objPHPExcel->setActiveSheetIndex(0); // Redirect output to a client's web browser (Excel5) header('Content-Type: application/vnd.ms-excel'); header('Content-Disposition: attachment;filename="筛查报告.xls"'); header('Cache-Control: max-age=0'); $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); $objWriter->save('php://output'); exit; }
function menuData() { $_OBJECT =& $this->APPObj; $_IMPORT =& $this->IMPORT; $_RESULT =& $this->Result; $cField = "*"; $cWhere = "{~}f_wxin_1411281708_E08{_}=={_}" . $_IMPORT["APars"]; $cUSafe = "4"; $cUSort = "f_wxin_1411281708_002 asc"; $cDWxin_V10C_150513 = Vic_Dir_Search("141201092301.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); $cRetv = "[<!--" . md5("ROOT") . "-->]"; //print_r($_RESULT->Resgrd);exit; for ($cI = 0; $cI < sizeof($_RESULT->Resgrd); $cI++) { $cParent = $_RESULT->GetField("f_wxin_1411281708_005", $cI); if ($cParent == "") { $cParent = "ROOT"; } $cParent = "<!--" . md5($cParent) . "-->"; $cSubval = $_RESULT->GetField("f_wxin_1411281708_002", $cI); $cSubval = md5($cSubval); $regex = '@(?i)\\b((?:[a-z][\\w-]+:(?:/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:\'".,<>?«»“”‘’]))@'; $key = preg_match($regex, $_RESULT->GetField("f_wxin_1411281708_007", $cI)) ? "url" : "key"; $cOption = "{\"" . $key . "\":\"" . $_RESULT->GetField("f_wxin_1411281708_007", $cI) . "\"," . "\"type\":\"" . $_RESULT->GetField("f_wxin_1411281708_006", $cI) . "\"," . " \"name\":\"" . $_RESULT->GetField("f_wxin_1411281708_003", $cI) . "\"," . "\"sub_button\":[<!--" . $cSubval . "-->]}"; $cRetv = str_replace($cParent, $cOption . ($cI == sizeof($_RESULT->Resgrd) - 1 ? "" : ",") . $cParent, $cRetv); } $cRetv = preg_replace('/<!--(.*?)-->/is', "", $cRetv); $cRetv = str_replace(",\"sub_button\":[]", "", $cRetv); $cRetv = str_replace(",]", "]", $cRetv); $arr = json_decode($cRetv, true); for ($i = 0; $i < sizeof($arr); $i++) { $cNam[$i] = $arr[$i]['name']; $arr[$i]["name"] = $i . "name"; } $arr0 = ""; $arr1 = ""; $arr2 = ""; $carr0 = $arr[0]; if (sizeof($arr[0]) >= 4) { for ($i = 0; $i < sizeof($carr0["sub_button"]); $i++) { $sub_Nam[$i] = $carr0["sub_button"][$i]['name']; $carr0["sub_button"][$i]['name'] = $i . "sub_name"; } $carr0 = array_slice($carr0, -2, 4); $arr0 = json_encode($carr0); foreach ($sub_Nam as $key => $val) { $arr0 = str_replace($key . "sub_name", $val, $arr0); } } else { $arr0 = json_encode($carr0); } //一级菜单第二个 if (isset($arr[1])) { $carr1 = $arr[1]; if (sizeof($arr[1]) >= 4) { for ($i = 0; $i < sizeof($carr1["sub_button"]); $i++) { $sub_Nam1[$i] = $carr1["sub_button"][$i]['name']; $carr1["sub_button"][$i]['name'] = $i . "sub_name"; } $carr1 = array_slice($carr1, -2, 4); $arr1 = json_encode($carr1); foreach ($sub_Nam1 as $key => $val) { $arr1 = str_replace($key . "sub_name", $val, $arr1); } } else { $arr1 = json_encode($carr1); } } //一级菜单第三个 if (isset($arr[2])) { $carr2 = $arr[2]; if (sizeof($arr[2]) >= 4) { for ($i = 0; $i < sizeof($carr2["sub_button"]); $i++) { $sub_Nam2[$i] = $carr2["sub_button"][$i]['name']; $carr2["sub_button"][$i]['name'] = $i . "sub_name"; } $carr2 = array_slice($carr2, -2, 4); $arr2 = json_encode($carr2); foreach ($sub_Nam2 as $key => $val) { $arr2 = str_replace($key . "sub_name", $val, $arr2); } } else { $arr2 = json_encode($carr2); } } if ($arr1 != "") { if ($arr2 != "") { $cJSON = $arr0 . "," . $arr1 . "," . $arr2; } else { $cJSON = $arr0 . "," . $arr1; } } else { $cJSON = $arr0; } $cJSON = "{\"button\":[" . $cJSON . "]}"; foreach ($cNam as $key => $val) { $cJSON = str_replace($key . "name", $val, $cJSON); } return $cJSON; //返回菜单数据 }
function C12Pr() { $_OBJECT =& $this->APPObj; $_IMPORT =& $this->IMPORT; $_RESULT =& $this->Result; $cField = "*"; $cWhere = ""; $cUSafe = "4"; $cUSort = "f_wire_1507142038_000 asc"; $cDBase = Vic_Dir_Search("150715094602.INI", "/" . $this->APPCls->Getvar("RunPath") . "/Sql/", 0, "T"); $cUsrWK = Common::$_UsrInf->Getvar("UsrWK"); $_RESULT = $_OBJECT["DB"]->GetSource($cUsrWK, $cUSafe, $cDBase, $cField, $cWhere, $cUSort, NULL, -1); $cRetv = "[<!--" . md5("ROOT") . "-->]"; for ($cI = 0; $cI < sizeof($_RESULT->Resgrd); $cI++) { $cParent = $_RESULT->GetField("f_wire_1507142038_005", $cI); if ($cParent == "") { $cParent = "ROOT"; } $cParent = "<!--" . md5($cParent) . "-->"; $cSubval = $_RESULT->GetField("f_wire_1507142038_002", $cI); $cSubval = md5($cSubval); $cOption = "{\"id\":\"" . $_RESULT->GetField("f_wire_1507142038_P01", $cI) . "\"," . "\"text\":\"" . $_RESULT->GetField("f_wire_1507142038_003", $cI) . "\"," . "\"f_wire_1507142038_006\":\"" . $_RESULT->GetField("f_wire_1507142038_006", $cI) . "\"," . "\"attributes\":{\"name\":\"" . $_RESULT->GetField("f_wire_1507142038_002", $cI) . "\"}," . "\"state\":\"open\"," . "\"children\":[<!--" . $cSubval . "-->]}"; $cRetv = str_replace($cParent, $cOption . "," . $cParent, $cRetv); } $cRetv = preg_replace('/<!--(.*?)-->/is', "", $cRetv); $cRetv = str_replace(",\"state\":\"closed\",\"children\":[]", "", $cRetv); $cRetv = preg_replace('/\\,]/is', "]", $cRetv); $this->APPTml->Setvar("EX_TreeJSN", $cRetv); return -1; }
function C15Pr() { date_default_timezone_set('Europe/London'); /** PHPExcel */ require_once './Fsfy_V10C_151008/Prg/0000000000/phpexcel/Classes/PHPExcel.php'; // Create new PHPExcel object $objPHPExcel = new PHPExcel(); // Set properties $objPHPExcel->getProperties()->setCreator("Maarten Balliauw")->setLastModifiedBy("Maarten Balliauw")->setTitle("Office 2007 XLSX Test Document")->setSubject("Office 2007 XLSX Test Document")->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.")->setKeywords("office 2007 openxml php")->setCategory("Test result file"); $objPHPExcel->getActiveSheet()->mergeCells('A1:G1'); $objPHPExcel->getActiveSheet()->getStyle('A1')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); $objPHPExcel->getActiveSheet()->getColumnDimension('C')->setAutoSize(true); //调单元格宽度 $objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(20); $objPHPExcel->getActiveSheet()->getColumnDimension('E')->setWidth(20); // Add some data $_OBJECT =& $this->APPObj; $_IMPORT =& $this->IMPORT; $_RESULT =& $this->Result; $cField = "count(*) as total,f_fsfy_1510201014_008"; //查找的字段 if (!empty($_POST['yiyuan'])) { $cWhere = "{~}f_fsfy_1510201014_008{_}=={_}" . $_POST['yiyuan']; //帅选条件 } else { $cWhere = ""; //帅选条件 } $cUSafe = "4"; //安全级别 $cUSort = ""; //排序 $cDWxin_V10C_150513 = Vic_Dir_Search("151010100121.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); $data = $_RESULT->Resgrd; foreach ($data as $key => $val) { //echo $data[$key]['f_fsfy_1510201014_008']; $cField = "count(*) as was_guanzhu"; //查找的字段 $cWhere = "{~}f_fsfy_1510201014_008{_}=={_}" . $data[$key]['f_fsfy_1510201014_008']; //帅选条件 $cUSafe = "4"; //安全级别 $cUSort = ""; //排序 $cDWxin_V10C_150513 = Vic_Dir_Search("151010100122.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); $was_gz = $_RESULT->Resgrd; $data[$key]["was_gz"] = $was_gz[0]['was_guanzhu']; } $objPHPExcel->setActiveSheetIndex(0)->setCellValue('A2', "机构名称")->setCellValue('B2', '已绑定卡片数')->setCellValue('C2', '总卡片数')->setCellValue('D2', '比例'); $i = 3; foreach ($data as $key => $val) { $l1 = "A" . $i; $l2 = "B" . $i; $l3 = "C" . $i; $l4 = "D" . $i; $objPHPExcel->setActiveSheetIndex(0)->setCellValue($l1, $val['f_fsfy_1510201014_008'])->setCellValue($l2, $val['was_gz'])->setCellValue($l3, $val['total'])->setCellValue($l4, number_format($val['was_gz'] / $val['total'], 2) * 100 . "%"); $i++; } // Rename sheet $objPHPExcel->getActiveSheet()->setTitle('关注度统计'); // Set active sheet index to the first sheet, so Excel opens this as the first sheet $objPHPExcel->setActiveSheetIndex(0); // Redirect output to a client's web browser (Excel5) header('Content-Type: application/vnd.ms-excel'); header('Content-Disposition: attachment;filename="关注度统计.xls"'); header('Cache-Control: max-age=0'); $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); $objWriter->save('php://output'); exit; }
function C10Pr() { $_OBJECT =& $this->APPObj; $_IMPORT =& $this->IMPORT; $_RESULT =& $this->Result; $succ_result = 0; $error_result = 0; if (!empty($_FILES['inport_file'])) { //print_r($_FILES['inport_file']);exit; $file = $_FILES['inport_file']; $max_size = "2000000"; //最大文件限制(单位:byte) $fname = $file['name']; $ftype = strtolower(substr(strrchr($fname, '.'), 1)); //文件格式 $uploadfile = $file['tmp_name']; if ($_SERVER['REQUEST_METHOD'] == 'POST') { if (is_uploaded_file($uploadfile)) { if ($file['size'] > $max_size) { echo "Import file is too large"; exit; } $types = array("xls", "xlsx"); if (!in_array($ftype, $types)) { echo "Import file type is error"; exit; } /* if($ftype=='xls'||$ftype=='xlsx'){ echo "Import file type is error"; exit; }*/ } else { echo "The file is not empty!"; exit; } } //die; //error_reporting(0); require_once './Fsfy_V10C_151008/Prg/0000000000/phpexcel/Classes/PHPExcel.php'; require_once './Fsfy_V10C_151008/Prg/0000000000/phpexcel/Classes/PHPExcel/IOFactory.php'; require_once './Fsfy_V10C_151008/Prg/0000000000/phpexcel/Classes/PHPExcel/Reader/Excel5.php'; /**对excel里的日期进行格式转化*/ $objReader = PHPExcel_IOFactory::createReader('Excel5'); //use excel2007 for 2007 format //$objPHPExcel = $objReader->load('test.xls'); $objPHPExcel = $objReader->load($uploadfile); $sheet = $objPHPExcel->getSheet(0); $highestRow = $sheet->getHighestRow(); // 取得总行数 $highestColumn = $sheet->getHighestColumn(); // 取得总列数 $arr_result = array(); $strs = array(); //echo 666989;die; $arr_result = NULL; for ($j = 2; $j <= $highestRow; $j++) { unset($arr_result); unset($strs); for ($k = 'A'; $k <= $highestColumn; $k++) { //读取单元格 //$arr_result.= $objPHPExcel->getActiveSheet()->getCell("$k$j")->getValue().','; $excel_data[$k] = $objPHPExcel->getActiveSheet()->getCell("{$k}{$j}")->getValue(); } //print_r($excel_data); //消息插入数据库 $cPrsVAL["f_fsfy_1510201012_S01"] = "{ECAFBD3E-4739-7267-B02A-0341390581E8}"; $cPrsVAL["f_fsfy_1510201012_S05"] = "*****@*****.**"; $cPrsVAL["f_fsfy_1510201012_001"] = $excel_data['A']; //报告单号 $cPrsVAL["f_fsfy_1510201012_002"] = $excel_data['B']; //申请单号 $cPrsVAL["f_fsfy_1510201012_003"] = $excel_data['C']; //卡片号 $cPrsVAL["f_fsfy_1510201012_004"] = $excel_data['D']; //检验项目编码 $cPrsVAL["f_fsfy_1510201012_005"] = $excel_data['E']; //检验项目名称 $cPrsVAL["f_fsfy_1510201012_006"] = $this->excelTime($excel_data['F']); //对话类型 $cPrsVAL["f_fsfy_1510201012_007"] = $excel_data['G']; //报告人 $cPrsVAL["f_fsfy_1510201012_008"] = $excel_data['H']; $cPrsVAL["f_fsfy_1510201012_009"] = $this->excelTime($excel_data['I']); //床号 $cPrsVAL["f_fsfy_1510201012_010"] = $excel_data['J']; // $cPrsVAL["f_fsfy_1510201012_011"] = $excel_data['K']; // $cPrsVAL["f_fsfy_1510201012_012"] = $excel_data['L']; // $cPrsVAL["f_fsfy_1510201012_013"] = $excel_data['M']; //o $cPrsVAL["f_fsfy_1510201012_014"] = $excel_data['N']; //检测方法 $cPrsVAL["f_fsfy_1510201012_018"] = $excel_data['P']; //是否为复检 $cPrsVAL["IM_HND"] = "20"; $cPrsVAL["IM_PST"] = "1"; $cPrsVAL["IM_Range"] = "f_fsfy_1510201012_000||0"; //如有重复则删除 $cField = "*"; //查找的字段 $cWhere = "{~}f_fsfy_1510201012_003{_}=={_}" . $excel_data['C'] . " {~}f_fsfy_1510201012_005{_}=={_}" . $excel_data['E'] . " {~}f_fsfy_1510201012_018{_}=={_}" . $excel_data['P']; //帅选条件 $cUSafe = "4"; //安全级别 $cUSort = ""; //排序 $cDWxin_V10C_150513 = Vic_Dir_Search("151010100113.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); $rep = $_RESULT->Resgrd; //print_r($rep);die; if (!empty($rep[0]['f_fsfy_1510201012_005'])) { $ICSql = "delete from t_fsfy_1510201012 where f_fsfy_1510201012_000 = " . $rep[0]['f_fsfy_1510201012_000']; array_push($_OBJECT["DB"]->Querys, $ICSql); $_OBJECT["DB"]->FillBatch(); } //print_r(); Common::Start("151010100113", "", $cPrsVAL); echo "<script>alert('导入成功');</script>"; header('Location: http://58.67.198.90/?IM_SRC=151010100113'); } } $cField = "*"; //查找的字段 $cWhere = ""; //帅选条件 $cUSafe = "4"; //安全级别 $cUSort = "f_fsfy_1510201012_000 asc"; //排序 $cDWxin_V10C_150513 = Vic_Dir_Search("151010100113.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); //print_r($_RESULT->Resgrd); $this->APPTml->Setvar("list", $_RESULT->Resgrd); //$this->APPTml->Setvar("test1",$arr); //print_r($_RESULT);exit; }
function C26Pr() { $_OBJECT =& $this->APPObj; $_IMPORT =& $this->IMPORT; $_RESULT =& $this->Result; $cField = "*"; $cWhere = "{~}f_wxin_1412311029_010{_}=={_}" . $_IMPORT['APars']; $cUSafe = "4"; $cUSort = "f_wxin_1412311029_000 asc"; $cDWxin_V10C_150513 = Vic_Dir_Search("141231094501.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) { $hostname = $_RESULT->GetField("f_wxin_1412311029_011", 0); //FTP名 $loginname = $_RESULT->GetField("f_wxin_1412311029_014", 0); //FTP用户名 $password = $_RESULT->GetField("f_wxin_1412311029_015", 0); //FTP密码 $prjname = $_IMPORT['IM_Attributes']; $ftppath = $_IMPORT['FTP_Attributes']; $this->construct($hostname, $loginname, $password, $prjname, $ftppath); } }
function C17Pr() { include './Fsfy_V10C_151008/Prg/0000000000/000000000001.PHP'; $appid = 'wxab617f2e3701ed23'; $secret = '57712d6c44976654956d7edf3743c83c'; WechatLog("get---->" . var_export($_GET, true)); //记录请求的数据 // unset($_SESSION['openid']); if (!empty($_GET['code'])) { WechatLog("-----code-----"); //记录请求的数据 $code = $_GET['code']; $requestUrl = 'https://api.weixin.qq.com/sns/oauth2/access_token?'; $getonceToken = $requestUrl . "appid=" . $appid . "&secret=" . $secret . "&code=" . $code . "&grant_type=authorization_code"; $json = $this->CurlGet($getonceToken); WechatLog("临时的token" . var_export($json, true)); //记录请求的数据 if ($json) { $jsonArr = json_decode($json, true); $getOpenid = "https://api.weixin.qq.com/sns/userinfo?access_token=" . $jsonArr['access_token'] . "&openid=" . $jsonArr['openid']; $userinfo_json = $this->CurlGet($getOpenid); $userMsg = json_decode($userinfo_json, true); $_SESSION['openid'] = $userMsg['openid']; var_dump($userMsg); WechatLog("用户的信息" . var_export($userMsg, true)); //记录请求的数据 //echo $userinfo_json['openid'];die; } } if (!isset($_SESSION['openid'])) { WechatLog("null -openid---->" . var_export('wei kong---->>', true)); //记录请求的数据 $url = 'https://open.weixin.qq.com/connect/oauth2/authorize'; $redirect_uri = 'http://dev.369itil.com/?IM_SRC=151010100203&IM_HND=17'; $elseurl = '&act=select&response_type=code&scope=snsapi_userinfo&state=2#wechat_redirect'; $rqurl = $url . '?appid=' . $appid . '&redirect_uri=' . $redirect_uri . $elseurl; header('Location:' . $rqurl); exit; } // 根据openid获取卡信息 $_OBJECT =& $this->APPObj; // $_IMPORT = &$this->IMPORT; $_RESULT =& $this->Result; $cField = "*"; //查找的字段 $cWhere = "{~}f_fsfy_151010100200_004{_}=={_}" . $_SESSION['openid']; //帅选条件 $cUSafe = "4"; //安全级别 $cUSort = "f_fsfy_151010100200_000 asc"; //排序 $cDWxin_V10C_150513 = Vic_Dir_Search("151010100200.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); $data = $_RESULT->Resgrd; // echo count($data);die; echo $data[0]['f_fsfy_151010100200_002']; die; // $this->APPTml->Setvar("list",$wind); }