<% theuser=orequest.form('username') mpassword=orequest.form('userpassword') thecounter=orequest.form('thecounter') thepagetogo=orequest.form('pagetogo') thestartdate=transform(orequest.form('datefrom')) theenddate=transform(orequest.form('dateto')) theaccount=allt(transform(orequest.form('ac'))) oJson=newobject('json','json.fxp') ajaxresponse=Createobject('empty') addproperty(ajaxresponse,'terror','true') addproperty(ajaxresponse,'pagetogo','welcome.html') addproperty(ajaxresponse,'tmessage','It is begining of new era, not error!') ***** do (addbs(oprop.appstartpath)+'prg\validate_users') with theuser, mpassword if validationofmainpage filetogo=addbs(oprop.appstartpath)+thepagetogo if file(filetogo) ajaxresponse.pagetogo=thepagetogo+'?ac='+theaccount+'&'+'datefrom='+thestartdate+'&'+'dateto='+theenddate ajaxresponse.tmessage='' ajaxresponse.terror='' else ajaxresponse.tmessage='The page is not available yet! '+thepagetogo endif else IF thepagetogo<>[welcome.html] ajaxresponse.tmessage='User name or password not correct!' else filetogo=addbs(oprop.appstartpath)+thepagetogo ajaxresponse.pagetogo=thepagetogo ajaxresponse.tmessage='The user name or password is invlaid!' ajaxresponse.terror='true' endif endif ***** oResponse.ContentType = "text/plain" oresponse.write(oJson.stringify(ajaxresponse)) oresponse.flush() %>