', "\n";
echo '| ', _('Cable')," | ", $cable->cablename, " |
\n";
echo '| ', _('Type')," | ", $opt_cabletype[$cable->cabletype], " |
\n";
echo '| ', _('Techname')," | ", $opt_techname[$cable->techname], " |
\n";
echo '| ', _('Length')," | ", format_float($cable->length, 1, 'm'), " |
\n";
echo '| ', _('Conductors')," | ", $cable->conductors, " |
\n";
echo '| ', _('Diameter')," | ", format_float($cable->diameter, 1, 'mm'), " |
\n";
echo '| ', _('Cross section')," | ", format_float($cable->xsection, 1, 'mm²'), " |
\n";
echo '| ', _('Weight')," | ", format_float($cable->weight, 2, 'kg/m'), " |
\n";
echo '| ', _('Color')," | ", format_color($cable->color), " |
\n";
echo '| ', _('Condition')," | ", $opt_cablecond[$cable->cablecond], " |
\n";
echo "| ", _('Remarks'), " | ", h($cable->remarks, br:true), " |
\n";
echo "
\n";
form_view_buttons($g_scriptname, $id);
elseif ($action == ACT_EDIT):
// ========== VARIANT: edit single record =====================================
$sql = "SELECT cablename, cabletype, techname, length, conductors, diameter, xsection,"
. " weight, color, supplier, manufacturer, cablecond, remarks "
. "FROM cable "
. "WHERE cableid=?";
$sth = $pdo->prepare($sql);
$sth->execute([$id]);
$cable = $sth->fetch(PDO::FETCH_OBJ);
echo '