form.class.php

来自「Phpcms2008 是一款基于 PHP+Mysql 架构的网站内容管理系统」· PHP 代码 · 共 21 行

PHP
21
字号
<?php
class form
{
	function editor($textareaid = 'content', $toolbar = 'standard', $width = '100%', $height = 400, $isshowext = 1)
	{
		global $PHPCMS, $mod, $file, $catid, $_userid;
		$str = "<script type=\"text/javascript\" src=\"fckeditor/fckeditor.js\"></script>\n<script language=\"JavaScript\" type=\"text/JavaScript\">var SiteUrl = \"".SITE_URL."\"; var Module = \"".$mod."\"; var sBasePath = \"".SITE_URL."\" + 'fckeditor/'; var oFCKeditor = new FCKeditor( '".$textareaid."' ) ; oFCKeditor.BasePath = sBasePath ; oFCKeditor.Height = '".$height."'; oFCKeditor.Width	= '".$width."' ; oFCKeditor.ToolbarSet	= '".$toolbar."' ;oFCKeditor.ReplaceTextarea();";
		if($_userid && $isshowext)
		{
			$str .= "editor_data_id += '".$textareaid."|';if(typeof(MM_time)=='undefined'){MM_time = setInterval(update_editor_data,".($PHPCMS['editor_interval_data']*1000).");}";
		}
		$str .= "</script>";
		if($isshowext)
		{
			$str .= "<div style='width:$width;text-align:left'>";
			if($_userid)
			{
				$str .= "<span style='float:right;height:22px'>";
				if(defined('IN_ADMIN') && $mod == 'phpcms' && $file == 'content')
				{
					$str .= "<span style='padding:1px;margin-right:10px;background-color: #fefe;border:#006699 solid 1px;'><a href='javascript:insert_page(\"$textareaid\")' title='鍦ㄥ厜鏍囧

⌨️ 快捷键说明

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