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

PHP get_info函数代码示例

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

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



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

示例1: download

 public function download($bid = -1)
 {
     //准备试卷基本信息
     $Bank = D('Bankview');
     $bank = $Bank->find($bid);
     $Exam = D('Examview');
     $exam = $Exam->where('cid=' . "'" . $bank['cid'] . "'")->find();
     $path = './Uploads/' . $bank['cid'] . '/' . $bank['tid'] . '/' . $bank['savename'];
     $filename = $bank['id'] . '_' . $exam['coursename'] . '_' . $bank['teachername'] . '.pdf';
     $Course = D('Course');
     $course = $Course->find($bank['cid']);
     //判断考试班级是否修改过
     $classname = '';
     if ($course['classlist'] != '') {
         $classname = $course['classlist'];
     } else {
         $classname = $exam['classname'];
     }
     $school = get_info('INFO_SCHOOL');
     $year = get_info('INFO_YEAR');
     $term = get_info('INFO_TERM');
     $type = get_info('INFO_TYPE');
     //修改试卷
     Vendor('Classes.TCPDF.PDF');
     $pdf = new PDF();
     $pdf->edit($path, $filename, $school, $bank['teachername'], '', $exam['systemname'], $year, $term, $type, $exam['coursename'], $classname, $course['type']);
 }
开发者ID:vimalmistry,项目名称:Exam,代码行数:27,代码来源:ExamAction.class.php


示例2: index

 /**
  *用户修改昵称
  *	用户在个人中心可以修改自己的昵称
  *流程分析
  *	判断用户新昵称和旧昵称是否一致
  *	将新昵称写入数据库
  **/
 public function index()
 {
     $home_member_id = session('home_member_id');
     $member_info = get_info($this->table, array('id' => $home_member_id));
     if (IS_POST) {
         $nickname = I('nickname');
         if ($member_info['nickname'] == $nickname) {
             $this->error('您的昵称未作修改!');
         }
         unset($_POST);
         $_POST['id'] = session('home_member_id');
         $_POST['nickname'] = $nickname;
         $result = update_data($this->table);
         if (is_numeric($result)) {
             session('nickname', $_POST['nickname']);
             //更新缓存
             $this->success('修改成功!', U('User/UpdateName/index'), $ajax);
         } else {
             $this->error('修改失败,请联系客服!', U('User/UpdateName/index'), $ajax);
         }
     } else {
         $data['member_info'] = $member_info;
         $this->assign($data);
         $this->display();
     }
 }
开发者ID:976112643,项目名称:manor,代码行数:33,代码来源:UpdateNameController.class.php


示例3: select_information_pdf3

 public function select_information_pdf3($id)
 {
     $data = get_info($id);
     $this->load->view('employee/select/header');
     $this->load->view('employee/select/information/list3', $data);
     $this->load->view('footer');
 }
开发者ID:ittiwat,项目名称:dpf_project,代码行数:7,代码来源:report.php


示例4: login

 public function login()
 {
     if (IS_POST) {
         $code = I('post.code');
         $code_check = $this->check_verify($code);
         if ($code_check != 1) {
             $this->error('验证码不正确');
         }
         $username = I('post.username');
         $password = I('post.password');
         $password = md5(md5($password));
         $info = get_info(D('Common/MemberView'), array('username' => $username, 'password' => $password));
         if ($info['is_admin'] != 1) {
             $this->error("管理员帐号不存在");
         }
         if ($info['member_status'] != 1) {
             $this->error("管理员帐号已被禁用或删除");
         }
         if ($info) {
             if ($info['member_rules']) {
                 $info['rules'] .= ',' . $info['member_rules'];
             }
             $info['rules'] = implode(',', array_unique(explode(',', $info['rules'])));
             session('rules', $info['rules']);
             session('username', $info['username']);
             session('member_id', $info['member_id']);
             action_log('member', $info['member_id'], 'id,username as title');
             $this->success('登录成功', __ROOT__ . "/Backend");
         } else {
             $this->error('用户名或密码错误');
         }
     } else {
         header("location:" . __ROOT__ . "/Backend");
     }
 }
开发者ID:976112643,项目名称:manor,代码行数:35,代码来源:PublicController.class.php


示例5: index

 /**
  *帮助中心主页
  *	显示关于N邦的帮助文章
  *流程分析
  *	1、将页面中的菜单查询出来并显示
  *	2、要求是用户在后台添加的时候前台能够自动显示出来菜单并显示到页面中
  **/
 public function index()
 {
     $article_id = I('id');
     /* 获取分类列表 */
     $help_category_cath = array_id_key(get_help_category_cache());
     $category_ids = array();
     foreach ($help_category_cath as $row) {
         $category_ids[] = $row['id'];
     }
     /* 获取分类下的所有文章 */
     $map = null;
     $map['status'] = 1;
     $map['category_id'] = array('in', $category_ids);
     $articles = get_result($this->table, $map);
     /* 获去当前显示的文章 */
     if ($article_id) {
         $map['id'] = $article_id;
         $map['status'] = 1;
         $cur_article = get_info($this->table, $map);
     } else {
         $cur_article = $articles[0];
     }
     $data['help_category_cath'] = $help_category_cath;
     $data['articles'] = $articles;
     $data['cur_article'] = $cur_article;
     $this->assign($data);
     $this->display();
 }
开发者ID:976112643,项目名称:manor,代码行数:35,代码来源:HelpController.class.php


示例6: update

 public function update()
 {
     if (IS_POST) {
         $id = intval(I('post.id'));
         $url = I('post.url');
         $rules = array(array('title', 'require', '菜单名称必须!'));
         /*
          * 计算level等级
          * */
         $pid = intval(I('post.pid'));
         $level = 0;
         $_POST['path'] = '-0-';
         if ($pid > 0) {
             $parent_info = get_info($this->table, array('id' => $pid), array('level,path'));
             if ($parent_info) {
                 $level = $parent_info['level'] + 1;
                 $_POST['path'] = $parent_info['path'] . $pid . '-';
             }
         }
         $_POST['level'] = $level;
         $_POST['type'] = $this->type;
         $result = update_data($this->table, $rules);
         F($cache_name, null);
         if (is_numeric($result)) {
             /*修改数据后清空缓存数据*/
             F($this->cache_data, NULL);
             F($this->cache_name, NULL);
             $this->success('操作成功', U('index', array('pid' => intval(I('post.pid')))));
         } else {
             $this->error($result);
         }
     } else {
         $this->success('违法操作', U('index'));
     }
 }
开发者ID:976112643,项目名称:manor,代码行数:35,代码来源:AreaController.class.php


示例7: index

 public function index($product_id, $Month = '', $moudel = '')
 {
     if (!$product_id) {
         $product_id = 0;
     }
     $map['product_id'] = $product_id;
     $result = get_result('product_price', $map);
     if ($Month) {
         $Montht = $Month;
     } else {
         $Montht = date('Y-m-d');
     }
     $Monthts = date('t', strtotime($Montht));
     foreach ($result as $k => $row) {
         $data[] = array('id' => $row['id'], 'title' => $row['type1_price'], 'start' => date('Y-m-d', $row['day']), 'name' => date('Y-m-d H:i', $row['day']), 'textColor' => '#0FDECF');
     }
     for ($im = 1; $im <= $Monthts; $im++) {
         $map['day'] = strtotime(date('Y-m-d', $row['day']));
         $description_info = get_info('product_description', $map);
         if ($description_info) {
             $data[] = array('id' => $description_info['id'], 'title' => $row['type1_price'], 'start' => date('Y-m-d', $description_info['day']), 'name' => date('Y-m-d H:i', $description_info['day']), 'textColor' => '#0FDECF');
         } else {
             $data[] = array('id' => '0', 'title' => '设定价格', 'start' => date('Y-m', strtotime($Montht)) . "-" . $im, 'name' => date('Y-m', strtotime($Montht)) . "-" . $im, 'textColor' => '#0FDECF');
         }
     }
     $datas['data'] = json_encode($data);
     $this->assign($map);
     $this->assign($datas);
     $this->display(T('Common@Widget/ProductPrice/index'));
 }
开发者ID:jkzleond,项目名称:alhelp_api,代码行数:30,代码来源:ProductPriceWidget.class.php


示例8: index

 public function index()
 {
     $this->school = get_info('INFO_SCHOOL');
     $this->year = get_info('INFO_YEAR');
     $this->term = get_info('INFO_TERM');
     $this->type = get_info('INFO_TYPE');
     $this->display();
 }
开发者ID:vimalmistry,项目名称:Exam,代码行数:8,代码来源:InfoAction.class.php


示例9: getFile

 private function getFile($id)
 {
     if (empty($id)) {
         return false;
     }
     $map['table_id'] = $id;
     $map['table'] = 'information';
     return get_info('attachments', $map);
 }
开发者ID:jkzleond,项目名称:alhelp_api,代码行数:9,代码来源:InformationModel.class.php


示例10: sc_anteup_bar

 function sc_anteup_bar($parm = '')
 {
     $goal = e107::pref('anteup', 'anteup_goal');
     // fix for PHP < 5.5
     $goal = !empty($goal) ? $goal : 0;
     $current = get_info("current");
     $percent = round($current / $goal * 100, 0);
     return "<div class='progress'>\n\t<div class='progress-bar' role='progressbar' aria-valuenow='" . $percent . "' aria-valuemin='0' aria-valuemax='100' style='width:" . $percent . "%'>\n\t\t<span class='sr-only'>" . $percent . "% donated</span>\n\t</div>\n</div>";
 }
开发者ID:gitter-badger,项目名称:anteup,代码行数:9,代码来源:anteup_shortcodes.php


示例11: edit

 public function edit()
 {
     if (IS_POST) {
         $this->update();
     } else {
         $id = intval(I('id'));
         $map['id'] = $id;
         $data['info'] = get_info($this->table, $map);
         $data['pid'] = $data['info']['pid'];
         $this->assign($data);
         $this->display('operate');
     }
 }
开发者ID:976112643,项目名称:manor,代码行数:13,代码来源:BottomController.class.php


示例12: index

 public function index()
 {
     if (session('member_id')) {
         $_init = A("Backend/Base/Admin");
         $_init->_initialize;
         $this->meta_title = '首页';
         $map = array('level' => 1, 'status' => 1);
         //$map['id']=array('in','权限');//出错了,可能就需要把权限放进去
         $info = get_info('menu', $map, 'url');
         $this->redirect($info['url']);
     } else {
         $this->display();
     }
 }
开发者ID:976112643,项目名称:manor,代码行数:14,代码来源:IndexController.class.php


示例13: edit

 public function edit()
 {
     if (IS_POST) {
         $_POST['update_member_id'] = session("member_id");
         $this->update();
     } else {
         $id = intval(I('id'));
         $info = get_info($this->table, array('id' => $id));
         $info['content'] = replaceStrImg($info['content']);
         $this->assign('info', $info);
         $this->assign("meta_title", "修改");
         $this->display('operate');
     }
 }
开发者ID:976112643,项目名称:manor,代码行数:14,代码来源:IndexController.class.php


示例14: find_selected_page

function find_selected_page()
{
    global $table1;
    global $table2;
    if (isset($_GET["info"])) {
        $table1 = get_info($_GET['info']);
        $table2 = NULL;
    } else {
        if (isset($_GET["page"])) {
            $table2 = get_page($_GET['page']);
            $table1 = NULL;
        } else {
            $table1 = NULL;
            $table2 = NULL;
        }
    }
}
开发者ID:bharathrangaraj,项目名称:cms-php,代码行数:17,代码来源:functions.php


示例15: detail

 /**
  * 查看订单详情
  * @author						李东
  * @date						2015-06-23
  */
 public function detail()
 {
     $order_id = I('get.id');
     if (!$order_id) {
         $this->error('错误操作');
     }
     $map['order_id'] = $order_id;
     $order_info = get_info(D($this->model), $map);
     $map = array();
     $map['order_id'] = $order_id;
     $order_result = get_result('order_history', $map);
     // 		print_r($order_info);
     // 		exit;
     $data['info'] = $order_info;
     $data['result'] = $order_result;
     $this->assign($data);
     $this->display();
 }
开发者ID:976112643,项目名称:manor,代码行数:23,代码来源:ExpiredController.class.php


示例16: notice

 /**
  *系统公告
  *	也就是系统中的帮助中心
  *@author 刘浩 <372980503>
  *@time 2015-7-8
  **/
 public function notice()
 {
     //接收新闻信息
     $notice_id = I('id');
     $map['id'] = $news_id;
     $notice_info = get_info($this->table, $map);
     $data['news_detail'] = $notice_info;
     //将推荐的公告查询出来
     $map_notice['status'] = array('GT', 0);
     $map_notice['type'] = 'notice';
     $map_notice['recommend'] = 1;
     //被推荐的公告
     //查询出来
     $notice_result = get_result($this->table, $map_notice);
     //增加阅读次数
     $data['notice'] = $notice_result;
     $this->assign($data);
     $this->display();
 }
开发者ID:976112643,项目名称:manor,代码行数:25,代码来源:CeshiController.class.php


示例17: del

 /**
  *鐓х墖鎴栬棰慳jax鍒犻櫎
  *@author 鍒樻旦  <[email protected]>
  *@time 2015-07-07
  **/
 public function del()
 {
     if (session('home_shop_id')) {
         $resource_id = I('resources');
         //鏌ヨ璁板綍
         $resource_info = get_info($this->table, array('id' => $resource_id));
         //鍒犻櫎璁板綍
         $result = delete_data($this->table, array('id' => $resource_id));
         if ($result) {
             //鍒犻櫎鐪熸鐨勬枃浠�
             unlink($resource_info['img_path']);
             //鍒犻櫎鐪熺殑鏂囦欢
             $this->ajaxReturn(array('status' => 1, 'info' => '鍒犻櫎鎴愬姛锛侊紒'));
         } else {
             $this->ajaxReturn(array('status' => 0, 'info' => '鍒犻櫎澶辫触锛侊紒'));
         }
     } else {
         $this->ajaxReturn(array('status' => 0, 'info' => '闈炴硶鎿嶄綔锛�'));
     }
 }
开发者ID:976112643,项目名称:manor,代码行数:25,代码来源:CeshiController.class.php


示例18: index

 public function index($config, $id)
 {
     $default_config = array('index' => 1, 'table' => '', 'table_id' => 'id', 'name' => '', 'multi' => 'false', 'val_key' => 'image', 'btn_val' => '上传图片', 'tpl' => 'index');
     $last_config = array_merge($default_config, $config);
     $data['config'] = $last_config;
     if ($last_config['table'] == '') {
         $this->error("请设置参数table");
     }
     if ($last_config['name'] == '') {
         $this->error("请设置参数name");
     }
     if ($config['multi'] != "true") {
         $info = get_info($last_config['table'], array($last_config['table_id'] => $id), $last_config['val_key']);
         $first = array_keys($info);
         $data['info'] = $info[$first[0]];
     }
     $data['id'] = $id;
     $this->assign($data);
     $this->display(T("Common@Img/" . $last_config['tpl']));
 }
开发者ID:976112643,项目名称:manor,代码行数:20,代码来源:ImgWidget.class.php


示例19: refund_drawals

 /**
  * 提现退款
  * 给用户账户退款
  * 更新记录状态
  * 更新用户资金记录
  * @author				李东
  * @date				2015-08-08
  */
 public function refund_drawals()
 {
     if (IS_GET) {
         $id = I('get.record_id');
         $record_info = get_info($this->table, array('id' => $id));
         if ($record_info['status'] == 0 || !empty($record_info)) {
             $user_info = get_info('member', array('id' => $record_info['from_member_id']));
             /* 开启事务 */
             $Model = M();
             $Model->startTrans();
             /* 给提现用户退款 */
             $_POST = array('id' => $record_info['from_member_id'], 'withdrawals' => $user_info['withdrawals'] - $record_info['money']);
             $res = update_data('member');
             /* 更改记录状态 */
             // 				$_POST = array(
             // 						'id'=>$id,
             // 						'status'=>'2',
             // 				);
             // 				$res2 = update_data($this->table);
             /*更新用户资金记录*/
             $_POST = array('type' => '5', 'frozen' => '2', 'status' => '4', 'member_id' => $record_info['from_member_id'], 'money' => -$record_info['money'], 'description' => '提现退款', 'order_num' => $record_info['order_num']);
             $res3 = update_data($this->table);
             if (is_numeric($res) && is_numeric($res3)) {
                 $Model->commit();
                 $this->success('操作成功');
             } else {
                 $Model->rollback();
                 $this->error('操作失败');
             }
         } elseif ($record_info['status'] == 1) {
             $this->error('已支付');
         } elseif ($record_info['status'] == 2) {
             $this->error('此订单已退款');
         } else {
             $this->error('订单不存在');
         }
     } else {
         $this->error('请求错误');
     }
 }
开发者ID:976112643,项目名称:manor,代码行数:48,代码来源:BalanceController.class.php


示例20: ajaxDelete_config

 public function ajaxDelete_config()
 {
     $posts = I("post.");
     $info = get_info($this->table, array("id" => $posts['id']));
     $path = $info['value'];
     $_POST = null;
     if (file_exists($path)) {
         if (@unlink($path)) {
             $_POST['id'] = $posts['id'];
             $_POST['value'] = '';
             update_data($this->table, array("id" => $posts['id']));
             $this->success("删除成功");
         } else {
             $this->error("删除失败");
         }
     } else {
         $_POST['id'] = $posts['id'];
         $_POST['value'] = '';
         update_data($this->table, array("id" => $posts['id']));
         $this->success("文件不存在,删除失败,数据被删除");
     }
 }
开发者ID:976112643,项目名称:manor,代码行数:22,代码来源:SetController.class.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP get_ini函数代码示例发布时间:2022-05-15
下一篇:
PHP get_index_url函数代码示例发布时间: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