source: trunk/cgi-bin/cross_post_moltps_nu @ 1

Last change on this file since 1 was 1, checked in by cbipsl, 18 years ago

Geisa inital import

File size: 2.4 KB
Line 
1#file=cross_post_moletps_nu
2#on entry: $menu_opt=...Moles=[sel|all]&...Mole_mmm=on&...
3#                    ...Mole_mmm_iii=on&...
4#                    ...Numin=min&...Numax=max&...
5#                    ...Nu1=nnn&...Nu2=ppp&... (POST method)
6#on exit: defines $execute_parms=$execute_parms",mol='mmm',tp=iii,jjj,..."
7#                 if Moles=sel,
8#                 $execute_parms=$execute_parms",mol='all'"
9#                 if Moles=all,
10#                 $nu1=nnn,
11#                 $nu2=ppp,
12#                 $execute_parms=$execute_parms",nu1=nnn,nu2=ppp"
13ifs=$IFS;IFS="&";all=0;none=1;
14for s in $menu_opt; do [ "$s" = "Moles=all" ]&&{ all=1;break;}
15[ "`expr \"$s\" : 'Mole_\(.*\)='`" ]&&none=0;done
16[ $all = 0 -a $none = 1 ]&&
17{
18echo "<em>"
19 echol "Erreur: Aucune mol&eacute;cule s&eacute;lectionn&eacute;e" "Error: No selected molecule"
20 echo "!</em><br>"
21error=1
22}
23if [ $all = 0 ]; then
24for s in $menu_opt;do
25l=`expr "$s" : 'Mole_\(.*\)='`;[ "$l" = "" ]&&continue
26m=`expr "$l" : '\(.*\)_.*'`;i=`expr "$l" : '.*_\(.*\)'`
27if [ "$m" != "" -a "$m" != "$mp" ]; then
28execute_parms=$execute_parms,"mol='$m',tp=$i";mp=$m;d=;
29else
30execute_parms=$execute_parms,$i
31fi
32done
33else
34execute_parms=$execute_parms,"mol='all'"
35fi
36for s in $menu_opt;do
37l=`expr "$s" : 'Numin=\(.*\)'`;[ "$l" ]&&numin="$l"
38l=`expr "$s" : 'Numax=\(.*\)'`;[ "$l" ]&&numax="$l"
39l=`expr "$s" : 'Nu1=\(.*\)'`;[ "$l" ]&&nu1="$l"
40l=`expr "$s" : 'Nu2=\(.*\)'`;[ "$l" ]&&nu2="$l"
41done;IFS=$ifs
42numin=`$HOME_GEISA/unescape -b "$numin"`
43numax=`$HOME_GEISA/unescape -b "$numax"`
44nu1=`$HOME_GEISA/unescape -b "$nu1"`
45nu2=`$HOME_GEISA/unescape -b "$nu2"`
46[ `$HOME_GEISA/vreal "$nu1"` = 1 -o `$HOME_GEISA/vord "$nu1" "$numin"` = 0 -o `$HOME_GEISA/vord "$numax" "$nu1"` = 0 ]&&
47{
48echo "<em>"
49 echol "Erreur: La limite inf&eacute;rieure du domaine spectral est incorrecte"
50"Error: The lower spectral limit is invalid"
51 echo "!</em><br>"
52error=2
53}
54[ `$HOME_GEISA/vreal "$nu2"` = 1 -o `$HOME_GEISA/vord "$nu2" "$numin"` = 0 -o `$HOME_GEISA/vord "$numax" "$nu2"` = 0 ]&&
55{
56echo "<em>"
57 echol "Erreur: La limite sup&eacute;rieure du domaine spectral est incorrecte"
58"Error: The upper spectral limit is invalid"
59 echo "!</em><br>"
60error=2
61}
62[ ${error:-0} -lt 2 -a `$HOME_GEISA/vord "$nu1" "$nu2"` = 1 ]&&
63{
64echo "<em>"
65 echol "Erreur: Les limites du domaine spectral sont incorrectes" "Error: The spectral limits are not valid"
66 echo "!</em><br>"
67error=1
68}
69execute_parms=$execute_parms",nu1=$nu1,nu2=$nu2"
Note: See TracBrowser for help on using the repository browser.