query($query)){ $chaninfo = "\n"; $chaninfo .= ""; while($row = $res->fetch(PDO::FETCH_ASSOC)){ foreach($row as $col => $val){ $chaninfo .= "\n"; $chaninfo .= "\n"; $chaninfo .= "\n"; $chaninfo .= "\n"; $chaninfo .= "\n"; if($col=="name") $channelname = $val; if($col=="moduleid") $moduleid = $val; if($col=="channel") $channel = $val; } } $chaninfo .= "
$tablename,Channel
$col:$val
\n"; }else{ $chaninfo = "

Error: bad result from \"$query\"

"; } // If no "name" field found, then use the tablename and channel id for title if($channelname == ""){ $channelname = "$tablename.$chan $chanid"; }else{ // Use tablename/chanid as subtitle $subtitle = "($tablename.$chan $chanid)"; } // Get crate and module information if($moduleid != ""){ $query = "SELECT * FROM Crate,Module WHERE Crate.crateid=Module.crateid AND Module.moduleid=$moduleid"; if($res = $db->query($query)){ $modinfo = "\n"; $modinfo .= ""; while($row = $res->fetch(PDO::FETCH_ASSOC)){ foreach($row as $col => $val){ if($col=="name") $channelname = $val; if($col=="moduleid") $moduleid = $val; if($col=="channel") $channel = $val; if($col=="area") $area = $val; $content = $val; if($col == "rack"){ $content = "$val"; } if($col == "area"){ $content = "$val"; } if($col == "crateid"){ $content = "$val"; } $modinfo .= "\n"; $modinfo .= "\n"; $modinfo .= "\n"; $modinfo .= "\n"; $modinfo .= "\n"; } } $modinfo .= "
Module,Crate
$col:$content
\n"; }else{ $modinfo = "

Error: bad result from \"$query\"

"; } } ?> Hall-D Translation Table Channel Viewer

$subtitle" ?>