当前位置: 首页>>代码示例>>PHP>>正文


PHP int_to_string函数代码示例

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


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

示例1: index

 /**
  * 后台菜单首页
  * @return none
  */
 public function index()
 {
     $pid = I('get.pid', 0, 'intval');
     if ($pid) {
         $data = M('Menu')->where(array('id' => $pid))->field(true)->find();
         $this->assign('data', $data);
     }
     $title = I('get.title', '', 'trim,htmlspecialchars');
     $type = C('CONFIG_GROUP_LIST');
     $all_menu = M('Menu')->getField('id,title');
     $map['pid'] = $pid;
     if ($title) {
         $map['title'] = array('like', "%{$title}%");
     }
     $list = M('Menu')->where($map)->field(true)->order('sort asc,id asc')->select();
     int_to_string($list, array('hide' => array(1 => '是', 0 => '否'), 'is_dev' => array(1 => '是', 0 => '否')));
     if ($list) {
         foreach ($list as &$key) {
             if ($key['pid']) {
                 $key['up_title'] = $all_menu[$key['pid']];
             }
         }
         $this->assign('list', $list);
     }
     // 记录当前列表页的cookie
     Cookie('__forward__', $_SERVER['REQUEST_URI']);
     $this->meta_title = '菜单列表';
     $this->display();
 }
开发者ID:admpub,项目名称:OpenCenter,代码行数:33,代码来源:MenuController.class.php

示例2: index

 /**
  * 后台菜单首页
  *
  * @return none
  */
 public function index()
 {
     $pid = I('get.pid', 0);
     if ($pid) {
         $data = M('system_menu')->where("id={$pid}")->field(true)->find();
         $this->assign('data', $data);
     }
     $all_menu = M('system_menu')->getField('id,title');
     $map['pid'] = $pid;
     $title = trim(I('get.title'));
     if ($title) {
         $map['title'] = array('like', "%{$title}%");
     }
     $list = M('system_menu')->where($map)->field(true)->order('sort asc,id asc')->select();
     int_to_string($list, array('hide' => array(1 => '是', 0 => '否')));
     if ($list) {
         foreach ($list as &$key) {
             if ($key['pid']) {
                 $key['up_title'] = $all_menu[$key['pid']];
             }
         }
         $this->assign('list', $list);
     }
     // 记录当前列表页的cookie
     Cookie('__forward__', $_SERVER['REQUEST_URI']);
     $this->meta_title = '菜单列表';
     $this->display();
 }
开发者ID:torry999,项目名称:lingshi,代码行数:33,代码来源:MenuController.class.php

示例3: index

 /**
  * 菜单列表
  */
 public function index()
 {
     $pid = Util::getSafeText(I('get.pid', 0));
     $menuModel = D('Menu');
     if ($pid) {
         $data = $menuModel->getRow(intval($pid));
         $this->assign('data', $data);
     }
     $title = Util::getSafeText(trim(I('get.title')));
     $all_menu = M('Menu')->getField('id,title');
     $map['pid'] = $pid;
     if ($title) {
         $map['title'] = array('like', "%{$title}%");
     }
     $list = $menuModel->getRows($map, 'sort asc,id asc');
     $menuGroupModel = D('MenuGroup');
     foreach ($list as &$item) {
         $group = $menuGroupModel->getRow(array("id=" . $item['groupid']));
         $item['group'] = $group['group'];
     }
     //int_to_string($list, array('hide'=>array(1=>'是',0=>'否'), 'is_dev'=>array(1=>'是',0=>'否')));
     int_to_icon($list, array('hide' => array(1 => 'icon-eye-close', 0 => 'icon-eye-open')));
     int_to_string($list, array('is_dev' => array(1 => '是', 0 => '否')));
     if ($list) {
         foreach ($list as &$key) {
             if ($key['pid']) {
                 $key['up_title'] = $all_menu[$key['pid']];
             }
         }
         $this->assign('list', $list);
     }
     $this->display();
 }
开发者ID:jianzi0307,项目名称:RunCMS,代码行数:36,代码来源:MenusettingController.class.php

示例4: index

 public function index()
 {
     $projects = D('ProjectInfoView')->where(array('p.stage' => array('egt', 1), 'p.status' => 9))->group('p.id')->select();
     int_to_string($projects, array('stage' => array(0 => '审核已通过', 1 => '预热阶段', 2 => '认投阶段', 3 => '推选领投人阶段', 4 => '合投阶段', 5 => '等待付款', 9 => '完成')));
     $this->_list = $projects;
     $this->display('index');
 }
开发者ID:rainly123,项目名称:zyzm,代码行数:7,代码来源:ZczjController.class.php

示例5: index

 public function index()
 {
     $cat_id = Q('cat_id', 0, 'intval');
     if ($cat_id) {
         $map['cat_id'] = array('EQ', $cat_id);
         $this->db->where($map);
     }
     $data = $this->db->all();
     int_to_string($data, array('attr_type' => array('0' => '普通类型', '1' => '规格类型')));
     int_to_string($data, array('attr_input_type' => array(0 => '文本框', 1 => '下拉列表', 2 => '文本域')));
     foreach ($data as $k => $v) {
         if (!empty($v['attr_value'])) {
             $da['attr_value'] = unserialize($v['attr_value']);
             $data[$k]['attr_value'] = implode('', $da['attr_value']);
             //implode将一维数组转换为字符串
         }
     }
     $this->assign('data', $data);
     /**
      * 选择对应的商品类型
      *分配类型
      */
     $this->assign('goods_type', S('goods_type'));
     $this->display();
 }
开发者ID:www2511550,项目名称:ECSHOP,代码行数:25,代码来源:AttributeController.class.php

示例6: index

 public function index()
 {
     //接收用户筛选信息,具体的信息看,组织查询的条件
     $map['status'] = array('GT', -1);
     //筛选图片的种类
     $picture_category = I('picture_category');
     if ($picture_category) {
         $map['type'] = $picture_category;
         $data['type'] = $picture_category;
     }
     //时间筛选
     $add_time_begin = I('add_time_begin');
     $add_time_end = I('add_time_end');
     if (!empty($add_time_begin) && !empty($add_time_end)) {
         $map['add_time'] = array(array('GT', $add_time_begin), array('LT', $add_time_end));
         $data['add_time_begin'] = $add_time_begin;
         $data['add_time_end'] = $add_time_end;
     }
     $picture_category = array(1 => '店铺图片', 2 => '商品图片', 4 => '店铺视频');
     //显示图片的种类
     //按照条件将信息显示出来
     $result = $this->page($this->table, $map, 'add_time desc');
     //将信息中的int字段转化成文字信息
     $result = int_to_string($result, array('type' => $picture_category));
     $data['picture_category'] = $picture_category;
     $data['result'] = $result;
     $this->assign($data);
     $this->display();
 }
开发者ID:976112643,项目名称:manor,代码行数:29,代码来源:PictureController.class.php

示例7: index

 public function index()
 {
     //接收用户筛选信息,具体的信息看,组织查询的条件
     $map['is_admin'] = 0;
     $map['status'] = array('gt', -1);
     $map['role_id'] = array('gt', 0);
     $keywords = I('keywords');
     // 		dump($keywords);die;
     if ($keywords) {
         $map['username|email|telephone|realname'] = array('like', "%{$keywords}%");
         //这里的username是真实姓名还是平台生成的呢??这里还可以添加其他的关键词
         $data['keywords'] = $keywords;
         //将本次的关键词显示到页面中去
     }
     $add_time_begin = I('add_time_begin');
     $add_time_end = I('add_time_end');
     if (!empty($add_time_begin) && !empty($add_time_end)) {
         $add_time_begink = $add_time_begin . ' 00:00:00';
         $add_time_endk = $add_time_end . ' 23:59:59';
         $map['add_time'] = array(array('GT', $add_time_begink), array('LT', $add_time_endk));
         $data['add_time_begin'] = $add_time_begin;
         $data['add_time_end'] = $add_time_end;
     }
     //按照条件将信息显示出来
     $result = $this->page(D("Common/MemberView"), $map, 'add_time desc');
     //将信息中的int字段转化成文字信息
     $result = int_to_string($result, array('status' => array(0 => '禁用', 1 => '启用'), 'type' => array(1 => '普通用户', 2 => '个人译者', 3 => '翻译公司')));
     $data['result'] = $result;
     // 		dump($result);die;
     $this->assign($data);
     $this->display();
 }
开发者ID:976112643,项目名称:manor,代码行数:32,代码来源:IndexController.class.php

示例8: index

 /**
  * 后台菜单首页
  * @return none
  */
 public function index()
 {
     $pid = I('get.pid', 0);
     if ($pid) {
         $data = M('Menu')->where("id={$pid}")->field(true)->find();
         $this->assign('data', $data);
     }
     $title = trim(I('get.title'));
     $type = C('CONFIG_GROUP_LIST');
     $all_menu = M('Menu')->getField('id,title');
     $map = array('pid' => $pid);
     if ($title) {
         $map['title'] = array('like', "%{$title}%");
     }
     $list = M("Menu")->where($map)->field(true)->order('sort asc')->select();
     int_to_string($list, array('hide' => array(1 => '是', 0 => '否'), 'is_dev' => array(1 => '是', 0 => '否')));
     if ($list) {
         foreach ($list as &$key) {
             $key['up_title'] = $all_menu[$key['pid']];
         }
         $this->assign('list', $list);
     }
     $this->meta_title = '菜单列表';
     $this->display();
 }
开发者ID:commiunty,项目名称:Mytest,代码行数:29,代码来源:MenuController.class.php

示例9: index

 public function index()
 {
     //接收用户筛选信息,具体的信息看,组织查询的条件
     $map['status'] = 0;
     /* $keywords=I('keywords');
     		if($keywords){
     			$map['username|email|telephone|realname']=array('like', "%$keywords%");//这里的username是真实姓名还是平台生成的呢??这里还可以添加其他的关键词
     			$data['keywords'] = $keywords;//将本次的关键词显示到页面中去
     		} */
     //按照时间筛选
     $add_time_begin = I('add_time_begin');
     $add_time_end = I('add_time_end');
     if (!empty($add_time_begin) && !empty($add_time_end)) {
         $map['add_time'] = array(array('GT', $add_time_begin), array('LT', $add_time_end));
         $data['add_time_begin'] = $add_time_begin;
         $data['add_time_end'] = $add_time_end;
     }
     //按照好评差评筛选
     $type = I('type');
     if ($type != 0) {
         $map['type'] = $type;
         $data['type'] = $type;
     }
     //将评价按照好评、中评、差评区分
     $comment_array = array(1 => '好评', 2 => '中评', 3 => '差评');
     $data['comment_array'] = $comment_array;
     //按照条件将信息显示出来
     $result = $this->page(D('Common/CommentView'), $map, 'add_time desc');
     //print_r(session('sql'));exit;
     //将信息中的int字段转化成文字信息
     $result = int_to_string($result, array('comment_type' => array(1 => '好评', 2 => '中评', 3 => '差评'), 'product_type' => array('36' => 文档翻译, '56' => 音频翻译, '37' => 口译服务)));
     $data['result'] = $result;
     $this->assign($data);
     $this->display();
 }
开发者ID:976112643,项目名称:manor,代码行数:35,代码来源:NewController.class.php

示例10: index

 /**
  * 后台菜单首页
  * @return none
  */
 public function index()
 {
     $pid = I('get.pid', 0);
     if ($pid) {
         $data = D('Menu')->where("id={$pid}")->field(true)->find();
         $this->assign('data', $data);
     }
     $title = trim(I('get.title'));
     $type = C('CONFIG_GROUP_LIST');
     $all_menu = D('Menu')->getField('id,title');
     $map['pid'] = $pid;
     if ($title) {
         $map['title'] = array('like', "%{$title}%");
     }
     $list = D("Menu")->where($map)->field(true)->order('sort asc,id asc')->select();
     int_to_string($list, array('hide' => array(1 => L('_YES_'), 0 => L('_NOT_')), 'is_dev' => array(1 => L('_YES_'), 0 => L('_NOT_'))));
     if ($list) {
         foreach ($list as &$key) {
             if ($key['pid']) {
                 $key['up_title'] = $all_menu[$key['pid']];
             }
         }
         $this->assign('list', $list);
     }
     // 记录当前列表页的cookie
     Cookie('__forward__', $_SERVER['REQUEST_URI']);
     $this->meta_title = L('_MENU_LIST_');
     $this->display();
 }
开发者ID:terrydeng,项目名称:beimeibang1205,代码行数:33,代码来源:MenuController.class.php

示例11: index

 public function index()
 {
     $title = I('video_title');
     $map['status'] = array('egt', 0);
     $map['video_title'] = array('like', '%' . (string) $title . '%');
     $videolist = $this->lists('VideoVideo', $map);
     int_to_string($videolist);
     $this->assign('_videolist', $videolist);
     $videocount = M('VideoVideo')->where('status=1')->count();
     $this->assign('videocount', $videocount);
     $verifymap['status'] = 1;
     $verifymap['user_verify'] = 1;
     $verifycount = M('UserUser')->where($verifymap)->count();
     $this->assign('verifycount', $verifycount);
     $albummap['status'] = 1;
     $albumcount = M('VideoAlbum')->where($albummap)->count();
     $this->assign('albumcount', $albumcount);
     $usermap['status'] = 1;
     $usercount = M('UserUser')->where($usermap)->count();
     $this->assign('usercount', $usercount);
     $lines = array();
     for ($i = 8; $i--; $i > 1) {
         $time = time() - 24 * 60 * 60 * $i;
         $date = date("Y-m-d", $time);
         $map['create_time'] = array('gt', $time);
         $map['create_time'] = array('lt', time() - 24 * 60 * 60 * ($i - 1));
         $count = M('VideoVideo')->where($map)->count();
         $day['date'] = $date;
         $day['count'] = $count;
         $lines[] = $day;
     }
     $this->assign('lines', $lines);
     $this->display();
 }
开发者ID:wait121000,项目名称:zhanglubao,代码行数:34,代码来源:IndexController.class.php

示例12: index

 public function index()
 {
     //接收用户筛选信息,具体的信息看,组织查询的条件
     $map['type'] = 3;
     $map['status'] = array('gt', -1);
     //状态是没有删除的
     /* $keywords=I('keywords');
     		if($keywords){
     			$map['username|email|telephone|realname']=array('like', "%$keywords%");//这里的username是真实姓名还是平台生成的呢??这里还可以添加其他的关键词
     			$data['keywords'] = $keywords;//将本次的关键词显示到页面中去
     		}
     		$add_time_begin = I('add_time_begin');
     		$add_time_end = I('add_time_end');
     		if(!empty($add_time_begin) && !empty($add_time_end)){
     			$map['add_time'] = array(array('GT',$add_time_begin),array('LT',$add_time_end));
     			$data['add_time_begin'] = $add_time_begin;
     			$data['add_time_end'] = $add_time_end;
     		} */
     //按照条件将信息显示出来
     $result = $this->page($this->table, $map, 'add_time desc');
     //将信息中的int字段转化成文字信息
     $result = int_to_string($result);
     $data['result'] = $result;
     $this->assign($data);
     $this->display();
 }
开发者ID:976112643,项目名称:manor,代码行数:26,代码来源:LanguageLevelController.class.php

示例13: index

 public function index()
 {
     $list = $this->lists('LiveRecommend');
     int_to_string($list);
     $this->assign('_list', $list);
     $this->meta_title = '热门直播信息';
     $this->display();
 }
开发者ID:nullog,项目名称:zhanglubao,代码行数:8,代码来源:LiveRecommendController.class.php

示例14: index

 public function index()
 {
     $list = M('DrawcashList')->order('create_time desc')->select();
     int_to_string($list, array('status' => array(0 => '交易中', 1 => '交易成功', 2 => '交易失败')));
     int_to_string($list, array('state' => array('00' => '待结算', '01' => '结算中', '02' => '结算成功', '03' => '结算失败', '04' => '已撤销')));
     $this->assign('list', $list);
     $this->display();
 }
开发者ID:rainly123,项目名称:zyzm,代码行数:8,代码来源:DrawcashController.class.php

示例15: index

 public function index()
 {
     $map = ['status' => ['egt', 0]];
     $list = $this->lists($this->_table, $map, 'sort ASC');
     int_to_string($list);
     $this->assign('_list', $list);
     $this->meta_title = $this->_node_name . '信息';
     $this->display();
 }
开发者ID:torry999,项目名称:lingshi,代码行数:9,代码来源:FreshmanCategoryController.class.php


注:本文中的int_to_string函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。