本文整理汇总了PHP中get_user_type函数的典型用法代码示例。如果您正苦于以下问题:PHP get_user_type函数的具体用法?PHP get_user_type怎么用?PHP get_user_type使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_user_type函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: is_super_admin
function is_super_admin()
{
if (get_user_type() == 1) {
return TRUE;
}
return FALSE;
}
示例2: busines_card
function busines_card($id = '')
{
redirect('home/generate');
if (get_user_type() == 2 || $id == '') {
$id = get_user_id();
}
if (!$_POST) {
$_POST = $this->users->get_user_by_id($id);
}
$this->data['page_title'] = 'Custom Busines Card';
$this->template->write_view('content', 'home/business-card', $this->data, FALSE);
$this->template->render();
}
示例3: get_user_type
//redirect the encoder to the regions
exit;
}
if ($_SERVER['REQUEST_METHOD'] == "POST") {
/**
* check if the user is logged in
* check login status is from php file "controller secure access"
* it checks if the use is logged in
*/
if (TRUE == check_login_status()) {
/**
* check if the type of the user is admin
* get_user_type function is from a php file"Controller secure access"
* it returns the type of the user
*/
$user_type = get_user_type();
/**
* if the user type is admin instantiate an Admin_controller and do what you got to do
*/
if ($user_type == User_Type::ENCODER) {
/**
* get the logged in user
*/
$encoder = $_SESSION['Logged_In_User'];
/**
* instantiate admin controller with the logged in user
*/
$encoder_con = new Encoder_Controller($encoder);
/**
* get the street name in english
*/
示例4: user_type
function user_type()
{
echo get_user_type();
}
示例5: get_user_title
function get_user_title($id = 0)
{
$user = bb_get_user(bb_get_user_id($id));
return empty($user->title) ? get_user_type($id) : apply_filters('get_user_title', $user->title, $user->ID);
}
示例6: get_pos_login
function get_pos_login()
{
if (HAS_PROJECTS) {
set_session('start', 'Start-' . get_user_type());
return 'index.php/index/start';
}
if (HAS_VIDEOS) {
if (get_session('user_level') == MINIMUM_TO_BROWSE) {
return 'tvideos';
} else {
if (is_permitted(MINIMUM_TO_UPDATE)) {
return POS_LOGIN_INTERNAL;
} else {
return POS_LOGIN_EXTERNAL;
}
}
}
if (HAS_EVENTS) {
if (!is_session('event_id')) {
if (is_permitted(MINIMUM_TO_UPDATE)) {
$model = MODEL . 'Events';
$Events = new $model();
set_new_event($Events->getIdByCompany(COMPANY_ID));
return INDEX . POS_LOGIN_INTERNAL;
} else {
if (is_session('start')) {
return 'index.php/index/start';
} else {
// return INDEX . 'index/dashboard'; // index.php is required in linux server
return 'index.php/index/dashboard';
// index.php is required in linux server
}
}
} else {
if (is_permitted(MINIMUM_TO_UPDATE)) {
return POS_LOGIN_INTERNAL;
} else {
return POS_LOGIN_EXTERNAL;
}
}
} else {
if (is_permitted(MINIMUM_TO_UPDATE)) {
return POS_LOGIN_INTERNAL;
} else {
return POS_LOGIN_EXTERNAL;
}
}
}
示例7: get_tutor_language
function get_tutor_language()
{
$ci =& get_instance();
if (isset($_COOKIE["search_user_id"])) {
$user_id = $_COOKIE["search_user_id"];
$user_type = get_user_type();
if ($user_type == 1) {
$tutor_language_list = $ci->tutor_model->get_tutor_languages($user_id);
return $tutor_language_list;
} else {
return "";
}
} else {
return "";
}
}
示例8: site_url
<a href="<?php
echo site_url('/');
?>
">Dashboard</a><span>|</span>
</li>
<li>
<a target="_blank" href="<?php
echo site_url('home/busines_card/');
?>
">Business Card</a><span>|</span>
</li>
<li>
<a href="javascript:;">Profile</a>
<ul class="sub-menu" class="noJS" >
<?php
if (get_user_type() == 1) {
?>
<li>
<a href="<?php
echo site_url('accounts');
?>
">Profiles List</a>
</li>
<li>
<a href="<?php
echo site_url('accounts/create');
?>
">Create Profile</a>
</li>
<?php
}
示例9: get_user_type
<tr>
<td>
<img class="img-rounded" src="uploads/avatars/<?php
echo $row['avatar'];
?>
">
</td>
<td>
<?php
echo $row['last'] . ', ' . $row['first'];
?>
</td>
<td>
<?php
get_user_type($dbc, $row['type'], 'echo');
?>
</td>
<td>
<?php
echo $row['email'];
?>
</td>
<td>
<?php
get_user_status($dbc, $row['status'], 'echo');
?>
</td>
</tr>
示例10: languages
function languages()
{
if (get_user_type() == 2) {
redirect('/');
}
$this->data['languages'] = $this->languages->get_all();
$this->data['page_title'] = 'Languages List';
$this->template->add_css('layout/css/admin/jquery.dataTables.css');
$this->template->add_js('layout/js/jquery/jquery.dataTables.min.js');
$this->template->write_view('content', 'accounts/languages', $this->data, FALSE);
$this->template->render();
}