Fix up for current browser...
0
WebThinkTC.html
Normal file → Executable file
0
addJavaScriptHash.sh
Normal file → Executable file
0
config.php.example
Normal file → Executable file
0
consyntools.jar
Normal file → Executable file
0
dataTools.js
Normal file → Executable file
0
deploy/deploy.sh
Normal file → Executable file
0
dragNDrop.js
Normal file → Executable file
0
drawLine.js
Normal file → Executable file
0
fileSelectorControl.js
Normal file → Executable file
0
iconControl.js
Normal file → Executable file
0
icons/arrowDown.png
Normal file → Executable file
|
Before Width: | Height: | Size: 866 B After Width: | Height: | Size: 866 B |
0
icons/arrowDownExclam.png
Normal file → Executable file
|
Before Width: | Height: | Size: 956 B After Width: | Height: | Size: 956 B |
0
icons/arrowLeft.png
Normal file → Executable file
|
Before Width: | Height: | Size: 874 B After Width: | Height: | Size: 874 B |
0
icons/arrowRight.png
Normal file → Executable file
|
Before Width: | Height: | Size: 998 B After Width: | Height: | Size: 998 B |
0
icons/arrowUp.png
Normal file → Executable file
|
Before Width: | Height: | Size: 588 B After Width: | Height: | Size: 588 B |
0
icons/arrowUpExclam.png
Normal file → Executable file
|
Before Width: | Height: | Size: 716 B After Width: | Height: | Size: 716 B |
0
icons/bulb.png
Normal file → Executable file
|
Before Width: | Height: | Size: 536 B After Width: | Height: | Size: 536 B |
0
icons/clock.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
0
icons/cross.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
0
icons/exclamationMark.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
0
icons/heart.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
0
icons/phone.png
Normal file → Executable file
|
Before Width: | Height: | Size: 750 B After Width: | Height: | Size: 750 B |
0
icons/questionSign.png
Normal file → Executable file
|
Before Width: | Height: | Size: 885 B After Width: | Height: | Size: 885 B |
0
icons/rose.png
Normal file → Executable file
|
Before Width: | Height: | Size: 353 B After Width: | Height: | Size: 353 B |
0
icons/smileyBad.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
0
icons/smileyGood.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
0
icons/smileyOh.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
0
icons/smileysBase.xcf
Normal file → Executable file
0
icons/thumbDown.png
Normal file → Executable file
|
Before Width: | Height: | Size: 323 B After Width: | Height: | Size: 323 B |
0
icons/thumbUp.png
Normal file → Executable file
|
Before Width: | Height: | Size: 333 B After Width: | Height: | Size: 333 B |
0
icons/tick.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
0
impressum.html
Normal file → Executable file
8
login.php
Normal file → Executable file
@@ -3,10 +3,10 @@
|
||||
<META HTTP-EQUIV="expires" CONTENT="0">
|
||||
<title>WebThink Login</title>
|
||||
|
||||
<script src="observerHandling.js"></script>
|
||||
<script src="webRequest.js"></script>
|
||||
<script src="dataTools.js"></script>
|
||||
<script src="login.js"></script>
|
||||
<script src="observerHandling.js?md5=198dbb5bccb51f0eabeea01ac34f9b7b"></script>
|
||||
<script src="webRequest.js?md5=cfd708317cd7292557c3fb7980521185"></script>
|
||||
<script src="dataTools.js?md5=bf5cea95ab29d2effaa5e1c04a498037"></script>
|
||||
<script src="login.js?md5=fa53abbc6b6ed70982ace27ddddca7f1"></script>
|
||||
|
||||
<LINK REL=stylesheet HREF="miscMain.css" TYPE="text/css">
|
||||
<LINK REL=stylesheet HREF="login.css" TYPE="text/css">
|
||||
|
||||
30
mainPage.php
Normal file → Executable file
@@ -25,21 +25,21 @@ if (!isset($_SESSION['UserPKey'])) {
|
||||
<div id='rightBottom' style='position:absolute;left:100;top:100'>.</div> <!-- regulates the page size. -->
|
||||
</body>
|
||||
|
||||
<script src="uiTools.js"></script>
|
||||
<script src="observerHandling.js"></script>
|
||||
<script src="dataTools.js"></script>
|
||||
<script src="dragNDrop.js"></script>
|
||||
<script src="workspaceResize.js"></script>
|
||||
<script src="drawLine.js"></script>
|
||||
<script src="webRequest.js"></script>
|
||||
<script src="toolbar.js"></script>
|
||||
<script src="fileSelectorControl.js"></script>
|
||||
<script src="menuBarControl.js"></script>
|
||||
<script src="menuControl.js"></script>
|
||||
<script src="textControl.js"></script>
|
||||
<script src="iconControl.js"></script>
|
||||
<script src="node.js"></script>
|
||||
<script src="nodeRel.js"></script>
|
||||
<script src="uiTools.js?md5=17da623ad4298d370a092102822797b5"></script>
|
||||
<script src="observerHandling.js?md5=198dbb5bccb51f0eabeea01ac34f9b7b"></script>
|
||||
<script src="dataTools.js?md5=bf5cea95ab29d2effaa5e1c04a498037"></script>
|
||||
<script src="dragNDrop.js?md5=f84567f9b38e6a487cd4118ed12f2365"></script>
|
||||
<script src="workspaceResize.js?md5=3f29d56b91df076bb591b717bece1dd1"></script>
|
||||
<script src="drawLine.js?md5=f82876801074b7e9bae05b3405f1d43e"></script>
|
||||
<script src="webRequest.js?md5=cfd708317cd7292557c3fb7980521185"></script>
|
||||
<script src="toolbar.js?md5=2168d17ced9aa6f960f66a0ead3ce4b0"></script>
|
||||
<script src="fileSelectorControl.js?md5=06c8bf806f97c7ef0a5c5a4266c75cbf"></script>
|
||||
<script src="menuBarControl.js?md5=664a74644008a1f5e24eb65d3f4e66fa"></script>
|
||||
<script src="menuControl.js?md5=b72d7534af4cc4d88ee74fcb18cbcd7b"></script>
|
||||
<script src="textControl.js?md5=a2c2137b103320c1ae019282f66e69e9"></script>
|
||||
<script src="iconControl.js?md5=7381cb018841a25a31c6923e5067472a"></script>
|
||||
<script src="node.js?md5=8353922f7f76c62ed169edcc3973ca47"></script>
|
||||
<script src="nodeRel.js?md5=d5b9971b471364f531f164025eba21f4"></script>
|
||||
|
||||
<script language='JavaScript'>
|
||||
// set debug mode
|
||||
|
||||
0
menuBar.css
Normal file → Executable file
0
menuBarControl.js
Normal file → Executable file
0
menuControl.js
Normal file → Executable file
0
miscMain.css
Normal file → Executable file
4
node.js
Normal file → Executable file
@@ -315,7 +315,7 @@ function node(PKey,nodeText) {
|
||||
}
|
||||
|
||||
function fromXML(inXML){
|
||||
if (inXML.nodeName=="NODE") {
|
||||
if (inXML.nodeName.toUpperCase()=="NODE") {
|
||||
m_PKey=inXML.getAttribute("pkey");
|
||||
m_displayDom.style.left=inXML.getAttribute("offsetleft")+"px";
|
||||
m_displayDom.style.top=inXML.getAttribute("offsettop")+"px";
|
||||
@@ -323,7 +323,7 @@ function node(PKey,nodeText) {
|
||||
var freeRelations = new Array();
|
||||
for (var i=0;i<inXML.childNodes.length;i++){
|
||||
var theChildNode=inXML.childNodes[i];
|
||||
switch(theChildNode.nodeName){
|
||||
switch(theChildNode.nodeName.toUpperCase()){
|
||||
case "ICONS":
|
||||
m_iconControl=new iconControl().fromXML(theChildNode);
|
||||
break;
|
||||
|
||||
0
nodeRel.css
Normal file → Executable file
0
nodeRel.js
Normal file → Executable file
0
obfuscate.sh
Normal file → Executable file
0
observerHandling.js
Normal file → Executable file
0
pix/WebthinkLogo.png
Normal file → Executable file
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
0
pix/WebthinkLogoMedium.png
Normal file → Executable file
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
0
pix/ginamail.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
0
pix/icnArrowDown.png
Normal file → Executable file
|
Before Width: | Height: | Size: 866 B After Width: | Height: | Size: 866 B |
0
pix/icnArrowUp.png
Normal file → Executable file
|
Before Width: | Height: | Size: 588 B After Width: | Height: | Size: 588 B |
0
pix/icnBusyWait.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
0
pix/icnMoveBranch.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
0
pix/icnNewBranch.png
Normal file → Executable file
|
Before Width: | Height: | Size: 703 B After Width: | Height: | Size: 703 B |
0
pix/icnStar.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
0
pix/icnWaste.png
Normal file → Executable file
|
Before Width: | Height: | Size: 885 B After Width: | Height: | Size: 885 B |
0
profile.html
Normal file → Executable file
12
requestTarget.php
Normal file → Executable file
@@ -1,4 +1,4 @@
|
||||
<?
|
||||
<?php
|
||||
error_reporting(0);
|
||||
#error_reporting('E_ALL');
|
||||
|
||||
@@ -11,6 +11,7 @@ $db=$GLOBALS['conf_dbname'];
|
||||
$basePath=$GLOBALS['conf_basePath'];
|
||||
$mapPath=$GLOBALS['conf_mapPath'];
|
||||
|
||||
|
||||
function myMail($to,$subject,$message){
|
||||
$fromAddr=$GLOBALS['conf_mailAddress'];
|
||||
$headers = 'From: <' . $fromAddr . ">\r\n" .
|
||||
@@ -34,7 +35,7 @@ function writeToFile($filename,$text){
|
||||
$cmd="mkdir -p \"$(dirname \"" . $filename . "\")\"";
|
||||
system($cmd);
|
||||
|
||||
$fp=fopen($filename,'w') or die("Can't open file");
|
||||
$fp=fopen($filename,'w') or die ("Can't open file _" . $filename . "_" );
|
||||
fwrite($fp,$text);
|
||||
fclose($fp);
|
||||
}
|
||||
@@ -111,7 +112,7 @@ function getUserInfo($dh){
|
||||
// returns the filename.
|
||||
// filePKey must be null for new records
|
||||
function getFileNameAndPKey($dh,$filePKey,$description){
|
||||
if ($filePKey=="") {
|
||||
if ($filePKey=="null") {
|
||||
$isNew=true;
|
||||
$filePKey=getNewPKey($dh);
|
||||
$fileName=$_SESSION["UserPKey"] . "/" . $filePKey; // TODO - should include the user
|
||||
@@ -273,8 +274,13 @@ function logInUser($dh,$mail,$password,$isSetupAutoLogin,$loginToken){
|
||||
$query="Select count(*) \"count\",max(user.pkey) \"userPKey\" from user, userOptin where userOptin.userPKey=user.PKey and userOptin.confirmed='1' and user.mail=" . $dh->quote($mail) . " and user.password=" . $dh->quote($password);
|
||||
}
|
||||
|
||||
|
||||
$result=$dh->query($query) ;
|
||||
try {
|
||||
$row=$result->fetch();
|
||||
} catch (Exception $ex) {
|
||||
echo "EX:" . $ex->getMessage();
|
||||
}
|
||||
if ($row['count']==1) {
|
||||
$success="true";
|
||||
$_SESSION['UserPKey']=$row['userPKey'];
|
||||
|
||||
0
sql/createDB.sql
Normal file → Executable file
0
sql/exportSchema.sh
Normal file → Executable file
0
sql/prepareIcon.sql
Normal file → Executable file
0
sql/preparePKey.sql
Normal file → Executable file
0
textControl.js
Normal file → Executable file
0
todoList.txt
Normal file → Executable file
0
toolbar.js
Normal file → Executable file
0
tutorial/exampleMap1.png
Normal file → Executable file
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
0
tutorial/freeRelation1.png
Normal file → Executable file
|
Before Width: | Height: | Size: 294 B After Width: | Height: | Size: 294 B |
0
tutorial/iconMenu1.png
Normal file → Executable file
|
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 9.9 KiB |
0
tutorial/iconMenu2.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
0
tutorial/icons1.png
Normal file → Executable file
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
0
tutorial/index.html
Normal file → Executable file
0
tutorial/node1.png
Normal file → Executable file
|
Before Width: | Height: | Size: 716 B After Width: | Height: | Size: 716 B |
0
tutorial/node2.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
0
tutorial/parentRelation1.png
Normal file → Executable file
|
Before Width: | Height: | Size: 299 B After Width: | Height: | Size: 299 B |
0
tutorial/relationMenu1.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
0
tutorial/toolBar1.png
Normal file → Executable file
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
0
uiTools.js
Normal file → Executable file
268
webRequest.js
Normal file → Executable file
@@ -1,243 +1,25 @@
|
||||
var g_filePKey=null;
|
||||
|
||||
function makeRequest(tgtPage,requesttext){
|
||||
// Mozilla
|
||||
if (window.XMLHttpRequest) {
|
||||
var oXML=new XMLHttpRequest();
|
||||
} else {
|
||||
// IE
|
||||
var oXML=new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
|
||||
oXML.open("POST",tgtPage,false);
|
||||
// alert("req" + requesttext);
|
||||
oXML.send(requesttext);
|
||||
|
||||
var theResponse = oXML.responseText;
|
||||
// alert("resp" + theResponse);
|
||||
|
||||
// Generic Webservice Error handling...
|
||||
var parser=new DOMParser();
|
||||
var doc=parser.parseFromString(theResponse,"text/xml");
|
||||
if ((doc.documentElement.getAttribute("success")!="true")
|
||||
&& (doc.documentElement.getAttribute("fileformat")==null)
|
||||
&& (doc.documentElement.getAttribute("errorclass")!="AppError")) {
|
||||
alert("Problem: (" + doc.documentElement.getAttribute("success") + ")\n" + theResponse);
|
||||
}
|
||||
return(theResponse);
|
||||
}
|
||||
|
||||
|
||||
function loadMap(filePKey) {
|
||||
setBusyWait();
|
||||
window.scrollTo(0,0);
|
||||
var xmlDoc=document.implementation.createDocument('','X',null);
|
||||
xmlDoc.documentElement.setAttribute("function","OPENFILE");
|
||||
xmlDoc.documentElement.setAttribute("filepkey",filePKey);
|
||||
var txtResp=makeRequest('requestTarget.php',xmlDoc);
|
||||
var parser=new DOMParser();
|
||||
var doc=parser.parseFromString(txtResp,"text/xml");
|
||||
g_filePKey=filePKey;
|
||||
dataTools.setPKey(doc.documentElement.getAttribute("nextpkey"));
|
||||
deleteAllRootNodes();
|
||||
for (var i=0;i<doc.documentElement.firstChild.childNodes.length;i++){
|
||||
rootNode[i]=new node().fromXML(doc.documentElement.firstChild.childNodes[i]);
|
||||
}
|
||||
|
||||
// Freelinks need to be loaded when it's guaranteed that all nodes are loaded.
|
||||
// otherwise they have nothing to link to...
|
||||
createFreeRelations(doc.documentElement);
|
||||
|
||||
unsetBusyWait();
|
||||
}
|
||||
|
||||
// Traverse the tree and draw freeRelations
|
||||
function createFreeRelations(docEle){
|
||||
var allChilds=docEle.childNodes;
|
||||
for (var i=0;i<allChilds.length;i++){
|
||||
var theChild=allChilds[i];
|
||||
if (theChild.childNodes.length>0){
|
||||
createFreeRelations(theChild);
|
||||
}
|
||||
if (theChild.nodeName=="NODEREL"){
|
||||
if (theChild.getAttribute("relationtype")!="main"){
|
||||
var newNodeRel=new nodeRel().fromXML(theChild);
|
||||
newNodeRel.redraw();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function saveMap(description) {
|
||||
setBusyWait();
|
||||
var xmlDoc=document.implementation.createDocument('','ALL',null);
|
||||
xmlDoc.documentElement.setAttribute("fileformat","1");
|
||||
xmlDoc.documentElement.setAttribute("nextpkey",dataTools.getNewPKey());
|
||||
xmlDoc.documentElement.setAttribute("function","SAVEFILE");
|
||||
xmlDoc.documentElement.setAttribute("filepkey",g_filePKey);
|
||||
xmlDoc.documentElement.setAttribute("description",description);
|
||||
var nodeSets=xmlDoc.createElement("NODESET");
|
||||
for (var i=0;i<rootNode.length;i++){
|
||||
nodeSets.appendChild(xmlDoc.importNode(rootNode[i].toXML(),true));
|
||||
}
|
||||
|
||||
xmlDoc.documentElement.appendChild(nodeSets);
|
||||
|
||||
var txtResp=makeRequest("requestTarget.php",xmlDoc);
|
||||
var parser=new DOMParser();
|
||||
var doc=parser.parseFromString(txtResp,"text/xml");
|
||||
g_filePKey=doc.documentElement.getAttribute("filepkey");
|
||||
unsetBusyWait();
|
||||
return(xmlDoc);
|
||||
}
|
||||
|
||||
function deleteMap(filePKey){
|
||||
var xmlDoc=document.implementation.createDocument('','X',null);
|
||||
xmlDoc.documentElement.setAttribute("function","DELETEFILE");
|
||||
xmlDoc.documentElement.setAttribute("filepkey",filePKey);
|
||||
var txtResp=makeRequest("requestTarget.php",xmlDoc);
|
||||
var parser=new DOMParser();
|
||||
var doc=parser.parseFromString(txtResp,"text/xml");
|
||||
return(xmlDoc);
|
||||
}
|
||||
|
||||
function getIconList() {
|
||||
var xmlDoc=document.implementation.createDocument('','X',null);
|
||||
xmlDoc.documentElement.setAttribute("function","GETICONLIST");
|
||||
var txtResp=makeRequest('requestTarget.php',xmlDoc);
|
||||
var parser=new DOMParser();
|
||||
var doc=parser.parseFromString(txtResp,"text/xml");
|
||||
return(document.importNode(doc.firstChild,true));
|
||||
}
|
||||
|
||||
function getFileList() {
|
||||
var xmlDoc=document.implementation.createDocument('','X',null);
|
||||
xmlDoc.documentElement.setAttribute("function","LISTFILES");
|
||||
var txtResp=makeRequest('requestTarget.php',xmlDoc);
|
||||
var parser=new DOMParser();
|
||||
var doc=parser.parseFromString(txtResp,"text/xml");
|
||||
return(document.importNode(doc.firstChild,true));
|
||||
}
|
||||
|
||||
function openFileSelector() {
|
||||
var fsControl=new fileSelectorControl(getFileList());
|
||||
document.getElementById("body").appendChild(fsControl);
|
||||
fsControl.style.position="absolute";
|
||||
fsControl.style.top="100px";
|
||||
dragNDrop.activateForObject(fsControl);
|
||||
}
|
||||
|
||||
function tokenLoginUser(){
|
||||
var mail=dataTools.getCookie("autoLoginMail");
|
||||
var loginToken=dataTools.getCookie("autoLoginToken");
|
||||
|
||||
var xmlDoc=document.implementation.createDocument('','X',null);
|
||||
xmlDoc.documentElement.setAttribute("function","TOKENLOGIN");
|
||||
xmlDoc.documentElement.setAttribute("mail",mail);
|
||||
xmlDoc.documentElement.setAttribute("token",loginToken);
|
||||
var txtResp=makeRequest('requestTarget.php',xmlDoc);
|
||||
var parser=new DOMParser();
|
||||
var doc=parser.parseFromString(txtResp,"text/xml");
|
||||
return(doc.documentElement.getAttribute("success")=="true");
|
||||
|
||||
}
|
||||
|
||||
function loginUser(mail,password,isAutoLogin) {
|
||||
var xmlDoc=document.implementation.createDocument('','X',null);
|
||||
xmlDoc.documentElement.setAttribute("function","LOGIN");
|
||||
xmlDoc.documentElement.setAttribute("mail",mail);
|
||||
xmlDoc.documentElement.setAttribute("password",password);
|
||||
xmlDoc.documentElement.setAttribute("isautologin",(isAutoLogin)?"1":"0");
|
||||
var txtResp=makeRequest('requestTarget.php',xmlDoc);
|
||||
var parser=new DOMParser();
|
||||
var doc=parser.parseFromString(txtResp,"text/xml");
|
||||
if (isAutoLogin) {
|
||||
var loginToken=doc.documentElement.getAttribute("autologintoken");
|
||||
dataTools.setCookie("autoLoginToken",loginToken,10000);
|
||||
dataTools.setCookie("autoLoginMail",mail,10000);
|
||||
}
|
||||
return(doc.documentElement.getAttribute("success")=="true");
|
||||
}
|
||||
function logOutUser(){
|
||||
var xmlDoc=document.implementation.createDocument('','X',null);
|
||||
xmlDoc.documentElement.setAttribute("function","LOGOUT");
|
||||
xmlDoc.documentElement.setAttribute("autologintoken",dataTools.getCookie("autoLoginToken"));
|
||||
dataTools.setCookie("autoLoginToken","",-1);
|
||||
dataTools.setCookie("autoLoginMail","",-1);
|
||||
var txtResp=makeRequest('requestTarget.php',xmlDoc);
|
||||
var parser=new DOMParser();
|
||||
var doc=parser.parseFromString(txtResp,"text/xml");
|
||||
window.location='login.php';
|
||||
return(doc.documentElement.getAttribute("success")=="true");
|
||||
}
|
||||
|
||||
function optinUser(mail,password) {
|
||||
var xmlDoc=document.implementation.createDocument('','X',null);
|
||||
xmlDoc.documentElement.setAttribute("function","OPTINUSER");
|
||||
xmlDoc.documentElement.setAttribute("mail",mail);
|
||||
xmlDoc.documentElement.setAttribute("password",password);
|
||||
var txtResp=makeRequest('requestTarget.php',xmlDoc);
|
||||
var parser=new DOMParser();
|
||||
var doc=parser.parseFromString(txtResp,"text/xml");
|
||||
return(doc.documentElement.getAttribute("success")=="true");
|
||||
}
|
||||
|
||||
function mailPassword(mail) {
|
||||
var xmlDoc=document.implementation.createDocument('','X',null);
|
||||
xmlDoc.documentElement.setAttribute("function","MAILPASSWORD");
|
||||
xmlDoc.documentElement.setAttribute("mail",mail);
|
||||
var txtResp=makeRequest('requestTarget.php',xmlDoc);
|
||||
var parser=new DOMParser();
|
||||
var doc=parser.parseFromString(txtResp,"text/xml");
|
||||
return(doc.documentElement.getAttribute("success")=="true");
|
||||
}
|
||||
|
||||
function confirmOptin(token) {
|
||||
var xmlDoc=document.implementation.createDocument('','X',null);
|
||||
xmlDoc.documentElement.setAttribute("function","CONFIRMOPTIN");
|
||||
xmlDoc.documentElement.setAttribute("token",token);
|
||||
var txtResp=makeRequest('requestTarget.php',xmlDoc);
|
||||
var parser=new DOMParser();
|
||||
var doc=parser.parseFromString(txtResp,"text/xml");
|
||||
return(doc.documentElement.getAttribute("success")=="true");
|
||||
}
|
||||
|
||||
function changePassword(mail,newPass,oldPass,token) {
|
||||
var xmlDoc=document.implementation.createDocument('','X',null);
|
||||
xmlDoc.documentElement.setAttribute("function","CHANGEPASSWORD");
|
||||
xmlDoc.documentElement.setAttribute("mail",mail);
|
||||
xmlDoc.documentElement.setAttribute("newpass",newPass);
|
||||
xmlDoc.documentElement.setAttribute("oldpass",oldPass);
|
||||
xmlDoc.documentElement.setAttribute("token",token);
|
||||
var txtResp=makeRequest('requestTarget.php',xmlDoc);
|
||||
var parser=new DOMParser();
|
||||
var doc=parser.parseFromString(txtResp,"text/xml");
|
||||
return(doc.documentElement.getAttribute("success")=="true");
|
||||
}
|
||||
|
||||
function updateUserProfile(name,mail,password) {
|
||||
var xmlDoc=document.implementation.createDocument('','X',null);
|
||||
xmlDoc.documentElement.setAttribute("function","UPDATEUSERPROFILE");
|
||||
xmlDoc.documentElement.setAttribute("mail",mail);
|
||||
xmlDoc.documentElement.setAttribute("password",password);
|
||||
xmlDoc.documentElement.setAttribute("name",name);
|
||||
var txtResp=makeRequest('requestTarget.php',xmlDoc);
|
||||
var parser=new DOMParser();
|
||||
var doc=parser.parseFromString(txtResp,"text/xml");
|
||||
return(doc.documentElement.getAttribute("success")=="true");
|
||||
}
|
||||
|
||||
function deleteAllRootNodes() {
|
||||
for (var i=rootNode.length-1;i>=0;i--){
|
||||
rootNode[i].erase();
|
||||
}
|
||||
}
|
||||
|
||||
function getUserInfo(attribute) {
|
||||
var xmlDoc=document.implementation.createDocument('','X',null);
|
||||
xmlDoc.documentElement.setAttribute("function","GETUSERINFO");
|
||||
var txtResp=makeRequest('requestTarget.php',xmlDoc);
|
||||
var parser=new DOMParser();
|
||||
var doc=parser.parseFromString(txtResp,"text/xml");
|
||||
return(doc.documentElement.getAttribute(attribute));
|
||||
}
|
||||
var g_filePKey=null;function makeRequest(aa,ba){if(window.XMLHttpRequest){var ca=new XMLHttpRequest();}
|
||||
else{var ca=new ActiveXObject("Microsoft.XMLHTTP");}
|
||||
ca.open("POST",aa,false);ca.send(ba);var da=ca.responseText;var ea=new DOMParser();var fa=ea.parseFromString(da,"text/xml");if((fa.documentElement.getAttribute("success")!="true")&&(fa.documentElement.getAttribute("fileformat")==null)&&(fa.documentElement.getAttribute("errorclass")!="AppError")){alert("Problem: ("+fa.documentElement.getAttribute("success")+")\n"+da);}
|
||||
return(da);}
|
||||
function loadMap(ga){setBusyWait();window.scrollTo(0,0);var ha=document.implementation.createDocument('','X',null);ha.documentElement.setAttribute("function","OPENFILE");ha.documentElement.setAttribute("filepkey",ga);var ia=makeRequest('requestTarget.php',ha);var ja=new DOMParser();var ka=ja.parseFromString(ia,"text/xml");g_filePKey=ga;dataTools.setPKey(ka.documentElement.getAttribute("nextpkey"));deleteAllRootNodes();for(var i=0;i<ka.documentElement.firstChild.childNodes.length;i++){rootNode[i]=new node().fromXML(ka.documentElement.firstChild.childNodes[i]);}
|
||||
createFreeRelations(ka.documentElement);unsetBusyWait();}
|
||||
function createFreeRelations(la){var ma=la.childNodes;for(var i=0;i<ma.length;i++){var na=ma[i];if(na.childNodes.length>0){createFreeRelations(na);}
|
||||
if(na.nodeName=="NODEREL"){if(na.getAttribute("relationtype")!="main"){var oa=new nodeRel().fromXML(na);oa.redraw();}}}}
|
||||
function saveMap(pa){setBusyWait();var qa=document.implementation.createDocument('','ALL',null);qa.documentElement.setAttribute("fileformat","1");qa.documentElement.setAttribute("nextpkey",dataTools.getNewPKey());qa.documentElement.setAttribute("function","SAVEFILE");qa.documentElement.setAttribute("filepkey",g_filePKey);qa.documentElement.setAttribute("description",pa);var ra=qa.createElement("NODESET");for(var i=0;i<rootNode.length;i++){ra.appendChild(qa.importNode(rootNode[i].toXML(),true));}
|
||||
qa.documentElement.appendChild(ra);var sa=makeRequest("requestTarget.php",qa);var ta=new DOMParser();var ua=ta.parseFromString(sa,"text/xml");g_filePKey=ua.documentElement.getAttribute("filepkey");unsetBusyWait();return(qa);}
|
||||
function deleteMap(va){var wa=document.implementation.createDocument('','X',null);wa.documentElement.setAttribute("function","DELETEFILE");wa.documentElement.setAttribute("filepkey",va);var xa=makeRequest("requestTarget.php",wa);var ya=new DOMParser();var za=ya.parseFromString(xa,"text/xml");return(wa);}
|
||||
function getIconList(){var Aa=document.implementation.createDocument('','X',null);Aa.documentElement.setAttribute("function","GETICONLIST");var Ba=makeRequest('requestTarget.php',Aa);var Ca=new DOMParser();var Da=Ca.parseFromString(Ba,"text/xml");return(document.importNode(Da.firstChild,true));}
|
||||
function getFileList(){var Ea=document.implementation.createDocument('','X',null);Ea.documentElement.setAttribute("function","LISTFILES");var Fa=makeRequest('requestTarget.php',Ea);var Ga=new DOMParser();var Ha=Ga.parseFromString(Fa,"text/xml");return(document.importNode(Ha.firstChild,true));}
|
||||
function openFileSelector(){var Ia=new fileSelectorControl(getFileList());document.getElementById("body").appendChild(Ia);Ia.style.position="absolute";Ia.style.top="100px";dragNDrop.activateForObject(Ia);}
|
||||
function tokenLoginUser(){var Ja=dataTools.getCookie("autoLoginMail");var Ka=dataTools.getCookie("autoLoginToken");var La=document.implementation.createDocument('','X',null);La.documentElement.setAttribute("function","TOKENLOGIN");La.documentElement.setAttribute("mail",Ja);La.documentElement.setAttribute("token",Ka);var Ma=makeRequest('requestTarget.php',La);var Na=new DOMParser();var Oa=Na.parseFromString(Ma,"text/xml");return(Oa.documentElement.getAttribute("success")=="true");}
|
||||
function loginUser(Pa,Qa,Ra){var Sa=document.implementation.createDocument('','X',null);Sa.documentElement.setAttribute("function","LOGIN");Sa.documentElement.setAttribute("mail",Pa);Sa.documentElement.setAttribute("password",Qa);Sa.documentElement.setAttribute("isautologin",(Ra)?"1":"0");var Ta=makeRequest('requestTarget.php',Sa);var Ua=new DOMParser();var Va=Ua.parseFromString(Ta,"text/xml");if(Ra){var Wa=Va.documentElement.getAttribute("autologintoken");dataTools.setCookie("autoLoginToken",Wa,10000);dataTools.setCookie("autoLoginMail",Pa,10000);}
|
||||
return(Va.documentElement.getAttribute("success")=="true");}
|
||||
function logOutUser(){var Xa=document.implementation.createDocument('','X',null);Xa.documentElement.setAttribute("function","LOGOUT");Xa.documentElement.setAttribute("autologintoken",dataTools.getCookie("autoLoginToken"));dataTools.setCookie("autoLoginToken","",-1);dataTools.setCookie("autoLoginMail","",-1);var Ya=makeRequest('requestTarget.php',Xa);var Za=new DOMParser();var $a=Za.parseFromString(Ya,"text/xml");window.location='login.php';return($a.documentElement.getAttribute("success")=="true");}
|
||||
function optinUser(ab,bb){var cb=document.implementation.createDocument('','X',null);cb.documentElement.setAttribute("function","OPTINUSER");cb.documentElement.setAttribute("mail",ab);cb.documentElement.setAttribute("password",bb);var db=makeRequest('requestTarget.php',cb);var eb=new DOMParser();var fb=eb.parseFromString(db,"text/xml");return(fb.documentElement.getAttribute("success")=="true");}
|
||||
function mailPassword(gb){var hb=document.implementation.createDocument('','X',null);hb.documentElement.setAttribute("function","MAILPASSWORD");hb.documentElement.setAttribute("mail",gb);var ib=makeRequest('requestTarget.php',hb);var jb=new DOMParser();var kb=jb.parseFromString(ib,"text/xml");return(kb.documentElement.getAttribute("success")=="true");}
|
||||
function confirmOptin(lb){var mb=document.implementation.createDocument('','X',null);mb.documentElement.setAttribute("function","CONFIRMOPTIN");mb.documentElement.setAttribute("token",lb);var nb=makeRequest('requestTarget.php',mb);var ob=new DOMParser();var pb=ob.parseFromString(nb,"text/xml");return(pb.documentElement.getAttribute("success")=="true");}
|
||||
function changePassword(qb,rb,sb,tb){var ub=document.implementation.createDocument('','X',null);ub.documentElement.setAttribute("function","CHANGEPASSWORD");ub.documentElement.setAttribute("mail",qb);ub.documentElement.setAttribute("newpass",rb);ub.documentElement.setAttribute("oldpass",sb);ub.documentElement.setAttribute("token",tb);var vb=makeRequest('requestTarget.php',ub);var wb=new DOMParser();var xb=wb.parseFromString(vb,"text/xml");return(xb.documentElement.getAttribute("success")=="true");}
|
||||
function updateUserProfile(yb,zb,Ab){var Bb=document.implementation.createDocument('','X',null);Bb.documentElement.setAttribute("function","UPDATEUSERPROFILE");Bb.documentElement.setAttribute("mail",zb);Bb.documentElement.setAttribute("password",Ab);Bb.documentElement.setAttribute("name",yb);var Cb=makeRequest('requestTarget.php',Bb);var Db=new DOMParser();var Eb=Db.parseFromString(Cb,"text/xml");return(Eb.documentElement.getAttribute("success")=="true");}
|
||||
function deleteAllRootNodes(){try {for(var i=rootNode.length-1;i>=0;i--){rootNode[i].erase();}} catch (ex) { console.log("ERROR in erase...",ex) }}
|
||||
function getUserInfo(Fb){var Gb=document.implementation.createDocument('','X',null);Gb.documentElement.setAttribute("function","GETUSERINFO");var Hb=makeRequest('requestTarget.php',Gb);var Ib=new DOMParser();var Jb=Ib.parseFromString(Hb,"text/xml");return(Jb.documentElement.getAttribute(Fb));}
|
||||
|
||||