Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <SCRIPT LANGUAGE="JavaScript">
- <!--
- var currapp = "";
- var text="Int0RNet";
- var delay=50;
- var currentChar=1;
- function fileType(file) {
- if(file.indexOf(".txt")) {
- // alert("text");
- return "text";
- }
- else if(file.indexOf(".jpg") || file.indexOf(".png") || file.indexOf(".gif")) {
- return "picture";
- }
- else if(file.indexOf(".hpl")) {
- return "humanprogramming";
- }
- else {
- alert("The fuck?");
- }
- }
- function openFile(file) {
- var type=fileType(file);
- // alert("Opening: " + file);
- switch(type) {
- case "text":
- var respondy = callPHP('action=openfile&file=' + file,'gEdit.php');
- showHide("home");
- // alert(file);
- document.getElementById('geditContainer').style.display = "block"
- document.getElementById("textz").value = respondy;
- break;
- default:
- alert("It broke");
- }
- }
- function callPHP(params, file) {
- var httpc = new XMLHttpRequest(); // simplified for clarity
- var url = file;
- httpc.open("POST", url, true); // sending as POST
- httpc.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
- httpc.setRequestHeader("Content-Length", params.length - 1); // POST request MUST have a Content-Length header (as per HTTP/1.1)
- httpc.onreadystatechange = function() { //Call a function when the state changes.
- if(httpc.readyState == 4 && httpc.status == 200) { // complete and no errors
- var response = httpc.responseText; // some processing here, or whatever you want to do with the response
- return response;
- }
- }
- httpc.send(params);
- }
- function gSaveAs() {
- var filename = prompt("Please Enter A File Name.","untitled document.txt");
- callPHP('filename=' + filename + "&action=save&content=" + document.getElementById("textz").value, "gEdit.php");
- }
- function showHide(id) {
- var element = document.getElementById(id);
- if(element.style.display == 'none') {
- element.style.display = 'block';
- }
- else {
- element.style.display = 'none';
- }
- }
- function type()
- {
- document.title=text.substr(0, currentChar);
- currentChar++
- if (currentChar>text.length)
- {
- currentChar=1;
- // setTimeout("type()", 5000);
- }
- else
- {
- setTimeout("type()", delay);
- }
- }
- function startTyping(textParam, delayParam)
- {
- text=textParam;
- delay=delayParam;
- currentChar=1;
- type();
- }
- window.onload= function() {
- startTyping(text, 1000,"typerDiv");
- }
- //-->
- </SCRIPT>
- <style>
- #geditContainer {
- position: absolute;
- left: 10px;
- top: 50px;
- width:100%;
- height: 100%;
- background-color:#000000;
- font-size: 11px;
- z-index:01;
- display: none;
- }
- #geditFile {
- position: absolute;
- left: 10px;
- top: 50px;
- width:75px;
- height: auto;
- background-color:#333333;
- font-size: 11px;
- z-index:99;
- display: none;
- }
- textarea {
- overflow: auto;
- background-color: #000000;
- color: #00FF00;
- font-family: monospace, courier, system;
- }
- body {
- background-color: #000000;
- color: #00FF00;
- font-family: monospace,courier, system,courier new;
- }
- #topPanel {
- border: 1px green dashed;
- width: 100%;
- height: 20px;
- font-size:13px;
- text-transform: lowercase;
- }
- a {
- color: green;
- text-decoration: none;
- }
- #app {
- width:150px;
- height: 100%;
- background-color:#333333;
- font-size: 11px;
- z-index:99;
- display: none;
- }
- table {
- border: 1px green dashed;
- vertical-align: middle;
- width: 100%;
- }
- #acc {
- left:154px;
- top: 32px;
- position: absolute;
- display: none;
- width:150px;
- background-color:#333333;
- font-size: 11px;
- z-index:99;
- display: none;
- }
- #dashboard {
- border: 1px green dashed;
- width: 99%;
- height: 95%;
- position: absolute;
- top:31px;
- z-index:-1;
- }
- #home {
- position: absolute;
- left: 10px;
- top: 50px;
- width:100%;
- height: 100%;
- background-color:#000000;
- font-size: 11px;
- z-index:01;
- display: none;
- }
- </style>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title></title>
- </head>
- <body>
- <div id="topPanel""><a href="#" onClick="showHide('app');">Applications</a> <a href="#" onclick="showHide('home');">Places</a> <a href="#" onclick="system();">System</a></div>
- <div id="app">
- <table>
- <tr><td>{}</td><td><a href="#" onClick="showHide('acc');">Accessories |></a></td></tr>
- <tr><td>{}</td><td>Games</td></tr>
- <tr><td>{}</td><td>Chat</td></tr>
- </table>
- <div id="acc"><a href="#" onclick="showHide('geditContainer');">gedit</a></div>
- </div>
- <div id="dashboard">
- <div id="geditContainer">
- <div id="geditFile">
- <a href="#" onclick="gSaveAs();"><u>S</u>ave As...</a><br>
- <a href="#" onClick="showHide('geditContainer');">Close</a>
- </div>
- <div style='height:20px; width:100%; border: 1px green solid;' id='menubar'><input type='button' value='File' onClick="showHide('geditFile');"><u>F</u>ile <u></a><a href='#'>E</u>dit</a> <a href='#'><u>V</u>iew</a></div>
- <div id='textarea' style='position:absolute; left: 10px; top: 35px; border: 1px white dotted;'><textarea id="textz" rows='25' cols='100'></textarea> </div>
- </div>
- <div id="home">
- <?php
- $results = array();
- $handler = opendir("users/home/root/");
- while($file = readdir($handler)) {
- if($file !="." && $file != "..") {
- $results[] = $file;
- }
- }
- closedir($handler);
- foreach($results as $i) {
- print "<a href='#' onclick=\"openFile('" . $i ."');\">" . $i . "</a><br>";
- }
- ?>
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement