Subversion Repositories wimsdev

Rev

Rev 5163 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
20 reyssat 1
 
2
wims_print_precision=15
3
a_=!randint 10^8,10^10
4
b_=!randint 10^8,10^10
5
cn_code=$a_$b_
6
 
7
url=$back_url?module=adm/raw&ident=$back_ident&passwd=$back_password&code=$cn_code&qclass=$cn_class&rclass=$wims_class&quser=$cn_user
8
!for p in option,data1,data2,format
9
 CN_$p=!httpquery $(cn_$p)
10
!next p
11
URL=$url&job=$cn_method&format=$CN_format&option=$CN_option&data1=$CN_data1&data2=$CN_data2
12
 
13
!if $cn_method notwordof getlog getcsv getclassfile getclasstgz
14
 cn_data=!exec webget $URL
15
 cn_status=!line 1 of $cn_data
16
 cn_data=!line 2 to -1 of $cn_data
17
 cn_status=!trim $cn_status
18
 cn_status=!upper $cn_status
19
 !distribute words $cn_status into cn_status,cnr_code
20
 !if $cn_status=OK and $cn_method iswordof authuser addclass
21
  cn_data=!word 1 of $cn_data
22
 !endif
23
!else
24
 webget_output=webget.out
25
 cn_data=!exec webget $URL
26
 cn_status=!sh cd ../$wims_sesdir >/dev/null\
27
	head -1 webget.out\
28
	tail +2 webget.out >webget.data 2>/dev/null
29
 !distribute words $cn_status into cn_status,cnr_code
30
 !if $cn_status issametext ERROR
31
  cn_data=!record 0 of wimshome/$wims_sesdir/webget.data
32
 !endif
33
!endif
34
 
35
!if $cn_status=OK and $cn_code!=$cnr_code
36
 cn_status=ERROR
37
 cn_data=return code discord
38
!endif
39