forked from hummypkg/webif
8dc232646b
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1709 2a923420-c742-0410-a762-8d5b09965624
72 lines
1.2 KiB
Plaintext
Executable File
72 lines
1.2 KiB
Plaintext
Executable File
|
|
if {![exists -proc get_channel_attr]} {
|
|
if {![exists -proc rsv]} { require rsv.class }
|
|
|
|
proc get_channel_attr {channel {field hSvc}} {
|
|
global rsvdb
|
|
|
|
set ff [$rsvdb query "
|
|
select $field
|
|
from channel.TBL_SVC
|
|
where szSvcName = '$channel'
|
|
or szSvcname = '\025$channel'
|
|
limit 1
|
|
"]
|
|
|
|
if {[llength $ff] == 1} {
|
|
return [lindex [lindex $ff 0] 1]
|
|
}
|
|
return ""
|
|
}
|
|
|
|
proc get_channel_attr_bylcn {lcn {field hSvc}} {
|
|
global rsvdb
|
|
|
|
set ff [$rsvdb query "
|
|
select $field
|
|
from channel.TBL_SVC
|
|
where usLcn = $lcn
|
|
limit 1
|
|
"]
|
|
|
|
if {[llength $ff] == 1} {
|
|
return [lindex [lindex $ff 0] 1]
|
|
}
|
|
return 0
|
|
}
|
|
|
|
proc get_channel_attr_byorglcn {lcn {field hSvc}} {
|
|
global rsvdb
|
|
|
|
set ff [$rsvdb query "
|
|
select $field
|
|
from channel.TBL_SVC
|
|
where usOrgLcn = $lcn
|
|
and usLcn < 800
|
|
limit 1
|
|
"]
|
|
|
|
if {[llength $ff] == 1} {
|
|
return [lindex [lindex $ff 0] 1]
|
|
}
|
|
return 0
|
|
}
|
|
|
|
proc get_channel_attr_byhsvc {hsvc {field usLcn}} {
|
|
global rsvdb
|
|
|
|
set ff [$rsvdb query "
|
|
select $field
|
|
from channel.TBL_SVC
|
|
where hSvc = $hsvc
|
|
limit 1
|
|
"]
|
|
|
|
if {[llength $ff] == 1} {
|
|
return [lindex [lindex $ff 0] 1]
|
|
}
|
|
return 0
|
|
}
|
|
}
|
|
|