<?php
header('Content-type: text/html; charset=utf-8');
// The following variables values must reflect your installation needs.
$aspell_prog = '"C:\Program Files\Aspell\bin\aspell.exe"'; // by FredCK (for Windows)
//$aspell_prog = 'aspell'; // by FredCK (for Linux)
$lang = 'en_US';
$aspell_opts = "-a --lang=$lang --encoding=utf-8 -H --rem-sgml-check=alt"; // by FredCK
$tempfiledir = "./";
$spellercss = '../spellerStyle.css'; // by FredCK
$word_win_src = '../wordWindow.js'; // by FredCK
$textinputs = $_POST['textinputs']; # array
$input_separator = "A";
# set the JavaScript variable to the submitted text.
# textinputs is an array, each element corresponding to the (url-encoded)
# value of the text control submitted for spell-checking
function print_textinputs_var() {
global $textinputs;
foreach( $textinputs as $key=>$val ) {
# $val = str_replace( "'", "%27", $val );
echo "textinputs[$key] = decodeURIComponent(\"" . $val . "\");\n";
}
}
# make declarations for the text input index
function print_textindex_decl( $text_input_idx ) {
echo "words[$text_input_idx] = [];\n";
echo "suggs[$text_input_idx] = [];\n";
}
# set an element of the JavaScript 'words' array to a misspelled word
function print_words_elem( $word, $index, $text_input_idx ) {
echo "words[$text_input_idx][$index] = '" . escape_quote( $word ) . "';\n";
}
# set an element of the JavaScript 'suggs' array to a list of suggestions
function print_suggs_elem( $suggs, $index, $text_input_idx ) {
echo "suggs[$text_input_idx][$index] = [";
foreach( $suggs as $key=>$val ) {
if( $val ) {
echo "'" . escape_quote( $val ) . "'";
if ( $key+1 < count( $suggs )) {
echo ", ";
}
}
}
echo "];\n";
}
# escape single quote
function escape_quote( $str ) {
return preg_replace ( "/'/", "\\'", $str );
}
# handle a server-side error.
function error_handler( $err ) {
echo "error = '" . preg_replace( "/['\\\\]/", "\\\\$0", $err ) . "';\n";
}
## get the list of misspelled words. Put the results in the javascript words array
## for each misspelled word, get suggestions and put in the javascript suggs array
function print_checker_results() {
global $aspell_prog;
global $aspell_opts;
global $tempfiledir;
global $textinputs;
global $input_separator;
$aspell_err = "";
# create temp file
$tempfile = tempnam( $tempfiledir, 'aspell_data_' );
# open temp file, add the submitted text.
if( $fh = fopen( $tempfile, 'w' )) {
for( $i = 0; $i < count( $textinputs ); $i++ ) {
$text = urldecode( $textinputs[$i] );
// Strip all tags for the text. (by FredCK - #339 / #681)
$text = preg_replace( "/<[^>]+>/", " ", $text ) ;
$lines = explode( "\n", $text );
fwrite ( $fh, "%\n" ); # exit terse mode
fwrite ( $fh, "^$input_separator\n" );
fwrite ( $fh, "!\n" ); # enter terse mode
foreach( $lines as $key=>$value ) {
# use carat on each line to escape possible aspell commands
fwrite( $fh, "^$value\n" );
}
}
fclose( $fh );
# exec aspell command - redirect STDERR to STDOUT
$cmd = "$aspell_prog $aspell_opts < $tempfile 2>&1";
if( $aspellret = shell_exec( $cmd )) {
$linesout = explode( "\n", $aspellret );
$index = 0;
$text_input_index = -1;
# parse each line of aspell return
foreach( $linesout as $key=>$val ) {
$chardesc = substr( $val, 0, 1 );
# if '&', then not in dictionary but has suggestions
# if '#', then not in dictionary and no suggestions
# if '*', then it is a delimiter between text inputs
# if '@' then version info
if( $chardesc == '&' || $chardesc == '#' ) {
$line = explode( " ", $val, 5 );
print_words_elem( $line[1], $index, $text_input_index );
if( isset( $line[4] )) {
$suggs = explode( ", ", $line[4] );
} else {
$suggs = array();
}
print_suggs_elem( $suggs, $index, $text_input_index );
$index++;
} elseif( $chardesc == '*' ) {
$text_input_index++;
print_textindex_decl( $text_input_index );
$index = 0;
} elseif( $chardesc != '@' && $chardesc != "" ) {
# assume this is error output
$aspell_err .= $val;
}
}
if( $aspell_err ) {
$aspell_err = "Error executing `$cmd`\\n$aspell_err";
error_handler( $aspell_err );
}
} else {
error_handler( "System error: Aspell program execution failed (`$cmd`)" );
}
} else {
error_handler( "System error: Could not open file '$tempfile' for writing" );
}
# close temp file, delete file
unlink( $tempfile );
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="<?php echo $spellercss ?>" />
<script language="javascript" src="<?php echo $word_win_src ?>"></script>
<script language="javascript">
var suggs = new Array();
var words = new Array();
var textinputs = new Array();
var error;
<?php
print_textinputs_var();
print_checker_results();
?>
var wordWindowObj = new wordWindow();
wordWindowObj.originalSpellings = words;
wordWindowObj.suggestions = suggs;
wordWindowObj.textInputs = textinputs;
function init_spell() {
// check if any error occured during server-side processing
if( error ) {
alert( error );
} else {
// call the init_spell() function in the parent frameset
if (parent.frames.length) {
parent.init_spell( wordWindowObj );
} else {
alert('This page was loaded outside of a frameset. It might not display properly');
}
}
}
</script>
</head>
<!-- <body onLoad="init_spell();"> by FredCK -->
<body onLoad="init_spell();" bgcolor="#ffffff">
<script type="text/javascript">
wordWindowObj.writeBody();
</script>
</body>
</html>
没有合适的资源?快使用搜索试试~ 我知道了~
MF00449-大型B2B网站程序源码.zip
共2000个文件
cs:562个
gif:315个
html:303个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 8 浏览量
2023-08-11
17:36:43
上传
评论
收藏 11.79MB ZIP 举报
温馨提示
ASP.NET大型B2B网站程序源码 开发语言 : C# 数据库 : SQL2008 开发工具 : VS2010 源码类型 : WebForm 注意:不带技术支持,有帮助文件,虚拟商品,发货不退,看好再拍。 采用B/S架构。融入了模型化、模板、缓存、AJAX、SEO等前沿技术 系统使用当前流行的ASP.NET语言开发,采用B/S架构。融入了模型化、模板、缓存、AJAX、SEO等前沿技术。 与同类产品相比,系统功能更加强大、使用更加简单、运行更加稳定、安全性更强,效率更高,用户体验更好。系统开源发布,便于二次开发、功能整合、个性修改。 菜单功能: 1、商品分级分类设置 2、供应批发求购发布 3、多种等级会员服务 4、企业会员个性建站 5、会员商品促销活动 6、咨价下单订购留言 7、多种伪静态后辍 8、设置风格个性模板管理 9、SEO优化设置
资源推荐
资源详情
资源评论
收起资源包目录
MF00449-大型B2B网站程序源码.zip (2000个子文件)
Global.asax 2KB
Global.asax 2KB
UserLeftMenu.ascx 11KB
config.ascx 5KB
PageNo.ascx 902B
pagin.ascx 593B
Upfile.ascx 311B
Ajax.ashx 12KB
File.ashx 4KB
File.ashx 4KB
File.ashx 4KB
File.ashx 4KB
File.ashx 3KB
UpLoadClass.asp 11KB
upfile.asp 2KB
upload.asp 2KB
ResumeAdd.aspx 23KB
SupplyAdd.aspx 17KB
IndustryManage.aspx 17KB
UserEdit.aspx 17KB
SincereAgentAdd.aspx 17KB
SincereAgentEdit.aspx 15KB
SincereAgentEdit.aspx 15KB
SupplyEdit.aspx 15KB
SupplyEdit.aspx 15KB
PurchaseEdit.aspx 15KB
ManagerResumeEdit.aspx 15KB
ManagerResumeList.aspx 15KB
PurchaseAdd.aspx 13KB
PurchaseEdit.aspx 12KB
CompanyShow.aspx 12KB
MetaInfoEdit.aspx 12KB
NewsList.aspx 12KB
ManagerJobEdit.aspx 11KB
JobAdd.aspx 11KB
WebBasic.aspx 11KB
FavoriteList.aspx 11KB
CompanyJobList.aspx 11KB
JobEdit.aspx 11KB
CompanyResumeList.aspx 10KB
ManagerJobList.aspx 10KB
ConsultativeAdd.aspx 10KB
ConsultativeEdit.aspx 10KB
Registr.aspx 10KB
ExpoAdd.aspx 9KB
ExpoEdit.aspx 9KB
ExpoEdit.aspx 9KB
UserInfo.aspx 9KB
ResumeList.aspx 9KB
JobList.aspx 9KB
WillAgentEdit.aspx 9KB
FastPurchaseAdd.aspx 9KB
ExpoNews_Str.aspx 8KB
SupplyManage.aspx 8KB
DetailNewProduct.aspx 8KB
SincereAgentList.aspx 8KB
CompanyList_Pic.aspx 8KB
ProductAdd.aspx 8KB
AgentList_Str.aspx 8KB
ResumeDetails.aspx 7KB
Expo_Str.aspx 7KB
ExpoNews_Pic.aspx 7KB
UsersProductManage.aspx 7KB
ConsultativeTypeManage.aspx 7KB
PurchaseManage.aspx 7KB
SupplyManage.aspx 7KB
LinksAdd.aspx 7KB
PurchaseManage.aspx 7KB
ProductEdit.aspx 7KB
AgentTypeList.aspx 7KB
ProductList_Pic.aspx 7KB
ManagerJobType.aspx 7KB
AgentList_Pic.aspx 7KB
Expo_Pic.aspx 7KB
RelatedNews.aspx 7KB
ReceiveMessage.aspx 7KB
ExpoAdd.aspx 7KB
WillAgentList.aspx 7KB
MemberProductList.aspx 7KB
NewsList_Str.aspx 6KB
AreaList.aspx 6KB
TradeSettings.aspx 6KB
ExpoList.aspx 6KB
Index.aspx 6KB
WantLinks.aspx 6KB
KnowTypeList.aspx 6KB
ProblemList.aspx 6KB
ProductList_Str.aspx 6KB
SendMessage.aspx 6KB
ExpoNewsList.aspx 6KB
ExpoNewsEdit.aspx 6KB
AdPlaceList.aspx 6KB
index.aspx 6KB
Newslist_pic.aspx 6KB
RoleEdit.aspx 6KB
SetupUpload.aspx 6KB
HelpTypeList.aspx 6KB
LinksManage.aspx 6KB
Industry.aspx 6KB
CompanyList_Str.aspx 6KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
jane9872
- 粉丝: 108
- 资源: 7795
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- “人力资源+大数据+薪酬报告+涨薪调薪”
- PVE系统配置优化脚本
- “人力资源+大数据+薪酬报告+涨薪调薪”
- 含源码java Swing基于socket实现的五子棋含客户端和服务端
- 【java毕业设计】鹿幸公司员工在线餐饮管理系统的设计与实现源码(springboot+vue+mysql+LW).zip
- OpenCV C++第三方库
- 毕设分享:基于SpringBoot+Vue的礼服租聘系统-后端
- 复合铜箔:预计到2025年,这一数字将跃升至291.5亿元,新材料革命下的市场蓝海
- 【java毕业设计】流浪动物管理系统源码(springboot+vue+mysql+说明文档+LW).zip
- 【源码+数据库】采用纯原生的方式,基于mybatis框架实现增删改查
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功