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 @@