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


PHP userdata函数代码示例

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


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

示例1: _adminConstruct

 private function _adminConstruct()
 {
     $this->load->library('layout');
     //set layout
     $this->layout->setTemplate("layout/admin.php");
     $this->layout->setSkin(base_url() . 'themes/admin/');
     $skin = $this->layout->getSkin();
     // Site global resources
     $this->layout->js($skin . 'js/jquery-1.9.1.min.js');
     $this->layout->js($skin . 'js/admin.js');
     $this->layout->css($skin . 'css/style.css');
     $this->layout->css($skin . 'css/layout.css');
     $this->lang->load('en', 'admin');
     $currentUser = userdata("username");
     $action = $this->uri->segment(2);
     $controller = $this->uri->segment(1);
     if ($controller == "import_data") {
         $currentUser = "admin";
     }
     if ($currentUser == 'admin') {
         if ($action == 'login') {
             redirect(site_url('admin'));
         }
     } else {
         if ($action != 'login') {
             redirect(site_url('admin/login'));
         }
     }
 }
开发者ID:pdkhuong,项目名称:VideoFW,代码行数:29,代码来源:MY_Controller.php

示例2: staff_permission

    function staff_permission($account_permission_id = '')
	{
		if(userdata('id')=='1')
		{
			return true;
		}
		else
		{
				$current_staff_account_role_id		=	$this->db->get_where('users',
														array('id'=>userdata('id')))
															->row()->account_role_id;
															
				$current_staff_account_permissions	=	$this->db->get_where('account_role',
																array('id'=>$current_staff_account_role_id))
																	->row()->account_permissions;
				 
				if (in_array($account_permission_id , explode(',' , $current_staff_account_permissions)))
				{
					return true;
				}
				else
				{
					return false;
				}
		}
		
	}  
开发者ID:BersnardC,项目名称:DROPINN,代码行数:27,代码来源:permission_model.php

示例3: index

 function index()
 {
     if (userdata('admin_logged_in')) {
         redirect($this->admin_link . 'dashboard');
     }
     $data['title'] = $this->title;
     $this->load->view('backadmin/v_login', $data);
 }
开发者ID:ndokceplok,项目名称:Huntdrop,代码行数:8,代码来源:login.php

示例4: usuario_ligas_invitables

 public static function usuario_ligas_invitables($id)
 {
     $uid = userdata()->get('id');
     return array_filter(UIFacade::ligas(), function ($l) use($uid, $id) {
         return (has_auth('admin') || $l['creador'] == $uid) && !in_array($id, array_map(function ($p) {
             return $p->get('id');
         }, $l['participantes']));
     });
 }
开发者ID:nyangara,项目名称:--ngara,代码行数:9,代码来源:UIFacade.php

示例5: index

	function index()
	{
		   if(userdata('id') == 1)
			{	
				$this->load->view('header');			 
				$this->load->view('settings/general_settings');
				$this->load->view('footer');	
			}
		
	}
开发者ID:BersnardC,项目名称:DROPINN,代码行数:10,代码来源:settings.php

示例6: index

 public function index($page = 'index')
 {
     if (!file_exists('application/views/admin_series/' . $page . '.php')) {
         show_404();
     }
     $temp = isset($_GET['rand']) ? $_GET['rand'] : '';
     if (isset($_POST['status'])) {
         $data = $_POST;
         set_userdata('admin_search_series_params', $data);
     } else {
         if (!empty($temp)) {
             unset_userdata('admin_search_series_params');
         }
     }
     $params = userdata('admin_search_series_params');
     //echo "<pre>"; print_r($params);
     $data['params'] = $params;
     $selectedStatus = isset($params['status']) ? intval($params['status']) : -1;
     $selectedCountry = isset($params['country']) ? intval($params['country']) : -1;
     $selectedType = isset($params['type']) ? intval($params['type']) : -1;
     $statusSelectbox = selectBox($this->_config['status'], array('Name' => 'status', 'Selected' => $selectedStatus, 'MainOption' => TRUE));
     $data['statusSelectbox'] = $statusSelectbox;
     $countrySelectbox = selectBox($this->_config['countries'], array('Name' => 'country', 'Selected' => $selectedCountry, 'MainOption' => TRUE));
     $data['countrySelectbox'] = $countrySelectbox;
     $typeSelectbox = selectBox($this->_config['video_type'], array('Name' => 'type', 'Selected' => $selectedType, 'MainOption' => TRUE));
     $data['typeSelectbox'] = $typeSelectbox;
     $offset = isset($_GET['o']) ? intval($_GET['o']) : 0;
     $this->layout->title('List series');
     $whereClause = "1";
     if (isset($params['keyword']) && !empty($params['keyword'])) {
         $keywork = addslashes($params['keyword']);
         $whereClause .= " AND title LIKE '%{$keywork}%' ";
     }
     if (isset($params['status']) && $params['status'] != -1) {
         $whereClause .= " AND status ='{$selectedStatus}' ";
     }
     if (isset($params['country']) && !empty($params['country']) && $params['country'] != -1) {
         $whereClause .= " AND country ='{$selectedCountry}' ";
     }
     if (isset($params['type']) && !empty($params['type']) && $params['type'] != -1) {
         $whereClause .= " AND type ='{$selectedType}' ";
     }
     $total = $this->Series_model->getTotal($whereClause);
     $listObject = $this->Series_model->getRange($whereClause, $offset, ITEM_PER_PAGE);
     $uri = "admin_series/index";
     $data['countries'] = $this->_config['countries'];
     $data['video_type'] = $this->_config['video_type'];
     $data['listObject'] = $listObject;
     $data['total'] = $total;
     $data['max'] = ITEM_PER_PAGE;
     $data['offset'] = $offset;
     $data['uri'] = $uri . '?o=';
     $this->layout->view('admin_series/' . $page, $data);
 }
开发者ID:pdkhuong,项目名称:VideoFW,代码行数:54,代码来源:Admin_series.php

示例7: update_exec

 function update_exec()
 {
     $admin_id = $this->input->post('admin_id');
     if ($admin_id == 1) {
         $this->_only_superadmin();
     }
     if ($admin_id != userdata('admin_id')) {
         $this->session->set_flashdata('log', 'Access denied');
         redirect($this->admin_link . 'admin', 'refresh');
     }
     $this->m_admins->update();
     redirect('backadmin/admin');
 }
开发者ID:ndokceplok,项目名称:Huntdrop,代码行数:13,代码来源:admin.php

示例8: user_member

function user_member($colom = "username")
{
    $ci =& get_instance();
    if (userdata("session_user")) {
        $user = userdata('session_user');
        if (isset($user->{$colom})) {
            return $user->{$colom};
        } else {
            return FALSE;
        }
    } else {
        return FALSE;
    }
}
开发者ID:ridwanskaterock,项目名称:coc-ri-comunnity,代码行数:14,代码来源:app_helper.php

示例9: index

 function index()
 {
     $data['title'] = 'Home';
     $data['pageMetaDescription'] = 'webzero.in';
     $data['pageHeading'] = 'Services Home';
     $group = $this->ion_auth->get_groups(array('neglectgroup' => array('admin', 'nogroup'), 'visibility' => TRUE));
     $data['group'] = $group;
     $user_id = userdata('user_id');
     if (isset($_POST['group']) && $this->ion_auth->update_user_group($user_id, $_POST['group'])) {
         $this->session->set_flashdata('message', 'Your user group is update to ' . $data['group'][$_POST['group']]);
         redirect('/');
     }
     $data['css'] = array('<link rel="stylesheet" type="text/css" href="' . base_url() . 'assets/customer/css/style.css"/>');
     $this->template->load('main', 'services', 'services/index', $data);
 }
开发者ID:NustechPvtLtd,项目名称:webzero,代码行数:15,代码来源:services.php

示例10: index

	function index()
	{
			//checking permission for staff
			if (!check_staff_permission('opportunities_read'))	
			{
				redirect(base_url('admin/access_denied'), 'refresh');  
			} 
			
		    	$data['opportunities'] = $this->opportunities_model->opportunities_list(userdata('id'));
		    			    	 
				$this->load->view('header');
				$this->load->view('opportunities/index',$data);
				$this->load->view('footer');
			 
	}
开发者ID:BersnardC,项目名称:DROPINN,代码行数:15,代码来源:opportunities.php

示例11: flash_error

function flash_error()
{
    $ci =& get_instance();
    $flashmsg = userdata('error');
    $html = '';
    if (is_array($flashmsg)) {
        foreach ($flashmsg as $value) {
            $html .= '<li>' . $value . '</li>';
        }
    } else {
        $html = $flashmsg;
    }
    unset_userdata('error');
    return $html;
}
开发者ID:pdkhuong,项目名称:VideoFW,代码行数:15,代码来源:flash_message_helper.php

示例12: index

	function index($customer_id='')
	{
		    	$data['email_list'] = $this->mailbox_model->email_list(userdata('id'),$customer_id);
		    	
		    	$data['sent_email_list'] = $this->mailbox_model->sent_email_list(userdata('id'),$customer_id);
		    	
		    	$data['staffs'] = $this->staff_model->staff_list(); 
				$data['customers'] = $this->customers_model->company_list(); 
		    	
		    	$data['customer_id']=$customer_id;
		    			    	 
				$this->load->view('header');
				$this->load->view('mailbox/index',$data);
				$this->load->view('footer');
			 
	}
开发者ID:BersnardC,项目名称:DROPINN,代码行数:16,代码来源:mailbox.php

示例13: logged_calls_list

	function logged_calls_list($customer_id)
	{
		
		if($customer_id!="")
		{
			$this->db->where(array('company_id' => $customer_id) ); 
		} 
		if(userdata('id')!='1')
		{
			$this->db->where('resp_staff_id', userdata('id'));
		}
		
        $this->db->order_by("id", "desc");		
        $this->db->select('calls.*');
        $this->db->from('calls');
        return $this->db->get()->result();
	} 
开发者ID:BersnardC,项目名称:DROPINN,代码行数:17,代码来源:logged_calls_model.php

示例14: send_email

    function send_email()
    {
    	
    	$count_id = count($this->input->post('to_email_id'));
    	 
		for($i=0;$i<$count_id;$i++)
		{ 
    		$email_details = array( 
	            'assign_customer_id' => $this->input->post('assign_customer_id'),
	            'to' => $this->input->post('to_email_id')[$i],
	            'from' => userdata('id'),
	            'subject' => $this->input->post('subject'),
	            'message' => $this->input->post('message'),
	            'date_time' => strtotime( date('d F Y g:i a') ),
	            'ip_address' => $this->input->server('REMOTE_ADDR')
	            );
	                               
	       	 $mail_res= $this->db->insert('emails',$email_details);
	     }
		 return $mail_res;
	}
开发者ID:BersnardC,项目名称:DROPINN,代码行数:21,代码来源:mailbox_model.php

示例15: index

 public function index()
 {
     $this->data['pageHeading'] = ucfirst($this->router->fetch_class());
     $this->data['pageMetaDescription'] = ucfirst($this->router->fetch_class());
     $sites_id = $this->sitemodel->getSiteId($this->ion_auth->get_user_id());
     $this->data['message'] = '';
     if (!empty($_POST)) {
         $this->pagemodel->updatePageData($_POST);
         $this->data['message'] = '<div class="alert alert-success">Page seo information successfuly updated.</br>Please re-publish your page to see the changes!</div>';
     }
     if (!$sites_id) {
         redirect(site_url('sites/create'), 'location');
     } else {
         userdata('redirect_url', 'seo');
         $this->data['siteData'] = $this->sitemodel->getSite($sites_id);
         $this->data['pagesData'] = $this->pagemodel->getPageData($sites_id);
         $this->data['css'] = array('<link href="' . base_url() . 'assets/sites/css/style.css" rel="stylesheet">', '<style>header{padding:0;}</style>');
         $this->data['js'] = array('<script type="text/javascript" src="' . base_url() . 'assets/js/jquery.blockUI.js"></script>');
         $this->template->load('main', 'seo', 'index', $this->data);
     }
 }
开发者ID:NustechPvtLtd,项目名称:webzero,代码行数:21,代码来源:seo.php


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