本文整理汇总了PHP中time_format函数的典型用法代码示例。如果您正苦于以下问题:PHP time_format函数的具体用法?PHP time_format怎么用?PHP time_format使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了time_format函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: sendDetail
function sendDetail()
{
if (IS_GET) {
$map['mobile'] = I('mobile');
$user = D('Common/shop_address')->where($map)->find();
$map['uid'] = $user['id'];
$orderLists = D('Order')->where($map)->order('id desc')->select();
foreach ($orderLists as $order) {
$result['order_id'] = $order['id'];
$result['order_number'] = $order['order_number'];
$result['order_date'] = time_format($order['cTime']);
// 如果尚未付款,显示付款状态;如果已经付款,显示订单跟踪状态
if ($order['pay_status'] != 1) {
$result['order_status'] = getNamebyPayStatus($order['pay_status']);
} else {
$result['order_status'] = getNamebyOrderStatus($order['status_code']);
}
$result['status_code'] = $order['status_code'];
$result['goods'] = json_decode($order['goods_datas'], true);
$result['total_price'] = $order['total_price'];
$address_info = D('Shop')->getInfo($order['address_id']);
$result['fetch_address'] = $address_info['intro'];
$result['fetch_contact'] = $address_info['mobile'];
$result['id'] = $order['order_number'];
$results[] = $result;
}
$this->assign('userInfo', $user);
$this->assign('lists', $results);
$this->display();
}
}
开发者ID:chenpusn,项目名称:guoxian,代码行数:31,代码来源:AdminController.class.php
示例2: Index
public function Index()
{
// 获取数据
$map['id'] = I('id');
$info = M('Invites')->where($map)->order('id desc')->find();
$info[startdate] = time_format($info[startdate]);
///拆分经纬度
$lnglat = explode(',', $info['lnglat']);
$info[lng] = $lnglat[0];
$info[lat] = $lnglat[1];
switch ($info[type]) {
case 0:
$info[type] = '会议';
break;
case 1:
$info[type] = '聚会';
break;
default:
$info[type] = '活动';
}
if ($info['class'] == '0') {
$this->assign('info', $info);
$this->display('Invites_index');
} else {
$this->assign('info', $info);
$this->display('Invites_index2');
}
}
开发者ID:strivi,项目名称:siples,代码行数:28,代码来源:ShowController.class.php
示例3: date_time_format
function date_time_format($str)
{
global $k;
list($datepart, $timepart) = explode(" ", $str);
if ($datepart . " " . $timepart == $str) {
$df = date_format($datepart);
$tf = time_format($timepart);
if ($GLOBALS["debug"]) {
echo " _{$k}_ {$df} {$tf} _ ";
}
if ($df and $tf) {
return "{$df} {$tf}";
}
} else {
if (preg_match('/^[0-9]+$/', $str)) {
switch (strlen($str)) {
case 14:
return "YmdHis";
case 12:
return "ymdHis";
}
}
}
return false;
}
开发者ID:TaylorMonacelli,项目名称:phplib,代码行数:25,代码来源:import.php
示例4: getotherVideoList
/**
*
* 获取他人视频 ...
*/
public function getotherVideoList()
{
if (!$this->input['user_id']) {
$this->errorOutput('请输入需要查看的用户id');
}
//默认用户需要登陆
$cond = " where 1 and state=1 and `user_id`=" . $this->input['user_id'];
//用户自定义分类
if (isset($this->input['cate_id'])) {
$cond .= ' and cate_id=' . intval($this->input['cate_id']);
}
$offset = $this->input['offset'] ? $this->input['offset'] : 0;
$count = $this->input['count'] ? intval($this->input['count']) : 20;
$data_limit = $cond . ' order by id desc LIMIT ' . $offset . ' , ' . $count;
$datas = $this->obj->show($this->tbname, $data_limit, $fields = '*');
$video_id = array();
foreach ($datas as $k => $v) {
$v['stateName'] = $this->settings['state'][$v['state']];
$v['video_id'] && ($videoInfo = $this->get_video_moreinfo($v['video_id']));
$v['m3u8'] = $videoInfo[0]['videoaddr']['default']['m3u8'];
$v['format_duration'] = time_format($videoInfo[0]['duration']);
$this->addItem($v);
}
$this->output();
}
开发者ID:h3len,项目名称:Project,代码行数:29,代码来源:Video.php
示例5: show
public function show()
{
//查询出已经选择的视频片段
$sql = "SELECT * FROM " . DB_PREFIX . "fast_vcr_tmp WHERE user_id = '" . $this->user['user_id'] . "' AND main_id = '" . intval($this->input['video_id']) . "' ORDER BY order_id ASC ";
$q = $this->db->query($sql);
while ($r = $this->db->fetch_array($q)) {
$r['duration'] = time_format(intval($r['end_time']) - intval($r['start_time']));
$r['start_imgdata'] = '';
$r['end_imgdata'] = '';
$imgdata_path = FAST_EDIT_IMGDATA_PATH . $r['hash_id'];
if (file_exists($imgdata_path . '_start.img')) {
$r['start_imgdata'] = file_get_contents($imgdata_path . '_start.img');
}
if (file_exists($imgdata_path . '_end.img')) {
$r['end_imgdata'] = file_get_contents($imgdata_path . '_end.img');
}
$data['videos'][] = $r;
}
//如果存在当前的视频,获取当前视频的信息
if ($this->input['video_id'] && !isset($data['videos'])) {
$this->curl->setSubmitType('post');
$this->curl->setReturnFormat('json');
$this->curl->initPostData();
$this->curl->addRequestData('a', 'get_vod_info');
$this->curl->addRequestData('id', $this->input['video_id']);
$cur_video = $this->curl->request('vod.php');
$data['videos'][] = $cur_video[0];
}
$data['main_id'] = intval($this->input['video_id']);
$data['date_time'] = date('Y-m-d', TIMENOW);
$this->addItem($data);
$this->output();
}
开发者ID:h3len,项目名称:Project,代码行数:33,代码来源:vod_fast_edit_video.php
示例6: getList
public function getList()
{
if (!extension_loaded('curl')) {
$this->error('糗事百科插件需要开启PHP的CURL扩展');
}
$lists = S('QiuBai_content');
if (!$lists) {
$config = \Common\Controller\Addon::getConfig('QiuBai');
$content = \Org\Net\Http::fsockopenDownload('http://www.qiushibaike.com');
if ($content) {
$regex = "/<div class=\"content\".*?>.*?--(.*?)--.*?<\\/div>/ism";
preg_match_all($regex, $content, $match);
$lists = array_map(function ($a, $b) {
return array('time' => time_format($a), 'content' => $b);
}, $match[1], $match[0]);
S('QiuBai_content', $lists, $config['cache_time']);
}
}
if ($lists) {
$this->success('成功', '', array('data' => $lists));
} else {
$this->error('获取糗事百科列表失败');
}
$this->assign('qiubai_list', $lists);
}
开发者ID:hujun123qwe,项目名称:plover,代码行数:25,代码来源:QiuBaiController.class.php
示例7: setrunsize
public function setrunsize()
{
set_time_limit(0);
$data['size'] = get_dir_size(SITE_PATH . '/Data/cache/') / 1000 . 'k';
$data['time'] = time();
F('runtimecachesize', $data);
die("{$data['size']}" . " Time:" . time_format($data['time']));
}
开发者ID:735579768,项目名称:Ainiku,代码行数:8,代码来源:PathInfoPlugin.class.php
示例8: ticketTime
function ticketTime()
{
if ($this->performance_id != 0) {
return time_format($this->performance->time);
} else {
return time_format($this->season->start_time);
}
}
开发者ID:JesseDarellMoore,项目名称:CS499,代码行数:8,代码来源:Ticket.php
示例9: select_videos
public function select_videos()
{
$offset = intval($this->input['start']) ? intval($this->input['start']) : 0;
$count = intval($this->input['num']) ? intval($this->input['num']) : 40;
$limit = " limit {$offset}, {$count}";
$condition = $this->get_condition();
$extend_cond = ' AND status = 2 ';
$sql = "SELECT * FROM " . DB_PREFIX . "vodinfo WHERE 1 " . $condition . $extend_cond . " ORDER BY video_order_id DESC " . $limit;
$q = $this->db->query($sql);
$return = array();
while ($r = $this->db->fetch_array($q)) {
$r['duration_format'] = time_format($r['duration']);
$r['totalsize'] = hg_fetch_number_format($r['totalsize'], true);
$img_arr = $r['img_info'] = unserialize($r['img_info']);
$r['img'] = $img_arr['host'] . $img_arr['dir'] . '80x60/' . $img_arr['filepath'] . $img_arr['filename'];
$return['video_info'][] = $r;
}
$current_page = intval($this->input['start']);
$page_num = 40;
/*每页显示的数目*/
$total_num = $this->count();
$last_page = intval($total_num / $page_num) * $page_num;
/*第一页*/
$return['first_page'] = 0;
/*下一页*/
if ($current_page == $last_page || $current_page + $page_num == $total_num) {
$return['next_page'] = $current_page;
} else {
$return['next_page'] = $current_page + $page_num;
}
/*前一页*/
if ($current_page == 0) {
$return['prev_page'] = 0;
} else {
$return['prev_page'] = $current_page - $page_num;
}
/*最后一页*/
if (intval($total_num % $page_num) == 0) {
$return['last_page'] = $last_page - $page_num;
} else {
$return['last_page'] = $last_page;
}
/*当前页*/
$return['current_page'] = intval($current_page / $page_num) + 1;
/*总页数*/
if (intval($total_num % $page_num) == 0) {
$return['total_page'] = intval($total_num / $page_num);
} else {
$return['total_page'] = intval($total_num / $page_num) + 1;
}
/*总条数*/
$return['total_num'] = $total_num;
$return['page_num'] = $page_num;
$return['switch_mode'] = intval($this->input['g_switch_mode']);
$this->addItem($return);
$this->output();
}
开发者ID:h3len,项目名称:Project,代码行数:57,代码来源:vod_get_many_videos.php
示例10: buy
/**
* 添加用户兑换名额记录
* @param int $type_id
* @param int $num
* @return mixed
* @author 郑钟良<[email protected]>
*/
public function buy($type_id = 0, $num = 0)
{
$invite_type = D('Ucenter/InviteType')->where(array('id' => $type_id))->find();
$user = query_user('nickname');
$data['content'] = "{$user} 在 " . time_format(time()) . L('_TIME_TO_BUY_') . $num . ' 个 ' . $invite_type['title'] . L('_INVITATION_');
$data['uid'] = is_login();
$data['invite_type'] = $type_id;
$data['num'] = $num;
$data['create_time'] = time();
$result = $this->add($data);
return $result;
}
开发者ID:naliduo,项目名称:Lightweight-social-platform,代码行数:19,代码来源:InviteBuyLogModel.class.php
示例11: get_user_attend_count
function get_user_attend_count($gamesId, $uid = 0, $time = 0)
{
$map['sports_id'] = $gamesId;
$map['token'] = get_token();
if ($uid != 0) {
$map['follow_id'] = $uid;
}
if ($time != 0) {
$map['cTime'] = array('egt', strtotime(time_format($time, 'Y-m-d')));
}
$data = $this->where($map)->field('sum(count) totals')->select();
return intval($data[0]['totals']);
}
开发者ID:chenpusn,项目名称:haozhixian_bak,代码行数:13,代码来源:DrawFollowLogModel.class.php
示例12: detail
public function detail()
{
if (!$this->input['row_id']) {
$this->errorOutput(NOID);
}
//查询出顶级类别供下面没有分类的时候用
$sql = "SELECT * FROM " . DB_PREFIX . "vod_media_node WHERE fid = 0";
$q = $this->db->query($sql);
$top_sorts = array();
while ($r = $this->db->fetch_array($q)) {
$top_sorts[$r['id']] = $r;
}
$sql = "SELECT f.*,s.name AS sort_name,s.color FROM " . DB_PREFIX . "vodinfo as f left join " . DB_PREFIX . "vod_media_node as s on f.vod_sort_id = s.id WHERE f.id = '" . intval($this->input["row_id"]) . "'";
$arr = $this->db->query_first($sql);
$return['subtitle'] = $arr['subtitle'];
$return['comment'] = $arr['comment'];
$return['keywords'] = $arr['keywords'];
if ($arr['sort_name']) {
$return['vod_sort_id'] = $arr['sort_name'];
$return['vod_sort_color'] = $arr['color'];
} else {
$return['vod_sort_id'] = $top_sorts[$return['vod_leixing']]['name'];
$return['vod_sort_color'] = $top_sorts[$return['vod_leixing']]['color'];
}
if ($return['starttime']) {
$return['starttime'] = '(' . date('Y-m-d', $return['starttime']) . ')';
} else {
$return['starttime'] = '';
}
$return["title"] = $arr['title'];
$return['status'] = $this->settings['video_upload_status'][0];
$return["create_time"] = date("Y-m-d H:i", TIMENOW);
$return["row_id"] = intval($this->input["row_id"]);
$return['addperson'] = $arr['addperson'];
$return['bitrate'] = $arr['bitrate'];
$return['duration'] = time_format($arr['duration']);
$return['bitrate_color'] = $arr['bitrate_color'];
$img_arr = $return['img_info'] = unserialize($arr['img_info']);
$return['img'] = $img_arr['host'] . $img_arr['dir'] . '80x60/' . $img_arr['filepath'] . $img_arr['filename'];
$rgb = $r['bitrate'] / 100;
if ($rgb < 10) {
$return['bitrate_color'] = $this->settings['bitrate_color'][$rgb];
} else {
$return['bitrate_color'] = $this->settings['bitrate_color'][9];
}
if ($this->input['pubinfo']) {
$return['pubinfo'] = intval($this->input['pubinfo']);
}
$this->addItem($return);
$this->output();
}
开发者ID:h3len,项目名称:Project,代码行数:51,代码来源:vod_add_newlist.php
示例13: format_post_info
function format_post_info($post_info)
{
$formatted_post_info = array();
$formatted_post_info["guid"] = $post_info->guid;
$formatted_post_info["post_title"] = $post_info->post_title;
$formatted_post_info["post_author"] = get_userdata($post_info->post_author)->display_name;
$formatted_post_info["mantime"] = time_format($post_info->mantime);
$formatted_post_info["visits"] = number_format($post_info->visits);
$formatted_post_info["pageviews"] = number_format($post_info->pageviews);
$formatted_post_info["avg_time_on_page"] = time_format($post_info->avg_time_on_page);
$formatted_post_info["entrance_rate"] = round($post_info->entrance_rate * 100, 2) . "%";
$formatted_post_info["exit_rate"] = round($post_info->exit_rate * 100, 2) . "%";
return $formatted_post_info;
}
开发者ID:nquinlan,项目名称:segmented-google-analyzer,代码行数:14,代码来源:leaderboard.php
示例14: look_video
public function look_video()
{
if (!$this->input['collect_id']) {
$this->errorOutput(NOID);
}
//取出集合信息
$sql = "SELECT vc.*,vs.name AS sort_name,ch.name as channel_name FROM " . DB_PREFIX . "vod_collect as vc LEFT JOIN " . DB_PREFIX . "vod_media_node as vs ON vc.vod_sort_id = vs.id LEFT JOIN " . DB_PREFIX . "channel as ch ON ch.id = vc.source WHERE vc.id = '" . intval($this->input['collect_id']) . "'";
$return['collect'] = $this->db->query_first($sql);
$return['collect']['create_time'] = date('Y-m-d', $return['collect']['create_time']);
$return['collect']['update_time'] = date('Y-m-d', $return['collect']['update_time']);
//取出该集合里面的视频信息
$offset = $this->input['offset'] ? intval(urldecode($this->input['offset'])) : 0;
$count = $this->input['count'] ? intval(urldecode($this->input['count'])) : 10;
$limit = " limit {$offset}, {$count}";
//查询出顶级类别供下面没有分类的时候用
$sql = "SELECT * FROM " . DB_PREFIX . "vod_media_node WHERE fid = 0";
$q = $this->db->query($sql);
$top_sorts = array();
while ($r = $this->db->fetch_array($q)) {
$top_sorts[$r['id']] = $r;
}
$sql = "SELECT cv.id as cid,cv.order_id,vf.*,vs.name AS sort_name,vs.color AS vod_sort_color FROM " . DB_PREFIX . "vod_collect_video as cv LEFT JOIN " . DB_PREFIX . "vodinfo as vf \r\n\t\t ON cv.video_id = vf.id LEFT JOIN " . DB_PREFIX . "vod_media_node as vs ON vf.vod_sort_id = vs.id WHERE cv.collect_id = '" . urldecode($this->input['collect_id']) . "' ORDER BY cv.order_id DESC " . $limit;
$q = $this->db->query($sql);
while ($r = $this->db->fetch_array($q)) {
if ($r['sort_name']) {
$r['vod_sort_id'] = $r['sort_name'];
} else {
$r['vod_sort_id'] = $top_sorts[$r['vod_leixing']]['name'];
$r['vod_sort_color'] = $top_sorts[$r['vod_leixing']]['color'];
}
$r['vod_leixing'] = $top_sorts[$r['vod_leixing']]['name'];
$collects = unserialize($r['collects']);
if ($collects) {
$r['collects'] = $collects;
} else {
$r['collects'] = '';
}
$r['img_info'] = unserialize($r['img_info']);
$r['img'] = $r['img_info']['host'] . $r['img_info']['dir'] . '80x60/' . $r['img_info']['filepath'] . $r['img_info']['filename'];
$r['duration'] = time_format($r['duration']);
$r['status'] = $this->settings['video_upload_status'][$r['status']];
$r['source'] = $this->settings['video_channel'][$r['source']];
$r['create_time'] = date('Y-m-d h:i', $r['create_time']);
$r['update_time'] = date('Y-m-d h:i', $r['update_time']);
$return['collect_video'][] = $r;
}
$this->addItem($return);
$this->output();
}
开发者ID:h3len,项目名称:Project,代码行数:49,代码来源:vod_look_video.php
示例15: add_to_collect
public function add_to_collect()
{
if (!$this->input['id']) {
$this->errorOutput(NOID);
}
$sql = "SELECT * FROM " . DB_PREFIX . "vodinfo WHERE id in (" . urldecode($this->input['id']) . ")";
$q = $this->db->query($sql);
while ($r = $this->db->fetch_array($q)) {
$img_arr = unserialize($r['img_info']);
$r['img'] = $img_arr['host'] . $img_arr['dir'] . '80x60/' . $img_arr['filepath'] . $img_arr['filename'];
$r['duration'] = time_format($r['duration']);
$return[] = $r;
}
$this->addItem($return);
$this->output();
}
开发者ID:h3len,项目名称:Project,代码行数:16,代码来源:vod_add_collect.php
示例16: creatPay
/**
* @param 创建订单
* @return 加密后的站内订单编号
* @author lussen <[email protected]>
*/
public function creatPay()
{
$site_order = time_format(time(), 'YmdHis') . rand(100, 999);
$data['uid'] = is_login();
$data['pay_money'] = I('post.money');
$data['pay_item'] = I('post.pay_item');
$data['site_order'] = $site_order;
$data['isdone'] = 0;
$data['create_time'] = time();
$result = $this->data($data)->add();
if ($result !== false) {
return think_encrypt($site_order);
} else {
return false;
}
}
开发者ID:xingluxin,项目名称:jianshen,代码行数:21,代码来源:PayModel.class.php
示例17: replyGiftNotice
public function replyGiftNotice($uid, $name, $first = '', $orderId = '', $remark = '', $url = '', $templateId = '')
{
$first == '' && ($first = '您推荐的爱心分享已被领取');
$orderId == '' && ($orderId = time_format(time(), 'YmdHis'));
$remark == '' && ($remark = '您的好友领取了您推荐的爱心分享,您的人气指数直接爆表!');
$param['data']['first']['value'] = $first;
$param['data']['first']['color'] = "#E60B43";
$param['data']['keyword1']['value'] = $orderId;
$param['data']['keyword1']['color'] = "#173177";
$param['data']['keyword2']['value'] = $name;
$param['data']['keyword2']['color'] = "#E60B43";
$param['data']['remark']['value'] = $remark;
$param['data']['remark']['color'] = "#173177";
$templateId == '' && ($templateId = 'VD0sCtsox8YHjFh12XzXRrS-k6-5GN3KMN8McPw0IiY');
return $this->_replyData($uid, $param, $templateId, $url);
}
开发者ID:chenpusn,项目名称:haozhixian_bak,代码行数:16,代码来源:TemplateMessageModel.class.php
示例18: addComment
public function addComment()
{
if (!$this->isPost()) {
$this->error('不给你看');
}
$body = $this->_post('body');
$post_id = $this->_post('post_id');
$comment = array('post_id' => $post_id, 'body' => $body, 'time' => time(), 'user_id' => session('user_id'));
//p($comment);die;
if (M('comment')->add($comment)) {
//消息发送处理
$user_id = M('post')->where(array('post_id' => $post_id))->getField('user_id');
//获帖子主人的ID
if (isset($_POST['get_message_user_id']) && $_POST['get_message_user_id'] != $user_id && $_POST['get_message_user_id'] && $_POST['get_message_user_id'] != session('user_id')) {
//点击了回复某人,并且不是层主
if ($user_id != $_SESSION['user_id'] && $_POST['get_message_user_id'] != session('user_id')) {
send_message($user_id, $post_id, $body);
}
send_message($_POST['get_message_user_id'], $post_id, $body);
} else {
if ($user_id != $_SESSION['user_id'] && $_POST['get_message_user_id'] != session('user_id')) {
send_message($user_id, $post_id, $body);
}
}
//更新楼主帖子的更新时间
$post = M('post')->where(array('post_id' => $post_id))->find();
$parent_post_id = M('post')->where(array('post_id' => $post['parent_id']))->getField('post_id');
$update_time = array('post_id' => $parent_post_id, 'update_time' => time());
M('post')->save($update_time);
$user = M('user')->where(array('user_id' => session('user_id')))->find();
$html = '';
$html .= "<div class='row'>\n <br><div class='col-xs-1'></div>\n <div class='col-xs-1 qianhui'>";
if ($user['face']) {
$html .= "<a target='_blank' href='" . U('User/index', array('user_id' => $user['user_id'])) . "'>\n <img src='" . __ROOT__ . "/Uploads/face/" . $user['face'] . "' width='50px' height='50px' alt=''></a>";
} else {
$html .= "<a target='_blank' href='" . U('User/index', array('user_id' => $user['user_id'])) . "'>\n \t<img src='" . __ROOT__ . "/Public/Index/images/no_face.jpg' width='50px' height='50px' alt=''>\n \t</a>";
}
$time = time_format(time());
$html .= " </div>\n <div class='col-xs-10 qianhui'>\n <p>\n <a target='_blank' href='" . U('User/index', array('user_id' => $user['user_id'])) . "'>" . $user['username'] . "</a>:" . $body . "</p>\n <p class='text-muted text-right'>\n " . $time . " \n <span class='glyphicon glyphicon glyphicon-comment'></span>\n </p>\n </div>\n <hr>\n </div>";
echo $html;
die;
} else {
echo 0;
}
}
开发者ID:luojiangtao,项目名称:putishui,代码行数:45,代码来源:CommentAction.class.php
示例19: lists
function lists()
{
$isAjax = I('isAjax');
$isRadio = I('isRadio');
$model = $this->getModel('reserve');
$page = I('p', 1, 'intval');
// 默认显示第一页数据
// 解析列表规则
$list_data = $this->_list_grid($model);
// 搜索条件
$map = $this->_search_map($model, $fields);
$row = empty($model['list_row']) ? 20 : $model['list_row'];
$order = 'id desc';
// 读取模型数据列表
$name = parse_name(get_table_name($model['id']), true);
$data = M($name)->field(true)->where($map)->order($order)->page($page, $row)->select();
foreach ($data as &$vo) {
if (!empty($vo['start_time']) && !empty($vo['end_time'])) {
$vo['start_time'] = time_format($vo['start_time']) . ' 至 ' . time_format($vo['end_time']);
} elseif (!empty($vo['start_time'])) {
$vo['start_time'] = time_format($vo['start_time']) . ' 开始';
} elseif (!empty($vo['end_time'])) {
$vo['start_time'] = '到 ' . time_format($vo['start_time']) . ' 结束';
}
$vo['status_title'] = $vo['status'] == 0 ? '已禁用' : '已启用';
}
/* 查询记录总数 */
$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();
}
if ($isAjax) {
$this->assign('isRadio', $isRadio);
$this->assign($list_data);
$this->display('ajax_lists_data');
} else {
$this->assign($list_data);
// dump($list_data);
$this->display();
}
}
开发者ID:chenpusn,项目名称:haozhixian_bak,代码行数:45,代码来源:ReserveController.class.php
示例20: lzwg_activities_lists
function lzwg_activities_lists()
{
$this->assign('search_button', false);
$this->assign('del_button', false);
$this->assign('check_all', false);
$model = $this->getModel('lzwg_activities');
$map['uid'] = $this->mid;
session('common_condition', $map);
$list_data = $this->_get_model_list($model, 0, 'id desc', true);
// 判断该活动是否已经设置投票调查
$lzwgVote = M('lzwg_activities_vote')->field('id,lzwg_id')->select();
foreach ($lzwgVote as $v) {
$lzwgVoteArr[$v['lzwg_id']] = $v['id'];
}
$dao = D('Draw');
foreach ($list_data['list_data'] as &$vo) {
$vo = $dao->getInfo($vo['id']);
$param['lzwg_id'] = $vo['id'];
if ($lzwgVoteArr[$vo['id']]) {
$param1['id'] = $lzwgVoteArr[$vo['id']];
$vote_url = addons_url('LzwgVote://LzwgActivitiesVote/edit', $param1);
} else {
$vote_url = addons_url('LzwgVote://LzwgActivitiesVote/add', $param);
}
$comment_url = addons_url('Comment://Comment/lists', $param);
$award_url = addons_url('Draw://LotteryPrizeList/add', $param);
$lucky_follow_url = addons_url('Draw://LuckyFollow/lzwg_lists', $param);
$vo['activitie_time'] = time_format($vo['start_time'], 'Y/m/d') . '至' . time_format($vo['end_time'], 'Y/m/d');
$vo['comment_list'] = '<a href="' . $comment_url . '">评论列表</a>';
$vo['set_vote'] = '<a href="' . $vote_url . '">设置投票</a>';
$vo['set_award'] = '<a href="' . $award_url . '">奖品设置</a>';
$vo['get_prize_list'] = '<a href="' . $lucky_follow_url . '">中奖列表</a>';
}
foreach ($list_data['list_grids'] as &$vo) {
if ($vo['field'][0] == 'id') {
$previewUrl = 'package?id=[id]&_controller=Sucai&_addons=Sucai&source=Lzwg&is_preview=1&target=_blank|预览';
$downloadUrl = 'package?id=[id]&_controller=Sucai&_addons=Sucai&source=Lzwg&is_download=1|素材下载';
$vo['href'] = $previewUrl . "," . $downloadUrl . ",lzwg_edit?id=[id]&model=" . $model['id'] . "|编辑,[DELETE]|删除";
}
}
$this->assign($list_data);
// dump($list_data);
$this->display();
}
开发者ID:yxz1025,项目名称:weiphp3.0,代码行数:44,代码来源:DrawController.class.php
注:本文中的time_format函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论