本文整理汇总了PHP中CommonAction::passport_decrypt方法的典型用法代码示例。如果您正苦于以下问题:PHP CommonAction::passport_decrypt方法的具体用法?PHP CommonAction::passport_decrypt怎么用?PHP CommonAction::passport_decrypt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CommonAction
的用法示例。
在下文中一共展示了CommonAction::passport_decrypt方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: manframe
public function manframe()
{
if (!session('?adminid')) {
redirect(U(C('USER_AUTH_GATEWAY')));
}
$config = M('config')->where('id=1')->find();
$xiaohao_config = json_decode($config['xiaohao_config'], true);
$kongbao_config = json_decode($config['kongbao_config'], true);
$this->assign('xiaohao_config', $xiaohao_config);
$user_array = array();
$counts = M('user')->count();
$user_array['user_counts'] = $counts;
$model = new UserViewModel();
$user_array['user_detail'] = $model->field('user_type,type_name,count(1) counts')->group('user_type')->order('user_type asc')->select();
$this->assign('user_array', $user_array);
$recharge = array();
$where = array();
$where['type'] = 1;
$recharge_list = M('pay_order')->where($where)->field('status,count(1) counts,sum(pay_money) money')->group('status')->select();
foreach ($recharge_list as $rk => $rv) {
if ($rv['status'] == 0) {
$recharge['n'] = $rv;
} else {
$recharge['y'] = $rv;
}
}
$recharge['a']['counts'] = $recharge['n']['counts'] + $recharge['y']['counts'];
$recharge['a']['money'] = $recharge['n']['money'] + $recharge['y']['money'];
$this->assign('recharge', $recharge);
$where['type'] = 0;
$buy_order['y'] = M('pay_order')->where($where)->field('count(1) counts,sum(pay_money) money')->find();
$this->assign('buy_order', $buy_order);
$tixian = array();
$where = array();
$tixian_list = M('tixian')->where($where)->field('status,count(1) counts,sum(money) money')->group('status')->select();
foreach ($tixian_list as $tk => $tv) {
if ($tv['status'] == 1) {
$tixian['n'] = $tv;
} else {
if ($tv['status'] == 2) {
$tixian['y'] = $tv;
} else {
if ($tv['status'] == 3) {
$tixian['f'] = $tv;
}
}
}
}
$tixian['a']['counts'] = $tixian['n']['counts'] + $tixian['y']['counts'] + $tixian['f']['counts'];
$tixian['a']['money'] = $tixian['n']['money'] + $tixian['y']['money'] + $tixian['f']['money'];
$this->assign('tixian', $tixian);
$kongbao = array();
$model = new KongbaoViewModel();
$kongbao['n'] = M('kongbao')->where('isused=0')->count();
$kongbao['detail'] = $model->field('type_id,name,count(1) counts')->where('isused=0')->group('type_id')->order('type_id asc')->select();
$this->assign('kongbao', $kongbao);
$tixing_kb = $kongbao_config['tixing'];
$tixing_text_kb = '';
if ($kongbao['n'] <= $tixing_kb) {
$close_url = ' <a href=\'javascript:void(0)\' onclick=\'btn_close("kongbao")\'>【关闭提示】</a>';
$tixing_text_kb = '你当前的未使用空包数量已不足,请及时补货!' . $close_url;
}
$this->assign('tixing_text_kb', $tixing_text_kb);
if ($xiaohao_config['valid'] == 1) {
$xiaohao = array();
$model = new XiaohaoViewModel();
$xiaohao['n'] = M('xiaohao')->where('isused=0')->count();
$xiaohao['detail'] = $model->field('type_id,name,count(1) counts')->where('isused=0')->group('type_id')->order('type_id asc')->select();
$this->assign('xiaohao', $xiaohao);
$tixing_xh = $xiaohao_config['tixing'];
$tixing_text_xh = '';
if ($xiaohao['n'] <= $tixing_xh) {
$close_url = ' <a href=\'javascript:void(0)\' onclick=\'btn_close("xiaohao")\'>【关闭提示】</a>';
$tixing_text_xh = '你当前的未使用小号数量已不足,请及时补货!' . $close_url;
}
$this->assign('tixing_text_xh', $tixing_text_xh);
}
$auth_code = '';
if ($config['auth_code'] != '') {
$auth_code = $config['auth_code'];
$key_code = $config['auth_keycode'];
$CommonAction = new CommonAction();
$auth_code = $CommonAction->passport_decrypt($auth_code, $key_code);
$auth_code = explode('&', $auth_code);
}
$this->assign('auth_code', $auth_code);
$array['osinfo'] = PHP_OS;
$array['osinfo'] .= @ini_get('safe_mode') ? ' Safe Mode' : NULL;
$array['serverinfo'] = $_SERVER['SERVER_SOFTWARE'];
$sqlinfo = M()->query('SELECT VERSION()');
$array['sqlinfo'] = $sqlinfo[0]['VERSION()'];
$array['serverip'] = $_SERVER['SERVER_NAME'] . ' [ ' . gethostbyname($_SERVER['SERVER_NAME']) . ' ]';
$array['servertime'] = date('Y年n月j日 H:i:s');
if (@ini_get('file_uploads')) {
$upload = ini_get('upload_max_filesize');
} else {
$upload = '<font color="red">不支持上传</font>';
}
$array['upload'] = $upload;
$this->assign('config', $config);
//.........这里部分代码省略.........