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>2669</value><description>02 - Brussel</description></item>
                <item><value>3369</value><description>03 - Antwerpen</description></item>
                <item><value>4296</value><description>04 - Luik</description></item>
                <item><value>9395</value><description>09 - Gent</description></item>
                <item><value>1069</value><description>010 - Waver</description></item>
                <item><value>1136</value><description>011 - Hasselt</description></item>
                <item><value>1269</value><description>012 - Tongeren</description></item>
                <item><value>1369</value><description>013 - Diest</description></item>
                <item><value>1449</value><description>014 - Herentals</description></item>
                <item><value>1569</value><description>015 - Mechelen</description></item>
                <item><value>1636</value><description>016 - Leuven</description></item>
                <item><value>1936</value><description>019 - Borgworm</description></item>
                <item><value>5096</value><description>050 - Brugge</description></item>
                <item><value>5149</value><description>051 - Roeselare</description></item>
                <item><value>5269</value><description>052 - Dendermonde</description></item>
                <item><value>5359</value><description>053 - Aalst</description></item>
                <item><value>5469</value><description>054 - Ninove</description></item>
                <item><value>5569</value><description>055 - Ronse</description></item>
                <item><value>5696</value><description>056 - Kortrijk</description></item>
                <item><value>5769</value><description>057 - Ieper</description></item>
                <item><value>5869</value><description>058 - Nieuwpoort</description></item>
                <item><value>5936</value><description>059 - Oostende</description></item>
                <item><value>6069</value><description>060 - Chimay</description></item>
                <item><value>6169</value><description>061 - Libramont-Chevigny</description></item>
                <item><value>6369</value><description>063 - Aarlen</description></item>
                <item><value>6469</value><description>064 - La Louvière</description></item>
                <item><value>65960</value><description>065 - Bergen</description></item>
                <item><value>6769</value><description>067 - Nijvel</description></item>
                <item><value>6836</value><description>068 - Aat</description></item>
                <item><value>6939</value><description>069 - Doornik</description></item>
                <item><value>71136</value><description>071 - Charleroi</description></item>
                <item><value>8036</value><description>080 - Stavelot</description></item>
                <item><value>8136</value><description>081 - Namen</description></item>
                <item><value>8236</value><description>082 - Dinant</description></item>
                <item><value>8336</value><description>083 - Ciney</description></item>
                <item><value>8469</value><description>084 - Marche-en-Famenne</description></item>
                <item><value>8569</value><description>085 - Hoei</description></item>
                <item><value>8669</value><description>086 - Durbuy</description></item>
                <item><value>8736</value><description>087 - Verviers</description></item>
                <item><value>8969</value><description>089 - Genk</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>

	<!-- this dataset needs to be loaded last -->
        <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