Initialer Commit: Kundenverwaltung (PHP/Smarty)

Bestehende Codebasis als Ausgangsstand aufgenommen.

- .gitignore: Kundendaten (uploads_*), Smarty-Compile-Cache
  (templates_c), Laufzeit-Temp und Datenbank-Dumps ausgeschlossen;
  Verzeichnisstruktur ueber .gitkeep erhalten
- .gitattributes: Zeilenenden normalisiert (LF im Repo),
  Binaerformate markiert
- db-backup.php: MySQL-Zugangsdaten kommen jetzt wie im Rest der
  Anwendung aus der externen Konfiguration statt hartkodiert aus der
  Datei; Passwort wird ueber eine temporaere Optionsdatei statt per
  Kommandozeile uebergeben, Fehler von mysqldump/gzip werden gemeldet,
  Aufraeumen aelterer Backups berechnet Jahr und Monat konsistent

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-28 16:41:18 +02:00
co-authored by Claude Opus 5
commit e2124220e5
2225 changed files with 1070301 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
<%@ Page Language="C#" AutoEventWireup="true" MaintainScrollPositionOnPostback="false" StylesheetTheme="" Theme="" EnableTheming="false" ValidateRequest="false" %><%@ OutputCache Location="None" VaryByParam="None" %><script type="text/C#" runat="server">
protected void Page_Init(object sndr, EventArgs e)
{
ASPNetSpell.Helpers.renderAJAXHandler.process(Context);
Response.Flush();
Response.End();
}
</script><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="NotRendered1" runat="server">
<title>Themes Compatibility</title>
</head>
<body><form runat="server" id="NotRendered2"></form></body>
</html>
File diff suppressed because one or more lines are too long
+28
View File
@@ -0,0 +1,28 @@
<%@ WebHandler Language="C#" Class="ASPNetSpellWebHandler" %>
using System;
using System.Web;
using ASPNetSpell;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Text;
using System.IO;
using System.Web.Configuration;
public class ASPNetSpellWebHandler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
ASPNetSpell.Helpers.renderAJAXHandler.process(context);
}
public bool IsReusable {
get {
return false;
}
}
}
+390
View File
@@ -0,0 +1,390 @@
<%option explicit%><!--#include file="asp/ASPSpellClass.asp"--><% dim LicenseKey, SaveToCentralDictionary%><!--#include file="settings/default-settings.asp"--><%
Server.ScriptTimeout=30
Response.Expires = 0
Response.Expiresabsolute = Now() - 1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"
Dim sent_langs, objASPSpell, objASPSpellDYM,lang, arrLangs, note, script, sender, args, i, dlimit1, dlimit2, dlimit5, command, words, suggestcountinit, error_type_words(), spell_check_words(), suggest_words(), maxsuglength, suggestcount, word, ok, doSuggest, centralDictionaryFile, OpenFileobj, FSOobj,FilePath, centralDictionaryFilePath, sValid
Set objASPSpell = ASPSpellObjectProvider.Create("aspspellcheck")
objASPSpell.ignoreCaseMistakes =false
objASPSpell.ignoreAllCaps = false
objASPSpell.IgnoreNumeric = false
objASPSpell.IgnoreEmailAddresses = false
objASPSpell.IgnoreWebAddresses = false
objASPSpell.newLineNewSentance = false
objASPSpell.LicenseKey = LicenseKey
objASPSpell.DictionaryPath = (replace(LCASE(Request.ServerVariables("PATH_INFO")),"core/default.asp","dictionaries/"))+""
objASPSpell.AddCustomDictionary("custom.txt")
objASPSpell.LoadCustomBannedWords("language-rules/banned-words.txt")
' call LoadCommonTypos(objASPSpell,"language-rules/common-mistakes.txt")
////////////////////////////////
Response.Buffer = true
'Response.ContentType = "text/plain"
lang = "English (International)"
note = ""
script = false
sender = ""
args = ""
if (Request.QueryString("args")&"" <> "") then args = Request.QueryString("args")
if (Request.QueryString("lan")&"" <> "") then lang = Request.QueryString("lan")
if (Request.QueryString("note")&"" <> "") then note = Request.QueryString("note")
if (Request.QueryString("sender")&"" <> "") then sender = Request.QueryString("sender")
if (Request.QueryString("script")&"" <> "") then script = true
if (Request.QueryString("command")&"" <> "") then command = UCASE(Trim(Request.QueryString("command"))) else response.write("No Command"):Response.end()
dlimit1 = chr(1)
dlimit2 = chr(2)
dlimit5 = chr(5)
arrLangs = Split(lang,",")
for i=0 to UBOUND(arrLangs)
objASPSpell.AddDictionary(trim(arrLangs(i)))
next
IF (command ="SAVEWORD") THEN
Response.Write("SAVEWORD")
Response.Write(dlimit5)
Response.Write(sender)
Response.Write(dlimit5)
if( NOT SaveToCentralDictionary) THEN response.write "!! SaveToCentralDictionary Must be set true in core/settings/default-settings.asp line 2 to allow for a centralized 'add to dictionary'" : response.end()
centralDictionaryFile = (replace(LCASE(Request.ServerVariables("PATH_INFO")),"core/default.asp","dictionaries/"))+""&"custom.txt"
on error resume next
FilePath=Server.MapPath(centralDictionaryFile)
Set FSOobj = Server.CreateObject("Scripting.FileSystemObject")
Set OpenFileobj = FSOobj.OpenTextFile(FilePath, 8)
OpenFileobj.WriteLine(args)
OpenFileobj.Close
on error goto 0
if err.number <>0 then response.write "!!Word not saved - "&centralDictionaryFile&" unwritable. Check the permissions for IUSER" : response.end()
response.write args&" saved to the custom dictionary."
END IF
IF (command = "WINSETUP") THEN
words = split(args,dlimit1)
suggestcountinit = 3
redim error_type_words (Ubound(words))
redim spell_check_words (Ubound(words))
redim suggest_words (Ubound(words))
maxsuglength = 0
suggestcount = 0
for i = 0 to ubound(words)
error_type_words(i) = ""
if (suggestcount < suggestcountinit + 1) THEN suggest_words(i) = ""
IF ( objASPSpell.SpellCheck(words(i))) THEN
spell_check_words(i) = "T"
ELSE
spell_check_words(i) = "F"
error_type_words(i) = objASPSpell.ErrorTypeWord(words(i))
if (suggestcount < suggestcountinit + 1) THEN
suggestcount = suggestcount + 1
suggest_words(i) = Join( objASPSpell.Suggestions(words(i)), dlimit2)
maxsuglength = i + 1
END IF
END IF
next 'i
redim preserve suggest_words (maxsuglength)
Response.Write("WINSETUP")
Response.Write(dlimit5)
Response.Write(sender)
Response.Write(dlimit5)
Response.Write(JOIN( spell_check_words,""))
Response.Write(dlimit5)
Response.Write(JOIN( error_type_words,dlimit1))
Response.Write(dlimit5)
Response.Write(JOIN( suggest_words,dlimit1))
Response.Write(dlimit5)
Response.Write(JOIN( objASPSpell.ListDictionaries(),dlimit2))
END IF
' //////////////////////////////// END WINSETUP
IF (command ="LISTDICTS") THEN
Response.Write("WINSETUP")
Response.Write(dlimit5)
Response.Write(sender)
Response.Write(dlimit5)
Response.Write(JOIN( objASPSpell.ListDictionaries(),dlimit2))
END IF
IF (command ="WINSUGGEST") THEN
words = split(args,dlimit1)
redim suggest_words (Ubound(words))
FOR i = 0 to UBOUND(words)
suggest_words(i) = Join( objASPSpell.Suggestions(words(i)), dlimit2)
NEXT 'i
Response.Write "WINSUGGEST"
Response.Write dlimit5
Response.Write sender
Response.Write dlimit5
Response.Write(JOIN( suggest_words,dlimit1))
END IF ''' WIN SUGGEST
IF (command ="CTXSPELL") THEN
words = split(args,dlimit1)
redim error_type_words (Ubound(words))
redim spell_check_words (Ubound(words))
redim suggest_words (Ubound(words))
FOR i = 0 to UBOUND(words)
error_type_words(i) ="-"
IF ( objASPSpell.SpellCheck(words(i))) THEN
spell_check_words(i) = "T"
ELSE
spell_check_words(i) = "F"
error_type_words(i) = objASPSpell.ErrorTypeWord(words(i))
END IF
NEXT 'i
Response.Write ("CTXSPELL")
Response.Write (dlimit5)
Response.Write (sender)
Response.Write (dlimit5)
Response.Write(JOIN( spell_check_words,""))
Response.Write(dlimit5)
Response.Write(JOIN( error_type_words,dlimit1))
END IF 'CTXSPELL
IF (command ="CTXSUGGEST") THEN
word = args
Response.Write ("CTXSUGGEST")
Response.Write (dlimit5)
Response.Write (sender)
Response.Write (dlimit5)
Response.Write( Join( objASPSpell.Suggestions(args), dlimit2) )
IF(note="ADDLANGS") THEN
Response.Write (dlimit5)
Response.Write(JOIN( objASPSpell.ListDictionaries(),dlimit2))
END IF
END IF 'CTXSUGGEST
IF (command ="RAWSPELL") THEN
word = args
ok = objASPSpell.SpellCheck(word)
Response.Write ("RAWSPELL")
Response.Write (dlimit5)
Response.Write (sender)
Response.Write (word)
Response.Write (sender)
Response.Write (dlimit5)
IF (ok) THEN Response.Write ("T") ELSE Response.Write ("F")
Response.Write (dlimit5)
if( ok) THEN
Response.Write (word)
Response.Write (dlimit5)
Response.Write ("")
ELSE
Response.Write( Join( objASPSpell.Suggestions(word), dlimit2) )
Response.Write (dlimit5)
Response.Write objASPSpell.ErrorTypeWord(word)
END IF
END IF '' RAWSPELL
IF (command ="APISPELL" OR command ="APISPELLARRAY") THEN
words = split(args,dlimit1)
doSuggest = (note<>"NOSUGGEST")
redim error_type_words (Ubound(words))
redim spell_check_words (Ubound(words))
redim suggest_words (Ubound(words))
FOR i = 0 to UBOUND(words)
error_type_words(i) = ""
IF ( objASPSpell.SpellCheck(words(i))) THEN
spell_check_words(i) = "T"
ELSE
spell_check_words(i) = "F"
error_type_words(i) = objASPSpell.ErrorTypeWord(words(i))
if(doSuggest) THEN
suggest_words(i) = Join( objASPSpell.Suggestions(words(i)), dlimit2)
ELSE
suggest_words(i) = ""
END IF
END IF
NEXT 'i
Response.Write (command)
Response.Write (dlimit5)
Response.Write (sender)
Response.Write (dlimit5)
Response.Write(JOIN( spell_check_words,""))
Response.Write (dlimit5)
Response.Write(JOIN( error_type_words,dlimit1))
Response.Write(dlimit5)
Response.Write(JOIN( suggest_words,dlimit1))
Response.Write(dlimit5)
Response.Write(JOIN( words,dlimit1))
END IF 'APISPELL / APISPELLARRAY
IF (command ="APIDYM" ) THEN
Set objASPSpellDYM = ASPSpellObjectProvider.Create("aspdidyoumean")
objASPSpellDYM.setInstallPath( (replace(LCASE(Request.ServerVariables("PATH_INFO")),"core/default.asp","dictionaries/"))+"")
objASPSpellDYM.setSugguestionsLimit(1)
arrLangs = Split(lang,",")
for i=0 to UBOUND(arrLangs)
objASPSpellDYM.AddDictionary(trim(arrLangs(i)))
next
Response.Write ("APIDYM")
Response.Write (dlimit5)
Response.Write (sender)
Response.Write (dlimit5)
Response.Write (args)
Response.Write (dlimit5)
Response.Write (objASPSpellDYM.SuggestionString(args))
Response.Write (dlimit5)
Response.Write (lang)
END IF 'APIDYM
IF (command ="APIVALIDATE") THEN
words = split(args,dlimit1)
objASPSpell.ignoreCaseMistakes = (note="CASESENSITVE")
redim error_type_words (Ubound(words))
redim spell_check_words (Ubound(words))
sValid = "T"
FOR i = 0 to UBOUND(words)
error_type_words(i) = ""
IF ( objASPSpell.SpellCheck(words(i))) THEN
spell_check_words(i) = "T"
ELSE
spell_check_words(i) = "F"
sValid = "F"
error_type_words(i) = objASPSpell.ErrorTypeWord(words(i))
END IF
NEXT 'i
Response.Write (command)
Response.Write (dlimit5)
Response.Write (sender)
Response.Write (dlimit5)
Response.Write(JOIN( spell_check_words,""))
Response.Write (dlimit5)
Response.Write(JOIN( error_type_words,dlimit1))
Response.Write(dlimit5)
Response.Write(JOIN( words,dlimit1))
Response.Write(dlimit5)
Response.Write(sValid)
END IF 'APIVALIDATE
IF (script) THEN response.write ("<script type=""text/javascript"">window.parent.livespell.ajax.pickupIframe(document.body.innerHTML);history.go(-1);</script>")
Response.flush
response.end()
%><%
'
%>
+120
View File
@@ -0,0 +1,120 @@
var livespell;spellWin={resumeAfterEditing:function(){this.pickup();spellWin.regroup(false)},isStillOpen:function(){return window.document!=null;},providerID:null,provider:function(){if(!livespell){this.handshake()}
return livespell.spellingProviders[this.providerID];},lang:{localize_ui:function(){document.title=this.fetch("WIN_TITLE");E$("btnAddToDict").value=this.fetch("BTN_ADD_TO_DICT");E$("btnAutoCorrect").value=this.fetch("BTN_AUTO_CORECT");E$("btnOptionsCancel").value=E$("btnLangCancel").value=this.fetch("BTN_CANCEL");E$("btnChange").value=this.fetch("BTN_CHANGE");E$("btnChangeAll").value=this.fetch("BTN_CHANGE_ALL");E$("btnCancel").value=this.fetch("BTN_CLOSE");E$("btnIgnoreAll").value=this.fetch("BTN_IGNORE_ALL");E$("btnIgnore").value=this.fetch("BTN_IGNORE_ONCE");E$("btnUndoManualEdit").value=this.fetch("BTN_CLEAR_EDIT");E$("btnUndo").value=this.fetch("BTN_UNDO");E$("btnAllDone").value=E$("btnOptionsOK").value=E$("btnLangOK").value=this.fetch("BTN_OK");E$("btnShowOptions").value=this.fetch("BTN_OPTIONS");E$("btnResetDict").value=E$("btnResetAutoCorrect").value=this.fetch("BTN_RESET");E$("tSum").innerHTML=this.fetch("DONESCREEN_MESSAGE");E$("fldLanguageLab").innerHTML=this.fetch("LABEL_LANGAUGE");E$("SuggestionsLab").innerHTML=this.fetch("LABEL_SUGGESTIONS");E$("fldLanguageMultipleLabText").innerHTML=this.fetch("LANGUAGE_MULTIPLE_INSTRUCTIONS");E$("lMeaningLink").innerHTML=this.fetch("LOOKUP_MEANING");E$("optCaseSensitiveText").innerHTML=this.fetch("OPT_CASE_SENSITIVE");E$("optAllCapsbText").innerHTML=this.fetch("OPT_IGNORE_CAPS");E$("optNumericText").innerHTML=this.fetch("OPT_IGNORE_NUMERIC");E$("optSentenceText").innerHTML=this.fetch("OPT_SENTENCE_AWARE");E$("btnResetDictLabText").innerHTML=this.fetch("OPT_PERSONAL_DICT");E$("btnResetAutoCorrectLabText").innerHTML=this.fetch("OPT_PERSONAL_AUTO_CURRECT");if(spellWin.provider().AddWordsToDictionary=="SERVER"){E$("btnAddToDict").value=this.fetch("BTN_ADD_TO_DICT").replace("Personal","Word")}},fetch:function(index){return livespell.lang.fetch(spellWin.providerID,index);}},allDone:false,docs:[],wordstocheck:[],currentDoc:0,currentToken:0,currentReason:"",editcount:0,suggestionsInMotion:true,undo:{bookmarks:[],set:function(action){var mem={};var targets="currentDoc,currentReason,currentToken,editcount".split(",");for(var i=0;i<targets.length;i++){mem[targets[i]]=spellWin[targets[i]]}
mem.word=spellWin.tokens.getCurrent();mem.docs=this.arrayCopy(spellWin.docs)
mem.action=action+"";if(action==="ADD"){mem.add=livespell.cookie.get("SPELL_DICT_USER");}
if(action==="AUTO"){mem.auto=livespell.cookie.get("SPELL_AUTOCORRECT_USER");}
this.bookmarks.push(mem);if(this.bookmarks.length>spellWin.provider().UndoLimit){this.bookmarks.shift();}},get:function(){var mem=this.bookmarks.pop();if(!mem){return};var targets="currentDoc,currentReason,currentToken,editcount".split(",");for(var i=0;i<targets.length;i++){spellWin[targets[i]]=mem[targets[i]]}
delete spellWin.docs;spellWin.docs=this.arrayCopy(mem.docs)
delete livespell.cache.ignore[mem.word]
if(mem.action==="ADD"){spellWin.actions.deletePersonal();livespell.cookie.set("SPELL_DICT_USER",mem.add);}
if(mem.action==="AUTO"){spellWin.actions.deleteAutoCorrect();livespell.cookie.set("SPELL_AUTOCORRECT_USER",mem.auto);}
spellWin.tokenize();spellWin.moveNext();},arrayCopy:function(ain){var aout=[];for(var it in ain){aout[it]=ain[it]}
return aout;}},tokens:{value:[],countWords:function(){var num=0;for(var i=0;i<this.value.length;i++){for(var j=0;j<this.value[i].length;j++){if(this.isWord(i,j)){num++}}}
return num;},next:function(){spellWin.currentToken++
if(spellWin.currentToken>this.value[spellWin.currentDoc].length){spellWin.currentDoc++;spellWin.currentToken=0;}},set:function(i,j,val){this.value[i][j]=val;},setCurrent:function(val){this.value[spellWin.currentDoc][spellWin.currentToken]=val;},getCurrent:function(){return this.value[spellWin.currentDoc][spellWin.currentToken];},isWord:function(i,j){return livespell.test.isword(this.value[i][j])},startsSentence:function(i,j){return(j<2||livespell.test.eos(this.value[i][j-1]))},findAndReplace:function($$from,$$to,$$toCase){for(var i=0;i<this.value.length;i++){for(var j=0;j<this.value[i].length;j++){if(this.isWord(i,j)&&this.value[i][j].toLowerCase()==$$from.toLowerCase()){this.value[i][j]=livespell.str.toCase($$to,livespell.str.getCase(this.value[i][j]),this.startsSentence(i,j));spellWin.editcount++;}}}},appetureXHTML:function(i,j,green){var $$appeture=this.appeture(i,j,false);$$out="";for(var k=$$appeture.min;k<=$$appeture.max;k++){$$fragment=livespell.str.stripTags(this.value[i][k]);if(k==j){if(!green){$$fragment='<span id="highlight">'+$$fragment+"</span>";}else{$$fragment='<span id="highlightGrammar">'+$$fragment+"</span>";}}
$$out+=$$fragment;}
return $$out;},setAppeture:function(i,j,value){var $$appeture=this.appeture(i,j,true);for(var k=$$appeture.min;k<=$$appeture.max;k++){if(k==$$appeture.min){this.value[i][k]=value;}else{this.value[i][k]="";}}
spellWin.currentToken=$$appeture.min;},appetureText:function(i,j){var $$appeture=this.appeture(i,j,true);$$out="";for(var k=$$appeture.min;k<=$$appeture.max;k++){$$fragment=this.value[i][k];if($$fragment){$$out+=$$fragment;}}
return $$out;},appeture:function(i,j,binsafe){var doclen=this.value[i].length;var found=false
for(var $$min=j;$$min>0&&$$min>j-20&&!found;$$min--){if(livespell.test.eos(this.value[i][$$min])||(binsafe&&livespell.test.HTML(this.value[i][$$min]))){$$min++;found=true;break;}}
found=false
for(var $$max=j;$$max<doclen&&$$max<j+20&&!found;$$max++){if(livespell.test.eos(this.value[i][$$max])||(binsafe&&livespell.test.HTML(this.value[i][$$max]))){$$max--;found=true;break;}}
var $$appeture={};$$appeture.min=$$min;$$appeture.max=$$max;return $$appeture;}},actions:{registerclose:function(){if(spellWin.allDone){spellWin.provider().onDialogCompleteNET();spellWin.provider().onDialogComplete();spellWin.provider().__SubmitForm();}else{spellWin.provider().onDialogClose();}},done:function(){spellWin.provider().onDialogCompleteNET();spellWin.provider().onDialogComplete();spellWin.provider().__SubmitForm();spellWin.allDone=false;if(!spellWin.provider().ShowSummaryScreen&&spellWin.provider().isUniPacked&&spellWin.undo.bookmarks.length==0){var doret=false;srthtml="<h2 class='spellnofify'>"+spellWin.lang.fetch("DONESCREEN_MESSAGE")+"</h2><br/>"
try{window.parent.Modalbox.show(srthtml,{title:spellWin.lang.fetch("WIN_TITLE"),slideDownDuration:0.2,slideUpDuration:0.2});doret=true;}catch(e){}
try{window.opener.Modalbox.show(srthtml,{title:spellWin.lang.fetch("WIN_TITLE"),slideDownDuration:0.2,slideUpDuration:0.2});doret=true;}catch(e){}
try{window.opener.Modalbox.resizeToContent()}catch(e){}
if(doret){return}}
if(spellWin.provider().CustomOpenerClose)
{spellWin.provider().CustomOpenerClose()}
else if(window.opener||window.parent){window.iclose();}else if(dialogArguments&&dialogArguments.document){window.iclose();}},cancel:function(){spellWin.provider().onDialogCancel();if(spellWin.provider().CustomOpenerClose)
{spellWin.provider().CustomOpenerClose()}
else if(window.opener||window.parent){window.iclose();}else if(dialogArguments&&dialogArguments.document){window.iclose();}},changeLanguage:function(){if(spellWin.ui.getMenuValue("fldLanguage")==spellWin.lang.fetch("LANGUAGE_MULTIPLE")){spellWin.optionsMenu.showMultiLang(true)}else{spellWin.provider().Language=spellWin.ui.getMenuValue("fldLanguage");spellWin.provider().onChangeLanguage(spellWin.ui.getMenuValue("fldLanguage"))
spellWin.regroup(false);}},changeMultiLanguage:function(){spellWin.provider().Language=spellWin.ui.getMenuValue("fldLanguageMultiple");spellWin.provider().onChangeLanguage(spellWin.ui.getMenuValue("fldLanguageMultiple"))
spellWin.optionsMenu.showMultiLang(false)
spellWin.ui.setupLanguageMenu();spellWin.regroup(false);},deletePersonal:function(){livespell.userDict.forget();livespell.cookie.erase("SPELL_DICT_USER");spellWin.provider().docRePaint();},deleteAutoCorrect:function(){livespell.cookie.erase("SPELL_AUTOCORRECT_USER");},ignoreOnce:function(){spellWin.undo.set();spellWin.provider().onIgnore(spellWin.tokens.getCurrent());spellWin.tokens.next();return spellWin.moveNext();},ignoreAll:function(){spellWin.undo.set();livespell.cache.ignore[spellWin.tokens.getCurrent().toLowerCase()]=true;spellWin.provider().onIgnoreAll(spellWin.tokens.getCurrent());spellWin.tokens.next();return spellWin.moveNext();},changeCurrent:function(){spellWin.undo.set();spellWin.editcount++
if(spellWin.ui.editingNow){spellWin.tokens.setAppeture(spellWin.currentDoc,spellWin.currentToken,E$("fldTextInput").value);spellWin.provider().onChangeWord(spellWin.tokens.getCurrent(),E$("fldTextInput").value);spellWin.ui.showEdit(false);spellWin.moveNext();return;}
var oS=E$("fldSuggestions");var os_value=spellWin.ui.getMenuValue("fldSuggestions")
if(oS.disabled){if(os_value=="__*DEL*__"){spellWin.provider().onChangeWord(spellWin.tokens.getCurrent(),"");spellWin.tokens.setCurrent("");spellWin.tokens.set(spellWin.currentDoc,spellWin.currentToken-1,livespell.str.rtrim(spellWin.tokens.value[spellWin.currentDoc][spellWin.currentToken-1]))}
if(os_value=="NONE"){spellWin.tokens.next();return spellWin.moveNext();}}else{if(os_value=="__*REG*__"){var a
if(spellWin.provider().isUniPacked){a="javascriptspellcheck";}
else if(spellWin.provider().ServerModel.toLowerCase()=="asp.net"||spellWin.provider().ServerModel.toLowerCase()=="aspx"){a="aspnetspell";}
else if(spellWin.provider().ServerModel.toLowerCase()=="asp"){a="aspspellcheck";}
else{a="phpspellcheck";}
window.open("h"+"tt"+"p"+":"+"/"+"/w"+"ww."+a+".c"+"om/Pur"+""+"cha"+"se")}else{spellWin.provider().onChangeWord(spellWin.tokens.getCurrent(),os_value);spellWin.tokens.setCurrent(os_value);}}
spellWin.tokens.next();return spellWin.moveNext();},changeAll:function(){spellWin.undo.set();var $$from=spellWin.tokens.getCurrent()
var $$to=spellWin.ui.getMenuValue("fldSuggestions");var $$toCase=livespell.str.getCase($$to);spellWin.tokens.findAndReplace($$from,$$to,$$toCase);spellWin.provider().onChangeAll($$from,$$to);spellWin.tokens.next()
spellWin.moveNext();},addPersonal:function(word){spellWin.undo.set("ADD");word=spellWin.tokens.getCurrent()
if(spellWin.provider().AddWordsToDictionary=="SERVER"){livespell.ajax.send("SAVEWORD",word,0,0,spellWin.provider().id());}
livespell.userDict.add(word)
spellWin.provider().docRePaint();spellWin.provider().onLearnWord(spellWin.tokens.getCurrent());spellWin.moveNext();},addAutoCorrect:function(){spellWin.undo.set("AUTO");$$current_cookie=livespell.cookie.get("SPELL_AUTOCORRECT_USER");var $$from=spellWin.tokens.getCurrent()
var $$to=spellWin.ui.getMenuValue("fldSuggestions");var $$toCase=livespell.str.getCase($$to);spellWin.tokens.findAndReplace($$from,$$to,$$toCase);if($$current_cookie){$$current_cookie=livespell.str.chr(1)+$$current_cookie}
$$current_cookie=$$from+"->"+$$to+"#"+$$toCase+$$current_cookie;livespell.cookie.setLocal("SPELL_AUTOCORRECT_USER",$$current_cookie);spellWin.provider().docRePaint();spellWin.provider().onLearnAutoCorrect($$from,$$to);spellWin.moveNext();}},optionsMenu:{showMultiLang:function(flag){spellWin.ui.show("multiLangForm",flag);spellWin.ui.show("MainForm",!flag);var fLang=E$("fldLanguage")
if(!flag){for(var i=0;i<fLang.options.length;i++){if(fLang.options[i].value==spellWin.provider().Language){fLang.selectedIndex=i;}}}},show:function(flag){if(flag){var pdict=livespell.cookie.get("SPELL_DICT_USER")
var intPersonalEntries=pdict.length?pdict.split(livespell.str.chr(1)).length:0;E$("tDictCount").innerHTML=intPersonalEntries+" "+spellWin.lang.fetch("OPT_ENTRIES");spellWin.ui.enable("btnResetDict",intPersonalEntries>0);var pauto=livespell.cookie.get("SPELL_AUTOCORRECT_USER")
var intPersonalAutoEntries=pauto.length?pauto.split(livespell.str.chr(1)).length:0;E$("tAutoCorrectCount").innerHTML=intPersonalAutoEntries+" "+spellWin.lang.fetch("OPT_ENTRIES");spellWin.ui.enable("btnResetAutoCorrect",intPersonalAutoEntries>0);E$("optCaseSensitive").checked=spellWin.provider().CaseSensitive;E$("optAllCaps").checked=spellWin.provider().IgnoreAllCaps;E$("optNumeric").checked=spellWin.provider().IgnoreNumeric;}
spellWin.ui.show("optForm",flag);spellWin.ui.show("MainForm",!flag);},set:function(){spellWin.provider().CaseSensitive=E$("optCaseSensitive").checked;spellWin.provider().IgnoreAllCaps=E$("optAllCaps").checked;spellWin.provider().IgnoreNumeric=E$("optNumeric").checked;spellWin.provider().CheckGrammar=E$("optSentence").checked;this.show(false);spellWin.moveNext();}},init:function(){this.handshake();this.pickup();this.setTheme();this.hideButtons();spellWin.provider().setFieldListeners();setInterval(this.openerAware,100);this.lang.localize_ui();E$("optSentence").checked=spellWin.provider().CheckGrammar;this.ui.setLoadingMessage();spellWin.tokenize();this.autoCorrectOnLoad();livespell.userDict.load();this.ui.disableAll();this.suggestionsInMotion=false;spellWin.buildWordQue();this.sendInitialAJAXRequest(false);},openerAware:function(){if(window.opener||window.parent){return;}
try{if(dialogArguments&&dialogArguments.document){return;}}catch(e){}
window.iclose();},regroup:function(binisrepeat){this.suggestionsInMotion=false;this.ui.setLoadingMessage();spellWin.tokenize();this.ui.disableAll();spellWin.buildWordQue();this.sendInitialAJAXRequest(binisrepeat)},nextSuggestionChunk:function(){if(!this.suggestionsInMotion){return this.regroup(true)}
var chunksize=8;livespell.cache.suglist=[];for(var i=spellWin.currentDoc;i<this.tokens.value.length;i++){for(var j=(i==spellWin.currentDoc?spellWin.currentToken:0);j<this.tokens.value[i].length;j++){var spelltest=livespell.test.spelling(this.tokens.value[i][j],spellWin.provider().Language);var unknown=(!livespell.cache.suggestions[spellWin.provider().Language][this.tokens.value[i][j]]);if(this.tokens.isWord(i,j)&&!spelltest&&unknown){livespell.cache.suglist=livespell.array.safepush(livespell.cache.suglist,this.tokens.value[i][j])
if(livespell.cache.suglist.length>=chunksize){return this.fetchSuggestionRequest()}}}}
if(livespell.cache.suglist.length){return this.fetchSuggestionRequest()}
this.suggestionsInMotion=false;},fetchSuggestionRequest:function(){livespell.ajax.send("WINSUGGEST",livespell.cache.suglist.join(livespell.str.chr(1)),spellWin.provider().Language,"",spellWin.providerID)},notify:function(){delete this.docs;this.docs=[];for(var i=0;i<this.tokens.value.length;i++){this.docs[i]=this.tokens.value[i].join("");}
spellWin.tokenize();spellWin.provider().docUpdate(this.docs);},autoCorrectOnLoad:function(){var $$current_cookie=livespell.cookie.get("SPELL_AUTOCORRECT_USER");if(!$$current_cookie){return false;}
var $$mycmds=$$current_cookie.split(livespell.str.chr(1));for(var key in $$mycmds){var mycmd=$$mycmds[key];if(!mycmd||!mycmd.length){return}
try{var a_mycmd=mycmd.split("->");if(a_mycmd[1]){var from=a_mycmd[0];var to=a_mycmd[1].split("#")[0];var toCase=a_mycmd[1].split("#")[1];livespell.cache.ignore[to.toLowerCase()]=true;this.tokens.findAndReplace(from,to,toCase);}}catch(e){}}},moveNext:function(){this.notify();try{window.focus();}catch(e){};var $$typo=this.FindNextTypo();if($$typo===null){return;}
var suggestions=livespell.cache.suggestions[spellWin.provider().Language][$$typo];var reason=spellWin.currentReason;var newSentence=this.tokens.startsSentence(spellWin.currentDoc,spellWin.currentToken);var suggestionsPending=(reason!=="R"&&reason!=="G"&&!livespell.cache.suggestions[spellWin.provider().Language][$$typo]);if(suggestionsPending){this.ui.disableAll();if(!this.suggestionsInMotion){this.suggestionsInMotion=true
spellWin.nextSuggestionChunk();}
return setTimeout("spellWin.moveNext()",1000)}
var isGreen=reason=="G"||reason=="R";if(!isGreen){var oCase=livespell.str.getCase($$typo);if(oCase===2){for(var j=0;j<suggestions.length;j++){suggestions[j]=suggestions[j].toUpperCase();}}
if(oCase===1){for(var j=0;j<suggestions.length;j++){suggestions[j]=livespell.str.toCaps(suggestions[j]);}}}
if(!suggestions||!suggestions.length||suggestions[0]===""){suggestions=[];}
var dsuggs=[];for(j=0;j<suggestions.length;j++){dsuggs=livespell.array.safepush(dsuggs,suggestions[j])}
suggestions=dsuggs;E$("TextShow").innerHTML=this.tokens.appetureXHTML(spellWin.currentDoc,spellWin.currentToken,isGreen);var oS=E$("fldSuggestions");oS.options.length=0
if(reason=="G"){if(!suggestions||!suggestions.length||suggestions[0]===""){suggestions=[];suggestions[0]=$$typo;}
for(var i=0;i<suggestions.length;i++){suggestions[i]=livespell.str.toCase(suggestions[i],0,true);}}
if(!suggestions||!suggestions.length||suggestions[0]===""||reason=="R"){oS.disabled=true;}else{oS.disabled=false;if(reason==="X"&&spellWin.provider().isUniPacked){suggestions=new Array("JavaScriptSpellCheck Trial","Please register online","javascriptspellcheck.com");}
for(var i=0;i<suggestions.length;i++){if(reason==="X"){oS.options[i]=(new Option(suggestions[i],"__*REG*__",i==0,i==0));}else{oS.options[i]=(new Option(suggestions[i],suggestions[i],i==0,i==0));}}}
this.ui.enable("btnIgnore,btnIgnoreAll,btnAddToDict,btnChange,btnChangeAll,btnAutoCorrect,btnShowOptions",true)
if(reason=="X"){this.ui.enable("btnIgnoreAll,btnAddToDict,btnChangeAll,btnAutoCorrect",false)}
this.ui.show("lMeaning",false);this.ui.enable("btnUndo",this.undo.bookmarks.length>0)
switch(reason){case"C":E$("fldTextInputLab").innerHTML=spellWin.lang.fetch("REASON_CASE");break;case"R":E$("fldTextInputLab").innerHTML=spellWin.lang.fetch("REASON_REPEATED");oS.options.length=0;oS.options[0]=(new Option(spellWin.lang.fetch("SUGGESTIONS_DELETE_REPEATED"),"__*DEL*__",false,true));this.ui.enable("btnIgnoreAll,btnAddToDict,btnChangeAll,btnAutoCorrect,fldSuggestions",false)
break;case"G":E$("fldTextInputLab").innerHTML=spellWin.lang.fetch("REASON_GRAMMAR");this.ui.enable("btnIgnoreAll,btnAddToDict,btnChangeAll,btnAutoCorrect",false)
break;default:if(reason==="B"){E$("fldTextInputLab").innerHTML=spellWin.lang.fetch("REASON_BANNED");if(spellWin.provider().Strict){this.ui.enable("btnIgnore,btnIgnoreAll,btnAddToDict",false)}}else if(reason==="E"){E$("fldTextInputLab").innerHTML=spellWin.lang.fetch("REASON_ENFORCED");this.ui.enable("btnIgnore,btnIgnoreAll,btnAddToDict",false)}else{E$("fldTextInputLab").innerHTML=spellWin.lang.fetch("REASON_SPELLING");}
if(!suggestions.length||suggestions[0]==""){oS.options[0]=(new Option(spellWin.lang.fetch("SUGGESTIONS_NONE"),$$typo,false,true));this.ui.enable("btnChange,btnChangeAll,btnAutoCorrect",false)}else{if(spellWin.provider().ShowMeanings&&!livespell.test.FireFox()){this.ui.show("lMeaning",true);}}
break;}},FindNextTypo:function(){for(var i=this.currentDoc;i<this.tokens.value.length;i++){for(var j=(i===this.currentDoc?this.currentToken:0);j<this.tokens.value[i].length;j++){if(this.tokens.isWord(i,j)){var word=this.tokens.value[i][j];var spelltest=livespell.test.spelling(word,spellWin.provider().Language);var unknown=spelltest!==true&&spelltest!==false;if(unknown){spellWin.regroup(false)
return null;}
if(!spelltest){var reason=livespell.cache.reason[spellWin.provider().Language][word]?livespell.cache.reason[spellWin.provider().Language][word]:"";if(spellWin.provider().IgnoreAllCaps&&livespell.test.ALLCAPS(word)&&reason!=="B"&&reason!=="E"){spelltest=true;}
if(spellWin.provider().IgnoreNumeric&&(livespell.test.num(word))&&reason!=="B"&&reason!=="E"){spelltest=true;}
if(!spellWin.provider().CaseSensitive&&reason=="C"){spelltest=true;}}
if(spellWin.provider().CheckGrammar&&!spellWin.tokens.startsSentence(i,j)&&j>1&&spellWin.tokens.value[i][j].toUpperCase()===spellWin.tokens.value[i][j-2].toUpperCase()){if(spellWin.tokens.value[i][j].toUpperCase()!=spellWin.tokens.value[i][j].toLowerCase()){spelltest=false;reason="R";}}
if(spellWin.provider().CaseSensitive&&spellWin.provider().CheckGrammar&&spellWin.tokens.startsSentence(i,j)&&livespell.test.lcFirst(word)){var strDoc=this.tokens.value[i].join(" ");if(strDoc.indexOf(".")>0||strDoc.indexOf("!")>0||strDoc.indexOf("?")>0||strDoc.length>50){spelltest=false;reason="G";}}
if(!spelltest){this.currentDoc=i;this.currentToken=j;this.currentReason=reason;var nextWord=this.tokens.value[i][j];return nextWord;}}}};spellWin.ui.finished()
return null;},sendInitialAJAXRequest:function(binisrepeat){if(binisrepeat){livespell.ajax.send("WINSETUP",livespell.cache.wordlist[spellWin.providerID].join(livespell.str.chr(1)),spellWin.provider().Language,"5",spellWin.providerID)}else{livespell.ajax.send("WINSETUP",livespell.cache.wordlist[spellWin.providerID].join(livespell.str.chr(1)),spellWin.provider().Language,"0",spellWin.providerID)}},tokenize:function(){for(var i=0;i<this.docs.length;i++){this.tokens.value[i]=livespell.str.tokenize(this.docs[i]);}},buildWordQue:function(){var memsize=0;var memmax=livespell.maxURI-128;livespell.cache.wordlist[spellWin.providerID]=[];for(var i=0;i<this.tokens.value.length&&memsize<memmax;i++){for(var j=0;j<this.tokens.value[i].length&&memsize<memmax;j++){var spelltest=true
spelltest=livespell.test.spelling(this.tokens.value[i][j],spellWin.provider().Language);var unknown=(spelltest!==true&&spelltest!==false);if(this.tokens.isWord(i,j)&&(!spelltest)&&unknown){memsize+=this.tokens.value[i][j].toString().length;livespell.cache.wordlist[spellWin.providerID]=livespell.array.safepush(livespell.cache.wordlist[spellWin.providerID],this.tokens.value[i][j].toString())}}}
this.suggestionsInMotion=(memsize<memmax);},handshake:function(){if(window.opener){livespell=window.opener.livespell}else if(window.parent!=window){livespell=window.parent.livespell;}
else{livespell=dialogArguments.livespell}
spellWin.providerID=(spellWin.querystring.get("instance"));spellWin.provider().spellWindowObject=spellWin;},setTheme:function(){var strTheme=spellWin.provider().CSSTheme;if(strTheme.length){E$("theme").setAttribute("href","themes/"+strTheme+"/dialog-window.css")}},hideButtons:function(){if(spellWin.provider().AddWordsToDictionary=="NONE"){E$("btnAddToDict").style.display="none";}
var arrHideButtons=(spellWin.provider().HiddenButtons.split(","))
for(var i=0;i<arrHideButtons.length;i++){strBtn=arrHideButtons[i];try{oBtn=E$(strBtn);if(oBtn&&oBtn.value){oBtn.style.display="none";};}catch(e){}}},pickup:function(){this.docs=spellWin.provider().docPickup();},querystring:{get:function(request){var query=window.location.search.substring(1);var vars=query.split("&");for(var i=0;i<vars.length;i++){var pair=vars[i].split("=");if(pair[0]==request){return pair[1];}}}},ui:{setGrammar:function(){spellWin.provider().CheckGrammar=E$("optSentence").checked;spellWin.moveNext();},setLoadingMessage:function(){E$("fldTextInputLab").innerHTML="";setTimeout(this.setLoadingMessageTimed,400);},setLoadingMessageTimed:function(){if(E$("fldTextInputLab").innerHTML!==""){return};E$("fldTextInputLab").innerHTML="<div id='ajaxLoader' ></div>";},finished:function(){this.show("optForm,SpellForm",false)
if(!spellWin.provider().ShowSummaryScreen){return spellWin.actions.done()}
spellWin.allDone=true;E$("tDoc").innerHTML=spellWin.lang.fetch("DONESCREEN_FIELDS")+" "+spellWin.tokens.value.length;E$("tEdi").innerHTML=spellWin.lang.fetch("DONESCREEN_EDITS")+" "+spellWin.editcount;E$("tWrd").innerHTML=spellWin.lang.fetch("DONESCREEN_WORDS")+" "+spellWin.tokens.countWords();this.show("doneForm",true)},setupLanguageMenu:function(){E$("fldLanguage").options.length=0;E$("fldLanguageMultiple").options.length=0;var ffound=false
for(l=0;l<livespell.cache.langs.length;l++){E$("fldLanguage")[l]=new Option(livespell.cache.langs[l],livespell.cache.langs[l],false,spellWin.provider().Language==livespell.cache.langs[l]);E$("fldLanguageMultiple")[l]=new Option(livespell.cache.langs[l],livespell.cache.langs[l],false,spellWin.provider().Language==livespell.cache.langs[l]);if(spellWin.provider().Language===livespell.cache.langs[l]){ffound=true;}}
E$("fldLanguage")[l]=new Option(spellWin.lang.fetch("LANGUAGE_MULTIPLE"),spellWin.lang.fetch("LANGUAGE_MULTIPLE"),false,false);if(ffound!==true){E$("fldLanguage").options.add(new Option(spellWin.provider().Language,spellWin.provider().Language,true,true),0);E$("fldLanguage").selectedIndex=0;}},lookupMeaning:function(){var word=spellWin.ui.getMenuValue("fldSuggestions");if(word=="__*REG*__"){word="registration"}
var url=spellWin.provider().MeaningProvider.replace("{word}",word)
if(window.opener&&livespell.test.IE()){window.opener.open(url);}else{window.open(url);}},disableAll:function(){this.showEdit(false);this.enable("btnIgnore,btnIgnoreAll,btnAddToDict,btnChange,btnChangeAll,btnAutoCorrect,btnUndo,btnShowOptions",false)},enable:function(elements,flag){if(!elements.join){var elements=elements.split(",")}
for(var i=0;i<elements.length;i++){try{E$(elements[i]).disabled=!flag;}catch(e){}}},show:function(elements,flag){if(!elements.join){var elements=elements.split(",")}
for(var i=0;i<elements.length;i++){E$(elements[i]).style.display=flag?"block":"none";}},editingNow:false,showEdit:function(flag){if(this.editingNow==flag){return null;}
E$("fldTextInput").value=flag?spellWin.tokens.appetureText(spellWin.currentDoc,spellWin.currentToken):"";this.editingNow=flag;this.show("TextShow",!flag);this.show("btnUndoManualEdit",flag);this.enable("btnIgnore,btnIgnoreAll,btnAddToDict,btnChangeAll,btnAutoCorrect,btnShowOptions,fldSuggestions",!flag)
if(flag){this.enable('btnChange',true)
E$('fldTextInput').focus();}else{spellWin.moveNext()}
return null;},getMenuValue:function(id){var o=E$(id)
if(!o.multiple){if(o.selectedIndex===null||o.selectedIndex<0){return""}
return o.options[o.selectedIndex].value;}else{var selVals=new Array();for(var i=0;i<o.length;i++){if(o.options[i].selected){selVals.push(o.options[i].value);}}
return selVals.join(",")}}}}
window.iclose=function(){if(spellWin.provider().WindowMode.toLowerCase()=="modalbox"){try{window.opener.Modalbox.hide()}catch(e){}
try{window.parent.Modalbox.hide()}catch(e){}}
if(spellWin.provider().WindowMode.toLowerCase()=="fancybox"){try{window.opener.$.fancybox.close()}catch(e){}
try{window.parent.$.fancybox.close()}catch(e){}}
window.close()}
E$=function(id){return document.getElementById(id);}
+318
View File
@@ -0,0 +1,318 @@
<?php
header('Content-type: text/html; charset=ISO-8859-1');
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
// Freeing up memory where available improoves performance on huge dictionary searches.
try{ini_set("memory_limit","255M");}catch(Exception $e){}
include "php/engine.php";
$script = false;
$SaveToCentralDictionary = false;
error_reporting(0);
if(!isset($_GET["command"])){die("no command");}
if(isset($_GET["lan"]) && strlen($_GET["lan"])>0){$lang = $_GET["lan"];}else{$lang = "English (International)" ;}
if(isset($_GET["note"]) && strlen($_GET["lan"])>0){$note = $_GET["note"];}else{$note = "" ;}
if(isset($_GET["script"])){$script = true ;}
if(isset($_GET["sender"])){$sender = $_GET["sender"] ;}
if(isset($_GET["settingsfile"]) && strstr($_GET["settingsfile"],"/")===false && strstr($_GET["settingsfile"],'\\') ===false && strstr($_GET["settingsfile"],".")===false ){
$settingsfile = $_GET["settingsfile"] ;
}else{$settingsfile = "default-settings";}
$RequestedLangs = explode(",",$lang);
include ("settings/$settingsfile.php");
if( strtoupper($_GET["command"])=="SAVEWORD" ){
/*SAVE CENTRAL DICTIONARY ON USER ADD*/
echo("SAVEWORD");
echo chr(5);
echo $sender ;
echo chr(5);
if($SaveToCentralDictionary){
$wordToSave = stripcslashes($_GET["args"]);
$filePath = $spellcheckObject->DictionaryPath.$spellcheckObject->SaveToCentralDictionary;
if (is_writable($filePath)) {
$handle = fopen($filePath, 'a');
fwrite($handle, "\n".$wordToSave);
fclose($handle);
echo "$wordToSave Saved to $filePath";
}else{
echo "$wordToSave Not Saved - $filePath Unwritable";
}}else{
echo "!! SaveToCentralDictionary Must be set true in core/index.php line 10 to allow for a centralized 'add to dictionary'";
}
/*SAVE CENTRAL DICTIONARY ON USER ADD*/
}
if( strtoupper($_GET["command"])=="WINSETUP" ){
$words = explode(chr(1),stripcslashes($_GET["args"]));
$suggestcountinit = 5;
$error_type_words = array();
$spell_check_words = array();
$suggest_words = array();
$suggestcount = 0;
for($i=0;$i<count($words);$i++){
$error_type_words[$i]="";
if($suggestcount <$suggestcountinit+1){
$suggest_words[$i]= "";
}
$spell_check_words[$i] = $spellcheckObject -> SpellCheckWord( $words[$i])?"T":"F";
if($spell_check_words[$i]=="F"){
$error_type_words[$i] = $spellcheckObject ->ErrorTypeWord( $words[$i]);
if($suggestcount <$suggestcountinit+1){
$suggestcount++;
$suggest_words[$i]= implode(chr(2),$spellcheckObject -> Suggestions( $words[$i] )) ;
}
}
}
echo "WINSETUP";
echo chr(5);
echo $sender ;
echo chr(5);
echo implode("",$spell_check_words);
echo chr(5);
echo implode(chr(1),$error_type_words);
echo chr(5);
echo implode(chr(1),$suggest_words);
echo chr(5);
echo implode(chr(2),$spellcheckObject ->ListDictionaries());
}
if( strtoupper($_GET["command"])=="WINSUGGEST" ){
$words = explode(chr(1),stripcslashes($_GET["args"]));
$suggest_words = array();
$suggestcount = 0;
for($i=0;$i<count($words);$i++){
$suggest_words[$i]= implode(chr(2),$spellcheckObject -> Suggestions( $words[$i] )) ;
}
echo "WINSUGGEST";
echo chr(5);
echo $sender ;
echo chr(5);
echo implode(chr(1),$suggest_words);
}
if( strtoupper($_GET["command"])=="CTXSPELL"){
$word = stripcslashes($_GET["args"]);
$words = explode(chr(1),stripcslashes($_GET["args"]));
$error_type_words = array();
$spell_check_words = array();
$suggest_words = array();
for($i=0;$i<count($words);$i++){
$error_type_words[$i]="";
$spell_check_words[$i] = $spellcheckObject -> SpellCheckWord( $words[$i])?"T":"F";
$error_type_words[$i] ="-" ;
if($spell_check_words[$i]=="F"){
$error_type_words[$i] = $spellcheckObject ->ErrorTypeWord( $words[$i]);
}
}
echo "CTXSPELL";
echo chr(5);
echo $sender ;
echo chr(5);
echo implode("",$spell_check_words);
echo chr(5);
echo implode("",$error_type_words);
}
elseif( strtoupper($_GET["command"])=="CTXSUGGEST"){
$word = stripcslashes($_GET["args"]);
echo "CTXSUGGEST";
echo chr(5);
echo $sender ;
echo chr(5);
echo implode(chr(2),$spellcheckObject -> Suggestions( $word )) ;
if($note=="ADDLANGS"){
echo chr(5);
echo implode(chr(2),$spellcheckObject -> ListDictionaries( $word )) ;
}
}
elseif( strtoupper($_GET["command"])=="RAWSPELL"){
$word = stripcslashes($_GET["args"]);
$ok = $spellcheckObject -> SpellCheckWord($word);
echo "RAWSPELL";
echo chr(5);
echo $sender ;
echo chr(5);
echo $word;
echo chr(5);
echo $ok?"T":"F";
echo chr(5);
if($ok){
echo $word;
echo chr(5);
echo "";
}else{
echo implode(chr(2),$spellcheckObject -> Suggestions( $word )) ;
echo chr(5);
echo $spellcheckObject -> ErrorTypeWord( $word[$i]);
}
}
if( strtoupper($_GET["command"])=="APISPELL" ||strtoupper($_GET["command"])=="APISPELLARRAY" ){
$words = explode(chr(1),stripcslashes($_GET["args"]));
$doSuggest = ($note!=="NOSUGGEST");
$error_type_words = array();
$spell_check_words = array();
$suggest_words = array();
for($i=0;$i<count($words);$i++){
$error_type_words[$i]="";
$suggest_words[$i]= array();
$spell_check_words[$i] = $spellcheckObject -> SpellCheckWord( $words[$i])?"T":"F";
if($spell_check_words[$i]=="F"){
$error_type_words[$i] = $spellcheckObject ->ErrorTypeWord( $words[$i]);
if($doSuggest){
$suggest_words[$i]= implode(chr(2),$spellcheckObject -> Suggestions( $words[$i] )) ;
}else{
$suggest_words[$i]="";
}
}
}
echo strtoupper($_GET["command"]);
echo chr(5);
echo $sender ;
echo chr(5);
echo implode("",$spell_check_words);
echo chr(5);
echo implode(chr(1),$error_type_words);
echo chr(5);
echo implode(chr(1),$suggest_words);
echo chr(5);
echo implode(chr(1),$words);
}
if( strtoupper($_GET["command"])=="LISTDICTS" ){
$in = stripcslashes($_GET["args"]);
echo "LISTDICTS";
echo chr(5);
echo $sender ;
echo chr(5);
echo implode(chr(2),$spellcheckObject ->ListDictionaries());
}
if( strtoupper($_GET["command"])=="APIDYM" ){
$in = stripcslashes($_GET["args"]);
echo strtoupper("APIDYM");
echo chr(5);
echo $sender ;
echo chr(5);
echo $in;
echo chr(5);
echo $spellcheckObject ->didYouMean($in);
echo chr(5);
echo $lang;
}
if( strtoupper($_GET["command"])=="APIVALIDATE"){
$words = explode(chr(1),stripcslashes($_GET["args"]));
$spellcheckObject -> CaseSensitive = ($note=="CASESENSITVE");
$error_type_words = array();
$spell_check_words = array();
$valid = true;
for($i=0;$i<count($words);$i++){
$error_type_words[$i]="";
$suggest_words[$i]= array();
$spell_check_words[$i] = $spellcheckObject -> SpellCheckWord( $words[$i])?"T":"F";
if($spell_check_words[$i]=="F"){
$valid = false;
$error_type_words[$i] = $spellcheckObject ->ErrorTypeWord( $words[$i]);
}
}
echo "APIVALIDATE";
echo chr(5);
echo $sender ;
echo chr(5);
echo implode("",$spell_check_words);
echo chr(5);
echo implode(chr(1),$error_type_words);
echo chr(5);
echo implode(chr(1),$words);
echo chr(5);
echo $valid?"T":"F";
}
if($script){echo '<script type="text/javascript">window.parent.livespell.ajax.pickupIframe(document.body.innerHTML);history.go(-1);</script>';};
?>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,4 @@
<%
SaveToCentralDictionary = false
LicenseKey = "LIVESPELL-CQ3FV8D62XMN2NM-JV4L5-CJEXH-PLTRACKER1927-D4V6V"
%>
@@ -0,0 +1,48 @@
<?php
# Create a PHPSpellCheck Instance for the SpellCheckButton Class, SpellAsYouType Class and the Javascript/AJAX API
$spellcheckObject = new PHPSpellCheck();
############# LICENSE ############
# Copy and Paste your license key here. Buy one onlline at www.phpspellcheck.com
$spellcheckObject -> LicenceKey="LIVESPELL-CQ3FV8D62XMN2NM-JV4L5-CJEXH-PLTRACKER1927-D4V6V";
######### BASIC SETTINGS ##########
$spellcheckObject -> IgnoreAllCaps = false;
$spellcheckObject -> IgnoreNumeric = false;
$spellcheckObject -> CaseSensitive = true;
# Set the tollerance of the spellchecker to 'unlikely' suggestions. 0=intollerant ... 10=very tollerant
$spellcheckObject -> SuggestionTollerance = 1.5;
############ FILE SYSTEM ###########
# Set up the file path to the (.dic) dictionaries folder
$spellcheckObject -> DictionaryPath = ("../dictionaries/");
# Loads all dictionaries requested by the API */
foreach($RequestedLangs as $dictionary){ $spellcheckObject -> LoadDictionary(trim($dictionary) );}
############ DICTIONARY SYSTEM ###########
#Add vocabulary to the spellchecker from a text file loaded from the DictionaryPath
$spellcheckObject -> LoadCustomDictionary("custom.txt");
/* Alternative methods to load vocabulary
$spellcheckObject -> LoadCustomDictionaryFromURL( $URL );
$spellcheckObject ->AddCustomDictionaryFromArray($array) // This is great for SQL integration
*/
/* Ban a list of words which will never be allowed as correct spellings. This is great for filtering profanity.*/
$spellcheckObject -> LoadCustomBannedWords("language-rules/banned-words.txt");
/*
You can also add banned words from an array which you could easily populate from an SQL query
//$spellcheckObject -> AddBannedWords(array("veryRudeWord"));
*/
/* Load a lost of Enforced Corrections from a file. This allows you to enforce a spelling suggestion for a specific word or acronym.*/
$spellcheckObject -> LoadEnforcedCorrections("language-rules/enforced-corrections.txt");
/*Load a list of common typing mistakes to fine tune the suggestion performance.*/
$spellcheckObject -> LoadCommonTypos("language-rules/common-mistakes.txt");
?>
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

@@ -0,0 +1,43 @@
body{
font-family:Arial, Helvetica, sans-serif;
font-size:13px;
background-color: #F9F8F7;
margin:30px;
}
.tick, .warn, .warning, .error, .validation, .info , .reup, .reupclean {
border: 1px solid;
margin: 10px 0px;
padding:15px 10px 15px 50px;
background-repeat: no-repeat;
background-position: 10px center;
}
.tick {
color: #00529B;
background-color: #BDE5F8;
background-image: url('tick.png');
}
.warn {
color: #4F8A10;
background-color: #DFF2BF;
background-image:url('warn.png');
}
.error {
color: #9F6000;
background-color: #FEEFB3;
background-image: url('error.png');
}
.info {
color: #333;
background-color: #BAFFBA;
background-image: url('info.png');
}
.reup {
color: #D8000C;
background-color: #FFBABA;
background-image: url('reup.png');
}
.reupclean {
color: #666;
background-color: #BDE5F8;
background-image: url('reup.png');
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

@@ -0,0 +1,12 @@
<%option explicit%><%
Server.ScriptTimeout=20
Response.Expires = 0
Response.Expiresabsolute = Now() - 1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"
Response.Write("No Command")
%>
@@ -0,0 +1 @@
<%@ Page Language="C#" AutoEventWireup="true" %>No Command
@@ -0,0 +1 @@
No Command
@@ -0,0 +1,3 @@
<?php
echo "No Command"
?>
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB