资源简介
私服发布网站PHP源码
想用PHP做发布站的朋友有福了
代码片段和文件信息
“““
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2009 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the “GPL“)
http://www.gnu.org/licenses/gpl.html
- GNU Lesser General Public License Version 2.1 or later (the “LGPL“)
http://www.gnu.org/licenses/lgpl.html
- Mozilla Public License Version 1.1 or later (the “MPL“)
http://www.mozilla.org/MPL/MPL-1.1.html
== END LICENSE ==
This is the integration file for Python.
“““
import cgi
import os
import re
import string
def escape(text replace=string.replace):
“““Converts the special characters ‘<‘ ‘>‘ and ‘&‘.
RFC 1866 specifies that these characters be represented
in HTML as < > and & respectively. In Python
1.5 we use the new string.replace() function for speed.
“““
text = replace(text ‘&‘ ‘&‘) # must be done 1st
text = replace(text ‘<‘ ‘<‘)
text = replace(text ‘>‘ ‘>‘)
text = replace(text ‘“‘ ‘"‘)
text = replace(text “‘“ ‘‘‘)
return text
# The FCKeditor class
class FCKeditor(object):
def __init__(self instanceName):
self.InstanceName = instanceName
self.basePath = ‘/fckeditor/‘
self.Width = ‘100%‘
self.Height = ‘200‘
self.ToolbarSet = ‘Default‘
self.Value = ‘‘;
self.Config = {}
def Create(self):
return self.CreateHtml()
def CreateHtml(self):
HtmlValue = escape(self.Value)
Html = ““
if (self.IsCompatible()):
File = “fckeditor.html“
link = “%seditor/%s?InstanceName=%s“ % (
self.basePath
File
self.InstanceName
)
if (self.ToolbarSet is not None):
link += “&Toolbar=%s“ % self.ToolbarSet
# Render the linked hidden field
Html += “yle=\“display:none\“ />“ % (
self.InstanceName
self.InstanceName
HtmlValue
)
# Render the configurations hidden field
Html += “yle=\“display:none\“ />“ % (
self.InstanceName
self.GetConfigFieldString()
)
# Render the editor iframe
Html += “rame id=\“%s\__frame\“ src=\“%s\“ width=\“%s\“ height=\“%s\“ frameborder=\“0\“ scrolling=\“no\“> rame>“ % (
self.InstanceName
link
self.Width
self.Height
)
else:
if (self.Width.find(“%%“) < 0):
WidthCSS = “%spx“ % self.Width
else:
WidthCSS = self.Width
if (self.Height.find(“%%“) < 0):
HeightCSS = “%spx“ % self.Height
else:
HeightCSS = self.Height
Html += ““ % (
self.InstanceName
WidthCSS
HeightCSS
HtmlValue
)
return Html
def IsCom
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2010-11-20 14:44 web\
目录 0 2010-11-20 14:44 web\admin\
文件 666 2010-10-24 19:47 web\admin\display_admin.php
目录 0 2010-11-20 14:44 web\admin\html\
文件 1773 2010-11-08 20:04 web\admin\html\admin_top.html
文件 2312 2010-11-19 17:14 web\admin\html\article_add.html
文件 2748 2010-11-19 17:46 web\admin\html\article_del.html
文件 2382 2010-11-19 17:06 web\admin\html\article_edit.html
文件 2179 2010-11-19 16:43 web\admin\html\article_list.html
目录 0 2010-11-20 14:44 web\admin\html\Images\
文件 474261 2010-11-09 20:23 web\admin\html\Images\sm.jpg
文件 2446 2010-11-10 04:45 web\admin\html\image_add.html
文件 750 2010-09-29 22:05 web\admin\html\index.html
文件 5705 2010-11-19 15:15 web\admin\html\left.html
文件 6110 2010-11-08 19:44 web\admin\html\login.html
文件 1453 2010-11-08 21:37 web\admin\html\right.html
文件 3337 2010-11-10 05:23 web\admin\html\server_add.html
文件 3479 2010-11-10 04:40 web\admin\html\server_del.html
文件 3325 2010-11-09 19:33 web\admin\html\server_edit.html
文件 3813 2010-11-10 05:57 web\admin\html\server_edit1.html
文件 3069 2010-11-10 03:33 web\admin\html\server_list.html
文件 2969 2010-11-10 03:27 web\admin\html\web_set.html
目录 0 2010-11-20 14:44 web\admin\images\
文件 253 2008-06-04 18:48 web\admin\images\!.gif
文件 1705 2008-06-04 18:48 web\admin\images\ad.gif
文件 606 2008-06-04 18:48 web\admin\images\add.gif
文件 213 2008-06-04 18:48 web\admin\images\back.gif
文件 73 2008-06-04 18:48 web\admin\images\bg.gif
文件 26509 2008-06-04 18:48 web\admin\images\bigsize.jpg
文件 18679 2008-06-04 18:48 web\admin\images\bootnbg.jpg
文件 179 2008-06-04 18:48 web\admin\images\bullet.gif
............此处省略933个文件信息
评论
共有 条评论