资源简介
本系统实现了作业的发布、作业提交、作业审核。老师和学生均是通过注册成为本系统的用户,但是老师需要管理员审核才能成为用户。作业可分为选做和必做。有关本系统的详细说明和已参考我上传的软件工程课程设计报告和项目中的readme.txt文件。
代码片段和文件信息
“““
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2010 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
- 上一篇:博客空间 php源代码 10套
- 下一篇:基于最新layui的tp5的后台
相关资源
- 基于最新layui的tp5的后台
- 博客空间 php源代码 10套
- PHP 5.3.29
- LAMP网站开发黄金组合Linux+Apache+MySQL
- PHP健康之家医疗问答+医院展示源码后
- 小商城系统PHP版
- PHP_Tools_for_Visual_Studio_1.30.11167.2019_Do
- 抽奖源码(PHP前后台+mysql)
- PHPmysqlDreamweaver动态网站建设全站源码
- php安装包(for linux)
- Modern PHP 中文版
- [精仿]全网最新高仿米赚APP、学生赚
- php程序设计基础教程
- CRMEB微信商城小程序商城系统 v2.5.zi
- php-5.4.21.zip
- ecstore2.3.9.zip,开源版百分百支持php
- PHP动态网站开发教程第2版_钱兆楼+刘
- pdf分片
- 《PHP+MySql项目开发》配书资源
- 深入PHP:面向对象、模式与实践第3版
- 最新ECshop支持php高版本 多模板全套源
- php练手小项目
- 基于thinkphp开发的简单的教学管理系统
- PHP历史经典5.2.9 完整版
- 最新蚂蚁5.6s版单多城市分类信息系统
- php+ajax+mysql在线即时聊天源码chat,匿
- ewebeditor 10.7 php完整版 去版权 破解版
- MMM金融互助系统源码php版v3.0
- 正义网整站打包适合博客自媒体 v1.
- PHP+mysql学生信息管理系统241205
评论
共有 条评论