methods.lzx

<library>
	<!-- FOR DEBUGGING PURPOSES -->
	<method name="handleError">
		Debug.write((new Date())+": Request got an error -- sorry.");
	</method>

	<!-- Our Methods -->
	<method name="getWeePee">			  
		var ds=canvas.datasets.weepeeDS;
		ds.doRequest();
	</method>

	<method name="resellerLogin" args="username,password">			  
                canvas.logindialog.close();
		var ds=canvas.datasets.loginDS;    
		var p=new LzParam();
		if (username == undefined) {
		username = "";
		}
		if (password == undefined) {
		password = "";
		}
		p.addValue("username", username,true);       				  	     
		p.addValue("password", password,true);       				  	     
		ds.setQueryString(p);        
		ds.doRequest();
	</method>

	<method name="resellerChangePwd" args="oldpassword,newpassword">			  
		var ds=canvas.datasets.changepwdDS;    
		var p=new LzParam();
		if (username == undefined) {
		username = "";
		}
		if (password == undefined) {
		password = "";
		}
		p.addValue("sid", canvas.sid,true);
		p.addValue("oldpassword", oldpassword,true);       				  	     
		p.addValue("newpassword", newpassword,true);       				  	     
		ds.setQueryString(p);        
		ds.doRequest();
	</method>

	<method name="createAccount" args="proto,lastname,surname,street,city,email">			  
		var ds=canvas.datasets.createaccountDS;    
		var p=new LzParam();
		p.addValue("sid", canvas.sid,true);
		p.addValue("proto", proto,true);       				  	     
		p.addValue("name", lastname,true);       				  	     
		p.addValue("surname", surname,true);       				  	     
		p.addValue("street", street,true);       				  	     
		p.addValue("city", city,true);       				  	     
		p.addValue("email", email,true);       				  	     
		ds.setQueryString(p);        
		ds.doRequest();
		canvas.getLiveData();
	</method>

	<method name="createProAccount" args="lastname,surname,company,street,city,email,vat,autoinvoice,credit,firstaccount">			  
		var ds=canvas.datasets.createproaccountDS;    
		var p=new LzParam();
		p.addValue("sid", canvas.sid,true);
		p.addValue("name", lastname,true);       				  	     
		p.addValue("surname", surname,true);       				  	     
		p.addValue("company", company,true);       				  	     
		p.addValue("street", street,true);       				  	     
		p.addValue("city", city,true);       				  	     
		p.addValue("email", email,true);       				  	     
		p.addValue("vat", "BE" + vat,true);       				  	     
		p.addValue("credit", credit,true);       				  	     
		p.addValue("firstaccount", firstaccount,true);       				  	     
		p.addValue("autoinvoice", autoinvoice,true);
		ds.setQueryString(p);        
		ds.doRequest();
		canvas.getLiveData();
	</method>

	<method name="createAgreement" args="lastname,surname,company,street,city,email,vat,autoinvoice,credit,firstaccount">
		var p=new LzParam();            
                p.addValue("name", lastname,true);     
                p.addValue("surname", surname,true);                                
                p.addValue("company", company,true);                                        
                p.addValue("street", street,true);                                      
                p.addValue("city", city,true);                                               
                p.addValue("email", email,true);                 
                p.addValue("vat", "BE" + vat,true);           
                p.addValue("id", firstaccount,true);           
		var ds=canvas.datasets.loginDS;   
		var dp = ds.getPointer();
		dp.setXPath("loginDS:/dbdata/data/company/text()");
		var resellerCompany = dp.getNodeText();
                p.addValue("rescompany", resellerCompany, true);
		dp.setXPath("loginDS:/dbdata/data/fullname/text()");
		var resellerName = dp.getNodeText();
                p.addValue("resname", resellerName, true);
                dp.setXPath("loginDS:/dbdata/data/postalcity/text()");
                var resellerCity = dp.getNodeText();
                p.addValue("rescity", resellerCity, true);
		lz.Browser.loadURL('https://ssl.weepee.org/api/contract.php?' + p, '_blank');
	</method>

	<method name="addtoProAccount" args="groupid,accountid">
		var ds=canvas.datasets.addtoproaccountDS;    
		var p=new LzParam();
		p.addValue("sid", canvas.sid,true);
		p.addValue("groupid", groupid,true);       				  	     
		p.addValue("accountid", accountid,true);       				  	     
		ds.setQueryString(p);        
		ds.doRequest();
		canvas.getLiveData();
	</method>

	<method name="weepeeReload">
		if (canvas.sid != undefined) {
			getLiveData();
			lz.Timer.addTimer(canvas.reload_delegate, 120 * 60000);
		}
	</method>

	<method name="getResellerData">
		var ds=canvas.datasets.sipaccountsDS;
		var p=new LzParam();
		p.addValue("sid", canvas.sid,true);
		ds.setQueryString(p);       				  	     
		ds.doRequest();

		var ds=canvas.datasets.numbersDS;
		var p=new LzParam();
		p.addValue("sid", canvas.sid,true);
		ds.setQueryString(p);       				  	     
		ds.doRequest();

		var ds=canvas.datasets.servicenumbersDS;
		var p=new LzParam();
		p.addValue("sid", canvas.sid,true);
		ds.setQueryString(p);       				  	     
		ds.doRequest();

		var ds=canvas.datasets.faxaccountsDS;
		var p=new LzParam();
		p.addValue("sid", canvas.sid,true);
		ds.setQueryString(p);       				  	     
		ds.doRequest();

		var ds=canvas.datasets.proaccountsDS;
		var p=new LzParam();
		p.addValue("sid", canvas.sid,true);
		ds.setQueryString(p);       				  	     
		ds.doRequest();
		
		var ds=canvas.datasets.fwdaccountsDS;
		var p=new LzParam();
		p.addValue("sid", canvas.sid,true);
		ds.setQueryString(p);       				  	     
		ds.doRequest();

		var ds=canvas.datasets.codecbwDS;
		var p=new LzParam();
		p.addValue("sid", canvas.sid,true);
		ds.setQueryString(p);       				  	     
		ds.doRequest();

		var ds=canvas.datasets.postalcodesproDS;
		var p=new LzParam();
		p.addValue("sid", canvas.sid,true);
		ds.setQueryString(p);       				  	     
		ds.doRequest();
		
		var ds=canvas.datasets.postalcodesDS;
		var p=new LzParam();
		p.addValue("sid", canvas.sid,true);
		ds.setQueryString(p);       				  	     
		ds.doRequest();
	</method>

	<method name="getLiveData">
                canvas.searchingsip.open();
		var ds=canvas.datasets.sipaccountsDS;
		ds.doRequest();

                canvas.searchingnumbers.open();
		var ds=canvas.datasets.numbersDS;
		ds.doRequest();

                canvas.searchingservicenumbers.open();
		var ds=canvas.datasets.servicenumbersDS;
		ds.doRequest();

                canvas.searchingfax.open();
		var ds=canvas.datasets.faxaccountsDS;
		ds.doRequest();

                canvas.searchingpro.open();
		var ds=canvas.datasets.proaccountsDS;
		ds.doRequest();

                canvas.searchingfwd.open();
		var ds=canvas.datasets.fwdaccountsDS;
		ds.doRequest();
	</method>

	<method name="searchSip" args="search">
		canvas.searchingsip.open();
		var ds=canvas.datasets.sipaccountsDS;
		var p=new LzParam();
		p.addValue("sid", canvas.sid,true);
		p.addValue("search", search,true);
		ds.setQueryString(p);       				  	     
		ds.doRequest();
	</method>

	<method name="searchFax" args="search">
		canvas.searchingfax.open();
		var ds=canvas.datasets.faxaccountsDS;
		var p=new LzParam();
		p.addValue("sid", canvas.sid,true);
		p.addValue("search", search,true);
		ds.setQueryString(p);       				  	     
		ds.doRequest();
	</method>
	
	<method name="searchFwd" args="search">
		canvas.searchingfwd.open();
		var ds=canvas.datasets.fwdaccountsDS;
		var p=new LzParam();
		p.addValue("sid", canvas.sid,true);
		p.addValue("search", search,true);
		ds.setQueryString(p);       				  	     
		ds.doRequest();
	</method>
	
	<method name="searchPro" args="search">
		canvas.searchingpro.open();
		var ds=canvas.datasets.proaccountsDS;
		var p=new LzParam();
		p.addValue("sid", canvas.sid,true);
		p.addValue("search", search,true);
		ds.setQueryString(p);       				  	     
		ds.doRequest();
	</method>

	<method name="searchNumbers" args="search">
		canvas.searchingnumbers.open();
		var ds=canvas.datasets.numbersDS;
		var p=new LzParam();
		p.addValue("sid", canvas.sid,true);
		p.addValue("search", search,true);
		ds.setQueryString(p);       				  	     
		ds.doRequest();
	</method>
	
	<method name="searchserviceNumbers" args="search">
		canvas.searchingservicenumbers.open();
		var ds=canvas.datasets.servicenumbersDS;
		var p=new LzParam();
		p.addValue("sid", canvas.sid,true);
		p.addValue("search", search,true);
		ds.setQueryString(p);       				  	     
		ds.doRequest();
	</method>
	
	<method name="searchPostalcodes" args="search">
			var ds=canvas.datasets.postalcodesDS;
			var p=new LzParam();
			p.addValue("sid", canvas.sid,true);
			p.addValue("search", search,true);
			ds.setQueryString(p);       				  	     
			ds.doRequest();
	</method>
	
	<method name="searchPostalcodespro" args="search">
			var ds=canvas.datasets.postalcodesproDS;
			var p=new LzParam();
			p.addValue("sid", canvas.sid,true);
			p.addValue("search", search,true);
			ds.setQueryString(p);       				  	     
			ds.doRequest();
	</method>

	<method name="searchKbo" args="search">
			canvas.searchingvies.open();
			var ds=canvas.datasets.kbosearchDS;
			var p=new LzParam();
			p.addValue("sid", canvas.sid,true);
			p.addValue("search", search,true);
			ds.setQueryString(p);       				  	     
			ds.doRequest();
	</method>

        <method name="checkGridData">
        
                Debug.write("checkGridData");
                if ((canvas.gridservicenumbers == 1) && (canvas.gridnumbers == 1) && (canvas.gridsip == 1) && (canvas.gridfax == 1) && (canvas.gridfwd ==1) && (canvas.gridpro == 1) ) {
                        loading.setAttribute('visible',false);
                        resellermenu.setAttribute('visible',true);
                }
        
        </method>
</library>

Cross References

Named Instances