• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP get_abs_img_root函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_abs_img_root函数的典型用法代码示例。如果您正苦于以下问题:PHP get_abs_img_root函数的具体用法?PHP get_abs_img_root怎么用?PHP get_abs_img_root使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_abs_img_root函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: index

 public function index()
 {
     $root = array();
     $root['return'] = 1;
     $cate_list = $GLOBALS['cache']->get("MOBILE_SEARCHCATE_CATELIST");
     if ($cate_list === false) {
         //取出标签分类
         $cate_list_data = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "topic_tag_cate where showin_mobile = 1 order by sort desc");
         $cate_list = array();
         foreach ($cate_list_data as $k => $v) {
             $cate_list[$k]['id'] = $v['id'];
             $cate_list[$k]['name'] = $v['name'];
             $cate_list[$k]['bg'] = get_abs_img_root($v['mobile_title_bg']);
             //查询分类下的标签
             $txt_tags_data = $GLOBALS['db']->getAll("select t.* from " . DB_PREFIX . "topic_tag as t left join " . DB_PREFIX . "topic_tag_cate_link as l on l.tag_id = t.id where l.cate_id =" . $v['id'] . " order by t.sort desc limit 12");
             $txt_tags = array();
             foreach ($txt_tags_data as $kk => $vv) {
                 $txt_tags[$kk]['tag_name'] = $vv['name'];
                 $txt_tags[$kk]['color'] = $vv['color'];
             }
             $cate_list[$k]['tags'] = $txt_tags;
         }
         $GLOBALS['cache']->set("MOBILE_SEARCHCATE_CATELIST", $cate_list, CACHE_TIME);
     }
     $root['item'] = $cate_list;
     output($root);
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:27,代码来源:searchcate.action.php


示例2: index

 public function index()
 {
     require_once APP_ROOT_PATH . "system/libs/user.php";
     $root = array();
     $page = intval($GLOBALS['request']['page']);
     if ($page == 0) {
         $page = 1;
     }
     $uid = intval($GLOBALS['request']['uid']);
     $user_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "user where id = " . $uid . " and is_effect = 1 and is_delete = 0");
     if (!$user_info) {
         $root['info'] = "非法的会员";
         output($root);
     }
     $limit = ($page - 1) * PAGE_SIZE . "," . PAGE_SIZE;
     $image_list = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "topic_image where user_id = " . $user_info['id'] . " and topic_id > 0 order by create_time desc limit " . $limit);
     $image_total = $GLOBALS['db']->getOne("select count(*) from " . DB_PREFIX . "topic_image where user_id = " . $user_info['id'] . " and topic_id > 0  ");
     $images = array();
     foreach ($image_list as $k => $v) {
         $images[$k]['photo_id'] = $v['id'];
         $images[$k]['share_id'] = $v['topic_id'];
         $images[$k]['img'] = get_abs_img_root(get_spec_image($v['o_path'], 200, 0, 0));
         $images[$k]['height'] = floor($v['height'] * (200 / $v['width']));
     }
     $root['page'] = array("page" => $page, "page_total" => ceil($image_total / PAGE_SIZE));
     $root['item'] = $images;
     $root['return'] = 1;
     output($root);
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:29,代码来源:photolist.action.php


示例3: index

 public function index()
 {
     $page = intval($GLOBALS['request']['page']);
     //分页
     $page = $page == 0 ? 1 : $page;
     $cate_id = intval($GLOBALS['request']['cate_id']);
     $city_id = intval($GLOBALS['request']['city_id']);
     $page_size = PAGE_SIZE;
     $limit = ($page - 1) * $page_size . "," . $page_size;
     /*输出分类*/
     $bigcate_list = $GLOBALS['db']->getAll("select id,name from " . DB_PREFIX . "topic_group_cate where is_effect=1 order by sort asc");
     if ($cate_id > 0) {
         $cate_condition = " and cate_id = " . $cate_id;
     }
     $sql = " select * from " . DB_PREFIX . "topic_group where is_effect = 1 {$cate_condition} order by sort desc limit " . $limit;
     $sql_count = "select count(*) from " . DB_PREFIX . "topic_group where is_effect = 1 {$cate_condition} ";
     $list = $GLOBALS['db']->getAll($sql);
     $count = $GLOBALS['db']->getOne($sql_count);
     foreach ($list as $k => $v) {
         $list[$k]['icon'] = get_abs_img_root(get_spec_image($v['icon'], 300, 181, 0));
     }
     $page_total = ceil($count / $page_size);
     $root = array();
     $root['bigcate_list'] = $bigcate_list;
     $root['return'] = 1;
     $root['email'] = $email;
     $root['f_link_data'] = get_link_list();
     $root['item'] = $list;
     $root['page'] = array("page" => $page, "page_total" => ceil($res['count'] / $page_size), "page_size" => $page_size);
     $root['page_title'] = "小组";
     output($root);
 }
开发者ID:macall,项目名称:jsd,代码行数:32,代码来源:group.action.php


示例4: index

 public function index()
 {
     $root = array();
     $root['return'] = 1;
     //首页菜单列表
     $indexs_list = $GLOBALS['cache']->get("WAP_INDEXS_MORE_" . intval($GLOBALS['city_id']));
     if ($indexs_list === false) {
         $indexs = $GLOBALS['db']->getAll(" select * from " . DB_PREFIX . "m_index where status = 1 and mobile_type = 1 and city_id in (0," . intval($GLOBALS['city_id']) . ") order by sort desc ");
         $indexs_list = array();
         foreach ($indexs as $k => $v) {
             $indexs_list[$k]['id'] = $v['id'];
             $indexs_list[$k]['name'] = $v['name'];
             $indexs_list[$k]['icon_name'] = $v['vice_name'];
             //图标名 http://fontawesome.io/icon/bars/
             $indexs_list[$k]['color'] = $v['desc'];
             //颜色
             $indexs_list[$k]['img'] = get_abs_img_root($v['img']);
             /*
             $indexs_list[$k]['is_hot'] = $v['is_hot'];
             $indexs_list[$k]['is_new'] = $v['is_new'];				
             	
             $indexs_list[$k]['type'] = $v['type'];
             $indexs_list[$k]['data'] = $v['data'] = unserialize($v['data']);
             */
             $indexs_list[$k]['url'] = getWebAdsUrl($v['type'], unserialize($v['data']));
         }
         $GLOBALS['cache']->set("WAP_INDEXS_MORE_" . intval($GLOBALS['city_id']), $indexs_list, 300);
     }
     $root['indexs'] = $indexs_list;
     $root['page_title'] = "更多分类";
     output($root);
 }
开发者ID:macall,项目名称:jsd,代码行数:32,代码来源:indexs_more.action.php


示例5: index

 public function index()
 {
     require_once APP_ROOT_PATH . 'app/Lib/deal.php';
     /**
      * has_attr: 0:无属性; 1:有属性
      * 有商品属性在要购买时,要选择属性后,才能购买
      * change_cart_request_server: 
      * 编辑购买车商品时,需要提交到服务器端,让服务器端通过一些判断返回一些信息回来(如:满多少钱,可以免运费等一些提示)
      * 0:提交,1:不提交;
      * image_attr_a_id_{$attr_a_id} 图片列表,可以根据属性ID值,来切换图片列表;默认为:0
      * limit_num: 库存数量
      */
     $id = intval($GLOBALS['request']['id']);
     //商品ID
     $item = get_deal($id);
     $root = getGoodsArray($item);
     $root['return'] = 1;
     $root['attr'] = getAttrArray($id);
     $images = array();
     //image_attr_1_id_{$attr_1_id} 图片列表,可以根据属性ID值,来切换图片列表
     $sql = "select img from " . DB_PREFIX . "deal_gallery where deal_id = " . intval($id);
     $list = $GLOBALS['db']->getAll($sql);
     $gallery = array();
     $big_gallery = array();
     foreach ($list as $k => $image) {
         $gallery[] = get_abs_img_root(get_spec_image($image['img'], 320, 320, 0));
         $big_gallery[] = get_abs_img_root(get_spec_image($image['img'], 0, 0, 0));
     }
     $root['gallery'] = $gallery;
     $root['big_gallery'] = $big_gallery;
     output($root);
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:32,代码来源:goodsdesc.action.php


示例6: index

 public function index()
 {
     $page = intval($GLOBALS['request']['page']);
     $city_name = strim($GLOBALS['request']['city_name']);
     //城市名称
     if ($page == 0) {
         $page = 1;
     }
     $page_size = PAGE_SIZE;
     $limit = ($page - 1) * $page_size . "," . $page_size;
     $event_list = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "deal_event order by sort desc limit " . $limit);
     $count = $GLOBALS['db']->getOne("select count(*) from " . DB_PREFIX . "deal_event");
     foreach ($event_list as $k => $v) {
         $now = get_gmtime();
         $event_list[$k]['end_time'] = $v['event_end_time'];
         $event_list[$k]['url'] = url("shop", "deal_event#show", array("id" => $v['id']));
         $event_list[$k]['event_end_time'] = to_date($v['event_end_time'], 'Y-m-d');
         $event_list[$k]['icon'] = get_abs_img_root(make_img($v['icon'], 592, 215, 1));
         $event_list[$k]['sheng_time_format'] = to_date($v['event_end_time'] - $now, "d天h小时i分");
     }
     $page_total = ceil($count / $page_size);
     $root = array();
     $root['return'] = 1;
     $root['item'] = $event_list;
     $root['page'] = array("page" => $page, "page_total" => $page_total, "page_size" => $page_size);
     $root['page_title'] = "活动专题";
     $root['city_name'] = $city_name;
     output($root);
 }
开发者ID:macall,项目名称:jsd,代码行数:29,代码来源:deal_eventlist.action.php


示例7: index

 public function index()
 {
     require_once APP_ROOT_PATH . "system/libs/user.php";
     $email = strim($GLOBALS['request']['email']);
     $pwd = strim($GLOBALS['request']['pwd']);
     $result = do_login_user($email, $pwd);
     $GLOBALS['user_info'] = $user_data = es_session::get('user_info');
     $page = intval($GLOBALS['request']['page']) > 0 ? intval($GLOBALS['request']['page']) : 1;
     $page_size = 20;
     $limit = ($page - 1) * $page_size . "," . $page_size;
     $user_id = intval($GLOBALS['user_info']['id']);
     $sql = "select group_key,count(group_key) as total from " . DB_PREFIX . "msg_box  \r\n\t\t\t\twhere is_delete = 0 and ((to_user_id = " . $user_id . " and `type` = 0) or (from_user_id = " . $user_id . " and `type` = 1))  \r\n\t\t\t\tgroup by group_key \r\n\t\t\t\torder by system_msg_id desc,max(create_time) desc limit " . $limit;
     $sql_count = "select count(distinct(group_key)) from " . DB_PREFIX . "msg_box  \r\n\t\t\t\twhere is_delete = 0 and ((to_user_id = " . $user_id . " and `type` = 0) or (from_user_id = " . $user_id . " and `type` = 1))";
     $list = $GLOBALS['db']->getAll($sql);
     foreach ($list as $k => $v) {
         $list[$k] = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "msg_box where group_key = '" . $v['group_key'] . "' and ((to_user_id = " . $user_id . " and `type` = 0) or (from_user_id = " . $user_id . " and `type` = 1))  order by create_time desc limit 1");
         $list[$k]['total'] = $v['total'];
         if ($list[$k]['system_msg_id'] > 0) {
             $sys_msgs[] = array("mid" => $list[$k]['group_key'], "uid" => $list[$k]['to_user_id'], "status" => 1, "title" => $list[$k]['title'], "time" => pass_date($list[$k]['create_time']));
         } else {
             $msg_list[] = array("content" => $list[$k]['content'], "uid" => $list[$k]['from_user_id'], "user_name" => $list[$k]['from_user_id'] == $user_data['id'] ? "我" : $GLOBALS['db']->getOne("select user_name from " . DB_PREFIX . "user where id = " . intval($list[$k]['from_user_id'])), "user_avatar" => get_abs_img_root(get_muser_avatar($list[$k]['from_user_id'], "big")), "tuid" => $list[$k]['to_user_id'], "tuser_name" => $list[$k]['to_user_id'] == $user_data['id'] ? "我" : $GLOBALS['db']->getOne("select user_name from " . DB_PREFIX . "user where id = " . intval($list[$k]['to_user_id'])), "tuser_avatar" => get_abs_img_root(get_muser_avatar($list[$k]['to_user_id'], "big")), "time" => pass_date($list[$k]['create_time']), "msg_count" => $list[$k]['total'], "mlid" => $list[$k]['group_key']);
         }
     }
     $count = $GLOBALS['db']->getOne($sql_count);
     $root['return'] = 1;
     $root['sys_msgs'] = $sys_msgs;
     $root['msg_list'] = $msg_list;
     //分页
     $page_info['page'] = $page;
     $page_info['page_total'] = ceil($count / $page_size);
     $root['page'] = $page_info;
     output($root);
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:33,代码来源:message.action.php


示例8: index

 public function index()
 {
     $city_name = strim($GLOBALS['request']['city_name']);
     //城市名称
     $root = array();
     $user_data = $GLOBALS['user_info'];
     //logUtils::log_obj($user_data);
     $user_id = intval($user_data['id']);
     if ($user_id == 0) {
         $root['user_login_status'] = 0;
         $root['info'] = "请先登陆";
         $root['page_title'] = "登陆";
     } else {
         $root['user_login_status'] = 1;
         $root['info'] = "用户中心";
         $root['page_title'] = "用户中心";
         $root['uid'] = $user_data['id'];
         $root['user_name'] = $user_data['user_name'];
         $root['user_email'] = $user_data['email'];
         $root['user_money'] = $user_data['money'];
         $root['user_money_format'] = format_price($user_data['money']);
         //用户金额
         $root['user_avatar'] = get_abs_img_root(get_muser_avatar($user_data['id'], "big"));
     }
     $root['mana_page_title'] = '经理中心';
     $root['user'] = $user_data;
     $root['city_name'] = $city_name;
     output($root);
 }
开发者ID:macall,项目名称:jishida,代码行数:29,代码来源:user_center.action.php


示例9: index

 public function index()
 {
     $city_name = strim($GLOBALS['request']['city_name']);
     //城市名称
     $root = array();
     $root['page_title'] = '预约技师';
     //检查用户,用户密码
     $user = $GLOBALS['user_info'];
     $user_id = intval($user['id']);
     $root['return'] = 1;
     if ($user_id > 0) {
         $root['user_login_status'] = 1;
         $sql = 'SELECT * FROM ' . DB_PREFIX . 'user WHERE is_effect = 1 AND is_delete = 0 AND service_type_id = 2';
         $tech_list = $GLOBALS['db']->getAll($sql);
         foreach ($tech_list as $key => $value) {
             $p = $GLOBALS['db']->getRow("select name from " . DB_PREFIX . "region_conf where id = " . $value['province_id']);
             $c = $GLOBALS['db']->getRow("select name from " . DB_PREFIX . "region_conf where id = " . $value['city_id']);
             for ($i = 0; $i < $value['service_level_id']; $i++) {
                 $value['tech_level'][] = $i;
             }
             $value['addr'] = $p['name'] . '-' . $c['name'] . '-' . $value['addr_detail'];
             $value['user_avatar'] = get_abs_img_root(get_muser_avatar($value['id'], "big"));
             $tech_list[$key] = $value;
         }
         $root['tech_list'] = $tech_list;
     } else {
         $root['user_login_status'] = 0;
     }
     $root['user'] = $user;
     $root['city_name'] = $city_name;
     output($root);
 }
开发者ID:macall,项目名称:jishida,代码行数:32,代码来源:tech_list.action.php


示例10: index

 public function index()
 {
     require_once APP_ROOT_PATH . "system/libs/user.php";
     $root = array();
     $user_data = $GLOBALS['user_info'];
     if (intval($user_data['id']) == 0) {
         $root['return'] = 0;
         $root['info'] = "请先登录";
         output($root);
     }
     if (isset($_FILES['image_1'])) {
         //开始上传
         //创建avatar临时目录
         if (!is_dir(APP_ROOT_PATH . "public/avatar")) {
             @mkdir(APP_ROOT_PATH . "public/avatar");
             @chmod(APP_ROOT_PATH . "public/avatar", 0777);
         }
         if (!is_dir(APP_ROOT_PATH . "public/avatar/temp")) {
             @mkdir(APP_ROOT_PATH . "public/avatar/temp");
             @chmod(APP_ROOT_PATH . "public/avatar/temp", 0777);
         }
         $img_result = save_image_upload($_FILES, "image_1", "avatar/temp", $whs = array('small' => array(48, 48, 1, 0), 'middle' => array(120, 120, 1, 0), 'big' => array(200, 200, 1, 0)));
         //开始移动图片到相应位置
         $id = intval($user_data['id']);
         $uid = sprintf("%09d", $id);
         $dir1 = substr($uid, 0, 3);
         $dir2 = substr($uid, 3, 2);
         $dir3 = substr($uid, 5, 2);
         $path = $dir1 . '/' . $dir2 . '/' . $dir3;
         //创建相应的目录
         if (!is_dir(APP_ROOT_PATH . "public/avatar/" . $dir1)) {
             @mkdir(APP_ROOT_PATH . "public/avatar/" . $dir1);
             @chmod(APP_ROOT_PATH . "public/avatar/" . $dir1, 0777);
         }
         if (!is_dir(APP_ROOT_PATH . "public/avatar/" . $dir1 . '/' . $dir2)) {
             @mkdir(APP_ROOT_PATH . "public/avatar/" . $dir1 . '/' . $dir2);
             @chmod(APP_ROOT_PATH . "public/avatar/" . $dir1 . '/' . $dir2, 0777);
         }
         if (!is_dir(APP_ROOT_PATH . "public/avatar/" . $dir1 . '/' . $dir2 . '/' . $dir3)) {
             @mkdir(APP_ROOT_PATH . "public/avatar/" . $dir1 . '/' . $dir2 . '/' . $dir3);
             @chmod(APP_ROOT_PATH . "public/avatar/" . $dir1 . '/' . $dir2 . '/' . $dir3, 0777);
         }
         $id = str_pad($id, 2, "0", STR_PAD_LEFT);
         $id = substr($id, -2);
         $avatar_file_big = APP_ROOT_PATH . "public/avatar/" . $path . "/" . $id . "virtual_avatar_big.jpg";
         $avatar_file_middle = APP_ROOT_PATH . "public/avatar/" . $path . "/" . $id . "virtual_avatar_middle.jpg";
         $avatar_file_small = APP_ROOT_PATH . "public/avatar/" . $path . "/" . $id . "virtual_avatar_small.jpg";
         @file_put_contents($avatar_file_big, file_get_contents($img_result['image_1']['thumb']['big']['path']));
         @file_put_contents($avatar_file_middle, file_get_contents($img_result['image_1']['thumb']['middle']['path']));
         @file_put_contents($avatar_file_small, file_get_contents($img_result['image_1']['thumb']['small']['path']));
         @unlink($img_result['image_1']['thumb']['big']['path']);
         @unlink($img_result['image_1']['thumb']['middle']['path']);
         @unlink($img_result['image_1']['thumb']['small']['path']);
         @unlink($img_result['image_1']['path']);
         //end 上传
     }
     $root['return'] = 1;
     $root['user_avatar'] = get_abs_img_root(get_muser_avatar($user_data['id'], "big"));
     output($root);
 }
开发者ID:macall,项目名称:jsd,代码行数:60,代码来源:avatar.action.php


示例11: index

 public function index()
 {
     require_once APP_ROOT_PATH . "system/libs/user.php";
     $root = array();
     $email = strim($GLOBALS['request']['email']);
     $pwd = strim($GLOBALS['request']['pwd']);
     $result = do_login_user($email, $pwd);
     $GLOBALS['user_info'] = $user_data = es_session::get('user_info');
     $user_data['id'] = intval($user_data['id']);
     $page = intval($GLOBALS['request']['page']);
     if ($page == 0) {
         $page = 1;
     }
     $home_uid = intval($GLOBALS['request']['uid']);
     $home_user_info_data = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "user where id = " . $home_uid . " and is_effect = 1 and is_delete = 0");
     if (!$home_user_info_data) {
         $root['info'] = "非法的会员";
         output($root);
     }
     $user_info['uid'] = $user_data['id'];
     $user_info['email'] = $user_data['email'];
     $user_info['user_name'] = $user_data['user_name'];
     $user_info['user_avatar'] = get_abs_img_root(get_muser_avatar($user_data['id'], "big"));
     $root['user'] = $user_info;
     $home_user_info['uid'] = $home_user_info_data['id'];
     $home_user_info['email'] = $home_user_info_data['email'];
     $home_user_info['user_name'] = $home_user_info_data['user_name'];
     $home_user_info['user_avatar'] = get_abs_img_root(get_muser_avatar($home_user_info_data['id'], "big"));
     $home_user_info['fans'] = $home_user_info_data['focused_count'];
     $home_user_info['follows'] = $home_user_info_data['focus_count'];
     $home_user_info['photos'] = $GLOBALS['db']->getOne("select count(*) from " . DB_PREFIX . "topic_image where user_id = " . $home_user_info_data['id']);
     $home_user_info['favs'] = $GLOBALS['db']->getOne("select sum(fav_count) from " . DB_PREFIX . "topic where user_id = " . $home_user_info_data['id']);
     $root['home_user'] = $home_user_info;
     $limit = ($page - 1) * PAGE_SIZE . "," . PAGE_SIZE;
     $follow_list = $GLOBALS['db']->getAll("select focused_user_id as id,focused_user_name as user_name from " . DB_PREFIX . "user_focus where focus_user_id = " . $home_user_info_data['id'] . " order by id desc limit " . $limit);
     $total = $GLOBALS['db']->getOne("select count(*) from " . DB_PREFIX . "user_focus where focus_user_id = " . $home_user_info_data['id']);
     $follows = array();
     foreach ($follow_list as $k => $v) {
         $follows[$k]['uid'] = $v['id'];
         $follows[$k]['user_name'] = $v['user_name'];
         $follows[$k]['fans'] = $GLOBALS['db']->getOne("select count(*) from " . DB_PREFIX . "user_focus where focused_user_id = " . $v['id']);
         $follows[$k]['user_avatar'] = get_abs_img_root(get_muser_avatar($v['id'], "big"));
         if ($v['id'] == $user_data['id']) {
             $follows[$k]['is_follow'] = -1;
         } else {
             $focus_uid = intval($v['id']);
             $focus_data = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "user_focus where focus_user_id = " . $user_info['uid'] . " and focused_user_id = " . $focus_uid);
             if ($focus_data) {
                 $follows[$k]['is_follow'] = 1;
             } else {
                 $follows[$k]['is_follow'] = 0;
             }
         }
     }
     $root['page'] = array("page" => $page, "page_total" => ceil($total / PAGE_SIZE));
     $root['item'] = $follows;
     $root['return'] = 1;
     $root['status'] = 1;
     output($root);
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:60,代码来源:followlist.action.php


示例12: index

 public function index()
 {
     require_once APP_ROOT_PATH . "system/libs/user.php";
     $user_data = $GLOBALS['user_info'];
     $page = intval($GLOBALS['request']['page']) > 0 ? intval($GLOBALS['request']['page']) : 1;
     $page_size = PAGE_SIZE;
     $limit = ($page - 1) * $page_size . "," . $page_size;
     $user_id = intval($GLOBALS['user_info']['id']);
     $group_key = addslashes(trim($GLOBALS['request']['mid']));
     $sql = "select count(*) as count,max(system_msg_id) as system_msg_id,max(id) as id from " . DB_PREFIX . "msg_box  \n\t\t\t\twhere is_delete = 0 and ((to_user_id = " . $user_id . " and `type` = 0) or (from_user_id = " . $user_id . " and `type` = 1))  \n\t\t\t\tand group_key = '" . $group_key . "'";
     $row = $GLOBALS['db']->getRow($sql);
     if ($row['count'] == 0) {
         $root['return'] = 0;
     } elseif ($row['system_msg_id'] > 0) {
         //系统消息,仅查看
         $data = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "msg_box where id = " . $row['id'] . " and is_delete = 0");
         $GLOBALS['db']->query("update " . DB_PREFIX . "msg_box set is_read = 1 where id = " . $row['id']);
         $root['return'] = 1;
         $root['msg'] = array('mid' => $group_key, 'title' => $data['title'], 'message' => $data['content'], 'time' => pass_date($data['create_time']));
     } else {
         $root['return'] = 1;
         $root['lid'] = $group_key;
         //消息记录
         $sql = "select * from " . DB_PREFIX . "msg_box  \n\t\t\t\t\twhere is_delete = 0 and ((to_user_id = " . $user_id . " and `type` = 0) or (from_user_id = " . $user_id . " and `type` = 1))  \n\t\t\t\t\tand group_key = '" . $group_key . "' \n\t\t\t\t\torder by create_time desc limit " . $limit;
         $sql_count = "select count(*) from " . DB_PREFIX . "msg_box  \n\t\t\t\t\twhere is_delete = 0 and ((to_user_id = " . $user_id . " and `type` = 0) or (from_user_id = " . $user_id . " and `type` = 1)) and group_key = '" . $group_key . "'";
         $upd_sql = "update " . DB_PREFIX . "msg_box set is_read = 1 \n\t\t\t\t\twhere is_delete = 0 and ((to_user_id = " . $user_id . " and `type` = 0) or (from_user_id = " . $user_id . " and `type` = 1))  \n\t\t\t\t\tand group_key = '" . $group_key . "' ";
         $GLOBALS['db']->query($upd_sql);
         $list = $GLOBALS['db']->getAll($sql);
         foreach ($list as $k => $v) {
             if ($v['to_user_id'] != $user_id) {
                 $dest_user_id = $v['to_user_id'];
                 break;
             }
             if ($v['from_user_id'] != $user_id) {
                 $dest_user_id = $v['from_user_id'];
                 break;
             }
         }
         $dest_user_name = $GLOBALS['db']->getOne("select user_name from " . DB_PREFIX . "user where id = " . $dest_user_id);
         $root['title'] = "与" . $dest_user_name . "的交流";
         $root['t_name'] = $dest_user_name;
         $count = $GLOBALS['db']->getOne($sql_count);
         $page_info['page'] = $page;
         $page_info['page_total'] = ceil($count / $page_size);
         $page_info['page_size'] = $page_size;
         $root['page'] = $page_info;
         $msg_list = array();
         foreach ($list as $k => $v) {
             $msg_list[] = array("miid" => $v['id'], "mlid" => $v['group_key'], "uid" => $v['from_user_id'], "message" => $v['content'], "time" => pass_date($v['create_time']), "tuid" => $v['to_user_id'], "tuser_name" => $v['to_user_id'] == $user_id ? "我" : $dest_user_name, "tuser_avatar" => get_abs_img_root(get_muser_avatar($v['to_user_id'], "big")), "content" => $v['content'], "user_name" => $v['from_user_id'] == $user_id ? "我" : $dest_user_name, "user_avatar" => get_abs_img_root(get_muser_avatar($v['from_user_id'], "big")));
         }
         $root['msg_list'] = $msg_list;
     }
     if (strim($GLOBALS['request']['from']) == "wap") {
         $root['f_link_data'] = get_link_list();
         $root['email'] = $email;
     }
     // fwb add 2014-08-27
     output($root);
 }
开发者ID:macall,项目名称:jsd,代码行数:59,代码来源:msgview.action.php


示例13: index

 public function index()
 {
     $city_name = strim($GLOBALS['request']['city_name']);
     //城市名称
     $root = array();
     $root['page_title'] = '名下技师';
     //检查用户,用户密码
     $user = $GLOBALS['user_info'];
     $user_id = intval($user['id']);
     $root['return'] = 1;
     if ($user_id > 0) {
         $root['user_login_status'] = 1;
         //配置分页参数
         require_once APP_ROOT_PATH . "wap/lib/page.php";
         $page_size = 10;
         $page = intval($GLOBALS['request']['page']);
         if ($page == 0) {
             $page = 1;
         }
         $limit = ($page - 1) * $page_size . "," . $page_size;
         $sql = 'SELECT 
                     * 
                   FROM
                     ' . DB_PREFIX . 'user 
                   WHERE is_effect = 1 
                     AND is_delete = 0 
                     AND service_type_id = 2
                     AND p_id =' . $user_id . ' limit ' . $limit;
         $sql_count = 'SELECT 
                     count(*) 
                   FROM
                     ' . DB_PREFIX . 'user 
                   WHERE is_effect = 1 
                     AND is_delete = 0 
                     AND service_type_id = 2
                     AND p_id =' . $user_id;
         $tech_list = $GLOBALS['db']->getAll($sql);
         foreach ($tech_list as $key => $value) {
             $p = $GLOBALS['db']->getRow("select name from " . DB_PREFIX . "region_conf where id = " . $value['province_id']);
             $c = $GLOBALS['db']->getRow("select name from " . DB_PREFIX . "region_conf where id = " . $value['city_id']);
             for ($i = 0; $i < $value['service_level_id']; $i++) {
                 $value['tech_level'][] = $i;
             }
             $value['addr'] = $p['name'] . '-' . $c['name'] . '-' . $value['addr_detail'];
             $value['user_avatar'] = get_abs_img_root(get_muser_avatar($value['id'], "big"));
             $tech_list[$key] = $value;
         }
         //配置分页
         $count = $GLOBALS['db']->getOne($sql_count);
         $page_total = ceil($count / $page_size);
         $root['page'] = array("page" => $page, "page_total" => $page_total, "page_size" => $page_size);
         $root['tech_list'] = $tech_list;
     } else {
         $root['user_login_status'] = 0;
     }
     $root['user'] = $user;
     $root['city_name'] = $city_name;
     output($root);
 }
开发者ID:macall,项目名称:jishida,代码行数:59,代码来源:mana_tech_list.action.php


示例14: index

 public function index()
 {
     $root = array();
     $id = intval($GLOBALS['request']['id']);
     $sql = "select id, title, content from " . DB_PREFIX . "article where is_effect = 1 and is_delete = 0 and id =" . $id;
     //echo $sql; exit;
     $article = $GLOBALS['db']->getRow($sql);
     $root['id'] = $article['id'];
     $root['title'] = $article['title'];
     $root['content'] = get_abs_img_root($article['content']);
     $root['response_code'] = 1;
     output($root);
 }
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:13,代码来源:show_article.action.php


示例15: index

 public function index()
 {
     require_once APP_ROOT_PATH . "system/libs/user.php";
     $root = array();
     $email = strim($GLOBALS['request']['email']);
     $pwd = strim($GLOBALS['request']['pwd']);
     $result = do_login_user($email, $pwd);
     $GLOBALS['user_info'] = $user_data = es_session::get('user_info');
     $user_data['id'] = intval($user_data['id']);
     $user_info['uid'] = $user_data['id'];
     $user_info['email'] = $user_data['email'];
     $user_info['user_name'] = $user_data['user_name'];
     $user_info['user_avatar'] = get_abs_img_root(get_muser_avatar($user_data['id'], "big"));
     $page = intval($GLOBALS['request']['page']);
     if ($page == 0) {
         $page = 1;
     }
     $limit = ($page - 1) * PAGE_SIZE . "," . PAGE_SIZE;
     $list = $GLOBALS['db']->getAll("select id,user_name,daren_title from " . DB_PREFIX . "user where is_delete = 0 and is_effect = 1 and is_daren = 1 order by id desc limit " . $limit);
     $total = $GLOBALS['db']->getOne("select count(*) from " . DB_PREFIX . "user where is_delete = 0 and is_effect = 1 and is_daren = 1 ");
     $darens = array();
     foreach ($list as $k => $v) {
         $darens[$k]['uid'] = $v['id'];
         $darens[$k]['user_name'] = $v['user_name'];
         if ($v['daren_title'] != '') {
             $darens[$k]['user_name'] .= "[" . $v['daren_title'] . "]";
         }
         $darens[$k]['fans'] = $GLOBALS['db']->getOne("select count(*) from " . DB_PREFIX . "user_focus where focused_user_id = " . $v['id']);
         $darens[$k]['user_avatar'] = get_abs_img_root(get_muser_avatar($v['id'], "big"));
         if ($v['id'] == $user_data['id']) {
             $darens[$k]['is_follow'] = -1;
         } else {
             $focus_uid = intval($v['id']);
             $focus_data = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "user_focus where focus_user_id = " . $user_info['uid'] . " and focused_user_id = " . $focus_uid);
             if ($focus_data) {
                 $darens[$k]['is_follow'] = 1;
             } else {
                 $darens[$k]['is_follow'] = 0;
             }
         }
     }
     $root['page'] = array("page" => $page, "page_total" => ceil($total / PAGE_SIZE));
     $root['item'] = $darens;
     $root['return'] = 1;
     $root['status'] = 1;
     output($root);
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:47,代码来源:darens.action.php


示例16: index

 public function index()
 {
     require_once APP_ROOT_PATH . "system/model/user.php";
     $email = strim($GLOBALS['request']['email']);
     $pwd = strim($GLOBALS['request']['pwd']);
     $root = array();
     $user_data = $GLOBALS['user_info'];
     $user_data['id'] = intval($user_data['id']);
     $uid = intval($user_data['id']);
     if ($uid == 0) {
         $root['info'] = "请先登陆";
         $root['return'] = 2;
         output($root);
     }
     $page = intval($GLOBALS['request']['page']);
     if ($page == 0) {
         $page = 1;
     }
     $user_info['uid'] = $user_data['id'];
     $user_info['email'] = $user_data['email'];
     $user_info['user_name'] = $user_data['user_name'];
     $user_info['user_avatar'] = get_abs_img_root(get_muser_avatar($user_data['id'], "big"));
     $root['home_user'] = $root['user'] = $user_info;
     //关注的用户ID
     $uids = $GLOBALS['db']->getOne("select group_concat(focused_user_id) from " . DB_PREFIX . "user_focus where focus_user_id = " . $user_data['id'] . " order by rand() limit 50");
     if ($uids) {
         $uids .= ",0";
     } else {
         $uids = "0";
     }
     $limit = ($page - 1) * PAGE_SIZE . "," . PAGE_SIZE;
     $topic_list = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "topic where is_effect = 1 and is_delete = 0 and user_id in (" . $uids . ") order by create_time desc limit " . $limit);
     $total = $GLOBALS['db']->getOne("select count(*) from " . DB_PREFIX . "topic where is_effect = 1 and is_delete = 0 and user_id in (" . $uids . ") ");
     foreach ($topic_list as $k => $v) {
         $topic_list[$k] = m_get_topic_item($v);
         if ($v['fav_id'] > 0 || $v['relay_id'] > 0) {
             $relay_share = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "topic where is_effect = 1 and is_delete = 0 and id = " . $v['origin_id']);
         }
         if ($relay_share) {
             $topic_list[$k]['relay_share'] = m_get_topic_item($relay_share);
         }
     }
     $root['return'] = 1;
     $root['item'] = $topic_list;
     $root['page'] = array("page" => $page, "page_total" => ceil($total / PAGE_SIZE), "page_size" => PAGE_SIZE);
     output($root);
 }
开发者ID:macall,项目名称:jsd,代码行数:47,代码来源:ufollow.action.php


示例17: index

 public function index()
 {
     $city_name = strim($GLOBALS['request']['city_name']);
     //城市名称
     $root = array();
     $root['page_title'] = '技师详情';
     $root['mana_page_title'] = '客户资料';
     //检查用户,用户密码
     $user = $GLOBALS['user_info'];
     $user_id = intval($user['id']);
     $root['return'] = 1;
     if ($user_id > 0) {
         $m_user_id = $GLOBALS['request']['m_user_id'];
         $root['user_login_status'] = 1;
         $sql = 'SELECT 
                     * 
                   FROM
                     ' . DB_PREFIX . 'user 
                   WHERE id =' . $m_user_id;
         $m_user = $GLOBALS['db']->getRow($sql);
         //地址
         $p = $GLOBALS['db']->getRow("select name from " . DB_PREFIX . "region_conf where id = " . $m_user['province_id']);
         $c = $GLOBALS['db']->getRow("select name from " . DB_PREFIX . "region_conf where id = " . $m_user['city_id']);
         $m_user['addr'] = $p['name'] . '-' . $c['name'] . '-' . $m_user['addr_detail'];
         //星级
         for ($i = 0; $i < $m_user['service_level_id']; $i++) {
             $m_user['tech_level'][] = $i;
         }
         //性别
         if ($m_user['sex'] == 1) {
             $m_user['sex'] = '男';
         } elseif ($m_user['sex'] == 0) {
             $m_user['sex'] = '女';
         } else {
             $m_user['sex'] = '保密';
         }
         //头像
         $m_user['user_avatar'] = get_abs_img_root(get_muser_avatar($m_user_id, "big"));
         $root['m_user'] = $m_user;
     } else {
         $root['user_login_status'] = 0;
     }
     $root['user'] = $user;
     $root['city_name'] = $city_name;
     output($root);
 }
开发者ID:macall,项目名称:jishida,代码行数:46,代码来源:mana_user_detail.action.php


示例18: index

 public function index()
 {
     $city_name = strim($GLOBALS['request']['city_name']);
     //城市名称
     $root = array();
     $root['page_title'] = '投诉列表';
     $root['mana_page_title'] = '投诉列表';
     //检查用户,用户密码
     $user = $GLOBALS['user_info'];
     $user_id = intval($user['id']);
     //经理id
     $root['return'] = 1;
     if ($user_id > 0) {
         $root['user_login_status'] = 1;
         //配置分页参数
         require_once APP_ROOT_PATH . "wap/lib/page.php";
         $page_size = 10;
         $page = intval($GLOBALS['request']['page']);
         if ($page == 0) {
             $page = 1;
         }
         $limit = ($page - 1) * $page_size . "," . $page_size;
         $sql = "SELECT\n                        doc.`id` AS complain_id,\n                        doi.`number`,\n                        doc.`create_time`,\n                        d.`id` AS deal_id,\n                        d.`current_price` AS price,\n                        d.`sub_name` AS service_name,\n                        d.`img` AS service_icon,\n                        do.`create_time` AS order_create_time \n                      FROM\n                        " . DB_PREFIX . "deal_order_complain doc \n                        LEFT JOIN " . DB_PREFIX . "deal_order DO \n                          ON doc.`order_id` = do.`id` \n                        LEFT JOIN " . DB_PREFIX . "deal_order_item doi \n                          ON do.`id` = doi.`order_id` \n                        LEFT JOIN " . DB_PREFIX . "deal d \n                          ON doi.`deal_id`=d.`id` \n                      WHERE do.`type` = 0 \n                        AND doc.`tech_id` IN \n                        (SELECT \n                          id \n                        FROM\n                          " . DB_PREFIX . "user fu \n                        WHERE fu.`p_id` = " . $user_id . " \n                          AND fu.`service_type_id` = 2 \n                          AND fu.`is_delete` = 0) GROUP BY doc.`id` ORDER BY doc.`create_time` DESC limit " . $limit;
         $sql_count = "SELECT \n                        count(*) \n                      FROM\n                        " . DB_PREFIX . "deal_order_complain doc \n                        LEFT JOIN " . DB_PREFIX . "deal_order DO \n                          ON doc.`order_id` = do.`id` \n                        LEFT JOIN " . DB_PREFIX . "deal_order_item doi \n                          ON do.`id` = doi.`order_id` \n                        LEFT JOIN " . DB_PREFIX . "deal d \n                          ON doi.`deal_id`=d.`id` \n                      WHERE do.`type` = 0 \n                        AND doc.`tech_id` IN \n                        (SELECT \n                          id \n                        FROM\n                          " . DB_PREFIX . "user fu \n                        WHERE fu.`p_id` = " . $user_id . " \n                          AND 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_abs_item函数代码示例发布时间:2022-05-15
下一篇:
PHP get_abs_dir函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap