⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 etpl.php

📁 make project on java
💻 PHP
字号:
<?php
include'../cache/config.inc.php';
include'begin.php';
adminlogin();

$id=$_GET['id'];
$dir=$_GET['d'];
$file=$_GET['file'];

if (isset($_GET['post'])) {

if ($fp = @fopen('../template/'.$dir.'/'.$file, 'w')){
    fwrite($fp, stripslashes($_POST['content']));
    fclose($fp);
	}else{
	echoerror(25);
	}
$reurl = 'tpl.php?id='.$id;	
echoioy(52);

}


if (@$fp = fopen('../template/'.$dir.'/'.$file, 'r')) {
        $content = fread($fp, filesize('../template/'.$dir.'/'.$file));
}else{
$fp = fopen('../template/default/'.$file, 'r');
$content = fread($fp, filesize('../template/default/'.$file));
}
$filel=strtolower(str_replace('.', '', strrchr($file, '.')));

if ($filel=='htm' || $filel=='css' || $filel=='ini' || $filel=='php'){
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta HTTP-EQUIV="Pragma" content="no-cache" />
<meta HTTP-EQUIV="Cache-Control" content="no-cache,must-revalidate" />
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>edit</title>
<style type="text/css">
<!--
.*{
font-family:\'瀹嬩綋\',Arial,sans-serif;
font-size:12px;
}
-->
</style>
</head>
<body>
<form action="?id='.$id.'&d='.$dir.'&file='.$file.'&post" method="post" name="form1" id="form1">'.$file.'
<textarea name="content" style="width:98%; height:440px;word-break: break-all;" >'.htmlspecialchars($content).'</textarea>
<input type="submit" style="float: right;width:100px;" name="Submit" value="鎻愪氦" /><input onclick=history.go(-1) style="float: right;width:100px;" type="button" value="杩斿洖" name=Submit2>
</form>
</body>
</html>
';
}

?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -