Rev 12801 | Rev 12927 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 12801 | Rev 12803 | ||
---|---|---|---|
Line 48... | Line 48... | ||
48 | 48 | ||
49 | :html |
49 | :html |
50 | <ul class="wims_nopuce"> |
50 | <ul class="wims_nopuce"> |
51 | <li> |
51 | <li> |
52 | <label for="begindscore$_num">$wims_name_from</label> |
52 | <label for="begindscore$_num">$wims_name_from</label> |
53 |
|
53 | !if $jquery_defined=yes |
54 |
|
54 | !read adm/datepickerform.phtml $(begindscore$_num)\ |
55 | begindscore$_num\ |
55 | begindscore$_num\ |
56 | "$class_creation","$class_expiration" |
56 | "$class_creation","$class_expiration" |
57 |
|
57 | !else |
58 |
|
58 | <input size="8" name="begindscore$_num" id="begindscore$_num" value="$(begindscore$_num)" /> |
59 |
|
59 | !endif |
60 | <label for="begintscore$_num">$wims_name_at</label> |
60 | <label for="begintscore$_num">$wims_name_at</label> |
61 | <input size="5" name="begintscore$_num" id="begintscore$_num" value="$(begintscore$_num)" /> |
61 | <input size="5" name="begintscore$_num" id="begintscore$_num" value="$(begintscore$_num)" /> |
62 | 62 | ||
63 | <label for="enddscore$_num">$wims_name_to</label> |
63 | <label for="enddscore$_num">$wims_name_to</label> |
64 |
|
64 | !if $jquery_defined=yes |
65 |
|
65 | !read adm/datepickerform.phtml $(enddscore$_num)\ |
66 | enddscore$_num\ |
66 | enddscore$_num\ |
67 | "$class_creation","$class_expiration" |
67 | "$class_creation","$class_expiration" |
68 |
|
68 | !else |
69 |
|
69 | <input size="8" name="enddscore$_num" id="enddscore$_num" value="$(enddscore$_num)" /> |
70 |
|
70 | !endif |
71 | <label for="endtscore$_num">$wims_name_at</label> |
71 | <label for="endtscore$_num">$wims_name_at</label> |
72 | <input size="5" name="endtscore$_num" id="endtscore$_num" value="$(endtscore$_num)" /> |
72 | <input size="5" name="endtscore$_num" id="endtscore$_num" value="$(endtscore$_num)" /> |
73 | </li><li> |
73 | </li><li> |
74 | <label for="IPscore$_num">$wims_name_IP</label> |
74 | <label for="IPscore$_num">$wims_name_IP</label> |
75 | <input size="10" name="IPscore$_num" id="IPscore$_num" value="$(IPscore$_num)" placeholder="127.0.0.1" /> |
75 | <input size="10" name="IPscore$_num" id="IPscore$_num" value="$(IPscore$_num)" placeholder="127.0.0.1" /> |
Line 78... | Line 78... | ||
78 | !exit |
78 | !exit |
79 | 79 | ||
80 | :get |
80 | :get |
81 | !! error are not display to user but default value replace bad value |
81 | !! error are not display to user but default value replace bad value |
82 | !! date format verification |
82 | !! date format verification |
83 |
|
83 | !set _e=begin,end |
84 |
|
84 | !set _l=$class_creation,$class_expiration |
85 |
|
85 | !for _t=1 to 2 |
86 | !set $(_e[$_t])dscore$_num=!text select 0123456789 in $($(_e[$_t])dscore$_num) |
86 | !set $(_e[$_t])dscore$_num=!text select 0123456789 in $($(_e[$_t])dscore$_num) |
87 | !bound $(_e[$_t])dscore$_num between $class_creation and $class_expiration default $(_l[$_t]) |
87 | !bound $(_e[$_t])dscore$_num between $class_creation and $class_expiration default $(_l[$_t]) |
88 | !set _y=!char 1 to 4 of $($(_e[$_t])dscore$_num) |
88 | !set _y=!char 1 to 4 of $($(_e[$_t])dscore$_num) |
89 | !set _m=!char 5 to 6 of $($(_e[$_t])dscore$_num) |
89 | !set _m=!char 5 to 6 of $($(_e[$_t])dscore$_num) |
90 | !set _d=!char 7 to 8 of $($(_e[$_t])dscore$_num) |
90 | !set _d=!char 7 to 8 of $($(_e[$_t])dscore$_num) |
91 | !! ---- day and month check (not realy good test should be an exact test of existence of date) |
91 | !! ---- day and month check (not realy good test should be an exact test of existence of date) |
92 | !if $_m<1 or $_m>12 or $_d<1 or $_d>31 |
92 | !if $_m<1 or $_m>12 or $_d<1 or $_d>31 |
93 | !set $(_e[$_t])dscore$_num=$(_l[$_t]) |
93 | !set $(_e[$_t])dscore$_num=$(_l[$_t]) |
94 | !endif |
94 | !endif |
95 |
|
95 | !next _t |
96 | !! time format verification |
96 | !! time format verification |
97 |
|
97 | !set _l=00:00,23:59 |
98 |
|
98 | !for _t=1 to 2 |
99 | !set $(_e[$_t])tscore$_num=!text select 0123456789: in $($(_e[$_t])tscore$_num) |
99 | !set $(_e[$_t])tscore$_num=!text select 0123456789: in $($(_e[$_t])tscore$_num) |
100 | !set $(_e[$_t])tscore$_num=!replace internal : by , in $($(_e[$_t])tscore$_num) |
100 | !set $(_e[$_t])tscore$_num=!replace internal : by , in $($(_e[$_t])tscore$_num) |
101 | !set _nb=!itemcnt $($(_e[$_t])tscore$_num) |
101 | !set _nb=!itemcnt $($(_e[$_t])tscore$_num) |
102 | !if $_nb=2 |
102 | !if $_nb=2 |
103 | !distribute item $($(_e[$_t])tscore$_num) into _h,_m |
103 | !distribute item $($(_e[$_t])tscore$_num) into _h,_m |
Line 111... | Line 111... | ||
111 | !set $(_e[$_t])tscore$_num=$_h:$_m |
111 | !set $(_e[$_t])tscore$_num=$_h:$_m |
112 | !endif |
112 | !endif |
113 | !else |
113 | !else |
114 | !set $(_e[$_t])tscore$_num=$(_l[$_t]) |
114 | !set $(_e[$_t])tscore$_num=$(_l[$_t]) |
115 | !endif |
115 | !endif |
116 |
|
116 | !next _t |
117 | !! IP restriction char |
117 | !! IP restriction char |
118 |
|
118 | !set IPscore$_num=!text select char 1234567890. in $(IPscore$_num) |
119 | !! write output |
119 | !! write output |
120 |
|
120 | !reset _output |
121 |
|
121 | !if $(begindscore$_num)!=$empty and ($(begindscore$_num)!=$class_creation or $(begintscore$_num)!=00:00) |
122 | !set _output=$_output>$(begindscore$_num).$(begintscore$_num) |
122 | !set _output=$_output>$(begindscore$_num).$(begintscore$_num) |
123 |
|
123 | !endif |
124 |
|
124 | !if $(enddscore$_num)!=$empty and ($(enddscore$_num)!=$class_expiration or $(endtscore$_num)!=23:59) |
125 | !set _output=$_output <$(enddscore$_num).$(endtscore$_num) |
125 | !set _output=$_output <$(enddscore$_num).$(endtscore$_num) |
126 |
|
126 | !endif |
127 |
|
127 | !set _output=$_output $(IPscore$_num) |
128 |
|
128 | !exit |