<?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"; // 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 = '" . escape_quote( $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] );
$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>
没有合适的资源?快使用搜索试试~ 我知道了~
Asp.net网上购物系统.rar
共970个文件
jpg:350个
gif:339个
aspx:85个
18 下载量 7 浏览量
2019-06-24
20:28:25
上传
评论 3
收藏 6.87MB RAR 举报
温馨提示
采用的是asp.net的网上购物网站,具有学习和参考价值。
资源推荐
资源详情
资源评论
收起资源包目录
Asp.net网上购物系统.rar (970个子文件)
#HTShop_CS_DB.asa 1.16MB
MBS_List_SK1.ascx 7KB
GoodsComment.ascx 5KB
Header.ascx 5KB
CMS_Comment.ascx 3KB
Pager.ascx 3KB
SPager.ascx 3KB
SPager.ascx 3KB
Pager.ascx 3KB
MBS_List_SK2.ascx 3KB
UserLogin.ascx 3KB
AdvSearch.ascx 2KB
ShoppingCart.ascx 2KB
Footer.ascx 2KB
CMS_TextList.ascx 2KB
CMS_AdvSearch.ascx 2KB
CMS_Correlative.ascx 2KB
GoodsList.ascx 1KB
GoodsTopPicList_hot.ascx 1KB
GoodsTopPicList.ascx 1KB
GoodsTopPicList_commend.ascx 1KB
Search.ascx 1KB
CMS_PicList.ascx 1KB
CMS_Search.ascx 1KB
GoodsUserCommendTopPicList.ascx 1KB
CMS_Category.ascx 1KB
CMS_TopPicList.ascx 1KB
GoodsUserCommendTopList.ascx 975B
Header.ascx 869B
GoodsTopTextList.ascx 802B
GoodsBrandTopPicList.ascx 799B
HTShop_Category.ascx 742B
LinkTopPicList.ascx 741B
CartState.ascx 709B
UserCenterMenu.ascx 647B
SearchOrderState.ascx 640B
CMS_TopTextList.ascx 609B
LinkTopTextList.ascx 527B
SmartForm.ascx 407B
OrderState.ascx 161B
CMS_NavPath.ascx 151B
MyInfo.aspx 21KB
UserRegStep2.aspx 13KB
MyOrderForm.aspx 12KB
ManagerMenu.aspx 11KB
CheckMember.aspx 11KB
Add.aspx 11KB
HTShop_AddProduct.aspx 11KB
HTShop_ViewOrder.aspx 10KB
Goods.aspx 10KB
OrderConfirm.aspx 10KB
CMS_Category.aspx 9KB
ModifyUserInfo.aspx 9KB
HTShop_Cash_On_Delivery.aspx 9KB
Default.aspx 8KB
help.aspx 8KB
ManageUser.aspx 8KB
ManageUser.aspx 8KB
HTShop_Dict_Brand.aspx 7KB
HTShop_Category.aspx 7KB
CMS_List.aspx 7KB
HTShop_OrderFormList.aspx 7KB
HTShop_ProductList.aspx 6KB
ManageRoles.aspx 6KB
ManagePermissions.aspx 6KB
HTShop_FriendLink.aspx 6KB
CMS_Add.aspx 6KB
HTShop_CommentList.aspx 6KB
HTShop_Config.aspx 6KB
HTShop_Deliver.aspx 6KB
HTShop_Payment.aspx 5KB
MyOrderFormList.aspx 5KB
ModifyUserPassword.aspx 5KB
HTShop_UserList.aspx 5KB
Reply.aspx 5KB
HTShop_AdsList.aspx 5KB
HTShop_AddAds.aspx 5KB
HTShop_ViewUser.aspx 5KB
MyFavorites.aspx 5KB
GoodsList.aspx 4KB
CMS_Comment.aspx 4KB
UserCenter.aspx 4KB
ChangeUserPassword.aspx 4KB
ChangeUserPassword.aspx 4KB
CMS_Templet.aspx 4KB
MBS_Config.aspx 4KB
FilesManager.aspx 4KB
Login.aspx 4KB
Login.aspx 4KB
UserGroup.aspx 3KB
HTShop_SF_List.aspx 3KB
PDMode.aspx 3KB
OrderSucceed.aspx 3KB
ShoppingCart.aspx 2KB
CMS_Config.aspx 2KB
GetUserPassword.aspx 2KB
UserRegStep1.aspx 2KB
HTShop_ReplyComment.aspx 2KB
FootHelp.aspx 2KB
CMS_Detail.aspx 2KB
共 970 条
- 1
- 2
- 3
- 4
- 5
- 6
- 10
资源评论
佛系_疯子
- 粉丝: 1
- 资源: 9
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 2%EF%BC%9A%E9%99%95%E8%A5%BF%E
- yyspdz62_944.apk
- SAP公司间采购EDI配置-如何触发自动MIRO.docx
- python197基于图像识别的仪表实时监控系统.rar
- I2C驱动SHT30温湿度传感器和LCD12864使用例程(RSCG12864B)
- python193中学地理-中国的江河湖泊教学网(django).rar
- python191基于时间序列分析的大气污染预测软件(django).rar
- python190基于人脸识别智能化小区门禁管理系统.rar
- python189某医院体检挂号系统.rar
- python179的企业物流管理系统(django).rar
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功