66 |
"plivit_b.gif"=>"http://www.pliva.hr/human_health.php?search=plivit%25b&show_description=on#results", |
"plivit_b.gif"=>"http://www.pliva.hr/human_health.php?search=plivit%25b&show_description=on#results", |
67 |
"plivit_b6.gif"=>"http://www.pliva.hr/human_health.php?search=plivit%25b6&show_description=on#results", |
"plivit_b6.gif"=>"http://www.pliva.hr/human_health.php?search=plivit%25b6&show_description=on#results", |
68 |
"plivit_c.gif"=>"http://www.pliva.hr/human_health.php?search=plivit%25c&show_description=on#results", |
"plivit_c.gif"=>"http://www.pliva.hr/human_health.php?search=plivit%25c&show_description=on#results", |
69 |
|
"plivazdravlje.gif"=>"http://www.plivazdravlje.hr/", |
70 |
|
"plivamed.gif"=>"http://www.plivamed.net/", |
71 |
); |
); |
72 |
|
|
73 |
$pic=basename($src); |
$pic=basename($src); |
151 |
|
|
152 |
function smarty_func_input() { |
function smarty_func_input() { |
153 |
extract(func_get_arg(0)); |
extract(func_get_arg(0)); |
154 |
print "<input name=\"$name\" size=\"$size\" value=\"".$GLOBALS[$name]."\">"; |
if (strtolower($type) == "radio") { |
155 |
print "<input type=\"hidden\" name=\"inputs_required[]\" value=\"$name\">"; |
print "<input name=\"$name\" type=\"radio\" value=\"$value\""; |
156 |
|
if ($GLOBALS[$name] == $value) print " checked"; |
157 |
|
print ">"; |
158 |
|
} else { |
159 |
|
print "<input name=\"$name\" size=\"$size\" value=\"".$GLOBALS[$name]."\">"; |
160 |
|
} |
161 |
if ($type) print "<input type=\"hidden\" name=\"inputs_required_type[$name]\" value=\"$type\">"; |
if ($type) print "<input type=\"hidden\" name=\"inputs_required_type[$name]\" value=\"$type\">"; |
162 |
} |
} |
163 |
|
|
164 |
|
function smarty_func_textarea() { |
165 |
|
extract(func_get_arg(0)); |
166 |
|
print "<textarea name=\"$name\" cols=\"$cols\" rows=\"$rows\">".$GLOBALS[$name]."</textarea>"; |
167 |
|
} |
168 |
|
|
169 |
function smarty_func_rinput() { |
function smarty_func_rinput() { |
170 |
extract(func_get_arg(0)); |
extract(func_get_arg(0)); |
171 |
global $inputs_required_type; |
global $inputs_required_type; |
183 |
} else { |
} else { |
184 |
print "<b>$desc</b>"; |
print "<b>$desc</b>"; |
185 |
} |
} |
186 |
|
print "<input type=\"hidden\" name=\"inputs_required[]\" value=\"$name\">"; |
187 |
} |
} |
188 |
|
|
189 |
|
// not strictly smarty, but it should be here and not in common.inc |
190 |
|
|
191 |
|
function check_required() { |
192 |
|
global $inputs_required; |
193 |
|
global $inputs_required_type; |
194 |
|
$ok=1; |
195 |
|
if (isset($inputs_required)) { |
196 |
|
foreach ($inputs_required as $i) { |
197 |
|
if (! isset($GLOBALS[$i]) || $GLOBALS[$i] == "") $ok=0; |
198 |
|
switch (strtolower($inputs_required_type[$i])) { |
199 |
|
case 'email': |
200 |
|
if (!strstr($GLOBALS[$i],'@')) $ok=0; |
201 |
|
} |
202 |
|
// print "$i: $GLOBALS[$i] type: $inputs_required_type[$i] $ok -- "; |
203 |
|
|
204 |
|
} |
205 |
|
} else { |
206 |
|
print "<!-- no inputs required -->"; |
207 |
|
} |
208 |
|
return $ok; |
209 |
|
} |
210 |
|
|
211 |
?> |
?> |