3 [ -n "$include_widgets" ] && return 0
6 . "$_EXEC/cgilite/storage.sh"
8 w_refuri="$(HTML "$REQUEST_URI")"
9 w_tags="$(find "$_DATA/" -path '*/.index/meta' -print0 \
11 | cut -d= -f2- |tr , '\n' | sort -u)"
12 w_tags="$(UNSTRING "$w_tags")"
16 [form #search method=GET action=?
18 [option disabled=disabled Order By]
19 [option value=Name Name]
20 [option value=Date Date]
21 [option value=Length Length]
23 [input name=s placeholder=Search value="%s"]
31 fakemp4="$(COOKIE fakemp4)"
34 [form #prefs method="POST" action="?a=setprefs"
37 [label for=prefs_ps Pagesize]
38 [input #prefs_ps type=number name=pagesize value="%s"][br]
39 [radio "mode" "browse" %s #prefs_modebrowse] [label for=prefs_modebrowse Browse Folders][br]
40 [radio "mode" "index" %s #prefs_modeindex ] [label for=prefs_modeindex View Full Index][br]
41 [checkbox "fakemp4" "yes" %s #prefs_fmp4] [label for=prefs_fmp4 Fake .MP4 file ending][br]
42 [submit "store" "store" Set Cookie]
45 "$w_refuri" "$LISTSIZE" \
46 "$([ "$mode" = index ] || printf checked)" \
47 "$([ "$mode" = index ] && printf checked)" \
48 "$([ "$fakemp4" = yes ] && printf checked)"
52 [ -d "$_DATA/$ITEM/.index" ] || printf '
53 [form #index method="POST" action="?a=spawnindex"
55 [label Set up for Index view: ]
56 [checkbox "recursive" "yes" #spawn_recursive] [label for=spawn_recursive Include subdirectories]
57 [submit "spawn" "spawn" Set up]
63 printf '[form #advsearch action=?a=advsearch method=POST
65 [p .help Select multiple tags from each category by holding down the [strong Ctrl] key on your keyboard.[br]
66 Refine the search further by setting additional search tags using the [strong "+and"] button.]
70 for n in 1 2 3 4 5 6 7 8 9 10; do
71 lbid="$(HTML "cat_${n}_(none)")"
72 printf '[input .and type=checkbox name=and id="and_%i"][label for="and_%i" +and
74 [input .pol type="radio" name=pol_%i id="pol_pos_%i"][label for=pol_pos_%i Any]
75 [input .pol type="radio" name=pol_%i id="pol_neg_%i"][label for=pol_neg_%i None]
76 [label .head Category:]
77 [input .cat type=radio name="cat_%i" id="%s" ][label for="%s" %s]
78 [select name=tag_%s size=10 multiple' \
79 $n $n $n $n $n $n $n $n \
80 $n "$lbid" "$lbid" "(none)" $n
81 printf %s "$w_tags" |grep -vF ":" \
82 | while read -r tag; do
83 [ ! "$tag" ] && continue
84 printf '[option value="%s" %s]' "$(HTML "$tag")" "$(HTML "$tag")"
87 printf %s "$w_tags" |cut -sd: -f1 |sort -u \
88 | while read -r category; do
89 lbid="$(HTML "cat_${n}_${category}")"
90 printf '[input .cat type=radio name="cat_%i" id="%s" [label for="%s" %s]]
91 [select name=tag_%s size=10 multiple' $n "$lbid" "$lbid" "$(HTML "$category")" $n
92 printf %s "$w_tags" |grep -wF "${category}" \
93 | while read -r tag; do
94 tag="$(HTML "$tag")"; tn="${tag#*:}"
95 printf '[option value="%s" %s]' "$tag" "$tn"
107 printf '[div #multitag [input type="hidden" name="ref" value="%s"]' "$w_refuri"
108 printf '[a href="#" Hide][br]'
110 printf '[fieldset [legend %s:][select name=tag size=4 multiple' "Tags"
111 printf %s "$w_tags" |grep -vF ":" \
112 | while read -r tag; do
113 [ ! "$tag" ] && continue
114 printf '[option value="%s" %s]' "$(HTML "$tag")" "$(HTML "$tag")"
118 printf %s "$w_tags" |cut -sd: -f1 |sort -u \
119 | while read -r category; do
120 printf '[fieldset [legend %s:][select name=tag size=4 multiple' "$(HTML "$category")"
121 printf %s "$w_tags" |grep -wF "${category}" \
122 | while read -r tag; do
123 tag="$(HTML "$tag")"; tn="${tag#*:}"
124 printf '[option value="%s" %s]' "$tag" "$tn"
129 printf '[fieldset [legend New:][textarea name=newtag\n][button type=Submit Add Tags]]]'