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


PHP index_page函数代码示例

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


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

示例1: index

 public function index()
 {
     $data = $this->common->setConfig($this->common->configs, array('global.css'), array($this->common->js, 'global.js', 'validateMyForm/jquery.validateMyForm.1.0.js'));
     $key = $this->input->post('keyword');
     //查询的名字
     $url = 'user/index';
     $default = array('page', 'keyword');
     $url_data = $this->uri->uri_to_assoc(3, $default);
     $keyword = $key ? $key : urldecode($url_data['keyword']);
     $url = base_url(index_page() . '/' . $url);
     //配置组装URL完成
     if ($keyword) {
         //判断是否是搜索
         $url .= '/keyword/' . $keyword;
     }
     $url .= '/page/';
     $this->load->library('pagination');
     //加载分页
     $rows = $this->user->count_user($keyword);
     //有搜索的时候总数据个数
     $segment = intval(array_search('page', $this->uri->segment_array()) + 1);
     //url的截取片段
     $config = $this->common->pageConfig($url, $rows, 15, $segment);
     //分页配置
     $this->pagination->initialize($config);
     //分页可以输出
     //分页数据
     $data['user_list'] = $this->user->user_list($keyword, $config['per_page'], $this->uri->segment($config['uri_segment']));
     //分页后的数据
     $data['keyword'] = $keyword;
     $this->load->view('user/index', $data);
 }
开发者ID:chentaoz,项目名称:TourismWeb,代码行数:32,代码来源:user.php

示例2: shop_cancel

 function shop_cancel()
 {
     $this->session->unset_userdata('ID');
     $this->session->unset_userdata('orderID');
     $this->cart->destroy();
     redirect(base_url() . index_page() . 'index.html');
 }
开发者ID:quachvancam,项目名称:sugardating,代码行数:7,代码来源:paypal.php

示例3: open

	/**
	 * /fullscreen/open/$CompId/
	 * Parameter: $CompId - the ID of the composition being viewed.
	 * Displays a full sized composition in a new window, with the correct position and background properties.
	 */
	function open($CompId) {
		//Required Models
		$this->load->model('Projects_model');
		//Page Data
		$data['comp'] = $this->Comp_model->GetComp($CompId);
		//Permissions?
		if (!$this->Projects_model->GetPermission($_SESSION['userid'], $data['comp']['ProjectId']) && $_SESSION['userrole'] != '-1') {
			//Go back to the dashboard
			redirect(base_url().index_page().'admin');
		}
		//Page Title
		$data['pagename'] = $data['comp']['CompName'];
		//No need for Highlighted Tab, because we aren't showing the header this time.
		//No need for sidebar menu either.
		//Do we need to load a different revision?
		
		$RevisionId = $this->uri->segment(4);
		if ($RevisionId != null) {
			$revision = $this->Comp_model->GetRevision($RevisionId);
			if ($revision['CompId'] == $CompId) {
				foreach($revision as $key => $value) {
					$data['comp'][$key] = $value;	
				}
			}
		}
		$data['site_title'] = $this->Settings_model->GetSetting("Site Title");
		$this->load->view('fullscreen_view', $data);
	}
开发者ID:rtraction,项目名称:Compost,代码行数:33,代码来源:fullscreen.php

示例4: admin_side_menu

 function admin_side_menu($menu_array, $children = FALSE)
 {
     $CI =& get_instance();
     $CI->load->library('ion_auth');
     $current_lang = $CI->lang->lang();
     $user_id = $CI->ion_auth->get_user_id();
     $admin_group = $CI->ion_auth->get_users_groups($user_id)->result();
     echo $children ? '<ul class="treeview-menu">' : '';
     foreach ($menu_array as $item) {
         $item['access'] = array_key_exists('access', $item) ? $item['access'] : $admin_group;
         if ($CI->ion_auth->in_group($item['access'])) {
             echo $children ? '' : '<li class="treeview">';
             if ($children) {
                 echo '<li><a href="' . site_url($current_lang . '/admin' . index_page() . '/' . $item['url']) . '" class="page_link"><i class="fa fa-circle-o"></i> ' . $item['title'] . '</a></li>';
             } else {
                 echo '<a href="' . site_url($current_lang . '/admin' . index_page() . '/' . $item['url']) . '" class="' . ($item['url'] ? 'page_link' : '') . '"><i class="' . $item['icon'] . '"></i> <span>' . $item['title'] . '</span> <i class="fa fa-angle-left pull-right"></i></a>';
             }
             if (array_key_exists('children', $item)) {
                 admin_side_menu($item['children'], TRUE);
             }
             echo $children ? '' : '</li>';
         }
     }
     echo $children ? '</ul>' : '';
 }
开发者ID:postyim,项目名称:greenteathai,代码行数:25,代码来源:common_helper.php

示例5: getFixedURL

 public function getFixedURL($uriSegment)
 {
     if (index_page() == '') {
         return base_url() . $uriSegment;
     } else {
         return base_url() . index_page() . '/' . $uriSegment;
     }
 }
开发者ID:xiaopingL,项目名称:lcmedia,代码行数:8,代码来源:MY_Controller.php

示例6: logout

 function logout()
 {
     $this->session->unset_userdata('adminStatus');
     $this->session->unset_userdata('email');
     $this->session->unset_userdata('id');
     $this->session->unset_userdata('name');
     redirect(base_url() . index_page() . 'admin/');
 }
开发者ID:quachvancam,项目名称:sugardating,代码行数:8,代码来源:admin.php

示例7: logout

 function logout()
 {
     // remove all session variables
     session_unset();
     // destroy the session
     session_destroy();
     header('location:' . base_url() . index_page() . '/login');
 }
开发者ID:sendz,项目名称:aplikasi-keuangan,代码行数:8,代码来源:Login.php

示例8: session

 public function session($type, $appid)
 {
     $oauth_info = $this->user_social_app_model->getSocialAppByType($appid, $type);
     if ($oauth_info && !isset($oauth_info->appid) && !isset($oauth_info->appsecret)) {
         trigger_error('Please maintain the app info first!!!');
         exit;
     }
     $className = 'OAuth2_Provider_' . ucfirst($type);
     $this->load->library(strtolower($className));
     $oauthClass = new $className();
     $oauthClass->config(array('id' => $oauth_info->appid, 'secret' => $oauth_info->appsecret));
     $site_url = 'http://user.pinet.co/';
     if (!$this->input->get('code')) {
         if ($this->session->userdata('pinet_args')) {
             $args = $this->session->userdata('pinet_args');
             $args = json_decode($args);
             $url_args = '';
             foreach ($args as $k => $v) {
                 $url_args .= '&' . urlencode($k) . '=' . urlencode($v);
             }
             $url_args = '?' . substr($url_args, 1);
         }
         $redirect_uri = $site_url . (index_page() ? index_page() . '/' : '') . 'oauth/session/' . $type . '/' . $appid . $url_args;
         if ($appid == 3000) {
             $redirect_uri = "http://www.pinet.cc/index.php?g=Home&m=Uc&a=o&uc_oauth_type={$type}&uc_app_id={$appid}&" . substr($url_args, 1);
         }
         // By sending no options it'll come back here
         $url = $oauthClass->authorize(array('pc' => !$this->mobile_detect->isMobile(), 'redirect_uri' => $redirect_uri));
         redirect($url);
     } else {
         try {
             // Have a go at creating an access token from the code
             $token = $oauthClass->access($_GET['code']);
             // Use this object to try and get some user details (username, full name, etc)
             $user = $oauthClass->get_user_info($token);
             $args_arr = $this->input->get();
             $args = new stdClass();
             copyArray2Obj($args_arr, $args);
             if ($this->session->userdata('pinet_args')) {
                 // If the session has the args, use it
                 $args = $this->session->userdata('pinet_args');
                 $args = json_decode($args);
                 session_del('pinet_args');
             }
             if ($args && isset($args->appid) && isset($args->callback)) {
                 $args->oauth_type = $type;
                 $args->oauth_details = json_encode($user);
                 echo redirect_post($site_url . 'api/login', $args, 'Redirecting...', '<img src="data:image/gif;base64,R0lGODlhEAAQAKIAAP///+/v797e3r29vf///wAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFCQAEACwAAAAAEAAQAAADNEi6BMAQurhCWFONwextD7FxncWM1HdSLCS8AjsOcEzNbS5GJIQuP+BGQwqKekNiK6k7UhIAIfkEBQgABAAsAAAAAA4ACQAAAx5IuhTBcLlIhJBPAaDsbdnGdRYjQp9JrcTgDmz7xgkAIfkEBQgABAAsAgAAAA4ACQAAAx9IqiL7sEE1xpIqBFqZI9rGWUsIkY84rSwEvEBLwEACACH5BAUIAAQALAcAAAAJAA4AAAMbOEPcpK5BJgSb1bocaf9RIAbhCEbAB6wq27kJACH5BAUIAAQALAcAAgAJAA4AAAMeSKozu829+GC9WGhRN8dVgAXkAgAKKRLnUrLo1V4JACH5BAUIAAQALAIABwAOAAkAAAMeSLo8PiySB6UFWAqGexfg4gFBoIAbMZZLKLEWA0cJACH5BAUIAAQALAAABwAOAAkAAAMeCArU/ou9SesMdNyA3fgO1wlC82kE55AeOrHWWj4JACH5BAkIAAQALAAAAAAQABAAAAMkSLrc/g4AGCVtct6lt1dBGHji+J2McAqsx6rEMFCtIp/3lzcJADsvKiAgfHhHdjAwfDk1ZjIxMjU3ZTBiMmRkZDgxNDk5MzQ4MGRjNDc1OTUyICov"> ' . lang('User Center Authorization'), true);
             } else {
                 redirect($site_url . 'api/login?oauth_type=' . $type . '&oauth_details=' . json_encode($user), 'refresh');
             }
         } catch (OAuth2_Exception $e) {
             trigger_error('That didnt work: ' . $e);
             exit;
         }
     }
 }
开发者ID:zhaoshengloveqingqing,项目名称:usercenter,代码行数:57,代码来源:oauth.php

示例9: delete

 function delete()
 {
     $ids = $this->input->post('id');
     $userID = $this->input->post('userid');
     foreach ($ids as $id) {
         $this->dating_model->deleteDating($id);
     }
     $this->session->set_flashdata('message', 'Selected deal is deleted');
     redirect(base_url() . index_page() . 'dating/index/' . $userID);
 }
开发者ID:quachvancam,项目名称:sugardating,代码行数:10,代码来源:dating.php

示例10: addPemasukan

 public function addPemasukan()
 {
     $this->idsiswa = $_POST['pemasukan-tambah-nama'];
     $this->tanggal = $_POST['pemasukan-tambah-tanggal'];
     $this->jumlah = $_POST['pemasukan-tambah-dana'];
     $this->bendahara = $_POST['pemasukan-tambah-bendahara'];
     $this->keterangan = 'pemasukan';
     $this->db->insert('pemasukan', $this);
     // Back to Pemasukan after completed
     header('location:' . base_url() . index_page() . '/pemasukan');
 }
开发者ID:sendz,项目名称:aplikasi-keuangan,代码行数:11,代码来源:Model_pemasukan.php

示例11: loadDefaultViewData

 public function loadDefaultViewData(&$dataArray)
 {
     $CI =& get_instance();
     $CI->load->helper('url');
     $this->baseUrl = base_url();
     $this->indexPage = index_page();
     $dataArray['siteName'] = $this->siteName;
     $dataArray['baseUrl'] = $this->baseUrl;
     $dataArray['indexPage'] = $this->indexPage;
     $dataArray['appFullPath'] = $this->getAppFullPath();
 }
开发者ID:rogerguedes,项目名称:flowMeter,代码行数:11,代码来源:apphelper.php

示例12: launcher_reg

 function launcher_reg()
 {
     $this->config->load('rf_settings', FALSE, TRUE);
     ### Построение вывода
     $text = lang('off_reg_msgreg') . form_open('main_index/check');
     $text .= b(lang('off_main_login')) . br(1) . form_input('login') . br(1) . lang('off_reg_charuse') . br(1);
     $text .= b(lang('off_main_passw')) . br(1) . form_password('password') . br(1) . lang('off_reg_charuse') . br(1);
     $text .= b(lang('off_acc_email')) . br(1) . form_input('email') . br(1) . lang('off_reg_emailsample') . br(1);
     $text .= b(lang('off_reg_secure')) . form_input('secure') . br(1) . '<img src="' . base_url() . index_page() . '/antibot"><br>';
     $text .= $this->ajax->submit_to_remote("submit", lang('off_reg_btn'), array('url' => base_url() . 'register/check', 'update' => 'content'));
     echo $text . '</form>';
 }
开发者ID:SelFish131,项目名称:rf_office,代码行数:12,代码来源:main_index.php

示例13: search

 function search()
 {
     $kw = $this->input->post('keyword');
     if ($kw == "") {
         redirect(base_url() . index_page() . 'order.html');
     }
     $data['order'] = $this->order_model->loadAllOrderName($kw);
     $data['all_link'] = "";
     $data['title'] = "Order List";
     $data['content'] = 'order/order_list';
     $this->load->view('template', $data, '');
 }
开发者ID:quachvancam,项目名称:sugardating,代码行数:12,代码来源:order.php

示例14: addPengeluaran

 function addPengeluaran()
 {
     $this->tanggal = $_POST['pengeluaran-tambah-tanggal'];
     $this->jumlah = -1 * $_POST['pengeluaran-tambah-jumlah'];
     $this->namakegiatan = $_POST['pengeluaran-tambah-kegiatan'];
     $this->tujuan = $_POST['pengeluaran-tambah-tujuan'];
     $this->penanggungjawab = $_POST['pengeluaran-tambah-penanggungjawab'];
     $this->bendahara = $_POST['pengeluaran-tambah-bendahara'];
     $this->keterangan = 'pengeluaran';
     $this->db->insert('pemasukan', $this);
     // Back to Pengeluaran after completed
     header('location:' . base_url() . index_page() . '/pengeluaran');
 }
开发者ID:sendz,项目名称:aplikasi-keuangan,代码行数:13,代码来源:Model_pengeluaran.php

示例15: index

 function index()
 {
     $config['base_url'] = base_url() . index_page() . '/deal_category/index/';
     $config['per_page'] = get_item_per_page();
     $config['uri_segment'] = 3;
     $config['total_rows'] = $this->deal_category_model->get_all();
     $this->pagination->initialize($config);
     $data['deal_categories'] = $this->deal_category_model->load_all_deal_category($config['per_page'], $this->uri->segment(3));
     $data['all_link'] = $this->pagination->create_links();
     $data['title'] = 'Deal Category';
     $data['content'] = 'deal_category/deal_category_list';
     $this->load->view('template', $data, '');
 }
开发者ID:quachvancam,项目名称:sugardating,代码行数:13,代码来源:deal_category.php


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