From a183a4725f504754e41ee92c78e403d844603cc0 Mon Sep 17 00:00:00 2001 From: Thomas Hooge Date: Wed, 15 Jul 2026 19:42:55 +0200 Subject: [PATCH] Webgui: filter and pagination working --- .gitignore | 2 + INSTALL | 13 +- README | 5 + db/mariadb.sql | 147 ++- db/minimal.sql | 11 +- db/minimal_en.sql | 26 +- inst_apache.sh | 2 + webgui/cable.php | 305 ++++++ webgui/company.php | 27 +- webgui/config.inc-sample | 3 +- webgui/documents.php | 12 +- webgui/dropdown.php | 11 +- webgui/equipment.php | 15 +- webgui/footer.php | 2 +- webgui/fuse.php | 297 ++++++ webgui/globals.inc | 136 ++- webgui/index.php | 93 +- webgui/inventory.php | 6 +- webgui/lib/svg.inc | 17 + webgui/locale/de_DE.po | 1203 ++++++++++++++---------- webgui/locale/de_DE/LC_MESSAGES/yms.mo | Bin 19316 -> 21416 bytes webgui/login.php | 2 +- webgui/maintenance.php | 26 +- webgui/manual.php | 2 +- webgui/measurement.php | 107 ++- webgui/note.php | 3 +- webgui/projects.php | 42 +- webgui/provisions.php | 4 +- webgui/settings.php | 137 +++ webgui/storage.php | 21 +- webgui/tag.php | 82 +- webgui/task.php | 28 +- ymspass.py | 51 + 33 files changed, 2088 insertions(+), 750 deletions(-) create mode 100644 webgui/cable.php create mode 100644 webgui/fuse.php create mode 100644 webgui/lib/svg.inc create mode 100644 webgui/settings.php create mode 100755 ymspass.py diff --git a/.gitignore b/.gitignore index c9831d1..c0cac9c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ *~ __pycache__/ +compare_* +*.txt diff --git a/INSTALL b/INSTALL index 896b72a..3dd0fa0 100644 --- a/INSTALL +++ b/INSTALL @@ -1,4 +1,4 @@ -YMS Installation +Yacht Management Software (YMS) Installation 1. Install requirements @@ -6,12 +6,12 @@ YMS Installation - MariaDB - Python 3 - python3-bcrypt + - python3-mysqldb - optional - gettext - mupdf-tools for extended pdf file management 1.2 Native GUI -- python3-mysqldb - Python GTK3 - python3-gi - gir1.2-gtk-3.0 @@ -29,7 +29,12 @@ the privileges for accessing and modifying it. CREATE DATABASE yms; -Create database-user for application with minimum necessary rights. +Create system user for native gui. + + CREATE USER 'ymssys'@'localhost' IDENTIFIED BY '********'; + GRANT SELECT, INSERT, UPDATE, DELETE ON yms.* TO 'ymssys'@'localhost'; + +Create database-user for web application with minimum necessary rights. CREATE USER 'ymsweb'@'localhost' IDENTIFIED BY '********'; GRANT SELECT, INSERT, UPDATE, DELETE ON yms.* TO 'ymsweb'@'localhost'; @@ -72,7 +77,7 @@ file. 5.2. Create and edit webgui config file -Rename sample configfile config.php-sample: +Rename sample configfile config.inc-sample: mv config.inc-sample config.inc diff --git a/README b/README index a5e6393..2591208 100644 --- a/README +++ b/README @@ -6,3 +6,8 @@ Use at your own risk! If inserting a new user you have also to insert a setting value to assign boat 0. + +To set your own passwords via console there is a helper script + ymspass.py + +Use it to get an SQL-statement for changing passwords. diff --git a/db/mariadb.sql b/db/mariadb.sql index e2c1ed0..aac3e8d 100644 --- a/db/mariadb.sql +++ b/db/mariadb.sql @@ -3,6 +3,11 @@ /* MariaDB Scheme Version: 1 */ +/* User + userid is signed because nevative values are required for settings + The user table must not be writeable by the webgui user! + */ + CREATE TABLE user ( userid smallint(6) NOT NULL AUTO_INCREMENT, login varchar(20) NOT NULL, @@ -13,7 +18,7 @@ CREATE TABLE user ( language char(2) NOT NULL DEFAULT 'en', PRIMARY KEY (userid), UNIQUE INDEX ix_login (login) -); +) ENGINE=InnoDB; /* Settings E.g. the currently selected boat. Users logged in via the web are allowed @@ -36,11 +41,12 @@ CREATE TABLE settings ( valstr varchar(200) DEFAULT NULL, valint int(10) DEFAULT NULL, PRIMARY KEY (userid, sno) -); +) ENGINE=InnoDB; /* ddid=0 is list of lists, not editable flags: fixed=not deletable, value not changeable - locked=not editable */ + locked=not editable + */ CREATE TABLE dropdown ( ddid tinyint(3) UNSIGNED NOT NULL, ddval tinyint(3) NOT NULL, @@ -50,13 +56,14 @@ CREATE TABLE dropdown ( color char(6) DEFAULT NULL, flags enum('locked','fixed') DEFAULT NULL, PRIMARY KEY (ddid, ddval) -); +) ENGINE=InnoDB; CREATE TABLE vessel ( - vid smallint(10) NOT NULL AUTO_INCREMENT, + vid smallint(6) NOT NULL AUTO_INCREMENT, vtype enum('mono','cat','tri') NOT NULL DEFAULT 'mono', vesselname varchar(40) NOT NULL, model varchar(20) DEFAULT NULL, + shipyard smallint(6) DEFAULT NULL, loa float(4,2) UNSIGNED DEFAULT NULL, lwl float(4,2) UNSIGNED DEFAULT NULL, beam float(4,2) UNSIGNED DEFAULT NULL, @@ -69,10 +76,10 @@ CREATE TABLE vessel ( shapefile varchar(40) DEFAULT NULL, remarks varchar(150) DEFAULT NULL, PRIMARY KEY (vid) -); +) ENGINE=InnoDB; CREATE TABLE storage ( - sid smallint(6) NOT NULL AUTO_INCREMENT, + sid smallint(6) UNSIGNED NOT NULL AUTO_INCREMENT, vid smallint(6) NOT NULL DEFAULT 1, sname varchar(40) NOT NULL, stype tinyint(3) NOT NULL DEFAULT 0, @@ -88,34 +95,31 @@ CREATE TABLE storage ( color char(6) DEFAULT NULL, remarks varchar(150) DEFAULT NULL, PRIMARY KEY (sid) -); - -/* TODO define cabins? CREATE TABLE cabin ... */ - +) ENGINE=InnoDB; CREATE TABLE tag ( - tagid smallint(6) NOT NULL AUTO_INCREMENT, + tagid smallint(6) UNSIGNED NOT NULL AUTO_INCREMENT, tagname varchar(20) NOT NULL, color char(6) DEFAULT NULL, description varchar(80) DEFAULT NULL, PRIMARY KEY (tagid), UNIQUE INDEX ix_tagname (tagname) -); +) ENGINE=InnoDB; CREATE TABLE tagref ( - tagid smallint(6) NOT NULL, - objid smallint(6) NOT NULL, + tagid smallint(6) UNSIGNED NOT NULL, + objid int(10) UNSIGNED NOT NULL, objtype enum('equip','inv','prov','doc', 'proj', 'task', 'maint') NOT NULL, PRIMARY KEY (tagid, objid, objtype) -); +) ENGINE=InnoDB; /* TODO Boxes can be nested via parent TODO boxsize: (LxWxH) in cm? */ CREATE TABLE box ( - boxid smallint(6) NOT NULL AUTO_INCREMENT, - sid smallint(6) NOT NULL, + boxid smallint(6) UNSIGNED NOT NULL AUTO_INCREMENT, + sid smallint(6) UNSIGNED NOT NULL, boxtype tinyint(3) DEFAULT NULL, - parent int(10) DEFAULT NULL, + parent smallint(6) UNSIGNED DEFAULT NULL, label varchar(20) DEFAULT NULL, color char(6) DEFAULT NULL, content varchar(60) DEFAULT NULL, @@ -123,33 +127,33 @@ CREATE TABLE box ( remarks varchar(150) DEFAULT NULL, PRIMARY KEY (boxid), INDEX ix_label (label) -); +) ENGINE=InnoDB; CREATE TABLE equipment ( - eid smallint(6) NOT NULL AUTO_INCREMENT, + eid smallint(6) UNSIGNED NOT NULL AUTO_INCREMENT, vid smallint(6) NOT NULL DEFAULT 1, ename varchar(80) NOT NULL, shortname varchar(20) DEFAULT NULL, model varchar(40), ecat tinyint(3) DEFAULT NULL, - serial varchar(30), + serial varchar(30) DEFAULT NULL, supplier smallint(6) DEFAULT NULL, - manufacturer smallint(6) DEFAULT NULL, // -3: original; -4: own built + manufacturer smallint(6) DEFAULT NULL, -- -1: unknown; -3: own built purchdate date DEFAULT NULL, price decimal(12,2) DEFAULT NULL, weight float(5,2) UNSIGNED DEFAULT NULL, remarks varchar(150) DEFAULT NULL, flags set('ordered','removed','deleted') DEFAULT NULL, PRIMARY KEY(eid) -); +) ENGINE=InnoDB; CREATE TABLE inventory ( - invid int(10) NOT NULL AUTO_INCREMENT, + invid int(10) UNSIGNED NOT NULL AUTO_INCREMENT, invname varchar(80) NOT NULL, conttype enum('storage','box') NOT NULL DEFAULT 'storage', - sid smallint(6) NOT NULL DEFAULT 1, - boxid smallint(6) NOT NULL DEFAULT 1, - eid smallint(6) DEFAULT NULL, + sid smallint(6) UNSIGNED NOT NULL DEFAULT 1, + boxid smallint(6) UNSIGNED NOT NULL DEFAULT 1, + eid smallint(6) UNSIGNED DEFAULT NULL, number smallint(6) UNSIGNED NOT NULL DEFAULT 1, weight float(5,2) UNSIGNED DEFAULT NULL, price decimal(12,2) DEFAULT NULL, @@ -158,30 +162,64 @@ CREATE TABLE inventory ( remarks varchar(150) DEFAULT NULL, PRIMARY KEY (invid), INDEX ix_invname (invname) -); +) ENGINE=InnoDB; + +CREATE TABLE cable ( + cableid smallint(6) UNSIGNED NOT NULL AUTO_INCREMENT, + vid smallint(6) NOT NULL DEFAULT 1, + cablename varchar(80) NOT NULL, + cabletype varchar(40) DEFAULT NULL, -- e.g. H07RN-F + length float(5,2) UNSIGNED NOT NULL DEFAULT 0, -- total length in m + conductors TINYINT(3) UNSIGNED NOT NULL DEFAULT 1, + diameter float(5,2) UNSIGNED DEFAULT NULL, -- outer diameter in mm + xsection float(5,2) UNSIGNED DEFAULT NULL, -- cross section in mm² + weight float(5,2) UNSIGNED DEFAULT NULL, -- kg/meter + color char(6) DEFAULT NULL, + supplier smallint(6) DEFAULT NULL, + manufacturer smallint(6) DEFAULT NULL, + cablecond enum('unknown','new','good','normal','bad','repairable','defect') NOT NULL default 'unknown', + remarks varchar(150) DEFAULT NULL, + PRIMARY KEY (cableid), + INDEX ix_cablename (vid, cablename) +) ENGINE=InnoDB; + +CREATE table fuse ( + fuseid smallint(6) UNSIGNED NOT NULL AUTO_INCREMENT, + vid smallint(6) NOT NULL DEFAULT 1, + fnumber smallint(6) NOT NULL, + ftype tinyint(3) DEFAULT 0, -- from dropdown id 7 + current float(5,2) UNSIGNED NOT NULL, -- in A + cableid smallint(6) UNSIGNED DEFAULT NULL, + eid smallint(6) UNSIGNED DEFAULT NULL, + location tinyint(3) DEFAULT 0, -- from dropdown id 10 + description varchar(60) DEFAULT NULL, + remarks varchar(150) DEFAULT NULL, + PRIMARY KEY (fuseid), + UNIQUE INDEX ix_fusenumber (vid, fnumber) +) ENGINE=InnoDB; CREATE TABLE measurement ( mid smallint(6) NOT NULL AUTO_INCREMENT, - mtype enum('generic','cable','fuse') NOT NULL default 'generic', mname varchar(80) NOT NULL, + vid smallint(6) NOT NULL DEFAULT 1, nval tinyint(1) UNSIGNED NOT NULL DEFAULT 1, val1 int(10) NOT NULL, - val2 int(10) NOT NULL, - val3 int(10) NOT NULL, + val2 int(10) DEFAULT NULL, + val3 int(10) DEFAULT NULL, unit tinyint(3) NOT NULL DEFAULT 1, accuracy enum('unknown','precise','normal','rough','estimated') NOT NULL DEFAULT 'unknown', mdate date DEFAULT NULL, note varchar(80) DEFAULT NULL, - eid smallint(6) DEFAULT NULL, + eid smallint(6) UNSIGNED DEFAULT NULL, PRIMARY KEY (mid) -); +) ENGINE=InnoDB; CREATE TABLE provisions ( provid int(10) NOT NULL AUTO_INCREMENT, provname varchar(40) NOT NULL, provcat tinyint(3) DEFAULT NULL, - sid smallint(6) DEFAULT NULL, - boxid smallint(6) NOT NULL DEFAULT 1, + sid smallint(6) UNSIGNED DEFAULT NULL, + boxid smallint(6) UNSIGNED NOT NULL DEFAULT 1, number smallint(6) UNSIGNED NOT NULL DEFAULT 1, weight float(5,2) UNSIGNED DEFAULT NULL, weight_net float(5,2) UNSIGNED DEFAULT NULL, @@ -189,8 +227,13 @@ CREATE TABLE provisions ( storedate date DEFAULT CURRENT_DATE, shelflife date DEFAULT NULL, PRIMARY KEY (provid) -); +) ENGINE=InnoDB; +/* TODO + - distinction between + docdate - e.g. invoicedate + doctime -> uploadtime +*/ CREATE TABLE document ( docid smallint(6) NOT NULL AUTO_INCREMENT, doctype enum('generic','manual','invoice','drawing','picture') NOT NULL DEFAULT 'generic', @@ -200,6 +243,7 @@ CREATE TABLE document ( hash varchar(32) NOT NULL, docsize int(10) unsigned NOT NULL, doctime datetime DEFAULT NULL, + docdate date DEFAULT NULL, -- e.g. invoice date title varchar(40) DEFAULT NULL, pages smallint(6) unsigned NOT NULL DEFAULT 1, remarks varchar(150) DEFAULT NULL, @@ -224,10 +268,10 @@ CREATE TABLE docref ( CREATE TABLE company ( compid smallint(6) NOT NULL AUTO_INCREMENT, compname varchar(60) NOT NULL, - comptype tinyint(3) NOT NULL DEFAULT 1, - comptype2 tinyint(3) DEFAULT NULL, + comptype tinyint(3) UNSIGNED NOT NULL DEFAULT 1, + comptype2 tinyint(3) UNSIGNED DEFAULT NULL, shortname varchar(20) DEFAULT NULL, - street varchar(30), + street varchar(40), zip varchar(10), city varchar(30), country varchar(30), @@ -240,20 +284,19 @@ CREATE TABLE company ( remarks varchar(150) DEFAULT NULL, PRIMARY KEY (compid), UNIQUE INDEX ix_compname (compname, comptype) -); - +) ENGINE=InnoDB; /* TODO optional field: plan date, target date, completion date */ CREATE TABLE maintenance ( maintid int(10) NOT NULL AUTO_INCREMENT, vid smallint(6) NOT NULL DEFAULT 1, - eid smallint(6) DEFAULT NULL, + eid smallint(6) UNSIGNED DEFAULT NULL, series smallint(6) DEFAULT NULL, activities varchar(40) NOT NULL, remarks varchar(150) DEFAULT NULL, maintstate enum('new','planned','ongoing','done') NOT NULL DEFAULT 'new', PRIMARY KEY (maintid) -); +) ENGINE=InnoDB; /* TODO? time recording */ @@ -269,7 +312,7 @@ CREATE TABLE project ( remarks varchar(150) DEFAULT NULL, projstate enum('new','plan','ongoing','paused','finished') NOT NULL DEFAULT 'new', PRIMARY KEY (projid) -); +) ENGINE=InnoDB; CREATE TABLE task ( taskid int(10) NOT NULL AUTO_INCREMENT, @@ -286,16 +329,16 @@ CREATE TABLE task ( responsible smallint(6) NOT NULL, /* TODO executed_by : company or user? or both? */ PRIMARY KEY (taskid) -); +) ENGINE=InnoDB; -// Notes can be assigned to tasks,maintenances and equipment +/* Notes can be assigned to tasks,maintenances and equipment */ CREATE TABLE note ( noteid int(10) NOT NULL AUTO_INCREMENT, notetype enum('task','maint','equip') NOT NULL DEFAULT 'task', refid smallint(6) NOT NULL, annotation text NOT NULL, PRIMARY KEY (noteid) -); +) ENGINE=InnoDB; CREATE TABLE checklist ( clid smallint(6) NOT NULL AUTO_INCREMENT, @@ -303,7 +346,7 @@ CREATE TABLE checklist ( parent smallint(6) DEFAULT NULL, clstate enum('new','open','closed') NOT NULL DEFAULT 'new', PRIMARY KEY (clid) -); +) ENGINE=InnoDB; CREATE TABLE checkitem ( checkid int(10) NOT NULL AUTO_INCREMENT, @@ -311,17 +354,17 @@ CREATE TABLE checkitem ( groupid tinyint(3) DEFAULT NULL, checkresult enum('unchecked','checked','unused') NOT NULL DEFAULT 'unused', PRIMARY KEY (checkid) -); +) ENGINE=InnoDB; CREATE TABLE checkref ( clid smallint(6) NOT NULL, checkid int(10) NOT NULL, sort smallint(6) DEFAULT NULL, PRIMARY KEY (clid, checkid) -); +) ENGINE=InnoDB; CREATE TABLE checkgroup ( groupid int(10) NOT NULL, title varchar(30) NOT NULL, PRIMARY KEY (groupid) -); +) ENGINE=InnoDB; diff --git a/db/minimal.sql b/db/minimal.sql index 8973133..aa03fda 100644 --- a/db/minimal.sql +++ b/db/minimal.sql @@ -36,6 +36,8 @@ INSERT INTO settings (userid, sno, valstr) VALUES (-1, 108, 'company sorting order'), (-1, 109, 'document sorting order'), (-1, 110, 'tag sorting order'), +(-1, 111, 'cable sorting order'), +(-1, 112, 'fuse sorting order'), (-1, 200, 'equipment filter json'), (-1, 201, 'inventory filter json'), (-1, 202, 'provision filter json'), @@ -46,7 +48,9 @@ INSERT INTO settings (userid, sno, valstr) VALUES (-1, 207, 'measurement filter json'), (-1, 208, 'company filter json'), (-1, 209, 'document filter json'), -(-1, 210, 'tag filter json'); +(-1, 210, 'tag filter json'), +(-1, 211, 'cable filter json'), +(-1, 212, 'fuse filter json'); /* Liste der Listen wird immer benötigt */ INSERT INTO dropdown (ddid, ddval, ddtext) VALUES @@ -59,11 +63,14 @@ INSERT INTO dropdown (ddid, ddval, ddtext) VALUES (0, 6, 'Provianteinheiten'), (0, 7, 'Sicherungstypen'), (0, 8, 'Einheiten'), -(0, 9, 'Kistentypen'); +(0, 9, 'Kistentypen'), +(0, 10, 'Sicherungsblöcke'), -- fuse locations +(0, 11, 'Kabeltypen'); INSERT INTO dropdown (ddid, ddval, ddtext, flags) VALUES (2, 1, 'Lieferant', 'fixed'), (2, 2, 'Hersteller', 'fixed'), +(2, 3, 'Werft', 'fixed'), -- to store yacht manufacturer (2, 9, 'Sonstiges', 'fixed'); INSERT INTO dropdown (ddid, ddval, ddtext, flags) VALUES diff --git a/db/minimal_en.sql b/db/minimal_en.sql index cb81fc4..41ee71f 100644 --- a/db/minimal_en.sql +++ b/db/minimal_en.sql @@ -12,13 +12,19 @@ INSERT INTO user (userid, login, pass, displayname, role) VALUES (1, 'captain', '$2y$10$naVMnC4S6bZ3IakxLJPJK.iSazlkYxVLeiRt9CB/j0jSExQZU1SCK', 'Captain', 'captain'); INSERT INTO settings (userid, sno, valint) VALUES -(0, 0, 1), -- Database schema version -(0, 1, 0), -- No vessel for SYSTEM -(1, 1, 0); -- No vessel for captain +(0, 0, 1), -- Database schema version +(0, 1, 0), -- No vessel assignment to SYSTEM +(1, 1, 0), -- No vessel assignment to user "captain" +(0, 20, 1280), -- Image width limit +(0, 21, 1024); -- Image height limit /* setting descriptions */ INSERT INTO settings (userid, sno, valstr) VALUES (-1, 1, 'vessel id'), +(-1, 2, 'date format'), +(-1, 10, 'rows in table'), +(-1, 20, 'maximum image width'), +(-1, 21, 'maximum image height'), (-1, 100, 'equipment sorting order'), (-1, 101, 'inventory sorting order'), (-1, 102, 'provision sorting order'), @@ -30,6 +36,8 @@ INSERT INTO settings (userid, sno, valstr) VALUES (-1, 108, 'company sorting order'), (-1, 109, 'document sorting order'), (-1, 110, 'tag sorting order'), +(-1, 111, 'cable sorting order'), +(-1, 112, 'fuse sorting order'), (-1, 200, 'equipment filter json'), (-1, 201, 'inventory filter json'), (-1, 202, 'provision filter json'), @@ -40,9 +48,11 @@ INSERT INTO settings (userid, sno, valstr) VALUES (-1, 207, 'measurement filter json'), (-1, 208, 'company filter json'), (-1, 209, 'document filter json'), -(-1, 210, 'tag filter json'); +(-1, 210, 'tag filter json'), +(-1, 211, 'cable filter json'), +(-1, 212, 'fuse filter json'); -/* list of lists needed */ +/* list of lists always needed */ INSERT INTO dropdown (ddid, ddval, ddtext) VALUES (0, 0, 'list of lists'), (0, 1, 'hull type'), @@ -53,12 +63,16 @@ INSERT INTO dropdown (ddid, ddval, ddtext) VALUES (0, 6, 'provision unit'), (0, 7, 'fuse type'), (0, 8 , 'unit'); +(0, 9, 'box types'), +(0.10, 'fuse blocks'), +(0,11, 'cable types'); INSERT INTO dropdown (ddid, ddval, ddtext, flags) VALUES (2, 1, 'Supplier', 'fixed'), (2, 2, 'Manufacturer', 'fixed'), +(2, 3, 'Shipyard', fixed), (2, 9, 'Generic', 'fixed'); INSERT INTO dropdown (ddid, ddval, ddtext, flags) VALUES -(3, 0, 'Generic', 'fixed'), +(3, 0, 'Generic storage', 'fixed'), (3, 1, 'Tank', 'fixed'); diff --git a/inst_apache.sh b/inst_apache.sh index d67791b..c0edf1b 100755 --- a/inst_apache.sh +++ b/inst_apache.sh @@ -6,4 +6,6 @@ mv /var/www/html/config.inc-sample /var/www/html/config.inc chmod 640 /var/www/html/config.inc chgrp www-data /var/www/html/config.inc rm /var/www/html/index.html +rm /var/www/html/README +rm /var/www/html/TODO rm /var/www/html/locale/de_DE.po diff --git a/webgui/cable.php b/webgui/cable.php new file mode 100644 index 0000000..cc4d3a5 --- /dev/null +++ b/webgui/cable.php @@ -0,0 +1,305 @@ +Add(_('Delete prohibited, invalid security token!')); + $action = ACT_VIEW; + break; + } + // TODO + $action = ACT_DEFAULT; + break; + + default: + $g_error->Add(sprintf(_('Unknown function!'), $submit)); + $valid = FALSE; + +} + +// ========== ACTIONS END ===================================================== + +require 'header.php'; + +// ========== PAGE CONTENT ==================================================== + +if ($action == ACT_DEFAULT): +// ========== VARIANT: default behavior ======================================= + +// load filter from db +$flt = db_get_filter($user->id, 211); + +echo "

$pagetitle

\n"; + +// Filter +?> +
+
+
Filter
+
+
+ + +
+
+ +
+
+query($sql); +$res = $sth->fetchAll(); +echo '', "\n"; +echo "\n"; +echo "\n"; +echo ''; +echo '"; +echo '"; +echo '"; +echo '"; +echo '"; +echo '"; +echo '"; +echo ""; +echo "\n"; +echo "\n"; +$i = 0; +foreach ($res as $row) { + $i++; // record number + echo "\n"; + echo '\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; +} +// Table summary +echo "\n"; +echo '', "\n"; +echo "\n"; +echo "
#', _('Cable'), "', _('Name'), "', _('Conductors'), "', _('Length'), "', _('Cross section'), "', _('Color'), "', _('Condition'), "
', $i; + echo '', "\n"; + echo "", $row['cableid'], "", $row['cablename'], "", $row['conductors'], "", $row['length'], "m", $row['xsection'], "mm²", format_color($row['color']), "", $row['condition'], ""; + echo '', "\n"; + echo "
', sprintf(_('%d records'), count($res)), '
\n"; + +form_add_button($g_scriptname); + +elseif ($action == ACT_ADD): +// ========== VARIANT: add record ============================================= + +echo '

', _('Add Cable'), "

\n"; + +?> +
+
+ + +
+
+ + +
+ +
+ + +
+
+ + +
+\n"; + +elseif ($action == ACT_VIEW): +// ========== VARIANT: view single record ===================================== + +$sql = "SELECT cablename, cabletype, 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 '

', _('View cable'), "

\n"; + +echo '', "\n"; +echo '\n"; +echo '\n"; +echo '\n"; +echo '\n"; +echo '\n"; +echo '\n"; +echo '\n"; +echo '\n"; +echo '\n"; +echo "\n"; +echo "
', _('Cable'),"", $cable->cablename, "
', _('Type'),"", $opt_cabletype[$cable->cabletype], "
', _('Length'),"", format_float($cable->length, 1, 'm'), "
', _('Conductors'),"", $cable->conductors, "
', _('Diameter'),"", format_float($cable->diameter, 1, 'mm'), "
', _('Cross section'),"", format_float($cable->xsection, 1, 'mm²'), "
', _('Weight'),"", format_float($cable->weight, 2, 'kg/m'), "
', _('Color'),"", format_color($cable->color), "
', _('Condition'),"", $opt_cablecond[$cable->cablecond], "
", _('Remarks'), "", nl2br($cable->remarks), "
\n"; + +form_view_buttons($g_scriptname, $id); + +elseif ($action == ACT_EDIT): +// ========== VARIANT: edit single record ===================================== + +$sql = "SELECT cablename, cabletype, 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 '

', _('Edit cable'), "

\n"; +?> + + +
+ + +
+cabletype); +?> +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+cablecond); +?> +
+ + +
+\n"; + +elseif ($action == ACT_DELETE): +// ========== VARIANT: delete record ========================================== + +echo '

', _('Delete cable'), "

\n"; + +$sql = "SELECT objid, objtype FROM tagref WHERE tagid=?"; +$sth = $pdo->prepare($sql); +$sth->execute([$id]); +if ($sth->rowCount() > 0) { + foreach ($sth->fetchAll() as $row) { + echo '', $row['objid'], '/', $row['objtype'], "\n"; + } +} else { + echo _('Tag is not used anywhere'); + $_SESSION['token'] = bin2hex(random_bytes(8)); + form_delete_buttons($g_scriptname, $id, $_SESSION['token']); +} + +else: +// ========== ERROR UNKNOWN VARIANT =========================================== + +echo '

', _('Unknown function call: Please report to system development!'), "

\n"; + +endif; // $action == ... +// ========== END OF VARIANTS ================================================= + +include 'footer.php'; diff --git a/webgui/company.php b/webgui/company.php index bbcbf49..e032298 100644 --- a/webgui/company.php +++ b/webgui/company.php @@ -51,7 +51,8 @@ switch ($submit = form_get_action()) { $p[':shortname'] = gpc_get_string($_POST, 'shortname', 20); $p[':comptype'] = gpc_get_int($_POST, 'comptype'); $p[':comptype2'] = gpc_get_int($_POST, 'comptype2'); - $p[':street'] = gpc_get_string($_POST, 'street', 30); + if ($p[':comptype2'] <= 0) $p[':comptype2'] = NULL; + $p[':street'] = gpc_get_string($_POST, 'street', 40); $p[':zip'] = gpc_get_string($_POST, 'zip', 10); $p[':city'] = gpc_get_string($_POST, 'city', 30); $p[':country'] = gpc_get_string($_POST, 'country', 30); @@ -98,7 +99,7 @@ if ($action == ACT_DEFAULT): page_caption_search($pagetitle); // load filter from db -$flt = db_get_filter($user->id, 208); +$flt = db_get_filter($user->id, 208, ['type','txt']); $w = array(); $p = array(); @@ -132,7 +133,7 @@ try { } $numrows = $sth->fetchColumn(); $page = gpc_get_int($_REQUEST, 'p', 1); -$rows_pp = gpc_get_int($_REQUEST, 'n', $g_rows_pp); +$rows_pp = gpc_get_int($_REQUEST, 'n', $user->rows_pp); $lastpage = ceil($numrows/$rows_pp); $sql = "SELECT compid, compname, comptype, remarks " @@ -141,7 +142,7 @@ if ($where) $sql .= ' WHERE ' . $where; $sql .= $order; // if pagination: -$sql .= ' LIMIT ' . ($page - 1) * $g_rows_pp . ',' . $g_rows_pp; +$sql .= ' LIMIT ' . ($page - 1) * $rows_pp . ',' . $rows_pp; $sth = $pdo->prepare($sql); try { @@ -161,9 +162,10 @@ $opt_special = array(
Filter
-
+
+
- $v) { echo '
+
+ + +
+
+
diff --git a/webgui/config.inc-sample b/webgui/config.inc-sample index 1d4d5ac..5a8f172 100644 --- a/webgui/config.inc-sample +++ b/webgui/config.inc-sample @@ -1,7 +1,7 @@ id, 209); +$flt = db_get_filter($user->id, 209, ['doctype','reftype','txt']); // $w = array('(vid=:vid OR vid IS NULL)'); // $p = array(':vid' => $user->vid); @@ -289,7 +289,7 @@ try { } $numrows = $sth->fetchColumn(); $page = gpc_get_int($_REQUEST, 'p', 1); -$rows_pp = gpc_get_int($_REQUEST, 'n', $g_rows_pp); +$rows_pp = gpc_get_int($_REQUEST, 'n', $user->rows_pp); $lastpage = ceil($numrows/$rows_pp); $sql = "SELECT d.docid, d.doctype, d.filename, d.title, COUNT(r.drid) AS refcount " @@ -299,7 +299,7 @@ $sql .= " GROUP BY d.docid, d.doctype, d.filename, d.title"; if ($order) $sql .= $order; // if pagination: -$sql .= ' LIMIT ' . ($page - 1) * $g_rows_pp . ',' . $g_rows_pp; +$sql .= ' LIMIT ' . ($page - 1) * $rows_pp . ',' . $rows_pp; $sth = $pdo->prepare($sql); $sth->execute($p); @@ -635,7 +635,7 @@ foreach ($sth->fetchAll() as $row) { - $v) { echo '\n"; @@ -665,7 +665,7 @@ foreach ($sth->fetchAll() as $row) { - $v) { echo '\n"; @@ -691,7 +691,7 @@ foreach ($sth->fetchAll() as $row) { - $v) { echo '\n"; diff --git a/webgui/dropdown.php b/webgui/dropdown.php index 68d262f..ae7b8db 100644 --- a/webgui/dropdown.php +++ b/webgui/dropdown.php @@ -148,14 +148,19 @@ echo ''; echo '#'; echo '', _('Description'),''; echo '', _('Number'),''; -echo ''; +echo ''; echo ''; echo ''; foreach ($sth->fetchAll() as $row) { - echo '', $row['ddval'],''; + echo '', $row['ddval']; + echo ''; + echo ''; echo '', $row['ddtext'], ''; echo '', $num[$row['ddval']] ?? 0, ''; - form_action_buttons($g_scriptname, $row['ddval']); + // form_action_buttons($g_scriptname, $row['ddval']); + echo ""; + echo ''; + echo "\n"; echo "\n"; } echo "\n"; diff --git a/webgui/equipment.php b/webgui/equipment.php index b8c9682..9e4d269 100644 --- a/webgui/equipment.php +++ b/webgui/equipment.php @@ -14,8 +14,8 @@ $pagetitle = _('Equipment'); $id = gpc_get_int($_REQUEST, 'id', 0); -$opt_supplier = db_get_opt_supp(array(-1 => _('--- unknown ---'))); -$opt_manufacturer = db_get_opt_manuf(array(-1 => _('--- unknown ---'))); +$opt_supplier = db_get_opt_supp($g_opt_unknown); +$opt_manufacturer = db_get_opt_manuf($g_opt_unknown); $opt_ecat = db_get_options(4); // Equipment categories $opt_unit = db_get_options(8); @@ -232,7 +232,7 @@ if ($action == ACT_DEFAULT): page_caption_search($pagetitle); -$flt = db_get_filter($user->id, 200); +$flt = db_get_filter($user->id, 200, ['cat','manuf','supp','txt','flags']); $sort = array( 1 => 'ename', 2 => 'ename DESC' @@ -288,10 +288,9 @@ try { $g_error->PrintOut(); } $numrows = $sth->fetchColumn(); -$lastpage = ceil($numrows/$g_rows_pp); $page = gpc_get_int($_REQUEST, 'p', 1); -// TODO check against allowed values for rows per page -$rows_pp = gpc_get_int($_REQUEST, 'n', $g_rows_pp); +$rows_pp = gpc_get_int($_REQUEST, 'n', $user->rows_pp); +$lastpage = ceil($numrows/$rows_pp); $sql = "SELECT eid, ename, manufacturer, model, serial, remarks, flags," . " TIMESTAMPDIFF(MONTH, purchdate, NOW()) AS age_mon " @@ -464,7 +463,7 @@ echo "\n"; echo '
'; // Column break echo '
', "\n"; -echo '
', "\n"; +echo '
', "\n"; echo '
', _('Images and documents'), "
\n"; echo '
', "\n"; @@ -669,7 +668,7 @@ $equipment = $sth->fetch(PDO::FETCH_OBJ);
supplier); -form_create_select('category', _('Category'), [-1 => _('--- unknown ---')] + $opt_ecat, $equipment->ecat); +form_create_select('category', _('Category'), $g_opt_unknown + $opt_ecat, $equipment->ecat); ?>
diff --git a/webgui/footer.php b/webgui/footer.php index b00c536..848f9da 100644 --- a/webgui/footer.php +++ b/webgui/footer.php @@ -1,5 +1,5 @@
-

Prototyp YMS v0.1

+

Prototyp YMS

diff --git a/webgui/fuse.php b/webgui/fuse.php new file mode 100644 index 0000000..0715755 --- /dev/null +++ b/webgui/fuse.php @@ -0,0 +1,297 @@ +vid; + $p[':fnumber'] = gpc_get_int($_POST, 'fnumber');; + $p[':ftype'] = gpc_get_int($_POST, 'ftype');; + $p[':current'] = gpc_get_int($_POST, 'current');; + $p[':location'] = gpc_get_int($_POST, 'location');; + $p[':description'] = gpc_get_string($_POST, 'description'); + $id = db_exec_insert('fuse', $p); + $action = ACT_VIEW; + break; + + case 'update': + $p[':fuseid'] = $id; + $p[':fnumber'] = gpc_get_string($_POST, 'fuseid'); + $p[':current'] = gpc_get_float($_POST, 'current'); + $p[':cableid'] = gpc_get_int($_POST, 'cableid'); + $p[':eid'] = gpc_get_int($_POST, 'id'); + $p[':weight'] = min(gpc_get_float($_POST, 'weight'), 9.99); // limit max value + $p[':location'] = gpc_get_int($_POST, 'location'); + $p[':description'] = gpc_get_string($_POST, 'description'); + $p[':remarks'] = gpc_get_string($_POST, 'remarks'); + db_exec_update('tag', $p, 'tagid'); + $action = ACT_VIEW; + break; + + case 'delete': + // Security token needed! + if (gpc_get_string($_POST, 'token', 16) != $_SESSION['token']) { + $g_error->Add(_('Delete prohibited, invalid security token!')); + $action = ACT_VIEW; + break; + } + // tagref have to be empty + // TODO + $action = ACT_DEFAULT; + break; + + + default: + $g_error->Add(sprintf(_('Unknown function!'), $submit)); + $valid = FALSE; + +} + +// ========== ACTIONS END ===================================================== + +require 'header.php'; + +// ========== PAGE CONTENT ==================================================== + +if ($action == ACT_DEFAULT): +// ========== VARIANT: default behavior ======================================= + +// lookup tables +$opt_ftype_short = db_get_options(7, '', true); + +// load filter from db +$flt = db_get_filter($user->id, 212); + +$w = array('vid=:vid'); +$p = array(':vid' => $user->vid); + +if ($flt->location == -1) { + $w[] = 'location IS NULL'; +} elseif ($flt->location > 0) { + $w[] = 'location=:location'; + $p[':location'] = $flt->location; +} +if (strlen($flt->txt) > 1) { + $w[] = 'description LIKE :txt'; + $p[':txt'] = '%'.$flt->txt.'%'; +} +$where = join(' AND ', $w); +$order = ' ORDER BY fnumber'; + +echo "

$pagetitle

\n"; + +// Filter +?> +
+
+
Filter
+
+location); +?> +
+ + +
+
+ +
+
+prepare($sql); +$sth->execute($p); +$res = $sth->fetchAll(); + +echo '', "\n"; +echo "\n"; +echo "\n"; +echo ''; +echo '"; +echo '"; +echo '"; +echo '"; +echo '"; +echo ""; +echo "\n"; +echo "\n"; +$i = 1; +foreach ($res as $row) { + echo "\n"; + echo '\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + // Edit current record button + echo "\n"; + echo "\n"; +} +// Table summary +echo "\n"; +echo '', "\n"; +echo "\n"; +echo "
#', pgettext('number', 'Number'), "', _('Type'), "', _('Current'), "', _('Location'), "', _('Description'), "
', $i++; + echo '', "\n"; + echo "F", $row['fnumber'], "",$opt_ftype_short[$row['ftype']], "", $row['current'], "A", $opt_location[$row['location']], "", $row['description'], ""; + echo '', "\n"; + echo "
', sprintf(_('%d records'), count($res)), '
\n"; + +form_add_button($g_scriptname); + +elseif ($action == ACT_ADD): +// ========== VARIANT: add record ============================================= + +echo '

', _('Add fuse'), "

\n"; + +// calc next free fuse number for convenience +$sql = "SELECT max(fnumber) FROM fuse WHERE vid=?"; +$sth = $pdo->prepare($sql); +$sth->execute([$user->vid]); +$fnumber = $sth->fetchColumn() + 1; + +?> +
+
+ + +
+
+ + +
+ +
+ + +
+ +\n"; + +elseif ($action == ACT_VIEW): +// ========== VARIANT: view single record ===================================== + +$sql = "SELECT fnumber, ftype, current, cableid, eid, location, description, remarks " + . "FROM fuse " + . "WHERE fuseid=?"; +$sth = $pdo->prepare($sql); +$sth->execute([$id]); +$fuse = $sth->fetch(PDO::FETCH_OBJ); + +echo '

', _('View fuse'), "

\n"; + +echo '', "\n"; +echo '\n"; +echo '\n"; +echo '\n"; +echo '\n"; +echo '\n"; +echo '\n"; +echo '\n"; +echo '\n"; +echo "
', _('Fuse'),"F", $fuse->fnumber, "
', _('Description'),"", $fuse->description, "
', _('Type'),"", $opt_ftype[$fuse->ftype], "
', _('Current'),"", $fuse->current, "A
', _('Location'),"", $opt_location[$fuse->location], "
', _('Cable'),"", $fuse->cableid, "
', _('Equipment'),"", $fuse->eid, "
', _('Remarks'),"", nl2br($fuse->remarks), "
\n"; + +form_view_buttons($g_scriptname, $id); + +elseif ($action == ACT_EDIT): +// ========== VARIANT: edit single record ===================================== + +$sql = "SELECT fnumber, description " + . "FROM fuse " + . "WHERE fuseid=?"; +$sth = $pdo->prepare($sql); +$sth->execute([$id]); +$fuse = $sth->fetch(PDO::FETCH_OBJ); + +echo '

', _('Edit fuse'), "

\n"; +?> + + +
+ + +
+
+ + +
+\n"; + +elseif ($action == ACT_DELETE): +// ========== VARIANT: delete record ========================================== + +echo '

', _('Delete fuse'), "

\n"; + +$sql = "SELECT fusename, description FROM fuse WHERE fuseid=?"; +$sth = $pdo->prepare($sql); +$sth->execute([$id]); +if ($sth->rowCount() > 0) { + foreach ($sth->fetchAll() as $row) { + echo '', $row['objid'], '/', $row['objtype'], "\n"; + } +} else { + echo _('Fuse is not used anywhere'); + $_SESSION['token'] = bin2hex(random_bytes(8)); + form_delete_buttons($g_scriptname, $id, $_SESSION['token']); +} + +else: +// ========== ERROR UNKNOWN VARIANT =========================================== + +echo '

', _('Unknown function call: Please report to system development!'), "

\n"; + +endif; // $action == ... +// ========== END OF VARIANTS ================================================= + +include 'footer.php'; diff --git a/webgui/globals.inc b/webgui/globals.inc index 9f497fe..d4ec8e4 100644 --- a/webgui/globals.inc +++ b/webgui/globals.inc @@ -41,6 +41,9 @@ define ('ACT_VIEW_LIST', 13); // ========== PAGE START CODE ================================================= +// global version string +$g_version = 'v0.1.1'; + $g_scriptname = basename($_SERVER['SCRIPT_NAME']); require 'config.inc'; @@ -113,6 +116,7 @@ $user = User::GetInstance(); // There can be only one if ($g_scriptname != 'login.php') { $user->init_from_session(); $user->load_vessel(); + $user->load_settings(); } $action = NULL; @@ -124,6 +128,7 @@ $g_doc_mimetypes = ['image/png', 'image/jpeg', 'image/svg+xml', 'application/pdf // form option lists $g_opt_all = array(-2 => _('― all ―')); $g_opt_none = array(-1 => _('― none ―')); +$g_opt_unknown = array(-1 => _('― unknown ―')); // Initialize message system $g_message = new Message; @@ -227,13 +232,18 @@ class User { public $flags; public $vid; // current selected vessel public $vessel; // name of current vessel + public $datefmt; + public $rows_pp; private function __construct() { + global $g_rows_pp; $this->loggedin = FALSE; $this->errormessage = NULL; $this->flags = []; $this->vid = 1; $this->vessel = 'Yacht'; + $this->datefmt = 'Y-m-d'; + $this->rows_pp = $g_rows_pp; } public static function getInstance() { @@ -300,10 +310,10 @@ class User { $sth = $pdo->prepare($sql); $sth->execute([$this->id]); $row = $sth->fetch(); - $this->displayname = $row['displayname']; - $this->role = $row['role']; - //$this->displayname = $sth->fetchColumn(); - + if ($row) { + $this->displayname = $row['displayname']; + $this->role = $row['role']; + } } function load_vessel() { @@ -314,8 +324,31 @@ class User { $sth = $pdo->prepare($sql); $sth->execute([$this->id]); $row = $sth->fetch(); - $this->vid = $row['vid']; - $this->vessel = $row['vesselname']; + if ($row) { + $this->vid = $row['vid']; + $this->vessel = $row['vesselname']; + } + } + + function load_settings() { + global $pdo; + // additional user settings + // date format from user settings + $sql = "SELECT valstr FROM settings WHERE userid=? AND sno=2"; + $sth = $pdo->prepare($sql); + $sth->execute([$this->id]); + $user_datefmt = $sth->fetchColumn(); + if ($user_datefmt) { + $this->datefmt = $user_datefmt; + } + // pagination rows from user settings + $sql = "SELECT valint FROM settings WHERE userid=? AND sno=10"; + $sth = $pdo->prepare($sql); + $sth->execute([$this->id]); + $user_rows_pp = $sth->fetchColumn(); + if ($user_rows_pp) { + $this->rows_pp = $user_rows_pp; + } } function get_last_error() { @@ -643,6 +676,46 @@ function db_save_taglist($objtype, $objid, $taglist) { } } +function db_get_tag_target($objtype, $objid) { + // get page name and desctiption e.g. for link creation + global $pdo; + global $g_error; + switch ($objtype) { + case 'equip': + $sql = "SELECT ename FROM equipment WHERE eid=?"; + $target = "equipment.php"; + break; + case 'inv': + $sql = "SELECT invname FROM inventory WHERE invid=?"; + $target = "inventory.php"; + break; + case 'prov': + $sql = "SELECT provname FROM provisions WHERE provvid=?"; + $target = "provisions.php"; + break; + case 'doc': + $sql = "SELECT title FROM document WHERE docid=?"; + $target = "documents.php"; + break; + case 'proj': + $sql = "SELECT projname FROM project WHERE projid=?"; + $target = "projects.php"; + break; + case 'task': + $sql = "SELECT taskname FROM task WHERE taskid=?"; + $target = "task.php"; + break; + case 'maint': + $sql = "SELECT activities FROM maintenance WHERE maintid=?"; + $target = 'maintenance.php'; + break; + } + $sth = $pdo->prepare($sql); + $sth->execute([$objid]); + $desc = $sth->fetchColumn(); + return [$target, $desc]; +} + function db_get_ddtext($ddid, $ddval) { // returns single value for dropdown global $pdo; @@ -660,14 +733,20 @@ function db_get_ddtext($ddid, $ddval) { // Functions to get option lists (key/value) -function db_get_options($ddid, $orderby = '', $default = NULL) { +function db_get_options($ddid, $orderby = '', $short = False, $default = NULL) { // returns list for dropdown + // if short is set the short value will be returned global $pdo; $list = array(); if ($default != NULL) { $list[0] = $default; } - $sql = "SELECT ddval, ddtext FROM dropdown WHERE ddid=?"; + if ($short) { + $sql = "SELECT ddval, ddshort"; + } else { + $sql = "SELECT ddval, ddtext"; + } + $sql .= " FROM dropdown WHERE ddid=?"; if ($orderby == 'ddtext') { $sql .= ' ORDER BY ddtext'; } elseif ($orderby == 'sort') { @@ -819,7 +898,8 @@ function db_get_opt_proj($vid, $default=NULL) { return $list; } -function db_get_filter($user, $sno) { +function db_get_filter($user, $sno, $fields = []) { + // if fields supplied empting missing field are created global $pdo; global $g_warning; $flt = new stdClass(); @@ -827,15 +907,22 @@ function db_get_filter($user, $sno) { try { $sth->execute([$user, $sno]); $json = $sth->fetchColumn(); - if (!$json) { + if ($json === false) { // no settings record. create empty one for later updates $sth = $pdo->prepare("INSERT INTO settings (userid, sno, valstr) VALUES (?, ?, '{}')"); $sth->execute([$user, $sno]); } else { $flt = json_decode($json); } + // create missing fields + foreach ($fields as $f) { + if (!property_exists($flt, $f)) { + $flt->$f = null; + } + } } catch (PDOexception $e) { $g_warning->Add('SQL-Error: '. $e->getMessage()); + $g_warning->PrintOut(); } return $flt; } @@ -1155,7 +1242,7 @@ function get_color_brightness($color, $default=0.5) { function page_caption_search($caption) { // print page caption with searchbox ?> -
+

@@ -1193,8 +1280,8 @@ function get_pagination($script, $param, $page, $lastpage, $small=false) { $out .= '
  • '. _('First'). '
  • '. "\n"; $out .= '
  • '. _('Previous'). '
  • '. "\n"; } else { - $out .= '
  • '. _('First'). '
  • '. "\n"; - $out .= '
  • '. _('Previous'). '
  • '. "\n"; + $out .= '
  • '. _('First'). '
  • '. "\n"; + $out .= '
  • '. _('Previous'). '
  • '. "\n"; } if ($lastpage < 10) { @@ -1205,6 +1292,25 @@ function get_pagination($script, $param, $page, $lastpage, $small=false) { } } else { // start working with ... dots + $start = max(2, $page - 2); + $end = min($lastpage - 1, $page + 2); + $out .= '
  • 1
  • '. "\n"; + if ($start > 2) { + $out .= '
  • ...
  • '. "\n"; + } + for ($n = $start; $n <= $end; $n++) { + $out .='
  • '. $n. '
  • '. "\n"; + } + if ($end < $lastpage - 1) { + $out .= '
  • ...
  • '; + } + $out .= '
  • '. $lastpage. '
  • '. "\n"; } if ($page < $lastpage) { @@ -1212,8 +1318,8 @@ function get_pagination($script, $param, $page, $lastpage, $small=false) { $out .= '
  • '. _('Next'). '
  • '. "\n"; $out .= '
  • '. _('Last'). '
  • '. "\n"; } else { - $out .= '
  • '. _('Next'). '
  • '. "\n"; - $out .= '
  • '. _('Last'). '
  • '. "\n"; + $out .= '
  • '. _('Next'). '
  • '. "\n"; + $out .= '
  • '. _('Last'). '
  • '. "\n"; } // idea: small entry to input page number diff --git a/webgui/index.php b/webgui/index.php index 32797bb..80f7a9d 100644 --- a/webgui/index.php +++ b/webgui/index.php @@ -78,6 +78,7 @@ switch ($submit = form_get_action()) { if ($p[':shapefile'] == '-1') { $p[':shapefile'] = NULL; } + $p[':shipyard'] = gpc_get_int($_POST, 'shipyard'); $p[':remarks'] = gpc_get_string($_POST, 'remarks', 150); db_exec_update('vessel', $p, 'vid'); $action = ACT_DEFAULT; @@ -109,44 +110,68 @@ $sth->execute([$user->id]); $res = $sth->fetch(PDO::FETCH_NUM); $vid = ($res[0]); -// Switch between vessels -$sth = $pdo->query("SELECT vid, vesselname, model FROM vessel ORDER BY vid"); -$res = $sth->fetchAll(); -echo '', "\n"; -echo '
    ', "\n"; -echo ''; -echo "
    \n"; -echo '
    ', "\n"; -echo '\n"; -echo "
    \n"; -echo '
    ', "\n"; -echo '', "\n"; -echo '', "\n"; -echo "
    \n"; -echo "\n"; - // Get current vessel data $sql = "SELECT vesselname, model, loa, lwl, beam, draught, draught_min," . " displacement, ballast, beltpos_aft, beltpos_bow, shapefile," - . " remarks " + . " shipyard, remarks " . "FROM vessel " . "WHERE vid=?"; $sth = $pdo->prepare($sql); $sth->execute([$vid]); $vessel = $sth->fetch(PDO::FETCH_OBJ); -// Show remarks first -if (strlen($vessel->remarks) > 0) { - echo "

    "; - echo nl2br($vessel->remarks); - echo "

    \n"; +echo '
    ', "\n"; // head block + +// Switch between vessels +?> +
    +
    + +
    +
    + +
    +
    +', _('Select'), '', "\n"; +echo ' ', "\n"; +?> +
    +
    +', "\n"; +echo '
    ', "\n"; +echo '
    '; +if ($vessel->shipyard) { + if ($vessel->shipyard == -3) { + echo _('Custom-build'); + } else { + $sql = "SELECT compname FROM company WHERE compid=?"; + $sth = $pdo->prepare($sql); + $sth->execute([$vessel->shipyard]); + echo sprintf(_('Built by %s'), $sth->fetchColumn()); + // TODO year of build? + } +} +if (strlen($vessel->remarks) > 0) { + echo nl2br($vessel->remarks); +} +echo "
    \n"; +echo "
    \n"; // row 2 + +echo "
    \n"; // end of yacht head block // get vessel shape // test for predefined base shape @@ -377,6 +402,8 @@ echo "\n";
  • +
  • +
  • @@ -426,9 +453,16 @@ foreach (glob($g_shapedir.'/*.svg') as $f) { $opt_shapefiles[$f] = $f; } +$opt_shipyard = $g_opt_none + [-3 => _('― Custom-built ―')]; +$sql = "SELECT compid, compname FROM company WHERE comptype=3 ORDER BY compname"; +$sth = $pdo->query($sql); +foreach ($sth->fetchAll(PDO::FETCH_NUM) as $row) { + $opt_shipyard[$row[0]] = $row[1]; +} + $sql = "SELECT vesselname, vtype, model, loa, lwl, beam, draught, draught_min," . " displacement, ballast, beltpos_aft, beltpos_bow, shapefile," - . " remarks " + . " shipyard, remarks " . "FROM vessel " . "WHERE vid=?"; $sth = $pdo->prepare($sql); @@ -488,6 +522,7 @@ $vessel = $sth->fetch(PDO::FETCH_OBJ);
    */ form_create_select('shapefile', _('Shape file'), $opt_shapefiles, $vessel->shapefile); +form_create_select('shipyard', _('Shipyard'), $opt_shipyard, $vessel->shipyard); ?>
    diff --git a/webgui/inventory.php b/webgui/inventory.php index 0252439..901094e 100644 --- a/webgui/inventory.php +++ b/webgui/inventory.php @@ -103,7 +103,7 @@ if ($action == ACT_DEFAULT): page_caption_search($pagetitle); -$flt = db_get_filter($user->id, 201); +$flt = db_get_filter($user->id, 201, ['cond','name','txt']); /* The only way to find out whether the inventory is on the current boat is to use @@ -144,7 +144,7 @@ try { } $numrows = $sth->fetchColumn(); $page = gpc_get_int($_REQUEST, 'p', 1); -$rows_pp = gpc_get_int($_REQUEST, 'n', $g_rows_pp); +$rows_pp = gpc_get_int($_REQUEST, 'n', $user->rows_pp); $lastpage = ceil($numrows/$rows_pp); $sql = "SELECT i.invid, i.invname, i.number, i.invcond, i.eid, s.sname AS container " @@ -157,7 +157,7 @@ $sql .= ' WHERE ' . $where; $sql .= $order; // if pagination: -$sql .= ' LIMIT ' . ($page - 1) * $g_rows_pp . ',' . $g_rows_pp; +$sql .= ' LIMIT ' . ($page - 1) * $rows_pp . ',' . $rows_pp; $sth = $pdo->prepare($sql); try { diff --git a/webgui/lib/svg.inc b/webgui/lib/svg.inc new file mode 100644 index 0000000..0b722b2 --- /dev/null +++ b/webgui/lib/svg.inc @@ -0,0 +1,17 @@ +\n" "Language-Team: LANGUAGE \n" @@ -16,326 +16,412 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: box.php:17 index.php:321 +#: box.php:19 index.php:348 msgid "Boxes" msgstr "Kisten" -#: box.php:66 checklist.php:57 maintenance.php:61 note.php:69 projects.php:92 -#: settings.php:25 storage.php:81 task.php:108 +#: box.php:68 checklist.php:59 maintenance.php:66 note.php:71 projects.php:94 +#: settings.php:45 storage.php:87 task.php:110 #, php-format msgid "Unknown function '%s'!" msgstr "Unbekannte Funktion '%s'!" -#: box.php:90 box.php:131 box.php:234 storage.php:154 +#: box.php:92 box.php:133 box.php:249 storage.php:160 msgid "Label" msgstr "Etikett" -#: box.php:91 company.php:194 company.php:259 documents.php:351 -#: documents.php:562 measurement.php:154 note.php:102 +#: box.php:93 cable.php:179 cable.php:208 cable.php:241 company.php:203 +#: company.php:268 documents.php:374 documents.php:591 fuse.php:156 +#: fuse.php:209 fuse.php:234 note.php:104 note.php:179 storage.php:202 +#: storage.php:296 msgid "Type" msgstr "Typ" -#: box.php:92 box.php:174 box.php:243 dropdown.php:180 dropdown.php:226 -#: storage.php:155 storage.php:229 tag.php:113 tag.php:169 tag.php:225 +#: box.php:94 box.php:176 box.php:258 cable.php:131 cable.php:214 cable.php:264 +#: dropdown.php:187 dropdown.php:233 storage.php:161 storage.php:229 +#: tag.php:119 tag.php:183 tag.php:267 msgid "Color" msgstr "Farbe" -#: box.php:93 box.php:145 box.php:173 box.php:239 storage.php:156 +#: box.php:95 box.php:147 box.php:175 box.php:254 storage.php:162 msgid "Content" msgstr "Inhalt" -#: box.php:94 box.php:175 box.php:198 equipment.php:405 index.php:329 -#: index.php:345 inventory.php:359 provisions.php:272 +#: box.php:96 box.php:177 box.php:202 cable.php:213 equipment.php:454 +#: index.php:356 index.php:372 inventory.php:361 provisions.php:274 msgid "Weight" msgstr "Gewicht" -#: box.php:102 box.php:177 company.php:205 company.php:284 documents.php:365 -#: documents.php:573 documents.php:575 equipment.php:327 equipment.php:401 -#: equipment.php:492 equipment.php:515 equipment.php:537 inventory.php:253 -#: maintenance.php:167 projects.php:197 projects.php:244 provisions.php:193 -#: storage.php:120 storage.php:164 storage.php:248 task.php:220 globals.inc:875 +#: box.php:104 box.php:179 box.php:209 cable.php:141 company.php:214 +#: company.php:301 documents.php:388 documents.php:602 documents.php:604 +#: dropdown.php:156 equipment.php:376 equipment.php:450 equipment.php:548 +#: equipment.php:571 equipment.php:593 fuse.php:167 inventory.php:255 +#: maintenance.php:190 measurement.php:227 projects.php:208 projects.php:258 +#: provisions.php:195 storage.php:126 storage.php:170 storage.php:248 +#: tag.php:128 task.php:231 globals.inc:1014 msgid "View" msgstr "Ansehen" -#: box.php:111 company.php:212 documents.php:373 equipment.php:337 -#: equipment_js.php:243 index.php:286 inventory.php:264 maintenance.php:174 -#: maintenance.php:293 projects.php:206 projects.php:250 provisions.php:212 -#: storage.php:132 storage.php:171 task.php:228 task.php:303 globals.inc:876 -#: globals.inc:892 +#: box.php:113 cable.php:151 company.php:221 documents.php:396 dropdown.php:162 +#: equipment.php:386 equipment_js.php:247 fuse.php:176 index.php:313 +#: inventory.php:266 maintenance.php:197 maintenance.php:320 +#: measurement.php:235 projects.php:217 projects.php:264 provisions.php:214 +#: storage.php:138 storage.php:177 tag.php:136 task.php:239 task.php:317 +#: globals.inc:1015 globals.inc:1031 msgid "Edit" msgstr "Bearbeiten" -#: box.php:117 checklist.php:95 equipment_js.php:85 maintenance.php:180 -#: measurement.php:195 note.php:120 projects.php:212 projects.php:256 -#: provisions.php:219 storage.php:137 storage.php:177 tag.php:130 task.php:234 +#: box.php:119 cable.php:157 checklist.php:97 equipment_js.php:89 fuse.php:182 +#: measurement.php:241 note.php:122 projects.php:270 storage.php:143 +#: storage.php:183 tag.php:144 task.php:245 #, php-format msgid "%d records" msgstr "%d Datensätze" -#: box.php:127 +#: box.php:129 msgid "Add Box" msgstr "Kiste hinzufügen" -#: box.php:135 box.php:176 index.php:369 inventory.php:188 inventory.php:296 -#: inventory.php:300 inventory.php:402 provisions.php:250 provisions.php:278 -#: provisions.php:326 storage.php:10 globals.inc:457 +#: box.php:137 box.php:178 index.php:396 inventory.php:190 inventory.php:298 +#: inventory.php:302 inventory.php:404 provisions.php:252 provisions.php:280 +#: provisions.php:328 storage.php:12 globals.inc:540 msgid "Storage" msgstr "Stauraum" -#: box.php:149 box.php:179 box.php:251 company.php:195 company.php:270 -#: company.php:395 documents.php:398 documents.php:501 documents.php:713 -#: equipment.php:309 equipment.php:372 equipment.php:410 equipment.php:600 -#: equipment_js.php:65 index.php:405 index.php:491 inventory.php:363 -#: inventory.php:430 maintenance.php:157 maintenance.php:257 -#: maintenance.php:327 projects.php:187 projects.php:277 projects.php:301 -#: projects.php:363 storage.php:111 storage.php:230 storage.php:324 +#: box.php:151 box.php:181 box.php:266 cable.php:216 cable.php:271 +#: company.php:204 company.php:287 company.php:411 documents.php:421 +#: documents.php:529 documents.php:746 equipment.php:358 equipment.php:421 +#: equipment.php:459 equipment.php:674 equipment_js.php:69 fuse.php:239 +#: index.php:434 index.php:528 inventory.php:365 inventory.php:432 +#: maintenance.php:180 maintenance.php:282 maintenance.php:352 projects.php:174 +#: projects.php:198 projects.php:291 projects.php:315 projects.php:386 +#: storage.php:117 storage.php:230 storage.php:327 msgid "Remarks" msgstr "Bemerkungen" -#: box.php:153 company.php:238 company.php:398 documents.php:423 -#: documents.php:716 equipment.php:376 equipment.php:603 equipment_js.php:112 -#: equipment_js.php:279 index.php:409 inventory.php:304 maintenance.php:215 -#: measurement.php:237 note.php:156 projects.php:280 projects.php:366 -#: provisions.php:252 storage.php:204 storage.php:327 task.php:257 -#: globals.inc:902 globals.inc:909 +#: box.php:155 company.php:247 company.php:414 documents.php:446 +#: documents.php:749 equipment.php:425 equipment.php:677 equipment_js.php:116 +#: equipment_js.php:283 index.php:438 inventory.php:306 maintenance.php:240 +#: measurement.php:285 note.php:158 projects.php:294 projects.php:389 +#: provisions.php:254 settings.php:125 storage.php:204 storage.php:330 +#: task.php:271 globals.inc:1041 globals.inc:1048 msgid "Save" msgstr "Speichern" -#: box.php:154 company.php:239 company.php:399 company.php:425 -#: documents.php:424 documents.php:717 dropdown.php:205 dropdown.php:269 -#: equipment.php:377 equipment.php:604 equipment_js.php:113 -#: equipment_js.php:247 equipment_js.php:280 index.php:410 inventory.php:305 -#: maintenance.php:216 measurement.php:238 note.php:157 projects.php:281 -#: projects.php:367 provisions.php:253 search.php:34 storage.php:205 -#: storage.php:328 task.php:258 globals.inc:896 globals.inc:903 globals.inc:910 -#: globals.inc:920 +#: box.php:156 company.php:248 company.php:415 company.php:441 +#: documents.php:447 documents.php:750 dropdown.php:212 dropdown.php:276 +#: equipment.php:426 equipment.php:678 equipment_js.php:117 +#: equipment_js.php:251 equipment_js.php:284 index.php:439 inventory.php:307 +#: maintenance.php:241 measurement.php:286 note.php:159 projects.php:295 +#: projects.php:390 provisions.php:255 search.php:36 settings.php:126 +#: storage.php:205 storage.php:331 task.php:272 globals.inc:1035 +#: globals.inc:1042 globals.inc:1049 globals.inc:1059 msgid "Back" msgstr "Zurück" -#: box.php:172 box.php:237 inventory.php:351 +#: box.php:174 box.php:252 inventory.php:353 msgid "Box type" msgstr "Kistentyp" -#: box.php:191 +#: box.php:193 msgid "Inventory in box" msgstr "Inventar in der Kiste" -#: box.php:197 index.php:343 inventory.php:10 search.php:78 globals.inc:1279 +#: box.php:200 index.php:370 inventory.php:12 search.php:80 globals.inc:1412 msgid "Inventory" msgstr "Inventar" -#: box.php:214 +#: box.php:201 dropdown.php:150 inventory.php:243 inventory.php:291 +#: inventory.php:360 inventory.php:394 provisions.php:180 provisions.php:240 +#: provisions.php:273 provisions.php:304 +msgid "Number" +msgstr "Anzahl" + +#: box.php:229 msgid "Box is empty" msgstr "Kiste ist leer" -#: box.php:227 documents.php:323 inventory.php:17 inventory.php:174 -#: maintenance.php:82 measurement.php:146 globals.inc:123 +#: box.php:242 documents.php:337 inventory.php:19 inventory.php:176 +#: maintenance.php:87 measurement.php:174 globals.inc:130 msgid "― none ―" msgstr "― keine ―" -#: box.php:229 +#: box.php:244 msgid "Edit Box" msgstr "Kiste bearbeiten" -#: box.php:247 equipment.php:584 inventory.php:396 provisions.php:306 +#: box.php:262 equipment.php:658 inventory.php:398 provisions.php:308 msgid "Weight, kg" msgstr "Gewicht, kg" -#: box.php:265 checklist.php:170 company.php:436 documents.php:746 -#: dropdown.php:275 equipment.php:630 equipment_js.php:289 index.php:502 -#: inventory.php:458 maintenance.php:343 measurement.php:322 note.php:223 -#: projects.php:379 provisions.php:340 settings.php:91 storage.php:354 -#: tag.php:254 task.php:386 +#: box.php:280 cable.php:300 checklist.php:172 company.php:452 +#: documents.php:783 dropdown.php:282 equipment.php:704 equipment_js.php:293 +#: fuse.php:292 index.php:539 inventory.php:460 maintenance.php:373 +#: measurement.php:370 note.php:226 projects.php:402 provisions.php:342 +#: settings.php:132 storage.php:357 tag.php:296 task.php:400 msgid "Unknown function call: Please report to system development!" msgstr "Unbekannter Funktionsaufruf: Bitte der Systementwickelung melden!" -#: checklist.php:10 index.php:378 -msgid "Checklists" -msgstr "Checklisten" +#: cable.php:12 index.php:405 +msgid "Cables" +msgstr "Kabel" -#: checklist.php:79 checklist.php:108 checklist.php:125 documents.php:353 -#: documents.php:394 documents.php:500 documents.php:695 -msgid "Title" -msgstr "Titel" - -#: checklist.php:80 checklist.php:126 checklist.php:157 projects.php:163 -#: projects.php:186 projects.php:232 projects.php:300 task.php:190 -msgid "State" -msgstr "Status" - -#: checklist.php:104 -msgid "Add Checklist" -msgstr "Checkliste hinzufügen" - -#: checklist.php:123 -msgid "View Checklist" -msgstr "Checkliste ansehen" - -#: checklist.php:148 -msgid "Edit checklist" -msgstr "Checkliste bearbeiten" - -#: checklist.php:153 company.php:193 company.php:234 company.php:257 -#: company.php:330 dropdown.php:178 dropdown.php:224 equipment.php:360 -#: equipment.php:567 equipment_js.php:97 equipment_js.php:264 index.php:397 -#: inventory.php:239 inventory.php:285 inventory.php:388 measurement.php:209 -#: measurement.php:256 measurement.php:286 projects.php:183 projects.php:231 -#: projects.php:270 projects.php:296 projects.php:345 provisions.php:234 -#: provisions.php:298 storage.php:109 storage.php:192 storage.php:292 -#: tag.php:144 task.php:336 -msgid "Name" -msgstr "Name" - -#: checklist.php:165 -msgid "Delete checklist" -msgstr "Lösche Checkliste" - -#: company.php:10 documents.php:634 globals.inc:424 -msgid "Company" -msgstr "Firma" - -#: company.php:70 equipment.php:81 inventory.php:76 measurement.php:105 -#: note.php:47 projects.php:82 provisions.php:71 storage.php:52 tag.php:55 -#: task.php:85 +#: cable.php:70 company.php:73 documents.php:148 equipment.php:84 fuse.php:71 +#: inventory.php:78 measurement.php:116 note.php:49 projects.php:84 +#: provisions.php:73 storage.php:55 tag.php:57 task.php:87 msgid "Delete prohibited, invalid security token!" msgstr "Löschen verboten, ungültiger Sicherheitstoken!" -#: company.php:77 -#, php-format -msgid "Deleted company no. %d" -msgstr "Firma Nr. %d gelöscht" - -#: company.php:82 documents.php:207 dropdown.php:111 equipment.php:178 -#: index.php:85 inventory.php:88 measurement.php:114 provisions.php:80 -#: tag.php:66 +#: cable.php:79 company.php:85 documents.php:216 dropdown.php:113 +#: equipment.php:219 fuse.php:82 index.php:88 inventory.php:90 +#: measurement.php:125 provisions.php:82 tag.php:68 #, php-format msgid "Unknown function!" msgstr "Unbekannte Funktion!" -#: company.php:156 documents.php:301 inventory.php:173 inventory.php:206 -#: maintenance.php:81 measurement.php:145 globals.inc:122 -msgid "― all ―" -msgstr "― alle ―" - -#: company.php:177 documents.php:335 equipment.php:288 inventory.php:224 -#: maintenance.php:109 measurement.php:158 projects.php:171 provisions.php:162 -#: tag.php:96 task.php:194 +#: cable.php:110 company.php:186 documents.php:357 equipment.php:337 +#: fuse.php:135 inventory.php:226 maintenance.php:114 measurement.php:187 +#: projects.php:179 provisions.php:164 tag.php:101 task.php:201 msgid "Apply" msgstr "Anwenden" -#: company.php:177 documents.php:335 equipment.php:288 inventory.php:224 -#: maintenance.php:109 measurement.php:158 projects.php:171 provisions.php:162 -#: tag.php:96 task.php:194 +#: cable.php:110 company.php:186 documents.php:357 equipment.php:337 +#: fuse.php:135 inventory.php:226 maintenance.php:114 measurement.php:187 +#: projects.php:179 provisions.php:164 tag.php:101 task.php:201 msgid "Go" msgstr "Start" -#: company.php:178 documents.php:336 equipment.php:289 inventory.php:225 -#: maintenance.php:110 projects.php:172 provisions.php:163 tag.php:97 +#: cable.php:111 company.php:187 documents.php:358 equipment.php:338 +#: fuse.php:136 inventory.php:227 maintenance.php:115 measurement.php:188 +#: projects.php:180 provisions.php:165 tag.php:102 task.php:202 msgid "Reset filter to defaults" msgstr "Filter auf Standard zurücksetzen" -#: company.php:178 documents.php:336 documents.php:405 equipment.php:289 -#: inventory.php:225 maintenance.php:110 projects.php:172 provisions.php:163 -#: tag.php:97 task.php:195 +#: cable.php:111 company.php:187 documents.php:358 equipment.php:338 +#: fuse.php:136 inventory.php:227 maintenance.php:115 measurement.php:188 +#: projects.php:180 provisions.php:165 tag.php:102 task.php:202 msgid "Clear" msgstr "Löschen" -#: company.php:218 documents.php:379 equipment.php:343 inventory.php:270 +#: cable.php:126 cable.php:207 fuse.php:237 globals.inc:502 +msgid "Cable" +msgstr "Kabel" + +#: cable.php:127 cable.php:171 cable.php:237 checklist.php:155 company.php:202 +#: company.php:243 company.php:266 company.php:346 dropdown.php:185 +#: dropdown.php:231 equipment.php:409 equipment.php:641 equipment_js.php:101 +#: equipment_js.php:268 index.php:426 inventory.php:241 inventory.php:287 +#: inventory.php:390 measurement.php:257 measurement.php:304 +#: measurement.php:334 projects.php:167 projects.php:194 projects.php:245 +#: projects.php:284 projects.php:310 projects.php:368 provisions.php:236 +#: provisions.php:300 storage.php:115 storage.php:198 storage.php:292 +#: tag.php:158 task.php:350 +msgid "Name" +msgstr "Name" + +#: cable.php:128 cable.php:182 cable.php:210 cable.php:248 +msgid "Conductors" +msgstr "Leiter" + +#: cable.php:129 cable.php:209 +msgid "Length" +msgstr "Länge" + +#: cable.php:130 cable.php:212 +msgid "Cross section" +msgstr "Querschnitt" + +#: cable.php:132 cable.php:215 cable.php:268 inventory.php:204 +#: inventory.php:244 inventory.php:364 inventory.php:416 +msgid "Condition" +msgstr "Zustand" + +#: cable.php:166 +msgid "Add Cable" +msgstr "Kabel hinzufügen" + +#: cable.php:175 cable.php:244 +msgid "Length, m" +msgstr "Länge, m" + +#: cable.php:186 cable.php:256 +msgid "Cross section, mm²" +msgstr "Querschnitt, mm²" + +#: cable.php:204 +msgid "View cable" +msgstr "Kabel anzeigen" + +#: cable.php:211 +msgid "Diameter" +msgstr "Durchmesser" + +#: cable.php:232 +msgid "Edit cable" +msgstr "Kabel bearbeiten" + +#: cable.php:252 +msgid "Diameter, mm" +msgstr "Durchmesser, mm" + +#: cable.php:260 +msgid "Weight, kg/m" +msgstr "Gewicht, kg/m" + +#: cable.php:282 +msgid "Delete cable" +msgstr "Kabel löschen" + +#: cable.php:292 tag.php:237 tag.php:288 +msgid "Tag is not used anywhere" +msgstr "Unbenutzte Tags" + +#: checklist.php:12 index.php:407 +msgid "Checklists" +msgstr "Checklisten" + +#: checklist.php:81 checklist.php:110 checklist.php:127 documents.php:376 +#: documents.php:417 documents.php:528 documents.php:728 +msgid "Title" +msgstr "Titel" + +#: checklist.php:82 checklist.php:128 checklist.php:159 maintenance.php:284 +#: projects.php:171 projects.php:197 projects.php:246 projects.php:314 +#: task.php:193 +msgid "State" +msgstr "Status" + +#: checklist.php:106 +msgid "Add Checklist" +msgstr "Checkliste hinzufügen" + +#: checklist.php:125 +msgid "View Checklist" +msgstr "Checkliste ansehen" + +#: checklist.php:150 +msgid "Edit checklist" +msgstr "Checkliste bearbeiten" + +#: checklist.php:167 +msgid "Delete checklist" +msgstr "Lösche Checkliste" + +#: company.php:12 documents.php:667 globals.inc:506 +msgid "Company" +msgstr "Firma" + +#: company.php:80 +#, php-format +msgid "Deleted company no. %d" +msgstr "Firma Nr. %d gelöscht" + +#: company.php:159 documents.php:310 inventory.php:175 inventory.php:208 +#: maintenance.php:86 measurement.php:173 globals.inc:129 +msgid "― all ―" +msgstr "― alle ―" + +#: company.php:227 documents.php:402 equipment.php:392 inventory.php:272 +#: maintenance.php:203 projects.php:224 provisions.php:221 #, php-format msgid "Records %d to %d of %d" msgstr "Datensätze %d bis %d von %d" -#: company.php:230 +#: company.php:239 msgid "Add Company" msgstr "Firma hinzufügen" -#: company.php:237 company.php:338 +#: company.php:246 company.php:354 msgid "Company type" msgstr "Firmenart" -#: company.php:258 company.php:334 equipment.php:399 equipment.php:571 +#: company.php:267 company.php:350 equipment.php:448 equipment.php:645 msgid "Short name" msgstr "Kurzbezeichnung" -#: company.php:260 +#: company.php:269 msgid "Secondary type" msgstr "Sekundärer Typ" -#: company.php:261 company.php:355 +#: company.php:270 company.php:371 msgid "Street" msgstr "Straße" -#: company.php:262 +#: company.php:271 msgid "Zip, City" msgstr "PLZ, Ort" -#: company.php:263 company.php:367 +#: company.php:272 company.php:383 msgid "Country" msgstr "Land" -#: company.php:264 company.php:371 +#: company.php:273 company.php:387 msgid "Contact" msgstr "Ansprechparter" -#: company.php:265 company.php:375 +#: company.php:275 company.php:391 msgid "Phone" msgstr "Telefon" -#: company.php:266 company.php:379 +#: company.php:278 company.php:395 msgid "Email" msgstr "Email" -#: company.php:267 company.php:383 +#: company.php:281 company.php:399 msgid "Web" msgstr "Web" -#: company.php:268 company.php:387 +#: company.php:285 company.php:403 msgid "Customer no." msgstr "Kundennr." -#: company.php:269 company.php:391 +#: company.php:286 company.php:407 msgid "Contract no." msgstr "Kontraktnr." -#: company.php:289 +#: company.php:306 msgid "Not referenced in any equipment" msgstr "In keiner Ausrüstung benutzt" -#: company.php:310 +#: company.php:316 +msgid "Invoices" +msgstr "Rechnungen" + +#: company.php:326 msgid "No invoices" msgstr "Keine Rechnungen" -#: company.php:316 +#: company.php:332 msgid "Edit Company" msgstr "Firma bearbeiten" -#: company.php:352 +#: company.php:368 msgid "Secondary company type" msgstr "Sekundärer Firmentyp" -#: company.php:359 +#: company.php:375 msgid "Zip" msgstr "PLZ" -#: company.php:363 +#: company.php:379 msgid "City" msgstr "Stadt" -#: company.php:411 +#: company.php:427 msgid "Delete Company" msgstr "Firma löschen" -#: company.php:412 documents.php:733 equipment.php:619 inventory.php:448 -#: note.php:214 storage.php:343 +#: company.php:428 documents.php:770 equipment.php:693 inventory.php:450 +#: note.php:217 storage.php:346 #, php-format msgid "Record no. %d" msgstr "Datensatz Nr. %d" -#: company.php:424 +#: company.php:440 msgid "Company can not be deleted as there are equipment-references!" msgstr "Firma kann nicht gelöscht werden da Ausrüstung zugeordnet ist!" -#: company.php:428 +#: company.php:444 msgid "" "Deleting a company is final. There is no way back. Only delete if you are " "absolute sure." @@ -343,166 +429,184 @@ msgstr "" "Löschen einer Firma ist endgültig. Es gibt keinen Weg zurückNur löschen wenn " "Sie sich absolut sicher sind." -#: dl.php:117 +#: dl.php:118 msgid "Cannot initialize new GD image stream" msgstr "Neuer GD Imagestream kann nicht initialisiert werden" -#: documents.php:12 index.php:349 task.php:314 globals.inc:1283 +#: dl.php:123 +msgid "Resource not found!" +msgstr "Resource nicht gefunden!" + +#: documents.php:13 index.php:376 task.php:328 globals.inc:1416 msgid "Documents" msgstr "Dokumente" -#: documents.php:52 +#: documents.php:53 msgid "Invalid file upload parameters." msgstr "Ungültige Dateiupload-Einstellungen" -#: documents.php:57 +#: documents.php:58 msgid "Exceeded filesize limit." msgstr "Größenlimit für Datei überschritten" -#: documents.php:62 +#: documents.php:63 msgid "No file for upload submitted. Try again by selecting a file first." msgstr "" "Keine Datei für den Upload angegeben. Beim nächsten Versuch zuerst Datei " "auswählen." -#: documents.php:74 equipment.php:124 +#: documents.php:75 equipment.php:127 #, php-format msgid "Mimetype '%s' not allowed for upload." msgstr "Dateityp '%s' nicht zum Hochladen zugelassen." -#: documents.php:79 +#: documents.php:80 #, php-format msgid "Mimetype mismatch: '%s'." msgstr "Konflikt beim Dateityp: '%s'" -#: documents.php:91 +#: documents.php:95 msgid "Document already exists!" msgstr "Dokument existiert bereits!" -#: documents.php:97 equipment.php:132 +#: documents.php:101 equipment.php:135 #, php-format msgid "File to big: %s.%s" msgstr "Datei zu groß: %s.%s" -#: documents.php:164 +#: documents.php:169 +#, php-format +msgid "Removed %d references" +msgstr "%d Referenzen entfernt" + +#: documents.php:174 #, php-format msgid "Deleted document %s" -msgstr "Lösche Dokument %s" +msgstr "Dokument %s gelöscht" -#: documents.php:202 +#: documents.php:180 +#, php-format +msgid "SQL-Error: %s" +msgstr "SQL-Fehler: %s" + +#: documents.php:211 msgid "Removed document reference" msgstr "Dokumentreferenz wurde entfernt" -#: documents.php:320 -msgid "Ref.-Type" -msgstr "Ref.-Typ" +#: documents.php:334 note.php:103 +msgid "Reference" +msgstr "Referenz" -#: documents.php:352 documents.php:497 documents.php:691 +#: documents.php:375 documents.php:525 documents.php:724 msgid "Filename" msgstr "Dateiname" -#: documents.php:354 +#: documents.php:377 msgid "Links" msgstr "Verknüpfungen" -#: documents.php:390 +#: documents.php:413 msgid "Add Document" msgstr "Dokument hinzufügen" -#: documents.php:402 +#: documents.php:425 msgid "Document" msgstr "Dokument" -#: documents.php:442 +#: documents.php:428 +msgid "Clear selection" +msgstr "Auswah leeren" + +#: documents.php:464 msgid "View Document" msgstr "Dokument ansehen" -#: documents.php:447 documents.php:706 +#: documents.php:469 documents.php:739 msgid "Document type" msgstr "Dokumentenart" -#: documents.php:450 +#: documents.php:472 msgid "Preview" msgstr "Vorschau" -#: documents.php:478 globals.inc:428 +#: documents.php:506 globals.inc:510 msgid "Drawing" msgstr "Zeichnung" -#: documents.php:485 +#: documents.php:513 msgid "PDF" msgstr "" -#: documents.php:487 +#: documents.php:515 msgid "Download" msgstr "" -#: documents.php:487 +#: documents.php:515 #, php-format msgid "%d Pages" msgstr "%d Seiten" -#: documents.php:496 +#: documents.php:524 msgid "Mimetype" msgstr "" -#: documents.php:498 +#: documents.php:526 msgid "File size" msgstr "Dateigröße" -#: documents.php:499 +#: documents.php:527 msgid "Upload date" msgstr "Uploaddatum" -#: documents.php:520 +#: documents.php:548 msgid "Document references" msgstr "Dokumentreferenzen" -#: documents.php:563 +#: documents.php:592 msgid "Used by" msgstr "Benutzt von" -#: documents.php:577 +#: documents.php:610 msgid "Remove reference" msgstr "Referenz entfernen" -#: documents.php:584 +#: documents.php:617 msgid "Add new reference" msgstr "Neue Referenz hinzufügen" -#: documents.php:604 equipment.php:12 equipment_js.php:10 index.php:327 -#: inventory.php:428 maintenance.php:156 maintenance.php:202 -#: maintenance.php:251 maintenance.php:325 measurement.php:234 -#: measurement.php:265 measurement.php:311 search.php:50 globals.inc:429 -#: globals.inc:1278 +#: documents.php:637 equipment.php:13 equipment_js.php:14 fuse.php:238 +#: index.php:354 inventory.php:430 maintenance.php:95 maintenance.php:179 +#: maintenance.php:227 maintenance.php:276 maintenance.php:350 +#: measurement.php:282 measurement.php:313 measurement.php:359 search.php:52 +#: globals.inc:511 globals.inc:1411 msgid "Equipment" msgstr "Ausrüstung" -#: documents.php:660 globals.inc:462 +#: documents.php:693 globals.inc:545 msgid "Vessel" msgstr "Yacht" -#: documents.php:674 +#: documents.php:707 msgid "Edit Document" msgstr "Dokument bearbeiten" -#: documents.php:702 globals.inc:433 +#: documents.php:735 globals.inc:516 msgid "Generic" msgstr "Allgemein" -#: documents.php:703 manual.php:10 globals.inc:439 +#: documents.php:736 manual.php:10 globals.inc:522 msgid "Manual" msgstr "Handbuch" -#: documents.php:704 globals.inc:436 +#: documents.php:737 globals.inc:519 msgid "Invoice" msgstr "Rechnung" -#: documents.php:732 +#: documents.php:769 msgid "Delete Document" msgstr "Lösche Dokument" -#: documents.php:737 +#: documents.php:775 msgid "" "Deleting a document item is final. There is no way back. Only delete if you " "are absolute sure." @@ -510,203 +614,208 @@ msgstr "" "Löschen eines Dokuments ist endgültig. Es gibt keinen Weg zurück. Nur " "löschen wenn Sie sich absolut sicher sind." -#: dropdown.php:10 +#: dropdown.php:12 msgid "Lists" msgstr "Listen" -#: dropdown.php:105 +#: dropdown.php:107 msgid "Selection lists are not deletable!" msgstr "Auswahllisten sind nicht löschbar!" -#: dropdown.php:107 +#: dropdown.php:109 msgid "Delete not yet implemented" msgstr "Löschen ist noch nicht implementiert" -#: dropdown.php:137 +#: dropdown.php:139 msgid "Danger! Only adjust if it is clear what impact this will have!" msgstr "Gefahr! Nur anpassen wenn klar ist was für Auswirkungen das hat!" -#: dropdown.php:140 +#: dropdown.php:142 msgid "Adding values is usually not critical." msgstr "Hinzufügen von Werten ist normalerweise unkritisch." -#: dropdown.php:147 equipment.php:304 equipment_js.php:61 provisions.php:177 -#: tag.php:112 tag.php:148 tag.php:170 tag.php:221 +#: dropdown.php:149 equipment.php:353 equipment_js.php:65 fuse.php:130 +#: fuse.php:159 fuse.php:206 fuse.php:233 fuse.php:263 provisions.php:179 +#: tag.php:118 tag.php:162 tag.php:184 tag.php:263 msgid "Description" msgstr "Beschreibung" -#: dropdown.php:148 inventory.php:241 inventory.php:289 inventory.php:358 -#: inventory.php:392 provisions.php:178 provisions.php:238 provisions.php:271 -#: provisions.php:302 -msgid "Number" -msgstr "Anzahl" - -#: dropdown.php:168 +#: dropdown.php:175 #, php-format msgid "View List: %s" msgstr "Liste anzeigen: %s" -#: dropdown.php:179 dropdown.php:225 +#: dropdown.php:186 dropdown.php:232 msgid "Short" msgstr "Kurzbez." -#: dropdown.php:181 dropdown.php:227 +#: dropdown.php:188 dropdown.php:234 msgid "Sort" msgstr "Sortierung" -#: dropdown.php:182 equipment.php:283 equipment.php:411 +#: dropdown.php:189 equipment.php:331 equipment.php:460 msgid "Flags" msgstr "" -#: dropdown.php:214 +#: dropdown.php:221 #, php-format msgid "Edit List: %s" msgstr "Liste bearbeiten: %s" -#: dropdown.php:268 equipment_js.php:89 globals.inc:886 +#: dropdown.php:275 equipment_js.php:93 globals.inc:1025 msgid "Add" msgstr "Hinzufügen" -#: equipment.php:16 equipment.php:17 equipment.php:597 -msgid "--- unknown ---" -msgstr "--- unbekannt ---" - -#: equipment.php:99 +#: equipment.php:102 #, php-format msgid "Deleted equipment no. %d" msgstr "Lösche Ausrüstung Nr. %d" -#: equipment.php:101 +#: equipment.php:104 #, php-format msgid "%d document links were removed" msgstr "%d Dokumentverknüpfungen wurden entfernt." -#: equipment.php:109 +#: equipment.php:112 msgid "No files for upload submitted" msgstr "Keine Dateien zum Hochladen angegeben" -#: equipment.php:128 +#: equipment.php:131 msgid "Filetype not allowed for upload:" msgstr "Dateityp nicht zum Hochladen zugelassen:" -#: equipment.php:265 +#: equipment.php:149 +#, php-format +msgid "Image scaled down to %dx%d" +msgstr "Bild herunterskaliert auf %dx%d" + +#: equipment.php:167 +#, php-format +msgid "Internal error: Unknown mimetype %s!" +msgstr "Interner Fehler: Unbekannter Mimetype %s!" + +#: equipment.php:175 +msgid "Storage limit exceeded. Image not uploaded!" +msgstr "Speicherlimit überschritten. Bild wurde nicht hochgeladen!" + +#: equipment.php:313 msgctxt "male" msgid "― none ―" msgstr "― keiner ―" -#: equipment.php:272 equipment.php:364 equipment.php:409 equipment.php:597 -#: provisions.php:154 provisions.php:275 provisions.php:315 +#: equipment.php:320 equipment.php:413 equipment.php:458 equipment.php:671 +#: provisions.php:156 provisions.php:277 provisions.php:317 msgid "Category" msgstr "Kategorie" -#: equipment.php:273 equipment.php:305 equipment.php:365 equipment.php:400 -#: equipment.php:574 +#: equipment.php:321 equipment.php:354 equipment.php:414 equipment.php:449 +#: equipment.php:648 msgid "Manufacturer" msgstr "Hersteller" -#: equipment.php:274 equipment.php:408 equipment.php:596 +#: equipment.php:322 equipment.php:457 equipment.php:670 msgid "Supplier" msgstr "Lieferant" -#: equipment.php:277 +#: equipment.php:325 msgid "Text" msgstr "" -#: equipment.php:306 equipment.php:368 equipment.php:403 equipment.php:576 -#: equipment_js.php:63 equipment_js.php:105 equipment_js.php:134 -#: equipment_js.php:272 index.php:401 index.php:444 +#: equipment.php:355 equipment.php:417 equipment.php:452 equipment.php:650 +#: equipment_js.php:67 equipment_js.php:109 equipment_js.php:138 +#: equipment_js.php:276 index.php:430 index.php:480 msgid "Model" msgstr "Modell" -#: equipment.php:307 equipment.php:404 equipment.php:580 equipment_js.php:64 -#: equipment_js.php:109 equipment_js.php:135 equipment_js.php:276 +#: equipment.php:356 equipment.php:453 equipment.php:654 equipment_js.php:68 +#: equipment_js.php:113 equipment_js.php:139 equipment_js.php:280 msgid "Serial" msgstr "Seriennummer" -#: equipment.php:308 +#: equipment.php:357 msgid "Age" msgstr "Alter" -#: equipment.php:320 +#: equipment.php:369 #, php-format msgid "%dm" msgstr "" -#: equipment.php:322 +#: equipment.php:371 #, php-format msgid "%dy" msgstr "" -#: equipment.php:357 equipment_js.php:94 +#: equipment.php:406 equipment_js.php:98 msgid "Add Equipment" msgstr "Ausrüstung hinzufügen" -#: equipment.php:406 inventory.php:360 +#: equipment.php:455 inventory.php:362 msgid "Price" msgstr "Preis" -#: equipment.php:407 equipment.php:592 inventory.php:361 inventory.php:410 +#: equipment.php:456 equipment.php:666 inventory.php:363 inventory.php:412 msgid "Purchase date" msgstr "Kaufdatum" -#: equipment.php:418 +#: equipment.php:467 msgid "Images and documents" msgstr "Bilder und Dokumente" -#: equipment.php:459 +#: equipment.php:515 msgid "No referenced documents" msgstr "Keine verknüpften Dokumente" -#: equipment.php:467 +#: equipment.php:523 msgid "Add Image" msgstr "Bild hinzufügen" -#: equipment.php:483 +#: equipment.php:539 msgid "Maintenances" msgstr "Wartungen" -#: equipment.php:497 +#: equipment.php:553 msgid "No maintenance records found." msgstr "Keine Wartungsdatensätze gefunden." -#: equipment.php:501 +#: equipment.php:557 msgid "Add maintenance" msgstr "Wartung hinzufügen" -#: equipment.php:505 index.php:377 measurement.php:10 +#: equipment.php:561 index.php:404 measurement.php:23 msgid "Measurements" msgstr "Maße/Messungen" -#: equipment.php:520 +#: equipment.php:576 msgid "No measurement records found." msgstr "Keine Maße/Messungen gefunden." -#: equipment.php:524 measurement.php:204 +#: equipment.php:580 measurement.php:252 msgid "Add measurement" msgstr "Messung/Maß hinzufügen" -#: equipment.php:528 +#: equipment.php:584 msgid "Spare parts" msgstr "Ersatzteile" -#: equipment.php:542 +#: equipment.php:598 msgid "No spare parts found." msgstr "Keine Ersatzteile gefunden." -#: equipment.php:563 equipment_js.php:261 +#: equipment.php:637 equipment_js.php:265 msgid "Edit Equipment" msgstr "Ausrüstung bearbeiten" -#: equipment.php:588 inventory.php:406 +#: equipment.php:662 inventory.php:408 #, php-format msgid "Price, %s" msgstr "Preis, %s" -#: equipment.php:617 +#: equipment.php:691 msgid "Delete equipment" msgstr "Ausrüstung löschen" -#: equipment.php:623 +#: equipment.php:697 msgid "" "Deleting an equipment item is final. There is no way back. Only delete if " "you are absolute sure." @@ -714,205 +823,267 @@ msgstr "" "Löschen von Ausrüstung ist endgültig. Es gibt keinen Weg zurück. Nur löschen " "wenn Sie sich absolut sicher sind." -#: equipment_js.php:62 equipment_js.php:101 equipment_js.php:133 -#: equipment_js.php:268 +#: equipment_js.php:66 equipment_js.php:105 equipment_js.php:137 +#: equipment_js.php:272 msgid "Make" msgstr "Marke" -#: equipment_js.php:245 globals.inc:894 globals.inc:919 +#: equipment_js.php:249 globals.inc:1033 globals.inc:1058 msgid "Delete" msgstr "Löschen" +#: fuse.php:12 index.php:406 +msgid "Fuses" +msgstr "Sicherungen" + +#: fuse.php:127 fuse.php:158 fuse.php:214 fuse.php:236 +msgid "Location" +msgstr "Position" + +#: fuse.php:155 fuse.php:259 +msgctxt "number" +msgid "Number" +msgstr "Anzahl" + +#: fuse.php:157 fuse.php:235 +msgid "Current" +msgstr "Stromstärke" + +#: fuse.php:191 +msgid "Add fuse" +msgstr "Sicherung hinzufügen" + +#: fuse.php:202 +msgid "Fuse number" +msgstr "Sicherungsnummer" + +#: fuse.php:211 +msgid "Current, Ampere" +msgstr "Stromstärke, Ampere" + +#: fuse.php:229 +msgid "View fuse" +msgstr "Sicherung ansehen" + +#: fuse.php:232 globals.inc:515 +msgid "Fuse" +msgstr "Sicherung" + +#: fuse.php:254 +msgid "Edit fuse" +msgstr "Sicherung bearbeiten" + +#: fuse.php:274 +msgid "Delete fuse" +msgstr "Lösche Sicherung" + +#: fuse.php:284 +msgid "Fuse is not used anywhere" +msgstr "Die Sicherung ist ungenutzt" + #: header.php:27 msgid "Ghost" msgstr "" -#: index.php:10 +#: index.php:12 msgid "Start" msgstr "Start" -#: index.php:32 +#: index.php:34 #, php-format msgid "Selected vessel %d: %s" msgstr "Ausgewähltes Boot %d: %s" -#: index.php:38 index.php:59 +#: index.php:40 index.php:61 msgid "Access denied. You are not the captain." msgstr "Zugriff verweigert. Sie sind nicht der Kapitän." -#: index.php:53 +#: index.php:55 #, php-format msgid "Selected new vessel %d" msgstr "Neues Boot %d ausgewählt" -#: index.php:99 +#: index.php:102 msgid "Yacht data" msgstr "Yachtdaten" -#: index.php:101 globals.inc:461 +#: index.php:104 globals.inc:544 msgid "User" msgstr "Benutzer" -#: index.php:127 +#: index.php:146 msgid "Select" msgstr "Auswählen" -#: index.php:128 +#: index.php:147 msgid "Add yacht" msgstr "Yacht hinzufügen" -#: index.php:271 +#: index.php:159 +msgid "Custom-build" +msgstr "" + +#: index.php:164 +#, php-format +msgid "Built by %s" +msgstr "" + +#: index.php:298 msgid "Boat data" msgstr "Bootsdaten" -#: index.php:273 +#: index.php:300 msgid "Loa" msgstr "LüA" -#: index.php:274 +#: index.php:301 msgid "Lwl" msgstr "LWL" -#: index.php:275 index.php:456 +#: index.php:302 index.php:492 msgid "Beam" msgstr "Breite" -#: index.php:276 index.php:460 +#: index.php:303 index.php:496 msgid "Draught" msgstr "Tiefgang" -#: index.php:277 index.php:464 +#: index.php:304 index.php:500 msgid "Draught, min." msgstr "Tiefgang, min." -#: index.php:278 index.php:468 +#: index.php:305 index.php:504 msgid "Displacement" msgstr "Verdrängung" -#: index.php:279 index.php:472 +#: index.php:306 index.php:508 msgid "Ballast" msgstr "Ballast" -#: index.php:280 index.php:476 +#: index.php:307 index.php:512 msgid "Belt position aft" msgstr "Gurtposition achtern" -#: index.php:281 index.php:480 +#: index.php:308 index.php:516 msgid "Belt position bow" msgstr "Gurtposition vorne" -#: index.php:297 +#: index.php:324 msgid "Statistics" msgstr "Statistik" -#: index.php:313 +#: index.php:340 msgid "Storage type" msgstr "Stauraumart" -#: index.php:328 index.php:344 index.php:350 +#: index.php:355 index.php:371 index.php:377 msgid "Count" msgstr "Anzahl" -#: index.php:365 +#: index.php:392 msgid "Base data" msgstr "Stammdaten" -#: index.php:367 +#: index.php:394 msgid "Selection lists" msgstr "Auswahllisten" -#: index.php:368 inventory.php:243 tag.php:10 globals.inc:927 +#: index.php:395 inventory.php:245 tag.php:12 globals.inc:1066 msgid "Tags" msgstr "" -#: index.php:370 +#: index.php:397 msgid "Companies" msgstr "Firmen" -#: index.php:373 +#: index.php:400 msgid "Additional modules" msgstr "Zusatzmodule" -#: index.php:375 settings.php:10 +#: index.php:402 settings.php:12 msgid "Settings" -msgstr "" +msgstr "Einstellungen" -#: index.php:376 search.php:100 +#: index.php:403 search.php:102 msgid "Tasks" msgstr "Aufgaben" -#: index.php:392 +#: index.php:421 msgid "Add additional yacht" msgstr "Zusätzliche Yacht hinzufügen" -#: index.php:436 +#: index.php:456 +msgid "― Custom-built ―" +msgstr "― Eigenbau ―" + +#: index.php:472 msgid "Edit Yacht" msgstr "Yacht bearbeiten" -#: index.php:440 +#: index.php:476 msgid "Vesselname" msgstr "Yachtname" -#: index.php:448 +#: index.php:484 msgid "LoA" msgstr "LüA" -#: index.php:452 +#: index.php:488 msgid "LwL" msgstr "LWL" -#: index.php:488 +#: index.php:524 msgid "Shape file" msgstr "Rumpfform-Datei" -#: inventory.php:83 +#: index.php:525 +msgid "Shipyard" +msgstr "" + +#: inventory.php:85 #, php-format msgid "Deleted inventory no. %d" msgstr "Inventar Nr. %d gelöscht" -#: inventory.php:202 inventory.php:242 inventory.php:362 inventory.php:414 -msgid "Condition" -msgstr "Zustand" - -#: inventory.php:240 inventory.php:354 +#: inventory.php:242 inventory.php:356 msgid "Container" msgstr "Behälter" -#: inventory.php:261 +#: inventory.php:263 msgid "No tags assigned" msgstr "Keine Tags zugeordnet" -#: inventory.php:281 +#: inventory.php:283 msgid "Add Inventory" msgstr "Inventar hinzufügen" -#: inventory.php:293 inventory.php:401 +#: inventory.php:295 inventory.php:403 msgid "Container type" msgstr "Behälterart" -#: inventory.php:295 inventory.php:301 inventory.php:403 storage.php:144 -#: globals.inc:420 +#: inventory.php:297 inventory.php:303 inventory.php:405 storage.php:150 +#: globals.inc:501 msgid "Box" msgstr "Kiste" -#: inventory.php:354 +#: inventory.php:356 #, php-format msgid "%s in %s" msgstr "" -#: inventory.php:357 +#: inventory.php:359 msgid "Location ID" msgstr "Position (x, y, z)" -#: inventory.php:384 +#: inventory.php:386 msgid "Edit Inventory" msgstr "Inventar bearbeiten" -#: inventory.php:447 +#: inventory.php:449 msgid "Delete Inventory" msgstr "Inventar löschen" -#: inventory.php:451 +#: inventory.php:453 msgid "" "Deleting an inventory item is final. There is no way back. Only delete if " "you are absolute sure." @@ -933,7 +1104,7 @@ msgstr "Benutzername:" msgid "Password:" msgstr "Kennwort:" -#: login.php:68 globals.inc:202 +#: login.php:68 globals.inc:210 msgid "Error" msgstr "Fehler" @@ -973,190 +1144,174 @@ msgstr "" msgid "New login" msgstr "Neue Anmeldung" -#: maintenance.php:10 globals.inc:1281 +#: maintenance.php:12 globals.inc:1414 msgid "Maintenance" msgstr "Wartung" -#: maintenance.php:14 +#: maintenance.php:16 msgid "*** unassigned ***" msgstr "*** nicht zugeordnet ***" -#: maintenance.php:155 maintenance.php:194 maintenance.php:250 -#: maintenance.php:322 +#: maintenance.php:178 maintenance.php:219 maintenance.php:275 +#: maintenance.php:347 msgid "Activities" msgstr "Aktivitäten" -#: maintenance.php:190 +#: maintenance.php:215 msgid "Add Maintenance" msgstr "Wartung hinzufügen" -#: maintenance.php:223 +#: maintenance.php:248 msgid "View Maintenance" msgstr "Wartung anzeigen" -#: maintenance.php:240 globals.inc:418 +#: maintenance.php:265 globals.inc:498 msgid "n/a" msgstr "" -#: maintenance.php:272 +#: maintenance.php:283 maintenance.php:356 +msgid "Series" +msgstr "Serie" + +#: maintenance.php:299 msgid "No documents found." msgstr "Keine Dokumente gefunden." -#: maintenance.php:281 search.php:122 task.php:291 +#: maintenance.php:308 search.php:124 task.php:305 msgid "Annotations" msgstr "Notizen" -#: maintenance.php:297 +#: maintenance.php:324 msgid "No annotations for this maintenance" msgstr "Keine Notizen für diese Wartung" -#: maintenance.php:301 task.php:311 +#: maintenance.php:328 task.php:325 msgid "Add note" msgstr "Notiz hinzufügen" -#: maintenance.php:316 +#: maintenance.php:341 msgid "Edit Maintenance" msgstr "Wartung bearbeiten" -#: maintenance.php:338 +#: maintenance.php:360 projects.php:383 task.php:219 task.php:299 task.php:375 +msgid "Status" +msgstr "Status" + +#: maintenance.php:368 msgid "Delete Maintenance" msgstr "Wartung löschen" -#: measurement.php:17 globals.inc:460 -msgid "Unknown" -msgstr "Unbekannt" - -#: measurement.php:18 globals.inc:452 -msgid "Precise" -msgstr "Präzise" - -#: measurement.php:19 globals.inc:444 -msgid "Normal" -msgstr "Normal" - -#: measurement.php:20 globals.inc:456 -msgid "Rough" -msgstr "Grob" - -#: measurement.php:21 globals.inc:430 -msgid "Estimated" -msgstr "Geschätzt" - -#: measurement.php:24 +#: measurement.php:30 msgid "1D" msgstr "" -#: measurement.php:25 +#: measurement.php:31 msgid "2D" msgstr "" -#: measurement.php:26 +#: measurement.php:32 msgid "3D" msgstr "" -#: measurement.php:28 task.php:14 task.php:279 +#: measurement.php:34 task.php:16 task.php:293 msgid "unassigned" msgstr "nicht zugeordnet" -#: measurement.php:172 measurement.php:253 +#: measurement.php:214 measurement.php:301 msgid "Measurement" msgstr "Messung" -#: measurement.php:173 measurement.php:213 measurement.php:264 -#: measurement.php:290 note.php:10 note.php:103 +#: measurement.php:215 measurement.php:261 measurement.php:312 +#: measurement.php:338 note.php:12 note.php:105 msgid "Note" msgstr "Notiz" -#: measurement.php:174 +#: measurement.php:216 msgid "Measured" msgstr "Gemessen" -#: measurement.php:175 measurement.php:232 measurement.php:257 -#: measurement.php:309 provisions.php:179 provisions.php:241 provisions.php:274 -#: provisions.php:314 +#: measurement.php:217 measurement.php:280 measurement.php:305 +#: measurement.php:357 provisions.php:181 provisions.php:243 provisions.php:276 +#: provisions.php:316 msgid "Unit" msgstr "Einheit" -#: measurement.php:176 measurement.php:233 measurement.php:262 -#: measurement.php:310 +#: measurement.php:218 measurement.php:281 measurement.php:310 +#: measurement.php:358 msgid "Accuracy" msgstr "Genauigkeit" -#: measurement.php:217 measurement.php:294 +#: measurement.php:265 measurement.php:342 msgid "Dimensions" msgstr "Dimensionen" -#: measurement.php:220 measurement.php:259 measurement.php:297 +#: measurement.php:268 measurement.php:307 measurement.php:345 msgid "Value 1" msgstr "Wert 1" -#: measurement.php:224 measurement.php:260 measurement.php:301 +#: measurement.php:272 measurement.php:308 measurement.php:349 msgid "Value 2" msgstr "Wert 2" -#: measurement.php:228 measurement.php:261 measurement.php:305 +#: measurement.php:276 measurement.php:309 measurement.php:353 msgid "Value 3" msgstr "Wert 3" -#: measurement.php:258 +#: measurement.php:306 msgid "Values" msgstr "Werte" -#: measurement.php:263 +#: measurement.php:311 msgid "Date" msgstr "Datum" -#: measurement.php:281 +#: measurement.php:329 msgid "Edit measurement" msgstr "Messung/Maß bearbeiten" -#: note.php:65 task.php:102 +#: note.php:67 task.php:104 msgid "Note deleted." msgstr "Notiz gelöscht." -#: note.php:100 +#: note.php:102 msgid "ID" msgstr "ID" -#: note.php:101 -msgid "Reference" -msgstr "Referenz" - -#: note.php:127 +#: note.php:129 msgid "Add Note" msgstr "Notiz hinzufügen" -#: note.php:137 +#: note.php:139 #, php-format msgid "Task: %s" msgstr "Aufgabe: %s" -#: note.php:143 +#: note.php:145 #, php-format msgid "Maintenance: %s" msgstr "Wartung: %s" -#: note.php:152 note.php:177 note.php:198 +#: note.php:154 note.php:180 note.php:201 msgid "Annotation" msgstr "Notiz" -#: note.php:164 +#: note.php:166 msgid "View Note" msgstr "Notiz ansehen" -#: note.php:176 +#: note.php:178 msgid "Referenz" msgstr "" -#: note.php:193 +#: note.php:196 msgid "Edit Note" msgstr "Notiz bearbeiten" -#: note.php:213 +#: note.php:216 msgid "Delete Note" msgstr "Lösche Notiz" -#: note.php:217 +#: note.php:220 msgid "" "Deleting an note item is final. There is no way back. Only delete if you are " "absolute sure." @@ -1164,161 +1319,161 @@ msgstr "" "Löschen einer Notiz ist endgültig. Es gibt keinen Weg zurück. Nur löschen " "wenn Sie sich absolut sicher sind." -#: projects.php:10 globals.inc:1282 +#: projects.php:12 globals.inc:1415 msgid "Projects" msgstr "Projekte" -#: projects.php:184 projects.php:298 +#: projects.php:195 projects.php:312 msgid "Start date" msgstr "Startdatum" -#: projects.php:185 projects.php:299 +#: projects.php:196 projects.php:313 msgid "Duration" msgstr "Dauer" -#: projects.php:218 +#: projects.php:232 msgid "Generic Tasks" msgstr "Allgemeine Aufgaben" -#: projects.php:219 +#: projects.php:233 msgid "Tasks not assigned to any project" msgstr "Aufgaben die keinem Projekt zugeordnet sind" -#: projects.php:266 +#: projects.php:280 msgid "Add Project" msgstr "Projekt hinzufügen" -#: projects.php:274 projects.php:297 projects.php:349 task.php:286 task.php:362 +#: projects.php:288 projects.php:311 projects.php:372 task.php:300 task.php:376 msgid "Responsible" msgstr "Verantwortlich" -#: projects.php:307 +#: projects.php:321 msgid "Assigned tasks" msgstr "Zugeordnete Aufgaben" -#: projects.php:316 task.php:10 task.php:205 task.php:253 task.php:278 -#: globals.inc:458 +#: projects.php:328 +msgid "No assigned tasks found." +msgstr "Keine zugeordneten Aufgaben gefunden." + +#: projects.php:335 task.php:12 task.php:216 task.php:267 task.php:292 +#: globals.inc:541 msgid "Task" msgstr "Aufgabe" -#: projects.php:332 +#: projects.php:355 msgid "Edit Project" msgstr "Projekt bearbeiten" -#: projects.php:352 +#: projects.php:375 msgid "Startdate" msgstr "Startdatum" -#: projects.php:356 +#: projects.php:379 msgid "Duration, days" msgstr "Dauer, Tage" -#: projects.php:360 task.php:208 task.php:285 task.php:361 -msgid "Status" -msgstr "Status" - -#: projects.php:374 +#: projects.php:397 msgid "Delete Project" msgstr "Lösche Projekt" -#: provisions.php:10 globals.inc:1280 +#: provisions.php:12 globals.inc:1413 msgid "Provisions" msgstr "Proviant" -#: provisions.php:180 +#: provisions.php:182 msgid "Stored" msgstr "Eingelagert" -#: provisions.php:181 +#: provisions.php:183 msgid "Best before" msgstr "Haltbar bis" -#: provisions.php:230 +#: provisions.php:232 msgid "Add provisions" msgstr "Proviant hinzufügen" -#: provisions.php:243 provisions.php:276 provisions.php:318 +#: provisions.php:245 provisions.php:278 provisions.php:320 msgid "Storedate" msgstr "Einlagerdatum" -#: provisions.php:247 provisions.php:277 provisions.php:322 +#: provisions.php:249 provisions.php:279 provisions.php:324 msgid "Shelflife" msgstr "Haltbarkeitsdatum" -#: provisions.php:273 +#: provisions.php:275 msgid "Weight net" msgstr "Nettogewicht" -#: provisions.php:293 +#: provisions.php:295 msgid "Edit provision" msgstr "Proviant bearbeiten" -#: provisions.php:310 +#: provisions.php:312 msgid "Weight net, kg" msgstr "Nettogewicht, kg" -#: provisions.php:335 +#: provisions.php:337 msgid "Delete provisions" msgstr "Proviant löschen" -#: search.php:10 search.php:30 globals.inc:1198 +#: search.php:12 search.php:32 globals.inc:1252 msgid "Search" msgstr "Suche" -#: settings.php:42 +#: settings.php:75 msgid "YYYY-MM-DD" msgstr "" -#: settings.php:43 +#: settings.php:76 msgid "YYYY/MM/DD" msgstr "" -#: settings.php:44 +#: settings.php:77 msgid "DD.MM.YYYY" msgstr "" -#: settings.php:45 +#: settings.php:78 msgid "DD/MM/YYYY" msgstr "" -#: settings.php:46 +#: settings.php:79 msgid "MM/DD/YYYY" msgstr "" -#: settings.php:69 +#: settings.php:102 msgid "Date format" msgstr "" -#: settings.php:72 +#: settings.php:105 msgid "Number of rows per page" msgstr "" -#: settings.php:80 +#: settings.php:114 msgid "Maximal image width" msgstr "" -#: settings.php:84 +#: settings.php:118 msgid "Maximal image height" msgstr "" -#: storage.php:62 +#: storage.php:65 msgid "Delete failed, assigned boxes detected!" msgstr "Löschen fehlgeschlagen, zugeordnete Kisten vorhanden!" -#: storage.php:70 +#: storage.php:73 msgid "Delete failed, assigned equipment detected!" msgstr "Löschen fehlgeschlagen, zugeordnete Ausrüstug vorhanden!" -#: storage.php:76 +#: storage.php:82 #, php-format -msgid "Deleted storage no. %d" -msgstr "Lösche Stauraum Nr. %d" +msgid "Deleted storage no. %d (%s)" +msgstr "Stauraum Nr. %d gelöscht" -#: storage.php:110 +#: storage.php:116 msgid "Position" msgstr "Position" -#: storage.php:186 +#: storage.php:192 msgid "Add Storage" msgstr "Stauraum hinzufügen" @@ -1362,19 +1517,19 @@ msgstr "Kein Proviant enthalten" msgid "Edit Storage" msgstr "Stauraum bearbeiten" -#: storage.php:296 +#: storage.php:299 msgid "Position (x, y, z) in mm" msgstr "Position (x, y, z) in mm" -#: storage.php:310 +#: storage.php:313 msgid "Width (x, y, z) in mm" msgstr "Maße (x, y, z) in mm" -#: storage.php:341 +#: storage.php:344 msgid "Delete Storage" msgstr "Stauraum löschen" -#: storage.php:347 +#: storage.php:350 msgid "" "Deleting a storage is final. There is no way back. Only delete if you are " "absolute sure." @@ -1382,100 +1537,96 @@ msgstr "" "Löschen eines Stauraums ist endgültig. Es gibt keinen Weg zurück. Nur " "löschen wenn Sie sich absolut sicher sind." -#: tag.php:111 tag.php:168 tag.php:217 +#: tag.php:117 tag.php:182 tag.php:259 msgid "Tag" msgstr "" -#: tag.php:139 +#: tag.php:153 msgid "Add Tag" msgstr "Tag hinzufügen" -#: tag.php:165 +#: tag.php:179 msgid "View Tag" msgstr "Tag anzeigen" -#: tag.php:175 +#: tag.php:189 msgid "Tag usage" msgstr "Tag-Nutzung" -#: tag.php:195 tag.php:246 -msgid "Tag is not used anywhere" -msgstr "Unbenutzte Tags" - -#: tag.php:199 +#: tag.php:241 msgid "Related tags" msgstr "Zugeordnete Tags" -#: tag.php:200 task.php:315 +#: tag.php:242 task.php:329 msgid "Not yet implemented" msgstr "Noch nicht implementiert" -#: tag.php:212 +#: tag.php:254 msgid "Edit tag" msgstr "Tag bearbeiten" -#: tag.php:236 +#: tag.php:278 msgid "Delete tag" msgstr "Tag löschen" -#: task.php:100 +#: task.php:102 msgid "Task deleted" msgstr "Aufgabe gelöscht" -#: task.php:189 task.php:207 task.php:280 task.php:342 +#: task.php:192 task.php:218 task.php:294 task.php:356 msgid "Priority" msgstr "Priorität" -#: task.php:206 task.php:250 task.php:279 task.php:341 globals.inc:453 +#: task.php:217 task.php:264 task.php:293 task.php:355 globals.inc:536 msgid "Project" msgstr "Projekt" -#: task.php:243 +#: task.php:257 msgid "Add Task" msgstr "Aufgabe hinzufügen" -#: task.php:276 +#: task.php:290 msgid "View Task" msgstr "Aufgabe anzeigen" -#: task.php:280 +#: task.php:294 msgid "none" msgstr "keine" -#: task.php:281 task.php:345 +#: task.php:295 task.php:359 msgid "Plan date" msgstr "Plandatum" -#: task.php:282 task.php:349 +#: task.php:296 task.php:363 msgid "Due date" msgstr "Fälligkeitsdatum" -#: task.php:283 task.php:353 +#: task.php:297 task.php:367 msgid "Started at" msgstr "Gestartet am" -#: task.php:284 task.php:357 +#: task.php:298 task.php:371 msgid "Finished at" msgstr "Fertiggestellt am" -#: task.php:307 +#: task.php:321 msgid "No annotations for this task" msgstr "Keine Notizen für diese Aufgabe" -#: task.php:330 +#: task.php:344 msgid "Edit Task" msgstr "Aufgabe bearbeiten" -#: task.php:375 +#: task.php:389 msgid "Delete Task" msgstr "Aufgabe löschen" -#: task.php:376 +#: task.php:390 #, php-format msgid "Task no. %d" msgstr "Aufgabe Nr.: %d" -#: task.php:379 +#: task.php:393 msgid "" "Deleting a task item is final. There is no way back. Only delete if you are " "absolute sure." @@ -1483,206 +1634,234 @@ msgstr "" "Löschen einer Aufgabe ist endgültig. Es gibt keinen Weg zurück. Nur löschen " "wenn Sie sich absolut sicher sind." -#: globals.inc:141 +#: globals.inc:131 +msgid "― unknown ―" +msgstr "― unbekannt ―" + +#: globals.inc:149 msgid "Information" msgstr "" -#: globals.inc:180 +#: globals.inc:188 msgid "Success" msgstr "Erfolg" -#: globals.inc:191 +#: globals.inc:199 msgid "Warning" msgstr "Warnung" -#: globals.inc:247 +#: globals.inc:260 msgid "Username or password was empty" msgstr "Benutzername oder Kennwort war leer" -#: globals.inc:258 +#: globals.inc:271 msgid "User account does not exist" msgstr "Benutzer existiert nicht" -#: globals.inc:267 +#: globals.inc:280 msgid "Username or password invalid" msgstr "Benutzername oder Kennwort ungültig" -#: globals.inc:290 +#: globals.inc:303 msgid "User not logged in" msgstr "Benutzer ist nicht angemeldet" -#: globals.inc:419 +#: globals.inc:499 +msgid "Active" +msgstr "Aktiv" + +#: globals.inc:500 msgid "Bad" msgstr "Schlecht" -#: globals.inc:421 +#: globals.inc:503 msgid "Catamaran" msgstr "Katamaran" -#: globals.inc:422 +#: globals.inc:504 msgid "Completed" msgstr "erledigt" -#: globals.inc:423 +#: globals.inc:505 msgid "Closed" msgstr "Geschlossen" -#: globals.inc:425 +#: globals.inc:507 msgid "Defect" msgstr "Defekt" -#: globals.inc:426 +#: globals.inc:508 msgid "Deleted" msgstr "Gelöscht" -#: globals.inc:427 +#: globals.inc:509 msgid "Done" msgstr "Fertig" -#: globals.inc:431 +#: globals.inc:512 +msgid "Estimated" +msgstr "Geschätzt" + +#: globals.inc:513 msgid "Finished" msgstr "Fertig" -#: globals.inc:432 +#: globals.inc:514 msgid "Fixed" msgstr "Fixiert" -#: globals.inc:434 +#: globals.inc:517 msgid "Good" msgstr "Gut" -#: globals.inc:435 +#: globals.inc:518 msgid "High" msgstr "Hoch" -#: globals.inc:437 +#: globals.inc:520 msgid "Locked" msgstr "Gesperrt" -#: globals.inc:438 +#: globals.inc:521 msgid "Low" msgstr "Niedrig" -#: globals.inc:440 +#: globals.inc:523 msgid "Medium" msgstr "Mittel" -#: globals.inc:441 +#: globals.inc:524 msgid "Monohull" msgstr "" -#: globals.inc:442 +#: globals.inc:525 msgid "New" msgstr "Neu" -#: globals.inc:443 +#: globals.inc:526 msgid "None" msgstr "Keine" -#: globals.inc:445 +#: globals.inc:527 +msgid "Normal" +msgstr "Normal" + +#: globals.inc:528 msgid "Ongoing" msgstr "Laufend" -#: globals.inc:446 +#: globals.inc:529 msgid "Open" msgstr "Offen" -#: globals.inc:447 +#: globals.inc:530 msgid "Ordered" msgstr "Bestellt" -#: globals.inc:448 +#: globals.inc:531 msgid "Paused" msgstr "Pausiert" -#: globals.inc:449 +#: globals.inc:532 msgid "Pending" msgstr "Ausstehend" -#: globals.inc:450 +#: globals.inc:533 msgid "Picture" msgstr "Bild" -#: globals.inc:451 +#: globals.inc:534 msgid "Planned" msgstr "Geplant" -#: globals.inc:454 +#: globals.inc:535 +msgid "Precise" +msgstr "Präzise" + +#: globals.inc:537 msgid "Removed" msgstr "Entfernt" -#: globals.inc:455 +#: globals.inc:538 msgid "Repairable" msgstr "Reparierbar" -#: globals.inc:459 +#: globals.inc:539 +msgid "Rough" +msgstr "Grob" + +#: globals.inc:542 msgid "Trimaran" msgstr "" -#: globals.inc:463 +#: globals.inc:543 +msgid "Unknown" +msgstr "Unbekannt" + +#: globals.inc:546 msgid "waiting" msgstr "wartend" -#: globals.inc:930 +#: globals.inc:1069 msgid "Tag assignment" msgstr "Tag-Zuordnung" -#: globals.inc:934 +#: globals.inc:1073 msgid "(Separate by comma)" msgstr "(Getrennt mit Komma)" -#: globals.inc:1101 +#: globals.inc:1155 #, php-format msgid "%d B" msgstr "" -#: globals.inc:1103 +#: globals.inc:1157 #, php-format msgid "%.1f kB" msgstr "" -#: globals.inc:1105 +#: globals.inc:1159 #, php-format msgid "%.1f MB" msgstr "" -#: globals.inc:1110 globals.inc:1119 +#: globals.inc:1164 globals.inc:1173 #, php-format msgid "%d Byte" msgstr "" -#: globals.inc:1112 +#: globals.inc:1166 #, php-format msgid "%.1f kByte" msgstr "" -#: globals.inc:1114 +#: globals.inc:1168 #, php-format msgid "%.1f MByte" msgstr "" -#: globals.inc:1121 +#: globals.inc:1175 #, php-format msgid "approx. %.1f kByte" msgstr "ca. %.1f kByte" -#: globals.inc:1123 +#: globals.inc:1177 #, php-format msgid "approx. %.1f MByte" msgstr "ca. %.1f MByte" -#: globals.inc:1226 globals.inc:1229 +#: globals.inc:1280 globals.inc:1283 msgid "First" msgstr "Erster" -#: globals.inc:1227 globals.inc:1230 +#: globals.inc:1281 globals.inc:1284 msgid "Previous" msgstr "Zurück" -#: globals.inc:1245 globals.inc:1248 +#: globals.inc:1318 globals.inc:1321 msgid "Next" msgstr "Vor" -#: globals.inc:1246 globals.inc:1249 +#: globals.inc:1319 globals.inc:1322 msgid "Last" msgstr "Letzter" di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mv&D?4qW%r_QT;z=U8U8vaf9h0)ub^h0>yP_W zQc%<@;)*SQ^23R{?E9?_NmDj+k9jT{oj*rr#M`Gw1HME!EeT6ku!Rh*X)ww(JGP+!^A6H*Kr?z~~EZ?Zw zR9~;DP2u?in>9@=d@jU|DDK>pRoo)Py?=PRdvtiD+hIg$`=a_8RsQ;Vr^H{spx$5W zE*p{5v}45LkftdkKL~9RT&z2&beQ`{>8Pj){@U{D`nff=^)qKwPIrda)>ODLqh4}P Zje4qS=jcyE-CbjI-8SPExhuzY{eN9bZ@&Nl diff --git a/webgui/login.php b/webgui/login.php index 0fe4806..622bdd3 100644 --- a/webgui/login.php +++ b/webgui/login.php @@ -47,7 +47,7 @@ $(document).ready(function(){
    - sailboat + sailboat
    diff --git a/webgui/maintenance.php b/webgui/maintenance.php index 192f6f8..93694bf 100644 --- a/webgui/maintenance.php +++ b/webgui/maintenance.php @@ -79,7 +79,7 @@ if ($action == ACT_DEFAULT): page_caption_search($pagetitle); // load filter from db -$flt = db_get_filter($user->id, 204); +$flt = db_get_filter($user->id, 204, ['equip','txt']); // Filter $opt_special = array( @@ -140,6 +140,20 @@ if (strlen($flt->txt) > 1) { $where = join(' AND ', $w); $order = ' ORDER BY m.maintid'; +$sql = "SELECT COUNT(*) FROM maintenance AS m WHERE " . $where; +$sth = $pdo->prepare($sql); +try { + $sth->execute($p); +} catch(PDOException $e) { + $g_error->Add($e->getMessage()); + $g_error->Add($sql); + $g_error->Add(print_r($p, true)); + $g_error->PrintOut(); +} +$numrows = $sth->fetchColumn(); +$page = gpc_get_int($_REQUEST, 'p', 1); +$rows_pp = gpc_get_int($_REQUEST, 'n', $user->rows_pp); +$lastpage = ceil($numrows/$rows_pp); $sql = "SELECT m.maintid, m.activities, m.remarks, e.ename " . "FROM maintenance AS m LEFT OUTER JOIN equipment AS e USING (eid)"; @@ -147,12 +161,16 @@ $sql .= ' WHERE ' . $where; $sql .= $order; // if pagination: -// $sql .= ' LIMIT ' . ($page - 1) * $rows_pp . ',' . $rows_pp; +$sql .= ' LIMIT ' . ($page - 1) * $rows_pp . ',' . $rows_pp; $sth = $pdo->prepare($sql); $sth->execute($p); $res = $sth->fetchAll(); +// Pagination on top +$pagination = get_pagination($g_scriptname, '', $page, $lastpage); +echo $pagination; + echo '', "\n"; echo "\n"; echo ""; @@ -182,10 +200,12 @@ foreach ($res as $row) { } // Table summary echo "\n"; -echo '', "\n"; +echo '', "\n"; echo "\n"; echo "
    ', sprintf(_('%d records'), count($res)), '
    ', sprintf(_('Records %d to %d of %d'), $i0, $i, $numrows), '
    \n"; +echo $pagination; + form_add_button($g_scriptname); diff --git a/webgui/manual.php b/webgui/manual.php index 176fa13..b84c9f3 100644 --- a/webgui/manual.php +++ b/webgui/manual.php @@ -16,7 +16,7 @@ require 'header.php';

    -Hinweis: Es handelt sich hier um einen Prototypen! +Hinweis: Es handelt sich hier um einen Prototypen (Version )!
    Einige Funktionen sind noch nicht oder nicht vollständig implementiert. Rückmeldungen sind immer willkommen!

    diff --git a/webgui/measurement.php b/webgui/measurement.php index 3e9c37a..220d5ce 100644 --- a/webgui/measurement.php +++ b/webgui/measurement.php @@ -9,20 +9,23 @@ require 'globals.inc'; require 'lib/gpc.inc'; +// TODO move to somewhere else +function format_vals($n, $v1, $v2, $v3) { + if ($n == 1) { + return $v1; + } elseif ($n == 2) { + return $v1 . 'x'. $v2; + } else { + return $v1 . 'x'. $v2 . 'x' . $v3; + } +} + $pagetitle = _('Measurements'); $id = gpc_get_int($_REQUEST, 'id', 0); -$opt_mtype = db_load_enum('measurement', 'mtype', true, false); $opt_unit = db_get_options(8); -// TODO use enum function -$opt_accuracy = array( - 'unknown' => _('Unknown'), - 'precise' => _('Precise'), - 'normal' => _('Normal'), - 'rough' => _('Rough'), - 'estimated' => _('Estimated') -); +$opt_accuracy = db_load_enum('measurement', 'accuracy', true, true); $opt_dimensions = array( 1 => _('1D'), 2 => _('2D'), @@ -54,9 +57,13 @@ switch ($submit = form_get_action()) { $action = ACT_DEFAULT; break; + case 'freset': + db_clear_filter(207); + $action = ACT_DEFAULT; + break; + case 'insert': $p[':mname'] = gpc_get_string($_POST, 'mname'); - $p[':mtype'] = gpc_get_string($_POST, 'mtype'); $p[':note'] = gpc_get_string($_POST, 'note'); $p[':nval'] = gpc_get_int($_POST, 'nval'); // 1 to 3 dimensions $p[':val1'] = gpc_get_int($_POST, 'val1'); @@ -81,7 +88,6 @@ switch ($submit = form_get_action()) { case 'update': $p[':mid'] = $id; $p[':mname'] = gpc_get_string($_POST, 'mname'); - $p[':mtype'] = gpc_get_string($_POST, 'mtype'); $p[':nval'] = gpc_get_int($_POST, 'nval'); // 1 to 3 dimensions $p[':val1'] = gpc_get_int($_POST, 'val1'); $p[':val2'] = NULL; @@ -130,20 +136,37 @@ require 'header.php'; if ($action == ACT_DEFAULT): // ========== VARIANT: default behavior ======================================= +page_caption_search($pagetitle); + // load filter from db -$flt = db_get_filter($user->id, 207); +$flt = db_get_filter($user->id, 207, ['txt']); -function format_vals($n, $v1, $v2, $v3) { - if ($n == 1) { - return $v1; - } elseif ($n == 2) { - return $v1 . 'x'. $v2; - } else { - return $v1 . 'x'. $v2 . 'x' . $v3; - } +$w = array('(vid=:vid OR vid IS NULL)'); +$p = array(':vid' => $user->vid); + +// TODO precision additionally as filter + +if (strlen($flt->txt) > 1) { + $w[] = 'mname LIKE :txt'; + $p[':txt'] = '%'.$flt->txt.'%'; } +$where = join(' AND ', $w); +$order = ' ORDER BY mname'; -echo "

    $pagetitle

    \n"; +$sql = "SELECT COUNT(*) FROM measurement WHERE " . $where; +$sth = $pdo->prepare($sql); +try { + $sth->execute($p); +} catch(PDOException $e) { + $g_error->Add($e->getMessage()); + $g_error->Add($sql); + $g_error->Add(print_r($p, true)); + $g_error->PrintOut(); +} +$numrows = $sth->fetchColumn(); +$page = gpc_get_int($_REQUEST, 'p', 1); +$rows_pp = gpc_get_int($_REQUEST, 'n', $user->rows_pp); +$lastpage = ceil($numrows/$rows_pp); // Filter $opt_special = array( @@ -154,23 +177,36 @@ $opt_special = array(
    Filter
    -
    - - - - +
    +
    + + +
    +
    +
    query($sql); + . "FROM measurement "; +$sql .= ' WHERE ' . $where; +$sql .= $order; + +// if pagination: +$sql .= ' LIMIT ' . ($page - 1) * $rows_pp . ',' . $rows_pp; + +$sth = $pdo->prepare($sql); +$sth->execute($p); $res = $sth->fetchAll(); + +// Pagination on top +$pagination = get_pagination($g_scriptname, '', $page, $lastpage); +echo $pagination; + echo '', "\n"; echo "\n"; echo "\n"; @@ -206,6 +242,8 @@ echo '' echo "\n"; echo "
    ', sprintf(_('%d records'), count($res)), '
    \n"; +echo $pagination; + form_add_button($g_scriptname); elseif ($action == ACT_ADD): @@ -224,7 +262,6 @@ echo '

    ', _('Add measurement'), "

    \n";
    @@ -254,7 +291,7 @@ form_create_select('eid', _('Equipment'), $opt_equipment, $id); elseif ($action == ACT_VIEW): // ========== VARIANT: view single record ===================================== -$sql = "SELECT mname, mtype, unit, nval, val1, val2, val3, accuracy, mdate, note, eid " +$sql = "SELECT mname, unit, nval, val1, val2, val3, accuracy, mdate, note, eid " . "FROM measurement " . "WHERE mid=?"; $sth = $pdo->prepare($sql); @@ -265,7 +302,6 @@ echo '

    ', _('Measurement'), "

    \n"; echo '', "\n"; echo '\n"; -echo '\n"; echo '\n"; echo '\n"; echo '\n"; @@ -283,7 +319,7 @@ form_view_buttons($g_scriptname, $id); elseif ($action == ACT_EDIT): // ========== VARIANT: edit single record ===================================== -$sql = "SELECT mname, mtype, nval, val1, val2, val3, unit, accuracy, note, eid " +$sql = "SELECT mname, nval, val1, val2, val3, unit, accuracy, note, eid " . "FROM measurement " . "WHERE mid=?"; $sth = $pdo->prepare($sql); @@ -303,7 +339,6 @@ echo '

    ', _('Edit measurement'), "

    \n"; mtype); form_create_select('nval', _('Dimensions'), $opt_dimensions, $measurement->nval); ?>
    diff --git a/webgui/note.php b/webgui/note.php index 746ef15..02bd081 100644 --- a/webgui/note.php +++ b/webgui/note.php @@ -176,7 +176,8 @@ $note = $sth->fetch(PDO::FETCH_OBJ); // list where annotaion used echo '
    ', _('Name'),"", $measurement->mname, "
    ', _('Type'),"", $opt_mtype[$measurement->mtype], "
    ', _('Unit'),"", $opt_unit[$measurement->unit], "
    ', _('Values'),"$measurement->nval
    ', _('Value 1'),"$measurement->val1
    ', "\n"; echo '\n"; -echo '\n"; +echo '\n"; +echo '\n"; echo "
    ', _('Referenz'),"", $note->refid, "
    ', _('Annotation'),"", $note->annotation, "
    ', _('Type'),"", $note->notetype, "
    ', _('Annotation'),"", nl2br($note->annotation), "
    \n"; diff --git a/webgui/projects.php b/webgui/projects.php index f993391..733fada 100644 --- a/webgui/projects.php +++ b/webgui/projects.php @@ -47,7 +47,7 @@ switch ($submit = form_get_action()) { case 'filter': $flt = array(); $flt['name'] = gpc_get_string($_POST, 'flt_name'); - $flt['state'] = $_POST['flt_state']; // Array! gpc_get_string($_POST, 'flt_state'); + $flt['state'] = gpc_get_string($_POST, 'flt_state'); // TODO perhaps change to checkboxes $flt['remarks'] = gpc_get_string($_POST, 'flt_remarks'); db_save_filter($flt, 205); $action = ACT_DEFAULT; @@ -107,16 +107,22 @@ if ($action == ACT_DEFAULT): page_caption_search($pagetitle); // load filter from db -$flt = db_get_filter($user->id, 205); - -// name, status, text +$flt = db_get_filter($user->id, 205, ['name','state','remarks']); $w = array('vid=:vid'); $p = array(':vid' => $user->vid); -if (strlen($flt->txt) > 1) { - $w[] = '(projname LIKE :txt OR remarks LIKE :txt)'; - $p[':txt'] = '%'.$flt->txt.'%'; +if ($flt->state > 0) { + $w[] = 'projstate=:state'; + $p[':state'] = $flt->state; +} +if (strlen($flt->name) > 1) { + $w[] = '(projname LIKE :name)'; + $p[':name'] = '%'.$flt->name.'%'; +} +if (strlen($flt->remarks) > 1) { + $w[] = '(remarks LIKE :remarks)'; + $p[':remarks'] = '%'.$flt->remarks.'%'; } $where = join(' AND ', $w); @@ -134,7 +140,7 @@ try { } $numrows = $sth->fetchColumn(); $page = gpc_get_int($_REQUEST, 'p', 1); -$rows_pp = gpc_get_int($_REQUEST, 'n', $g_rows_pp); +$rows_pp = gpc_get_int($_REQUEST, 'n', $user->rows_pp); $lastpage = ceil($numrows/$rows_pp); // $grandtotal = $pdo->query("SELECT COUNT(*) FROM project WHERE " . $where)->fetchColumn(); @@ -145,7 +151,7 @@ $sql .= " WHERE " . $where; $sql .= $order; // if pagination: -$sql .= ' LIMIT ' . ($page - 1) * $g_rows_pp . ',' . $g_rows_pp; +$sql .= ' LIMIT ' . ($page - 1) * $rows_pp . ',' . $rows_pp; $sth = $pdo->prepare($sql); $sth->execute($p); @@ -158,15 +164,15 @@ $res = $sth->fetchAll();
    Filter
    - - + +
    state, FALSE); +filter_create_select('flt_state', _('State'), $g_opt_all + $opt_state, $flt->state ?? -2, FALSE); ?>
    - - + +
    -
    - -
    @@ -223,7 +221,7 @@ $storage = $sth->fetch(PDO::FETCH_OBJ); echo '

    ', $storage->sname, "

    \n"; echo '', "\n"; -echo '\n"; +echo '\n"; echo '\n"; echo '\n"; echo '\n"; @@ -294,6 +292,9 @@ $storage = $sth->fetch(PDO::FETCH_OBJ); +stype); +?>
    diff --git a/webgui/tag.php b/webgui/tag.php index a8e6f60..a639a81 100644 --- a/webgui/tag.php +++ b/webgui/tag.php @@ -80,7 +80,7 @@ if ($action == ACT_DEFAULT): // ========== VARIANT: default behavior ======================================= // load filter from db -$flt = db_get_filter($user->id, 210); +$flt = db_get_filter($user->id, 210, ['txt']); echo "

    $pagetitle

    \n"; @@ -91,12 +91,15 @@ echo "

    $pagetitle

    \n";
    Filter
    -
    - - - - - +
    +
    + + +
    +
    +
    @@ -110,20 +113,29 @@ $res = $sth->fetchAll(); echo '
    ', _('Typ'),"", $stype[$storage->stype], "
    ', _('Typ'),"", $opt_stype[$storage->stype], "
    ', _('Capacity'),"", $storage->capacity, ' ', $storage->capaunit, "
    ', _('Location (x, y, z)'),"(", $storage->x, ', ', $storage->y, ', ', $storage->z, ")
    ', _('Width (wx, wy, wz)'),"(", $storage->wx, ', ', $storage->wy, ', ', $storage->wz, ")
    ', "\n"; echo "\n"; echo "\n"; +echo ''; echo '"; echo '"; echo '"; echo ""; echo "\n"; echo "\n"; +$i = 0; foreach ($res as $row) { + $i++; // record number echo "\n"; + echo '\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; + echo "\n"; echo "\n"; } @@ -179,19 +191,47 @@ $sql = "SELECT objid, objtype FROM tagref WHERE tagid=?"; $sth = $pdo->prepare($sql); $sth->execute([$id]); -$link = array( - 'equip' => 'equipment.php', - 'inv' => 'inventory.php', - 'prov' => 'provisions.php', - 'doc' => 'documents.php', - 'proj' => 'projects.php', - 'task' => 'task.php', - 'maint' => 'maintenance.php' - ); echo '

    '; if ($sth->rowCount() > 0) { - foreach ($sth->fetchAll() as $row) { - echo '', $row['objid'], '/', $row['objtype'], "\n"; + $res = $sth->fetchAll(); + foreach ($res as $row) { + // select object name or description depending on objecttype + // TODO function db_get_tag_target($objtype, $objid); + /*switch ($row['objtype']) { + case 'equip': + $sql = "SELECT ename FROM equipment WHERE eid=?"; + $target = "equipment.php"; + break; + case 'inv': + $sql = "SELECT invname FROM inventory WHERE invid=?"; + $target = "inventory.php"; + break; + case 'prov': + $sql = "SELECT provname FROM provisions WHERE provvid=?"; + $target = "provisions.php"; + break; + case 'doc': + $sql = "SELECT title FROM document WHERE docid=?"; + $target = "documents.php"; + break; + case 'proj': + $sql = "SELECT projname FROM project WHERE projid=?"; + $target = "projects.php"; + break; + case 'task': + $sql = "SELECT taskname FROM task WHERE taskid=?"; + $target = "task.php"; + break; + case 'maint': + $sql = "SELECT activities FROM maintenance WHERE maintid=?"; + $target = 'maintenance.php'; + break; + } + $sth = $pdo->prepare($sql); + $sth->execute([$row['objid']]); + $desc = $sth->fetchColumn(); */ + [$target, $desc] = db_get_tag_target($row['objtype'], $row['objid']); + echo '', $desc, ' (', $row['objid'], '/', $row['objtype'], ")\n"; } } else { echo _('Tag is not used anywhere'); @@ -242,7 +282,7 @@ $sth = $pdo->prepare($sql); $sth->execute([$id]); if ($sth->rowCount() > 0) { foreach ($sth->fetchAll() as $row) { - echo '', $row['objid'], '/', $row['objtype'], "\n"; + echo '', $row['objid'], '/', $row['objtype'], "\n"; } } else { echo _('Tag is not used anywhere'); diff --git a/webgui/task.php b/webgui/task.php index d83e555..e6c4f83 100644 --- a/webgui/task.php +++ b/webgui/task.php @@ -124,7 +124,7 @@ if ($action == ACT_DEFAULT): page_caption_search($pagetitle); // load filter from db -$flt = db_get_filter($user->id, 206); +$flt = db_get_filter($user->id, 206, ['txt','prio', 'stat']); $w = array('(t.vid=:vid OR t.vid IS NULL)'); $p = array(':vid' => $user->vid); @@ -170,7 +170,8 @@ $sql = "SELECT t.taskid, t.vid, t.projid, t.taskname, t.priority, t.taskstate," if ($order) $sql .= $order; // if pagination: -// $sql .= ' LIMIT ' . ($page - 1) * $g_rows_pp . ',' . $g_rows_pp; +$sql .= ' LIMIT ' . ($page - 1) * $rows_pp . ',' . $rows_pp; + $sth = $pdo->prepare($sql); try { $sth->execute($p); @@ -186,20 +187,28 @@ $res = $sth->fetchAll();

    Filter
    -
    +
    prio); filter_create_select('flt_stat', _('State'), $g_opt_all + $opt_state, $flt->stat); ?> - - - - +
    + + +
    +
    +
    ', "\n"; echo "
    \n"; echo "\n"; @@ -237,6 +246,9 @@ echo '' echo "\n"; echo "
    #', _('Tag'), "', _('Description'), "', _('Color'), "
    ', $i; + echo '', "\n"; + echo "", $row['tagname'], "", $row['description'], "", format_color($row['color']), ""; - // Action buttons - form_action_buttons($g_scriptname, $row['tagid']); + // Edit current record button + echo ""; + echo '', "\n"; + echo "
    ', sprintf(_('%d records'), count($res)), '
    \n"; +// additional pagination at bottom +echo $pagination; + form_add_button($g_scriptname); elseif ($action == ACT_ADD): @@ -301,7 +313,7 @@ if ($sth->rowCount() > 0) { $n = 0; foreach ($sth->fetchAll() as $row) { $n += 1; - echo "

    ($n) {$row['annotation']}"; + echo "

    ($n) ", nl2br($row['annotation']); echo ' '; echo "

    \n"; } diff --git a/ymspass.py b/ymspass.py new file mode 100755 index 0000000..3dc2f12 --- /dev/null +++ b/ymspass.py @@ -0,0 +1,51 @@ +#!/usr/bin/python3 + +import os +import sys +import configparser +from yms import database +from getpass import getpass +import bcrypt + +cfg = { + 'cfgfile': '~/.config/ymsgui.conf', + 'host': 'localhost', + 'db': 'yms', + 'user': 'yms' +} + +def set_pass(): + newpass = getpass('New Password: ') + cryptpass = bcrypt.hashpw(newpass.encode(), bcrypt.gensalt()) + print(cryptpass.decode()) + + sql = "UPDATE user SET pass=%s WHERE userid=%s" + +def get_user(): + username = input('Username: ') + sql = "SELECT userid FROM user WHERE login=%s" + db.cur.execute(sql, (username,)) + row = db.cur.fetchone() + if not row: + print("User not found") + return -1 + else: + return row[0] + +if __name__ == "__main__": + config = configparser.ConfigParser() + configfile = os.path.expanduser(cfg['cfgfile']); + if not config.read(configfile): + print(f"Configuration file '{configfile}' not found.") + else: + cfg['host'] = config.get('DB', 'host') + cfg['db'] = config.get('DB', 'db') + cfg['user'] = config.get('DB', 'user') + cfg['pass'] = config.get('DB', 'pass') + db = database.Database(cfg['host'], cfg['db']) + if db.connect(cfg['user'], cfg['pass']): + print("Connected to database") + print(get_user()) + db.disconnect() + else: + print("Cannot connect to database {}@{}".format(cfg['db'], cfg['host']))