2011-06-29 22:53:15 +00:00
|
|
|
|
|
|
|
puts {
|
|
|
|
<style type=text/css>
|
|
|
|
.ui-button, .ui-button-text { padding: 0; font-size: 12px; }
|
|
|
|
#moresearch { display: none; }
|
|
|
|
#morebutton { position: relative; top: -12px; }
|
|
|
|
</style>
|
|
|
|
}
|
|
|
|
|
|
|
|
set searchterm ""
|
|
|
|
catch { set searchterm [dict get $_cgi term] }
|
|
|
|
set searchfull 0
|
|
|
|
catch { if {[dict exists $_cgi full]} { set searchfull 1 } }
|
|
|
|
|
|
|
|
puts "
|
|
|
|
<form method=get action=/cgi-bin/epg_search.jim>
|
|
|
|
<fieldset>
|
|
|
|
<legend>EPG Search</legend>
|
|
|
|
<label for=term>Query</label>
|
|
|
|
<input type=text name=term id=term size=20 maxlength=255 value=\"$searchterm\"
|
|
|
|
class=\"text ui-widget-content ui-corner-all\">
|
|
|
|
<input type=submit value=Search>
|
|
|
|
<input type=checkbox name=full id=full"
|
|
|
|
if {$searchfull == 1} { puts -nonewline " checked" }
|
|
|
|
puts ">
|
|
|
|
<label for=full>Search descriptions as well as titles.</label>
|
|
|
|
<font class=footnote style=\"margin-left: 5em\">
|
|
|
|
Click down arrow below for more options.
|
|
|
|
</font>
|
|
|
|
<div id=moresearch class=hidden>
|
|
|
|
"
|
|
|
|
|
|
|
|
proc cts {type img text} {
|
|
|
|
puts "<a href=/cgi-bin/epg_search.jim?ct=$type>
|
|
|
|
<img height=18 border=0 src=/images/173_3_00_G3_$img.png>
|
|
|
|
$text</a>";
|
|
|
|
}
|
|
|
|
|
|
|
|
puts {
|
|
|
|
<br>
|
2011-06-30 00:16:10 +00:00
|
|
|
<fieldset>
|
|
|
|
<legend>Content Type Searches</legend>
|
2011-06-29 22:53:15 +00:00
|
|
|
<table>
|
2011-06-30 00:16:10 +00:00
|
|
|
<tr>
|
2011-06-29 22:53:15 +00:00
|
|
|
<td>
|
|
|
|
}
|
|
|
|
|
|
|
|
cts 1 "Movie" "Film/Drama"
|
|
|
|
puts "</td><td>"
|
|
|
|
cts 2 "News" "News/Current affairs"
|
|
|
|
puts "</td><td>"
|
|
|
|
cts 4 "Sports" "Sport"
|
|
|
|
puts "</td><td>"
|
|
|
|
cts 9 "Education" "Education/Science/Factual"
|
|
|
|
puts "</td><td>"
|
|
|
|
cts 10 "Leisure" "Leisure"
|
|
|
|
|
|
|
|
puts "</td></tr><tr><td>"
|
|
|
|
|
|
|
|
cts 7 "Art" "Arts/Culture"
|
|
|
|
puts "</td><td>"
|
|
|
|
cts 3 "Show" "Show/Game show"
|
|
|
|
puts "</td><td>"
|
|
|
|
cts 5 "Children" "Children"
|
|
|
|
puts "</td><td>"
|
|
|
|
cts 8 "Society" "Social/Political/Economic"
|
|
|
|
puts "</td><td>"
|
|
|
|
cts 6 "Music" "Music/Ballet/Dance"
|
|
|
|
|
2011-06-30 00:16:10 +00:00
|
|
|
puts "</tr></table></fieldset>"
|
2011-06-29 22:53:15 +00:00
|
|
|
|
|
|
|
set db [sqlite3.open /var/lib/humaxtv/setup.db]
|
|
|
|
set res [$db query {
|
|
|
|
select itemBlob from TBL_USERCONFIG
|
|
|
|
where itemName like 'EPG\_KEYWORD\_%%' ESCAPE '\'
|
|
|
|
}]
|
|
|
|
$db close
|
|
|
|
|
|
|
|
if {[llength $res] > 0} {
|
2011-06-30 00:16:10 +00:00
|
|
|
puts "
|
|
|
|
<fieldset>
|
|
|
|
<legend>Keyword Searches</legend>
|
|
|
|
<table cellpadding=5>
|
|
|
|
<tr>
|
|
|
|
"
|
2011-06-29 22:53:15 +00:00
|
|
|
foreach keyword $res {
|
|
|
|
set kw [string range [lindex $keyword 1] 1 end]
|
2011-06-29 23:57:01 +00:00
|
|
|
# Clean the keyword string.
|
|
|
|
regexp -nocase {^(\w+)} $kw kw
|
2011-06-29 22:53:15 +00:00
|
|
|
puts "<td><a href=/cgi-bin/epg_search.jim?term=[cgi_quote_url $kw]>$kw
|
|
|
|
</a></td>"
|
|
|
|
}
|
2011-06-30 00:16:10 +00:00
|
|
|
puts "
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</fieldset>
|
|
|
|
"
|
2011-06-29 22:53:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
puts "
|
|
|
|
</div>
|
|
|
|
"
|
|
|
|
|
|
|
|
puts "</fieldset>"
|
|
|
|
puts "<center><img id=morebutton src=/img/more_show.png></center>"
|
|
|
|
puts "</form>"
|
|
|
|
|
|
|
|
puts {
|
|
|
|
<script type=text/javascript>
|
|
|
|
$('input:submit').button();
|
|
|
|
$('#morebutton').click(function(e) {
|
|
|
|
e.preventDefault();
|
|
|
|
$('#moresearch').slideToggle('slow');
|
|
|
|
if ($('#morebutton').attr('src') == '/img/more_show.png')
|
|
|
|
$('#morebutton').attr('src', '/img/more_hide.png');
|
|
|
|
else
|
|
|
|
$('#morebutton').attr('src', '/img/more_show.png');
|
|
|
|
});
|
|
|
|
|
|
|
|
</script>
|
|
|
|
}
|
|
|
|
|