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


PHP get_user_type函数代码示例

本文整理汇总了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;
}
开发者ID:elshafey,项目名称:ir,代码行数:7,代码来源:account_helper.php

示例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();
 }
开发者ID:elshafey,项目名称:ir,代码行数:13,代码来源:home.php

示例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
             */
开发者ID:rogermule,项目名称:afalagi-web,代码行数:31,代码来源:Add_Street.php

示例4: user_type

function user_type()
{
    echo get_user_type();
}
开发者ID:HaThuy92,项目名称:hathithuy_quanlytinchi,代码行数:4,代码来源:user.php

示例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);
}
开发者ID:abc2mit,项目名称:abc2mit.github.io,代码行数:5,代码来源:functions.bb-template.php

示例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;
        }
    }
}
开发者ID:shadobladez,项目名称:erp2,代码行数:48,代码来源:Utility.php

示例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 "";
     }
 }
开发者ID:ponchov,项目名称:quizzworld,代码行数:16,代码来源:admindash_helper.php

示例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 
    }
开发者ID:elshafey,项目名称:ir,代码行数:31,代码来源:template.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>
										
开发者ID:anugrahbsoe,项目名称:Atom.Desktop,代码行数:30,代码来源:users.php

示例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();
 }
开发者ID:elshafey,项目名称:ir,代码行数:12,代码来源:accounts.php


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