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


PHP common::redirect方法代码示例

本文整理汇总了PHP中common::redirect方法的典型用法代码示例。如果您正苦于以下问题:PHP common::redirect方法的具体用法?PHP common::redirect怎么用?PHP common::redirect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在common的用法示例。


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

示例1: edit_user

 function edit_user($user_id = '')
 {
     if (!common::update_permit()) {
         common::redirect();
     }
     if ($_POST['save']) {
         if ($this->form_validation->run('valid_user')) {
             $this->mod_user->update_user();
             //Don't Change
             $this->session->set_flashdata('msg', 'Content Updated Successfully!');
             redirect('user');
         }
     }
     $id = $user_id;
     if ($id == '') {
         redirect('user');
     }
     $data = sql::row("scic_user", "id={$id}");
     $this->session->set_userdata('edit_user_id', $data['id']);
     //Don't Change
     $data['nav_array'] = array(array('title' => 'Manage Users', 'url' => site_url('user')), array('title' => 'Add New User', 'url' => ''));
     $data['dir'] = 'user';
     $data['action'] = 'user/edit_user/' . $user_id;
     $data['page'] = 'user_form';
     //Don't Change
     $data['page_title'] = 'Edit User';
     $this->load->view('main', $data);
 }
开发者ID:joyes974,项目名称:Employee-Testing-System,代码行数:28,代码来源:user.php

示例2: evaluate_third

 function evaluate_third($user_id = '')
 {
     if (!common::update_permit()) {
         common::redirect();
     }
     $id = $user_id;
     if ($_POST['save']) {
         if ($this->form_validation->run('valid_third')) {
             $this->mod_result->update_third_marks($id);
             //Don't Change
             $this->session->set_flashdata('msg', 'Third Part Evaluated Successfully!');
             $check = sql::row("scic_result", "user_id={$id}");
             if ($check['general'] != -1 && $check['third_part'] != -1 && $check['notification'] == 0) {
                 $this->mod_result->sendEmail($id);
             }
             redirect('result');
         }
     }
     if ($id == '') {
         redirect('result');
     }
     $data = sql::row("scic_result", "user_id={$id}");
     //$this->session->set_userdata('edit_user_id', $data['id']); //Don't Change
     $data['nav_array'] = array(array('title' => 'Manage Results', 'url' => site_url('result')), array('title' => 'Evaluate Third Part', 'url' => ''));
     $data['question'] = $this->mod_result->get_third();
     $data['answer'] = $this->mod_result->get_third_answer($id);
     $data['dir'] = 'result';
     $data['action'] = 'result/evaluate_third/' . $user_id;
     $data['page'] = 'third_form';
     //Don't Change
     $data['page_title'] = 'Evaluation';
     $this->load->view('main', $data);
 }
开发者ID:joyes974,项目名称:Employee-Testing-System,代码行数:33,代码来源:result.php

示例3: is_admin

 function is_admin()
 {
     $CI =& get_instance();
     if ($CI->session->userdata('logged_in') && $CI->session->userdata('user_name') == 'admin') {
         return true;
     } else {
         common::redirect();
     }
 }
开发者ID:joyes974,项目名称:Employee-Testing-System,代码行数:9,代码来源:common_helper.php

示例4: add_url

 function add_url()
 {
     if (!common::add_permit()) {
         common::redirect();
     }
     if ($_POST['save']) {
         if ($this->form_validation->run('add_url')) {
             if ($this->shorturl_model->add_url()) {
                 $this->session->set_flashdata('msg', 'Url Added Successfully!!!');
                 redirect('shorturl');
             }
         }
     }
     $data['msg'] = $this->session->flashdata('msg');
     $data['dir'] = 'shorturl';
     $data['page'] = 'add_url';
     $this->load->view('main', $data);
 }
开发者ID:joyes974,项目名称:Employee-Testing-System,代码行数:18,代码来源:shorturl.php

示例5: new_question

 function new_question()
 {
     if (!common::add_permit()) {
         common::redirect();
     }
     if ($_POST['save']) {
         if ($this->form_validation->run('new_question')) {
             if ($this->question_model->add_question()) {
                 $this->session->set_flashdata('msg', 'Question Added Successfully!!!');
                 redirect('question');
             }
         }
     }
     $data['msg'] = $this->session->flashdata('msg');
     $data['action'] = 'question/new_question';
     $data['dir'] = 'shorturl';
     $data['page'] = 'add_url';
     $data['page_title'] = 'Add Questions';
     $this->load->view('main', $data);
 }
开发者ID:joyes974,项目名称:Employee-Testing-System,代码行数:20,代码来源:question.php


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