本文整理汇总了PHP中get_nickname函数的典型用法代码示例。如果您正苦于以下问题:PHP get_nickname函数的具体用法?PHP get_nickname怎么用?PHP get_nickname使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_nickname函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: lists
public function lists()
{
$this->assign('add_button', false);
$this->assign('search_button', false);
$this->assign('del_button', false);
$this->assign('check_all', false);
$top_more_button[] = array('title' => '导出数据', 'url' => U('export', array('ask_id' => $this->ask_id)));
$this->assign('top_more_button', $top_more_button);
$map['ask_id'] = $this->ask_id;
session('common_condition', $map);
$list = $this->_get_model_list($this->model);
$qdao = D('AskQuestion');
foreach ($list['list_data'] as &$vo) {
//$user = get_followinfo ( $vo ['uid'] );
//$vo ['nickname'] = $user ['nickname'];
$question_id = $vo['question_id'];
$vo['nickname'] = get_nickname($vo['uid']);
$vo['times'] += 1;
$vo['question_id'] = $qdao->getQuestionTitle($question_id, $this->ask_id);
$vo['true_answer'] = $qdao->getQuestionAnswer($question_id, $this->ask_id);
//$vo ['answer']= implode ( ', ', unserialize ( $vo ['answer'] ) );
$vo['answer'] = implode(', ', unserialize($vo['answer']));
$vo['answer'] = $qdao->getQuestionAnswerExtra($question_id, $this->ask_id, $vo['answer']);
$vo['is_correct'] = $vo['is_correct'] == 1 ? '是' : '否';
}
//dump($list['list_data']);die();
$this->assign($list);
// dump($list);exit;
$this->display();
}
开发者ID:yxz1025,项目名称:weiphp3.0,代码行数:30,代码来源:AnswerController.class.php
示例2: lists
public function lists()
{
$top_more_button[] = array('title' => '导入数据', 'url' => U('import'));
$this->assign('top_more_button', $top_more_button);
$model = $this->getModel('credit_data');
$map['token'] = get_token();
if (!empty($_GET['uid'])) {
$uidArr = wp_explode($_GET['uid']);
$map['uid'] = array('in', $uidArr);
} elseif (!empty($_REQUEST['nickname'])) {
$map['uid'] = array('in', D('Common/User')->searchUser($_REQUEST['nickname']));
}
if (!isset($map['uid'])) {
$map['uid'] = array('exp', '>0');
}
if (!empty($_REQUEST['credit_name'])) {
$map['credit_name'] = safe($_REQUEST['credit_name']);
}
if (!empty($_REQUEST['start_time']) && !empty($_REQUEST['end_time'])) {
$map['cTime'] = array('between', '"' . intval($_REQUEST['start_time']) . ',' . intval($_REQUEST['start_time']) . '"');
} elseif (!empty($_REQUEST['start_time'])) {
$map['cTime'] = array('egt', intval($_REQUEST['start_time']));
} elseif (!empty($_REQUEST['end_time'])) {
$map['cTime'] = array('elt', intval($_REQUEST['end_time']));
}
session('common_condition', $map);
$list_data = $this->_get_model_list($model);
foreach ($list_data['list_data'] as &$vo) {
$vo['uid'] = get_nickname($vo['uid']);
}
$this->assign($list_data);
// dump($list_data);
$this->display();
}
开发者ID:ennnnny,项目名称:weiphp3,代码行数:34,代码来源:CreditDataController.class.php
示例3: index
public function index()
{
if (IS_POST) {
$post_data = I('post.');
$post_data['first'] = $post_data['rows'] * ($post_data['page'] - 1);
$map = array();
$map = $this->_search();
$total = $this->Model->where($map)->count();
if ($total == 0) {
$_list = '';
} else {
$_list = $this->Model->where($map)->order($post_data['sort'] . ' ' . $post_data['order'])->limit($post_data['first'] . ',' . $post_data['rows'])->select();
}
$option["status"] = array(0 => '禁用', 1 => '启用');
foreach ($_list as $list_key => $list_one) {
foreach ($list_one as $list_one_key => $list_one_field) {
if ($option[$list_one_key] != '') {
$_list[$list_key][$list_one_key] = $option[$list_one_key][$list_one_field];
}
}
$_list[$list_key]['action_title'] = get_action($_list[$list_key]['action_id'], 'title');
$_list[$list_key]['user_nickname'] = get_nickname($_list[$list_key]['user_id']);
$_list[$list_key]["create_time"] = date("Y年m月d日", $_list[$list_key]["create_time"]);
$operate_menu = '';
if (Is_Auth('Admin/ActionLog/edit')) {
$operate_menu = $operate_menu . "<a href='#' onclick=\"Submit_Form('ActionLog_Form','ActionLog_Data_List','" . U('edit', array('id' => $_list[$list_key]['id'])) . "','','编辑数据','');\">查看行为日志</a>";
}
$_list[$list_key]['operate'] = $operate_menu;
}
$data = array('total' => $total, 'rows' => $_list);
$this->ajaxReturn($data);
} else {
$this->display();
}
}
开发者ID:xxg3053,项目名称:Gms,代码行数:35,代码来源:ActionLogController.class.php
示例4: lists
public function lists()
{
$model = $this->getModel('credit_data');
$map['token'] = get_token();
if (!empty($_GET['uid'])) {
$map['uid'] = intval($_GET['uid']);
} elseif (!empty($_REQUEST['nickname'])) {
$user_map['nickname'] = array('like', '%' . htmlspecialchars($_REQUEST['nickname']) . '%');
}
if (!isset($map['uid'])) {
$map['uid'] = array('exp', '>0');
}
if (!empty($_REQUEST['credit_name'])) {
$map['credit_name'] = safe($_REQUEST['credit_name']);
}
if (!empty($_REQUEST['start_time']) && !empty($_REQUEST['end_time'])) {
$map['cTime'] = array('between', '"' . intval($_REQUEST['start_time']) . ',' . intval($_REQUEST['start_time']) . '"');
} elseif (!empty($_REQUEST['start_time'])) {
$map['cTime'] = array('egt', intval($_REQUEST['start_time']));
} elseif (!empty($_REQUEST['end_time'])) {
$map['cTime'] = array('elt', intval($_REQUEST['end_time']));
}
session('common_condition', $map);
$list_data = $this->_get_model_list($model);
foreach ($list_data['list_data'] as &$vo) {
$vo['nickname'] = get_nickname($vo['uid']);
}
$this->assign($list_data);
// dump($list_data);
$this->display();
}
开发者ID:zqstudio2015,项目名称:myweiphp,代码行数:31,代码来源:CreditDataController.class.php
示例5: autoLogin
/**
* 自动登录用户
* @param integer $user 用户信息数组
*/
private function autoLogin($user)
{
/* 更新登录信息 */
$data = array('uid' => $user['uid'], 'login' => array('exp', '`login`+1'), 'last_login_time' => NOW_TIME, 'last_login_ip' => get_client_ip(1));
$this->save($data);
/* 记录登录SESSION和COOKIES */
$auth = array('uid' => $user['uid'], 'username' => get_nickname($user['uid']), 'last_login_time' => $user['last_login_time']);
session('user_auth', $auth);
session('user_auth_sign', data_auth_sign($auth));
}
开发者ID:bjjfsd,项目名称:youweihui,代码行数:14,代码来源:MemberModel.class.php
示例6: _recordLogin
/**
* 设置登录状态、记录登录日志
*
* @param integer $uid
* 用户ID
* @param boolean $is_remember_me
* 是否记录登录状态,默认为false
* @return boolean 操作是否成功
*/
private function _recordLogin($uid)
{
if (!$this->getCookieUid()) {
cookie('QT_LOGGED_USER', $this->jiami($this->change() . ".{$uid}."));
}
$this->setField('last_login_time', NOW_TIME, 'uid=' . $uid);
$auth = array('uid' => $uid, 'nickname' => get_nickname($uid), 'last_login_time' => NOW_TIME);
session('user_auth', $auth);
session('user_auth_sign', data_auth_sign($auth));
return true;
}
开发者ID:nullog,项目名称:zhanglubao,代码行数:20,代码来源:UserUserModel.class.php
示例7: getInvestorlist
public function getInvestorlist($pid, $page = '0', $number = '8', $order = 'lead_type desc,create_time desc')
{
$projectStatis = $this->getProjectStatis($pid);
if ($projectStatis['success'] == false) {
return $projectStatis;
} else {
$data['total'] = $projectStatis['info']['actualinvestors'];
$data['per_page'] = $number;
$data['page'] = $page + 1;
$data['last_page'] = ceil($data['total'] / $number);
$data['estimatefund'] = $projectStatis['info']['estimatefund'];
$data['raisedfund'] = $projectStatis['info']['raisedfund'];
$data['fundpercentage'] = $data['raisedfund'] / $data['estimatefund'];
if ($page <= $data['last_page']) {
$where['project_id'] = $pid;
$where['status'] = 9;
$data['investors'] = M('ProjectInvestor')->where($where)->page($page . ',' . $number)->order($order)->field('investor_id as id,fund,lead_type')->select();
foreach ($data['investors'] as &$investor) {
switch ($investor['lead_type']) {
case 9:
$investor['lead_type'] = 领投人;
break;
case 3:
$investor['lead_type'] = 跟投人;
break;
}
$investor['nickname'] = get_nickname($investor['id']);
}
return array('success' => true, 'info' => $data);
/*
foreach($data['users'] as &$user){
$getUserInfo['nickname'] = get_membername($user['id']);
$getUserInfo['photo_url'] = 'http://'.$_SERVER['HTTP_HOST'].get_memberface($user['id']);
$currentUser = is_login();
if($currentUser>0){
$getUserInfo['relation'] =D('Followers')->getRelation($currentUser,$user['id']);
}
else{
$getUserInfo['relation'] =null;
}
$user = array_merge($user,$getUserInfo);
}
return $data;*/
}
return array('success' => false, 'info' => '没有更多投资者信息!');
}
return array('success' => true, 'info' => '没有粉丝信息!');
}
开发者ID:rainly123,项目名称:zyzm,代码行数:48,代码来源:ManageModel.class.php
示例8: afterPayAlipay
public function afterPayAlipay($record)
{
$order_id = $record['out_trade_no'];
//交易状态
if ($record['trade_status'] == 'TRADE_FINISHED' || $record['trade_status'] == 'TRADE_SUCCESS') {
$rechargeModel = M('Order');
$order = $rechargeModel->getOrder($order_id);
if ($order['record_id'] == 0) {
//未作处理
if (!$order['amount'] == $record['total_fee']) {
return '失败——付款订单出错,数额与订单不符,付款失败。请联系管理员。' . $order_id;
/* $this->error('付款订单出错,数额与订单不符,付款失败。请联系管理员。');*/
}
if (!$rechargeModel->where(array('id' => $order_id))->setField('record_id', $record['record_id'])) {
return '失败——更改订单状态失败。' . $order_id;
/* $this->error('更改订单状态失败。');*/
}
$rechargeType = $order['recharge_type'];
if (!$order['recharge_type']) {
return '失败——充值字段合法性验证失败,请联系管理员。' . $order_id;
/* $this->error('充值字段合法性验证失败,请联系管理员。');*/
}
$scoreType = $order['score_type'];
$ratio = $rechargeType['UNIT'];
$name = $scoreType['title'];
$step = floor($order['amount'] * $ratio);
if (M('Ucenter/Score')->setUserScore($order['uid'], $step, $order['field'], 'inc', 'recharge_order', $order_id, get_nickname($order['uid']) . '进行积分充值')) {
$rechargeModel->where(array('id' => $order_id))->setField('payok', 1);
S('recharge_order_' . $order_id, null);
return '成功——充值成功。' . get_nickname($order['uid']) . '[' . $order['uid'] . ']' . '的' . $name . ' 增加 ' . $step;
/* $this->success('充值成功。您的' . $name . ' 增加 ' . $step . '。即将跳转回充值页面。', U('recharge/index/index'), 10);*/
} else {
return '失败——支付成功,但充值到数据库失败。请联系管理员。' . $order_id;
/* $this->error('支付成功,但充值到数据库失败。请联系管理员。');*/
}
} else {
return '失败——该订单已经支付,请勿重复支付。' . $order_id;
/* $this->error('该订单已经支付,请勿重复支付。');*/
}
//判断该笔订单是否在商户网站中已经做过处理
//如果没有做过处理,根据订单号(out_trade_no)在商户网站的订单系统中查到该笔订单的详细,并执行商户的业务程序
} else {
return '失败——支付状态出错。' . $record['trade_status'] . $order_id;
/* $this->error('支付状态出错。' . $record['trade_status']);*/
}
}
开发者ID:terrydeng,项目名称:beimeibang1205,代码行数:46,代码来源:PayWidget.class.php
示例9: afterPayAlipay
public function afterPayAlipay($record)
{
$order_id = $record['out_trade_no'];
//交易状态
if ($record['trade_status'] == 'TRADE_FINISHED' || $record['trade_status'] == 'TRADE_SUCCESS') {
$data['condition'] = 1;
//置为已支付
$data['pay_time'] = $record['notify_time'];
$orderModel = M('store_order');
$s_uid = $orderModel->where(array('id' => $order_id))->getField('s_uid');
$shopModel = M('Store/StoreShop');
$shopModel->where(array('uid' => $s_uid))->setInc('order_count', 1);
$orderModel->where(array('id' => $order_id))->save($data);
return '付款成功,等待卖家' . get_nickname($s_uid) . '发货';
} else {
return '失败——支付状态出错。' . $record['trade_status'] . $order_id;
/* $this->error('支付状态出错。' . $record['trade_status']);*/
}
}
开发者ID:terrydeng,项目名称:beimeibang1205,代码行数:19,代码来源:PayWidget.class.php
示例10: groupInvite
public function groupInvite()
{
$aGroupId = I('group_id', 0, 'intval');
$this->checkAuth();
if (IS_POST) {
$uids = I('post.uids');
$group = D('Group')->getGroup($aGroupId);
foreach ($uids as $uid) {
D('Message')->sendMessage($uid, '邀请加入群组', get_nickname(is_login()) . "邀请您加入群组【{$group['title']}】 <a class='ajax-post' href='" . U('group/index/attend', array('group_id' => $aGroupId)) . "'>接受邀请</a>", 'group/index/group', array('id' => $aGroupId), is_login());
}
$result = array('status' => 1, 'info' => '邀请成功');
$this->ajaxReturn($result);
} else {
$friendList = D('Follow')->getAllFriends(is_login());
$friendIds = getSubByKey($friendList, 'follow_who');
$friends = array();
foreach ($friendIds as $v) {
$friends[$v] = query_user(array('avatar128', 'avatar64', 'nickname', 'uid', 'space_url'), $v);
}
$this->assign('friends', $friends);
$this->assign('group_id', $aGroupId);
$this->display();
}
}
开发者ID:chenyongze,项目名称:bighaha,代码行数:24,代码来源:IndexController.class.php
示例11: notify
public function notify()
{
require_once './Application/Recharge/Lib/Alipay/alipay.config.php';
require_once './Application/Recharge/Lib/Alipay/lib/alipay_notify.class.php';
$alipayNotify = new \AlipayNotify($alipay_config);
$verify_result = $alipayNotify->verifyNotify();
if ($verify_result) {
//验证成功
$alipayRecordModel = D('recharge_record_alipay');
$record['body'] = I('post.body', '未获取', 'op_t');
$record['buyer_email'] = I('post.buyer_email', '未获取', 'op_t');
$record['buyer_id'] = I('post.buyer_id', '未获取', 'op_t');
$record['exterface'] = I('post.exterface', '未获取', 'op_t');
$record['is_success'] = I('post.is_success', '未获取', 'op_t');
$record['notify_id'] = I('post.notify_id', '未获取', 'op_t');
$record['notify_time'] = I('post.notify_time', '0', 'strtotime');
$record['notify_type'] = I('post.notify_type', '未获取', 'op_t');
$record['out_trade_no'] = I('post.out_trade_no', '未获取', 'op_t');
$record['payment_type'] = I('post.payment_type', '未获取', 'op_t');
$record['seller_email'] = I('post.seller_email', '未获取', 'op_t');
$record['seller_id'] = I('post.seller_id', '未获取', 'op_t');
$record['subject'] = I('post.subject', '未获取', 'op_t');
$record['total_fee'] = I('post.total_fee', '未获取', 'op_t');
$record['trade_no'] = I('post.trade_no', '未获取', 'op_t');
$record['trade_status'] = I('post.trade_status', '未获取', 'op_t');
$record['sign'] = I('post.sign', '未获取', 'op_t');
$record['sign_type'] = I('post.sign', '未获取', 'op_t');
if (!($rs = $alipayRecordModel->add($record))) {
exit('失败——保存支付结果失败。请联系管理员。');
/* $this->error('保存支付结果失败。请联系管理员。');*/
}
//商户订单号
$order_id = $record['out_trade_no'];
//交易状态
if ($record['trade_status'] == 'TRADE_FINISHED' || $record['trade_status'] == 'TRADE_SUCCESS') {
$rechargeModel = D('Order');
$order = $rechargeModel->getOrder($order_id);
if ($order['record_id'] == 0) {
//未作处理
if (!$order['amount'] == $record['total_fee']) {
exit('失败——付款订单出错,数额与订单不符,付款失败。请联系管理员。' . $order_id);
/* $this->error('付款订单出错,数额与订单不符,付款失败。请联系管理员。');*/
}
if (!$rechargeModel->where(array('id' => $order_id))->setField('record_id', $rs)) {
exit('失败——更改订单状态失败。' . $order_id);
/* $this->error('更改订单状态失败。');*/
}
$rechargeType = $order['recharge_type'];
if (!$order['recharge_type']) {
exit('失败——充值字段合法性验证失败,请联系管理员。' . $order_id);
/* $this->error('充值字段合法性验证失败,请联系管理员。');*/
}
$scoreType = $order['score_type'];
$ratio = $rechargeType['UNIT'];
$name = $scoreType['title'];
$step = floor($order['amount'] * $ratio);
$memberModel = D('Member');
if ($memberModel->where(array('uid' => $order['uid']))->setInc('score' . $order['field'], $step)) {
$rechargeModel->where(array('id' => $order_id))->setField('payok', 1);
S('recharge_order_' . $order_id, null);
exit('成功——充值成功。' . get_nickname($order['uid']) . '[' . $order['uid'] . ']' . '的' . $name . ' 增加 ' . $step);
/* $this->success('充值成功。您的' . $name . ' 增加 ' . $step . '。即将跳转回充值页面。', U('recharge/index/index'), 10);*/
} else {
exit('失败——支付成功,但充值到数据库失败。请联系管理员。' . $order_id);
/* $this->error('支付成功,但充值到数据库失败。请联系管理员。');*/
}
} else {
exit('失败——该订单已经支付,请勿重复支付。' . $order_id);
/* $this->error('该订单已经支付,请勿重复支付。');*/
}
//判断该笔订单是否在商户网站中已经做过处理
//如果没有做过处理,根据订单号(out_trade_no)在商户网站的订单系统中查到该笔订单的详细,并执行商户的业务程序
} else {
exit('失败——支付状态出错。' . $record['trade_status'] . $order_id);
/* $this->error('支付状态出错。' . $record['trade_status']);*/
}
} else {
exit('error');
}
}
开发者ID:chenyongze,项目名称:bighaha,代码行数:80,代码来源:AliController.class.php
示例12: goodsBuy
/**
* 购买商品
* @param int $id
* @param int $num
* @author 郑钟良<[email protected]>
*/
public function goodsBuy($id = 0, $name = '', $address = '', $zipcode = '', $phone = '', $address_id = '')
{
$address = op_t($address);
$address_id = intval($address_id);
$num = 1;
if (!is_login()) {
$this->error('请先登录!');
}
$this->checkAuth('Shop/Index/goodsBuy', -1, '你没有购买、兑换商品的权限!');
$this->checkActionLimit('shop_goods_buy', 'shop', $id, is_login());
$goods = D('shop')->where(array('id' => $id))->find();
if ($goods) {
if ($num <= 0) {
$this->error('商品购买数量不能为负数。');
}
//验证开始
//判断商品余量
if ($num > $goods['goods_num']) {
$this->error('商品余量不足');
}
//扣money
$ScoreModel = D('Ucenter/Score');
$score_type = modC('SHOP_SCORE_TYPE', '1', 'Shop');
$money_type = $ScoreModel->getType(array('id' => $score_type));
$money_need = $num * $goods['money_need'];
$my_money = query_user('score' . $score_type);
if ($money_need > $my_money) {
$this->error('你的' . $money_type['title'] . '不足');
}
//用户地址处理
if ($name == '' || !preg_match("/^[\\x{4e00}-\\x{9fa5}]+\$/u", $name)) {
$this->error('请输入正确的用户名');
}
if ($address == '') {
$this->error('请填写收货地址');
}
if ($zipcode == '' || strlen($zipcode) != 6 || !is_numeric($zipcode)) {
$this->error('请正确填写邮编');
}
if ($phone == '' || !preg_match("/^1[3458][0-9]{9}\$/", $phone)) {
$this->error('请正确填写手机号码');
}
$shop_address['phone'] = $phone;
$shop_address['name'] = $name;
$shop_address['address'] = $address;
$shop_address['zipcode'] = $zipcode;
if ($address_id) {
$address_save = D('shop_address')->where(array('id' => $address_id))->save($shop_address);
if ($address_save) {
D('shop_address')->where(array('id' => $address_id))->setField('change_time', time());
}
$data['address_id'] = $address_id;
} else {
$shop_address['uid'] = is_login();
$shop_address['create_time'] = time();
$data['address_id'] = D('shop_address')->add($shop_address);
}
//验证结束
$data['goods_id'] = $id;
$data['goods_num'] = $num;
$data['status'] = 0;
$data['uid'] = is_login();
$data['createtime'] = time();
$ScoreModel->setUserScore(array(is_login()), $money_need, $score_type, 'dec', 'shop', $id, get_nickname(is_login()) . '购买了商品');
$res = D('shop_buy')->add($data);
if ($res) {
//商品数量减少,已售量增加
D('shop')->where('id=' . $id)->setDec('goods_num', $num);
D('shop')->where('id=' . $id)->setInc('sell_num', $num);
//发送系统消息
$message = $goods['goods_name'] . "购买成功,请等待发货。";
D('Common/Message')->sendMessageWithoutCheckSelf(is_login(), '购买成功通知', $message, 'Shop/Index/myGoods', array('status' => '0'));
//商城记录
$shop_log['message'] = '用户[' . is_login() . ']' . query_user('nickname', is_login()) . '在' . time_format($data['createtime']) . '购买了商品<a href="index.php?s=/Shop/Index/goodsDetail/id/' . $goods['id'] . '.html" target="_black">' . $goods['goods_name'] . '</a>';
$shop_log['uid'] = is_login();
$shop_log['create_time'] = $data['createtime'];
D('shop_log')->add($shop_log);
action_log('shop_goods_buy', 'shop', $id, is_login());
$this->ajaxReturn(array('status' => 1, 'info' => '购买成功!花费了' . $money_need . $money_type['title'], $_SERVER['HTTP_REFERER']));
} else {
$this->ajaxReturn(array('status' => 0, 'info' => '购买失败!'));
}
} else {
$this->ajaxReturn(array('status' => 0, 'info' => '请选择要购买的商品!'));
}
}
开发者ID:ccccy,项目名称:wuanlife,代码行数:92,代码来源:ShopController.class.php
示例13: export
function export()
{
set_time_limit(0);
$id = $hpmap['id'] = I('id');
$info = D('Coupon')->getInfo($id);
$dataArr[0] = array(0 => "用户", 1 => " 详细信息", 2 => " SN码", 3 => "工作人员", 4 => "核销时间");
$px = C('DB_PREFIX');
$page = I('p', 1, 'intval');
// 默认显示第一页数据
// 搜索条件
$where = "is_use=1 AND addon='Coupon' AND target_id=" . $id;
$start_time = I('start_time');
if ($start_time) {
$where .= " AND s.use_time>" . strtotime($start_time);
}
$end_time = I('end_time');
if ($end_time) {
$where .= " AND s.use_time<" . strtotime($end_time);
}
$search_nickname = I('search_nickname');
if (!empty($search_nickname)) {
$where .= " AND s.uid IN(" . D('Common/User')->searchUser($search_nickname) . ")";
}
// 读取模型数据列表
$data = D('Common/SnCode')->field(true)->where($where)->order('use_time DESC')->limit(5000)->select();
// dump ( $data );
foreach ($data as $k => $vo) {
$vo['content'] = '核销优惠券: ' . $info['title'];
$dataArr[$k + 1] = array(0 => get_nickname($vo['uid']), 1 => $vo['content'], 2 => $vo['sn'], 3 => get_nickname($vo['admin_uid']), 4 => time_format($vo['use_time']));
}
outExcel($dataArr, 'Coupon_' . $id);
}
开发者ID:yxz1025,项目名称:weiphp3.0,代码行数:32,代码来源:CouponController.class.php
示例14: connect
<?php
include "./config";
include "./func.php";
try {
$conn = connect();
} catch (Exception $error) {
display_message($error->getMessage(), "", "error");
exit;
}
$nickname = get_nickname($conn);
$count = get_rows($conn);
$select = "select * from article;";
$result = $conn->query($select);
?>
<!DOCTYPE html>
<html>
<head>
<title>归档</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-combined.min.css">
<script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<style type="text/css">
body {
background-image:url("image/theme.png");
background-size: cover;
background-repeat:no-repeat;
开发者ID:Qsaka,项目名称:monogatari,代码行数:31,代码来源:archives.php
示例15: show
public function show()
{
pc_base::load_sys_class('form', '', 0);
$M = getcache('ask', 'commons');
$M = $M[1];
$_username = param::get_cookie('_username', L('phpcms_friends'));
$_userid = param::get_cookie('_userid');
$r_m = $this->db_m->get_one(array('userid' => $_userid, 'siteid' => SITEID));
$_point = $r_m['point'];
$id = intval($_GET['id']);
if (!$id) {
showmessage(L('illegal_parameters'), HTTP_REFERER);
}
$array = array();
$a = $this->db->get_one(array('askid' => $id, 'siteid' => SITEID));
$posts_table_name = $this->db2->posts_table($a['catid']);
$this->db2->table_name = $posts_table_name;
if (!$this->db2->table_exists(str_replace($this->db2->db_tablepre, '', $posts_table_name))) {
showmessage(L('info_does_not_exists'), HTTP_REFERER);
}
$result = $this->db2->select("askid={$id} AND status>2 AND siteid=" . SITEID, '*');
foreach ($result as $r) {
if ($r['isask']) {
$arr = $this->db->get_one(array('askid' => $id, 'siteid' => SITEID));
$r['title'] = $arr['title'];
$r['reward'] = $arr['reward'];
$r['status'] = $arr['status'];
$r['answercount'] = $arr['answercount'];
$r['flag'] = $arr['flag'];
$r['endtime'] = $arr['endtime'];
$r['catid'] = $arr['catid'];
$r['hits'] = $arr['hits'];
$r['anonymity'] = $arr['anonymity'];
$rs['keywords'] = $arr['keywords'];
$r['keywords'] = explode(' ', $arr['keywords']);
if (SYS_TIME > $r['endtime'] && !$arr['ischeck']) {
$this->db->update(array('ischeck' => '1'), array('askid' => $id));
$this->db->update(array('flag' => '3'), 'askid=' . $id . ' AND answercount>1');
$this->db2->update(array('candidate' => '1'), array('askid' => $id));
$this->db_credit->update($arr['userid'], $arr['username'], $M['del_day15_credit'], 0);
pc_base::load_app_class('spend', 'pay', 0);
spend::point($M['del_day15_credit'], L('ask_15days_no_deal_with'), $arr['userid'], $arr['username'], '', '', $flag);
}
}
$userids[] = $r['userid'];
$array[] = $r;
}
if ($userids) {
$userids = implode(',', $userids);
$data = $this->db_m->select("userid IN ({$userids}) AND siteid=" . SITEID, '*');
foreach ($data as $r) {
$userinfo[$r['userid']]['actortype'] = $r['actortype'];
$userinfo[$r['userid']]['point'] = $r['point'];
}
foreach ($array as $arr) {
$arr['actortype'] = $userinfo[$arr['userid']]['actortype'];
$arr['point'] = $userinfo[$arr['userid']]['point'];
$_array[] = $arr;
}
$array = $_array;
} else {
$array = $array;
}
if ($array) {
$have_answer = false;
foreach ($array as $k => $v) {
if ($v['isask']) {
$title = $v['title'];
$message = $this->M[1]['use_editor'] ? $v['message'] : trim_textarea($v['message']);
$reward = $v['reward'];
$userid = $v['userid'];
$username = $v['username'];
$nickname = get_nickname($v['userid']);
$status = $v['status'];
$hits = $v['hits'];
$flag = $v['flag'];
$addtime = $v['addtime'];
$actor = actor($v['actortype'], $v['point']);
$answercount = $v['answercount'];
$result = count_down($v['endtime']);
$day = $result[0];
$hour = $result[1];
$minute = $result[2];
$catid = $v['catid'];
$anonymity = $v['anonymity'];
$keywords = $v['keywords'];
} elseif ($v['optimal']) {
$best_answer_pid = $v['pid'];
$best_answer_vote_1 = $v['best_answer_vote_1'];
$best_answer_vote_2 = $v['best_answer_vote_2'];
$totalnum = $best_answer_vote_1 + $best_answer_vote_2;
$best_answer_vote_1_per = round($best_answer_vote_1 / $totalnum * 100, 1) . "%";
$best_answer_vote_2_per = round($best_answer_vote_2 / $totalnum * 100, 1) . "%";
$solvetime = $v['solvetime'];
$answer = $v['message'];
$answertime = $v['addtime'];
$answer = trim_textarea($v['message']);
$optimail_username = $v['username'];
$optimail_userid = $v['userid'];
$optimail_nickname = get_nickname($v['userid']);
//.........这里部分代码省略.........
开发者ID:zhouzhouxs,项目名称:Progect,代码行数:101,代码来源:index.php
示例16: get_nickname
ThinkWechat
</small>
</a>
</div>
<!-- 退出登录 -->
<div class="navbar-buttons navbar-header pull-right" role="navigation">
<ul class="nav ace-nav">
<!-- #section:basics/navbar.user_menu -->
<li class="light-blue">
<a data-toggle="dropdown" href="#" class="dropdown-toggle">
<img class="nav-user-photo" src="/Public/assets/avatars/user.jpg" alt="Jason's Photo"/>
<span class="user-info">
<small>Welcome,</small>
<?php
echo get_nickname();
?>
</span>
<i class="ace-icon fa fa-caret-down"></i>
</a>
<ul class="user-menu dropdown-menu-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
<li>
<a id="clickChangePassword" href="javascript:void (0)">
<i class="ace-icon fa fa-cog"></i>
修改密码
</a>
</li>
<li class="divider"></li>
<li>
开发者ID:PunkAvail,项目名称:ThinkWechat,代码行数:31,代码来源:6f633edcc31e9e8a0c28c9422ec4ac6d.php
示例17: get_nickname
} else {
echo "";
}
?>
</ul>
<!-- /主导航 -->
<!-- 用户栏 -->
<div class="user-bar">
<a href="javascript:;" class="user-entrance"><i class="icon-user"></i></a>
<ul class="nav-list user-menu hidden">
<li class="manager">你好,<em title="<?php
echo get_nickname($mid);
?>
"><?php
echo get_nickname($mid);
?>
</em></li>
<li><a href="<?php
echo U('Home/Index/index');
?>
">返回前台</a></li>
<li><a href="<?php
echo U('User/updatePassword');
?>
">修改密码</a></li>
<li><a href="<?php
echo U('User/updateNickname');
?>
">修改昵称</a></li>
<li><a href="<?php
开发者ID:ChenwayWong,项目名称:weidamp,代码行数:31,代码来源:7448bc5b6c7ede42a8f022f98e8cc17b.php
示例18: showLog
function showLog()
{
$nav[0]['title'] = "投票列表";
$nav[0]['class'] = "";
$nav[0]['url'] = U("lists");
$nav[1]['title'] = "投票记录";
$nav[1]['class'] = "current";
$this->assign('nav', $nav);
$btn['url'] = U('lists', array('mdm' => $_GET['mdm']));
$btn['title'] = '返回';
$returnbtn[] = $btn;
$this->assign('top_more_button', $returnbtn);
$this->assign('add_button', false);
$this->assign('search_button', false);
$this->assign('del_button', false);
$this->assign('check_all', false);
$model = $this->vlog;
$page = I('p', 1, 'intval');
// 默认显示第一页数据
// 解析列表规则
$list_data = $this->_list_grid($model);
unset($list_data['list_grids'][4]);
$grids = $list_data['list_grids'];
$fields = $list_data['fields'];
// 搜索条件
// $map ['addon'] = $this->addon;
$map['vote_id'] = I('id');
// $map ['token'] = get_token ();
session('common_condition', $map);
// $map = $this->_search_map ( $model, $fields );
$row = empty($model['list_row']) ? 20 : $model['list_row'];
empty($fields) || in_array('id', $fields) || array_push($fields, 'id');
$name = parse_name(get_table_name($model['id']), true);
$data = M($name)->field(empty($fields) ? true : $fields)->where($map)->order('id DESC')->page($page, $row)->select();
//var_dump($data);
// 获取投票标题
// $map2 ['id'] = I ( 'id' );
// $vname = M ( 'vote' )->where ( $map2 )->getField ( 'title' );
foreach ($data as $v) {
$option_ids[$v['options']] = $v['options'];
}
// 代码须优化
// 获取投票选项名称
if (!empty($option_ids)) {
$map3['id'] = array('in', $option_ids);
$list = M('vote_option')->where($map3)->field('id,name')->select();
foreach ($list as $vo) {
$option_names[$vo['id']] = $vo['name'];
}
}
foreach ($data as &$v) {
// $v ['vote_id'] = $vname;
$v['options'] = $option_names[$v['options']];
$user = get_userinfo($v['user_id']);
$v['vote_id'] = url_img_html($user['headimgurl']);
$v['user_id'] = get_nickname($v['user_id']);
}
$count = M($name)->where($map)->count();
$list_data['list_data'] = $data;
// 分页
if ($count > $row) {
$page = new \Think\Page($count, $row);
$page->setConfig('theme', '%FIRST% %UP_PAGE% %LINK_PAGE% %DOWN_PAGE% %END% %HEADER%');
$list_data['_page'] = $page->show();
}
unset($list_data["list_grids"][""]);
$this->assign($list_data);
//dump($list_data);
$this->display('./Application/Home/View/default/Addons/lists.html');
}
开发者ID:yxz1025,项目名称:weiphp3.0,代码行数:70,代码来源:VoteController.class.php
-
librespeed/speedtest: Self-hosted Speedtest for HTML5 and more. Easy setup, exam
阅读:1298|2022-08-30
-
旧的模板消息将在 2020 年 1 月 10 号全面下架,也就是今天,不过貌似现在还可以用!
阅读:731|2022-07-18
-
avehtari/BDA_m_demos: Bayesian Data Analysis demos for Matlab/Octave
阅读:1209|2022-08-17
-
女人怀孕后,为了有一个健康聪明的宝宝,经历各种体检、筛查。其实这些体检和筛查中的
阅读:1009|2022-11-06
-
The component mcontrol.action in RISCV ISA Sim commit ac466a21df442c59962589ba29
阅读:746|2022-07-29
-
medfreeman/markdown-it-toc-and-anchor: markdown-it plugin to add a toc and ancho
阅读:1412|2022-08-18
-
A vulnerability, which was classified as problematic, has been found in SourceCo
阅读:644|2022-07-29
-
openshift/osin: Golang OAuth2 server library
阅读:993|2022-08-15
-
sydney0zq/covid-19-detection: The implementation of A Weakly-supervised Framewor
阅读:519|2022-08-16
-
离中国最远的国家是阿根廷。从太平洋直线计算,即往东线走,北京到阿根廷的布宜诺斯艾
阅读:672|2022-11-06
|
请发表评论