<?php 

    session_start();

    if(!$_SESSION['login']==true) {
        header("Location: ./key.php");
    }
?>
<!DOCTYPE html>
<!--

    Author:        Twily                                        2016
    Website:       http://twily.info/
    Compatibility: Mozilla Firefox, Internet Explorer, Google Chrome

-->
<html>
<head>
<title>Backdoor Upload</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<meta name="viewport" content="width=1024" />

<link id="favicon" rel="shortcut icon" href="./favicon.ico" />
<link rel="stylesheet" type="text/css" href="./css/common.css?v=4" />
<link rel="stylesheet" type="text/css" href="./css/main.css?v=3" />
<script type="text/javascript" src="./js/file.js?v=3"></script>
<script type="text/javascript" src="./js/text.js?v=3"></script>
</head>
<body>

<div class="tbl">
	<div class="tbl-tr">
		<div class="tbl-td left">

			<div class="tbl">
				<div class="tbl-tr">
                    <div class="tbl-td stretch">
                        <label for="file" id="filesel"><br /><br />Select file to upload<br />File: none</label>
						<input type="file" name="file" id="file" style="display: none;" />
<script>
$('file').addEventListener('change',function() {
    var filnam=$('file').value;
    if(filnam.length>0) {
        filnam=filnam.substr(filnam.lastIndexOf("\\")+1);
        //sfilnam=filnam.substr(0,maxlenshow);
        //if(filnam.length>maxlenshow) sfilnam+="...";
        $('filesel').innerHTML="<br /><br />Select file to upload<br />File: "+filnam;
    } else {
        $('filesel').innerHTML="<br /><br />Select file to upload<br />File: none";
    }
},false);
</script>
					</div>
				</div>
				<div class="tbl-tr">
					<div class="tbl-td fr">

						<div class="tbl">
							<div class="tbl-td stretch">
                                <div id="bar"><div id="progress"><span id="status">(Max 256M)</span> </div></div>
                                
							</div>
							<div class="tbl-td">
								<input type="button" value="Upload file" onclick="upload();" id="upload" />
							</div>
						</div>

					</div>
				</div>
			</div>

		</div>

		<div class="tbl-td sep"></div>

		<div class="tbl-td right">

			<div class="tbl">
				<div class="tbl-tr">
					<div class="tbl-td">
						<textarea placeholder="Text to upload (Max 4096)" id="textA"></textarea>
					</div>
				</div>
				<div class="tbl-tr">
					<div class="tbl-td fr">
						<input type="button" value="Upload text" onclick="post();" />
					</div>
				</div>
			</div>

		</div>
	</div>
	
	<div class="tbl-tr sep"></div>

	<div class="tbl-tr">
		<div class="tbl-td content">
			<iframe src="./list.php" id="list"></iframe>
		</div>

		<div class="tbl-td sep"></div>

		<div class="tbl-td content">
			<iframe src="./text.php" id="text"></iframe>
		</div>
	</div>
</div>
</body>
</html>


