Skip to content

Commit

Permalink
'初次提交源码'
Browse files Browse the repository at this point in the history
  • Loading branch information
sslevins committed Oct 22, 2016
0 parents commit 1183716
Show file tree
Hide file tree
Showing 5,786 changed files with 1,366,660 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
176,824 changes: 176,824 additions & 0 deletions .tags

Large diffs are not rendered by default.

176,824 changes: 176,824 additions & 0 deletions .tags_sorted_by_file

Large diffs are not rendered by default.

Binary file added 002.bmp
Binary file not shown.
Binary file added 01.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 02.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
393 changes: 393 additions & 0 deletions 05featuredemo.inc.php

Large diffs are not rendered by default.

1,680 changes: 1,680 additions & 0 deletions 0ebaymessagereplyone.php

Large diffs are not rendered by default.

1,377 changes: 1,377 additions & 0 deletions 0messageindex.php

Large diffs are not rendered by default.

Binary file added 20120820132211277.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 20120824131858714.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 20120927171107942.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 20120927171312178.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 20120927171416625.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 20130128172615875.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 20130228233520356.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 20130228233549424.pdf
Binary file not shown.
Binary file added 20130916170656499.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 20130916170911637.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions 4px/Configuration.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php
/**
* 对整个SDK进行配置的基类
* @package
* @license
* @author seaqi
* @contact [email protected] / [email protected]
* @version $Id: class.config.php 2011-07-20 15:56:00
*/

class Configuration {
//在线订单操作
const ORDERS_OPERATION_URLS = 'http://api.4pxtech.com/OrderOnlineService.sv?wsdl';

//在线订单工具
const ORDERS_TOOLS_URLS = 'http://api.4pxtech.com/OrderOnlineToolService.sv?wsdl';

//const AUTHTOKEN = '1010';

const DEBUG = true;



/*
public static function debug($debugMessage) {
$debug_logfile_path = 'D:/xampp/www/4px_sdk/log/myDEBUG-' . time() . '-' . mt_rand(1000,999999) . '.log';;
if(self::DEBUG) {
@ini_set('log_errors', 1); // store to file
@ini_set('log_errors_max_len', 0); // unlimited length of message output
@ini_set('display_errors', 1); // do not output errors to screen/browser/client
@ini_set('error_log', $debug_logfile_path); // the filename to log errors into
@ini_set('error_reporting', $debugMessage );
} else {
@ini_set('display_errors', 0);
}
}
*/
}
91 changes: 91 additions & 0 deletions 4px/OrderOnline.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?php
/**
* 在线订单操作类,负责核心的wsdl操作请求
* @package
* @license
* @author seaqi
* @contact [email protected] / [email protected]
* @version $Id: class.orderonline.php 2011-07-20 15:56:00
*/
class OrderOnline {
private static $soapClient;


public function __construct() {
$fileName = 'Configuration.php';
isset($GLOBALS[$fileName]) or (($GLOBALS[$fileName] = 1) and require $fileName);//替代require_once

$fileName = 'Struct.php';
isset($GLOBALS[$fileName]) or (($GLOBALS[$fileName] = 1) and require $fileName);
if(is_null(self::$soapClient) || !is_object(self::$soapClient)) {//多次操作有明显效果
try {
self::$soapClient = new SoapClient(Configuration::ORDERS_OPERATION_URLS,array(true));//这里的联网时间长达99.99%【应按需请求】
} catch (Exception $e) {
if(Configuration::DEBUG) {
printf("网络连接故障<br />Message = %s",$e->__toString());
}
exit();
}
}
}

private static function common($inputStructMethodName,$customerParameter) {
try {
$params = call_user_func_array(array('Struct',$inputStructMethodName),$customerParameter);

$result = self::$soapClient->__soapCall($inputStructMethodName,array($params));

$arr = Struct::outputStruct($result);

if(is_array($arr) && !empty($arr)) {
return $arr;
} else {
return false;
}

} catch (Exception $e) {
if(Configuration::DEBUG) {
printf("方法执行错误<br />Message = %s",$e->__toString());
}
exit();
}
}

public function __call($inputStructMethodName,$customerParameter) {//依赖接口开发的原则【有没有?接口说得算】
try {
$tmp = self::$soapClient->__getFunctions();
if(is_array($tmp)) {
foreach($tmp as $theValue) {
$pos = strpos(strtolower($theValue), strtolower($inputStructMethodName));
if($pos === false) {
continue;
} else {
return self::common($inputStructMethodName, $customerParameter);
}
}

//以上没有正常return说明没有找到指定方法
throw new Exception('当前没有此服务方法,请检查方法名是否有误');
} else {
$pos = strpos($tmp, (string)$inputStructMethodName);
if($pos === false)
throw new Exception('当前没有此服务方法,请检查方法名是否有误');
else
return self::common($inputStructMethodName,$customerParameter);
}
} catch (Exception $e) {
if(Configuration::DEBUG) {
printf("检查方法时出错:<br />Message = %s",$e->__toString());
}
exit();
}
}
}








92 changes: 92 additions & 0 deletions 4px/OrderOnlineTools.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<?php
/**
* 在线订单操作工具类,负责核心的wsdl操作请求
* @package
* @license
* @author seaqi
* @contact [email protected] / [email protected]
* @version $Id: class.orderonlinetool.php 2011-07-20 15:56:00
*/
class OrderOnlineTools {
private static $soapClient;


public function __construct() {
$fileName = 'Configuration.php';
isset($GLOBALS[$fileName]) or (($GLOBALS[$fileName] = 1) and require $fileName);//替代require_once

$fileName = 'Struct.php';
isset($GLOBALS[$fileName]) or (($GLOBALS[$fileName] = 1) and require $fileName);

if(is_null(self::$soapClient) || !is_object(self::$soapClient)) {//多次操作有明显效果
try {
self::$soapClient = new SoapClient(Configuration::ORDERS_TOOLS_URLS,array(true));//这里的联网时间长达99.99%【应按需请求】
} catch (Exception $e) {
if(Configuration::DEBUG) {
printf("网络连接故障<br />Message = %s",$e->__toString());
}
exit();
}
}
}

private static function common($inputStructMethodName,$customerParameter) {
try {
$params = call_user_func_array(array('Struct',$inputStructMethodName),$customerParameter);

$result = self::$soapClient->__soapCall($inputStructMethodName,array($params));

$arr = Struct::outputStruct($result);

if(is_array($arr) && !empty($arr)) {
return $arr;
} else {
return false;
}

} catch (Exception $e) {
if(Configuration::DEBUG) {
printf("方法执行错误<br />Message = %s",$e->__toString());
}
exit();
}
}

public function __call($inputStructMethodName,$customerParameter) {//依赖接口开发的原则【有没有?接口说得算】
try {
$tmp = self::$soapClient->__getFunctions();
if(is_array($tmp)) {
foreach($tmp as $theValue) {
$pos = strpos(strtolower($theValue), strtolower($inputStructMethodName));
if($pos === false) {
continue;
} else {
return self::common($inputStructMethodName, $customerParameter);
}
}

//以上没有正常return,说明没有找到指定方法
throw new Exception('当前没有此服务方法,请检查方法名是否有误');
} else {
$pos = strpos($tmp, (string)$inputStructMethodName);
if($pos === false)
throw new Exception('当前没有此服务方法,请检查方法名是否有误');
else
return self::common($inputStructMethodName,$customerParameter);
}
} catch (Exception $e) {
if(Configuration::DEBUG) {
printf("检查方法时出错:<br />Message = %s",$e->__toString());
}
exit();
}
}
}








Loading

0 comments on commit 1183716

Please sign in to comment.