\n"
;
$str = "
\n"
."Cable end | Connected to |
\n"
;
reset($cable_bases);
while(list($key, $val) = each($cable_bases)) {
$str .= ""
."$val[iname] | "
.( $val['base_id'] == "" ? "(not connected) | "
: "$val[base_description] "
. href2($val['base_id'], format_default_id($val['base_id']))
." | as $val[name] | "
)
."
\n";
}
$str .= "
\n";
echo $str;
echo "In:
\n";
print_r($cable_bases);
echo "
\n";
#%# echo "In:
\n";
#%# print_r($cable_in);
#%# echo "
\n";
#%# echo "
out:
\n";
#%# print_r($cable_out);
#%# echo "
\n";
#%#
#%# $in_rows = array();
#%# reset($cable_in);
#%# while( list($key, $val) = each($cable_in)) {
#%# if($val['base_id'] == "")
#%# continue;
#%# $in_rows[] = "
$val[name] at $val[base_description] "
#%# . format_default_id($val['base_id'])
#%# ." | $val[iname] | ";
#%# }
#%# if(count($in_rows) == 0) {
#%# $in_rows[] = "
not connected | ";
#%# }
#%#
#%# $out_rows = array();
#%# reset($cable_out);
#%# while( list($key, $val) = each($cable_out)) {
#%# if($val['base_id'] == "")
#%# continue;
#%# $out_rows[] = "
$val[name] at $val[base_description] "
#%# . format_default_id($val['base_id'])
#%# ." | $val[iname] | ";
#%# }
#%# if(count($out_rows) == 0) {
#%# $out_rows[] = "
not connected | ";
#%# }
#%#
#%# $str = "
\n"
#%# ." Cable in | "
#%# ." Cable out |
\n"
#%# ;
#%# $numrows = max(count($in_rows), count($out_rows));
#%# for($i=0; $i < $numrows; $i++) {
#%# $str .= ""
#%# .($in_rows[$i] != "" ? $in_rows[$i] : " | ")
#%# .($out_rows[$i] != "" ? $out_rows[$i] : " | ")
#%# ."
\n";
#%# }
#%# $str .= "
\n";
#%#
#%# echo $str
#================================================================
# . ($base_sernum ?
# "Installed in "
# ."
\n"
# ."$base_desc "
# . format_default_id($base_sernum)
# .""
# ." on $base_date"
# : "Not installed. "
# )
echo ""
."
\n"
# --------------------------------
."