<% =SYS(3101,1256) olddate=SET("Date") oldmark=SET("Mark") SET DATe YMD SET MARK TO [-] SET CENTURY ON ajaxresponse=CREATEOBJECT('empty') oJSON=NEWOBJECT('json','json.prg') fref=upper(ALLTRIM(TRANSFORM(NVL(orequest.querystring('fref'),[])))) ftp=upper(ALLTRIM(TRANSFORM(NVL(orequest.querystring('ftp'),[])))) crlf=chr(13)+chr(10) if file((dbclocation+[works\visainfo.dbf])) do case case ftp=[LIST] select * from (dbclocation+[works\visainfo]) where allt(reffid)==fref and listtype='delegation_list' order by comp, cid into cursor VISALIST readwrite case ftp=[DEL] select * from (dbclocation+[works\visainfo]) where allt(reffid)==fref and listtype='delinembassy' order by comp, cid into cursor VISALIST readwrite case ftp=[JOB] select * from (dbclocation+[works\visainfo]) where allt(reffid)==fref and listtype='jobs_list' order by comp, cid into cursor VISALIST readwrite endcase else return [{"error":"true","message":"Please get fresh updates"}] endif if _tally=0 return [

Please, get fresh updates

Just click 'show' button and click update in the next page

] else scatter name thevisasname endif file_reference=allt(reffid) tfilename=dbclocation+[details] tcmd=[select .f. as linkedwith, * from (']+tfilename+[') where allt(reffid)==']+file_reference+[' into cursor 'odetails' readwrite] &tcmd SELECT DISTINCT ALLTRIM(COMP) as company, cid FROM [visalist] ORDER BY company INTO CURSOR X COMPANIES=[] selectedcompany=ALLTRIM(COMPANY) licensesearch=Alltrim(Str(xcompany.licval)) thecomp=[] foundone=.f. DO WHILE .t. AND NOT EOF() thiscompany=company searchin1=Company+Space(2) IF licensesearch $ searchin1 IF EMPTY(thecomp) For i=1 To 3 If Val(Substr(searchin1,At(licensesearch, searchin1,i),Len(licensesearch)+2))=Val(licensesearch) And; (Val(Substr(searchin1,At(licensesearch, searchin1,i)-1,Len(licensesearch)+2))=0 Or Val(Substr(searchin1,At(licensesearch, searchin1,i)-1,Len(licensesearch)+2))=Val(licensesearch)) thecomp=Company foundone=.t. Endif ENDFOR ENDIF endif IF NOT EMPTY(thecomp) AND foundone tselected=[selected] foundone=.f. selectedcompany=ALLTRIM(COMPany) ELSE tselected=[] endif COMPANIES=COMPANIES+[]+CRLF skip enddo *SELECT DISTINCT PROF,pid FROM [VISALIST] WHERE ALLTRIM(COMP)==ALLTRIM(selectedcompany) ORDER BY PROF INTO CURSOR X SELECT DISTINCT PROF,pid FROM [VISALIST] ORDER BY PROF INTO CURSOR X theprof=ALLTRIM(prof) professions=[] SCAN professions=professions+[]+crlf ENDSCAN tcmd=[SELECT TOP 1 category,salary,skill,year,month, VAL(reffid) as vreff FROM (dbclocation+'category') ] tcmd=tcmd+[ WHERE NOT EMPTY(prof) AND ALLTRIM(prof)==theprof ORDER BY vreff DESC INTO CURSOR x] &tcmd theCategory=ALLTRIM(category) theSalary=ALLTRIM(TRANSFORM(salary)) theSkill=ALLTRIM(TRANSFORM(skill)) skills=[Unskilled, Semi Skilled, Skilled,Highly Skilled,Highly Qualified] theskills=[] FOR i=1 TO GETWORDCOUNT(skills,[,]) tskill=GETWORDNUM(skills,i,[,]) IF tskill=theSkill theskills=theskills+[]+crlf ELSE theskills=theskills+[]+crlf endif endfor theYear=ALLTRIM(TRANSFORM(iif(empty(year),2,year))) theMonth=ALLTRIM(TRANSFORM(month)) SELECT [VISALIST] GO TOP VISASSTR=[] VISASSTR=VISASSTR+[] VISASSTR=VISASSTR+[] SCAN for qcounter=1 to qty select 'odetails' locate for (allt(prof)==allt(visalist.prof) or allt(category)==allt(visalist.category)) and not linkedwith replace linkedwith with .t. theoldapplicant=allt(gname)+[ ]+allt(sname)+[ ]+allt(fgname)+[ ]+allt(fsname) select [visalist] TEXT TO VISASSTR ADDITIVE NOSHOW TEXTMERGE ENDTEXT endfor ENDSCAN VISASSTR=VISASSTR+[
COMPANYCODEPROFESSIONCATEGORYQTYCURRSALARYSKILLYEARMONTHAPPLICANTSADD VISA Record
<> <> <> <> <> <> <> <> <> <> <> > onclick="if(this.checked){this.nextSibling.innerHTML='Add';}else{this.nextSibling.innerHTML='Ignore'}"><>
] TEXT TO newhtml NOSHOW TEXTMERGE PRETEXT 7 ADDITIVE SSSoft™ - <<allt(xcompany.name)>> Receipt
FXSoft™ AcBooks© Visa Mangagement System
COMPANY:
Profession: translate
Skill:
Category
Years:   Months:  
Salary
<>
ENDTEXT oResponse.ContentType = "text/html" oResponse.Write(newhtml) oresponse.flush SET DATE &olddate SET MARK TO &oldmark CLOSE TABLES CLOSE DATABASES STRTOFILE(newhtml,tempfolder+'actions.html') *RETURN newhtml %>