Changeset 18143 for trunk/ippMonitor/scripts/generate
- Timestamp:
- Jun 15, 2008, 1:56:02 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippMonitor/scripts/generate (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippMonitor/scripts/generate
r15969 r18143 267 267 $value = $field[$i]; 268 268 if ($value eq "*") { next; } 269 print FILE "\$WHERE = check_restrict ('$value', \$WHERE);\n"; 269 if ($format[$i] eq "%s") { 270 print FILE "\$WHERE = check_restrict ('$value', \$WHERE, 'string');\n"; 271 } else { 272 print FILE "\$WHERE = check_restrict ('$value', \$WHERE, 'min');\n"; 273 print FILE "\$WHERE = check_restrict ('$value', \$WHERE, 'max');\n"; 274 } 270 275 } 271 276 print FILE "\$WHERE = check_ordering (\$WHERE);\n"; … … 278 283 $value = $field[$i]; 279 284 if ($value eq "*") { next; } 280 print FILE "\$buttonLink = button_restrict ('$value', \$buttonLink);\n"; 281 } 285 if ($format[$i] eq "%s") { 286 print FILE "\$buttonLink = button_restrict_string ('$value', \$buttonLink);\n"; 287 } else { 288 print FILE "\$buttonLink = button_restrict_min ('$value', \$buttonLink);\n"; 289 print FILE "\$buttonLink = button_restrict_max ('$value', \$buttonLink);\n"; 290 } 291 } 292 } 293 294 # there are two query rows: the first is populated for both strings 295 # and numbers, the second only for numbers 296 sub write_table_query { 297 my ($i); 298 299 print FILE "echo \"<tr>\\n\";\n"; 300 for ($i = 0; $i < @field; $i++) { 301 if ($show[$i] eq "none") { next; } 302 if ($field[$i] eq "*") { 303 # * fields create an empty cell 304 print FILE "echo \"<td> </td>\\n\";\n"; 305 } else { 306 if ($format[$i] eq "%s") { 307 print FILE "write_query_row ('$field[$i]', $width[$i], 'string');\n"; 308 } else { 309 print FILE "write_query_row ('$field[$i]', $width[$i], 'min');\n"; 310 } 311 } 312 } 313 print FILE "echo \"</tr> <tr>\\n\";\n"; 314 for ($i = 0; $i < @field; $i++) { 315 if ($show[$i] eq "none") { next; } 316 if (($field[$i] eq "*") || ($format[$i] eq "%s")) { 317 # * fields create an empty cell 318 print FILE "echo \"<td class=\\\"list\\\"> </td>\\n\";\n"; 319 } else { 320 print FILE "write_query_row ('$field[$i]', $width[$i], 'max');\n"; 321 } 322 } 323 print FILE "echo \"</tr>\\n\";\n"; 282 324 } 283 325 … … 342 384 } 343 385 344 sub write_table_query {345 my ($i);346 for ($i = 0; $i < @field; $i++) {347 if ($show[$i] eq "none") { next; }348 if ($field[$i] eq "*") {349 # * fields create an empty cell350 print FILE "echo \"<td> </td>\\n\";\n";351 } else {352 print FILE "write_query_row ('$field[$i]', $width[$i]);\n";353 }354 }355 }356 357 386 sub define_fields_string { 358 387 my (@array) = @_;
Note:
See TracChangeset
for help on using the changeset viewer.
