function getcreditsettings($get, $post) { if (! API_GETCREDITSETTINGS) { return API_RETURN_FORBIDDEN; } $cfg = unserialize($GLOBALS['_CFG']['integrate_config']); $credits = $cfg['uc_lang']['credits']; include_once (ROOT_PATH . 'plugins/uc_client/client.php'); return uc_serialize($credits); }
function _serialize($arr, $htmlon = 0) { return uc_serialize($arr, $htmlon); }
} elseif ($action == 'updateapps') { !API_UPDATEAPPS && exit(API_RETURN_FORBIDDEN); //更新应用列表 exit(API_RETURN_SUCCEED); } elseif ($action == 'updateclient') { !API_UPDATECLIENT && exit(API_RETURN_FORBIDDEN); //更新客户端缓存 exit(API_RETURN_SUCCEED); } elseif ($action == 'updatecredit') { !UPDATECREDIT && exit(API_RETURN_FORBIDDEN); //更新用户积分 exit(API_RETURN_SUCCEED); } elseif ($action == 'getcreditsettings') { !GETCREDITSETTINGS && exit(API_RETURN_FORBIDDEN); //向 UCenter 提供积分设置 echo uc_serialize($credits); } elseif ($action == 'updatecreditsettings') { !API_UPDATECREDITSETTINGS && exit(API_RETURN_FORBIDDEN); //更新应用积分设置 exit(API_RETURN_SUCCEED); } else { exit(API_RETURN_FAILED); } function 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);
function getcreditsettings($get, $post) { !API_GETCREDITSETTINGS && exit(API_RETURN_FORBIDDEN); $options = get_option(UCENTER_INTEGRATION_SETTING_NAME); if (empty($options['ucenter_credit_name'])) { exit(API_RETURN_FAILED); } $creditsettings[] = array($options['ucenter_credit_name'], $options['ucenter_credit_unit']); exit(uc_serialize($creditsettings)); }