datasets.lzx
<library>
<dataset name="loginDS" src="http://vapi0.weepee.org/api/userdata/login.php" request="false" onerror="canvas.handleError()" querytype="POST"/>
<datapointer id="myDpLogin" xpath="loginDS:/dbdata">
<handler name="ondata">
var ds=canvas.datasets.loginDS;
Debug.write("Loaded Login XML data");
var dp = ds.getPointer();
dp.setXPath("loginDS:/dbdata/data/error/text()");
var autherror = dp.getNodeText();
dp.setXPath("loginDS:/dbdata/data/webpasswd/text()");
var userPassword = dp.getNodeText();
dp.setXPath("loginDS:/dbdata/data/accountid/text()");
var userName = dp.getNodeText();
dp.setXPath("loginDS:/dbdata/data/sid/text()");
canvas.sid = dp.getNodeText();
dp.setXPath("loginDS:/dbdata/data/update/text()");
var update = dp.getNodeText();
dp.setXPath("loginDS:/dbdata/data/protocol/text()");
var protocol = dp.getNodeText();
dp.setXPath("loginDS:/dbdata/data/trunk/text()");
var trunk = dp.getNodeText();
if (!userPassword) {
failedlogin.completeInstantiation();
failedlogin.setAttribute('visible',true);
loginerror.setAttribute('text',autherror);
canvas.logindialog.open();
} else {
if (update == "null") {
failedlogin.setAttribute('visible',false);
weepeeinit.setAttribute('visible',false);
username.setAttribute("text",userName);
canvas.logindialog.close();
loading.completeInstantiation();
loading.setAttribute('visible',true);
if ( (trunk == "t") && (protocol == "SIP")) {
Debug.write("trunk");
canvas.protocol = "siptrunk";
sippbxuserdefault.completeInstantiation();
}
if ( (trunk == "t") && (protocol == "IAX")) {
Debug.write("trunk");
canvas.protocol = "iaxtrunk";
iaxpbxuserdefault.completeInstantiation();
}
if ((trunk == "f") && (protocol == "IAX")) {
Debug.write("notrunk");
canvas.protocol = "iax";
iaxuserdefault.completeInstantiation();
}
if ((trunk == "f") && (protocol == "SIP")) {
Debug.write("notrunk");
canvas.protocol = "sip";
sipuserdefault.completeInstantiation();
}
if (protocol == "CNF") {
Debug.write("conference");
canvas.protocol = "cnf";
conferencedefault.completeInstantiation();
}
if (protocol == "FAX") {
Debug.write("fax");
canvas.protocol = "fax";
faxdefault.completeInstantiation();
}
if (protocol == "T38") {
Debug.write("t38");
canvas.protocol = "t38";
t38default.completeInstantiation();
}
if (protocol == "FWD") {
Debug.write("fwd");
canvas.protocol = "fwd";
fwddefault.completeInstantiation();
}
if (protocol == "IVR") {
Debug.write("ivr");
canvas.protocol = "ivr";
ivrdefault.completeInstantiation();
}
if (protocol == "CVR") {
Debug.write("cvr");
canvas.protocol = "cvr";
ivrdefault.completeInstantiation();
}
if (protocol == "SMS") {
Debug.write("sms");
canvas.protocol = "sms";
smsdefault.completeInstantiation();
}
if (protocol == "SIM") {
Debug.write("sim");
canvas.protocol = "sim";
simdefault.completeInstantiation();
}
canvas.getUserData();
}
}
</handler>
</datapointer>
<dataset name="telefoonzones">
<item><value>0</value><description>Selecteer zone ...</description></item>
<item><value>1136</value><description>België 011</description></item>
<item><value>1269</value><description>België 012</description></item>
<item><value>1369</value><description>België 013</description></item>
<item><value>1449</value><description>België 014</description></item>
<item><value>1569</value><description>België 015</description></item>
<item><value>1636</value><description>België 016</description></item>
<item><value>2669</value><description>België 02</description></item>
<item><value>3369</value><description>België 03</description></item>
<item><value>5096</value><description>België 050</description></item>
<item><value>5149</value><description>België 051</description></item>
<item><value>5269</value><description>België 052</description></item>
<item><value>5359</value><description>België 053</description></item>
<item><value>5469</value><description>België 054</description></item>
<item><value>5569</value><description>België 055</description></item>
<item><value>5696</value><description>België 056</description></item>
<item><value>5769</value><description>België 057</description></item>
<item><value>5869</value><description>België 058</description></item>
<item><value>5936</value><description>België 059</description></item>
<item><value>8136</value><description>België 081</description></item>
<item><value>8969</value><description>België 089</description></item>
<item><value>9395</value><description>België 09</description></item>
</dataset>
<dataset name="changepwdDS" src="http://vapi0.weepee.org/api/userdata/changepwd.php" request="false" onerror="canvas.handleError()" querytype="POST"/>
<datapointer xpath="changepwdDS:/dbdata">
<handler name="ondata">
var ds=canvas.datasets.changepwdDS;
var dp = ds.getPointer();
dp.setXPath("changepwdDS:/dbdata/data/changepwddata/text()");
var newchangepwddata = dp.getNodeText();
dp.setXPath("changepwdDS:/dbdata/data/windowstate/text()");
var windowstate = dp.getNodeText();
changepwddata.setAttribute("text",newchangepwddata);
if (windowstate == "close") {
canvas.userUpdate(password.getText());
changepwddialog.close();
}
</handler>
</datapointer>
<dataset name="changeemailDS" src="http://vapi0.weepee.org/api/userdata/changeemail.php" request="false" onerror="canvas.handleError()" querytype="POST"/>
<datapointer xpath="changeemailDS:/dbdata">
<handler name="ondata">
var ds=canvas.datasets.changeemailDS;
var dp = ds.getPointer();
dp.setXPath("changeemailDS:/dbdata/data/changeemaildata/text()");
var newchangeemaildata = dp.getNodeText();
dp.setXPath("changeemailDS:/dbdata/data/windowstate/text()");
var windowstate = dp.getNodeText();
changeemaildata.setAttribute("text",newchangeemaildata);
if (windowstate == "close") {
canvas.userUpdate(password.getText());
changeemaildialog.close();
}
</handler>
</datapointer>
<dataset name="changepinDS" src="http://vapi0.weepee.org/api/userdata/changepin.php" request="false" onerror="canvas.handleError()" querytype="POST"/>
<datapointer xpath="changepinDS:/dbdata">
<handler name="ondata">
var ds=canvas.datasets.changepinDS;
var dp = ds.getPointer();
dp.setXPath("changepinDS:/dbdata/data/changepindata/text()");
var newchangepindata = dp.getNodeText();
dp.setXPath("changepinDS:/dbdata/data/windowstate/text()");
var windowstate = dp.getNodeText();
changepindata.setAttribute("text",newchangepindata);
if (windowstate == "close") {
canvas.userUpdate(password.getText());
changepindialog.close();
}
</handler>
</datapointer>
<dataset name="changetwitterDS" src="http://vapi0.weepee.org/api/userdata/changetwitter.php" request="false" onerror="canvas.handleError()" querytype="POST"/>
<datapointer xpath="changetwitterDS:/dbdata">
<handler name="ondata">
var ds=canvas.datasets.changetwitterDS;
var dp = ds.getPointer();
dp.setXPath("changetwitterDS:/dbdata/data/changetwitterdata/text()");
var newchangetwitterdata = dp.getNodeText();
canvas.userUpdate(password.getText());
</handler>
</datapointer>
<dataset name="changeskypeDS" src="http://vapi0.weepee.org/api/userdata/changeskype.php" request="false" onerror="canvas.handleError()" querytype="POST"/>
<datapointer xpath="changeskypeDS:/dbdata">
<handler name="ondata">
var ds=canvas.datasets.changeskypeDS;
var dp = ds.getPointer();
dp.setXPath("changeskypeDS:/dbdata/data/changeskypedata/text()");
var newchangeskypedata = dp.getNodeText();
canvas.userUpdate(password.getText());
</handler>
</datapointer>
<dataset name="changedisplaynameDS" src="http://vapi0.weepee.org/api/userdata/changedisplayname.php" request="false" onerror="canvas.handleError()" querytype="POST"/>
<datapointer xpath="changedisplaynameDS:/dbdata">
<handler name="ondata">
var ds=canvas.datasets.changedisplaynameDS;
var dp = ds.getPointer();
dp.setXPath("changedisplaynameDS:/dbdata/data/changedisplaynamedata/text()");
var newchangedisplaynamedata = dp.getNodeText();
canvas.userUpdate(password.getText());
</handler>
</datapointer>
<dataset name="changeforwardDS" src="http://vapi0.weepee.org/api/userdata/changeforward.php" request="false" onerror="canvas.handleError()" querytype="POST"/>
<datapointer xpath="changeforwardDS:/dbdata">
<handler name="ondata">
var ds=canvas.datasets.changeforwardDS;
var dp = ds.getPointer();
dp.setXPath("changeforwardDS:/dbdata/data/changeforwarddata/text()");
var newchangeforwarddata = dp.getNodeText();
canvas.userUpdate(password.getText());
</handler>
</datapointer>
<dataset name="usedvouchersDS" src="http://vapi0.weepee.org/api/userdata/usedvouchers.php" request="false" onerror="canvas.handleerror()" querytype="POST"/>
<datapointer xpath="usedvouchersDS:/dbdata">
<handler name="ondata">
loadinginfo.addText("###");
Debug.write("data vouchers");
canvas.activatevoucher.close();
</handler>
</datapointer>
<dataset name="quickdialDS" src="http://vapi0.weepee.org/api/userdata/quickdial.php" request="false" onerror="canvas.handleerror()" querytype="POST"/>
<datapointer xpath="quickdialDS:/dbdata">
<handler name="ondata">
loadinginfo.addText("###");
Debug.write("data quickdial");
</handler>
</datapointer>
<dataset name="numbersDS" src="http://vapi0.weepee.org/api/userdata/numbers.php" request="false" onerror="canvas.handleError()" querytype="POST"/>
<datapointer xpath="numbersDS:/dbdata">
<handler name="ondata">
loadinginfo.addText("###");
Debug.write("data numbers");
</handler>
</datapointer>
<dataset name="callsoutDS" src="http://vapi0.weepee.org/api/userdata/callsout.php" request="false" onerror="canvas.handleError()" querytype="POST"/>
<datapointer xpath="callsoutDS:/dbdata">
<handler name="ondata">
loadinginfo.addText("###");
Debug.write("data callsout");
canvas.searchingout.close();
</handler>
</datapointer>
<dataset name="callsinDS" src="http://vapi0.weepee.org/api/userdata/callsin.php" request="false" onerror="canvas.handleError()" querytype="POST"/>
<datapointer xpath="callsinDS:/dbdata">
<handler name="ondata">
loadinginfo.addText("###");
Debug.write("data callsin");
canvas.searchingin.close();
</handler>
</datapointer>
<dataset name="lastyearDS" src="http://vapi0.weepee.org/api/userdata/lastyear.php" request="false" onerror="canvas.handleError()" querytype="POST"/>
<datapointer xpath="lastyearDS:/dbdata">
<handler name="ondata">
loadinginfo.addText("###");
Debug.write("data lastyear");
</handler>
</datapointer>
<dataset name="conferenceDS" src="http://vapi0.weepee.org/api/publicdata/conference.php" request="false" type="http"/>
<datapointer xpath="conferenceDS:/dbdata">
<handler name="ondata">
loadinginfo.addText("###");
Debug.write("data conf");
</handler>
</datapointer>
<dataset name="requestnumberDS" src="http://vapi0.weepee.org/api/userdata/requestnumber.php" request="false" type="http" querytype="POST"/>
<datapointer xpath="requestnumberDS:/dbdata">
<handler name="ondata">
var ds=canvas.datasets.requestnumberDS;
var dp = ds.getPointer();
dp.setXPath("requestnumberDS:/dbdata/data/proceed/text()");
var proceed = dp.getNodeText();
dp.setXPath("requestnumberDS:/dbdata/data/url/text()");
var url = dp.getNodeText();
if (proceed == 1) {
lz.Browser.loadURL(url, "_parent");
}
</handler>
</datapointer>
<dataset name="transfernumberDS" src="http://vapi0.weepee.org/api/userdata/transfernumber.php" type="http" querytype="POST"/>
<datapointer xpath="transfernumberDS:/dbdata">
<handler name="ondata">
var ds=canvas.datasets.transfernumberDS;
var dp = ds.getPointer();
dp.setXPath("transfernumberDS:/dbdata/data/proceed/text()");
var proceed = dp.getNodeText();
dp.setXPath("transfernumberDS:/dbdata/data/url/text()");
var url = dp.getNodeText();
if (proceed == 1) {
lz.Browser.loadURL(url, "_parent");
}
</handler>
</datapointer>
<dataset name="agreementDS" src="http://vapi0.weepee.org/api/userdata/agreement.php" type="http" querytype="POST"/>
<datapointer xpath="agreementDS:/dbdata">
<handler name="ondata">
var ds=canvas.datasets.agreementDS;
var dp = ds.getPointer();
dp.setXPath("agreementDS:/dbdata/data/proceed/text()");
var proceed = dp.getNodeText();
dp.setXPath("agreementDS:/dbdata/data/url/text()");
var url = dp.getNodeText();
if (proceed == 1) {
lz.Browser.loadURL(url, "_blank");
}
</handler>
</datapointer>
<dataset name="callSkypeDS" src="http://vapi0.weepee.org/api/userdata/callskype.php" type="http" querytype="POST"/>
<datapointer xpath="callSkypeDS:/dbdata">
<handler name="ondata">
var ds=canvas.datasets.callSkypeDS;
var dp = ds.getPointer();
dp.setXPath("callSkypeDS:/dbdata/data/sendresult/text()");
var sendresult = dp.getNodeText();
skypestatus.setAttribute("text",sendresult);
</handler>
</datapointer>
<dataset name="sendSMSDS" src="http://vapi0.weepee.org/api/userdata/sendsms.php" type="http" querytype="POST"/>
<datapointer xpath="sendSMSDS:/dbdata">
<handler name="ondata">
var ds=canvas.datasets.sendSMSDS;
var dp = ds.getPointer();
dp.setXPath("sendSMSDS:/dbdata/data/sendresult/text()");
var sendresult = dp.getNodeText();
smsstatus.setAttribute("text",sendresult);
var ds=canvas.datasets.callsoutDS;
var p=new LzParam();
p.addValue("sid", canvas.sid,true);
p.addValue("force", "reload",true);
ds.setQueryString(p);
ds.doRequest();
canvas.userUpdate(password.getText());
</handler>
</datapointer>
<dataset name="weepeeDS" src="http://vapi0.weepee.org/api/weepee.php" request="false" type="http"/>
<datapointer id="myDpInit" xpath="weepeeDS:/weepee">
<handler name="ondata">
Debug.write("Loaded Default XML data");
loading.setAttribute('visible',false);
canvas.logindialog.open();
</handler>
</datapointer>
</library>
Cross References
Named Instances