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

📄 editor.php

📁 完美的在线教育系统
💻 PHP
📖 第 1 页 / 共 2 页
字号:
<?php/** * The PHP Image Editor user interface. * @author $Author: Wei Zhuo $ * @author $Author: Paul Moers <mail@saulmade.nl> $ - watermarking and replace code + several small enhancements <http://fckplugins.saulmade.nl> * @version $Id: editor.php 26 2004-03-31 02:35:21Z Wei Zhuo $ * @package ImageManager */require_once('config.inc.php');require_once('Classes/ImageManager.php');require_once('Classes/ImageEditor.php');$manager = new ImageManager($IMConfig);$editor = new ImageEditor($manager, $IMConfig);$img_url = Security::remove_XSS($_GET['img']);//@TODO: the following path should be checked using the Security::check_rel_path() method but for this we need to know under which dir this path lives$img_dir = dirname($_GET['img']); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><title>edit image</title><link href="assets/editor.css" rel="stylesheet" type="text/css" />	<script type="text/javascript">/*<![CDATA[*/	window.resizeTo(673, 531);	// find language object	if(window.opener)	{		if (window.opener.I18N)		{			I18N = window.opener.I18N;		}		// direct edit		else if (window.opener.ImageManager && window.opener.ImageManager.I18N)		{			I18N = window.opener.ImageManager.I18N;		}	}	// language object not found?	if (!this.I18N)	{		// Read it now - copy in next script block		document.write('<script type="text/javascript" src="lang/' + window.opener._editor_lang + '.js"><\/script>');	}/*]]>*/</script><script type="text/javascript">/*<![CDATA[*/	// now copy the language object of the included script - needed a seperate new script block to be able to do so	if (!this.I18N)	{		I18N = this.ImageManager.I18N;	}/*]]>*/</script><script type="text/javascript" src="assets/slider.js"></script><script type="text/javascript" src="assets/popup.js"></script><script type="text/javascript" src="assets/editor.js"></script></head><body><div id="indicator"><img src="img/spacer.gif" id="indicator_image" height="20" width="20" alt="" /></div><div id="tools">	<div id="tools_replace" style="display:none;">		<div id="tool_inputs">		<table>		<tr>			<td>				<form action="editorFrame.php?img=<?php echo $img_url; ?>&action=replace" target='editor' id="uploadForm" method="post" enctype="multipart/form-data">					&nbsp;<input type="file" name="upload" id="upload"/>					<input type="hidden" name="dir" id="dir" value="<?php echo $img_dir; ?>" />				</form>			</td>			<td>				<img src="img/div.gif" height="30" width="2" class="div" alt="|" />			</td>		</tr>		</table>		</div>			<a href="javascript: doUpload(); document.getElementById('uploadForm').submit();" class="buttons" title="OK"><img src="img/btn_ok.gif" height="30" width="30" alt="OK" /></a>	</div>		<div id="tools_watermark" style="display:none;">		<div id="watermarkControls">			<div id="tool_inputs">				<label for="watermark_file">Watermark</label>: <select name="watermark_file" id="watermark_file" style="vertical-align: middle;" onchange="changeWatermark(this)"><!-- populated in editorFrame.php --></select>				<label style="margin-left: 15px;">Opacity:</label>				<table style="display: inline; vertical-align: middle;" cellpadding="0" cellspacing="0">					<tr>					<td>						<div id="slidercasingwatermark" class="slidercasing"> 					<div id="slidertrackwatermark" class="slidertrack" style="width:100px"><img src="img/spacer.gif" width="1" height="1" border="0" alt="track"></div>				<div id="sliderbarwatermark" class="sliderbar" style="left:100px" onmousedown="captureStart('watermark');"><img src="img/spacer.gif" width="1" height="1" border="0" alt="track"></div>				</div>						</td>					</tr>				</table>								<input type="text" id="sliderfieldwatermark" onchange="updateSlider(this.value, 'watermark')" style="width: 2em;" value="100"/>				<table style="display: inline; vertical-align: bottom; margin: 0px 5px 0px 20px;" cellpadding="0" cellspacing="0">					<tr>					<td>						<div style="cursor: pointer; cursor: hand; background-image: url(img/watermarkAlign.gif); vertical-align: middle; width: 24px; height: 24px; position: relative;">							<div style="position: absolute; left: 1px; top: 1px; width: 4px; height: 4px; overflow: hidden;" onmouseover="this.style.backgroundColor='#BE3545'" onmouseout="this.style.backgroundColor='transparent'" onclick="moveWatermark(0, 0);"></div>							<div style="position: absolute; left: 10px; top: 1px; width: 4px; height: 4px; overflow: hidden;" onmouseover="this.style.backgroundColor='#BE3545'" onmouseout="this.style.backgroundColor='transparent'" onclick="moveWatermark(0.5, 0);"></div>							<div style="position: absolute; left: 19px; top: 1px; width: 4px; height: 4px; overflow: hidden;" onmouseover="this.style.backgroundColor='#BE3545'" onmouseout="this.style.backgroundColor='transparent'" onclick="moveWatermark(1, 0);"></div>							<div style="position: absolute; left: 1px; top: 10px; width: 4px; height: 4px; overflow: hidden;" onmouseover="this.style.backgroundColor='#BE3545'" onmouseout="this.style.backgroundColor='transparent'" onclick="moveWatermark(0, 0.5);".5></div>							<div style="position: absolute; left: 10px; top: 10px; width: 4px; height: 4px; overflow: hidden;" onmouseover="this.style.backgroundColor='#BE3545'" onmouseout="this.style.backgroundColor='transparent'" onclick="moveWatermark(0.5, 0.5);"></div>							<div style="position: absolute; left: 19px; top: 10px; width: 4px; height: 4px; overflow: hidden;" onmouseover="this.style.backgroundColor='#BE3545'" onmouseout="this.style.backgroundColor='transparent'" onclick="moveWatermark(1, 0.5);"></div>							<div style="position: absolute; left: 1px; top: 19px; width: 4px; height: 4px; overflow: hidden;" onmouseover="this.style.backgroundColor='#BE3545'" onmouseout="this.style.backgroundColor='transparent'" onclick="moveWatermark(0, 1);"></div>							<div style="position: absolute; left: 10px; top: 19px; width: 4px; height: 4px; overflow: hidden;" onmouseover="this.style.backgroundColor='#BE3545'" onmouseout="this.style.backgroundColor='transparent'" onclick="moveWatermark(0.5, 1);"></div>							<div style="position: absolute; left: 19px; top: 19px; width: 4px; height: 4px; overflow: hidden;" onmouseover="this.style.backgroundColor='#BE3545'" onmouseout="this.style.backgroundColor='transparent'" onclick="moveWatermark(1, 1);"></div>						</div>					</td>					</tr>				</table>						<table style="display: inline; vertical-align: bottom; margin: 0px 10px 0px 5px;" cellpadding="0" cellspacing="0">					<tr>					<td>						<div style="cursor: pointer; cursor: hand; background-image: url(img/watermarkColor.gif); vertical-align: middle; width: 18px; height: 26px; position: relative;">							<div style="position: absolute; left: 1px; top: 1px; width: 6px; height: 3px; overflow: hidden;" onclick="colorWatermarkBG('');"></div>							<div style="position: absolute; left: 11px; top: 1px; width: 6px; height: 3px; overflow: hidden;" onclick="colorWatermarkBG('grid');"></div>							<div style="position: absolute; left: 1px; top: 8px; width: 6px; height: 3px; overflow: hidden;" onmouseover="this.style.backgroundColor='#FFFFFF'" onmouseout="this.style.backgroundColor='transparent'" onclick="colorWatermarkBG('#FFFFFF');"></div>							<div style="position: absolute; left: 11px; top: 8px; width: 6px; height: 3px; overflow: hidden;" onmouseover="this.style.backgroundColor='#000000'" onmouseout="this.style.backgroundColor='transparent'" onclick="colorWatermarkBG('#000000');"></div>							<div style="position: absolute; left: 1px; top: 15px; width: 6px; height: 3px; overflow: hidden;" onmouseover="this.style.backgroundColor='#FF0000'" onmouseout="this.style.backgroundColor='transparent'" onclick="colorWatermarkBG('#FF0000');"></div>							<div style="position: absolute; left: 11px; top: 15px; width: 6px; height: 3px; overflow: hidden;" onmouseover="this.style.backgroundColor='#00FF00'" onmouseout="this.style.backgroundColor='transparent'" onclick="colorWatermarkBG('#00FF00');"></div>							<div style="position: absolute; left: 1px; top: 22px; width: 6px; height: 3px; overflow: hidden;" onmouseover="this.style.backgroundColor='#0000FF'" onmouseout="this.style.backgroundColor='transparent'" onclick="colorWatermarkBG('#0000FF');"></div>							<div style="position: absolute; left: 11px; top: 22px; width: 6px; height: 3px; overflow: hidden;" onmouseover="this.style.backgroundColor='#FFFF00'" onmouseout="this.style.backgroundColor='transparent'" onclick="colorWatermarkBG('#FFFF00');"></div>						</div>					</td>					</tr>				</table>						<img src="img/div.gif" height="30" width="2" class="div" alt="|" />			</div>	

⌨️ 快捷键说明

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