show_table.qsrc 672 B

1234567891011121314151617181920
  1. # show_table
  2. !{show table v2, by illume
  3. this function will push $args[0] into $show_table with args[1] column, min=1, and count by st_count
  4. st_count=0 & $show_table=''
  5. if kat > 0:gs 'show_table', 'Kate <<kat>>','2'
  6. if vika > 0:gs 'show_table', 'Vika <<vika>>','2'
  7. ......
  8. if st_count > 0 :pl 'Relations:<BR><TABLE BORDER=1><<$show_table>></TR></TABLE>'
  9. }
  10. tab_tmp = max(1, val($ARGS[1]), ARGS[1])
  11. if st_count - st_count/tab_tmp*tab_tmp = 0: $show_table += "<TR>"
  12. $show_table += "<TD><<$ARGS[0]>></TD>"
  13. if st_count - st_count/tab_tmp*tab_tmp + 1 = tab_tmp: $show_table += "</TR>"
  14. st_count += 1
  15. killvar 'tab_tmp'
  16. --- show_table ---------------------------------