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


PHP URL::Redirect方法代码示例

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


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

示例1: _getList

 protected function _getList($page = 1)
 {
     $this->_resetList();
     $param = array('page' => $page, 'limit' => $this->_limit(), 'order' => $this->_order(), 'filter' => $this->_getFilter());
     if ($this->post['act']) {
         URL::Redirect('jadwal');
     }
     $respon = $this->model->SelectGrid($param);
     return $respon;
 }
开发者ID:ahmdzakir,项目名称:ketonggo-simlibrary,代码行数:10,代码来源:Jadwal.php

示例2: _getList

 protected function _getList($page = 1)
 {
     $this->_resetList();
     $param = array('page' => $page, 'limit' => $this->_limit(), 'order' => $this->_order(), 'filter' => $this->_getFilter());
     if ($this->post['act']) {
         if ($this->data['add_param']) {
             $add_param = '/' . $this->data['add_param'];
         }
         URL::Redirect(str_replace("/index{$add_param}/{$page}", "/index{$add_param}", URL::FullUri()));
     }
     $respon = $this->model->SelectGrid($param);
     return $respon;
 }
开发者ID:ahmdzakir,项目名称:ketonggo-simlibrary,代码行数:13,代码来源:_visitorController.php

示例3: _actionIndex

 function _actionIndex($halaman = '')
 {
     $this->_setHalaman($halaman);
     if ($this->post['act'] == 'reset') {
         URL::Redirect();
     }
     $this->data['row'] = $this->model->GetByHalaman($halaman);
     $id = $this->data['row'][$this->pk];
     if (!$this->data['row'] && $id) {
         $this->NoData();
     }
     $this->View($this->viewdetail);
 }
开发者ID:ahmdzakir,项目名称:ketonggo-simlibrary,代码行数:13,代码来源:Pagedetail.php

示例4: _actionIndex

 function _actionIndex($page = 1)
 {
     if ($this->post['act'] == 'loginas') {
         $return = $this->auth->LoginAs($this->post['username']);
         if ($return['success']) {
             URL::Redirect('panelbackend');
         } else {
             $this->SetFlash('err_msg', "Login As Gagal !");
             URL::Redirect("{$this->page_ctrl}/index");
         }
     }
     parent::_actionIndex($page);
 }
开发者ID:arip33,项目名称:simlibrary,代码行数:13,代码来源:Loginas.php

示例5: isValid

 function isValid($record)
 {
     $rules = array(array('field' => 'nm_pasien', 'label' => 'Nama', 'rules' => 'required'), array('field' => 'alm_pasien', 'label' => 'Alamat', 'rules' => 'required'), array('field' => 'telp_pasien', 'label' => 'No. Telp.', 'rules' => 'required'), array('field' => 'komentar', 'label' => 'Kritik dan Saran', 'rules' => 'required'), array('field' => 'telp_pasien', 'label' => 'No. Telp.', 'rules' => 'phone'));
     $validation = new FormValidation($rules);
     $error_msg = '';
     if ($validation->run() == FALSE) {
         $error_msg .= $validation->GetError();
     }
     if ($error_msg) {
         $this->SetFlash('row_komentar', $record);
         $this->SetFlash('err_msg', $error_msg);
         URL::Redirect('#kritiksaran');
         exit;
     }
 }
开发者ID:arip33,项目名称:elearning,代码行数:15,代码来源:Home.php

示例6: _actionEdit

 function _actionEdit($id = null)
 {
     if ($this->post['act'] == 'reset') {
         URL::Redirect();
     }
     $this->data['row'] = $this->model->GetByPk($id);
     $id_member = $this->data['row']['id_member'];
     if (!$this->data['row'] && $id) {
         $this->NoData();
     }
     ## EDIT HERE ##
     if ($this->post['act'] === 'save') {
         $id_member = $record['id_member'] = $this->post['id_member'];
         $record['tgl_pinjam'] = $this->post['tgl_pinjam'];
         $record['tgl_kembali'] = $this->post['tgl_kembali'];
         $record['jaminan'] = $this->post['jaminan'];
         $record['kode_jaminan'] = $this->post['kode_jaminan'];
         $this->setLogRecord($record, $id);
         if ($id) {
             $return = $this->model->Update($record, "{$this->pk} = {$id}");
             if ($return) {
                 $this->SetFlash('suc_msg', $return['success']);
                 URL::Redirect("{$this->page_ctrl}/edit/{$id}");
             } else {
                 $this->data['row'] = $record;
                 $this->data['err_msg'] = "Data gagal diubah";
             }
         } else {
             $return = $this->model->Insert($record);
             if ($return) {
                 $this->SetFlash('suc_msg', $return['success']);
                 URL::Redirect("{$this->page_ctrl}/edit/" . $return['data'][$this->pk]);
             } else {
                 $this->data['row'] = $record;
                 $this->data['err_msg'] = "Data gagal disimpan";
             }
         }
     }
     if ($id_member) {
         $modelmember = new MemberModel();
         $this->data['row']['member'] = array('id' => $id_member, 'label' => $modelmember->GOne("nama", "where id_member = '{$id_member}'"));
     }
     $this->View($this->viewdetail);
 }
开发者ID:arip33,项目名称:simlibrary,代码行数:44,代码来源:Pinjam.php

示例7: _actionIndex

 public function _actionIndex($page = 1)
 {
     if ($this->post['act'] == 'goaksi') {
         $user_id_str = "'" . implode("','", $this->post['user']) . "'";
         switch ($this->post['jenisaksi']) {
             case 'aktif':
                 $return = $this->model->Execute("update public_sys_user set is_active = '1' where user_id in ({$user_id_str})");
                 break;
             case 'unaktif':
                 $return = $this->model->Execute("update public_sys_user set is_active = '0' where user_id in ({$user_id_str})");
                 break;
         }
         if ($return) {
             $this->SetFlash('suc_msg', "Data berhasil disimpan");
         } else {
             $this->SetFlash('err_msg', "Data gagal disimpan");
         }
         URL::Redirect($this->page_ctrl);
     }
     parent::_actionIndex($page);
 }
开发者ID:arip33,项目名称:simlibrary,代码行数:21,代码来源:SysUser.php

示例8: _actionEdit

 function _actionEdit($halaman = '', $id = null)
 {
     $this->_setHalaman($halaman);
     if ($this->post['act'] == 'reset') {
         URL::Redirect();
     }
     $this->data['row'] = $this->model->GetByHalaman($halaman);
     $id = $this->data['row'][$this->pk];
     if (!$this->data['row'] && $id) {
         $this->NoData();
     }
     ## EDIT HERE ##
     if ($this->post['act'] === 'save') {
         $record = array();
         $record['nama'] = $this->post['nama'];
         $record['isi'] = $this->post['isi'];
         $record['halaman'] = $halaman;
         $this->setLogRecord($record, $id);
         if ($id) {
             $return = $this->model->Update($record, "halaman = '{$halaman}'");
             if ($return) {
                 $this->SetFlash('suc_msg', $return['success']);
                 URL::Redirect("{$this->page_ctrl}/edit/{$halaman}");
             } else {
                 $this->data['row'] = $record;
                 $this->data['err_msg'] = "Data gagal diubah";
             }
         } else {
             $return = $this->model->Insert($record);
             if ($return) {
                 $this->SetFlash('suc_msg', $return['success']);
                 URL::Redirect("{$this->page_ctrl}/edit/{$halaman}");
             } else {
                 $this->data['row'] = $record;
                 $this->data['err_msg'] = "Data gagal disimpan";
             }
         }
     }
     $this->View($this->viewdetail);
 }
开发者ID:ahmdzakir,项目名称:ketonggo-simlibrary,代码行数:40,代码来源:Pageone.php

示例9: _actionEdit

 function _actionEdit($id = null)
 {
     if ($this->post['act'] == 'reset') {
         URL::Redirect();
     }
     $this->data['row'] = $this->model->GetByPk($id);
     if (!$this->data['row'] && $id) {
         $this->NoData();
     }
     ## EDIT HERE ##
     if ($this->post['act'] === 'save') {
         $record = array();
         $record['nama'] = $this->post['nama'];
         $record['alamat'] = $this->post['alamat'];
         $record['no_identitas'] = $this->post['no_identitas'];
         $record['no_hp'] = $this->post['no_hp'];
         $record['email'] = $this->post['email'];
         $this->setLogRecord($record, $id);
         if ($id) {
             $return = $this->model->Update($record, "{$this->pk} = {$id}");
             if ($return) {
                 $this->SetFlash('suc_msg', $return['success']);
                 URL::Redirect("{$this->page_ctrl}/edit/{$id}");
             } else {
                 $this->data['row'] = $record;
                 $this->data['err_msg'] = "Data gagal diubah";
             }
         } else {
             $return = $this->model->Insert($record);
             if ($return) {
                 $this->SetFlash('suc_msg', $return['success']);
                 URL::Redirect("{$this->page_ctrl}/edit/" . $return['data'][$this->pk]);
             } else {
                 $this->data['row'] = $record;
                 $this->data['err_msg'] = "Data gagal disimpan";
             }
         }
     }
     $this->View($this->viewdetail);
 }
开发者ID:arip33,项目名称:simlibrary,代码行数:40,代码来源:Member.php

示例10: _actionProfile

 function _actionProfile()
 {
     $this->data['page_title'] = 'Profile';
     $this->model = new SysUserModel();
     $id = $_SESSION[SESSION_APP]['user_id'];
     $this->data['edited'] = true;
     $this->data['row'] = $this->model->GetByPk($id);
     if (!$this->data['row'] && $id) {
         $this->NoData();
     }
     ## EDIT HERE ##
     if ($this->post['act'] === 'save') {
         $valid = $this->_isValidProfile();
         if (!$valid) {
             $this->View('panelbackend/profile');
             return;
         }
         $record = array();
         $record['username'] = $this->post['username'];
         $record['name'] = $this->post['name'];
         if (!empty($this->post['password'])) {
             $record['password'] = sha1(md5($this->post['password']));
         }
         $this->setLogRecord($record, $id);
         if ($id) {
             $return = $this->model->Update($record, "user_id = {$id}");
             if ($return) {
                 $this->SetFlash('suc_msg', $return['success']);
                 URL::Redirect("panelbackend/home/profile");
             } else {
                 $this->data['row'] = $record;
                 $this->data['err_msg'] = "Data gagal diubah";
             }
         }
     }
     $this->View('panelbackend/profile');
 }
开发者ID:arip33,项目名称:simlibrary,代码行数:37,代码来源:Home.php

示例11: _actionLogout

 function _actionLogout()
 {
     $_SESSION[SESSION_APP]['login'] = false;
     unset($_SESSION[SESSION_APP]);
     URL::Redirect('panelbackend');
 }
开发者ID:arip33,项目名称:elearning,代码行数:6,代码来源:Login.php

示例12: _actionDelete

 public function _actionDelete($id = null)
 {
     $retrun = $this->_addDelete($id);
     if ($retrun) {
         $return = $this->model->delete("{$this->pk} = {$id}");
     }
     if ($return) {
         $this->SetFlash('suc_msg', $return['success']);
         URL::Redirect("{$this->page_ctrl}");
     } else {
         $this->SetFlash('err_msg', "Data gagal didelete");
         URL::Redirect("{$this->page_ctrl}/detail/{$id}");
     }
 }
开发者ID:arip33,项目名称:elearning,代码行数:14,代码来源:_adminController.php

示例13: _actionDelete

 function _actionDelete($halaman, $id = null)
 {
     $this->_setHalaman($halaman);
     $return = $this->model->delete("{$this->pk} = {$id}");
     if ($return) {
         $this->SetFlash('suc_msg', $return['success']);
         URL::Redirect("{$this->page_ctrl}/index/{$halaman}");
     } else {
         $this->SetFlash('err_msg', "Data gagal didelete");
         URL::Redirect("{$this->page_ctrl}/detail/{$halaman}/{$id}");
     }
 }
开发者ID:ahmdzakir,项目名称:ketonggo-simlibrary,代码行数:12,代码来源:Page.php

示例14: _actionDeleteFile

 function _actionDeleteFile($id_buku)
 {
     $return = $this->modelfile->delete("id_buku = {$id_buku}");
     if ($return) {
         $this->model->update(array('nama_file' => ''), "id_buku = {$id_buku}");
         $this->SetFlash('suc_msg', $return['success']);
     } else {
         $this->SetFlash('err_msg', "Data gagal didelete");
     }
     URL::Redirect("{$this->page_ctrl}/edit/{$id_buku}");
 }
开发者ID:arip33,项目名称:simlibrary,代码行数:11,代码来源:Buku.php


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