Example #1
0
function EWGLogon($login,$pass) {
	$x = WGLogonUser($login,$pass);
	if ($x===false) return false;
	$x = WGSession();
	if (!$x) return false;
	WGKillAll();
	$usr = WGSessionUser();
	EWGLoadProfile();
	return $usr;
	}	
Example #2
0
echo htmlspecialchars(@$ini['webgui']['title'], ENT_QUOTES);
?>
</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<?
	if (@$ini['webgui']['cookie']) echo "<script src=\"/sys/cookie.js\"></script>\n";
	?>
	<link rel="stylesheet" href="/sys/win.css">
	<? 
	if (isset($ini['logon'])) echo "<link rel=\"stylesheet\" href=\"/img/logonui.css\">\n";
	if (file_exists("var/custom-logonui.css")) echo "<link rel=\"stylesheet\" href=\"/var/custom-logonui.css\">\n";
	?>
	<script src="/sys/win.js"></script>
	<? 
	
	if ($ini['logon'] and !WGSession()) {
		$startFile=false;
		?>
		<script>
		WGlob.logonUI=true;
		WGProcSet.logonUI = <?php 
echo json_encode($ini['logon']);
?>
;
		</script>
		<?
		}
	
	if ($startFile) { ?>
		<script>
		WGSetStartFile('<?php 
Example #3
0
<?
if (!isset($ini)) return;

if (count($_POST) and $_POST['logonui']==1) {
	if (!$DBH) dbopen($DBH);
		if (WGLogonUser($_POST['a'],$_POST['b']) and WGSession()) {
			$WEBGUIhttpAuth=true;
			return;
			}
	}
?>
<!doctype html>
<html>
	<head>
		<meta charset="utf-8"/>
		<title><?php 
echo htmlspecialchars(@$ini['webgui']['title'], ENT_QUOTES);
?>
</title>
	<?
	if (@$ini['webgui']['cookie']) echo "<script src=\"/sys/cookie.js\"></script>\n";
	?>
	<link rel="stylesheet" href="/sys/win.css">
	<link rel="stylesheet" href="/img/style.css">
	
	<!-- 
	EPTO WebGui V 8.0
	(C) 2015 EPTO (A)
	-->
</head>
<body>
Example #4
0
<?
if (!defined("EWGINCLUDE")) exit;
if (EWGLogon(@$JSON['data']['a'],@$JSON['data']['b']) and WGSession()) $OUTJSON['ok']=true; else $OUTJSON['err']="Access Denied";
?>
Example #5
0
function checkAccess() {
	if (!WGSession() or !WGCan('root')) FatalError("Access denied");
	}