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


PHP doLogout函数代码示例

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


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

示例1: checkUser

function checkUser()
{
    if (!isset($_SESSION['current_user_name'])) {
        header('Location: ../login.php');
        exit;
    }
    if (isset($_GET['logout'])) {
        doLogout();
    }
}
开发者ID:Juklabs,项目名称:emmaline,代码行数:10,代码来源:function.php

示例2: checkUser

function checkUser()
{
    // if the session id is not set, redirect to login page
    if (!isset($_SESSION['user_id'])) {
        header('Location: ' . WEB_ROOT . 'admin/login.php');
        exit;
    }
    // the user want to logout
    if (isset($_GET['logout'])) {
        doLogout();
    }
}
开发者ID:joevanni,项目名称:gallantic-shopping-cart,代码行数:12,代码来源:functions.php

示例3: doLogout

<?php

if (!defined('WEB_ROOT')) {
    exit;
}
if (isset($_GET['function'])) {
    doLogout();
}
$self = WEB_ROOT . 'admin/index.php';
?>
<html>
<head>
<title><?php 
echo $pageTitle;
?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="<?php 
echo WEB_ROOT;
?>
admin/include/admin.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/javascript" src="<?php 
echo WEB_ROOT;
?>
library/common.js"></script>
<?php 
$n = count($script);
for ($i = 0; $i < $n; $i++) {
    if ($script[$i] != '') {
        echo '<script language="JavaScript" type="text/javascript" src="' . WEB_ROOT . 'admin/library/' . $script[$i] . '"></script>';
    }
开发者ID:jaherulalom,项目名称:SHOP-1-,代码行数:31,代码来源:template.php

示例4: str_replace

    }
}
/**
 * perform requested action
 */
if ($do) {
    if (isset($_GET['subject']) && !isNull($_GET['subject'])) {
        $subject = str_replace('/', null, $_GET['subject']);
        $subjectURL = escape($subject);
        $subjectHTML = htmlspecialchars($subject);
    }
    switch ($do) {
        case 'login':
            exit(doLogin());
        case 'logout':
            exit(doLogout());
        case 'shell':
            nonce_check();
            exit(shell_exec($_POST['cmd']));
        case 'create':
            nonce_check();
            exit(doCreate($_POST['f_name'], $_GET['f_type'], $path));
        case 'upload':
            nonce_check();
            exit(doUpload($path));
        case 'chmod':
            nonce_check();
            exit(doChmod($subject, $path, $_POST['mod']));
        case 'extract':
            nonce_check();
            exit(doExtract($subject, $path));
开发者ID:altunoren,项目名称:useful-php-scripts,代码行数:31,代码来源:Simple-PHP-file-browser-manager.php

示例5: auth

 public function auth()
 {
     $title = 'Администраторская панель';
     if (isset($_GET['logout']) and $_GET['logout'] == 'Y') {
         if (isAdmin()) {
             doLogout();
         }
         $is_auth_complete = $this::ADMIN_AUTH_LOGOUT;
         $auth_message = 'Вы не авторизованы';
         $showAuthForm = true;
     } else {
         if (isAdmin()) {
             $auth_message = 'Уже авторизован';
             $is_auth_complete = $this::ADMIN_AUTH_ALREADY;
         } else {
             if (empty($_POST['login']) or empty($_POST['password'])) {
                 $auth_message = 'Необходима авторизация';
                 $is_auth_complete = $this::ADMIN_AUTH_EMPTY;
             } else {
                 $login = $_POST['login'];
                 $password = $_POST['password'];
                 if ($login == Settings::admin_login and $password == Settings::admin_password) {
                     $auth_message = 'Авторизация успешна';
                     $is_auth_complete = $this::ADMIN_AUTH_SUCCESS;
                 } else {
                     $auth_message = 'Неверные данные';
                     $is_auth_complete = $this::ADMIN_AUTH_WRONG;
                 }
             }
             if ($is_auth_complete == $this::ADMIN_AUTH_SUCCESS) {
                 doLogin();
             }
         }
         if ($is_auth_complete == $this::ADMIN_AUTH_ALREADY or $is_auth_complete == $this::ADMIN_AUTH_SUCCESS) {
             $showAuthForm = false;
         } else {
             $showAuthForm = true;
         }
     }
     $this->data['admin-auth-result'] = array('status' => $is_auth_complete, 'message' => $auth_message, 'showAuthForm' => $showAuthForm);
     $this->render('templates/admin-auth.phtml', $title);
 }
开发者ID:b1oki,项目名称:AnotherShopCMS,代码行数:42,代码来源:views.php

示例6: doLogout

<!DOCTYPE html>
<?php 
require_once '../model/connect.php';
require_once '/var/www/html/app/library/function.php';
if (isset($_POST['logout'])) {
    $result = doLogout();
    if ($result != '') {
        $errorMessage = $result;
        echo $errorMessage;
    }
}
?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <title>Food Schedule</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=no">
        <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
        <link href="css/materialize.css" type="text/css" rel="stylesheet" media="screen,projection"/>
        <link href="css/style.css" type="text/css" rel="stylesheet" media="screen,projection"/>
        <link type="text/css" rel="stylesheet" href="css/month_white.css?v=187" />
        <link type="text/css" rel="stylesheet" href=".css/month_green.css?v=187" />    
        <link type="text/css" rel="stylesheet" href=".css/month_transparent.css?v=187" />    
              
        <link type="text/css" rel="stylesheet" href="css/calendar_transparent.css?v=187" />    
        <link type="text/css" rel="stylesheet" href="css/calendar_white.css?v=187" />    
开发者ID:Juklabs,项目名称:emmaline,代码行数:31,代码来源:FoodSchedule.php

示例7: doGetProfileOfUser

     break;
 case REQUEST_GET_PROFILE:
     # API-3
     doGetProfileOfUser($JSON);
     break;
 case REQUEST_GET_COUNTRIES_INFO:
     # API-4
     doGetAllCoutriesInfo($JSON);
     break;
 case REQUEST_EDIT_PROFILE:
     # API-5
     doEditUserProfile($JSON);
     break;
 case REQUEST_LOG_OUT:
     # API-6
     doLogout($JSON);
     break;
 case REQUEST_SEND_PUSH_NOTIFICATION_KEY:
     # API-7
     doUpdatePushNotificationKey($JSON);
     break;
 case REQUEST_GET_FULL_AVAILABLE_USERS_FOR_CHAT:
     # API-8
     doGetFullAvailableUsersForChat($JSON);
     break;
 case REQUEST_SEND_CHAT_MESSAGE:
     # API-9
     doSendChatMessage($JSON);
     break;
 case REQUEST_GET_CONVERSATION_THREADS_LIST:
     # API-10
开发者ID:dilvinriyo,项目名称:dilvinriyo-com,代码行数:31,代码来源:process.php

示例8: checkUser

function checkUser()
{
    // if the session id is not set, redirect to login page
    //if (!isset($_SESSION['me_login'])) {
    //header('Location: ' . WEB_ROOT . '../../login');
    //exit;
    //}
    // the user want to logout
    if (isset($_GET['logout'])) {
        doLogout();
    }
}
开发者ID:ideagital,项目名称:jinuemall.com,代码行数:12,代码来源:function.php

示例9: doTest

/**
 * This function runs the specified test.
 *
 * @param $test  Associative array with the test parameters.
 * @return TRUE on success, FALSE on failure.
 */
function doTest($test)
{
    $curl = curlCreate();
    $res = TRUE;
    /* Initialize SSO. */
    do {
        $loginPage = initSSO($test, $curl);
        if ($loginPage === FALSE) {
            $res = FALSE;
            break;
        }
        echo 'Logging in.' . "\n";
        $result = doLogin($test, $curl, $loginPage);
        if ($result !== "OK") {
            if (is_string($result)) {
                echo 'Failed to log in. Result from SP: ' . $result . "\n";
            } else {
                echo 'Failed to log in.' . "\n";
            }
            $res = FALSE;
            break;
        }
        echo 'Logged in, attributes OK' . "\n";
        if (array_key_exists('protocol', $test) && $test['protocol'] === 'shib13') {
            echo 'Shib13: Logout not implemented.' . "\n";
            break;
        }
        echo 'Logging out.' . "\n";
        $result = doLogout($test, $curl);
        if ($result !== "OK") {
            if (is_string($result)) {
                echo 'Failed to log out. Result from SP: ' . $result . "\n";
            } else {
                echo 'Failed to log out.' . "\n";
            }
            $res = FALSE;
            break;
        }
        echo 'Logged out.' . "\n";
    } while (0);
    curl_close($curl);
    return $res;
}
开发者ID:hukumonline,项目名称:yii,代码行数:49,代码来源:test.php

示例10: print_r

        // Not sure what this is for
        $intParentId = $line[13];
        echo "<pre>";
        print_r($line);
        echo "</pre>";
        /*try {
        			$taskId = $soapClient->addProjectTask($_SESSION['sessionId'],
        												$intGroupId,
        												$intGroupProjectId,
        												$strSummary,
        												$strDetails,
        												$intPriority,
        												$intHours,
        												$intStartDate,
        												$intEndDate,
        												$intCategoryId,
        												$intPercentComplete,
        												$arrAssignedTo,
        												$arrDependentOn,
        												$intDuration,
        												$intParentId);
        			echo "Task # ".$taskId." created<br>";
        		} catch (Exception $e) {
        			echo $e->getMessage();
        		}*/
    }
    // close file
    fclose($filehandle);
    // logout
    doLogout($soapClient, $_SESSION['sessionId']);
}
开发者ID:jsposato,项目名称:forgetaskimport,代码行数:31,代码来源:import.php

示例11: processRequests


//.........这里部分代码省略.........
            //~ wmShow($windowname);
            //~ displayCommand("xdotool windowfocus $windowhex keyup $key");
        }
        if (array_key_exists('delete', $_REQUEST)) {
            $delete = str_replace(" ", "\\ ", addslashes($_REQUEST['delete']));
            trace("delete={$delete}, close window {$windownumber}");
            if (file_exists($delete)) {
                trace("+++ DELETE FILE FROM WEBINTERFACE +++");
                unlink($delete);
            } elseif ($delete == "VNC") {
                trace("+++ DELETE VNC Client FROM DAEMON +++");
                // call via daemon: ?window=vncwin&delete=VNC&vncid=123
                trace("vnc delete in control");
                $win_id = $_REQUEST['vncid'];
                // = hexWindow in database, but not on screen
                trace("VNC cia Daemon ... id={$win_id}");
            } elseif (strstr($delete, "http")) {
                trace("+++ DELETE Browserwindow +++");
            } elseif (preg_match('/(^\\w{3,}@\\w{1,})/', $delete)) {
                trace("+++ DELETE VNC Client FROM WEBINTERFACE +++");
                // call via webinterface
                $win_id = $db->querySingle("SELECT win_id FROM window WHERE file='{$delete}' AND handler='vnc'");
                trace("DELETE VNC Window with ID={$win_id} FROM Database ::\n                SELECT win_id FROM window WHERE file='{$delete}' AND handler='vnc'");
            } else {
                trace("Unhandled delete for '{$delete}'");
            }
            wmClose($win_id);
            $db->deleteWindow($win_id);
        }
        if (array_key_exists('closeOrphans', $_REQUEST)) {
            // win_ids in db
            $windows_in_db = $db->getWindows();
            $db_ids = array();
            if (count($windows_in_db) > 0) {
                foreach ($windows_in_db as $win) {
                    array_push($db_ids, $win['win_id']);
                }
            }
            // win_ids on screen
            $screen_ids = windowListOnScreen();
            // orphaned windows
            $orphan_ids = array_diff($screen_ids, $db_ids);
            if (count($orphan_ids) > 0) {
                // close windows on screen not existing in database
                foreach ($orphan_ids as $id) {
                    wmClose($id);
                }
            }
        }
        if (array_key_exists('toggle', $_REQUEST)) {
            // Change window state from visible to invisible and vice versa.
            $state = $db->getState_Window($win_id);
            trace("toggle window {$windownumber}, id={$win_id}, state={$state}");
            if ($state == "active") {
                wmHide($win_id);
                $db->setState_Window($win_id, "inactive");
            } else {
                wmShow($win_id);
                $db->setState_Window($win_id, "active");
            }
        }
    } elseif (array_key_exists('layout', $_REQUEST)) {
        setLayout($_REQUEST['layout']);
    } elseif (array_key_exists('logout', $_REQUEST)) {
        doLogout($_REQUEST['logout']);
    } elseif (array_key_exists('newVncWindow', $_REQUEST)) {
        // TODO: Better write new code for VNC window.
        addNewWindow($db, unserialize(urldecode($_REQUEST['newVncWindow'])));
    } elseif (array_key_exists('newWindow', $_REQUEST)) {
        createNewWindow($db, unserialize(urldecode($_REQUEST['newWindow'])));
    }
    if (array_key_exists('switchWindows', $_REQUEST)) {
        $before = $_REQUEST['before'];
        $after = $_REQUEST['after'];
        trace("switching {$before} and {$after}");
        // exchange section
        $win_id1 = $db->getWindowIDBySection($before);
        $win_id2 = $db->getWindowIDBySection($after);
        $db->updateWindow($win_id1, 'section', $after);
        $db->updateWindow($win_id2, 'section', $before);
        trace("++updating database {$win_id1} section={$after}");
        trace("++updating database {$win_id2} section={$before}");
        // Update display (no layout change).
        setLayout(null);
    }
    if (array_key_exists('openURL', $_REQUEST)) {
        $openURL = $_REQUEST['openURL'];
        trace("openURL {$openURL}");
        $dt = new DateTime();
        $date = $dt->format('Y-m-d H:i:s');
        $window = array("id" => "", "win_id" => "", "section" => "", "state" => "", "file" => $openURL, "handler" => "/usr/bin/nohup /usr/bin/dwb", "userid" => "", "date" => $date);
        createNewWindow($db, $window);
    }
    // TODO: chef if query redundant?
    if (array_key_exists('closeAll', $_REQUEST)) {
        $close = $_REQUEST['closeAll'];
        trace("close all windows {$close}");
        closeAll();
    }
}
开发者ID:gertiksxx,项目名称:PalMA,代码行数:101,代码来源:control.php

示例12: scanFolder

if (($session == '' && $passphrase == '') || !login()) {
  $onload = 'passphrase';
  $page = 'login';
} else {
   if ($values == '') {
    $values = scanFolder($folder);
    $valueskv = $client->array2kv($values);
  }
}

$title = "Loom Wallet";

if ($page == 'main') doMain();
elseif ($page == 'locations') doLocations();
elseif ($page == 'add_location') doAddLocation();
elseif ($page == 'logout') doLogout();

drawHead();

if ($page == 'login') drawLogin();
elseif ($page == 'main') drawMain();
elseif ($page == 'locations') drawLocations();
elseif ($page == 'add_location') drawAddLocation();

drawTail();

function doMain() {
  global $qty, $type, $location, $take, $give;
  global $client, $folder, $folder_loc, $folder_name;
  global $values, $valueskv;
  global $message;
开发者ID:billstclair,项目名称:loomclient,代码行数:31,代码来源:ip.php

示例13: checkAdmin

function checkAdmin()
{

// if the session id is not set, redirect to login page

$admin =isset($_POST['name']) ? $_POST['name'] : $_SESSION['stpetersadminname'];
$adminpassword =isset($_POST['password']) ? $_POST['password'] : $_SESSION['adminpassword'];
 
if (!isset($admin))
	 {
		
	?>
	<script type = "text/javascript">
				<!-- user feedback						 
				var myurl="index.php?loginadmin=true"
				if(confirm('This are requires Administrative rights!\n Do you want to Login as Admin?')){
				
				window.location.assign(myurl);
				}
                // -->
                </script>
	<?
exit;
	}
	
	// the user want to logout
	if (isset($_GET['logout'])) {
		doLogout();


	}
}
开发者ID:brightmore,项目名称:ChurchMIS,代码行数:32,代码来源:functions.php

示例14: main

function main()
{
    ini_set('memory_limit', '-1');
    header('Cache-Control: no-cache, no-store, must-revalidate');
    header('Pragma: no-cache');
    header("Expires: 0");
    $query = getP('q');
    $query === 'authinfo' or checkNASauth() or err(401);
    switch ($query) {
        //Get info
        case 'info':
            printJSON(getInfo());
            break;
            //Get authinfo
        //Get authinfo
        case 'authinfo':
            printJSON(array('url' => getNASLoginURL()));
            break;
            //Login
        //Login
        case 'dologin':
            printJSON(doLogin());
            break;
            //Get service autologin token
        //Get service autologin token
        case 'autologintoken':
            printJSON(getAutoLoginToken());
            break;
            //Logout
        //Logout
        case 'dologout':
            printJSON(array('success' => doLogout()));
            break;
            //Signup
        //Signup
        case 'getsignupurl':
            printJSON(getSignupUrl());
            break;
            //Download log
        //Download log
        case 'log':
            printLogFile();
            break;
    }
}
开发者ID:jhixson74,项目名称:elephantdrive,代码行数:45,代码来源:ed.php


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