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

PHP getSessionVariable函数代码示例

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

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



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

示例1: db_error_logger

	function db_error_logger($errno, $errstr, $errfile = "", $errline = "", $errorcontext = array()){
	
		$errno = makeStringSafe($errno);
		$errstr = makeStringSafe($errstr);
		$errfile = makeStringSafe($errfile);
		$errline = makeStringSafe($errline);
		
		if($errno < E_STRICT){
	
			doQuery("INSERT INTO ".getDBPrefix()."_error_log set user_id = '".getSessionVariable("user_id")."', error_number = '".$errno."',
				message = '".$errstr."', file = '".$errfile."', line_number = '".$errline."', context = '".serialize($errorcontext)."',
				time = '".getCurrentMySQLDateTime()."'");
				
			$errorrow = mysql_fetch_assoc(doQuery("SELECT error_id FROM ".getDBPrefix()."_error_log ORDER BY error_id DESC LIMIT 1"));
			
			if(getConfigVar('error_output') == ERROR_OUTPUT_DBID || getConfigVar('error_output') == ERROR_OUTPUT_BOTH){
			
				echo "<h4 style=\"color: #FF0000;\">An error occured! If you would like to report this error, please report that your 'ERROR_ID' is '".$errorrow['error_id']."'.</h4>";
			
			}
		
		}
		
		return !(getConfigVar("error_output") == ERROR_OUTPUT_PHP || getConfigVar("error_output") == ERROR_OUTPUT_BOTH);
	
	}
开发者ID:ramielrowe,项目名称:Radford-Reservation-System,代码行数:26,代码来源:error_functions.php


示例2: testCreateReservationFromWeekdaytoWeekend

	public function testCreateReservationFromWeekdaytoWeekend(){
	
		$this->setSessionUserAdmin();
		$startDate = '2011-11-18'; # A Friday
		$length = 1;
		$endDate = '2011-11-21'; # The Next Monday
		$actualLength = 3;
		$equipId = 1;
		$userComment = "test user comment";
		$adminComment = "test admin comment";
		$modStatus = RES_STATUS_PENDING;
		
		createReservation(getSessionVariable('user_id'), $equipId, $startDate, $length, $userComment, $adminComment, $modStatus);
		
		$actualReservation = mysql_fetch_assoc(doQuery("select * from ".getConfigVar('db_prefix')."_reservations ORDER BY res_id DESC LIMIT 1"));
		
		$this->assertEquals(getSessionVariable('user_id'), $actualReservation['user_id'], "User IDs not equal");
		$this->assertEquals($equipId, $actualReservation['equip_id'], "Equip IDs not equal");
		$this->assertEquals($startDate, $actualReservation['start_date'], "Start dates not equal");
		$this->assertEquals($actualLength, $actualReservation['length'], "Lengths not equal");
		$this->assertEquals($endDate, $actualReservation['end_date'], "End dates not equal");
		$this->assertEquals($userComment, $actualReservation['user_comment'], "User comments not equal");
		$this->assertEquals($adminComment, $actualReservation['admin_comment'], "Admin comments not equal");
		$this->assertEquals($modStatus, $actualReservation['mod_status'], "Statuses not equal");
	
	}
开发者ID:ramielrowe,项目名称:Radford-Reservation-System,代码行数:26,代码来源:TestCaseResFunctionsTest.php


示例3: checkAuthResult

function checkAuthResult()
{
    $code = getVariable('code', FALSE);
    $state = getVariable('state', FALSE);
    $provider = createProvider([], []);
    $oauthUnguessable = getSessionVariable('oauthUnguessable', null);
    if (!$code || !$state || !$oauthUnguessable) {
        return;
    }
    if ($state !== $oauthUnguessable) {
        //Miss-match on what we're tring to validated.
        echo "Mismatch on secret'";
        return;
    }
    try {
        $api = $provider->make('DebugGithub');
        //$client
        /** @var  $api DebugGithub */
        $command = $api->oauthAuthorize(GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET, $code, "http://" . SERVER_HOSTNAME . "/github/return.php");
        $accessResponse = $command->execute();
        setSessionVariable(GITHUB_ACCESS_RESPONSE_KEY, $accessResponse);
        if ($accessResponse->oauthScopes) {
            echo "You are now authed for the following scopes:<br/>";
            foreach ($accessResponse->oauthScopes as $scope) {
                echo $scope . "<br/>";
            }
        }
    } catch (GithubArtaxServiceException $fae) {
        echo "Exception processing response: " . $fae->getMessage();
    }
}
开发者ID:danack,项目名称:githubartaxservice,代码行数:31,代码来源:return.php


示例4: checkAuthResult

function checkAuthResult()
{
    $code = getVariable('code', FALSE);
    $state = getVariable('state', FALSE);
    $oauthUnguessable = getSessionVariable('oauthUnguessable', null);
    if (!$code || !$state || !$oauthUnguessable) {
        return;
    }
    if ($state != $oauthUnguessable) {
        //Miss-match on what we're tring to validated.
        echo "Miss-match on secret'";
        return;
    }
    try {
        $api = new \AABTest\GithubAPI\GithubAPI();
        $command = $api->accessToken(GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET, $code, "http://" . SERVER_HOSTNAME . "/github/return.php");
        $response = $command->execute();
        setSessionVariable('githubAccess', $response);
        echo "You are now authed for the following scopes:<br/>";
        foreach ($response->scopes as $scope) {
            echo $scope . "<br/>";
        }
    } catch (\AABTest\GithubAPI\GithubAPIException $fae) {
        echo "Exception processing response: " . $fae->getMessage();
    }
}
开发者ID:danack,项目名称:artaxservicebuilder,代码行数:26,代码来源:return.php


示例5: testGetSessionVariableShouldGetValue

	public function testGetSessionVariableShouldGetValue()
	{
		$variableName = "varTestSet";
		$expectedValue = "TestValue2";
		
		setSessionVariable($variableName, $expectedValue);
		$actualValue = getSessionVariable($variableName);
		
		$this->assertEquals($expectedValue, $actualValue,
			"getSessionVariable(variable_name, value) got incorrect value.");
			
	}
开发者ID:ramielrowe,项目名称:Radford-Reservation-System,代码行数:12,代码来源:TestCaseFunctionsTest.php


示例6: addEquipment

function addEquipment($name, $type, $serial, $description, $max, $picture, $minuserlevel, $checkoutfrom)
{
    $name = makeStringSafe($name);
    $type = makeStringSafe($type);
    $serial = makeStringSafe($serial);
    $description = makeStringSafe($description);
    $max = makeStringSafe($max);
    $picture = makeStringSafe($picture);
    $minuserlevel = makeStringSafe($minuserlevel);
    $checkoutfrom = makeStringSafe($checkoutfrom);
    doQuery("INSERT INTO " . getDBPrefix() . "_equipment SET name = '" . $name . "', type = '" . $type . "', serial = '" . $serial . "', description = '" . $description . "', max_length = '" . $max . "', picture = '" . $picture . "', min_user_level = '" . $minuserlevel . "', checkoutfrom = '" . $checkoutfrom . "'");
    $equip = mysql_fetch_assoc(doQuery("SELECT equip_id FROM " . getDBPrefix() . "_equipment ORDER BY equip_id DESC LIMIT 1"));
    logAddEquipment(getSessionVariable('user_id'), $equip['equip_id']);
}
开发者ID:ramielrowe,项目名称:Reservation-System-V1,代码行数:14,代码来源:adminfunctions.php


示例7: mysql_fetch_assoc

<?php

if ($pageid == "warnuser") {
    $user = mysql_fetch_assoc(getUserByID($_GET['user_id']));
    echo "\r\n\r\n\t\t<center><h3>Warn " . $user['name'] . "</h3></center>\r\n\r\n\t\t<form action=\"./index.php?pageid=submitwarning\" method=\"POST\">\r\n\t\t<input type=\"hidden\" name=\"user_id\" value=\"" . $_GET['user_id'] . "\">\r\n\t\t\t<table class=\"warning\">\r\n\t\t\t\r\n\t\t\t\t<tr>\r\n\t\t\t\t\r\n\t\t\t\t\t<td colspan=2 class=\"centeredcellbold\">Warn Reason</td>\r\n\t\t\t\t\t\r\n\t\t\t\t</tr>\r\n\t\t\t\t\r\n\t\t\t\t<tr>\r\n\t\t\t\t\r\n\t\t\t\t\t<td colspan=2 class=\"centeredcellbold\"><textarea cols=\"55\" rows=\"7\" name=\"reason\"></textarea></td>\r\n\t\t\t\t\r\n\t\t\t\t</tr>\r\n\t\t\t\t\r\n\t\t\t\t<tr>\r\n\t\t\t\t\r\n\t\t\t\t\t<td class=\"centeredcell\"><select name=\"type\"><option value=\"1\">Active</option><option value=\"2\">Notification</option><option value=\"3\">Inactive</option></select></td>\r\n\t\t\t\t\t<td class=\"centeredcell\"><input type=\"submit\" value=\"Warn\"></textarea></td>\r\n\t\t\t\t\r\n\t\t\t\t</tr>\r\n\t\t\t\r\n\t\t\t</table>\r\n\t\t\r\n\t\t</form>\r\n\r\n\t";
} else {
    if ($pageid == "submitwarning") {
        warnUser($_POST['user_id'], $_POST['reason'], $_POST['type']);
        $user = mysql_fetch_assoc(getUserByID($_POST['user_id']));
        echo "<center><h3>" . $user['name'] . " Warned</h3><a href=\"./index.php?pageid=edituser&user=" . $user['user_id'] . "\">View User</a></center>";
    } else {
        if ($pageid == "viewwarnings") {
            if (getSessionVariable('user_level') < getConfigVar("admin_rank") && getSessionVariable('user_id') != $_GET['user_id']) {
                echo "<center><h3><font color=\"#FF0000\">Error: You are not authorized to view other user's warnings.</font></h3></center>";
            } else {
                $warnings = getWarningsForUser($_GET['user_id']);
                $user = mysql_fetch_assoc(getUserByID($_GET['user_id']));
                $options = "";
                while ($row = mysql_fetch_assoc($warnings)) {
                    $options = $options . "<option value=\"" . $row['warn_id'] . "\">" . $row['time'] . " - " . getWarningType($row['type']) . "</option>";
                }
                echo "<center><h3>View Warnings For " . $user['name'] . "</h3>";
                if ($options != "") {
                    echo "<form action=\"index.php\" method=\"GET\">\r\n\t\t\t<input type=\"hidden\" name=\"pageid\" value=\"editwarning\">\r\n\t\t\t<select name=\"warn_id\">" . $options . "</select><input type=\"submit\" value=\"View\"></form></center>";
                } else {
                    echo "<h4>User has no warnings.</h4>";
                }
            }
        } else {
            if ($pageid == "editwarning" || $pageid == "savewarning") {
                $message = "";
开发者ID:ramielrowe,项目名称:Reservation-System-V1,代码行数:31,代码来源:warn.php


示例8: getSessionVariable

<?php

require "githubBootstrap.php";
use GithubService\GithubArtaxService\GithubArtaxServiceException;
use Amp\Artax\DnsException;
echo <<<END
<html>
<body>
<h3><a href='/'>Oauth test home</a> </h3>
END;
/** @var  $accessResponse \GithubService\Model\AccessResponse */
$accessResponse = getSessionVariable(GITHUB_ACCESS_RESPONSE_KEY);
if ($accessResponse) {
    if (!$accessResponse instanceof GithubService\Model\AccessResponse) {
        //class was renamed...or something else bad happened.
        setSessionVariable(GITHUB_ACCESS_RESPONSE_KEY, null);
        $accessResponse = null;
    }
}
$shareClasses = [];
if ($accessResponse) {
    $shareClasses['GithubService\\Model\\AccessResponse'] = $accessResponse;
}
$provider = createProvider([], $shareClasses);
//These actions need to be done before the rest of the page.
$action = getVariable('action');
switch ($action) {
    case 'delete':
        unsetSessionVariable(GITHUB_ACCESS_RESPONSE_KEY);
        $accessResponse = null;
        break;
开发者ID:danack,项目名称:githubartaxservice,代码行数:31,代码来源:index.php


示例9: if

	}else{
		
		$message = "<font color=\"#005500\"><b>Error: A Required Field Was Left Blank</b></font><br><br>";
	
	}

}
else if($pageid == "saveemail"){

	$email = $_POST['email'];
	
	if($email != ""){

		changeUserEmail(getSessionVariable('user_id'), $email);
		
		$user = mysql_fetch_assoc(getUserByID(getSessionVariable('user_id')));
		
		$message = "<font color=\"#005500\"><b>Email Updated!</b></font><br><br>";
	
	}else{
		
		$message = "<font color=\"#FF0000\"><b>Error: Email Field Was Left Blank</b></font><br><br>";
	
	}

}


$pageData = "
	<center><h3>My Account</h3>".$message."</center>
	
开发者ID:ramielrowe,项目名称:Radford-Reservation-System,代码行数:30,代码来源:myaccount.php


示例10: getVariable

require "flickrBootstrap.php";
use ArtaxApiBuilder\Service\OauthConfig;
$action = getVariable('action');
if ($action === 'delete') {
    unsetSessionVariable('oauthAccessToken');
    unsetSessionVariable('oauthRequest');
}
echo <<<END

<html>
<body>
<h3><a href='/'>Oauth test home</a> </h3>
END;
/** @var \AABTest\OauthAccessToken $oauthAccessToken */
$oauthAccessToken = getSessionVariable('oauthAccessToken');
if ($oauthAccessToken == null) {
    echo "<p>You are not flickr authorised.</p>";
    createOauthRequest();
} else {
    echo "<p>You are flickr authorised.</p>";
    showFlickrStatus($oauthAccessToken);
    echo "<p><a href='/flickr/index.php?action=delete'>Delete authority</a></p>";
}
echo <<<END

</body>
</html>

END;
function showFlickrStatus(\AABTest\OauthAccessToken $oauthAccessToken)
开发者ID:danack,项目名称:artaxservicebuilder,代码行数:30,代码来源:index.php


示例11:

                }
            }
            $page = $page . "<center><h3>You need to be logged in to view this page.</h3>\n\t\t<font color=\"#FF0000\">" . $errormessage . "</font></center>\n\t\t<form action=\"./confirmReservation.php\" method=\"POST\">\n\t\t\t<input type=\"hidden\" name=\"resid\" value=\"" . $resid . "\"><input type=\"hidden\" name=\"page\" value=\"login\">\n\t\t\t<table class=\"login\">\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=2 class=\"header\">User Login</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=\"centeredcellbold\">Username</td>\n\t\t\t\t\t<td class=\"centeredcell\"><input type=\"text\" name=\"id\"></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=\"centeredcellbold\">Password</td>\n\t\t\t\t\t<td class=\"centeredcell\"><input type=\"password\" name=\"pass\"></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=2 class=\"centeredcellbold\"><input type=\"submit\" value=\"Login\"></td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</form>";
        }
    }
}
?>

<html>

<head>

<LINK REL=StyleSheet HREF="./style.css" TYPE="text/css">

<title><?php 
if (issetSessionVariable('user_level') && getSessionVariable('user_level') >= RES_USERLEVEL_ADMIN) {
    echo "Reservation Confirmation Page";
}
?>
</title>

</head>

<body>



<?php 
echo $page;
?>
开发者ID:ramielrowe,项目名称:Reservation-System-V1,代码行数:30,代码来源:confirmReservation.php


示例12: if

		$status = "D";
	
	}
	else if($row['mod_status']==RES_STATUS_CHECKED_IN){
	
		$status = "CI";
	
	}
	else if($row['mod_status']==RES_STATUS_CHECKED_OUT){
		$status = "CO";
	}

	$equip = mysql_fetch_assoc(getEquipmentByID($row['equip_id']));
	$user = mysql_fetch_assoc(getUserByID($row['user_id']));
	$editlink = "&nbsp;&nbsp;-&nbsp;&nbsp;";
	if(getSessionVariable('user_level') == getConfigVar("admin_rank")){
		$editlink = "<a href=\"./index.php?pageid=editreservation&resid=".$row['res_id']."\">Edit</a>";
	}
	$browsetable = $browsetable . "<tr><td class=\"centeredcell\"><a href=\"./userinfo.php?user_id=".$user['user_id']."\" target=\"_BLANK\">".$user['name']."</a></td><td class=\"centeredcell\">".$equip['name']."</td><td class=\"centeredcell\">".$row['start_date']."</td><td class=\"centeredcell\">".$status."</td><td class=\"centeredcell\">".$row['end_date']."</td><td class=\"centeredcell\"><a href=\"./index.php?pageid=viewreservation&resid=".$row['res_id']."\">View</a></td><td class=\"centeredcell\">".$editlink."</td></tr>";

}

$browsetable = $browsetable . "</table>";

echo "
<script language=\"JavaScript\" id=\"jscal1x\">
var cal1x = new CalendarPopup(\"testdiv1\");
</script>

<center>
	<h3>Browse Reservations</h3>
开发者ID:ramielrowe,项目名称:Radford-Reservation-System,代码行数:31,代码来源:browsereservations.php


示例13: getAllMessages

<?php
if(issetSessionVariable('user_level')){
	if(getSessionVariable('user_level') >= RES_USERLEVEL_ADMIN){
	
		
	
	}
	else{
		echo "Error: You don't have permissions to access this page!";
		die("");
		
	}
	
}
else{
	echo "Error: You don't have permissions to access this page!";
	die("");
}
if($pageid == "messages"){
	$messages = getAllMessages();
	
	$select = "<select name=\"messageid\">";
	
	while($row = mysql_fetch_assoc($messages)){
	
		$select = $select . "<option value=\"".$row['message_id']."\">".$row['start_date']." to ".$row['end_date']." - Priority ".$row['priority']."</option>";
	
	}
	
	$select = $select . "</select>";
开发者ID:ramielrowe,项目名称:Radford-Reservation-System,代码行数:30,代码来源:messages.php


示例14: addMessage

        } else {
            if ($pageid == "createmessage") {
                require 'adminfunctions.php';
                $startdate = $_POST['startdate'];
                $enddate = $_POST['enddate'];
                $priority = $_POST['priority'];
                $body = $_POST['body'];
                addMessage(getSessionVariable('user_id'), $startdate, $enddate, $priority, $body);
                echo "<center><h3>New Message Created!</h3></center>";
            } else {
                if ($pageid == "savemessage") {
                    require 'adminfunctions.php';
                    $messageid = $_POST['messageid'];
                    $startdate = $_POST['startdate'];
                    $enddate = $_POST['enddate'];
                    $priority = $_POST['priority'];
                    $body = $_POST['body'];
                    saveMessage($messageid, getSessionVariable('user_id'), $startdate, $enddate, $priority, $body);
                    echo "<center><h3>Message Saved!</h3></center>";
                } else {
                    if ($pageid == "deletemessage") {
                        require 'adminfunctions.php';
                        $messageid = $_POST['messageid'];
                        deleteMessage($messageid);
                        echo "<center><h3>Message Deleted</h3></center>";
                    }
                }
            }
        }
    }
}
开发者ID:ramielrowe,项目名称:Reservation-System-V1,代码行数:31,代码来源:messages.php


示例15: deleteReservation

function deleteReservation($res_id)
{
    $res_id = makeStringSafe($res_id);
    doQuery("DELETE FROM " . getDBPrefix() . "_reservations WHERE res_id = " . $res_id . "");
    logAdminDeleteReservation(getSessionVariable('user_id'), $res_id);
}
开发者ID:ramielrowe,项目名称:Reservation-System-V1,代码行数:6,代码来源:db_res_functions.php


示例16: getCurrentMessages

Purpose:
This is the first page shown to a logged in user. It displays the current
pickup/drop off schedule along with the users recent reservations.
Known Bugs/Fixes:
None
*/
$messages = "";
$mesResult = getCurrentMessages();
if (mysql_num_rows($mesResult) > 0) {
    $messages = "<h3>System Messages</h3>";
    while ($row = mysql_fetch_assoc($mesResult)) {
        $messages = $messages . "<div class=\"messageoutter\"><div class=\"priority" . $row['priority'] . "message\">" . $row['body'] . "</div></div>";
    }
}
$equipment = "";
$resresult = getReservationsByUserID(getSessionVariable('user_id'), 5);
while ($row = mysql_fetch_assoc($resresult)) {
    $equip = mysql_fetch_assoc(getEquipmentByID($row['equip_id']));
    $status = "unknown";
    if ($row['mod_status'] == RES_STATUS_PENDING) {
        $status = "Pending";
    } else {
        if ($row['mod_status'] == RES_STATUS_CONFIRMED) {
            $status = "Approved";
        } else {
            if ($row['mod_status'] == RES_STATUS_DENIED) {
                $status = "Denied";
            } else {
                if ($row['mod_status'] == RES_STATUS_CHECKED_IN) {
                    $status = "Checked-In";
                } else {
开发者ID:ramielrowe,项目名称:Reservation-System-V1,代码行数:31,代码来源:home.php


示例17: if

<?php

	if(!issetSessionVariable('user_level') || getSessionVariable('user_level') < RES_USERLEVEL_ADMIN){
	
		die("You don't have permission to access this page!");
	
	}else{
	
		$displayhome = true;
		$equipmessage = "";
	
		if(isset($_POST['myaction']) && $_POST['myaction'] == "new"){
		
			if($_POST['form'] == "equipment"){
				
				$displayhome = false;
				require 'newequip.php';
			
			}
			
		
		}
		else if(isset($_POST['myaction']) && $_POST['myaction'] == "delete"){
		
			if($_POST['form'] == "equipment"){
			
				deleteEquipmentByID($_POST['selector']);
			
			}
			
		
开发者ID:ramielrowe,项目名称:Radford-Reservation-System,代码行数:29,代码来源:equipment.php


示例18: createAdminReservation

        echo "<center><h3>Make Reservation</h3>" . $message . "\r\n\t\t\r\n\t\t<form action=\"./index.php?pageid=finishmakeres\" method=\"POST\">\r\n\t\t\r\n\t\t\t<input type=\"hidden\" name=\"user_id\" value=\"" . $userid . "\">\r\n\t\t\t<input type=\"hidden\" name=\"equip_id\" value=\"" . $equipid . "\">\r\n\t\t\t<input type=\"hidden\" name=\"startdate\" value=\"" . $startdate . "\">\r\n\t\t\t<input type=\"hidden\" name=\"length\" value=\"" . $length . "\">\r\n\t\t\t<input type=\"hidden\" name=\"usercomment\" value=\"" . $usercomment . "\">\r\n\t\t\t<input type=\"hidden\" name=\"admincomment\" value=\"" . $admincomment . "\">\r\n\t\t\r\n\t\t\tAre you sure you want to make this reservation?<br>\r\n\t\t\t<input type=\"radio\" name=\"confirm\" value=\"yes\">: Yes -- <input type=\"radio\" name=\"confirm\" value=\"no\">: No\r\n\t\t\t<br><input type=\"submit\" value=\"continue\">\r\n\t\t\r\n\t\t</form></center>\r\n\t\t\r\n\t\t";
        $alreadyRes = true;
    } else {
        if (isset($_POST['confirm']) && $_POST['confirm'] == "no") {
            $alreadyRes = true;
            $message = "<font color=\"#005500\"><b>Reservation Aborted.</b></font><br><br>";
        }
    }
    if (!$alreadyRes && $equipid != "" && $startdate != "" && $length != "") {
        createAdminReservation(getSessionVariable('user_id'), $userid, $equipid, $startdate, $length, $usercomment, $admincomment, 1);
        $message = "<font color=\"#005500\"><b>Successfully created new reservation!</b></font><br><br>";
    }
}
$users = "<select name=\"user_id\">";
$userresult = getAllUsersOrderByName();
while ($row = mysql_fetch_assoc($userresult)) {
    $users = $users . "<option value=\"" . $row['user_id'] . "\">" . $row['name'] . "</option>";
}
$equipment = "<select name=\"equip_id\">";
$equipresult = getAllEquipment();
while ($row = mysql_fetch_assoc($equipresult)) {
    if (getSessionVariable('user_level') >= $row['min_user_level']) {
        $equipment = $equipment . "<option value=\"" . $row['equip_id'] . "\">" . $row['name'] . " -- Max: " . $row['max_length'] . " day(s)</option>";
    }
}
$equipment = $equipment . "</select>";
if (!$alreadyRes) {
    echo "\r\n<script language=\"JavaScript\" id=\"jscal1x\">\r\nvar cal1x = new CalendarPopup(\"testdiv1\");\r\n</script>\r\n\r\n\t<center><h3>Make Reservation</h3>" . $message . "</center>\r\n\t\r\n\t<form action=\"./index.php?pageid=finishmakeres\" method=\"POST\">\r\n\t\r\n\t<table class=\"reservation\">\r\n\t\r\n\t\t<tr>\r\n\r\n\t\t\t<td colspan=4 class=\"header\">Reservation Information</td>\r\n\t\t\t\r\n\t\t</tr>\r\n\t\t<tr>\r\n\r\n\t\t\t<td class=\"centeredcellbold\">User</td>\r\n\t\t\t<td colspan=3 class=\"centeredcell\">" . $users . "</td>\r\n\t\t\t\r\n\t\t</tr>\r\n\t\r\n\t\t<tr>\r\n\r\n\t\t\t<td class=\"centeredcellbold\">Equipment</td>\r\n\t\t\t<td colspan=3 class=\"centeredcell\">" . $equipment . "</td>\r\n\t\t\t\r\n\t\t</tr>\r\n\t\r\n\t\t<tr>\r\n\t\t\r\n\t\t\t<td class=\"centeredcellbold\">Date (YYYY-MM-DD)</td>\r\n\t\t\t<td class=\"centeredcell\"><input type=\"text\" name=\"startdate\" id=\"startdate\" onClick=\"cal1x.select(document.forms[0].startdate,'anchor1x','yyyy-MM-dd'); return false;\"><a style=\"visibility:hidden;\" name=\"anchor1x\" id=\"anchor1x\">a</a></td>\r\n\t\t\t<td class=\"centeredcellbold\">Length</th>\r\n\t\t\t<td class=\"centeredcell\"><input type=\"text\" size=5 name=\"length\"></td>\r\n\t\r\n\t\t</tr>\r\n\t\r\n\t\t<!--<tr>\r\n\t\t\t\r\n\t\t\t<td colspan=4 class=\"centeredcellbold\">Pickup Time: \r\n\t\t\t\t<select name=\"pickup\">\r\n\t\t\t\t\t<option value=\"10am-12pm (Monday/Friday)\">10am-12pm (Monday/Friday)</option>\r\n\t\t\t\t\t<option value=\"9am-12pm (Tuesday)\">9am-12pm (Tuesday)</option>\r\n\t\t\t\t\t<option value-\"9-10 (Wednesday/Thursday)\">9-10 (Wednesday/Thursday)</option>\r\n\t\t\t\t\t<option value=\"2pm-4pm (Wednesday)\">2pm-4pm (Wednesday)</option>\r\n\t\t\t\t\t<option value=\"12pm-2pm (Thursday)\">12pm-2pm (Thursday)</option>\r\n\t\t\t\t</select>\r\n\t\t\t</td>\r\n\t\t\t\t\r\n\t\t</tr>-->\r\n\r\n\t\t<tr>\r\n\t\t\r\n\t\t\t<td colspan=1 class=\"centeredcellbold\">User Comment</td>\r\n\t\t\t<td class=\"centeredcell\" colspan=3><textarea rows=5 cols=45 name=\"usercomment\"></textarea></td>\r\n\t\t\r\n\t\t</tr>\r\n\r\n\t\t<tr>\r\n\t\t\r\n\t\t\t<td colspan=1 class=\"centeredcellbold\">Admin Comment</td>\r\n\t\t\t<td class=\"centeredcell\" colspan=3><textarea rows=5 cols=45 name=\"admincomment\"></textarea></td>\r\n\t\t\r\n\t\t</tr>\r\n\t\t\t\r\n\t\t\t<tr>\r\n\t\t\t\r\n\t\t\t\t<td colspan=4 class=\"centeredcellbold\"><input type=\"submit\" value=\"Reserve\"></td>\r\n\t\r\n\t\t\t</tr>\r\n\t\t\t\r\n\t\t</table>\r\n\t\t</form><DIV ID=\"testdiv1\" STYLE=\"position:absolute;visibility:hidden;background-color:white;\"></DIV>";
} else {
    echo "<center><h3>Make Reservation</h3>" . $message . "</center>";
}
开发者ID:ramielrowe,项目名称:Reservation-System-V1,代码行数:31,代码来源:makereservation.php


示例19: if

					<td class=\"centeredcellbold\">Password</td>
					<td class=\"centeredcell\"><input type=\"password\" name=\"pass\"></td>
				</tr>
				<tr>
					<td colspan=2 class=\"centeredcellbold\"><input type=\"submit\" value=\"Login\"></td>
				</tr>
			</table>
		</form>";

}

?>

<html>

	<head>
	
		<LINK REL=StyleSheet HREF="./style.css" TYPE="text/css">
		
		<title><?php if(issetSessionVariable('user_level') && getSessionVariable('user_level') >= RES_USERLEVEL_ADMIN) echo "Reservation Confirmation Page"; ?></title>
	
	</head>
	
	<body>
	
		<?php echo $page; ?>
	
	</body>

</html>
开发者ID:ramielrowe,项目名称:Radford-Reservation-System,代码行数:30,代码来源:confirmReservation.php


示例20: getSessionVariable

<?php

require "githubBootstrap.php";
use AABTest\GithubAPI\GithubAPI;
use AABTest\Github\AccessResponse;
use ArtaxApiBuilder\Service\StoredLink;
echo <<<END

<html>
<body>
<h3><a href='/'>Oauth test home</a> </h3>
END;
/** @var \AABTest\Github\AccessResponse */
$accessResponse = getSessionVariable('githubAccess');
//These actions need to be done before the rest of the page.
$action = getVariable('action');
switch ($action) {
    case 'delete':
        unsetSessionVariable('githubAccess');
        break;
    case 'revoke':
        revokeAuthority($accessResponse);
        break;
}
try {
    if ($accessResponse == null) {
        echo "<p>You are not github authorised.</p>";
        //        $scopes = [
        //            \ArtaxApiBuilder\Service\Github::SCOPE_USER_EMAIL,
        //            \ArtaxApiBuilder\Service\Github::SCOPE_ORG_READ,
        //            \ArtaxApiBuilder\Service\Github::SCOPE_USER
开发者ID:danack,项目名称:artaxservicebuilder,代码行数:31,代码来源:index.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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