📄 index.php
字号:
<?
/*
*#########################################
* PHPCMS 文件管理器 v4.01
* Copyright (c) 2004-2006 phpcms.cn
* 作者:Longbill ( http://www.longbill.cn )
* 请保留版权信息
*#########################################
*/
include_once("pre_do.php");
@error_reporting(1);
include_once("func.php");
$user=check_login();
$root = $user["root"];
if (!$user) header("location:login.php");
header("Content-type:TEXT/HTML;Charset=GB2312");
echo deal_temp("temp/{$tempname}/header.htm",array("title"=>$title,"charset"=>$charset,"keywords"=>$keywords,"description"=>$description));
//主界面
if ($action=="menu" || empty($action))
{
echo "<script language=javascript src='js/functions.js'></script>";
echo "<script language=javascript src='js/sack.js'></script>";
echo "<script language=javascript src='js/gb2312.js'></script>";
echo "<script language=javascript src='javascript.php'></script>";
if (file_exists("temp/{$tempname}/values.js")) echo "<script language=javascript src='temp/{$tempname}/values.js'></script>";
echojs();
reset($user);
$dd=array();
while (list($key, $val) = each($user))
{
$dd["{$key}"] = ($val)?"":"none";
}
$dd["wait"] = $wait;
$dd["paste"] = ($user["copy"] || $user["move"])?"":"none";
$main=deal_temp("temp/$tempname/table.htm",$dd);
echo deal_temp("temp/$tempname/main.htm",array("sitewidth"=>$sitewidth,"title"=>$title,"logout"=>"<a href='login.php?action=logout' target=_self>退出</a>","main"=>$main,"currentpath"=>"<font id='currentpath'>当前路径 .</font>"));
echo deal_temp("temp/$tempname/footer.htm");
exit;
}
//文件编辑界面
else if ($action=="editfile")
{
$path=dealpath($_GET["path"]);
if ( !$path || !$user["viewsorce"]) die("<script>alert('没有权限!');window.close();</script>");
echo "<script language=javascript src='js/edit.js'></script>\n";
echo "<body>\n";
$line = @file($path);
$content = ""; $lines = "";
$n=count($line);
for ( $i=0; $i<$n; $i++) $content.=htmlspecialchars($line[$i]);
$n+=1000;
for ( $i = 0; $i < $n; $i++ ) $lines.=($i+1)."\n";
$main=deal_temp("js/editor.htm",array("path"=>$path,"titleback"=>$icon["titleback"],"width"=>$sitewidth-60,"filename"=>basename1($path),"filesize"=>ceil(filesize($path)*100/1024)/100));
$main=deal_temp("temp/$tempname/main.htm",array("sitewidth"=>$sitewidth,"title"=>"编辑文件 ".basename1($path),"logout"=>"<a href='login.php?action=logout' target=_self>退出</a>","main"=>$main,"currentpath"=>" "));
echo str_replace(array("{lines}","{content}"),array($lines,$content),$main);
echo deal_temp("temp/$tempname/footer.htm");
exit;
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -