本文整理汇总了PHP中isAuthenticated函数的典型用法代码示例。如果您正苦于以下问题:PHP isAuthenticated函数的具体用法?PHP isAuthenticated怎么用?PHP isAuthenticated使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了isAuthenticated函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: listAllCalendars
function listAllCalendars(Google_Client &$client)
{
if (!isAuthenticated($client)) {
return;
}
$calList = createCalendar($client)->calendarList->listCalendarList();
print "<h1>Calendar List</h1><pre>" . print_r($calList, true) . "</pre>";
}
示例2: calculate
public static function calculate()
{
$count = count($_SESSION['BREADCRUMBMANAGER']);
if ($count > 0) {
$index = -1;
for ($i = 0; $i < $count; $i++) {
if ($_SESSION['BREADCRUMBMANAGER'][$i]->label == $_SESSION['title']) {
$index = $i + 1;
break;
}
}
if ($index >= 0) {
/* Link to page already within the breadcrumb trail.
*/
for ($i = $count - 1; $i >= $index; $i--) {
self::remove($i);
}
} else {
/* Check to see if the parent page is the same.
*/
if (isset($_SESSION['parentpagename'])) {
for ($i = 0; $i < $count; $i++) {
if ($_SESSION['BREADCRUMBMANAGER'][$i]->page == $_SESSION['parentpagename']) {
$index = $i + 1;
break;
}
}
}
if ($index >= 0) {
for ($i = $count - 1; $i >= $index; $i--) {
self::remove($i);
}
}
self::add($_SESSION['pagename'], $_SESSION['title']);
}
} else {
self::add($_SESSION['pagename'], $_SESSION['title']);
}
if (isAuthenticated()) {
if (isset($_SESSION['lastconnectiontime'])) {
$lastsessiontime = time() - $_SESSION['lastconnectiontime'];
/* 5 minutes. */
if ($lastsessiontime >= 300) {
//Unset the variables stored in session
unset($_SESSION['SESS_MEMBER_ID']);
unset($_SESSION['SESS_FIRST_NAME']);
unset($_SESSION['SESS_LAST_NAME']);
unset($_SESSION['ROLES']);
header("location: system-login-timeout.php");
}
}
}
$_SESSION['lastconnectiontime'] = time();
}
示例3: authenticate
/**
* Authentication for admin users
*/
function authenticate()
{
if (!isAuthenticated()) {
header('WWW-Authenticate: Basic realm="My Realm"');
header('HTTP/1.0 401 Unauthorized');
echo 'Authentication Error';
echo '<pre>';
print_r($GLOBALS);
echo '</pre>';
exit;
}
}
示例4: section_contact
function section_contact()
{
$obj = mysql_fetch_object(mysql_query("select text from bzl_siteconfig where name='contact'"));
echo nl2br($obj->text);
echo '<p><TABLE cellspacing=0 align=center><TR><TD colspan=3>
<HR>Matches can be reported to any of the following:<BR><BR></td></tr>';
$roles = getRolesWithPermission('show');
$res = sqlQuery("SELECT p.id, p.callsign, r.name as level from l_player p, bzl_roles r \n WHERE r.id = p.role_id AND r.id IN (" . join(',', $roles) . ") ORDER BY level");
while ($row = mysql_fetch_object($res)) {
if (++$line % 2) {
$cl = "rowEven";
} else {
$cl = "rowOdd";
}
echo "<tr class=\"{$cl}\"><td width=40% align=right>" . htmlLink($row->callsign, 'playerinfo', "id={$row->id}") . '</td><td width=10></td><td align=left>';
if (isAuthenticated()) {
echo htmlURLbutton('BZmail', 'sendmessage', "pid={$row->id}");
}
echo '</td></tr>';
}
echo '</table>';
}
示例5: warnPrivatePage
function warnPrivatePage($from = "")
{
global $service_host;
if (isAuthenticated()) {
header("location:{$service_host}?function=join&obj1=warn");
} elseif (!empty($from)) {
header("location:{$service_host}?function=signin&obj1=warn&obj2={$from}");
} else {
header("location:{$service_host}?function=signin&obj1=warn");
}
exit;
}
示例6: session_start
<?php
require_once 'system-db.php';
if (!isset($_SESSION)) {
session_start();
}
if (!isAuthenticated() && !endsWith($_SERVER['PHP_SELF'], "system-login.php")) {
header("location: m.system-login.php?session=" . urlencode(base64_encode($_SERVER['PHP_SELF'] . "?" . $_SERVER['QUERY_STRING'])));
exit;
}
if (!isset($_SESSION['SESS_EVENT_ID']) && (!endsWith($_SERVER['PHP_SELF'], "system-client.php") && !endsWith($_SERVER['PHP_SELF'], "system-login.php"))) {
header("location: system-client.php");
exit;
}
//Include database connection details
require_once 'system-config.php';
require_once "confirmdialog.php";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Schokolat</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<link rel="shortcut icon" href="favicon.ico">
<link href="css/m.style.css?a=3" rel="stylesheet" type="text/css" />
<!--
<link href="css/jquery-ui-1.10.3.custom.css" rel="stylesheet" type="text/css" />
示例7: section_teaminfo
function section_teaminfo()
{
require_once 'lib/common.php';
$s_teamid = $_SESSION['teamid'];
$s_logedin = isAuthenticated();
$s_level = $_SESSION['level'];
$s_playerid = $_SESSION['playerid'];
$id = addslashes($_GET['id']);
$res = mysql_query("SELECT name, comment, leader, logo, status, score, \n unix_timestamp(status_changed) as status_changed, unix_timestamp(created) as ucreated\n FROM l_team WHERE id='{$id}'");
$team = mysql_fetch_object($res);
if (!$team) {
echo '<BR><CENTER>Specified team does not exist<BR>';
return;
}
echo '<TABLE align=center><TR><TD>' . htmlURLbutton('Opponent summary', 'oppsumm', "id={$id}") . '</td>';
// Join this team if opened, and if we are logged and not belonging to any team
if ($s_logedin && !$s_teamid && $members < 20 && $team->status == "opened") {
echo '<TD>' . htmlURLbutton('Join Team', 'jointhisteam', "id={$id}") . '</td>';
}
// Send a message to all the team members
if ($s_logedin && $team->status != 'deleted') {
echo '<TD>' . htmlURLbutton('Send BZmessage', 'sendmessage', "tid={$id}") . '</td>';
}
echo '</tr></table>';
if ($team->status == 'deleted') {
echo '<div class=feedback>';
if ($team->status_changed) {
echo "<br><center>This team was deleted on " . gmdate('Y-m-d', $team->status_changed) . "</center>";
} else {
echo "<br><center>This team is deleted.</center>";
}
echo '</div>';
}
echo '<BR><table align=center border=0 cellspacing=0 cellpadding=1>
<tr><td class=teamName align=center>' . $team->name . '<BR></td></tr>';
// Logo if any
if ($team->logo != "") {
echo '<tr><td align=center>
<table><TR><TD bgcolor=white><img src="' . $team->logo . '"></td></tr></table>
<hr></td></tr>';
}
// Ratings
$act45 = teamActivity($id, 45);
$act90 = teamActivity($id, 90);
echo '<tr><td> <TABLE align=center>
<TR><TD width=50% align=right>Created:</td><td width=10></td><td width=50%>' . gmdate('Y-m-d', $team->ucreated) . '</td></tr>
<TR><TD align=right>Rating:</td><td></td><td>' . displayRating($id) . '</td></tr>
<TR><TD align=right>Activity:</td><TD></td><td>' . sprintf('%1.2f / %1.2f', $act45, $act90) . '</td></tr>
<TR><TD colspan=3 align=center> Average number of games played per day<BR>
<NOBR>(exponential moving average over last 45 / 90 days)</nobr></td></tr>';
echo '</td></td></table></td></tr>';
// Matches statistics
$sta1 = mysql_fetch_object(mysql_query("select ifnull(sum(if(score1>score2,1,0)),0) win,\n ifnull(sum(if(score1=score2,1,0)),0) draw,\n ifnull(sum(if(score1<score2,1,0)),0) loss\n from " . TBL_MATCH . " where team1={$id}"));
$sta2 = mysql_fetch_object(mysql_query("select ifnull(sum(if(score2>score1,1,0)),0) win,\n ifnull(sum(if(score2=score1,1,0)),0) draw,\n ifnull(sum(if(score2<score1,1,0)),0) loss\n from " . TBL_MATCH . " where team2={$id}"));
$win = $sta1->win + $sta2->win;
$draw = $sta1->draw + $sta2->draw;
$loss = $sta1->loss + $sta2->loss;
echo "<tr><td align=center><hr>\n <table border=0 cellspacing=0 cellpadding=0 align=center><tr>\n <td align=center>Wins</td><td align=center> Draws </td><td align=center>Losses</td></tr><tr>\n <td align=center>{$win}</td><td align=center>{$draw}</td><td align=center>{$loss}</td>\n </tr></table>\n <hr></td></tr>";
// Comment if any
if ($team->comment != "") {
echo '<tr><td><ul>' . nl2br($team->comment) . '</ul><hr></td></tr>';
}
// Players list
$i = 0;
if (SHOW_PLAYER_ACTIVE > 0) {
$activeDays = SHOW_PLAYER_ACTIVE;
} else {
$activeDays = 0;
}
$res = mysql_query("select id, callsign, comment, status, C.flagname, \n last_login > subdate(now(), INTERVAL {$activeDays} DAY) as active\n from l_player\n left join bzl_countries C on country = C.numcode\n where team=" . $id . "\n order by active desc,callsign");
$members = 0;
echo '<TR><TD><table border=0 cellspacing=0 cellpadding=0 align=center>';
while ($obj = mysql_fetch_object($res)) {
$members++;
if (++$i & 1) {
$cl = "rowEven";
} else {
$cl = "rowOdd";
}
echo "<tr class='{$cl}' valign=middle>";
echo "<TD align=right><a href='index.php?link=playerinfo&id={$obj->id}'>{$obj->callsign}</a></td><TD>";
if ($obj->id == $team->leader) {
echo ' <img TITLE="Team Leader" src="' . THEME_DIR . 'leader.gif">';
}
echo '</td><TD>';
if ($obj->active) {
echo ' <img TITLE="Active player (has logged into this site recently)" src="' . THEME_DIR . 'active.gif">';
}
echo '</td><TD width=10></td>';
echo '<TD>' . smallflag($obj->flagname) . '</td>';
if ($s_logedin && (isFuncAllowed('teamadmin::edit_any_team') || $s_playerid == $team->leader)) {
if ($obj->id != $team->leader) {
// Link to ban a player from a team
echo '<td align=center>' . htmlURLbutSmall('BAN', 'banplayer', "playerid={$obj->id}&teamid={$id}&f_ok_x=2", ADMBUT) . '</form></td></tr>';
} else {
echo '<td> </td></tr>';
}
} else {
echo '<td> </td></tr>';
}
//.........这里部分代码省略.........
示例8: section_teams
function section_teams()
{
require_once "lib/common.php";
$s_logedin = isAuthenticated();
$s_teamid = $_SESSION['teamid'];
$tacts = teamActivity(null, 45);
echo '<BR>';
$res = sqlQuery("\n SELECT l_team.id, l_team.name, l_team.logo, l_team.score, \n player2.callsign leader, player2.id leaderid, \n l_team.status, count(distinct l_player.callsign) numplayers,\n l_team.active = 'yes' activeteam, l_team.matches, l_team.matches > 0 sorter\n FROM l_team, l_player player2, l_player\n WHERE player2.id = l_team.leader \n AND l_team.status != 'deleted' \n AND l_player.team = l_team.id\n GROUP BY l_team.name, l_team.leader, l_team.status, l_team.score\n ORDER BY sorter desc, activeteam desc, l_team.score desc, l_team.name");
echo "<table align=center border=0 cellspacing=0 cellpadding=2>\n <tr class=tabhead align=center>\n <td>Name</td><td>Leader</td><td colspan=2>Members</td>\n <td colspan=2>Rating</td><td>Join</td><TD>Activity</td></tr>";
$separated = 0;
$rownum = 0;
while ($obj = mysql_fetch_object($res)) {
++$rownum;
if ($obj->activeteam == 0 && $separated == 0) {
$separated = 1;
echo '<tr><td align=center colspan=10><hr><b>Inactive Teams</b></td></tr>';
$rownum = 1;
}
if ($obj->sorter == 0 && $separated == 1) {
$separated = 2;
echo '<tr><td align=center colspan=10><hr><b>Did not play any match</b></td></tr>';
$rownum = 1;
}
if ($obj->logo != '') {
$logo = '<img src="' . THEME_DIR . 'islogo.gif">';
} else {
$logo = ' ';
}
if ($s_teamid == $obj->id) {
$c = 'myteam';
} elseif ($obj->status == 'deleted') {
$c = 'deletedteam';
} else {
if ($rownum % 2) {
$c = 'rowOdd';
} else {
$c = 'rowEven';
}
}
echo "<TR class='{$c}' valign=middle>";
$teamname = substr($obj->name, 0, 35);
$act = $tacts[$obj->id];
echo '<td><a href="index.php?link=teaminfo&id=' . $obj->id . '">' . $teamname . '</a></td>
<td><a href="index.php?link=playerinfo&id=' . $obj->leaderid . '&' . SID . '">' . $obj->leader . '</a></td>
<td align=center>' . $obj->numplayers . '</td><td>' . $logo . '</td>
<td align=left>' . displayRating($obj->id) . '</td>';
if ($separated) {
echo '<td> </td>';
} else {
echo '<td align=center>(' . $obj->matches . ')</td>';
}
// Print join or joinnot, not forgetting we may already belong to a team
echo '<TD align=left>';
if ($s_logedin) {
if (!$s_teamid) {
switch ($obj->status) {
case 'opened':
if ($obj->numplayers < 20) {
echo htmlURLbutSmall('JOIN', 'jointeam', "id={$obj->id}") . '</td>';
} else {
echo ' [Closed]</td>';
}
break;
case 'closed':
echo ' [Closed]</td>';
break;
default:
echo 'Deleted.</td>';
break;
}
} else {
if ($s_teamid == $obj->id) {
// if( $_SESSION['playerid'] != 2074 ) // Dont allow Admir to leave (SC request)
echo htmlURLbutSmall('Abandon', 'leaveteam', "id={$obj->id}&leader={$obj->leaderid}") . '</td>';
} elseif ($obj->status == 'closed') {
echo ' [Closed]</td>';
} elseif ($obj->status == 'deleted') {
echo 'deleted.</td>';
} else {
echo '</td>';
}
}
} elseif ($obj->status == 'closed') {
echo ' [Closed]</td>';
} else {
echo '</td>';
}
$act = sprintf('%1.2f', $tacts[$obj->id]);
echo "<TD align=center>{$act}</td>";
echo "</tr>";
}
echo "</table>";
// Create a new team, if logged in and not a team member
if ($s_logedin && !$s_teamid) {
echo '<br><center>
' . htmlURLbutton('Create New Team', 'createteam', null) . '</center>';
}
}
示例9: tokenIsCorrect
function tokenIsCorrect($token)
{
$username = explode(':', $token)[0];
return isAuthenticated($token, $username);
}
示例10:
// anders form laten zien
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Week 07 ajax demo</title>
<link rel="stylesheet" type="text/css"
href="css/style.css"/>
</head>
<body>
<?php
include 'header.php';
?>
<main>
<?php
if ($loginTry && !isAuthenticated()) {
echo '<span class="error">Login niet succesvol. Probeer opnieuw</span>';
}
?>
<form method="post" action="login.php" style="width: 450px; margin-left: auto; margin-right: auto">
<table >
<tr>
<td valign="top">
<label for="userid">Gebruikersnaam</label>
</td>
<td valign="top">
<input type="text" name="userid" maxlength="50" size="30">
</td>
</tr>
<tr>
<td valign="top">
示例11: file_get_contents
<?php
include '../includes/config.inc.php';
include '../fcts/hiking.fct.php';
include '../fcts/event.fct.php';
include '../fcts/mail.fct.php';
$result['data'] = 'unknown';
$postdata = file_get_contents("php://input");
$request = json_decode($postdata);
if (isset($request->organiserName) && isset($request->organiserPhone) && isset($request->name) && isset($request->duration) && isset($request->elevation) && isset($request->level) && isset($request->date) && isset($request->venueId) && isset($request->venueName) && isset($request->venueAddress) && isset($request->venueCity) && isset($request->latitude) && isset($request->longitude) && isset($request->numberOfPeople) && isAuthenticated()) {
try {
$description = templateMailContent($request->name, $request->level, $request->duration, $request->elevation, $request->venueName, $request->date, "{$request->latitude},{$request->longitude}", $request->additionalInfo, $request->link, '', $request->organiserName, $request->organiserPhone);
$date = DateTime::createFromFormat('d/m/Y H:i', $request->date);
$lastId = addEvent($bdd, $_SESSION['id'], $request->venueName, $request->name, $description, $request->numberOfPeople, date_format($date, 'Y-m-d H:i:s'), $request->venueId, $request->venueName, $request->venueAddress, $request->venueCity, 'FR', $request->latitude, $request->longitude);
$hikingMail = "<p>Click <a href=\"http://hiking.cyril-grandjean.fr/validate-event.php?id={$lastId}\">here</a> to validate this hiking request ? :</p>{$description}";
sendHtmlEmailToAdmin($request->name, 'noreply@cyril-grandjean.fr', "Hiking request " . $request->name . " by " . $_SESSION['name'], $hikingMail);
$result['data'] = 'success';
} catch (Exception $e) {
//header("HTTP/1.1 500 Internal Server Error");
$result['data'] = 'error';
$result['error'] = 'Exception occurred: ' + $e->getMessage();
}
} else {
//header("HTTP/1.1 500 Internal Server Error");
$result['data'] = 'error';
$result['error'] = 'Exception occurred: Not every required fields entered';
}
echo json_encode($result);
示例12:
if ($activeMenu == "index") {
?>
class="active"<?php
}
?>
><a href="index.php">Home</a></li>
<li <?php
if ($activeMenu == "create-event") {
?>
class="active"<?php
}
?>
><a href="create-event.php">Create event</a></li>
</ul>
<?php
if (!isAuthenticated()) {
?>
<a href="https://secure.meetup.com/oauth2/authorize?client_id=<?php
echo $_CONFIG['meetupKey'];
?>
&response_type=code&redirect_uri=<?php
echo $_CONFIG['meetupWebsite'];
?>
" class="navbar-form navbar-right">
<button type="button" class="btn btn-success">Login</button>
</a>
<?php
} else {
?>
<span class="navbar-right">
<img class="navbar-brand" alt="Icon" src="<?php
示例13: section_playerinfo_displayPlayer
function section_playerinfo_displayPlayer(&$se)
{
$s_level = $_SESSION['level'];
$s_logedin = isAuthenticated();
$s_playerid = $_SESSION['playerid'];
$s_leader = $_SESSION['leader'];
$s_teamid = $_SESSION['teamid'];
$editAny = isFuncAllowed('edit_any_players');
echo '<table width=90% align=center border=0 cellspacing=0 cellpadding=1>
<tr><td class=playername align=center>' . $se->callsign . '<BR><BR></td></tr>';
// Logo if any
if ($se->logo != "") {
echo '<tr><td align=center>' . section_playerinfo_dispLogo($se->logo, $se->logobg) . '<hr></td></tr>';
}
// Bio if any
if ($se->comment != "") {
echo "<tr><td class=playerbio>" . nl2br($se->comment) . "<hr></td></tr>";
}
// misc info ....
echo '</td></tr><TR><TD><table align=center><TR><TD width=100 valign=top align=left>';
if ($se->flagname) {
echo '<img src="' . FLAG_DIR . "c-{$se->flagname}.gif\">";
}
echo '</td><TD><TABLE>';
// Team if any
if ($se->teamname != "") {
echo "<tr><td>";
if ($se->leader == $se->id) {
$d = '<nobr>Leader (<img src="' . THEME_DIR . 'leader.gif">) of team</nobr>';
} else {
$d = "<nobr>Member of team</nobr>";
}
section_playerinfo_tab2($d, htmlLink($se->teamname, 'teaminfo', "id={$se->teamid}"));
} else {
echo "<tr><td align=center colspan=2>Does not belong to any team</td></tr>";
}
if ($se->altnik1 || $se->altnik2) {
if ($se->altnik1 && $se->altnik2) {
$plural = 's';
$niks = $se->altnik1 . ', ' . $se->altnik2;
} else {
if ($se->altnik1) {
$niks = $se->altnik1;
} else {
$niks = $se->altnik2;
}
}
section_playerinfo_tab2("<nobr>Alternate callsign{$plural}</nobr>", $niks);
}
if ($se->countryname) {
$loc = $se->countryname;
if ($se->stateabbr) {
$loc .= ' (';
if ($se->city) {
$loc .= $se->city . ', ';
}
$loc .= "{$se->stateabbr})";
}
section_playerinfo_tab2('Location', $loc);
}
if ($se->utczone || $se->zonename) {
section_playerinfo_tab2('Time zone', 'GMT ' . section_playerinfo_numPlus($se->utczone) . " ({$se->zonename})");
}
section_playerinfo_tab2('Site Member Since', date('Y-m-d', $se->created));
if (isset($se->last_login)) {
section_playerinfo_tab2('Last login', date('Y-m-d H:i', $se->last_login));
}
echo '<TR><TD colspan=2><HR></td></tr>';
if ($se->emailpub == 'Y') {
section_playerinfo_tab2('email', section_playerinfo_obsMail($se->email));
}
section_playerinfo_tab2('AIM', $se->aim);
section_playerinfo_tab2('IRC', $se->ircnik1);
section_playerinfo_tab2('ICQ', $se->icq);
section_playerinfo_tab2('YIM', $se->yim);
section_playerinfo_tab2('MSM', $se->msm);
section_playerinfo_tab2('Jabber', $se->jabber);
echo '</table></td><TD width=50></td></tr></table></tr>';
// Frequentation statistics
if ($se->status != 'deleted') {
echo '<tr><td><BR><BR>';
section_playerinfo_Frequentation($se->id);
echo '<BR></td></tr>';
}
if ($se->status != 'deleted') {
// Send a message to this player (but not to myself!)
if ($s_logedin && $s_playerid != $se->id) {
echo '<tr><td><hr></td></tr><tr align=center><td><TABLE><TR><TD>' . htmlURLbutton('SEND BZmessage', 'sendmessage', "pid={$se->id}");
// If I am a team leader, and my team is not full, I can invite him
if (isAuthenticated() && $_SESSION['leader']) {
// Check if my team full
$team = mysql_fetch_object(mysql_query("select count(*) as num from l_player where team={$s_teamid}"));
if ($team->num < 20) {
$mytn = queryGetTeamName($s_teamid);
echo '<TD width=5></td><TD>' . htmlURLbutton("INVITE to {$mytn}", 'invite', "id={$se->id}") . '</td>';
}
}
echo '</tr></table></td></tr>';
}
// Administrators and owner can edit a player
//.........这里部分代码省略.........
示例14: calculate
public static function calculate()
{
if (isAuthenticated()) {
if (isset($_SESSION['lastconnectiontime'])) {
$lastsessiontime = time() - $_SESSION['lastconnectiontime'];
}
}
$_SESSION['lastconnectiontime'] = time();
}
示例15: session_start
require_once "{$TOPDIR}/lib/functions.php";
require_once "{$TOPDIR}/lib/jsonwrapper.php";
session_start();
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
if (isset($_REQUEST["password"])) {
// Clear data from session
$_SESSION = array();
// Zap existing session entirely
session_regenerate_id(true);
setpassword($_REQUEST["password"]);
// Invalid password
$_SESSION["xcatpassvalid"] = -1;
}
if (isset($_REQUEST["username"])) {
$_SESSION["username"] = $_REQUEST["username"];
// Invalid user name
$_SESSION["xcatpassvalid"] = -1;
}
$jdata = array();
if (isAuthenticated() && isRootAcess()) {
$jdata["authenticated"] = "yes";
} else {
$jdata["authenticated"] = "no";
}
echo json_encode($jdata);
?>