本文整理汇总了PHP中callOpenSystem函数的典型用法代码示例。如果您正苦于以下问题:PHP callOpenSystem函数的具体用法?PHP callOpenSystem怎么用?PHP callOpenSystem使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了callOpenSystem函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: view_sendMessage
/**
* 功能:调用发送短信接口
* @param array $paramArr
* @param str $token
* @return void
* @author wxb
* date: 2013/11/1
*/
function view_sendMessage()
{
if (!isset($_SESSION)) {
@session_start();
}
if (!isset($_SESSION['userId'])) {
echo 'sendResult({"error_response":{"code":"176","msg":"no login"}})';
return;
}
if (empty($_GET['content']) || empty($_GET['from']) || empty($_GET['to']) || empty($_GET['type'])) {
echo 'sendResult({"error_response":{"code":"044","msg":"get param fail"}})';
return;
}
$content = trim($_GET['content']);
$from = trim($_GET['from']);
$to = trim($_GET['to']);
$type = trim($_GET['type']);
$callback = trim($_GET['callback']);
include_once "../api/include/opensys_functions.php";
$paramArr = array('method' => 'notice.send.message', 'format' => 'json', 'v' => '1.0', 'username' => 'Purchase', "content" => $content, "from" => $from, "to" => $to, "type" => $type, "callback" => $callback);
$res = callOpenSystem($paramArr);
if ($res) {
echo $res;
} else {
echo 'sendResult({"error_response":{"code":"1120","msg":"call open fail"}})';
}
}
示例2: sendMessage
/**
* MailApiModel::sendMessage()
* 发送信息
* @param string $type ems手机短信,email 邮件
* @param string $from 发件人
* @param string $to 收件人
* @param string $content 内容
* @param string $title 标题
* @return json string
*/
public static function sendMessage($type, $from, $to, $content, $title = '')
{
$paramArr = array('method' => 'notice.send.message', 'format' => 'json', 'v' => '1.0', 'username' => C('OPEN_SYS_USER'), 'type' => $type, 'from' => $from, 'to' => $to, 'content' => $content, 'title' => urlencode($title), 'sysName' => urlencode(C('AUTH_SYSNAME')));
$messageInfo = callOpenSystem($paramArr);
unset($paramArr);
return $messageInfo;
}
示例3: trans_carriers_fix_get
function trans_carriers_fix_get($ebay_carrier, $totalweight, $ebay_countryname)
{
//$b = microtime()."\r\n";
$username = 'finejo';
require_once "opensys_functions.php";
//开放系统文件
$paramArr = array('method' => 'trans.carriers.fix.get', 'format' => 'json', 'v' => '2.0', 'username' => $username);
if ($ebay_carrier == "新加坡小包挂号") {
$ebay_carrier = "新加坡邮政";
}
//$CarrierLists = getCarrierListById();
$CarrierLists = array(1 => "中国邮政平邮", 2 => "中国邮政挂号", 3 => "香港小包平邮", 4 => "香港小包挂号", 5 => "EMS", 6 => "EUB", 8 => "DHL", 9 => "FedEx", 10 => "Global Mail", 46 => "UPS Ground", 47 => "USPS", 48 => "顺丰快递", 49 => "圆通快递", 50 => "申通快递", 51 => "韵达快递", 52 => "新加坡邮政", 53 => "德国邮政挂号", 54 => "中通快递", 55 => "汇通快递", 56 => "国通快递", 57 => "加运美快递", 58 => "UPS", 59 => "飞腾DHL", 60 => "上门提货", 61 => "运德物流", 62 => "UPS美国专线", 63 => "英国专线挂号", 64 => "天天快递", 65 => "SurePost", 66 => "同城速递", 67 => "国内快递", 68 => "自提", 69 => "送货上门", 70 => "TNT", 71 => "城市之星物流", 72 => "优速快递", 73 => "速尔快递", 74 => "天地华宇物流", 75 => "德邦物流", 76 => "盛辉物流", 77 => "vietnam", 78 => "快捷快递", 79 => "俄速通挂号", 80 => "俄速通平邮", 81 => "俄速通大包", 82 => "海运运输", 83 => "新加坡DHL GM挂号", 84 => "新加坡DHL GM平邮", 85 => "郑州小包平邮", 86 => "郑州小包挂号", 87 => "瑞士小包平邮", 88 => "瑞士小包挂号", 89 => "比利时小包挂号", 90 => "比利时小包平邮", 91 => "USPS FirstClass", 92 => "UPS Ground Commercia", 93 => "澳邮宝挂号", 94 => "澳邮宝平邮", 95 => "UPS SurePost");
$flip_CarrierLists = array_flip($CarrierLists);
if (!isset($flip_CarrierLists[$ebay_carrier])) {
return false;
} else {
$carrierId = $flip_CarrierLists[$ebay_carrier];
}
$paramArr['carrierId'] = $carrierId;
$paramArr['country'] = $ebay_countryname;
$paramArr['weight'] = $totalweight;
$rtn = callOpenSystem($paramArr);
$rtn = json_decode($rtn, true);
//$e = microtime()."\r\n";
//file_put_contents("/usr/local/php/var/log/xxx.txt","B=".$b,FILE_APPEND);
//file_put_contents("/usr/local/php/var/log/xxx.txt","T=".$e,FILE_APPEND);
if (!isset($rtn['data'])) {
return false;
}
return $rtn['data'];
}
示例4: view_sendMessage
/**
* 功能:调用发送短信接口 用于js调用
* @param array $paramArr
* @param str $token
* @return void
* @author wxb
* @date: 2013/11/09
*/
function view_sendMessage()
{
if (!isset($_SESSION)) {
@session_start();
}
$callback = $_GET['callback'];
if (!isset($_SESSION['userId'])) {
echo $callback . '({"error_response":{"code":"176","msg":"no login"}})';
return;
}
if (empty($_GET['content']) || empty($_GET['from']) || empty($_GET['to']) || empty($_GET['type'])) {
echo $callback . '({"error_response":{"code":"044","msg":"get param fail"}})';
return;
}
$content = $_GET['content'];
$from = $_GET['from'];
$to = $_GET['to'];
$type = $_GET['type'];
$paramArr = array('method' => 'notice.send.message', 'format' => 'json', 'v' => '1.0', 'username' => C('OPEN_SYS_USER'), "content" => $content, "from" => $from, "to" => $to, "type" => $type, "callback" => $callback);
$res = callOpenSystem($paramArr, 'local');
if ($res) {
echo $res;
} else {
echo $callback . '({"error_response":{"code":"1120","msg":"call open fail"}})';
}
}
示例5: getAuthCompanyList
/**
* ApiModel::getAuthCompanyList()
* 获取鉴权公司列表
* @return array
*/
public static function getAuthCompanyList()
{
$paramArr = array('method' => 'power.user.getApiCompany.get', 'format' => 'json', 'v' => '1.0', 'username' => C('OPEN_SYS_USER'), 'sysName' => C('AUTH_SYSNAME'), 'sysToken' => C('AUTH_SYSTOKEN'));
$companyInfo = callOpenSystem($paramArr);
$companyInfo = json_decode($companyInfo, true);
$companyInfo = is_array($companyInfo) ? $companyInfo : array();
unset($paramArr);
return $companyInfo;
}
示例6: saveDistributorWaterMark
/**
* 转发图片至图片系统分销商文件夹下
* @param json imgInfor
* @return int
* @author zjr
*/
public function saveDistributorWaterMark($imgInfor)
{
$conf = $this->getRequestConf(__FUNCTION__);
$conf['imgInfor'] = $imgInfor;
$result = callOpenSystem($conf);
$data = json_decode($result, true);
if ($data['errCode'] > 0) {
self::$errMsg[$data['errCode']] = "[{$data['errCode']}]{$data['errMsg']}";
}
return $this->changeArrayKey($data['data']);
}
示例7: getText
public static function getText()
{
require_once WEB_PATH . "api/include/functions.php";
$start = time();
$url = 'http://gw.open.valsun.cn:88/router/rest?';
$paramArr = array('method' => 'om.showSuperOrder', 'format' => 'json', 'v' => '1.0', 'username' => C('OPEN_SYS_USER'), 'purchaseId' => '149');
$result = callOpenSystem($paramArr);
$data = json_decode($result, true);
$end = time();
echo "<pre>";
var_dump($end - $start);
var_dump($data);
}
示例8: act_SendList
public function act_SendList()
{
$from = trim($_GET['from']);
$page = trim($_GET['page']);
$type = trim($_GET['type']);
$paramArr = array('method' => 'notice.show.get', 'format' => 'json', 'v' => '1.0', 'username' => 'notice', "from" => $from, "page" => $page, "type" => $type);
$res = callOpenSystem($paramArr);
if ($res) {
return json_decode($res);
} else {
return json_decode('{"errCode":"1120","errMsg":"call open fail"}');
}
}
示例9: getOldErpSkuStockInfo
/**
* 功能:获取旧erp系统中的实时库存信息
* @param $sku
*/
public function getOldErpSkuStockInfo($sku = '')
{
$conf = $this->getRequestConf(__FUNCTION__);
if (empty($conf)) {
return false;
}
$conf['sku'] = $sku;
$result = callOpenSystem($conf);
$data = json_decode($result, true);
if ($data['error_response']['code'] != 200) {
self::$errMsg[$data['error_response']['code']] = "[{$data['error_response']['code']}]{$data['error_response']['msg']}";
}
return $data;
}
示例10: view_searchUser
/**
*功能:搜索用用户名
*@author wxb
*@date 2013/12/3
*/
public function view_searchUser()
{
if (!isset($_SESSION)) {
@session_start();
}
$callback = trim($_GET['callback']);
if (!isset($_SESSION['userId'])) {
echo $callback . '({"errCode":"176","errMsg":"no login"})';
return;
}
$name = trim($_GET['name']);
$paramArr = array('method' => 'notice.searchUser', 'format' => 'json', 'v' => '1.0', 'username' => 'notice', "name" => base64_encode($name), "callback" => $callback);
$res = callOpenSystem($paramArr);
echo $res;
}
示例11: calcOpenShipFee
/**
* TrackShipFeeModel::calcOpenShipFee()
* 获取物流系统开发运费计算结果
* @param string $addId 发货地址ID
* @param string $country 国家
* @param string $weight 重量
* @return array
*/
public static function calcOpenShipFee($addId, $country, $weight, $transitId, $postCode, $apiToken, $noShipId, $weightFlag)
{
$res = array();
$paramArr = array('method' => 'trans.open.ship.fee.get', 'format' => 'json', 'v' => '1.0', 'username' => C('OPEN_SYS_USER'), 'shipAddId' => $addId, 'country' => $country, 'weight' => $weight, 'apiToken' => $apiToken, 'transitId' => $transitId, 'postCode' => $postCode, 'noShipId' => $noShipId, 'weightFlag' => $weightFlag);
$shipFeeInfo = callOpenSystem($paramArr);
$shipFeeInfo = json_decode($shipFeeInfo, true);
if (empty($shipFeeInfo['data'])) {
self::$errCode = 20000;
self::$errMsg = "Not to find the open freight, please confirm the selected conditions of this!";
return false;
} else {
$res = $shipFeeInfo['data'];
}
unset($paramArr);
return $res;
}
示例12: calcshippingfee
function calcshippingfee($shaddr, $weight, $country, $transportId)
{
require_once WEB_PATH . "api/include/functions.php";
$method = 'trans.carrier.fix.get';
$paramArr = array('method' => $method, 'format' => 'json', 'v' => '1.0', 'username' => C('OPEN_SYS_USER'));
$paramArr['country'] = $country;
$paramArr['weight'] = $weight;
$paramArr['shaddr'] = $shaddr;
$paramArr['carrier'] = $transportId;
$result = callOpenSystem($paramArr);
$data = json_decode($result, true);
if (empty($data['data'])) {
return false;
}
return $data['data']['fee'];
}
示例13: getAdjustransportFromPurchase
public function getAdjustransportFromPurchase($get = 1)
{
require_once WEB_PATH . "api/include/functions.php";
$url = 'http://gw.open.valsun.cn:88/router/rest?';
$paramArr = array('method' => 'purchase.getAdjustransport', 'format' => 'json', 'v' => '1.0', 'username' => 'purchase', 'get' => $get);
$result = callOpenSystem($paramArr);
//var_dump($result);
$data = json_decode($result, true);
/*var_dump($data);
if(!isset($data['data'])){
return array();
}*/
$__liquid_items_array = array();
foreach ($data as $dataValue) {
$__liquid_items_array[$dataValue['category']] = $dataValue['skulist'];
}
/*foreach($data['data'] as $dataValue){
$__liquid_items_array[$dataValue['category']] = $dataValue['skulist'];
}*/
return $__liquid_items_array;
}
示例14: pushBigOrder
/**
* 将审核超大订单的结果更新到订单系统
*/
public static function pushBigOrder()
{
$id = $_POST['id'];
$status = $_POST['status'];
$note = $_POST['note'];
if (empty($id) || empty($status)) {
$arr = array('code' => '2', 'msg' => '参数有误');
return json_encode($arr);
}
$where = "id='{$id}'";
$row = SuperorderAuditModel::getOne('*', $where);
if (empty($row) || $row['status'] == 1) {
$arr = array('code' => '3', 'msg' => '已经审核');
return json_encode($arr);
}
$paramArr = array('method' => 'order.updateOrderAuditFromPh', 'format' => 'json', 'v' => '1.0', 'username' => C('OPEN_SYS_USER'));
/* API应用级输入参数 Start*/
$paramArr['omOrderId'] = $row['omOrderId'];
$paramArr['omOrderdetailId'] = $row['omOrderdetailId'];
$paramArr['sku'] = $row['sku'];
$paramArr['auditStatus'] = $status;
$paramArr['auditUser'] = $_SESSION['sysUserId'];
$paramArr['note'] = $note;
/* API应用级输入参数 End*/
$result = callOpenSystem($paramArr, 'local');
$result = json_decode($result, true);
//add log
//$filename = C("LOG_PATH").'/pushbigorder.txt';
//write_log($filename, $result);
if ($result['data'] == true) {
$res['code'] = '1';
$res['msg'] = 'success';
} else {
$res['code'] = '2';
$res['msg'] = $result['errMsg'];
}
return json_encode($res);
}
示例15: getMaterInfoById
public static function getMaterInfoById($MaterId)
{
/*$materInfoList = self::getMaterInfo();
return $materInfoList[$MaterId];*/
require_once WEB_PATH . "api/include/functions.php";
$url = 'http://gw.open.valsun.cn:88/router/rest?';
$paramArr = array('method' => 'pc.getPmInfoById', 'format' => 'json', 'v' => '1.0', 'username' => 'purchase', 'id' => $MaterId);
$result = callOpenSystem($paramArr);
$data = json_decode($result, true);
return $data['data'];
}