if (isset($_REQUEST["ajax"]) && $_REQUEST['ajax'] == 1) { require_once dirname(__FILE__) . "/models/push/JpushClient.php"; $paramRet = BIGAPPJSON::encode(array('request_id' => rand(1000000, 10000000000), 'error_code' => 100802, 'error_msg' => 'invalid param')); $authRet = BIGAPPJSON::encode(array('request_id' => rand(1000000, 10000000000), 'error_code' => 100803, 'error_msg' => 'auth failed')); $svrRet = BIGAPPJSON::encode(array('request_id' => rand(1000000, 10000000000), 'error_code' => 100800, 'error_msg' => 'internal server error')); if (!isset($_G['groupid']) || 1 != $_G['groupid']) { echo $authRet; die(0); } //1. 发送消息 if ($_REQUEST["action"] == 'submit') { $params = array("alias" => "all", "title" => $_REQUEST["title"], "content" => $_REQUEST["msg"], "istest" => 0); $ret = Bigapp_JpushClient::sendMessage($params); echo $ret; } else { if ($_REQUEST["action"] == 'query') { $resData = C::t("#bigapp#bigapp_push_message")->query(); echo BIGAPPJSON::encode(array("data" => $resData)); } else { echo $paramRet; } } die(0); } require_once dirname(__FILE__) . '/libs/menu.inc.php'; require_once dirname(__FILE__) . '/libs/verify.inc.php'; $params = array("groupid" => isset($_G['groupid']) ? intval($_G['groupid']) : 7, "appid" => $appid, "api" => BigappEnv::getSiteUrl() . "/plugin.php?id=bigapp:pushmsg&ajax=1"); $tplVars = array("plugin_path" => BigappEnv::getPluginPath()); Utils::loadTemplate(dirname(__FILE__) . '/view/pushmsg.tpl', $params, $tplVars); runlog('bigapp', 'show pushmsg page succ'); // vim600: sw=4 ts=4 fdm=marker syn=php
$sp = strpos($checkinurl, "?") === false ? "?" : "&"; $checkinurl .= $sp . "api_url=" . urlencode($apiurl); $checkinurl .= "&verify_info="; $params = array("ak" => "", "sk" => "", "vertify" => 0, "ajaxurl" => rtrim($_G['siteurl'], '/') . '/plugin.php?id=bigapp:certify&ajax=1', "checkin" => $checkinurl); $aksk = BigappEnv::getAkSk(); if ($aksk !== false) { $params["ak"] = $aksk["ak"]; $params["sk"] = $aksk["sk"]; $appinfo = BigappEnv::getAppInfoFromBigstation(); if ($appinfo !== false && $appinfo["verified"] == 1) { $params["vertify"] = 1; } $params["checkin"] .= BigappEnv::getAkSkMd5(); $params["pack_and_config_url"] = $pack_and_config_url; //!< defined in libs/menu.inc.php } //////////////////////////////////// //$apifile = dirname(dirname(dirname(dirname(__FILE__))))."/api/mobile/"; //$params["api_file_dir"] = $apifile; //$params["api_file_libs"] = dirname(__FILE__)."/libs/iyz_index.php"; //$params["api_file_exists"] = is_file($apifile."iyz_index.php"); $apifile = "/api/mobile/"; $params["api_file_dir"] = $apifile; $params["api_file_libs"] = "/source/plugin/bigapp/libs/iyz_index.php"; $params["api_file_exists"] = true; //is_file($apifile."iyz_index.php"); //////////////////////////////////// $tplVars = array("plugin_path" => BigappEnv::getPluginPath(), "myapp" => BigAppConf::$mcapis["myapp"], "apiurl" => $apiurl); Utils::loadTemplate(FILE_PATH . '/view/certify.tpl', $params, $tplVars); runlog('bigapp', 'show certify page succ'); // vim600: sw=4 ts=4 fdm=marker syn=php