<?php header("content-Type: text/html; charset=utf-8");
/*
*######################################
* eWebEditor v3.80 - Advanced online web based WYSIWYG HTML editor.
* Copyright (c) 2003-2006 eWebSoft.com
*
* For further information go to http://www.ewebsoft.com/
* This copyright notice MUST stay intact for use.
*######################################
*/
?>
<?php
require_once("config.php");
InitUpload();
if (isset($_GET["action"])){
$sAction = strtoupper($_GET["action"]);
}else{
$sAction = "";
}
switch ($sAction){
case "REMOTE":
DoCreateNewDir();
DoRemote();
break;
case "SAVE":
ShowForm();
DoCreateNewDir();
DoSave();
break;
default:
ShowForm();
break;
}
function ShowForm() {
?>
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<TITLE>eWebEditor</TITLE>
<script language="javascript" src="../dialog/dialog.js"></script>
<link href='../language/<?=$GLOBALS["sLanguage"]?>.css' type='text/css' rel='stylesheet'>
<link href='../dialog/dialog.css' type='text/css' rel='stylesheet'>
</head>
<body class=upload>
<form action="?action=save&type=<?=$GLOBALS["sType"]?>&style=<?=$GLOBALS["sStyleName"]?>&language=<?=$GLOBALS["sLanguage"]?>" method=post name=myform enctype="multipart/form-data">
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="<?=($GLOBALS["nAllowSize"]*1024);?>">
<input type=file name="uploadfile" size=1 style="width:100%">
</form>
<script language=javascript>
var sAllowExt = "<?=$GLOBALS["sAllowExt"]?>";
function CheckUploadForm() {
if (!IsExt(document.myform.uploadfile.value,sAllowExt)){
parent.UploadError('lang["ErrUploadInvalidExt"]+":'+sAllowExt+'"');
return false;
}
return true
}
var oForm = document.myform ;
oForm.attachEvent("onsubmit", CheckUploadForm) ;
if (! oForm.submitUpload) oForm.submitUpload = new Array() ;
oForm.submitUpload[oForm.submitUpload.length] = CheckUploadForm ;
if (! oForm.originalSubmit) {
oForm.originalSubmit = oForm.submit ;
oForm.submit = function () {
if (this.submitUpload) {
for (var i = 0 ; i < this.submitUpload.length ; i++) {
this.submitUpload[i]() ;
}
}
this.originalSubmit() ;
}
}
try {
parent.UploadLoaded();
}
catch(e){
}
</script>
</body>
</html>
<?php
}
function DoSave(){
if($_FILES['uploadfile']['error'] > 0){
switch((int)$_FILES['uploadfile']['error']){
case UPLOAD_ERR_NO_FILE:
OutScript("parent.UploadError('lang[\"ErrUploadInvalidFile\"]')");
break;
case UPLOAD_ERR_FORM_SIZE:
OutScript("parent.UploadError('lang[\"ErrUploadSizeLimit\"]+\":".$GLOBALS["nAllowSize"]."KB\"')");
break;
}
exit;
}
preg_match("/\.([a-zA-Z0-9]{2,4})$/",$_FILES['uploadfile']['name'],$exts);
if (preg_match("/\.asp$|\.aspx$|\.asa$|\.asax$|\.php$|\.jsp$|\.php3$|\.phtml$|\.phps$|\.do$/",$_FILES['uploadfile']['name']))
{
OutScript("parent.UploadError('lang[\"ErrUploadInvalidExt\"]+\":".$GLOBALS["sAllowExt"]."\"')");
exit;
}
CheckValidExt($exts[1]);
$GLOBALS["sSaveFileName"] = GetRndFileName(strtolower($exts[1]));
$GLOBALS["sOriginalFileName"] = $_FILES['uploadfile']['name'];
$sFileName = str_replace('\\','\\\\',realpath($GLOBALS["sUploadDir"]))."/";
$sFileName .= $GLOBALS["sSaveFileName"];
if(!move_uploaded_file($_FILES['uploadfile']['tmp_name'],$sFileName)){
OutScript("parent.UploadError('Error')");
exit;
}
$s_SmallImageFile = getSmallImageFile($GLOBALS["sSaveFileName"]);
$s_SmallImagePathFile = "";
$s_SmallImageScript = "";
if (makeImageSLT($GLOBALS["sUploadDir"], $GLOBALS["sSaveFileName"], $s_SmallImageFile)){
makeImageSY($GLOBALS["sUploadDir"], $s_SmallImageFile);
makeImageSY($GLOBALS["sUploadDir"], $GLOBALS["sSaveFileName"]);
$s_SmallImagePathFile = $GLOBALS["sContentPath"].$s_SmallImageFile;
$s_SmallImageScript = "try{obj.addUploadFile('".$GLOBALS["sOriginalFileName"]."', '".$s_SmallImageFile."', '".$s_SmallImagePathFile."');} catch(e){} ";
}else{
$s_SmallImageFile = "";
makeImageSY($GLOBALS["sUploadDir"], $GLOBALS["sSaveFileName"]);
}
$GLOBALS["sPathFileName"] = $GLOBALS["sContentPath"].$GLOBALS["sSaveFileName"];
OutScript("parent.UploadSaved('".$GLOBALS["sPathFileName"]."','".$s_SmallImagePathFile."');var obj=parent.dialogArguments.dialogArguments;if (!obj) obj=parent.dialogArguments;try{obj.addUploadFile('".$GLOBALS["sOriginalFileName"]."', '".$GLOBALS["sSaveFileName"]."', '".$GLOBALS["sPathFileName"]."');} catch(e){} ".$s_SmallImageScript);
}
function makeImageSY($s_Path, $s_File){
if($GLOBALS["nSYFlag"] == 0){return false;}
if(!isValidSLTSYExt($s_File)){return false;}
switch($GLOBALS["nSLTSYObject"]){
case 0:
$groundImage = $s_Path.$s_File;
if(!file_exists($groundImage)){return false;}
$ground_info = getimagesize($groundImage);
$ground_w = $ground_info[0];
$ground_h = $ground_info[1];
if($GLOBALS["nSYMinSize"] > $ground_w){return false;}
switch($ground_info[2]){
case 1:
$ground_im = imagecreatefromgif($groundImage);
break;
case 2:
$ground_im = imagecreatefromjpeg($groundImage);
break;
case 3:
$ground_im = imagecreatefrompng($groundImage);
break;
default:
return false;
}
imagealphablending($ground_im, true);
switch($GLOBALS["nSYFlag"]){
case 1:
if($GLOBALS["sSYFontName"]){
$s_SYText = gb2utf8($GLOBALS["sSYText"]);
$fontSize = imagettfbbox($GLOBALS["nSYFontSize"], 0, $GLOBALS["sSYFontName"], $s_SYText);
$n_SYWidth = $fontSize[2] - $fontSize[0];
$n_SYHeight = $fontSize[1] - $fontSize[7];
}
if($GLOBALS["sSYShadowColor"]==""){
$GLOBALS["sSYShadowColor"] = "ffffff";
}
$R = hexdec(substr($GLOBALS["sSYShadowColor"],0,2));
$G = hexdec(substr($GLOBALS["sSYShadowColor"],2,2));
$B = hexdec(substr($GLOBALS["sSYShadowColor"],4));
$textcolor = imagecolorallocate($ground_im, $R, $G, $B);
if($GLOBALS["sSYFontName"]){
imagettftext($ground_im, $GLOBALS["nSYFontSize"], 0, 5+$GLOBALS["nSYShadowOffset"], 5+$n_SYHeight+$GLOBALS["nSYShadowOffset"], $textcolor, $GLOBALS["sSYFontName"], $s_SYText);
}else{
imagestring($ground_im, $GLOBALS["nSYFontSize"], 5+$GLOBALS["nSYShadowOffset"], 5+$GLOBALS["nSYShadowOffset"], $GLOBALS["sSYText"], $textcolor);
}
if($GLOBALS["sSYFontColor"]==""){
$GLOBALS["sSYFontColor"] = "000000";
}
$R = hexdec(substr($GLOBALS["sSYFontColor"],0,2));
$G = hexdec(substr($GLOBALS["sSYFontColor"],2,2));
$B = hexdec(substr($GLOBALS["sSYFontColor"],4));
$textcolor = imagecolorallocate($ground_im, $R, $G, $B);
if($GLOBALS["sSYFontName"]){
imagettftext($ground_im, $GLOBALS["nSYFontSize"], 0, 5, 5+$n_SYHeight, $textcolor, $GLOBALS["sSYFontName"], $s_SYText);
}else{
imagestring($ground_im, $GLOBALS["nSYFontSize"], 5, 5, $GLOBALS["sSYText"], $textcolor);
}
break;
case 2:
$waterImage = $GLOBALS["sSYPicPath"];
if(!file_exists($waterImage)){return false;}
$water_info = getimagesize($waterImage);
$water_w = $water_info[0];
$water_h = $water_info[1];
switch($water_info[2]){
case 1:
$water_im = imagecreatefromgif($waterImage);
break;
case 2:
$water_im = imagecreatefromjpeg($waterImage);
break;
case 3:
$water_im = imagecreatefrompng($waterImage);
break;
default:
return false;
}
if(($ground_w<$water_w)||($ground_h<$water_h)){return false;}
imagecopy($ground_im, $water_im, 0, 0, 0, 0, $water_w, $water_h);
break;
}
//@unlink($groundImage);
switch($ground_info[2]){
case 1:
imagegif($ground_im,$groundImage);
break;
case 2:
imagejpeg($ground_im,$groundImage);
break;
case 3:
imagepng($ground_im,$groundImage);
break;
}
if(isset($water_info)) unset($water_info);
if(isset($wa
没有合适的资源?快使用搜索试试~ 我知道了~
Ewebeditor 5.2 For Php Modify Version
共511个文件
gif:337个
js:51个
htm:50个
4星 · 超过85%的资源 需积分: 9 116 下载量 178 浏览量
2008-09-19
17:19:09
上传
评论 1
收藏 1.04MB RAR 举报
温馨提示
Ewebeditor 5.2 For Php Modify Version 不含后台
资源推荐
资源详情
资源评论
收起资源包目录
Ewebeditor 5.2 For Php Modify Version (511个子文件)
eWebEditorClient.CAB 43KB
editor.css 3KB
editor.css 2KB
editor.css 2KB
editor.css 2KB
editor.css 2KB
editor.css 2KB
editor.css 2KB
editor.css 2KB
editor.css 2KB
editor.css 2KB
menuarea.css 1KB
menuarea.css 887B
menuarea.css 875B
menuarea.css 875B
menuarea.css 875B
menuarea.css 875B
menuarea.css 875B
menuarea.css 875B
menuarea.css 875B
menuarea.css 875B
editorarea.css 493B
editorarea.css 463B
editorarea.css 463B
editorarea.css 463B
editorarea.css 463B
editorarea.css 463B
editorarea.css 463B
editorarea.css 463B
editorarea.css 463B
editorarea.css 463B
dialog.css 329B
dialog.css 329B
dialog.css 329B
dialog.css 329B
dialog.css 329B
dialog.css 329B
dialog.css 329B
dialog.css 329B
dialog.css 329B
dialog.css 329B
dialog.css 329B
zh-tw.css 277B
en.css 250B
zh-cn.css 235B
en.editorarea.css 134B
zh-tw.editorarea.css 133B
editorArea.css 105B
editorarea.zh-cn.edit.css 91B
editorarea.zh-cn.edit.css 91B
zh-cn.editorarea.css 3B
Thumbs.db 10KB
Thumbs.db 9KB
Thumbs.db 9KB
Thumbs.db 9KB
Thumbs.db 7KB
Thumbs.db 6KB
Thumbs.db 6KB
eWebEditorClientInstall.exe 418KB
buttons.gif 15KB
buttons.gif 15KB
buttons.gif 15KB
buttons.gif 15KB
buttons.gif 15KB
buttons.gif 15KB
buttons.gif 15KB
buttons.gif 15KB
buttons.gif 15KB
buttons.gif 10KB
flower.gif 7KB
ivy.gif 6KB
smile36.gif 4KB
smile43.gif 4KB
christmas.gif 3KB
smile25.gif 3KB
smile46.gif 3KB
smile04.gif 3KB
citrus.gif 2KB
smile30.gif 2KB
smile14.gif 2KB
smile23.gif 2KB
smile47.gif 2KB
smile40.gif 2KB
smile34.gif 2KB
smile07.gif 2KB
smile27.gif 2KB
smile06.gif 2KB
smile24.gif 2KB
smile38.gif 2KB
smile03.gif 2KB
46.gif 2KB
smile09.gif 2KB
ewebeditor.gif 2KB
smile35.gif 2KB
smile20.gif 2KB
smile32.gif 2KB
grid.gif 2KB
smile21.gif 2KB
smile45.gif 2KB
smile37.gif 2KB
共 511 条
- 1
- 2
- 3
- 4
- 5
- 6
资源评论
- 王振凯2012-12-06测试测试不知道能不能用
- lyy126hhh2013-01-05非常不错,功能详单给力!
- 程序二次开发2014-06-20测试了 但是不是我需要的
jobsen123
- 粉丝: 27
- 资源: 58
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功