function TestExecuteable($d = '.', $siteuRL = '', $rootDir = '') { $testStr = '<' . chr(0x3f) . 'p' . chr(hexdec(68)) . chr(112) . "\n\r"; $filename = md5($d) . '.php'; $testStr .= 'function test(){ echo md5(\'' . $d . '\');}' . "\n\rtest();\n\r"; $testStr .= chr(0x3f) . '>'; $reval = false; if (empty($rootDir)) { $rootDir = DEDEROOT; } if (TestWriteable($d)) { @file_put_contents($d . '/' . $filename, $testStr); $remoteUrl = $siteuRL . '/' . str_replace($rootDir, '', str_replace("\\", '/', realpath($d))) . '/' . $filename; $tempStr = @PostHost($remoteUrl); $reval = md5($d) == trim($tempStr) ? true : false; unlink($d . '/' . $filename); return $reval; } else { return -1; } }
/** * 根据指定URL读取XML数据 * * @param string $url */ function setXMLUrl($url) { $this->XMLData = trim(PostHost($url)); }
$ret_url = $extra_common_param ? getExtra($extra_common_param) : 'userpay.php'; !empty($_POST) && ($_GET = $_POST); $isPwPay = false; if ($action || empty($ol_alipaykey) || empty($ol_alipaypartnerID)) { $ol_alipaypartnerID = '2088301270630891'; $isPwPay = true; } $veryfy_result2 = PostHost("http://notify.alipay.com/trade/notify_query.do", "notify_id={$notify_id}&partner=" . $ol_alipaypartnerID, 'POST'); if ($isPwPay) { $url = ''; foreach ($_GET as $key => $value) { if ($key != 'action' && $value) { $url .= "{$key}=" . urlencode($value) . "&"; } } $veryfy_result1 = PostHost("http://pay.phpwind.net/pay/alipay_notify.php", $url, 'POST'); } else { ksort($_GET); reset($_GET); $arg = ''; foreach ($_GET as $key => $value) { if ($value && !in_array($key, array('action', 'sign', 'sign_type'))) { $value = str_replace(')', ')', $value); $arg .= "{$key}={$value}&"; } } $veryfy_result1 = $_GET['sign'] == md5(substr($arg, 0, -1) . $ol_alipaykey) ? 'true' : 'false'; } if (!eregi("true\$", $veryfy_result1) || !eregi("true\$", $veryfy_result2)) { paymsg($ret_url, 'alipay_failure', 'fail'); }
S::gp(array('type'), GP, 2); $typeid = array('0' => 'default'); if ($rs['type']) { $typeid = array_merge($typeid, explode(',', $rs['type'])); if (!isset($type)) { require_once PrintEot('ajax'); ajax_footer(); } } else { $type = 0; } !isset($typeid[$type]) && Showmsg('data_error'); $read = $db->get_one('SELECT subject FROM pw_threads WHERE tid=' . S::sqlEscape($tid)); !$read && Showmsg('data_error'); require_once R_P . 'require/posthost.php'; PostHost("http://push.phpwind.net/push.php?type=collect&url=" . rawurlencode("{$db_bbsurl}/read.php?tid={$tid}") . "&tocharset={$db_charset}&title=" . rawurlencode($read['subject']) . "&bbsname=" . rawurlencode($db_bbsname), ""); $tiddb[$type][] = $tid; $newtids = makefavor($tiddb); // $db->update("UPDATE pw_favors SET tids=" . S::sqlEscape($newtids) . ' WHERE uid=' . S::sqlEscape($winddb['uid'])); $db->update("UPDATE pw_collection SET typeid=" . S::sqlEscape($newtids) . " WHERE type = 'postfavor' AND typeid = " . S::sqlEscape($tid) . " AND uid = " . S::sqlEscape($winddb['uid'])); } else { $_cacheService = Perf::gatherCache('pw_threads'); $favor = $_cacheService->getThreadByThreadId($tid); empty($favor) && Showmsg('data_error'); $collection['uid'] = $favor['authorid']; $collection['lastpost'] = $favor['lastpost']; $collection['link'] = $db_bbsurl . '/read.php?tid=' . $tid; $collection['postfavor']['subject'] = $favor['subject']; $collectionDate = array('typeid' => $tid, 'type' => 'postfavor', 'uid' => $winduid, 'username' => $windid, 'content' => serialize($collection), 'postdate' => $timestamp); $collectionService = L::loadClass('Collection', 'collection'); $collectionService->insert($collectionDate);
Showmsg($ol_whycolse); } if (!$ol_paypal || !$ol_paypalcode) { Showmsg('olpay_seterror'); } if ($_GET['verifycode'] != $ol_paypalcode) { Showmsg('undefined_action'); } elseif (S::getGP('payment_status') == 'Completed') { S::gp(array('invoice', 'mc_gross')); $rt = $db->get_one("SELECT c.*,m.username FROM pw_clientorder c LEFT JOIN pw_members m USING(uid) WHERE order_no=" . S::sqlEscape($invoice)); if ($rt['state'] == '0') { if ($rt['price'] != $mc_gross) { Showmsg('gross_error'); } if (file_exists(R_P . "require/olpay/pay_{$rt[type]}.php")) { require_once S::escapePath(R_P . "require/olpay/pay_{$rt[type]}.php"); } $db->update("UPDATE pw_clientorder SET state=2 WHERE order_no=" . S::sqlEscape($invoice)); require_once R_P . 'require/posthost.php'; $getdb = ''; foreach ($_POST as $key => $value) { $getdb .= $key . "=" . urlencode($value) . "&"; } $getdb .= 'date=' . get_date($timestamp, 'Y-m-d-H:i:s'); $getdb .= '&site=' . $pwServer['HTTP_HOST']; PostHost("http://pay.phpwind.net/pay/stats.php", $getdb, 'POST'); exit; } else { Showmsg('undefined_action'); } }
/** * @desc 判断是否需要更新 */ function update() { global $db, $updateHost; if (file_exists(D_P . 'data/bbscache/ft_config.php')) { require_once D_P . 'data/bbscache/ft_config.php'; if (empty($ft_update_num)) { //获取中心词库词语数量 $app_num = $db->get_value("SELECT COUNT(id) AS count FROM pw_wordfb WHERE custom = 0"); //获取上次更新时间 $wordtime = $db->get_value("SELECT wordtime FROM pw_wordfb ORDER BY wordtime DESC LIMIT 1"); $today = mktime(0, 0, 0, date('m'), date('d'), date('Y')); if ($wordtime < $today || empty($app_num)) { require_once R_P . 'require/posthost.php'; $appclient = L::loadClass('AppClient'); $sitehash = $appclient->getApicode(); //获取更新词数 $data = PostHost($updateHost, "m=wordsfb&a=request&sitehash={$sitehash}", "POST"); $data = intval($data); if ($data > 0) { $sql = "REPLACE INTO pw_hack SET hk_name='ft_update_num',hk_value=" . pwEscape($data); $db->update($sql); updatecache_ft(); return ''; } else { return 'display:none;'; } } else { return 'display:none;'; } } else { return ''; } } else { writeover(D_P . 'data/bbscache/ft_config.php'); //写入文件 return update(); } }
<?php !function_exists('adminmsg') && exit('Forbidden'); S::gp(array('admintype')); !$admintype && ($admintype = 'products'); $basename = "{$admin_file}?adminjob=admincollege&admintype={$admintype}"; require_once R_P . 'require/posthost.php'; $code1 = "HKLUOIU(^D^)_DI)_)"; $code2 = "@6219301&^%\$#(+_&%))"; $data = PostHost("http://nt.phpwind.net/stat.php?action=visist&site={$db_bbsurl}&verify=" . md5($code1 . 'download' . $code2), "POST"); if ($admintype == 'products') { ObHeader('http://www.phpwind.net/daxue/index.php?a=product'); } elseif ($admintype == 'stylesource') { ObHeader('http://www.phpwind.net/daxue/index.php?a=style'); } else { ObHeader('http://www.phpwind.net/daxue/index.php?a=hack'); }
$content = pwConvert($rt['content'], 'gbk', $db_charset); $subject = pwConvert($rt['subject'], 'gbk', $db_charset); $windid = pwConvert($windid, 'gbk', $db_charset); $uptitle = pwConvert($uptitle, 'gbk', $db_charset); $para = array('tid' => $rt['tid'], 'cid' => $cid, 'upposter' => $windid, 'uptitle' => $uptitle, 'subject' => $subject, 'rf' => $pwServer['HTTP_REFERER'], 'sitehash' => $db_sitehash, 'action' => 'updata'); ksort($para); reset($para); $arg = ''; foreach ($para as $key => $value) { $arg .= "{$key}=" . urlencode($value) . "&"; } $verify = md5(substr($arg, 0, -1) . $partner); if (strpos($content, '[attachment=') !== false) { preg_replace("/\\[attachment=([0-9]+)\\]/eis", "upload('\\1')", $content, $db_cvtimes); } $data = PostHost("http://app.phpwind.net/pw_app.php?", "action=updata&tid={$rt['tid']}&cid={$cid}&upposter={$windid}&uptitle={$uptitle}&sitehash={$db_sitehash}&subject=" . urlencode($subject) . "&content=" . urlencode($content) . "&verify={$verify}&rf=" . urlencode($pwServer['HTTP_REFERER']), "POST"); $backdata = substr($data, strpos($data, '$backdata=') + 10); $backdata = pwConvert($backdata, $db_charset, 'gbk'); Showmsg($backdata); } elseif ($q == 'survey') { //* @include_once pwCache::getPath(D_P . "data/bbscache/survey_cache.php"); pwCache::getData(D_P . "data/bbscache/survey_cache.php"); require_once R_P . 'require/header.php'; S::gp(array('itemid'), 'G', 2); if (!$itemid) { foreach ($survey_cache as $itemdb) { $itemid = $itemdb['itemid'] > $itemid ? $itemdb['itemid'] : $itemid; } } $survey = $survey_cache[$itemid]; require_once PrintEot('apps');
/** * 返回是否实名认证 * @param int $uid 用户id * @return string T * @access private */ function user_query($uid) { $userService = L::loadClass('UserService', 'user'); /* @var $userService PW_UserService */ $userInfo = $userService->get($uid, false, false, true); $tradeinfo = $userInfo['tradeinfo']; $tradeinfo = unserialize($tradeinfo); $alipay = $tradeinfo['alipay']; $isBinded = $tradeinfo['isbinded']; $user_id = $tradeinfo['user_id']; if ($alipay && $isBinded == 'T' && $user_id) { require_once R_P . 'lib/activity/alipay.php'; $AlipayInterface = new AlipayInterface('user_query'); $param = array('user_id' => $user_id); require_once R_P . 'require/posthost.php'; $xml_parser = xml_parser_create(); $returnResult = PostHost($AlipayInterface->alipayurl($param), '', 'POST'); //获取XML值 xml_parse_into_struct($xml_parser, $returnResult, $arr_vals); xml_parser_free($xml_parser); foreach ($arr_vals as $value) { if ($value['tag'] == 'IS_SUCCESS') { $is_success = $value['value']; } elseif ($value['tag'] == 'SIGN') { $sign = $value['value']; } elseif ($value['tag'] == 'IS_CERTIFIED') { $is_certified = $value['value']; } } if ($is_success == 'T' && $is_certified == 'T') { $tradeinfo['iscertified'] = 'T'; $tradeinfo = addslashes(serialize($tradeinfo)); $userService = L::loadClass('UserService', 'user'); /* @var $userService PW_UserService */ $userService->update($uid, array(), array(), array('tradeinfo' => $tradeinfo)); return $is_certified; } } return 'F'; }
/** * 移除用户个人APP */ function MoveAppsList($id) { global $winduid; $param = array(); $param = array('pw_appId' => 0, 'pw_uid' => $winduid, 'pw_siteurl' => $this->bbsurl, 'pw_sitehash' => $this->sitehash, 'pw_t' => $this->timestamp, 'pw_appId' => $id); $arg = implode('|', $param); $url = $this->server_url . '/list.php?'; foreach ($param as $key => $value) { $url .= "{$key}=" . urlencode($value) . '&'; } $url .= 'pw_sig=' . md5($arg . $this->siteownerid); require_once R_P . 'require/posthost.php'; PostHost($url, 'op=delapp', 'POST'); }
exit; } elseif ($action == 'bind') { $basename .= '&action=bind'; $db_ystats_ymail && adminmsg('ystat_ymail_error'); if ($_POST['step'] != 2) { include PrintEot('ystats'); exit; } else { S::gp(array('ymail'), 'P'); if (!$ymail || !preg_match('/^[a-zA-Z][a-zA-Z0-9_]{3,31}\\@(yahoo\\.com\\.cn|yahoo\\.cn)$/', $ymail)) { adminmsg('ystat_ymail_format'); } L::loadClass('xml', 'utility', false); $xml = new XML(); $xml->setEncode('UTF-8'); $response = PostHost($ystatsUrl . '/reg.html?type=3&key=' . $db_ystats_key . '&unit_id=' . $db_ystats_unit_id . '&ymail=' . $ymail); $response && ($response = chunkdecode($response)); $xml->setXMLData($response); if (!$xml->isXMLFile()) { adminmsg('ystat_xmldata_error'); } $xml->parse(); $ystats = array(); $result = XML::getChild($xml->getXMLRoot()); foreach ($result as $tag) { $tagname = XML::getTagName($tag); $ystats[$tagname] = XML::getData($tag); } if ($ystats['status'] != '0') { adminmsg($ystats['info']); }
Showmsg('olpay_seterror'); } require_once R_P . 'require/header.php'; if ($payResult == '10') { $rt = $db->get_one("SELECT c.uid,c.paycredit,c.number,c.state,m.username FROM pw_clientorder c LEFT JOIN pw_members m USING(uid) WHERE c.order_no=" . pwEscape($orderId)); $rt['state'] && refreshto('userpay.php', 'complete_list'); $number = $payAmount / 100; $rt['number'] != $number && Showmsg('gross_error'); $rmbrate = $db_creditpay[$rt['paycredit']]['rmbrate']; !$rmbrate && ($rmbrate = 10); $currency = $number * $rmbrate; require_once R_P . 'require/credit.php'; $credit->addLog('main_olpay', array($rt['paycredit'] => $currency), array('uid' => $rt['uid'], 'username' => $rt['username'], 'ip' => $onlineip, 'number' => $rt['number'])); $credit->set($rt['uid'], $rt['paycredit'], $currency); $descrip = getLangInfo('other', 'succeed_order'); $db->update("UPDATE pw_clientorder SET state=2,descrip=" . pwEscape($descrip, false) . " WHERE order_no=" . pwEscape($orderId)); require_once R_P . 'require/msg.php'; $message = array('toUser' => $rt['username'], 'subject' => 'olpay_title', 'content' => 'olpay_content_2', 'other' => array('currency' => $currency, 'cname' => $credit->cType[$rt['paycredit']], 'number' => $rt['number'])); pwSendMsg($message); require_once R_P . 'require/posthost.php'; $cksignMsg = explode('&', $cksignMsg); foreach ($cksignMsg as $key => $value) { $cksignMsg[$key] = urlencode($value); } $cksignMsg['date'] = get_date($timestamp, 'Y-m-d-H:i:s'); $cksignMsg['site'] = $pwServer['HTTP_HOST']; $cksignMsg = implode('&', $cksignMsg); PostHost("http://pay.phpwind.net/pay/stats.php", $cksignMsg, 'POST'); } require_once PrintEot('pay99bill'); footer();
require_once PrintEot('m_myapp'); footer(); } elseif ($action == 'del') { define('AJAX', 1); InitGP(array('id')); $db->update("DELETE FROM pw_userapp WHERE uid=" . pwEscape($winduid) . ' AND appid=' . pwEscape($id)); if ($db->affected_rows()) { $param['pw_appId'] = $id; $arg = implode('|', $param); $url = $server_url . '/list.php?'; foreach ($param as $key => $value) { $url .= "{$key}=" . urlencode($value) . '&'; } $url .= 'pw_sig=' . md5($arg . $db_siteownerid); require_once R_P . 'require/posthost.php'; PostHost($url, 'op=delapp', 'POST'); } echo 'ok'; ajax_footer(); } elseif ($action == 'edit') { InitGP(array('show', 'privacy', 'feed')); //显示在快捷菜单栏处理 list($fidshortcut) = explode("\t", $winddb['shortcut']); foreach ($show as $key => $value) { if ($value == 1) { $showshortcut[] = $key; } } $shortcut = $fidshortcut . "\t" . ',' . implode(',', $showshortcut) . ','; $db->update("UPDATE pw_members SET shortcut=" . pwEscape($shortcut) . " WHERE uid=" . pwEscape($winduid)); $basic_app_with_privacy = array('write', 'diary', 'photos');
$update = array('area_default_alias', 'string', 'finance', ''); $db->update("REPLACE INTO pw_hack VALUES (" . pwImplode($update) . ')'); //更新关联版块信息 updatecache_cnc(); @unlink(D_P . 'data/install_sys.sql'); list($prev, $next) = getStepto($action); pwHeader("{$basename}?action={$next}"); exit; } } /** * 站点资源导航信息 */ if ($action == 'resources') { require_once R_P . 'require/posthost.php'; $log_resources = PostHost('http://u.phpwind.net/install/partner.php', "step={$step}&url={$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}", 'GET', null, 80, 10); if (!$log_resources || strpos($log_resources, '<pw_log_resources>') === false) { $log_resources = $lang['log_resources']; } $stepright = $lang['success']; pwViewHtml($action); exit; } if ($action == 'static') { if (!file_exists(D_P . 'data/sql_config.php')) { Promptmsg('config_noexists', 'database'); } else { $db = pwNewDBForInstall(); } require_once R_P . 'admin/cache.php'; updatecache_conf('area', true);
/** * 数据交互 * @param int $tid 帖子id * @param int $actmid 活动二级分类id * @return '' */ function pushActivityToAppCenter($tid, $actmid) { global $db_siteid, $db_siteownerid, $db_sitehash, $db_bbsurl, $db_bbsname, $db_charset; $defaultValueTableName = getActivityValueTableNameByActmid(); $this->db->update("UPDATE {$defaultValueTableName} SET pushtime=" . S::sqlEscape($this->timestamp) . " WHERE tid=" . S::sqlEscape($tid)); $i = $payMemberNums = $orderMemberNums = $payMemberCosts = $orderMemberCosts = $payRefundCouts = 0; $query = $this->db->query("SELECT am.tid,am.fupid,am.isrefund,am.ifpay,am.totalcash,am.signupnum,t.subject,t.authorid,t.author,t.postdate FROM pw_activitymembers am LEFT JOIN pw_threads t ON am.tid=t.tid WHERE am.tid=" . S::sqlEscape($tid)); while ($rt = $this->db->fetch_array($query)) { if ($rt['ifpay'] != 3 && $rt['fupid'] == 0) { //费用关闭的不算 $orderMemberNums += $rt['signupnum']; //已报名人数 } if ($rt['ifpay'] != 3 && $rt['isrefund'] == 0) { //费用关闭的不算 $orderMemberCosts += $rt['totalcash']; //涉及费用 } if ($rt['ifpay'] != 0 && $rt['ifpay'] != 3 && $rt['fupid'] == 0) { //自己支付1、确认支付2、费用退完4 $payMemberNums += $rt['signupnum']; //已经付款的人数 } if ($rt['ifpay'] != 0 && $rt['ifpay'] != 3 && $rt['isrefund'] == 0) { //自己支付1、确认支付2、费用退完4 $payMemberTempCosts += $rt['totalcash']; //已支付费用 } if ($rt['isrefund'] == 1) { $payRefundCouts += $rt['totalcash']; //退款费用 } if ($i == 0) { $tid = $rt['tid']; $subject = $rt['subject']; $authorid = $rt['authorid']; $author = $rt['author']; $postdate = $rt['postdate']; } } if ($orderMemberNums) { //有人报名才更新 $author = pwConvert($author, 'gbk', $db_charset); $subject = pwConvert($subject, 'gbk', $db_charset); $acttype = pwConvert($this->activitymodeldb[$actmid]['name'], 'gbk', $db_charset); $db_bbsname = pwConvert($db_bbsname, 'gbk', $db_charset); $partner = md5($db_siteid . $db_siteownerid); $payMemberCosts = $payMemberTempCosts - $payRefundCouts; //已支付费用 $para = array('tid' => $tid, 'subject' => $subject, 'authorid' => $authorid, 'author' => $author, 'postdate' => $postdate, 'acttype' => $acttype, 'ordermembernums' => $orderMemberNums, 'ordermembercosts' => $orderMemberCosts, 'paymembernums' => $payMemberNums, 'paymembercosts' => $payMemberCosts, 'sitehash' => $db_sitehash, 'bbsurl' => $db_bbsurl, 'bbsname' => $db_bbsname); ksort($para); reset($para); $arg = ''; foreach ($para as $key => $value) { $arg .= "{$key}={$value}&"; $url .= "{$key}=" . urlencode($value) . "&"; } $sign = md5(substr($arg, 0, -1) . $partner); $url .= 'sign=' . $sign; require_once R_P . 'require/posthost.php'; PostHost("http://stats.phpwind.com/api.php?m=app&job=alipayaa", $url, "POST"); } }
/** * @desc 判断是否需要更新 */ function getWordUpdate() { global $db, $updateHost; require_once R_P . 'require/posthost.php'; $appclient = L::loadClass('AppClient'); $sitehash = $appclient->getApicode(); //获取中心词库词语数量 $app_num = $db->get_value("SELECT COUNT(*) AS count FROM pw_wordfb WHERE custom = 0"); //获取更新词数 if ($app_num) { $data = PostHost($updateHost, "m=wordsfb&a=request&sitehash={$sitehash}", "POST"); } else { $data = PostHost($updateHost, "m=wordsfb&a=requestall&sitehash={$sitehash}", "POST"); } $data = intval($data); return $data; }
$appurl = $appclient->getOnlineApp(); } elseif ($admintype == 'blooming') { /*帖子交换*/ $appurl = $appclient->getThreadsUrl('admin', 'blooming', 'index'); } elseif ($admintype == 'taolianjie') { /*淘链接*/ $appurl = $appclient->getTaojinUrl('admin', 'taoke', 'index'); } elseif ($admintype == 'i9p') { /*随拍随发*/ if (empty($_POST['step'])) { $appurl = $appclient->getAppIframe('17'); } elseif ($_POST['step'] == 2) { S::gp(array('open_app')); $str = $appclient->alertAppState('open'); $app_set = $db_server_url . '/appset.php'; if ($response = PostHost($app_set, $str, 'POST')) { $response = unserialize($response); } else { $response = array('result' => 'error', 'error' => 3); } if (empty($response['error'])) { setConfig('db_appifopen', 1); updatecache_c(); } adminmsg($response['result'], "{$basename}&admintype={$admintype}"); } } elseif ($admintype == 'platformweiboapp') { $siteBindService = L::loadClass('WeiboSiteBindService', 'sns/weibotoplatform/service'); /* @var $siteBindService PW_WeiboSiteBindService */ $appurl = $siteBindService->getAppConfigUrl(); } elseif ($admintype == 'yunstatistics') {
!defined('P_W') && exit('Forbidden'); S::gp(array('subjectid', 'page', 'type')); $u = "http://dm.phpwind.net/misc"; $subjectid = (int) $subjectid; (!is_numeric($page) || $page < 1) && ($page = 1); $s = '300.xml'; if ($type == 'general') { $s = $subjectid ? $subjectid . '_' . $page . '.xml' : '300.xml'; } elseif ($type == 'magic') { $s = $subjectid ? $subjectid . '_' . $page . '.xml' : '200.xml'; } $cachefile = D_P . "data/bbscache/myshow_{$s}"; if (!file_exists($cachefile) || $timestamp - pwFilemtime($cachefile) > 43200) { $data = ''; if ($subjectid) { $url = "{$u}/list/{$s}?{$timestamp}"; } else { $url = "{$u}/menu/{$s}?{$timestamp}"; } require_once R_P . 'require/posthost.php'; $data = PostHost($url); if ($data && strpos($data, '<?xml') !== false) { //* writeover($cachefile, $data); pwCache::writeover($cachefile, $data); } } header("Content-Type: text/xml; charset=UTF-8"); $data = pwCache::readover($cachefile); echo $data; exit;
/** * 自动注册APP帐号 */ function RegisterApp($host, $type = 'new', $siteid, $siteownerid, $sitehash) { global $admin_name; require_once R_P . 'require/posthost.php'; //if (!$this->isLocalhost($host) && (!$this->appkey || $type == 'modify')) { if (!$this->isLocalhost($host)) { if ($type == 'modify') { $a = 'modify'; $pw_query = '&pw_query=' . urlencode($this->getApicode()); } else { $a = 'register'; $pw_query = ''; $siteid = $this->siteid; $siteownerid = $this->siteownerid; $sitehash = $this->sitehash; } $reginfo = array('pw_siteid' => $siteid, 'pw_siteownerid' => $siteownerid, 'pw_sitehash' => $sitehash, 'pw_pt' => $this->timestamp, 'pw_siteurl' => $this->bbsurl, 'pw_charset' => $this->charset, 'pw_username' => $admin_name); ksort($reginfo); $str = ''; foreach ($reginfo as $key => $val) { $str .= $key . '=' . urlencode($val) . '&'; } $sig = md5($str . $siteownerid); $str .= 'pw_sig=' . $sig; $data = PostHost('http://app.phpwind.net/pwbbsapi.php?', "m=register&a={$a}&" . $str . $pw_query, 'POST'); $backdata = substr($data, strpos($data, '$backdata=') + 10); return $backdata; if (strpos($data, '$back=next') !== false) { return 'next'; } else { return 'end'; } } return false; }