信呼OA版本v2.3.8
This commit is contained in:
32
include/chajian/xinhudocChajian.php
Normal file
32
include/chajian/xinhudocChajian.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* 连接信呼文件管理平台
|
||||
*/
|
||||
|
||||
class xinhudocChajian extends Chajian{
|
||||
|
||||
|
||||
public function geturlstr($mod, $act, $can=array())
|
||||
{
|
||||
$url = getconfig('xinhudoc_platurl');
|
||||
$key = getconfig('xinhudoc_openkey');
|
||||
if(substr($url,-1)!='/')$url.='/';
|
||||
$url .= 'openapi/'.$mod.'/'.$act.'?openkey='.md5($key).'';
|
||||
foreach($can as $k=>$v)$url.='&'.$k.'='.$v.'';
|
||||
return $url;
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回内容处理
|
||||
*/
|
||||
public function returnresult($result)
|
||||
{
|
||||
if($result && contain($result,'success')){
|
||||
$stat = strpos($result,'{');
|
||||
if(!$stat)$stat=0;
|
||||
$barr = json_decode(substr($result, $stat), true);
|
||||
if(isset($barr['success']))return $barr;
|
||||
}
|
||||
return returnerror('returnerr:'.$result.'');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user