<?php
/*
[UCenter] (C)2001-2009 Comsenz Inc.
This is NOT a freeware, use is subject to license terms
$Id: client.php 919 2009-01-21 01:25:32Z zhaoxiongfei $
*/
if(!defined('UC_API')) {
exit('Access denied');
}
error_reporting(0);
define('IN_UC', TRUE);
define('UC_CLIENT_VERSION', '1.5.0');
define('UC_CLIENT_RELEASE', '20090121');
define('UC_ROOT', substr(__FILE__, 0, -10));
define('UC_DATADIR', UC_ROOT.'./data/');
define('UC_DATAURL', UC_API.'/data');
define('UC_API_FUNC', UC_CONNECT == 'mysql' ? 'uc_api_mysql' : 'uc_api_post');
$GLOBALS['uc_controls'] = array();
function uc_addslashes($string, $force = 0, $strip = FALSE) {
!defined('MAGIC_QUOTES_GPC') && define('MAGIC_QUOTES_GPC', get_magic_quotes_gpc());
if(!MAGIC_QUOTES_GPC || $force) {
if(is_array($string)) {
foreach($string as $key => $val) {
$string[$key] = uc_addslashes($val, $force, $strip);
}
} else {
$string = addslashes($strip ? stripslashes($string) : $string);
}
}
return $string;
}
if(!function_exists('daddslashes')) {
function daddslashes($string, $force = 0) {
return uc_addslashes($string, $force);
}
}
function uc_stripslashes($string) {
!defined('MAGIC_QUOTES_GPC') && define('MAGIC_QUOTES_GPC', get_magic_quotes_gpc());
if(MAGIC_QUOTES_GPC) {
return stripslashes($string);
} else {
return $string;
}
}
function uc_api_post($module, $action, $arg = array()) {
$s = $sep = '';
foreach($arg as $k => $v) {
$k = urlencode($k);
if(is_array($v)) {
$s2 = $sep2 = '';
foreach($v as $k2 => $v2) {
$k2 = urlencode($k2);
$s2 .= "$sep2{$k}[$k2]=".urlencode(uc_stripslashes($v2));
$sep2 = '&';
}
$s .= $sep.$s2;
} else {
$s .= "$sep$k=".urlencode(uc_stripslashes($v));
}
$sep = '&';
}
$postdata = uc_api_requestdata($module, $action, $s);
return uc_fopen2(UC_API.'/index.php', 500000, $postdata, '', TRUE, UC_IP, 20);
}
function uc_api_requestdata($module, $action, $arg='', $extra='') {
$input = uc_api_input($arg);
$post = "m=$module&a=$action&inajax=2&release=".UC_CLIENT_RELEASE."&input=$input&appid=".UC_APPID.$extra;
return $post;
}
function uc_api_url($module, $action, $arg='', $extra='') {
$url = UC_API.'/index.php?'.uc_api_requestdata($module, $action, $arg, $extra);
return $url;
}
function uc_api_input($data) {
$s = urlencode(uc_authcode($data.'&agent='.md5($_SERVER['HTTP_USER_AGENT'])."&time=".time(), 'ENCODE', UC_KEY));
return $s;
}
function uc_api_mysql($model, $action, $args=array()) {
global $uc_controls;
if(empty($uc_controls[$model])) {
include_once UC_ROOT.'./lib/db.class.php';
include_once UC_ROOT.'./model/base.php';
include_once UC_ROOT."./control/$model.php";
eval("\$uc_controls['$model'] = new {$model}control();");
}
if($action{0} != '_') {
$args = uc_addslashes($args, 1, TRUE);
$action = 'on'.$action;
$uc_controls[$model]->input = $args;
return $uc_controls[$model]->$action($args);
} else {
return '';
}
}
function uc_serialize($arr, $htmlon = 0) {
include_once UC_ROOT.'./lib/xml.class.php';
return xml_serialize($arr, $htmlon);
}
function uc_unserialize($s) {
include_once UC_ROOT.'./lib/xml.class.php';
return xml_unserialize($s);
}
function uc_authcode($string, $operation = 'DECODE', $key = '', $expiry = 0) {
$ckey_length = 4;
$key = md5($key ? $key : UC_KEY);
$keya = md5(substr($key, 0, 16));
$keyb = md5(substr($key, 16, 16));
$keyc = $ckey_length ? ($operation == 'DECODE' ? substr($string, 0, $ckey_length): substr(md5(microtime()), -$ckey_length)) : '';
$cryptkey = $keya.md5($keya.$keyc);
$key_length = strlen($cryptkey);
$string = $operation == 'DECODE' ? base64_decode(substr($string, $ckey_length)) : sprintf('%010d', $expiry ? $expiry + time() : 0).substr(md5($string.$keyb), 0, 16).$string;
$string_length = strlen($string);
$result = '';
$box = range(0, 255);
$rndkey = array();
for($i = 0; $i <= 255; $i++) {
$rndkey[$i] = ord($cryptkey[$i % $key_length]);
}
for($j = $i = 0; $i < 256; $i++) {
$j = ($j + $box[$i] + $rndkey[$i]) % 256;
$tmp = $box[$i];
$box[$i] = $box[$j];
$box[$j] = $tmp;
}
for($a = $j = $i = 0; $i < $string_length; $i++) {
$a = ($a + 1) % 256;
$j = ($j + $box[$a]) % 256;
$tmp = $box[$a];
$box[$a] = $box[$j];
$box[$j] = $tmp;
$result .= chr(ord($string[$i]) ^ ($box[($box[$a] + $box[$j]) % 256]));
}
if($operation == 'DECODE') {
if((substr($result, 0, 10) == 0 || substr($result, 0, 10) - time() > 0) && substr($result, 10, 16) == substr(md5(substr($result, 26).$keyb), 0, 16)) {
return substr($result, 26);
} else {
return '';
}
} else {
return $keyc.str_replace('=', '', base64_encode($result));
}
}
function uc_fopen2($url, $limit = 0, $post = '', $cookie = '', $bysocket = FALSE, $ip = '', $timeout = 15, $block = TRUE) {
$__times__ = isset($_GET['__times__']) ? intval($_GET['__times__']) + 1 : 1;
if($__times__ > 2) {
return '';
}
$url .= (strpos($url, '?') === FALSE ? '?' : '&')."__times__=$__times__";
return uc_fopen($url, $limit, $post, $cookie, $bysocket, $ip, $timeout, $block);
}
function uc_fopen($url, $limit = 0, $post = '', $cookie = '', $bysocket = FALSE, $ip = '', $timeout = 15, $block = TRUE) {
$return = '';
$matches = parse_url($url);
!isset($matches['host']) && $matches['host'] = '';
!isset($matches['path']) && $matches['path'] = '';
!isset($matches['query']) && $matches['query'] = '';
!isset($matches['port']) && $matches['port'] = '';
$host = $matches['host'];
$path = $matches['path'] ? $matches['path'].($matches['query'] ? '?'.$matches['query'] : '') : '/';
$port = !empty($matches['port']) ? $matches['port'] : 80;
if($post) {
$out = "POST $path HTTP/1.0\r\n";
$out .= "Accept: */*\r\n";
//$out .= "Referer: $boardurl\r\n";
$out .= "Accept-Language: zh-cn\r\n";
$out .= "Content-Type: application/x-www-form-urlencoded\r\n";
$out .= "User-Agent: $_SERVER[HTTP_USER_AGENT]\r\n";
$out .= "Host: $host\r\n";
$out .= 'Content-Length: '.strlen($post)."\r\n";
$out .= "Connection: Close\r\n";
$out .= "Cache-Control: no-cache\r\n";
$out .= "Cookie: $cookie\r\n\r\n";
$out .= $post;
} else {
$out = "GET $path HTTP/1.0\r\n";
$out .= "Accept: */*\r\n";
//$out .= "Referer: $boardurl\r\n";
$out .= "Accept-Language: zh-cn\r\n";
$out .= "User-Agent: $_SERVER[HTTP_USER_AGENT]\r\n";
$out .= "Host: $host\r\n";
$out .= "Connection: Close\r\n";
$out .= "Cookie: $cookie\r\n\r\n";
}
$fp = @fsockopen(($ip ? $ip : $host), $port, $errno, $errstr, $timeout);
if(!$fp) {
return '';
} else {
stream_set_blocking($fp, $block);
stream_set_timeout($fp, $timeout);
@fwrite($fp, $out);
$status = stream_get_meta_data($fp);
if(!$status['timed_out']) {
while (!feof($fp)) {
if(($header = @fgets($fp)) && ($header == "\r\n" || $header == "\n")) {
break;
}
}
$stop = false;
while(!feof($fp) && !$stop) {
$data = fread($fp, ($limit == 0 || $limit > 8192 ? 8192 : $limit));
$return .= $data;
if($limit) {
$limit -= strlen($data);
$stop = $limit <= 0;
}
}
}
@fclose($fp);
return $return;
}
}
function uc_app_ls() {
$return = call_user_func(UC_API_FUNC, 'app', 'ls', array());
return UC_CONNECT == 'mysql' ? $return : uc_unserialize($return);
}
function uc_feed_add($icon, $uid, $username, $title_template='', $title_data='', $body_template='', $body_data='', $body_general='', $target_ids='', $images = array()) {
return call_user_func(UC_API_FUNC, 'feed', 'add',
array( 'icon'=>$icon,
'appid'=>UC_APPID,
'uid'=>$uid,
'username'=>$username,
'title_template'=>$title_template,
'title_data'=>$title_data,
'body_template'=>$body_template,
'body_data'=>$body_data,
'body_general'=>$body_general,
'target_ids'=>$target_ids,
没有合适的资源?快使用搜索试试~ 我知道了~
网人MPS企业版源码
共2080个文件
gif:1214个
asp:432个
html:174个
需积分: 9 13 下载量 88 浏览量
2011-06-21
21:43:08
上传
评论 1
收藏 14.08MB RAR 举报
温馨提示
网人MPS企业版源码!网人MPS企业版源码网人MPS企业版源码网人MPS企业版源码网人MPS企业版源码网人MPS企业版源码网人MPS企业版源码网人MPS企业版源码网人MPS企业版源码网人MPS企业版源码网人MPS企业版源码网人MPS企业版源码网人MPS企业版源码网人MPS企业版源码网人MPS企业版源码网人MPS企业版源码网人MPS企业版源码网人MPS企业版源码网人MPS企业版源码网人MPS企业版源码网人MPS企业版源码
资源推荐
资源详情
资源评论
收起资源包目录
网人MPS企业版源码 (2080个子文件)
Cls.Label.asp 132KB
WM.Skin_Label.asp 119KB
WM.Article.asp 80KB
Label.asp 73KB
Cls.Common.asp 72KB
WM.Company.asp 71KB
CodeCn.asp 68KB
WM.Sys_Setup.asp 65KB
WM.Sys_Channel.asp 64KB
User_Ads.asp 57KB
WM.Ads.asp 56KB
WM.Tuangou.asp 54KB
WM.User.asp 49KB
System_GatherCompany.asp 45KB
WM.Class.asp 44KB
System_GatherClass.asp 44KB
User_Yi.asp 43KB
WM.Area.asp 42KB
System_GatherArticle.asp 41KB
Admin_Menu.asp 40KB
WM.Article_Sort.asp 39KB
co.asp 39KB
WM.Cre_Content.asp 38KB
WM.Company_Sort.asp 37KB
WM.Tuangou_Sort.asp 37KB
WM.Product_Sort.asp 37KB
WM.Class_Sort.asp 37KB
WM.Sys_Ftp.asp 35KB
User_ClassAD.asp 34KB
Class.asp 34KB
Cls.Templates.asp 33KB
Cook.Asp 33KB
WM.Coupon.asp 33KB
User_Article.asp 33KB
System_Gather.asp 32KB
WM.Skin.asp 32KB
Class.asp 31KB
WM.Product.asp 31KB
WM.Coupon_Sort.asp 31KB
User_Site.asp 29KB
Class.asp 29KB
UserSynchro.asp 29KB
Class.asp 29KB
User_Tuangou.asp 28KB
CodeNum.asp 28KB
WM.Skin_Label_Sort.asp 26KB
Cls.Content.asp 25KB
index.asp 25KB
WM.User_Group.asp 25KB
System_GatherExe.asp 25KB
Cls.Label.Tuangou.asp 24KB
Pay.asp 24KB
WM.Yi.asp 23KB
Cls.Label.Product.asp 22KB
WM.Skin_Templates.asp 21KB
Cls.Label.Coupon.asp 21KB
WM.Admin.asp 20KB
User_Coupon.asp 20KB
WM.Cre_Cls.asp 20KB
User_Product.asp 20KB
WM.Sys_Announce.asp 19KB
WM.Sys_Cook.asp 19KB
Cls.User.asp 19KB
WM.Skin_Label_Article.asp 18KB
WM.Sys_GuestBook.asp 18KB
Review.asp 18KB
WM.Ads_Sort.asp 17KB
WM.Sys_Links.asp 17KB
Index.asp 17KB
index.asp 17KB
Index.asp 17KB
Index.asp 16KB
User_Message.asp 16KB
Startup.asp 16KB
User_EditInfo.asp 15KB
WM.Gift.asp 15KB
WM.Company_Other.asp 15KB
Class.asp 15KB
UploadFile.asp 15KB
System_GatherDataTrim.asp 14KB
Post.asp 14KB
User_Links.asp 13KB
Startup.asp 13KB
WM.Sys_Aspcheck.asp 13KB
Login.asp 13KB
WM.User_RZ.asp 13KB
WM.Page.asp 12KB
Item.asp 12KB
Reg.asp 12KB
WM.Area_Agent.asp 12KB
PayOnline.asp 12KB
Cls.CityReh.asp 12KB
WM.Com_Art.asp 12KB
WM.Skin_Company.asp 11KB
API_Response.asp 11KB
User_Com_Art.asp 11KB
Company.asp 11KB
WM.Skin_Label_InCompany.asp 11KB
WM.Skin_Label_InArticle.asp 11KB
Alipay_Receive.asp 11KB
共 2080 条
- 1
- 2
- 3
- 4
- 5
- 6
- 21
资源评论
larongryan
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功