source: branches/whiterussian/openwrt/package/webif/files/usr/lib/webif/subcategories.awk @ 2088

Last change on this file since 2088 was 2088, checked in by nbd, 11 years ago

move some code in a shared awk script, add fast replacement functions for [ -z ] and [ = ], make code a bit more readable

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 332 bytes
Line 
1BEGIN {
2        FS=":"
3        print "<div id=\"submenu\"><h3><strong>Sub-Categories:</strong></h3><ul>"
4}
5{
6        if ($5 ~ "^" selected "$") print "<li class=\"selected-maincat\"><a href=\"" rootdir "/" $6 "\">&raquo;" $5 "&laquo;</a></li>"
7        else print "<li><a href=\"" rootdir "/" $6 "\">&nbsp;" $5 "&nbsp;</a></li>"
8}
9END {
10        print "</ul></div>"
11}
12
Note: See TracBrowser for help on using the repository browser.