diff --git a/cable.php b/cable.php index 0ea4f68..7ed2ef6 100644 --- a/cable.php +++ b/cable.php @@ -34,14 +34,16 @@ switch ($submit = form_get_action()) { case 'insert': $description = sanitize($_POST['description']); $color = sanitize($_POST['color']); + $type = sanitize($_POST['cable_type']); $info = sanitize($_POST['info']); $sql = "INSERT INTO cable - (cable_description, cable_color, cable_info) + (cable_description, cable_color, cable_type, cable_info) VALUES - (:description, :color, :info)"; + (:description, :color, :type, :info)"; $sth = $dbh->prepare($sql); $sth->bindValue(':description', $description, PDO::PARAM_STR); $sth->bindValue(':color', $color, PDO::PARAM_STR); + $sth->bindValue(':type', $type, PDO::PARAM_STR); $sth->bindValue(':info', $info, PDO::PARAM_STR); $sth->execute(); $id = $dbh->lastInsertId(); @@ -53,12 +55,14 @@ switch ($submit = form_get_action()) { $color = sanitize($_POST['color']); $length = sanitize($_POST['length']); $type = sanitize($_POST['cable_type']); + $links = sanitize($_POST['links']); $info = sanitize($_POST['info']); $sql = "UPDATE cable SET cable_description=:desc, cable_color=:color, cable_length=:length, cable_type=:type, + cable_links=:links, cable_info=:info WHERE cable_id=:id"; $sth = $dbh->prepare($sql); @@ -67,6 +71,7 @@ switch ($submit = form_get_action()) { $sth->bindValue(':length', $length, PDO::PARAM_INT); $sth->bindValue(':color', $color, PDO::PARAM_STR); $sth->bindValue(':type', $type, PDO::PARAM_STR); + $sth->bindValue(':links', $links, PDO::PARAM_INT); $sth->bindValue(':info', $info, PDO::PARAM_STR); $sth->execute(); $action = ACT_VIEW; diff --git a/lang/de.php b/lang/de.php index a5cf74a..48bc230 100644 --- a/lang/de.php +++ b/lang/de.php @@ -46,7 +46,7 @@ $lang = array( 'lang_submit' => 'Absenden', 'lang_unassigned' => 'Nicht zugeordnet', 'lang_warning' => 'Warnung', - 'lang_description' => 'Beschreibung', + 'lang_description' => 'Bezeichnung', 'lang_empty' => 'leer', 'lang_source' => 'Quelle', 'lang_target' => 'Ziel', diff --git a/tpl/cable.tpl b/tpl/cable.tpl index 11a8440..2164a69 100644 --- a/tpl/cable.tpl +++ b/tpl/cable.tpl @@ -23,29 +23,35 @@ {$lang_cable_type} + + # Links + {$lang_cable_info} {foreach item=cable from=$cables} - + #{$cable.cable_color} {$cable.description} - + {$cable.cable_length} m - + {$cable.cable_type} + + {$cable.cable_links} + {$cable.info} {foreachelse} - + {$lang_cable_none} diff --git a/tpl/cableedit.tpl b/tpl/cableedit.tpl index ae9a7ca..d0c6d80 100644 --- a/tpl/cableedit.tpl +++ b/tpl/cableedit.tpl @@ -55,6 +55,14 @@ {html_options name=cable_type options=$type_options selected=$cable->cable_type} + + + # Links + + + + + {$lang_color} @@ -65,7 +73,7 @@ - {$lang_info} + {$lang_cable_info} diff --git a/tpl/cableview.tpl b/tpl/cableview.tpl index 57c3264..c03715b 100644 --- a/tpl/cableview.tpl +++ b/tpl/cableview.tpl @@ -28,6 +28,14 @@ {$cable->description} + + + {$lang_length} + + + {$cable->cable_length} m + + {$lang_cable_type} @@ -38,10 +46,10 @@ - {$lang_length} + # Links - {$cable->cable_length} m + {$cable->cable_links} diff --git a/tpl/vlan.tpl b/tpl/vlan.tpl index ad122c9..71ed3a9 100644 --- a/tpl/vlan.tpl +++ b/tpl/vlan.tpl @@ -26,7 +26,7 @@ {foreach item=vlan from=$vlans} - + {$vlan.number}