• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP userdata函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: userdata

                </div>
            </nav>
        </header>
        <div class="wrapper row-offcanvas row-offcanvas-left">
            <aside class="left-side sidebar-offcanvas">
                <section class="sidebar">
                    <div class="user-panel">
                        <div class="pull-left image">
                            <img src="<?php 
echo userdata('avatar') ? base_url('elements') . '/images/uploads/' . userdata('user_id') . '/' . userdata('avatar') . '?' . time() : base_url('assets') . '/sites/images/dude.png?' . time();
?>
" class="img-circle" />
                        </div>
                        <div class="pull-left info">
                            <p><?php 
echo ($fullName = ucwords(userdata('username'))) ? $fullName : 'Welcome';
?>
</p>
                        </div>
                    </div>
                    <ul class="sidebar-menu">
                        <?php 
if ($this->ion_auth->in_group(array('business', 'students', 'ecommerce', 'designer'))) {
    include_once 'user_menu.php';
} elseif ($this->ion_auth->in_group(array('employer'))) {
    include_once 'recruiter_menu.php';
} elseif ($this->ion_auth->in_group(array('admin'))) {
    include_once 'admin_menu.php';
}
?>
                    </ul>
开发者ID:NustechPvtLtd,项目名称:webzero,代码行数:31,代码来源:main.php


示例17: elseif

} elseif (isset($_GET['fave'])) {
    if (empty($_GET['fave']) || !is_numeric($_GET['fave'])) {
        header('Content-Type: image/png');
        readfile('images/frown.png');
        exit;
    }
    $trainer = (int) $_GET['fave'];
    $userdata = userdata($trainer);
    if (empty($userdata[0]['fave'])) {
        header('Content-Type: image/png');
        readfile('images/nopoke.png');
    } else {
        header('Content-Type: image/gif');
        readfile('img/anim2/' . (is_shiny($userdata[0]['fave']) ? 'shiny/' : '') . sprintf("%03d", round($userdata[0]['fave'])) . '.gif');
    }
} elseif (isset($_GET['faveback'])) {
    if (empty($_GET['faveback']) || !is_numeric($_GET['faveback'])) {
        header('Content-Type: image/png');
        readfile('images/frown.png');
        exit;
    }
    $trainer = (int) $_GET['faveback'];
    $userdata = userdata($trainer);
    if (empty($userdata[0]['fave'])) {
        header('Content-Type: image/png');
        readfile('images/nopoke.png');
    } else {
        header('Content-Type: image/png');
        readfile('img/back/' . (is_shiny($userdata[0]['fave']) ? 'shiny/' : '') . sprintf("%03d", round($userdata[0]['fave'])) . '.png');
    }
}
开发者ID:Roph,项目名称:RMRKMon,代码行数:31,代码来源:image.php


示例18: index

	function index()
	{
    	$data['salesteams']=$this->dashboard_model->total_salesteams();
    	$data['leads']=$this->dashboard_model->total_leads();		    	
    	$data['opportunities']=$this->dashboard_model->total_opportunities();
    	$data['products']=$this->dashboard_model->total_products();	
    	$data['quotations']=$this->dashboard_model->total_quotations();
    	$data['salesorders']=$this->dashboard_model->total_salesorders();
    	$data['calls']=$this->dashboard_model->total_calls();
    	$data['customers']=$this->dashboard_model->total_customers();
    	$data['meetings']=$this->dashboard_model->total_meetings();    
    	$data['emails']=$this->dashboard_model->total_email();
    	$data['contracts']=$this->dashboard_model->total_contracts();
    		
    	/*Invoicing Details*/
    	$data['open_invoice_total'] = $this->invoices_model->open_invoices_total_collection();
		    	
    	$data['overdue_invoices_total'] = $this->invoices_model->overdue_invoices_total_collection();
    	
    	$data['paid_invoices_total'] = $this->invoices_model->paid_invoices_total_collection();
    	
    	$data['invoices_total_collection'] = $this->invoices_model->invoices_total_collection();
    	
    	/*SALES STATISTICS*/
    	$data['sales_today_total'] = $this->dashboard_model->sales_today_total();
    	
    	$data['sales_yesterday_total'] = $this->dashboard_model->sales_yesterday_total();
    	
    	$data['sales_this_week_total'] = $this->dashboard_model->sales_this_week_total();
    	
    	$data['sales_this_month_total'] = $this->dashboard_model->sales_this_month_total();
    	
    	$data['top_selling_team'] = $this->dashboard_model->top_selling_team();
    	
    	$data['salesteams_performance_list'] = $this->dashboard_model->salesteams_performance_list();
    	
    	/*LIST*/
    	
    	$salesteam_id = $this->dashboard_model->get_staff_salesteam(userdata('id'));
    	
    	$data['staff_leads_list'] = $this->dashboard_model->staff_leads_list(userdata('id'));  	  
    	
    	$data['staff_leads_by_team'] = $this->dashboard_model->staff_leads_by_team($salesteam_id);
    	
    	$data['staff_opportunities_list'] = $this->dashboard_model->staff_opportunities_list(userdata('id'));  	  
    	
    	$data['staff_opportunities_by_team'] = $this->dashboard_model->staff_opportunities_by_team($salesteam_id);
    
    	$data['staff_call_log_list'] = $this->dashboard_model->staff_call_log_list(userdata('id'));
    	
    	$data['staff_contracts_list'] = $this->dashboard_model->staff_contracts_list(userdata('id'));  	  
    
    	$data['staff_quotations_list'] = $this->dashboard_model->staff_quotations_list(userdata('id'));  	  
    	
    	$data['staff_quotations_by_team'] = $this->dashboard_model->staff_quotations_by_team($salesteam_id);
    	
    	$data['staff_invoices_list'] = $this->dashboard_model->staff_invoices_list(userdata('id'));  	  
    	
    	$data['staff_invoices_by_team'] = $this->dashboard_model->staff_invoices_by_team($salesteam_id);
    	
    	/*EVENTS*/
    	$data['staff_leads_event_list'] = $this->dashboard_model->staff_leads_event_list(userdata('id'));
    	
    	$data['staff_opportunities_event_list'] = $this->dashboard_model->staff_opportunities_event_list(userdata('id'));
    	
    	$data['staff_logged_call_event_list'] = $this->dashboard_model->staff_logged_call_event_list(userdata('id'));
    	
    	$data['staff_meetings_event_list'] = $this->dashboard_model->staff_meetings_event_list(userdata('id'));
    	$data['staff_contracts_event_list'] = $this->dashboard_model->staff_contracts_event_list(userdata('id'));
    	
		$this->load->view('header');			 
		$this->load->view('dashboard/index',$data);
		$this->load->view('footer');	
			  
	}
开发者ID:BersnardC,项目名称:DROPINN,代码行数:75,代码来源:dashboard.php


示例19: all_meetings_list

	function all_meetings_list()
	{
		
		if(userdata('id')!='1')
		{
			$this->db->where('responsible', userdata('id'));
		} 
        $this->db->order_by("id", "desc");		
        $this->db->select('meetings.*');
        $this->db->from('meetings'); 
        
        return $this->db->get()->result();
	} 
开发者ID:BersnardC,项目名称:DROPINN,代码行数:13,代码来源:meetings_model.php


示例20: upload_avatar

 public function upload_avatar()
 {
     $userID = userdata('user_id');
     //if the upload path does not exist, create it
     if (!file_exists('./' . $this->config->item('images_uploadDir') . '/' . $userID)) {
         mkdir('./' . $this->config->item('images_uploadDir') . '/' . $userID, 0777, true);
     }
     $config['upload_path'] = './' . $this->config->item('images_uploadDir') . '/' . $userID . '/';
     $config['allowed_types'] = $this->config->item('upload_allowed_types');
     $config['max_size'] = $this->config->item('upload_max_size');
     $config['max_width'] = $this->config->item('upload_max_width');
     $config['max_height'] = $this->config->item('upload_max_height');
     $this->load->library('upload', $config);
     if (!$this->upload->do_upload('uploadfile')) {
         $return['status'] = 'error';
         $return['message'] = html_escape($this->upload->display_errors());
     } else {
         $imageData = $this->upload->data();
         $data['avatar'] = $imageData['raw_name'] . $imageData['file_ext'];
         if ($this->ion_auth->update($userID, $data)) {
             $avatar = userdata('avatar');
             if (!empty($avatar)) {
                 unlink($config['upload_path'] . $avatar);
             }
             $this->session->unset_userdata('avatar');
             $this->session->set_userdata(array('avatar' => $data['avatar']));
             $return['status'] = 'success';
             $return['message'] = $data['avatar'];
         }
     }
     echo json_encode($return);
 }
开发者ID:NustechPvtLtd,项目名称:webzero,代码行数:32,代码来源:user.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP userdate函数代码示例发布时间:2022-05-23
下一篇:
PHP useractionlog函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap