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


PHP isUserLoggedIn函数代码示例

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


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

示例1: _addGrupaMember

function _addGrupaMember()
{
    isUserLoggedIn();
    $grupa = new Grupa(getdbh());
    $checkGroup = $grupa->checkGroupRegistration($_POST['userID']);
    if ($checkGroup != false) {
        if ($checkGroup['ID_GRUPA'] != $_POST['grupaID']) {
            $delete = $grupa->deleteGrupaMember($checkGroup['ID']);
        }
    }
    $check = $grupa->checkRegister($_POST['grupaID'], $_POST['userID']);
    if ($check == false) {
        $addMember = $grupa->addGrupaMember($_POST['grupaID'], $_POST['userID']);
        if ($addMember) {
            $data['msg'][] = "Studentul a fost inscris in grupa";
            $data['redirect'][] = 'administrare/show_grup';
            View::do_dump(VIEW_PATH . 'layout.php', $data);
        } else {
            $data['msg'][] = "Eroare la inscriere";
            $data['redirect'][] = 'administrare/show_grup';
            View::do_dump(VIEW_PATH . 'layout.php', $data);
        }
    } else {
        $data['msg'][] = "Studentul este inscris la aceasta grupa";
        $data['redirect'][] = 'administrare/show_grup';
        View::do_dump(VIEW_PATH . 'layout.php', $data);
    }
}
开发者ID:laiello,项目名称:ebs-academy-at-ulbs-2014,代码行数:28,代码来源:addGrupaMember.php

示例2: index

 public function index()
 {
     /*
     UserCake (Via CupCake) Version: 2.0.2
     http://usercake.com
     */
     global $loggedInUser;
     $baseURL = getcwd();
     require_once "{$baseURL}/application/third_party/user_cake/models/config.php";
     if (!securePage($_SERVER['PHP_SELF'])) {
         die;
     }
     //Log the user out
     if (isUserLoggedIn()) {
         $loggedInUser->userLogOut($this);
     }
     $s_u = site_url();
     if (!empty($s_u)) {
         $add_http = "";
         if (strpos(site_url(), "http://") === false) {
             $add_http = "http://";
         }
         header("Location: " . $add_http . str_replace('.php', '', site_url()));
         die;
     } else {
         header("Location: http://" . $_SERVER['HTTP_HOST']);
         die;
     }
 }
开发者ID:AdwayLele,项目名称:CupCake,代码行数:29,代码来源:logout.php

示例3: authenticateUser

function authenticateUser($redirectUrl)
{
    checkSession();
    if (!isUserLoggedIn()) {
        redirect($redirectUrl);
    }
}
开发者ID:mahuidong,项目名称:CodeWithMe,代码行数:7,代码来源:auth.inc.php

示例4: showEventBrief

function showEventBrief($idEvent, $showRelationship = true)
{
    if (!isUserLoggedIn()) {
        throw new RuntimeException("You need to be logged in.");
    }
    if (!canSeeEvent($_SESSION["userid"], $idEvent)) {
        throw new RuntimeException("You do not have access to this event.");
    }
    $event = getEvent($idEvent);
    $canEdit = isUserLoggedIn() && $event["owner"] === getUserID();
    echo '<div class="event_brief" id="event' . $idEvent . '">';
    echo '<div class="name"><a href="view_event.php?id=' . $idEvent . '">';
    echo '<h2>' . htmlspecialchars($event["name"]) . '</h2>';
    echo '</a></div>';
    if ($showRelationship) {
        if ($canEdit) {
            echo '<div class="owner"></div>';
        } else {
            if (isUserRegisteredInEvent(getUserID(), $idEvent)) {
                echo '<div class="registered"></div>';
            } else {
                echo '<div class="not_registered"></div>';
            }
        }
    }
    echo '<img src="database/event_image.php?id=' . $idEvent . '" alt="' . htmlspecialchars($event["name"]) . '" width="64" height="64" />';
    echo '<div class="description">';
    echo '<p class="description">' . htmlspecialchars($event["description"]) . '</p>';
    echo '</div>';
    echo '<datetime>' . htmlspecialchars($event["date"]) . '</datetime>';
    echo '</div>';
}
开发者ID:andrelago13,项目名称:LTW,代码行数:32,代码来源:view_event_brief.php

示例5: _index

function _index()
{
    //	$data['msg'][]=View::do_fetch(VIEW_PATH.'login.tpl.php');
    //	View::do_dump(VIEW_PATH.'layout.php',$data);
    isUserLoggedIn();
    redirect('news/showNews');
}
开发者ID:laiello,项目名称:ebs-academy-at-ulbs-2014,代码行数:7,代码来源:index.php

示例6: _addMaterii

function _addMaterii()
{
    isUserLoggedIn();
    $user = new User(getdbh());
    $result['profesori'] = $user->fetchByType('profesor');
    $data['msg'][] = View::do_fetch(VIEW_PATH . 'addMaterii.tpl.php', $result);
    View::do_dump(VIEW_PATH . 'layout.php', $data);
}
开发者ID:laiello,项目名称:ebs-academy-at-ulbs-2014,代码行数:8,代码来源:addMaterii.php

示例7: checkLogin

function checkLogin()
{
    if (!isUserLoggedIn()) {
        echo parseSite("login", array());
        return false;
    } else {
        return true;
    }
}
开发者ID:BRsmover,项目名称:Eventkalender,代码行数:9,代码来源:functions.php

示例8: _show_grup

function _show_grup()
{
    isUserLoggedIn();
    $grupa = new Grupa(getdbh());
    $allGroups = $grupa->fetchAll();
    $result['grupa'] = $allGroups;
    $data['msg'][] = View::do_fetch(VIEW_PATH . 'afisare_grupa.tpl.php', $result);
    View::do_dump(VIEW_PATH . 'layout.php', $data);
}
开发者ID:laiello,项目名称:ebs-academy-at-ulbs-2014,代码行数:9,代码来源:show_grup.php

示例9: _show_users

function _show_users()
{
    isUserLoggedIn();
    $user = new User(getdbh());
    $user_details = $user->fetchAll();
    $result['user'] = $user_details;
    $data['msg'][] = View::do_fetch(VIEW_PATH . 'afisare_user.tpl.php', $result);
    View::do_dump(VIEW_PATH . 'layout.php', $data);
}
开发者ID:laiello,项目名称:ebs-academy-at-ulbs-2014,代码行数:9,代码来源:show_users.php

示例10: _addTemaView

function _addTemaView()
{
    isUserLoggedIn();
    if (getUserType() == 'profesor') {
        $grupa = new Grupa(getdbh());
        $result['grupa'] = $grupa->fetchAll();
        $data['msg'][] = View::do_fetch(VIEW_PATH . 'addTema.tpl.php', $result);
        View::do_dump(VIEW_PATH . 'layout.php', $data);
    }
}
开发者ID:laiello,项目名称:ebs-academy-at-ulbs-2014,代码行数:10,代码来源:addTemaView.php

示例11: _showGrupaDetails

function _showGrupaDetails($id = 0, $numeGrupa = '')
{
    isUserLoggedIn();
    $grupa = new Grupa(getdbh());
    $result['users'] = $grupa->fetchGrupaUsers($id);
    $result['nume'] = $numeGrupa;
    $result['id'] = $id;
    $data['msg'][] = View::do_fetch(VIEW_PATH . 'showGrupaDetails.tpl.php', $result);
    View::do_dump(VIEW_PATH . 'layout.php', $data);
}
开发者ID:laiello,项目名称:ebs-academy-at-ulbs-2014,代码行数:10,代码来源:showGrupaDetails.php

示例12: _addGrupaUsers

function _addGrupaUsers($id = 0)
{
    isUserLoggedIn();
    $user = new User(getdbh());
    $getUsers = $user->fetchAll();
    $result['user'] = $getUsers;
    $result['grupaID'] = $id;
    $data['msg'][] = View::do_fetch(VIEW_PATH . 'addUserGrupa.tpl.php', $result);
    View::do_dump(VIEW_PATH . 'layout.php', $data);
}
开发者ID:laiello,项目名称:ebs-academy-at-ulbs-2014,代码行数:10,代码来源:addGrupaUsers.php

示例13: getReferralPage

function getReferralPage()
{
    if (isset($_SESSION['referral_page'])) {
        return $_SESSION['referral_page'];
    } else {
        if (isUserLoggedIn()) {
            return ACCOUNT_ROOT;
        } else {
            return SITE_ROOT;
        }
    }
}
开发者ID:lilfade,项目名称:UserFrosting,代码行数:12,代码来源:error_functions.php

示例14: updateUserPick

 function updateUserPick($pick = NULL, $pool = NULL)
 {
     global $loggedInUser, $db, $db_table_prefix;
     if (isUserLoggedIn()) {
         $round = json_decode($this->getCurrentRound())->round;
         $sql = "UPDATE " . $db_table_prefix . "pool" . $pool . " SET pick = '" . $pick . "' WHERE \n\t\t\tuserId = " . $loggedInUser->user_id . " AND\n\t\t\troundPicked = '" . $round . "'";
         $picks = $db->sql_query($sql);
         var_dump($picks);
         return '{"success":  ' . json_encode($picks) . '}';
     }
     return false;
 }
开发者ID:b2simms,项目名称:Fantasy_Football_App,代码行数:12,代码来源:funcs.football.php

示例15: generate

 public static function generate($_asJson = true)
 {
     $result = array();
     $publicKey = sha1(mt_rand_str(40));
     $privateKey = sha1(mt_rand_str(40));
     #if(CWM_API::IsTokenValid($tokenValue)) {
     if (isUserLoggedIn()) {
         $result = array('public' => $publicKey, 'private' => $privateKey);
     }
     if ($_asJson) {
         $result = CWM_API::getAsJson($result);
     }
     return $result;
 }
开发者ID:mahuidong,项目名称:CodeWithMe,代码行数:14,代码来源:ApiAuth.class.php


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