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


PHP get_info函数代码示例

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


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


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