📄 private.php
字号:
<?php
function ewebeditor_header( )
{
echo "<html><head>";
echo "<meta http-equiv='Content-Type' content='text/html; charset=gb2312'><meta name='Author' content='Andy.m'><link rev=MADE href='mailto:webmaster@webasp.net'><title>eWebEditor在线编辑器 - 后台管理</title><link rel='stylesheet' type='text/css' href='private.css'><script language='javascript' src='private.js'></script>";
echo "</head>";
echo "<body>";
echo "<a name=top></a>";
}
function ewebeditor_footer( )
{
echo "<table border=0 cellpadding=0 cellspacing=0 align=center width='100%'><tr><td height=40></td></tr><tr><td><hr size=1 color=#000000 width='60%' align=center></td></tr><tr><td align=center>Copyright © 2003-2004 <b>webasp<font color=#CC0000>.net</font></b> <b>eWebSoft<font color=#CC0000>.com</font></b>, All Rights Reserved .</td></tr><tr><td align=center><a href='mailto:webmaster@webasp.net'>webmaster@webasp.net</a></td></tr></table>";
echo "</body></html>";
}
function issafestr( $str )
{
$aBadstr = array( "'", "|", "\"" );
$i = 0;
for ( ; $i < count( $aBadstr ); ++$i )
{
if ( strpos( $str, $aBadstr[$i] ) !== false )
{
return false;
}
}
return true;
}
function goerror( $str )
{
echo "<script language=javascript>alert('".$str."\\n\\n系统将自动返回前一页面...');history.back();</script>";
exit( );
}
function totrim( $name )
{
if ( isset( $_GET[$name] ) )
{
return trim( $_GET[$name] );
}
if ( isset( $_POST[$name] ) )
{
return trim( $_POST[$name] );
}
return "";
}
function writeconfig( )
{
$sConfig = "<?php\n";
$sConfig = $sConfig."\n";
$sConfig = $sConfig."\$"."sUsername = \"".$sUsername."\";\n";
$sConfig = $sConfig."\$"."sPassword = \"".$sPassword."\";\n";
$sConfig = $sConfig."\n";
$nConfigStyle = 0;
$sConfigStyle = "";
$nConfigToolbar = 0;
$sConfigToolbar = "";
$i = 1;
for ( ; $i <= count( $GLOBALS['aStyle'] ); ++$i )
{
if ( $aStyle[$i] != "" )
{
$aTmpStyle = explode( "|||", $GLOBALS['aStyle'][$i] );
if ( $aTmpStyle[0] != "" )
{
$nConfigStyle = $nConfigStyle + 1;
$sConfigStyle = $sConfigStyle."\$"."aStyle[".$nConfigStyle."] = \"".$aStyle[$i]."\";\n";
$s_Order = "";
$s_ID = "";
$n = 1;
for ( ; $n <= count( $GLOBALS['aToolbar'] ); ++$n )
{
if ( $aToolbar[$n] != "" )
{
$aTmpToolbar = explode( "|||", $GLOBALS['aToolbar'][$n] );
if ( $aTmpToolbar[0] == $i )
{
if ( $s_ID != "" )
{
$s_ID = $s_ID."|";
$s_Order = $s_Order."|";
}
$s_ID = $s_ID.$n;
$s_Order = $s_Order.$aTmpToolbar[3];
}
}
}
if ( $s_ID != "" )
{
$a_ID = explode( "|", $s_ID );
$a_Order = explode( "|", $s_Order );
$a_ID = dosort( $a_ID, $a_Order );
$n = 0;
for ( ; $n < count( $a_ID ); ++$n )
{
$nConfigToolbar = $nConfigToolbar + 1;
$aTmpToolbar = explode( "|||", $GLOBALS['aToolbar'][$a_ID[$n]] );
$sTmpToolbar = $nConfigStyle."|||".$aTmpToolbar[1]."|||".$aTmpToolbar[2]."|||".$aTmpToolbar[3];
$sConfigToolbar = $sConfigToolbar."\$"."aToolbar[".$nConfigToolbar."] = \"".$sTmpToolbar."\";\n";
}
}
}
}
}
$sConfig = $sConfig.$sConfigStyle."\n".$sConfigToolbar."\n?".">";
writefile( "../php/config.php", $sConfig );
}
function writefile( $s_FileName, $s_Text )
{
if ( !( $handle = fopen( $s_FileName, "w" ) ) )
{
exit( );
}
if ( fwrite( $handle, $s_Text ) === FALSE )
{
exit( );
}
fclose( $handle );
}
function dosort( $aryValue, $aryOrder )
{
$KeepChecking = true;
while ( $KeepChecking == true )
{
$KeepChecking = false;
$i = 0;
for ( ; $i < count( $aryOrder ); ++$i )
{
if ( $i == count( $aryOrder ) - 1 )
{
}
else if ( $aryOrder[$i + 1] < $aryOrder[$i] )
{
$FirstOrder = $aryOrder[$i];
$SecondOrder = $aryOrder[$i + 1];
$aryOrder[$i] = $SecondOrder;
$aryOrder[$i + 1] = $FirstOrder;
$FirstValue = $aryValue[$i];
$SecondValue = $aryValue[$i + 1];
$aryValue[$i] = $SecondValue;
$aryValue[$i + 1] = $FirstValue;
$KeepChecking = true;
}
}
}
return $aryValue;
}
function gourl( $url )
{
echo "<script language=javascript>location.href=\"".$url."\";</script>";
exit( );
}
@session_start( );
if ( empty( $_SESSION['eWebEditor_User'] ) )
{
echo "<script language=javascript>top.location.href='login.php';</script>";
exit( );
}
require( "../php/config.php" );
require( "button.php" );
$sAction = strtoupper( totrim( "action" ) );
$sPosition = "当前位置:";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -