-- https://www.phpmyadmin.net/
--
-- Erstellungszeit: 12. Mrz 2019 um 08:20
-- Server-Version: 10.1.37-MariaDB-0+deb9u1
-- PHP-Version: 7.3.3-1+0~20190307202245.32+stretch~1.gbp32ebb2

START TRANSACTION;



--
-- Datenbank: `pm_togo`
--

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pm_attributes`
--

CREATE TABLE `pm_attributes` (
  `aid` int(5) NOT NULL,
  `name` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `type` int(3) NOT NULL,
  `status` int(2) NOT NULL,
  `parent` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Daten für Tabelle `pm_attributes`
--

INSERT INTO `pm_attributes` (`aid`, `name`, `description`, `type`, `status`, `parent`) VALUES
(1, 'Generic Document', 'Documents, that are not multimedia content or application project files such as qgis files or the like. Generally office documents, manuals, posters etc.should be subcategories of this.', 1, 2, 0),
(4, 'Main Cat one', 'A basis category', 4, 2, 0),
(18, 'Media Type', 'E-book, image file, textfile or similar', 5, 2, 0),
(19, 'Printed Media', 'Printed document in the inventory. Needs to have a inventory ID.', 5, 2, 18),
(20, 'Online Media', 'Document is online only', 5, 2, 18),
(21, 'Draft Status', 'Development state', 6, 2, 0),
(22, 'Final Draft', 'Draft waiting for final approval', 6, 2, 21),
(23, 'Final version', 'Document is in its final stage of development', 6, 2, 21),
(24, 'Language', 'Language of a document or mediafile.', 7, 2, 0),
(25, 'Bahasa', 'Bahasa Indonesia.', 7, 2, 24),
(26, 'English', 'Standard English or american English.', 7, 2, 24),
(27, 'Chinese', 'Mandarin or Kantonese', 7, 2, 24),
(28, 'Arabic', 'Arabic Language.', 7, 2, 24),
(29, 'Japanese', 'Japanese', 7, 2, 24),
(30, 'Other', 'Any other Language', 7, 2, 24),
(31, 'Downloadability', 'Determines whether a file or dataset is available as download', 8, 2, 0),
(32, 'Internal Download', 'Downlodable for logged in users', 8, 2, 31),
(33, 'Internal Download limited', 'Downlodable for logged in users of status staff member or higher', 8, 2, 31),
(34, 'No Download', 'File access is suspended', 8, 2, 31),
(35, 'user status', 'the hierarchical status of a registered user', 2, 2, 0),
(45, '1', 'minimal user status', 2, 2, 35),
(46, '2', 'trusted guest user', 2, 2, 35),
(47, '3', 'staff member', 2, 2, 35),
(48, '4', 'expert', 2, 2, 35),
(49, '5', 'staff group lead', 2, 2, 35),
(50, '6', 'project lead', 2, 2, 35),
(51, '7', 'editor', 2, 2, 35),
(52, '8', 'junior administrator', 2, 2, 35),
(53, '9', 'administrator', 2, 2, 35),
(54, 'attribute status', 'Status and thus availability of attributes', 3, 2, 0),
(55, '1', 'document or attribute archived, only available for users with status>6', 3, 2, 54),
(56, '2', 'attribute available for general use', 3, 2, 54),
(57, '3', 'attribute available for special use', 3, 2, 54),
(58, 'Subcat one', 'A subcat fpr main cat one', 4, 2, 4),
(59, 'German', 'Standard German Language', 7, 2, 24),
(60, 'Public Download', 'May be downloaded by any user and visitor of the website.', 8, 2, 31),
(61, 'GIS_object_types', 'Types of geographically determined objects', 9, 2, 0),
(62, 'POI', 'Single Point of Interest', 9, 2, 61),
(63, 'Polyline', 'Linear vector from point a to point b with optional nodes in between.', 9, 2, 61),
(64, 'Polygon', 'Closed area with at least 3 corners.', 9, 2, 61),
(65, 'Circle', 'Circular area determined by center coordinates and radius length.', 9, 2, 61),
(66, 'Blog Article', 'Longer article in your blog.', 1, 2, 1),
(67, 'Comment', 'A comment must always refer to another document or other basic entity(GIS object, Blog post, whatever).', 1, 2, 1),
(68, 'File type', 'All types of files similar to mime types but simpler and more generic', 10, 2, 0),
(69, 'picture file', 'Picture that can be PNG, JPG or TIFF', 10, 2, 68),
(70, 'File description', 'To be used as a initial comment, for the popup of the center POI of a map or as a caption for  a file or image', 1, 2, 1),
(71, 'Shapefile', 'Document is a shapefile or a zip archive of shapefiles', 5, 2, 18);

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pm_bills`
--

CREATE TABLE `pm_bills` (
  `bid` int(12) NOT NULL,
  `btype` int(2) NOT NULL,
  `sum` double NOT NULL,
  `date` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `item` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `remark` text COLLATE utf8_unicode_ci NOT NULL,
  `filed_by` int(8) NOT NULL,
  `status` int(2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Daten für Tabelle `pm_bills`
--

INSERT INTO `pm_bills` (`bid`, `btype`, `sum`, `date`, `item`, `remark`, `filed_by`, `status`) VALUES
(1, 2, 34, '1523782800', 'pm_work.wid:1,2,3,4,5,6,7,8', 'Jobs done in construction work', 1, 1);

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pm_collections`
--

CREATE TABLE `pm_collections` (
  `coid` int(8) NOT NULL,
  `name` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `type` int(3) NOT NULL,
  `status` int(3) NOT NULL,
  `creator` int(8) NOT NULL,
  `date` int(12) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Daten für Tabelle `pm_collections`
--

INSERT INTO `pm_collections` (`coid`, `name`, `description`, `type`, `status`, `creator`, `date`) VALUES
(1, 'Fuhsepoints', 'Points of Interest on the river Fuhse in northern Germany.', 3, 2, 1, 1509025758);

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pm_connector`
--

CREATE TABLE `pm_connector` (
  `cid` int(9) NOT NULL,
  `object` int(8) NOT NULL,
  `target` int(8) NOT NULL,
  `type` int(4) NOT NULL,
  `status` int(2) NOT NULL,
  `date_of_creation` int(10) NOT NULL,
  `creator` int(8) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='connect related data from several tables by their ID';

--
-- Daten für Tabelle `pm_connector`
--

INSERT INTO `pm_connector` (`cid`, `object`, `target`, `type`, `status`, `date_of_creation`, `creator`) VALUES
(2, 1, 7, 9, 2, 1492969360, 1),
(3, 3, 8, 11, 1, 1493216568, 1),
(4, 4, 9, 11, 2, 1493218614, 1),
(5, 5, 10, 11, 2, 1493222657, 1),
(6, 6, 11, 11, 2, 1493235615, 1),
(7, 7, 12, 11, 2, 1493237048, 1),
(8, 8, 13, 11, 2, 1493237076, 1),
(9, 9, 14, 11, 2, 1493237298, 1),
(10, 10, 15, 11, 2, 1493237331, 1),
(11, 11, 16, 11, 2, 1493237358, 1),
(12, 12, 17, 11, 2, 1493237788, 1),
(13, 13, 18, 11, 2, 1493237872, 1),
(14, 14, 19, 11, 2, 1493302400, 1),
(15, 20, 20, 11, 2, 1493544932, 1),
(16, 7, 20, 9, 2, 1492969360, 0),
(17, 7, 10, 9, 2, 1494093744, 0),
(18, 9, 8, 9, 2, 1492969360, 1),
(19, 9, 10, 9, 2, 1492969360, 1),
(20, 24, 21, 11, 2, 1494274831, 1),
(21, 3, 21, 9, 2, 1494274831, 0),
(22, 7, 21, 9, 2, 1494274831, 0),
(23, 8, 8, 9, 2, 1492969360, 1),
(24, 25, 22, 11, 2, 1494770941, 1),
(25, 7, 22, 9, 2, 1494770941, 0),
(26, 26, 23, 11, 2, 1494771023, 1),
(27, 5, 23, 9, 2, 1494771023, 0),
(28, 29, 24, 11, 2, 1501758844, 1),
(29, 3, 24, 9, 2, 1501758844, 0),
(30, 5, 24, 9, 2, 1501758844, 0),
(31, 30, 25, 11, 2, 1501786525, 1),
(32, 16, 25, 9, 2, 1501786525, 0),
(33, 31, 26, 11, 2, 1507762717, 1),
(34, 7, 26, 9, 2, 1507762717, 0),
(35, 9, 26, 9, 2, 1507762717, 0),
(36, 32, 27, 11, 2, 1507763185, 1),
(37, 5, 27, 9, 2, 1507763185, 0),
(38, 6, 27, 9, 2, 1507763185, 0),
(39, 33, 28, 11, 2, 1507932404, 2),
(40, 34, 28, 12, 2, 1507932404, 2),
(41, 6, 28, 9, 2, 1507932404, 0),
(42, 9, 28, 9, 2, 1507932404, 0),
(43, 35, 29, 11, 2, 1507932715, 2),
(44, 36, 29, 12, 2, 1507932715, 2),
(45, 6, 29, 9, 2, 1507932715, 0),
(46, 9, 29, 9, 2, 1507932716, 0),
(47, 3, 29, 22, 2, 1507932716, 2),
(48, 38, 30, 11, 2, 1508491042, 1),
(49, 39, 30, 12, 2, 1508491042, 1),
(50, 3, 30, 9, 2, 1508491042, 0),
(51, 6, 30, 9, 2, 1508491042, 0),
(52, 8, 30, 9, 2, 1508491042, 0),
(53, 4, 30, 22, 2, 1508491042, 1),
(54, 40, 0, 11, 2, 1508612126, 1),
(55, 41, 31, 12, 2, 1508612126, 1),
(56, 5, 31, 9, 2, 1508612126, 0),
(57, 7, 31, 9, 2, 1508612126, 0),
(58, 8, 31, 9, 2, 1508612126, 0),
(59, 42, 0, 11, 2, 1508612228, 1),
(60, 43, 32, 12, 2, 1508612228, 1),
(61, 5, 32, 9, 2, 1508612228, 0),
(62, 7, 32, 9, 2, 1508612228, 0),
(63, 8, 32, 9, 2, 1508612228, 0),
(64, 44, 0, 11, 2, 1508612280, 1),
(65, 45, 33, 12, 2, 1508612280, 1),
(66, 5, 33, 9, 2, 1508612281, 0),
(67, 7, 33, 9, 2, 1508612281, 0),
(68, 8, 33, 9, 2, 1508612281, 0),
(69, 46, 0, 11, 2, 1508612342, 1),
(70, 47, 34, 12, 2, 1508612342, 1),
(71, 5, 34, 9, 2, 1508612342, 0),
(72, 7, 34, 9, 2, 1508612342, 0),
(73, 8, 34, 9, 2, 1508612343, 0),
(74, 48, 35, 11, 2, 1508612393, 1),
(75, 49, 35, 12, 2, 1508612393, 1),
(76, 5, 35, 9, 2, 1508612393, 0),
(77, 7, 35, 9, 2, 1508612393, 0),
(78, 8, 35, 9, 2, 1508612393, 0),
(79, 50, 36, 11, 2, 1508612916, 1),
(80, 51, 36, 12, 2, 1508612916, 1),
(81, 5, 36, 9, 2, 1508612917, 0),
(82, 7, 36, 9, 2, 1508612917, 0),
(83, 8, 36, 9, 2, 1508612917, 0),
(84, 10, 36, 22, 1, 1508612917, 0),
(85, 52, 37, 11, 2, 1508612966, 1),
(86, 53, 37, 12, 2, 1508612967, 1),
(87, 5, 37, 9, 2, 1508612967, 0),
(88, 7, 37, 9, 2, 1508612967, 0),
(89, 8, 37, 9, 2, 1508612967, 0),
(90, 11, 37, 22, 1, 1508612967, 0),
(91, 54, 38, 11, 2, 1508612986, 1),
(92, 55, 38, 12, 2, 1508612986, 1),
(93, 5, 38, 9, 2, 1508612986, 0),
(94, 7, 38, 9, 2, 1508612986, 0),
(95, 8, 38, 9, 2, 1508612986, 0),
(96, 12, 38, 22, 1, 1508612986, 0),
(97, 56, 39, 11, 2, 1508613052, 1),
(98, 57, 39, 12, 2, 1508613053, 1),
(99, 5, 39, 9, 2, 1508613053, 0),
(100, 7, 39, 9, 2, 1508613053, 0),
(101, 8, 39, 9, 2, 1508613053, 0),
(102, 13, 39, 22, 2, 1508613053, 0),
(103, 58, 40, 11, 2, 1508613114, 1),
(104, 59, 40, 12, 2, 1508613115, 1),
(105, 5, 40, 9, 2, 1508613115, 0),
(106, 7, 40, 9, 2, 1508613115, 0),
(107, 8, 40, 9, 2, 1508613115, 0),
(108, 14, 40, 22, 2, 1508613115, 0),
(109, 60, 41, 11, 2, 1508613143, 1),
(110, 61, 41, 12, 2, 1508613143, 1),
(111, 5, 41, 9, 2, 1508613143, 0),
(112, 7, 41, 9, 2, 1508613143, 0),
(113, 8, 41, 9, 2, 1508613143, 0),
(114, 15, 41, 22, 2, 1508613143, 1),
(115, 62, 42, 11, 2, 1508613295, 1),
(116, 63, 42, 12, 2, 1508613295, 1),
(117, 5, 42, 9, 2, 1508613295, 0),
(118, 7, 42, 9, 2, 1508613295, 0),
(119, 8, 42, 9, 2, 1508613295, 0),
(120, 16, 42, 22, 2, 1508613296, 1),
(121, 64, 43, 11, 2, 1508613334, 1),
(122, 65, 43, 12, 2, 1508613334, 1),
(123, 5, 43, 9, 2, 1508613334, 0),
(124, 7, 43, 9, 2, 1508613335, 0),
(125, 8, 43, 9, 2, 1508613335, 0),
(126, 17, 43, 22, 2, 1508613335, 1),
(127, 66, 0, 12, 2, 1508613335, 0),
(128, 5, 0, 9, 2, 1508613335, 0),
(129, 7, 0, 9, 2, 1508613335, 0),
(130, 8, 0, 9, 2, 1508613335, 0),
(131, 67, 44, 11, 2, 1508613442, 1),
(132, 68, 44, 12, 2, 1508613442, 1),
(133, 5, 44, 9, 2, 1508613442, 0),
(134, 7, 44, 9, 2, 1508613442, 0),
(135, 8, 44, 9, 2, 1508613442, 0),
(136, 18, 44, 22, 2, 1508613442, 1),
(137, 69, 3, 12, 2, 1508613442, 0),
(138, 5, 3, 9, 2, 1508613442, 0),
(139, 7, 3, 9, 2, 1508613443, 0),
(140, 8, 3, 9, 2, 1508613443, 0),
(141, 70, 45, 11, 2, 1508613472, 1),
(142, 71, 45, 12, 2, 1508613472, 1),
(143, 5, 45, 9, 2, 1508613472, 0),
(144, 7, 45, 9, 2, 1508613472, 0),
(145, 8, 45, 9, 2, 1508613472, 0),
(146, 19, 45, 22, 2, 1508613472, 1),
(147, 72, 4, 12, 2, 1508613473, 1),
(148, 5, 4, 9, 2, 1508613473, 0),
(149, 7, 4, 9, 2, 1508613473, 0),
(150, 8, 4, 9, 2, 1508613473, 0),
(151, 73, 46, 11, 2, 1508613495, 1),
(152, 74, 46, 12, 2, 1508613495, 1),
(153, 5, 46, 9, 2, 1508613495, 0),
(154, 7, 46, 9, 2, 1508613495, 0),
(155, 8, 46, 9, 2, 1508613495, 0),
(156, 20, 46, 22, 2, 1508613495, 1),
(157, 75, 5, 12, 2, 1508613495, 1),
(158, 5, 5, 9, 2, 1508613495, 0),
(159, 7, 5, 9, 2, 1508613495, 0),
(160, 8, 5, 9, 2, 1508613495, 0),
(161, 76, 47, 11, 2, 1508693880, 1),
(162, 77, 47, 12, 2, 1508693880, 1),
(163, 5, 47, 9, 2, 1508693880, 0),
(164, 7, 47, 9, 2, 1508693880, 0),
(165, 8, 47, 9, 2, 1508693880, 0),
(166, 21, 47, 22, 2, 1508693881, 1),
(167, 78, 6, 12, 2, 1508693881, 1),
(168, 5, 6, 9, 2, 1508693881, 0),
(169, 7, 6, 9, 2, 1508693881, 0),
(170, 8, 6, 9, 2, 1508693881, 0),
(171, 80, 5, 23, 2, 122211222, 1),
(172, 81, 48, 11, 2, 1508765809, 1),
(173, 82, 48, 12, 2, 1508765809, 1),
(174, 3, 48, 9, 2, 1508765809, 0),
(175, 5, 48, 9, 2, 1508765809, 0),
(176, 9, 48, 9, 2, 1508765809, 0),
(177, 22, 48, 22, 2, 1508765809, 1),
(178, 83, 7, 12, 2, 1508765809, 1),
(179, 3, 7, 9, 2, 1508765809, 0),
(180, 5, 7, 9, 2, 1508765809, 0),
(181, 9, 7, 9, 2, 1508765809, 0),
(182, 84, 49, 11, 2, 1508768131, 1),
(183, 85, 49, 12, 2, 1508768131, 1),
(184, 5, 49, 9, 2, 1508768131, 0),
(185, 7, 49, 9, 2, 1508768131, 0),
(186, 9, 49, 9, 2, 1508768131, 0),
(187, 23, 49, 22, 2, 1508768131, 1),
(188, 86, 8, 12, 2, 1508768131, 1),
(189, 22, 8, 24, 2, 1508768132, 1),
(190, 5, 8, 9, 2, 1508768132, 0),
(191, 7, 8, 9, 2, 1508768132, 0),
(192, 9, 8, 9, 2, 1508768132, 0),
(193, 87, 50, 11, 2, 1508854175, 1),
(194, 88, 50, 12, 2, 1508854175, 1),
(195, 3, 50, 9, 2, 1508854175, 0),
(196, 5, 50, 9, 2, 1508854175, 0),
(197, 24, 50, 22, 2, 1508854176, 1),
(198, 89, 9, 12, 2, 1508854176, 1),
(199, 2, 9, 24, 2, 1508854176, 1),
(200, 3, 9, 9, 2, 1508854176, 0),
(201, 5, 9, 9, 2, 1508854176, 0),
(202, 24, 9, 26, 2, 3445555, 1),
(203, 90, 51, 11, 2, 1508856588, 1),
(204, 91, 51, 12, 2, 1508856588, 1),
(205, 3, 51, 9, 2, 1508856588, 0),
(206, 25, 51, 22, 2, 1508856588, 1),
(207, 92, 10, 12, 2, 1508856588, 1),
(208, 26, 10, 26, 2, 1508856588, 1),
(209, 6, 10, 24, 2, 1508856588, 1),
(210, 3, 10, 9, 2, 1508856588, 0),
(211, 27, 10, 26, 2, 1508862911, 1),
(212, 93, 52, 11, 2, 1508925141, 1),
(213, 94, 52, 12, 2, 1508925141, 1),
(214, 4, 52, 9, 2, 1508925141, 0),
(215, 28, 52, 22, 2, 1508925142, 1),
(216, 95, 11, 12, 2, 1508925142, 1),
(217, 29, 11, 26, 2, 1508925142, 1),
(218, 2, 11, 24, 2, 1508925142, 1),
(219, 4, 11, 9, 2, 1508925142, 0),
(220, 30, 11, 26, 2, 1508925280, 1),
(221, 1, 10, 21, 2, 3445555, 1),
(222, 2, 11, 21, 2, 12233311, 1),
(223, 2, 1, 27, 2, 12233311, 1),
(224, 3, 1, 27, 2, 122333115, 1),
(225, 97, 12, 12, 2, 1509095624, 1),
(226, 32, 12, 26, 2, 1509095624, 1),
(227, 6, 12, 24, 2, 1509095624, 1),
(228, 3, 12, 21, 2, 1509095624, 1),
(229, 3, 12, 9, 2, 1509095624, 0),
(230, 98, 13, 12, 2, 1509145256, 1),
(231, 33, 13, 26, 2, 1509145256, 1),
(232, 6, 13, 24, 2, 1509145256, 1),
(233, 2, 13, 21, 2, 1509145256, 1),
(234, 5, 13, 9, 2, 1509145256, 0),
(235, 6, 13, 9, 2, 1509145256, 0),
(236, 34, 13, 26, 2, 1509146381, 1),
(237, 35, 5, 26, 2, 1509228720, 1),
(238, 114, 53, 11, 2, 1517956328, 1),
(239, 115, 53, 12, 2, 1517956328, 1),
(240, 4, 53, 9, 2, 1517956328, 0),
(241, 46, 53, 22, 2, 1517956328, 1),
(242, 116, 14, 12, 2, 1517956328, 1),
(243, 47, 14, 26, 2, 1517956328, 1),
(244, 2, 14, 24, 2, 1517956328, 1),
(245, 1, 14, 21, 2, 1517956328, 1),
(246, 4, 14, 9, 2, 1517956328, 0),
(247, 117, 17, 30, 2, 1519936503, 1),
(248, 118, 17, 30, 2, 1519980351, 1),
(249, 119, 7, 30, 2, 1519988595, 1),
(250, 120, 7, 30, 2, 1519989892, 1),
(251, 121, 17, 36, 2, 1520002196, 1),
(252, 54, 17, 37, 2, 1520008895, 1),
(254, 122, 13, 30, 1, 1520108745, 0),
(255, 123, 13, 30, 1, 1520111874, 0),
(257, 125, 13, 36, 1, 1520112055, 0),
(298, 140, 21, 30, 1, 1520183527, 0),
(321, 156, 84, 11, 1, 1520931582, 1),
(322, 84, 22, 37, 1, 1520931582, 1),
(323, 162, 85, 11, 2, 1543437710, 1),
(324, 163, 85, 12, 2, 1543437710, 1),
(325, 4, 85, 9, 2, 1543437710, 0),
(326, 0, 85, 22, 2, 1543437711, 1),
(327, 164, 86, 11, 2, 1543437845, 1),
(328, 165, 86, 12, 2, 1543437845, 1),
(329, 4, 86, 9, 2, 1543437845, 0),
(330, 48, 86, 22, 2, 1543437845, 1),
(331, 166, 87, 11, 2, 1543437884, 1),
(332, 167, 87, 12, 2, 1543437884, 1),
(333, 4, 87, 9, 2, 1543437884, 0),
(334, 49, 87, 22, 2, 1543437884, 1),
(335, 168, 16, 12, 2, 1543488053, 1),
(336, 51, 16, 26, 2, 1543488054, 1),
(337, 2, 16, 24, 2, 1543488054, 1),
(338, 1, 16, 21, 2, 1543488054, 1),
(339, 58, 16, 9, 2, 1543488054, 0),
(340, 169, 88, 11, 2, 1543488325, 1),
(341, 170, 88, 12, 2, 1543488325, 1),
(342, 58, 88, 9, 2, 1543488325, 0),
(343, 52, 88, 22, 2, 1543488325, 1),
(344, 171, 17, 12, 2, 1543488326, 1),
(345, 53, 17, 26, 2, 1543488326, 1),
(346, 6, 17, 24, 2, 1543488326, 1),
(347, 1, 17, 21, 2, 1543488326, 1),
(348, 58, 17, 9, 2, 1543488326, 0),
(349, 172, 89, 11, 2, 1543489394, 1),
(350, 173, 89, 12, 2, 1543489394, 1),
(351, 58, 89, 9, 2, 1543489394, 0),
(352, 54, 89, 22, 2, 1543489395, 1),
(353, 174, 18, 12, 2, 1543489395, 1),
(354, 55, 18, 26, 2, 1543489395, 1),
(355, 6, 18, 24, 2, 1543489395, 1),
(356, 1, 18, 21, 2, 1543489395, 1),
(357, 58, 18, 9, 2, 1543489395, 0),
(358, 175, 90, 11, 2, 1543494293, 1),
(359, 176, 90, 12, 2, 1543494293, 1),
(360, 4, 90, 9, 2, 1543494293, 0),
(361, 56, 90, 22, 2, 1543494293, 1),
(362, 177, 19, 12, 2, 1543494294, 1),
(363, 57, 19, 26, 2, 1543494294, 1),
(364, 2, 19, 24, 2, 1543494294, 1),
(365, 1, 19, 21, 2, 1543494294, 1),
(366, 4, 19, 9, 2, 1543494294, 0),
(367, 178, 91, 11, 2, 1543516883, 1),
(368, 179, 91, 12, 2, 1543516883, 1),
(369, 4, 91, 9, 2, 1543516883, 0),
(370, 58, 91, 22, 2, 1543516884, 1),
(371, 180, 20, 12, 2, 1543516884, 1),
(372, 59, 20, 26, 2, 1543516884, 1),
(373, 2, 20, 24, 2, 1543516884, 1),
(374, 1, 20, 21, 2, 1543516884, 1),
(375, 4, 20, 9, 2, 1543516884, 0),
(376, 181, 92, 11, 2, 1546603470, 1),
(377, 182, 92, 12, 2, 1546603470, 1),
(378, 58, 92, 9, 2, 1546603470, 0),
(379, 60, 92, 22, 2, 1546603470, 1),
(380, 183, 21, 12, 2, 1546603470, 1),
(381, 61, 21, 26, 2, 1546603470, 1),
(382, 6, 21, 24, 2, 1546603470, 1),
(383, 1, 21, 21, 2, 1546603470, 1),
(384, 58, 21, 9, 2, 1546603470, 0),
(385, 184, 93, 11, 2, 1546686679, 6),
(386, 185, 93, 12, 2, 1546686679, 6),
(387, 4, 93, 9, 2, 1546686679, 0),
(388, 62, 93, 22, 2, 1546686679, 6),
(389, 186, 22, 12, 2, 1546686679, 6),
(390, 63, 22, 26, 2, 1546686679, 6),
(391, 2, 22, 24, 2, 1546686679, 6),
(392, 1, 22, 21, 2, 1546686679, 6),
(393, 4, 22, 9, 2, 1546686679, 0),
(394, 187, 94, 11, 2, 1546686835, 6),
(395, 188, 94, 39, 2, 1546686835, 6),
(396, 4, 94, 9, 2, 1546686836, 0),
(397, 64, 94, 22, 2, 1546686836, 6),
(398, 189, 23, 39, 2, 1546686836, 6),
(399, 65, 23, 26, 2, 1546686836, 6),
(400, 2, 23, 24, 2, 1546686836, 6),
(401, 0, 23, 21, 2, 1546686836, 6),
(402, 4, 23, 9, 2, 1546686836, 0),
(403, 190, 95, 11, 2, 1546687847, 6),
(404, 191, 95, 39, 2, 1546687847, 6),
(405, 58, 95, 9, 2, 1546687847, 0),
(406, 66, 95, 22, 2, 1546687847, 6),
(407, 192, 24, 39, 2, 1546687847, 6),
(408, 67, 24, 26, 2, 1546687848, 6),
(409, 2, 24, 24, 2, 1546687848, 6),
(410, 0, 24, 21, 2, 1546687848, 6),
(411, 58, 24, 9, 2, 1546687848, 0),
(412, 0, 24, 40, 2, 1546951370, 6),
(413, 0, 24, 40, 2, 1546951742, 6),
(414, 193, 24, 40, 2, 1546951863, 6),
(415, 194, 96, 11, 2, 1547488857, 6),
(416, 195, 96, 12, 2, 1547488857, 6),
(417, 4, 96, 9, 2, 1547488857, 0),
(418, 68, 96, 22, 2, 1547488857, 6),
(419, 196, 25, 12, 2, 1547488858, 6),
(420, 69, 25, 26, 2, 1547488858, 6),
(421, 0, 25, 24, 2, 1547488858, 6),
(422, 0, 25, 21, 2, 1547488858, 6),
(423, 4, 25, 9, 2, 1547488858, 0);

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pm_data_definitions`
--

CREATE TABLE `pm_data_definitions` (
  `ddid` int(9) NOT NULL,
  `name` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
  `unit` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `parent` int(3) NOT NULL COMMENT 'connection to other items default is 0, connection is sddid',
  `type_name` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
  `priority` int(3) NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pm_documents`
--

CREATE TABLE `pm_documents` (
  `did` int(8) NOT NULL,
  `type` int(3) NOT NULL,
  `title` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `author` int(8) NOT NULL,
  `authorship_remarks` varchar(2048) COLLATE utf8_unicode_ci NOT NULL,
  `institution` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `publication_time_place` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `volume` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `version` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
  `availability` int(4) NOT NULL,
  `creator` int(8) NOT NULL,
  `date` int(12) NOT NULL,
  `ressource` int(8) NOT NULL,
  `status` int(8) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Daten für Tabelle `pm_documents`
--

INSERT INTO `pm_documents` (`did`, `type`, `title`, `description`, `author`, `authorship_remarks`, `institution`, `publication_time_place`, `volume`, `version`, `availability`, `creator`, `date`, `ressource`, `status`) VALUES
(17, 18, '4. Test', 'Fourth Test', 1, '', 'Rese', '2018/Berlin', '0', '21', 34, 1, 1543488325, 88, 2),
(18, 18, '5. Test', 'Fifth Test', 1, '', 'Rese', '2018/Berlin', '0', '21', 32, 1, 1543489394, 89, 2),
(19, 18, '6. Testfile, a picture', 'Six Test', 1, '', 'Rese', '2018/Berlin', '0', '21', 32, 1, 1543494293, 90, 2),
(20, 18, '5. Test', 'nnn', 3, '', 'Rese', '2018/Berlin', '0', '21', 32, 1, 1543516883, 91, 2),
(21, 18, 'mehh', 'test1', 3, '', 'test institution', '2018/Berlin', '0', '21', 32, 1, 1546603470, 92, 2),
(22, 18, '5. Test3', 'Test logged in as ungeo', 3, '', '', '2018/Berlin', '0', '22', 32, 6, 1546686678, 93, 2),
(23, 18, '5. Test3', 'Test logged in as ungeo', 3, '', '', '2018/Berlin', '0', '22', 32, 6, 1546686835, 94, 2),
(24, 18, '5. Test default file', 'A file should always work now', 15, '', 'test institution', '2018/Berlin', '0', '22', 32, 6, 1546687847, 95, 2),
(25, 71, 'Test for a Shapefile', 'Une archive Zip contenant les fichiers de SHP du SIG.', 3, '', 'test institution', '2018/Berli9', '0', '22', 32, 6, 1547488857, 96, 2);

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pm_events`
--

CREATE TABLE `pm_events` (
  `evid` int(9) NOT NULL,
  `name` varchar(256) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `begin` varchar(256) COLLATE utf8mb4_unicode_ci NOT NULL,
  `duration` varchar(256) COLLATE utf8mb4_unicode_ci NOT NULL,
  `creator` int(8) NOT NULL,
  `status` int(2) NOT NULL,
  `parent` int(9) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='timely defined events connected to anything';

--
-- Daten für Tabelle `pm_events`
--

INSERT INTO `pm_events` (`evid`, `name`, `description`, `begin`, `duration`, `creator`, `status`, `parent`) VALUES
(1, 'Objects on Fuhse and Aller', 'Example for an event in 2012, that involves gis objects near Fuhse.', '1339484400', '432000', 1, 2, 0),
(2, 'More objects near Fuhse', 'Another event in the same area, this one in 2014', '1413183600', '1814400', 1, 2, 0);

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pm_external_persons`
--

CREATE TABLE `pm_external_persons` (
  `epid` int(8) NOT NULL,
  `nicename` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `adress` text COLLATE utf8_unicode_ci NOT NULL,
  `town` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `mail` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `tel` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `role` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `remark` text COLLATE utf8_unicode_ci NOT NULL,
  `status` varchar(16) COLLATE utf8_unicode_ci NOT NULL,
  `date_of_creation` int(12) NOT NULL,
  `creator` int(8) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='All persons related to projects';

--
-- Daten für Tabelle `pm_external_persons`
--

INSERT INTO `pm_external_persons` (`epid`, `nicename`, `adress`, `town`, `mail`, `tel`, `role`, `remark`, `status`, `date_of_creation`, `creator`) VALUES
(1, 'Sample A. Famname', 'Samplestreet 22.\r\n', 'Sampletown', 'zettberlin@linuxuse.de', '000111222', 'author', 'Sampleentry for an author', 'ok', 2737373, 1),
(2, 'Sample S. Holder', 'Samplestreet 23', 'Sampletown', 'zettberlin@linuxuse.de', '0000000', 'stakeholder', 'Sampleentry for a stakeholder', '2', 1507197000, 1),
(3, 'Another A. Writer', 'Samplestreet 24', 'Sampletown', 'zettberlin@linuxuse.de', '0000000', 'author', 'Sampleentry for a author', '2', 1507197060, 1),
(6, 'One More Stakeholder', 'Samplestreet 24', 'Sampletown', 'zettberlin@linuxuse.de', '00002222444', 'stakeholder', 'Sampleentry for a stakeholder.', '0', 1507290340, 0),
(14, 'Linkdocument Writer', 'Writers Guild Street 1', 'writertown', 'zettberlin@linuxuse.de', '00002222444', 'author', 'Testaccount', '0', 1509093152, 1),
(13, 'Muhammad al-Idrisi', 'Antique History Lane 1', 'CÃ³rdoba', 'zettberlin@linuxuse.de', '000111222333', '0', 'His travels took him to many parts of Europe including Portugal, the Pyrenees, the French Atlantic coast, Hungary, and JÃ³rvÃ­k (now known as York).\r\nAnd he made maps of all the places, he visited.', '0', 1507845411, 2),
(15, 'Test Entry the first', 'test adress', 'Masi ', 'test@test.pm', '000111222', 'author', 'Only for testing', '0', 1541695756, 1),
(16, 'first test', '2019 first lane', 'Celle', 'zettberlin@linuxuse.de', '03029049011', 'stakeholder', 'for testing only', '0', 1546813019, 1);

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pm_files`
--

CREATE TABLE `pm_files` (
  `fid` int(10) NOT NULL,
  `uploader` int(8) NOT NULL,
  `author` int(8) NOT NULL,
  `license` int(4) NOT NULL,
  `date_of_upload` int(10) NOT NULL,
  `fname` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
  `mime` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `ftype` int(4) NOT NULL,
  `available` int(4) NOT NULL,
  `status` int(4) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Daten für Tabelle `pm_files`
--

INSERT INTO `pm_files` (`fid`, `uploader`, `author`, `license`, `date_of_upload`, `fname`, `mime`, `ftype`, `available`, `status`) VALUES
(88, 1, 1, 1, 1543488325, '2018/11/blaukreisbluete-lampe09-01.jpg', 'image/jpeg', 0, 34, 2),
(89, 1, 1, 1, 1543489394, '2018/11/dokutest.pdf', 'application/pdf', 0, 32, 2),
(90, 1, 1, 1, 1543494293, '2018/11/imgp2424.jpg', 'image/jpeg', 0, 32, 2),
(91, 1, 3, 1, 1543516883, '2018/11/noexif3.jpg', 'image/jpeg', 0, 32, 2),
(92, 1, 3, 1, 1546603470, '2019/01/ac.jpg', 'image/jpeg', 0, 32, 2),
(93, 6, 3, 1, 1546686678, '2019/01/clipart_togo.svg', 'image/svg+xml', 0, 32, 2),
(94, 6, 3, 1, 1546686835, '2019/01/clipart_togo.svg', 'image/svg+xml', 0, 32, 2),
(95, 6, 15, 1, 1546687847, '2019/01/NutzerHierarchie.docx', 'application/vnd.openxmlformats-o', 0, 32, 2),
(96, 6, 3, 1, 1547488857, '2019/01/prefecture.zip', 'application/zip', 0, 32, 2);

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pm_inventory_items`
--

CREATE TABLE `pm_inventory_items` (
  `iid` int(8) NOT NULL,
  `inventory_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `name` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `creator` int(8) NOT NULL,
  `date` int(12) NOT NULL,
  `status` int(2) NOT NULL,
  `availability` int(6) NOT NULL,
  `type` int(6) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Daten für Tabelle `pm_inventory_items`
--

INSERT INTO `pm_inventory_items` (`iid`, `inventory_id`, `name`, `description`, `creator`, `date`, `status`, `availability`, `type`) VALUES
(2, 'SHELF1/ITEM23', 'YeOldeBook', 'its printed, a codex.', 1, 1223322333, 2, 1, 3);

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pm_jobs`
--

CREATE TABLE `pm_jobs` (
  `jid` int(11) NOT NULL,
  `name` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` int(2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pm_links`
--

CREATE TABLE `pm_links` (
  `lid` int(11) NOT NULL,
  `title` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
  `url` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `status` int(2) NOT NULL,
  `creator` int(8) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='links to network objects';

--
-- Daten für Tabelle `pm_links`
--

INSERT INTO `pm_links` (`lid`, `title`, `url`, `description`, `status`, `creator`) VALUES
(1, 'Greatness', 'https://en.wikipedia.org/wiki/Ozzy_Osbourne', 'That links should be in every database around the world...', 2, 1),
(2, 'See also', 'https://de.wikipedia.org/wiki/Al-Idrisi', 'Wikipdeia article on a great arabic geographer...', 2, 0),
(3, 'See also', 'https://de.wikipedia.org/wiki/Al-Idrisi', 'Wikipdeia article on a great arabic geographer...', 2, 2),
(4, 'KIwai Peple', 'http://arrow.latrobe.edu.au/store/3/4/3/6/0/public/B133687X.pdf', 'Usable Grammar of Kiwai', 2, 1),
(5, 'mehhhLink', 'http://catalog.paradisec.org.au/collections/JH1/items/12_63?files_page=1&files_per_page=4', 'This would be a real catalogue', 2, 1),
(21, 'mehhhLink', 'http://catalog.paradisec.org.au/collections/JH1/items/12_63?files_page=1&files_per_page=4', 'This would be a real catalogue', 2, 1),
(22, 'this is AlIdrisi', 'https://de.wikipedia.org/wiki/Al-Idrisi', 'The man hs done well', 2, 1),
(23, 'Mehhhh!', 'https://en.wikipedia.org/wiki/Muhammad_al-Idrisi', 'Read it', 2, 1),
(24, 'Dune Franchise', 'https://en.wikipedia.org/wiki/Dune_(franchise)#Film', 'just a wikipedia page about a film series', 2, 1),
(25, 'The Dune Novel', 'https://en.wikipedia.org/wiki/Dune_(novel)', 'Wikipedia page for Frank Herberts Dune', 2, 1),
(26, 'The Dune Novel', 'https://en.wikipedia.org/wiki/Dune_(novel)', 'Wikipedia page for Frank Herberts Dune', 2, 1),
(27, 'Helliconia', 'https://en.wikipedia.org/wiki/Helliconia', 'Another great SF novel', 2, 1),
(28, 'The History of geography pt 1', 'https://en.wikipedia.org/wiki/Anaximander', 'This one is about Anaximander, he worked with Pythagoras.', 2, 1),
(29, 'The History of geography pt 1', 'https://en.wikipedia.org/wiki/Anaximander', 'This one is about Anaximander, he worked with Pythagoras.', 2, 1),
(30, 'Pt 2', 'https://en.wikipedia.org/wiki/Herodotus', 'The traveling writer of old', 2, 1),
(31, 'Wikipedia:Itinerar', 'https://de.wikipedia.org/wiki/Itinerar', 'German wikipediapage about the classical description of paths.', 2, 1),
(34, 'What a codex is', 'https://de.wikipedia.org/wiki/Kodex', 'Wikipedia page to describe a codex(vulgo: book)', 2, 1),
(35, 'Tagebaurestloch', 'https://de.wikipedia.org/wiki/Tagebaurestloch', 'The lake in the picture is just that.', 2, 1),
(36, '', '', '', 2, 1),
(37, '', '', '', 2, 1),
(38, '', '', '', 2, 1),
(39, '', '', '', 2, 1),
(40, '', '', '', 2, 1),
(41, '', '', '', 2, 1),
(42, '', '', '', 2, 1),
(43, '', '', '', 2, 1),
(44, '', '', '', 2, 1),
(45, '', '', '', 2, 1),
(46, '', '', '', 2, 1),
(47, '', '', '', 2, 1),
(48, '', '', '', 2, 1),
(49, '', '', '', 2, 1),
(50, '', '', '', 2, 1),
(51, '', '', '', 2, 1),
(52, '', '', '', 2, 1),
(53, '', '', '', 2, 1),
(54, '', '', '', 2, 1),
(55, '', '', '', 2, 1),
(56, '', '', '', 2, 1),
(57, '', '', '', 2, 1),
(58, '', '', '', 2, 1),
(59, '', '', '', 2, 1),
(60, '', '', '', 2, 1),
(61, '', '', '', 2, 1),
(62, '', '', '', 2, 6),
(63, '', '', '', 2, 6),
(64, '', '', '', 2, 6),
(65, '', '', '', 2, 6),
(66, '', '', '', 2, 6),
(67, '', '', '', 2, 6),
(68, '', '', '', 2, 6),
(69, '', '', '', 2, 6);

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pm_map_config`
--

CREATE TABLE `pm_map_config` (
  `mcid` int(3) NOT NULL,
  `name` varchar(256) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `zoom` int(2) NOT NULL,
  `maxBounds` varchar(1024) COLLATE utf8mb4_unicode_ci NOT NULL,
  `scrollWheelZoom` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL,
  `doubleClickZoom` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL,
  `maxZoom` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL,
  `dragging` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL,
  `addControl` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `addLayer` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Configuration templates for maps';

--
-- Daten für Tabelle `pm_map_config`
--

INSERT INTO `pm_map_config` (`mcid`, `name`, `description`, `zoom`, `maxBounds`, `scrollWheelZoom`, `doubleClickZoom`, `maxZoom`, `dragging`, `addControl`, `addLayer`, `type`) VALUES
(1, 'default', 'The defaults allow mouse wheel zoom, zoom is set to 15, OSM Background Layer.\r\nAll other set to 0.', 10, '0', 'true', '', '', '', '', '', 'OSM'),
(2, 'overview', 'Default settings with larger zoom', 11, '', 'true', '', '', '', '', '', 'OSM');

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pm_mini_bim`
--

CREATE TABLE `pm_mini_bim` (
  `bim_id` int(9) NOT NULL,
  `mbim_no` int(12) NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `unit` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `type` int(5) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Catalogue of work and materials';

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pm_objects`
--

CREATE TABLE `pm_objects` (
  `oid` int(9) NOT NULL,
  `coordinates` text COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `title` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `location` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `date` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
  `creator` int(8) NOT NULL,
  `status` int(2) NOT NULL,
  `parent` int(9) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Samplepoints to collect water quality data';

--
-- Daten für Tabelle `pm_objects`
--

INSERT INTO `pm_objects` (`oid`, `coordinates`, `type`, `title`, `description`, `location`, `date`, `creator`, `status`, `parent`) VALUES
(31, '-3.9176895104931044, 23.642578125000004', '62', 'Congo Overview', 'Overview for the 13 cities in Congo.', 'Congo', '1529998465', 2, 0, 0);

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pm_options`
--

CREATE TABLE `pm_options` (
  `opid` int(8) NOT NULL,
  `name` varchar(256) COLLATE utf8mb4_unicode_ci NOT NULL,
  `value` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `parent` int(8) NOT NULL,
  `status` int(2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Daten für Tabelle `pm_options`
--

INSERT INTO `pm_options` (`opid`, `name`, `value`, `parent`, `status`) VALUES
(1, 'page_heading', 'Base de données d‘Electrification Rurale et des Energies Renouvables', 0, 2),
(2, 'page_title', 'Base de données d‘Electrification Rurale et des Energies Renouvables', 0, 2),
(3, 'lang', 'en_us', 0, 2),
(4, 'local_home', 'Home', 3, 2),
(5, 'local_lib', 'Library', 3, 2),
(6, 'local_prm', 'Contacts', 3, 2),
(7, 'local_doc', 'Documentation', 3, 2),
(8, 'local_projects', 'Projects', 3, 2),
(9, 'local_gisoids', 'Maps', 3, 2);

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pm_posts`
--

CREATE TABLE `pm_posts` (
  `pid` int(8) NOT NULL,
  `author` int(4) NOT NULL,
  `parent` int(8) NOT NULL,
  `date` int(12) NOT NULL,
  `status` int(2) NOT NULL,
  `title` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
  `content` text COLLATE utf8_unicode_ci NOT NULL,
  `type` int(2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Daten für Tabelle `pm_posts`
--

INSERT INTO `pm_posts` (`pid`, `author`, `parent`, `date`, `status`, `title`, `content`, `type`) VALUES
(35, 2, 0, 1507932715, 3, 'Bienvenue', '<p>La REGIDESO est en RDC le gestionnaire historique du service public de l’eau\r\npotable en milieu urbain. Devenue entreprise privée (société anonyme) en\r\n2007, elle reste propriété de l’Etat (actionnaire unique), et garde encore\r\nun monopole de fait sur l’AEP en milieu urbain malgré les récentes lois sur\r\nla décentralisation et sur l’organisation du secteur de l’eau. Elle gère\r\nainsi 97 centres dans le pays, dont la capitale, les capitales provinciales\r\net les principales villes. Parmi ces centres, 19 sont appelés Centres\r\nSecondaires (CS), qui bénéficient d’un appui de la République Fédérale\r\nd’Allemagne, à travers la KFW (études techniques, fournitures, travaux,\r\nformations), et la GIZ (programme RESE). La particularité des CS est la\r\nrecherche d’une performance d’exploitation améliorée et durable, passant par\r\nun objectif de semi-autonomie financière à moyen terme pour s’adapter à la\r\nréforme administrative (décentralisation, loi sur l’eau) et aux exigences de\r\nnotre époque.</p>\r\n\r\n<p>Avec la mise en oeuvre des lois sur la déconcentration (datant de 2008 mais\r\nmise concrètement en application à partir de 2016), les provinces de la RDC\r\net les autorités locales prennent un rôle plus important dans\r\nl\'approvisionnement en eau et l\'assainissement. Selon le nouveau cadre\r\ninstitutionnel, il n’y aurait plus de monopole de l’Etat (et ainsi de la\r\nREGIDESO) en matière de gestion et exploitation de l’alimentation en eau des\r\npopulations urbaines.</p>\r\n\r\n<p>Depuis 2006, la GIZ est chargée par le Ministère de la Coopération\r\nEconomique et du Développement (BMZ), en collaboration avec les partenaires\r\ncongolais et la Coopération Financière (KfW) de mettre en oeuvre le Projet\r\nd’Appui à la Réforme du Secteur de l’Eau (RESE). Dans son travail, le RESE\r\nappuie le gouvernement congolais, les autorités provinciales, et la\r\nREGIDESO, à travers 4 composantes :</p>\r\n\r\n \r\n<ol>\r\n<li>Appui à la mise en œuvre de la Politique Nationale de l’Eau</li>\r\n\r\n<li>Consolidation durable des mécanismes de concertation dans la région\r\nde Kasaï-Oriental</li>\r\n\r\n<li>Renforcement des capacités de la Direction des Services des Centres\r\nSecondaires (DCS) et des Services des Centres Secondaires (SCS)</li>\r\n\r\n<li>Renforcement des capacités pour la sensibilisation dans le domaine\r\nde l’eau, l’hygiène et l’assainissement de base</li>\r\n</ol>', 4),
(158, 1, 35, 1520955042, 2, 'Comment to 35 by P.M. Admin Time: Mar.13.2018 16:30:42', '<p>Just one comment</p>', 3),
(159, 1, 35, 1520977415, 2, 'Comment to 35 by P.M. Admin Time: Mar.13.2018 22:43:35', '<p>And another..</p>\r\n<p>This time its a bit longer...</p>\r\n<p>And we think, we should have some formats such as <strong>fat</strong> and <em>slanted</em>....</p>', 3),
(160, 1, 0, 1519639921, 2, 'Help', 'Some more', 0),
(161, 1, 0, 1537094268, 2, 'Pmaps DRC Documentation', '<p>This pages are the manual of this application.</p>\r\n<p>&nbsp;</p>\r\n<h2>About PmapsDRC</h2>\r\n<p>The application retrieves GIS data from geoserver and renders it on maps in an end user friendly manner. Further the user can collect data connected to GIS objects registered in geoserver before.&nbsp;</p>\r\n<p>The collected data can also be statistically analysed and visualised. Certain data can spark alarms for GIS objects. As of now the staff can collect water quality data, register it in the applications database and view statistics.</p>\r\n<p>&nbsp;</p>\r\n<h2>Getting started:short Howtoes for the user</h2>\r\n<h3>How to create a new Town entry</h3>\r\n<p>The application automatically scans the workspace by the name of <em>rese</em> everytime the main map page is loaded. All data stores in that workspace are printed on the page as links showing the name of the store. Thus: if you create a new store in rese by the name of \"newTown\" the main map page will show that store under that name at the next visit to the main map page.</p>\r\n<p>So, to create such a new entry, log in to geoserver, navigate to the rese workspace an create a new store:</p>\r\n<p><img src=\"uploads/documentation/screen01.png\" alt=\"Screenshot geoserver create new store\" /></p>\r\n<p>&nbsp;</p>\r\n<p>The application will scan every shapefile in that store as the user clicks this link and render the layers in the map. It will also retrieve additional informations in the individual datasets in the shapefile, extract their GEOM and create a Java Script object for Leaflet, that can be clicked by the visitor to show these additional infos in a flyout bubble immediately at click and more detailed infos on a overlay page at click on \"view details\" in that bubble.</p>\r\n<p><img src=\"uploads/documentation/screen02.png\" alt=\"Bubble flyout Bulungu\" /></p>\r\n<h3>Editing and updating GIS data</h3>\r\n<p>The actual code in the map application consists of both the layer itself as loaded from geoserver plus Java Script code, that shows leaflet objects. Nevertheless the main map shows the GIS data from geoserver excluselively. Changes and additions may be done in the shapefiles registered in geoserver.&nbsp; If you use an editor such as QGIS, you may update the data on the fly, while you edit it by exporting your work to geoserver.&nbsp;</p>\r\n<p>Such changes will be visible on the map as soon as the visitor reloads the map page in the web browser. Please be aware, that geoserver uses a caching system by default. It may happen, that modifications ware not visible immediately at reload, because the WMS call does not get the actual GIS data but the tiles rendered some time before your modifications into the tile cache.&nbsp; Clearing the tile cache in geoserver is a radical but sure measure to avoid that effect. But also some web browsers may keep already rendered tiles in their cache and fail to upgrade after a modification, so clearing the browser cache when testing before clearing the tile cache in geoserver may be a cleaner solution.</p>\r\n<h3>Collecting water quality data</h3>\r\n<p>Measurement series have to be collected for sample points, that are connected to GIS objects. If a samplepoint is needed in a place, that is not registered in geoserver already, you need to add that point to geoservers GIS data before you can create that sample point.&nbsp;</p>\r\n<p>When you click \"Register new point\" in the Water quality section the map opens and you may select a Town as usual and a GIS Object on that map.&nbsp;</p>\r\n<p><img src=\"uploads/documentation/screen03.png\" alt=\"new samplepoint\" /></p>\r\n<p>At click on the desired Object the flyout bubble shows the usual list of features and atop the bubble you see the \"New Samplepoint\" button. A click on that button opens the form to create a new samplepoint. All the relevant GIS data is already set in that form readonly. The new samplepoint will be bound to the featureID of the GIS object, in the case shown above, that would be \"GM_forage_ll.5\".</p>\r\n<p>Please be aware, that the samplepoint will follow all changes of the GIS object, that may or may not be made. Thus, if the staff finds out, that a water kiosk was not registered with correct coordinates and changes the GEOM in geoserver, your samplepoint will follow that changes also.</p>\r\n<p>As a samplepoint is set, you find it in the Samplepoints table. theis table offers several options to work with the data, for now you can view the points position and details on the map and you can register new measurments for that point.</p>\r\n<h4>Types of measurements</h4>\r\n<p>Measurments can be of differnt complexity. You may want to do a full list of tests as a baseline for a samplepoint and later on you may want to test only the most volatile and/or important values every week and specialised tests for metallic contamination occasionally or when explicitly needed only.</p>\r\n<p>The application offers to create such test checklists by&nbsp;putting together previously registered value types. The \"Set initial values\" in the Water Quality section shows an overview of already registered measurment sets and offers to create a new surveil type and new measurment items:</p>\r\n<p><img src=\"uploads/documentation/screen04.png\" alt=\"surveil types overview\" /></p>\r\n<p>&nbsp;</p>\r\n\r\n<h2>Background Informations</h2>\r\n\r\n<h3>How the application transforms geoserver stores to individual leaflet maps</h3>\r\n\r\n<p>Geoserver offers several ways to retrieve data from its data stores.</p>\r\n<p>The Application uses the REST API, the WMS(Web Map Service) and the WFS(Web Feature Service) from Geoserver to get the data, that shal be displayed in the applications web frontend.</p>\r\n\r\n<h4>An example, getting the list of stores:</h4>\r\n<pre>\r\n$workspace_name=\"rese\";\r\n$pm_stores=pm_get_gis_stores($workspace_name);\r\n</pre>\r\n<p>As you can see, the <em>rese</em> workspace is set by default, the application will get any store from it and it will(for now) ignore all data in other workspaces.</p>\r\n<p>The function <em>pm_get_gis_stores</em> is written in PHP to simplify the job here, it gets the info from geoserver like this:\r\n\r\n<pre>\r\nfunction pm_get_gis_stores($workspace_name){\r\n\r\n $stores=pm_get_json(\"http://ungeo.de:8080/geoserver/rest/workspaces/$workspace_name/datastores.json\");\r\n\r\n return $stores;\r\n}\r\n</pre>\r\n\r\n<p>It calls geoservers REST API asking for the store names in workspace <em>rese</em> in JSON format. This is a structured pure text format, similar to XML or HTML, but with a narrower scope and thus easier to parse.</p>\r\n<p>As you may have noticed, the URL, that calls the REST API, is passed to another PHP function by the name of <em>pm_get_json</em>, that is also written for the application (that is the reason for the \"pm\" prefix of the functions name). Let us have a look at this function too:</p>\r\n\r\n<pre>\r\nfunction pm_get_json($url){\r\n\r\n  // create curl resource \r\n $pm_grabber = curl_init(); \r\n // set url \r\n curl_setopt($pm_grabber, CURLOPT_URL, \"$url\"); \r\n $passwordStr = \"admin:XXXXPasswordXXX\";\r\n curl_setopt($pm_grabber, CURLOPT_USERPWD, $passwordStr);\r\n //return the transfer as a string \r\n curl_setopt($pm_grabber, CURLOPT_RETURNTRANSFER, 1); \r\n \r\n // $output contains the output string \r\n $pm_info = curl_exec($pm_grabber); \r\n $pm_info=json_decode($pm_info,\'assoc\');\r\n \r\n return $pm_info;\r\n\r\n}\r\n\r\n</pre>\r\n\r\n<p>The function uses CURL,  a kind of a non interactive, programmable webbrowser, to send the URL to Geoserver. CURL gets the result and it is passed to the function <em>json_decode</em>, that is an onboard function, that comes with PHP7. It transforms the structure of the JSON stream into an array, similar to the arrays, that come frome database queries and the like.</p>\r\n<p>Tipp: try to put the very same URL in your webbrowsers adress line while you are logged in in geoserver at ungeo...</p>\r\n<p>In short: now we have the list of stores as if we would have grabbed them from a SQL Database.</p>\r\n\r\n<h4>Next example: how we use the storenames to configure a leaflet map for a store</h4>\r\n\r\n<p>The Storenames are formatted as HTML links, listed above the main map.</p>\r\n<p>At click on one of them the page reloads and the store name can server as the key to find the appropriate informations in geoserver.</p>\r\n<p>First we need the names of the layers in the store:</p>\r\n\r\n<pre>\r\n$pm_layer_names=pm_get_gis_featuretypes($pm_store_name);\r\n</pre>\r\n\r\n<p>That is quite similar to the code, that gets the list of stores, it takes the clicked storename via the standard HTTP $_GET array from the URL and asks geoserver for layers in that store.</p>\r\n\r\n<pre>\r\n foreach($pm_layer_names[\'featureTypes\'][\'featureType\']as $layer_name){\r\n\r\n  $pm_gis_layers[]=$layer_name[\'name\'];\r\n }\r\n</pre>\r\n\r\n<p>A PHP foreach loop writes every layer name to another list, stored in the PHP variable pm_gis_layers, that is in the structured array format as well. As this is done, another foreach loop iterates thru the names and feeds them to another pm function:</p>\r\n\r\n<pre>\r\n$pm_gis_layers_features[$i]=pm_get_gis_features($layer_name);\r\n</pre>\r\n\r\n<p>The function <em>pm_get_gis_features</em> does quite the same as the abovementioned function, that catches the storenames, it uses CURL to get the detailed infos stored for each layer in the respective shapefiles. Let us only have a look upon the URL it uses, for it is our first example for a call to geoservers WFS:</p>\r\n\r\n<pre>\r\n // set url \r\n curl_setopt($pm_feature_grabber, CURLOPT_URL, \r\n\"http://localhost:8080/geoserver/rese/ows?\r\nservice=WFS&amp;version=1.0.0&amp;request=GetFeature&amp;typeName=$layer_name&amp;maxFeatures=50&amp;outputFormat=application%2Fjson\");\r\n</pre>\r\n\r\n<p>As the call is executed, the variable <em>$layer_name</em> ist evaluated and thus becomes a layer name such as <em>BM_noeuds_ll</em>, this layer contains datasets for individual features such as <em>BM_noeuds_ll.2</em>,<em>BM_noeuds_ll.3</em> and so forth...</p>\r\n\r\n<p>We will later use that individual sets to configure single points and vectors with flyout bubble at click in leaflet. But first we need to ask leaflet to render the complete layer on the map:</p>\r\n<p>Leaflet is, as usual, object oriented Java Script. It does not need any additional libs and renders to a simple HTML div container, that can be formatted and designed as any other div in HTML using CSS.</p>\r\n<p>The Java Script code to draw the layer from geoservers Tilecache to the map is quite straight forward as well:</p>\r\n\r\n<pre>\r\n   var ReseWms = L.tileLayer.wms(\'http://ungeo.de:8080/geoserver/rese/wms?\', {\r\n      layers: \'BM_noeuds_ll\',\r\n      opacity: 0.9,    \r\n      format: \'image/png\',\r\n      transparent: true\r\n    }).addTo(pmMap);\r\n</pre>\r\n\r\n<p> The variable <em>pmMap</em> holds the map object, that we have created before using leaflets <em>new L.Map</em> call. Leaflet can read WMS directly to draw tiles on its map at correct positions, zoomable etc. But WMS is not implemented completely in leaflet, you cannot get capabilities and other special infos via a WMS call with leaflet. This is deliberate and its a good thing: it keeps leaflet lean and robust.</p> \r\n<p>Anyway: to get the details from the shapefiles for every object on the map, we need to grab them from geoserver. PHP plus CURL can do that, as you already may have guessed...</p>\r\n<p> Again we use WFS to grab the features of every data set:</p>\r\n\r\n<pre>\r\n curl_setopt($pm_feature_grabber, CURLOPT_URL, \r\n\"http://localhost:8080/geoserver/rese/wfs?\r\n&amp;version=1.1.0&amp;request=GetFeature&amp;outputFormat=JSON&amp;typename=rese:$typename[0]&amp;featureid=$feature_id\");\r\n</pre>\r\n\r\n<p>Of course you have noticed, that this is quite similar to the call from above, in which we have captured all the layers in a store, whose name is for no particular reason in a variable named <em>$typename[0]</em>. After that you see the WFS query <em>featureid</em>, this would be something like <em>BM_noeuds_ll.3</em> holding the individual data of set number 3 in the layer BM_noeuds_ll... </p>\r\n<p>The result holds all the data including the geom for that particular object. We use this to create a clickable leaflet object on the map and show all the rest in a popup, like this:</p>\r\n\r\n<pre>\r\n    var latLonExtra12=[\"coordinates extracted from featureid\"];\r\n       \r\n    marker12 = L.marker(latLonExtra12, {icon: smallIcon}).addTo(pmMap);\r\n    marker12.bindPopup\r\n(\'All the extracted data formatted as HTML, too complicated to be shown as such in this tutorial...\');\r\n   \r\n    marker12.on(\'click\', function () {\r\n    marker12.openPopup\r\n    });\r\n</pre>\r\n\r\n<p>Please be aware, that this is not the actual code, the number 12, the coordinates and the content for the popup are inserted with PHP, that would crash the HTML of this tutorial...</p>\r\n\r\n<p>Here we go: we have the tiles for all layers of a store and for every single object in these tile layers we have clickable leaflet objects. The rest is fun stuff ;-) </p>\r\n\r\n<h3>How the System is build</h3>\r\n\r\n<p>The Application is written in the Programming languages PHP and Java Script. PHP runs on the Server and retrieves Data from Geoserver(that runs with the Java Programming language) and it stores and reads data from an SQL Database, implemented as the Maria DB RDBMS.</p>\r\n<p>The user gets data and interacts with the application via the webserver software Apache running on the server. The Java Script code is sent to the user and runs in the users webbrowser to allow direct interaction without reloading data from the server while zooming into the map, configuring forms and several other actions, that would gravely suffer from the need for reloads.</p>\r\n<p>The user accesses the application in his or her webbrowser via a http connection as known from any other website. The user can access the application via a Local Area Network(LAN) as known from any generic home router, via the Internet or, if needed in a webbrowser running on the server itself(Firefox is installed on the machine and can be used via the Cinnamon Desktop environment). </p>\r\n<p>The application should work without any problems on any modern Webbrowser, be it on a PC running Linux, Windows or MacOSX or on a mobile device. In the latter case everything will work given the display is big enough to show the complete user interface. Any modern Mobile Phone with a screen resolution width of 1024px or better will do, so will all tablets.</p>\r\n<p>Currently the application ist tested in the webbrowsers Google Chrome and Mozilla Firefox. It should run on all other browsers as well but your mileage may vary...</p>\r\n\r\n<p>The Brix Appliance is running the needed components(Java, Geoserver, Apache, Maria DB and PHP) on a GnuLinux Operationg System (Debian 9). Debian offers a unparalleled stable and trustworthy basis for webapplications, it is used by thousands of top notch commercial, industrial and scientific applications around the world and has proven its qualities since about 20 years now. It also comes with a package management that allows system updates without any interruption of productive work and even upgrades to newer generations of the Operating System whithout the need to reinstall applications.</p>\r\n<p>But the most important feature of Debian is its license: it is free software. That means of course, that it comes free of charge regardless, how many instances you install. But much more important it means, that there are absolutely no restrictions on the usage and configuration of the system.</p>\r\n<p>In order to get a recent version of Geoserver we install it as a Java Binary in the users HOME folder, which is best for us in order to have maximum flexibility when working with the GIS data but it is not the standard method to install software in Linux. Still we can use it that way and Debian allows us to even configure our Geoserver as a system service.</p>\r\n<p>Another crucial feature of the Debian system is its advanced system shell BASH, that allows remote operation via a SSH connection made by internet and a programming language, that we use to write maintainance scripts and elaborate backup automatisms with.</p>\r\n \r\n<p><img src=\"uploads/documentation/documentation_systemarchitecture.png\" alt=\"the system\" /></p>\r\n\r\n\r\n<h3>The Installation process</h3>\r\n\r\n<p>As mentioned before the underlaying operating system offers a package management, that allows to install and set up the most important components easily. Since we need some more flexibility regarding Geoserver, we will not use that management system for our GIS component.</p>\r\n\r\n<ul>\r\n<li><h4>Step one: OS Installation and setup</h4>\r\n <p>We use the stable branch of Debian 9 and install it with the minimal desktop system Cinnamon. The latter is somewhat unusual for server appliances. We made the decision, that the seldomly used desktop components can come in handy whenever we need to access the application directly on the machine, whithout using any local network or internet.</p>\r\n <p>The Brix may be connected to a monitor and keyboard/mouse to log in in that direct way, username and password are provided, when such access is neccessary.</p>\r\n <p>The system is installed and set up in a way, that normal operation does not demands such access. The system is set with the hostname <em>ungeoTownname.pm</em>. \"Townname\" would be the name of the town, where the appliance is used, so an Appliance for Bulungu would have the hostname <em>ungeoBulungu.pm</em>.</p>\r\n <p>The following server components are set up and running by default:</p>\r\n <ul>\r\n  <li>SSH (for remote operation via internet or local net at port 22, provides secure filetransfer via SFTP also)</li>\r\n  <li>HTTPD (the webserver Apache listening at port 80)</li>\r\n  <li>MariaDB (internal SQL database RDBMS for use with the Application)</li>\r\n  <li>PostGreSQL (internal SQL database RDBMS for use with Geoserver only)</li>\r\n  <li>PHP 7 module for Apache including several extensions</li>\r\n  </ul>\r\n</li>\r\n<li><h4>Step two: Geoserver Installation</h4>\r\n <p>As mentioned above we install Geoserver from the Platform Independent Binary Package available on the projects website at <a href=\"http://geoserver.org/release/stable/\">geoserver.org</a></p>\r\n <p>The package is extracted and configured in the filesystem at path adress <em>/home/ungeo/geoserver</em> \"ungeo\" is the default username for the system, it is also used for login to the system via network(ssh protocol).</p>\r\n <p>Further geoserver is set up as a system service using the <em>systemctl</em> command used by Debian and all modern Linux distributions to manage and control system services.</p>\r\n <p>The Platform Independent Binary Package comes with the Java based webserver component Jetty, please be aware, that the Tomcat Applet Server, that is used by many other installation methods of Geoserver <strong>is not used</strong> and should not be installed in order to avoid conflicts. As the geoserver service is started, Jetty offers connection to it at port 8080, like so: http://ungeoTownname.pm:8080/geoserver.</p>\r\n <p>Geoserver running at http://ungeoTownname.pm:8080/geoserver <br>\r\n <img src=\"uploads/documentation/screenshot_geoserver.png\" alt=\"screenshot_geoserver\"></p>\r\n </li>\r\n <li><h4>Step three: Installation of the Application</h4>\r\n <p>ProjectMaps is a PHP based webapplication, it is installed as a range of plain folders and files into a place accessible by the apache webserver. That is in our case <em>/home/ungeo/pm</em>. This adress is set up in Apaches configuration files as the default website to be delivered, if any client asks for a connection to port 80.</p>\r\n <p>The Leaflet map software is integrated in the Application, stored in subfolders of <em>/home/ungeo/pm/addons/js</em> and called as needed in the header of the HTML page, that the PHP system delivers at users request. The leaflet software is downloaded to the users computer and executed in his or her browsers context.  Given, that the Appliance is connected via a fast connection in a local network, this process does not take a full second of time. Even with a moderately fast LTS wireless connection a page like the Bulungu map with more than 3400 lines of code (90% of it Java Script) loads and renders in less than 2 seconds, and it gets even faster as the browser caches the Java Script libraries, CSS and images and thus does not need to download these after the first visit anymore.</p>\r\n </li>\r\n </ul>\r\n\r\n \r\n <h3>How we draw the map with Leaflet</h3>\r\n \r\n <p><img src=\"uploads/documentation/doku_leaflet.png\" alt=\"leaflet deployment\"></p>\r\n', 4),
(162, 1, 0, 1543437710, 3, 'test1', 'test entry', 4),
(163, 1, 0, 1543437710, 3, 'Internal remark on test1', 'internal test entry', 10),
(164, 1, 0, 1543437845, 3, 'test1', 'test entry', 4),
(165, 1, 0, 1543437845, 3, 'Internal remark on test1', 'internal test entry', 10),
(166, 1, 0, 1543437884, 3, 'test1', 'test entry', 4),
(167, 1, 0, 1543437884, 3, 'Internal remark on test1', 'internal test entry', 10),
(168, 1, 0, 1543488053, 3, 'Internal remark on Next Test', 'Internal remark on test 3', 10),
(169, 1, 0, 1543488325, 3, '4. Test', 'Fourth Test', 4),
(170, 1, 0, 1543488325, 3, 'Internal remark on 4. Test', 'Internal remark on 4.', 10),
(171, 1, 0, 1543488325, 3, 'Internal remark on 4. Test', 'Internal remark on 4.', 10),
(172, 1, 0, 1543489394, 3, '5. Test', 'Fifth Test', 4),
(173, 1, 0, 1543489394, 3, 'Internal remark on 5. Test', 'Internal remark on 5.', 10),
(174, 1, 0, 1543489395, 3, 'Internal remark on 5. Test', 'Internal remark on 5.', 10),
(175, 1, 0, 1543494293, 3, '6. Testfile, a picture', 'Six Test', 4),
(176, 1, 0, 1543494293, 3, 'Internal remark on 6. Testfile, a picture', 'Internal remark on 6.', 10),
(177, 1, 0, 1543494294, 3, 'Internal remark on 6. Testfile, a picture', 'Internal remark on 6.', 10),
(178, 1, 0, 1543516883, 3, '5. Test', 'nnn', 4),
(179, 1, 0, 1543516883, 3, 'Internal remark on 5. Test', 'mm', 10),
(180, 1, 0, 1543516884, 3, 'Internal remark on 5. Test', 'mm', 10),
(181, 1, 0, 1546603470, 3, 'mehh', 'test1', 4),
(182, 1, 0, 1546603470, 3, 'Internal remark on mehh', 'test2', 10),
(183, 1, 0, 1546603470, 3, 'Internal remark on mehh', 'test2', 10),
(184, 6, 0, 1546686678, 3, '5. Test3', 'Test logged in as ungeo', 4),
(185, 6, 0, 1546686679, 3, 'Internal remark on 5. Test3', 'Später weg machen...', 10),
(186, 6, 0, 1546686679, 3, 'Internal remark on 5. Test3', 'Später weg machen...', 10),
(187, 6, 0, 1546686835, 3, '5. Test3', 'Test logged in as ungeo', 4),
(188, 6, 0, 1546686835, 3, 'Internal remark on 5. Test3', 'Später weg machen...', 10),
(189, 6, 0, 1546686836, 3, 'Internal remark on 5. Test3', 'Später weg machen...', 10),
(190, 6, 0, 1546687847, 3, '5. Test default file', 'A file should always work now', 4),
(191, 6, 0, 1546687847, 3, 'Internal remark on 5. Test default file', 'mal sehen...', 10),
(192, 6, 0, 1546687847, 3, 'Internal remark on 5. Test default file', 'mal sehen...', 10),
(193, 6, 24, 1546951862, 2, 'Test commentaire 24 by Ungeo Admin Time: Jan.08.2019 13:51:02', '&lt;p&gt;Je voudrais &lt;strong&gt;seulement&lt;/strong&gt; confier ces informations &amp;agrave; un syst&amp;egrave;me d&#039;exploitation &lt;em&gt;particuli&amp;egrave;rement&lt;/em&gt; s&amp;ucirc;r.&lt;/p&gt;\r\n&lt;p&gt;Et pas Google ni Microsoft non plus.&lt;/p&gt;\r\n&lt;p&gt;Et Linux &lt;em&gt;c&#039;est&lt;/em&gt; un syst&amp;egrave;me d&#039;exploitation particuli&amp;egrave;rement s&amp;ucirc;r.&lt;/p&gt;', 40),
(194, 6, 0, 1547488857, 3, 'Test for a Shapefile', 'Une archive Zip contenant les fichiers de SHP du SIG.', 4),
(195, 6, 0, 1547488857, 3, 'Internal remark on Test for a Shapefile', 'Testing upload.', 10),
(196, 6, 0, 1547488858, 3, 'Internal remark on Test for a Shapefile', 'Testing upload.', 10);

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pm_projects`
--

CREATE TABLE `pm_projects` (
  `spid` int(8) NOT NULL,
  `filed_by` int(8) NOT NULL,
  `time_of_creation` int(10) NOT NULL,
  `applicant` int(8) NOT NULL,
  `coordinates` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
  `status` int(8) NOT NULL,
  `location` int(6) NOT NULL,
  `remark` text COLLATE utf8_unicode_ci NOT NULL,
  `type` int(2) NOT NULL,
  `plot_owner` int(8) NOT NULL,
  `number_residing_households` int(6) NOT NULL,
  `number_residing_persons` int(6) NOT NULL,
  `number_households_users` int(3) NOT NULL,
  `number_users` int(3) NOT NULL,
  `plot_demarc` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `location_description` text COLLATE utf8_unicode_ci NOT NULL,
  `construction_start` int(64) NOT NULL,
  `construction_handover` int(64) NOT NULL,
  `project_model` int(2) NOT NULL,
  `internal_id` varchar(256) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pm_samplepoint_data_definitions`
--

CREATE TABLE `pm_samplepoint_data_definitions` (
  `sddid` int(9) NOT NULL,
  `description` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `unit` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `parent` int(3) NOT NULL COMMENT 'connection to other items default is 0, connection is sddid',
  `status_criteria` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Daten für Tabelle `pm_samplepoint_data_definitions`
--

INSERT INTO `pm_samplepoint_data_definitions` (`sddid`, `description`, `unit`, `parent`, `status_criteria`) VALUES
(1, 'Faecal coliforms', ' mg/100ml', 0, 'lt|0.0001|passed,gt|0.0001|failed'),
(2, 'Total coliforms', ' mg/100ml', 1, 'lt|0.0001|passed,gt|0.0001|failed'),
(3, 'ntu', ' ntu', 0, ''),
(4, 'ph', 'number', 0, 'lt|5|failed acidric,gt|7|failed basic,range|5&7|passed'),
(5, 'Faecal status', 'yes/no', 1, ''),
(6, 'Chlorine residuals', ' mg/L', 0, ''),
(7, 'Colour', 'text', 0, ''),
(8, 'Odour', 'text', 0, ''),
(9, 'Conductivity', ' mS/cm', 0, ''),
(10, 'Nitrate', ' mg/L', 0, ''),
(11, 'Arsenic', ' ppb', 0, ''),
(12, 'Fluoride', ' mg/L', 0, ''),
(13, 'Iron', ' microgram/L', 0, ''),
(14, 'Ammonia', '', 0, ''),
(15, 'Aluminium', ' microgram/L', 0, ''),
(16, 'Copper', ' microgram/L', 0, ''),
(17, 'Lead', ' microgram/L', 0, ''),
(18, 'Manganese', ' microgram/L', 0, ''),
(19, 'Antiseptic Treatment', '', 0, ''),
(20, 'Nitrite', 'mg/100ml', 0, ''),
(24, 'Vibranium', 'KG/cl', 0, 'gt|25|failed,lt|12|failed,gt|12|passed'),
(25, 'Cryptonite', 'kg/m³', 0, 'gt|12|passed,gt|25|failed'),
(28, 'Observations', '', 0, 'gt||'),
(29, 'QUESTIONNAIRES', '', 0, 'gt||'),
(30, 'GENRE D&#39;USAGERS', '', 0, 'gt||'),
(31, 'Temperature', '°C', 0, 'gt||'),
(32, 'CHLORE LIBRE', 'mg/l', 0, 'gt||'),
(33, 'CHLORE TOTAL', 'mg/l', 0, 'gt||'),
(34, 'E. COLI', 'mg/l', 0, 'gt|0|failed'),
(35, 'DURETE ', 'mg/l', 0, 'gt||'),
(36, 'FER ', 'mg/l', 0, 'gt||'),
(37, 'MAGNESIUM', 'mg/l', 0, 'gt||'),
(38, 'PHOSPHATE', 'mg/l', 0, 'gt||'),
(39, 'POTASSIUM', 'mg/l', 0, 'gt||'),
(40, 'SULFATE', 'mg/l', 0, 'gt||'),
(41, 'ADRESSES BORNES FONTAINES', '', 0, 'gt||'),
(42, 'NOMS D&#39;ENQUETEURS', '', 0, 'gt||'),
(43, 'NATURES DES  PLAINTES Positive', '', 0, 'gt||'),
(44, 'NATURES DES PLAINTES Negative', '', 0, 'gt||');

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pm_samplepoint_objects`
--

CREATE TABLE `pm_samplepoint_objects` (
  `soid` int(9) NOT NULL,
  `coordinates` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `connected_persons` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
  `town` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
  `location` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
  `date` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
  `specialist` int(4) NOT NULL,
  `ownership` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
  `legacy_id` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` int(2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Samplepoints to collect water quality data';

--
-- Daten für Tabelle `pm_samplepoint_objects`
--

INSERT INTO `pm_samplepoint_objects` (`soid`, `coordinates`, `type`, `description`, `connected_persons`, `town`, `location`, `date`, `specialist`, `ownership`, `legacy_id`, `status`) VALUES
(442, '22.4741,2.1826', '340', 'Private Borehole in Bumba', '23', 'Bumba', 'BM_noeuds_ll.14', '1534433017', 1, 'private', '', 2),
(443, '22.4624,2.1981', '370', 'Presumably a supply tube, for testing purposes only...', '700', 'Bumba', 'BM_bf_ll.41', '1536930513', 1, 'public', '', 2),
(444, '24.4835,-6.1272', '299', 'Kabinda shall be in the Statistics too', '456', 'Kabinda', 'KA_bf_ll.14', '1536934831', 1, 'public', '', 2),
(445, '24.4912,-6.1246', '370', 'A node of tubes in Kabinda.', '322', 'Kabinda', 'KA_noueds_ll.16', '1537191545', 1, 'public', '', 2),
(446, '23.5937,-3.5205', '370', 'Stockage point of measurment', '123', 'Lodja', 'LO_stockage_ll.1', '1537191965', 1, 'public', '', 2),
(447, '23.4285,-7.023', '340', 'A testpoint for  a source', '23', 'Mwene', 'MD_sources_ll.1', '1537734294', 1, 'private', '', 2),
(448, '19.587016666667,-4.9926833333333', '340', 'NOM:MUSANGA', '', 'Idiofa', '', '1487026800', 1, 'private', 'IDF_BF_N_32', 1),
(449, '18.5975, -4.5445166666667', '', 'Imported from GESTION DE LA QUALITE ', '', 'Bulungu', '', '1487286000', 1, 'na', 'BLG_CE_Bureau', 2),
(450, '18.61, -4.5573666666667', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Bulungu', '', '1487286000', 1, 'na', '\"BLG_BF_ 3 Manguiers\"', 2),
(451, '18.609983333333, -4.5572166666667', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Bulungu', '', '1487286000', 1, 'na', '\"BLG_BF_3 Manguiers_F1\"', 2),
(452, '18.609983333333, -4.5567333333333', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Bulungu', '', '1487286000', 1, 'na', '\"BLG_BF_3 Manguiers_F2\"', 2),
(453, '18.5939, -4.5458666666667', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Bulungu', '', '1487286000', 1, 'na', 'BLG_BF_Victoire', 2),
(454, '18.587733333333, -4.5302666666667', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Bulungu', '', '1488236400', 1, 'na', 'BLG_BF_Nzando', 2),
(455, '18.58545, -4.5289333333333', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Bulungu', '', '1488236400', 1, 'na', 'BLG_BF_Nzando_F1', 2),
(456, '19.005833333333, -4.9716', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Idiofa', '', '1487026800', 1, 'na', 'IDF_BF_E_26', 2),
(457, '19.591816666667, -4.9741666666667', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Idiofa', '', '1487026800', 1, 'na', 'IDF_BF_E_26_F1', 2),
(458, '19.608883333333, -4.9706666666667', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Idiofa', '', '1487026800', 1, 'na', 'IDF_BF_E_26_F2', 2),
(459, '19.6029, -4.96315', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Idiofa', '', '1487026800', 1, 'na', 'IDF_BF_N_26', 2),
(460, '19.603433333333, -4.9642833333333', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Idiofa', '', '1487026800', 1, 'na', 'IDF_BF_N_26_F1', 2),
(461, '19.60295, -4.9632333333333', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Idiofa', '', '1488236400', 1, 'na', 'IDF_BF_N_26_F2', 2),
(462, '19.59265, -4.9328333333333', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Idiofa', '', '1488236400', 1, 'na', 'IDF_BF_3', 2),
(463, '19.59275, -4.9338833333333', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Idiofa', '', '1488236400', 1, 'na', 'IDF_BF_3_F1', 2),
(464, '19.593516666667, -4.9327166666667', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Idiofa', '', '1488236400', 1, 'na', 'IDF_BF_3_F2', 2),
(465, '19.5939, -4.95045', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Idiofa', '', '1488236400', 1, 'na', 'IDF_BF_9', 2),
(466, '19.593766666667, -4.9505666666667', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Idiofa', '', '1487026800', 1, 'na', 'IDF_BF_9_F1', 2),
(467, '19.583933333333, -4.9506833333333', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Idiofa', '', '1488236400', 1, 'na', 'IDF_BF_9_F2', 2),
(468, '19.57365, -4.9737666666667', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Idiofa', '', '1486940400', 1, 'na', 'IDF_BF_E_35', 2),
(469, '19.57385, -4.973', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Idiofa', '', '1486940400', 1, 'na', 'IDF_BF_E_35_F1', 2),
(470, '19.584083333333, -4.96365', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Idiofa', '', '1486940400', 1, 'na', 'IDF_BF_45', 2),
(471, '19.584066666667, -4.9632333333333', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Idiofa', '', '1486940400', 1, 'na', 'IDF_BF_45_F1', 2),
(472, '19.5841, -4.9636666666667', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Idiofa', '', '1486940400', 1, 'na', 'IDF_BF_45_F2', 2),
(473, '19.565816666667, -4.9647166666667', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Idiofa', '', '1488236400', 1, 'na', 'IDF_BF_E_20', 2),
(474, '18.82415, -5.0359166666667', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Idiofa', '', '1486940400', 1, 'na', 'IDF_BF_E_20_F1', 2),
(475, '19.5674, -4.9645333333333', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Idiofa', '', '1486940400', 1, 'na', 'IDF_BF_E_20_F2', 2),
(476, '19.587016666667, -4.9926833333333', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Idiofa', '', '1486940400', 1, 'na', 'IDF_BF_N_32', 2),
(477, '18.611433333333, -4.5425666666667', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Bulungu', '', '1523224800', 1, 'na', 'BLG_BF_Marché_Nsele', 2),
(478, '18.611366666667, -4.5422166666667', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Bulungu', '', '1488236400', 1, 'na', 'BLG_BF_Marché_NSele_F1', 2),
(479, '18.611733333333, -4.5427333333333', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Bulungu', '', '1523311200', 1, 'na', 'BLG_BF_Marché_NSele_F2', 2),
(480, '17.914, -4.7665166666667', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Masim', '', '1488150000', 1, 'na', 'MSM_US', 2),
(481, '17.910283333333, -4.7626166666667', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Masim', '', '1488150000', 1, 'na', '\"MSM_BF_Desere_2 \"', 2),
(482, '17.910566666667, -4.7632166666667', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Masim', '', '1488150000', 1, 'na', 'MSM_BF_Desere_2_F1', 2),
(483, '17.903466666667, -4.7713166666667', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Masim', '', '1488150000', 1, 'na', 'MSM_BF_Monde_Apart', 2),
(484, '17.905283333333, -4.7717166666667', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Masim', '', '1488150000', 1, 'na', 'MSM_BF_Monde_Apart_F1', 2),
(485, '17.90325, -4.77135', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Masim', '', '1488236400', 1, 'na', '\"MSM_BF_Monde Apart_F2\"', 2),
(486, '17.901066666667, -4.7737', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Masim', '', '1488150000', 1, 'na', 'MSM_BF_Mingongo1', 2),
(487, '17.901166666667, -4.7736', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Masim', '', '1488150000', 1, 'na', '\"MSM_BF_Mingongo 1_F1\"', 2),
(488, '17.899883333333, -4.77395', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Masim', '', '1488150000', 1, 'na', '\"MSM_BF_Mingongo 1_F2\"', 2),
(489, '17.876, -4.7754833333333', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Masim', '', '1488236400', 1, 'na', 'MSM_BF_Madaye', 2),
(490, '17.876266666667, -4.7755', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Masim', '', '1488236400', 1, 'na', 'MSM_BF_Madaye_F1', 2),
(491, '17.876466666667, -4.7746666666667', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Masim', '', '1488236400', 1, 'na', 'MSM_BF_Madaye_F2', 2),
(492, '17.89285, -4.76655', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Masim', '', '1488236400', 1, 'na', 'MSM_BF_Athene', 2),
(493, '17.892466666667, -4.7648833333333', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Masim', '', '1488236400', 1, 'na', 'MSM_BF_Athene_F1', 2),
(494, '17.894866666667, -4.7631833333333', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Masim', '', '1488236400', 1, 'na', 'MSM_BF_Athene_F2', 2),
(495, '17.892616666667, -4.7740166666667', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Masim', '', '1488236400', 1, 'na', '\"MSM_BF_Territoire 1\"', 2),
(496, '17.89145, -4.7731666666667', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Masim', '', '1488236400', 1, 'na', 'MSM_BF_Territoire_1_F1', 2),
(497, '17.891983333333, -4.7729666666667', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Masim', '', '1488236400', 1, 'na', 'MSM_BF_Territorie_1_F2', 2),
(498, '17.8853, -4.7738666666667', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Masim', '', '1488236400', 1, 'na', 'MSM_BF_Cité_1', 2),
(499, '17.884833333333, -4.7739833333333', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Masim', '', '1488236400', 1, 'na', 'MSM_BF_Cité_1_F1', 2),
(500, '17.884783333333, -4.7739', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Masim', '', '1488236400', 1, 'na', 'MSM_BF_Cité_1_F2', 2),
(502, '18.838366666667, -5.0389833333333', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1485817200', 1, 'na', 'KKT_US', 2),
(503, '18.82285, -5.0254166666667', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1485730800', 1, 'na', 'KKT_BF_Carièrre_I', 2),
(504, '18.819883333333, -5.025', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1485730800', 1, 'na', 'KKT_BF_Carièrre_I_F2', 2),
(505, '18.8226, -5.02485', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1485730800', 1, 'na', 'KKT_BF_Carièrre_I_F3', 2),
(506, '18.825783333333, -5.0391833333333', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1485730800', 1, 'na', 'KKT_BF_Clinique', 2),
(507, '18.825483333333, -5.0003333333333', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1488236400', 1, 'na', 'KKT_BF_Clinique_F1', 2),
(508, '18.825283333333, -5.0375166666667', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1488236400', 1, 'na', 'KKT_BF_Clinique_F2', 2),
(509, '18.820116666667, -5.04195', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1488236400', 1, 'na', 'KKT_BF_Bapende', 2),
(510, '18.820033333333, -5.0422', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1485730800', 1, 'na', 'KKT_BF_Bapende_F1', 2),
(511, '18.8211, -5.04265', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1488236400', 1, 'na', 'KKT_BF_Bapende_F2', 2),
(512, '18.830066666667, -5.0312666666667', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', 'mehh', '1488236400', 1, 'na', 'KKT_BF_AMS', 2),
(513, '18.826633333333, -5.0180666666667', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1488236400', 1, 'na', '\"KKT_BF ASM_F1\"', 2),
(514, '18.830033333333, -5.0316666666667', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1488236400', 1, 'na', 'KKT_BF_ASM_F2', 2),
(515, '18.782183333333, -5.0576166666667', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1485817200', 1, 'na', 'KKT_BF_Wazabanga', 2),
(516, '18.780566666667, -5.0584666666667', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1488236400', 1, 'na', 'KKT_BF_Wazabanga_F1', 2),
(517, '18.782666666667, -5.0577666666667', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1485817200', 1, 'na', 'KKT_BF_Wazabanga_F2', 2),
(518, '18.80345, -5.0532166666667', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1485817200', 1, 'na', 'KKT_BF_Kindu', 2),
(519, '18.803166666667, -5.0549333333333', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1488236400', 1, 'na', 'KKT_BF_Kindu_F1', 2),
(520, '18.802516666667, -5.0534833333333', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1485817200', 1, 'na', 'KKT_BF_Kindu_F2', 2),
(521, '18.782033333333, -5.0681833333333', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1488236400', 1, 'na', 'KKT_BF_Commune', 2),
(522, '18.78215, -5.0664666666667', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1485817200', 1, 'na', 'KKT_BF_Commune_F1', 2),
(523, '18.810633333333, -5.0443666666667', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1485817200', 1, 'na', 'KKT_BF_Lumumba', 2),
(524, '26.1065, -5.04355', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1485817200', 1, 'na', 'KKT_BF_Lumumba_F1', 2),
(525, '18.811083333333, -5.0431', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1485817200', 1, 'na', 'KKT_BF_Lumumba_F2', 2),
(526, '18.8006, -5.0230333333333', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1488236400', 1, 'na', 'KKT_BF_Ndekelo_Zulu_1', 2),
(527, '18.8016, -5.0223333333333', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1488236400', 1, 'na', '\"KKT_BF_Ndekelo Zulu 1_F1\"', 2),
(528, '18.8027, -5.0212', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1488236400', 1, 'na', '\"KKT_BF_Ndekelo Zulu 1_F2\"', 2),
(529, '18.791083333333, -5.0343166666667', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1485903600', 1, 'na', 'KKT_BF_Kiloko', 2),
(530, '18.789183333333, -5.0365833333333', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1485903600', 1, 'na', 'KKT_BF_Kiloko_F1', 2),
(531, '18.792233333333, -5.0358', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1488236400', 1, 'na', 'KKT_BF_Kiloko_F2', 2),
(532, '18.808983333333, -5.0198833333333', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1488236400', 1, 'na', 'KKT_BF_523', 2),
(533, '18.808033333333, -5.0187833333333', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1488236400', 1, 'na', 'KKT_BF_523_F1', 2),
(534, '18.80835, -5.01915', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1488236400', 1, 'na', 'KKT_BF_523_F2', 2),
(535, '18.81175, -5.0477833333333', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1488236400', 1, 'na', 'KKT_BF_Idiofa', 2),
(536, '18.81195, -5.0480333333333', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1488236400', 1, 'na', 'KKT_BF_Idiofa_F1', 2),
(537, '18.811333333333, -5.0481333333333', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1488236400', 1, 'na', 'KKT_BF_Idiofa_F2', 2),
(538, '18.797316666667, -5.01825', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1488236400', 1, 'na', 'KKT_BF_Lukolela', 2),
(539, '18.797833333333, -5.0184833333333', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1488236400', 1, 'na', 'KKT_BF_Lukulela_F1', 2),
(540, '18.797733333333, -5.01875', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1488236400', 1, 'na', 'KKT_BF_Lukulela_F2', 2),
(541, '18.80745, -5.0199833333333', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1488236400', 1, 'na', 'KKT_BF_Beno', 2),
(542, '18.808133333333, -5.0200166666667', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1488236400', 1, 'na', 'KKT_BF_Beno_F1', 2),
(543, '18.807716666667, -5.0199333333333', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1488236400', 1, 'na', 'KKT_BF_Beno_F2', 2),
(544, '18.819416666667, -5.0343333333333', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1485990000', 1, 'na', 'KKT_BF_Parquet', 2),
(545, '18.819883333333, -5.03505', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1488236400', 1, 'na', 'KKT_BF_Parquet_F1', 2),
(546, '18.819716666667, -5.0344666666667', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1488236400', 1, 'na', 'KKT_BF_Parquet_F2', 2),
(547, '18.803633333333, -5.02455', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1488236400', 1, 'na', 'KKT_BF_Kinkole', 2),
(548, '18.80385, -5.02515', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1488236400', 1, 'na', 'KKT_BF_Kinkole_F1', 2),
(549, '18.803633333333, -5.02475', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Kikwit', '', '1488236400', 1, 'na', 'KKT_BF_Kinkole_F2', 2),
(550, '17.045816666667, -4.8161', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Kenge', '', '1488236400', 1, 'na', 'KGE_Source', 2),
(551, '17.0327, -4.7949833333333', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Kenge', '', '1488236400', 1, 'na', 'KGE_BF_Kayembe', 2),
(552, '17.032716666667, -4.7951333333333', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Kenge', '', '1488236400', 1, 'na', 'KGE_BF_Kayembe_F1', 2),
(553, '17.032766666667, -4.7953333333333', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Kenge', '', '1488495600', 1, 'na', 'KGE_BF_Kayembe_F2', 2),
(554, '17.035766666667, -4.80375', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Kenge', '', '1488495600', 1, 'na', 'KGE_BF_Museri', 2),
(555, '17.0356, -4.8034666666667', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Kenge', '', '1488236400', 1, 'na', 'KGE_BF_Museri_F1', 2),
(556, '17.036016666667, -4.8035333333333', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Kenge', '', '1488495600', 1, 'na', 'KGE_BF_Museri_F2', 2),
(557, '17.04035, -4.8076666666667', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Kenge', '', '1488495600', 1, 'na', 'KGE_BF_Neo', 2),
(558, '17.039083333333, -4.8080333333333', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Kenge', '', '1488495600', 1, 'na', 'KGE_BF_Neo_F1', 2),
(559, '17.039566666667, -4.8074333333333', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Kenge', '', '1488495600', 1, 'na', 'KGE_BF_Neo_F2', 2),
(560, '17.0437, -4.8157666666667', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Kenge', '', '1488582000', 1, 'na', 'KGE_BF_Usine', 2),
(561, '17.044216666667, -4.8150833333333', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Kenge', '', '1488582000', 1, 'na', 'KGE_BF_Usine_F1', 2),
(562, '17.042833333333, -4.8151833333333', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Kenge', '', '1488236400', 1, 'na', 'KGE_BF_Usine_F2', 2),
(563, '17.040716666667, -4.8248333333333', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Kenge', '', '1488582000', 1, 'na', 'KGE_BF_Mayombe', 2),
(564, '17.040616666667, -4.8250333333333', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Kenge', '', '1488236400', 1, 'na', 'KGE_BF_Mayombe_F1', 2),
(565, '17.040466666667, -4.8248166666667', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Kenge', '', '1488582000', 1, 'na', 'KGE_BF_Mayombe_F2', 2),
(566, '17.04625, -4.8269', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Kenge', '', '1488582000', 1, 'na', 'KGE_BF_Nzey', 2),
(567, '17.046083333333, -4.8268666666667', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Kenge', '', '1488236400', 1, 'na', 'KGE_BF_Nzey_F1', 2),
(568, '17.0473, -4.8267833333333', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Kenge', '', '1488582000', 1, 'na', 'KGE_BF_Nzey_F2', 2),
(569, '17.055833333333, -4.8260666666667', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Kenge', '', '1488582000', 1, 'na', 'KGE_BF_Katandu', 2),
(570, '17.055866666667, -4.82635', '342', 'Imported from GESTION DE LA QUALITE ', '', 'Kenge', '', '1488236400', 1, 'na', 'KGE_BF_Katundu_F1', 2),
(571, '17.0555, -4.8260666666667', '345', 'Imported from GESTION DE LA QUALITE ', '', 'Kenge', '', '1488236400', 1, 'na', 'KGE_BF_Katundu_F2', 2),
(654, '24.4848, -6.14005', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Kabinda', '', '1488236400', 1, 'na', 'KDA_BF_08', 2),
(655, '24.503183333333, -6.1293333333333', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Kabinda', '', '1488236400', 1, 'na', 'KDA_BF_21', 2),
(656, '24.471833333333, -6.1523666666667', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Kabinda', '', '1488236400', 1, 'na', 'KDA_BF_33', 2),
(657, '23.937883333333, -6.7243666666667', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Ngandajika', '', '1520550000', 1, 'na', 'NGK_BF_Ditunga', 2),
(658, '23.954116666667, -6.7574666666667', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Ngandajika', '', '1520550000', 1, 'na', 'NGK_BF_Kamina', 2),
(659, '23.962466666667, -6.7477166666667', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Ngandajika', '', '1520550000', 1, 'na', 'NGK_BF_Territoire', 2),
(660, '23.944383333333, -6.7423333333333', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Ngandajika', '', '1488236400', 1, 'na', 'NGK_BF_Baobab', 2),
(661, '23.962083333333, -6.7286333333333', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Ngandajika', '', '1488236400', 1, 'na', 'NGK_BF_Ina_Banza', 2),
(662, '23.944933333333, -6.71875', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Ngandajika', '', '1520463600', 1, 'na', 'NGK_BF_Tulumbu', 2),
(663, '23.949466666667, -6.73475', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Ngandajika', '', '1520463600', 1, 'na', 'NGK_BF_Mbuyi', 2),
(664, '23.944516666667, -6.70985', '340', 'Imported from GESTION DE LA QUALITE ', '', 'Ngandajika', '', '1488236400', 1, 'na', '\"NGK_BF_Bakita   \"', 2),
(665, '18.5918,-4.526', '299', '', '', 'Bulungu', 'BU_bf_kiosk_ll.62', '1541667225', 2, 'private', '', 0);

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pm_samplepoint_surveys`
--

CREATE TABLE `pm_samplepoint_surveys` (
  `spsid` int(9) NOT NULL,
  `sample_point` int(9) NOT NULL COMMENT 'connected to soid in sample_points',
  `date_of_inspection` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
  `sample_type` varchar(128) COLLATE utf8_unicode_ci NOT NULL COMMENT 'sstid in survey_types',
  `test_point_location` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `sp_device` varchar(128) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Identifier of device that provides the water',
  `specialist` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `remarks` text COLLATE utf8_unicode_ci NOT NULL,
  `status` int(2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Single surveys to collect water quality data';

--
-- Daten für Tabelle `pm_samplepoint_surveys`
--

INSERT INTO `pm_samplepoint_surveys` (`spsid`, `sample_point`, `date_of_inspection`, `sample_type`, `test_point_location`, `sp_device`, `specialist`, `remarks`, `status`) VALUES
(24, 442, '1536703200', '5', 'loc003', 'M01', '1', 'Let the barrel roll...', 2),
(25, 443, '1536876000', '5', 'loc002', 'A02', '1', 'Complete test for testing purposes.', 2),
(26, 442, '1537653600', '1', 'loc003', 'T01', '1', 'One more test with failed coliforms', 2),
(27, 444, '1537653600', '1', 'loc002', 'T01', '1', 'Tank in Kabinda with bad coliforms', 2),
(28, 445, '1537221600', '1', 'loc002', 'S01', '1', 'Basic Test at a improvised tap.', 2),
(29, 446, '1537221600', '1', 'loc002', 'A02', '1', 'Measuring a bad stockage.', 2),
(30, 447, '1537653600', '1', 'loc003', 'M01', '1', 'Basic test for source', 2),
(31, 447, '1537740000', '1', 'loc002', 'A02', '1', 'Now we choosed \r\n a storage mixture.', 2),
(32, 447, '1537912800', '1', 'loc002', 'A02', '1', 'another fail', 2),
(33, 447, '1537999200', '1', 'loc002', 'A02', '1', 'and better', 2),
(34, 447, '1537826400', '1', 'loc002', 'M01', '1', 'failed again', 2),
(35, 442, '1537999200', '1', 'loc003', 'A02', '1', 'Get a consistent dataset now', 2),
(36, 442, '1538085600', '5', 'loc003', 'A02', '1', 'This time, we measure everything...', 2),
(37, 442, '1538172000', '5', 'loc003', 'A02', '1', 'this one failed too with 0.2 coliforms', 2),
(38, 445, '1537999200', '1', 'loc002', 'S01', '1', 'Tapwater on a node of tubes', 2),
(39, 448, '1539036000', '6', 'loc003', '0', '1', 'test for imported sample point', 0),
(41, 443, '1543186800', '6', 'loc003', '0', 'Tests ', 'Test observation.', 0),
(42, 664, '1543446000', '6', 'loc003', 'A02', 'dev', 'None, we just test stuff', 0),
(43, 442, '1543446000', '6', 'loc003', 'A02', 'atze', 'gbb', 0);

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pm_simple_annotations`
--

CREATE TABLE `pm_simple_annotations` (
  `said` int(11) NOT NULL,
  `text` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `status` int(4) NOT NULL,
  `creator` int(8) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Daten für Tabelle `pm_simple_annotations`
--

INSERT INTO `pm_simple_annotations` (`said`, `text`, `status`, `creator`) VALUES
(1, 'sample annotation of type generic', 2, 1);

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pm_sp_survey_data`
--

CREATE TABLE `pm_sp_survey_data` (
  `spsdid` int(9) NOT NULL,
  `spsid` int(9) NOT NULL COMMENT 'connected to survey',
  `sddid` int(9) NOT NULL COMMENT 'connected to data definition',
  `value` varchar(512) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Daten für Tabelle `pm_sp_survey_data`
--

INSERT INTO `pm_sp_survey_data` (`spsdid`, `spsid`, `sddid`, `value`) VALUES
(141, 24, 15, '4'),
(142, 24, 14, '4'),
(143, 24, 19, 'chlor'),
(144, 24, 11, '0'),
(145, 24, 6, '7'),
(146, 24, 7, 'clear'),
(147, 24, 9, '9'),
(148, 24, 16, '4'),
(149, 24, 2, '0.4'),
(150, 24, 1, '0.3'),
(151, 24, 5, 'failed'),
(152, 24, 12, '4'),
(153, 24, 13, '4'),
(154, 24, 17, '4'),
(155, 24, 18, '4'),
(156, 24, 10, '9'),
(157, 24, 20, '9'),
(158, 24, 3, '8'),
(159, 24, 8, 'bad'),
(160, 24, 4, '8.48'),
(161, 25, 15, '9'),
(162, 25, 14, '4'),
(163, 25, 19, 'chlor'),
(164, 25, 11, '0'),
(165, 25, 6, '7'),
(166, 25, 7, 'clear'),
(167, 25, 9, '4'),
(168, 25, 16, '4'),
(169, 25, 2, '0'),
(170, 25, 1, '0'),
(171, 25, 5, 'passed'),
(172, 25, 12, '4'),
(173, 25, 13, '4'),
(174, 25, 17, '0'),
(175, 25, 18, '1'),
(176, 25, 10, '4'),
(177, 25, 20, '2'),
(178, 25, 3, '1'),
(179, 25, 8, 'none'),
(180, 25, 4, '5.52'),
(181, 26, 2, '0.4'),
(182, 26, 1, '0.3'),
(183, 26, 5, 'failed'),
(184, 26, 3, '1'),
(185, 26, 4, '9.19'),
(186, 26, 7, 'clear'),
(187, 26, 8, 'bad'),
(188, 27, 2, '2'),
(189, 27, 1, '1.4'),
(190, 27, 5, 'failed'),
(191, 27, 3, '8'),
(192, 27, 4, '4.92'),
(193, 27, 7, 'blue'),
(194, 27, 8, 'bad'),
(195, 28, 2, '0'),
(196, 28, 1, '0'),
(197, 28, 5, 'passed'),
(198, 28, 3, '1'),
(199, 28, 4, '6.47'),
(200, 28, 7, 'clear'),
(201, 28, 8, 'none'),
(202, 29, 2, '0.9'),
(203, 29, 1, '0.7'),
(204, 29, 5, 'failed'),
(205, 29, 3, '5'),
(206, 29, 4, '7.53'),
(207, 29, 7, 'blue'),
(208, 29, 8, 'acceptable'),
(209, 30, 2, '0'),
(210, 30, 1, '0'),
(211, 30, 5, 'passed'),
(212, 30, 3, '1'),
(213, 30, 4, '6.35'),
(214, 30, 7, 'clear'),
(215, 30, 8, 'none'),
(216, 31, 2, '0.7'),
(217, 31, 1, '0.6'),
(218, 31, 5, 'failed'),
(219, 31, 3, '5'),
(220, 31, 4, '9.67'),
(221, 31, 7, 'blue'),
(222, 31, 8, 'bad'),
(223, 32, 2, '0.4'),
(224, 32, 1, '0.3'),
(225, 32, 5, 'failed'),
(226, 32, 3, '2'),
(227, 32, 4, '7.42'),
(228, 32, 7, 'clear'),
(229, 32, 8, 'none'),
(230, 33, 2, '0'),
(231, 33, 1, '0'),
(232, 33, 5, 'passed'),
(233, 33, 3, '1'),
(234, 33, 4, '7.06'),
(235, 33, 7, 'clear'),
(236, 33, 8, 'none'),
(237, 34, 2, '0.4'),
(238, 34, 1, '0.3'),
(239, 34, 5, 'failed'),
(240, 34, 3, '3'),
(241, 34, 4, '5.64'),
(242, 34, 7, 'blue'),
(243, 34, 8, 'acceptable'),
(244, 35, 2, '0.9'),
(245, 35, 1, '0.7'),
(246, 35, 5, 'failed'),
(247, 35, 3, '5'),
(248, 35, 4, '8.01'),
(249, 35, 7, 'green'),
(250, 35, 8, 'bad'),
(251, 36, 15, '9'),
(252, 36, 14, '4'),
(253, 36, 19, 'chlor'),
(254, 36, 11, '0'),
(255, 36, 6, '7'),
(256, 36, 9, '9'),
(257, 36, 16, '4'),
(258, 36, 2, '0'),
(259, 36, 1, '0'),
(260, 36, 5, 'passed'),
(261, 36, 12, '4'),
(262, 36, 13, '4'),
(263, 36, 17, '0'),
(264, 36, 18, '4'),
(265, 36, 10, '4'),
(266, 36, 20, '2'),
(267, 36, 4, '7'),
(268, 37, 15, '9'),
(269, 37, 14, '4'),
(270, 37, 19, 'chlor'),
(271, 37, 11, '0'),
(272, 37, 6, '7'),
(273, 37, 7, 'blue'),
(274, 37, 9, '4'),
(275, 37, 16, '4'),
(276, 37, 2, '0.2'),
(277, 37, 1, '0.2'),
(278, 37, 5, 'failed'),
(279, 37, 12, '1'),
(280, 37, 13, '1'),
(281, 37, 17, '4'),
(282, 37, 18, '1'),
(283, 37, 10, '4'),
(284, 37, 20, '9'),
(285, 37, 3, '1'),
(286, 37, 8, 'bad'),
(287, 37, 4, '4.45'),
(288, 38, 2, '0'),
(289, 38, 1, '0'),
(290, 38, 5, 'passed'),
(291, 38, 3, '1'),
(292, 38, 4, '7.06'),
(293, 38, 7, 'clear'),
(294, 38, 8, 'none'),
(295, 39, 41, 'na'),
(296, 39, 15, '0'),
(297, 39, 14, '0'),
(298, 39, 11, '0'),
(299, 39, 32, '0'),
(300, 39, 33, '0'),
(301, 39, 9, '0.3'),
(302, 39, 35, '9'),
(303, 39, 34, '0'),
(304, 39, 2, '0.4'),
(305, 39, 1, '0.3'),
(306, 39, 5, 'failed'),
(307, 39, 36, '0'),
(308, 39, 12, '1'),
(309, 39, 30, 'na'),
(310, 39, 37, '2'),
(311, 39, 18, '1'),
(312, 39, 43, 'na'),
(313, 39, 44, 'na'),
(314, 39, 10, '1'),
(315, 39, 20, '2'),
(316, 39, 42, 'Hartmut Noack'),
(317, 39, 3, '1'),
(318, 39, 28, 'na'),
(319, 39, 4, '6.94'),
(320, 39, 38, '0'),
(321, 39, 39, '0'),
(322, 39, 29, 'na'),
(323, 39, 40, '0'),
(324, 39, 31, '34'),
(325, 41, 30, 'tst usage'),
(326, 41, 29, 'none'),
(327, 41, 15, '2'),
(328, 41, 14, '2'),
(329, 41, 11, '2'),
(330, 41, 32, '2'),
(331, 41, 33, '2'),
(332, 41, 9, '2'),
(333, 41, 35, '2'),
(334, 41, 34, '2'),
(335, 41, 2, '0'),
(336, 41, 1, '0'),
(337, 41, 5, 'passed'),
(338, 41, 36, '2'),
(339, 41, 12, '2'),
(340, 41, 37, '2'),
(341, 41, 18, '2'),
(342, 41, 43, '2'),
(343, 41, 44, '2'),
(344, 41, 10, '2'),
(345, 41, 20, '2'),
(346, 41, 3, '2'),
(347, 41, 4, '6.35'),
(348, 41, 38, '2'),
(349, 41, 39, '2'),
(350, 41, 40, '2'),
(351, 41, 31, '28'),
(352, 42, 30, 'testing the water'),
(353, 42, 29, 'no questionaires'),
(354, 42, 15, '2'),
(355, 42, 14, '2'),
(356, 42, 11, '2'),
(357, 42, 32, '4'),
(358, 42, 33, '6'),
(359, 42, 9, '3'),
(360, 42, 35, '3'),
(361, 42, 34, '2'),
(362, 42, 2, '0.4'),
(363, 42, 1, '0.4'),
(364, 42, 5, 'failed'),
(365, 42, 36, '2'),
(366, 42, 12, '1'),
(367, 42, 37, '2'),
(368, 42, 18, '1'),
(369, 42, 43, 'na'),
(370, 42, 44, '2'),
(371, 42, 10, '1'),
(372, 42, 20, '2'),
(373, 42, 3, '2'),
(374, 42, 4, '5.75'),
(375, 42, 38, '0'),
(376, 42, 39, '2'),
(377, 42, 40, '0'),
(378, 42, 31, '34'),
(379, 43, 30, 'na'),
(380, 43, 29, 'none'),
(381, 43, 15, '2'),
(382, 43, 14, '0'),
(383, 43, 11, '0'),
(384, 43, 32, '2'),
(385, 43, 33, '0'),
(386, 43, 9, '0.3'),
(387, 43, 35, '9'),
(388, 43, 34, '2'),
(389, 43, 2, '0'),
(390, 43, 1, '0'),
(391, 43, 5, 'passed'),
(392, 43, 36, '2'),
(393, 43, 12, '1'),
(394, 43, 37, '2'),
(395, 43, 18, '1'),
(396, 43, 43, 'na'),
(397, 43, 44, '2'),
(398, 43, 10, '1'),
(399, 43, 20, '2'),
(400, 43, 3, '1'),
(401, 43, 4, '10.26'),
(402, 43, 38, '0'),
(403, 43, 39, '2'),
(404, 43, 40, '0'),
(405, 43, 31, '34');

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pm_sp_survey_types`
--

CREATE TABLE `pm_sp_survey_types` (
  `sstid` int(4) NOT NULL,
  `name` varchar(512) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `included_values` varchar(2048) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Comma separated data definition ids'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Daten für Tabelle `pm_sp_survey_types`
--

INSERT INTO `pm_sp_survey_types` (`sstid`, `name`, `description`, `included_values`) VALUES
(1, 'Basic Standard Test', 'Checking the most important values, that are considered volatile. Especially Coliforms and PH value. Takes fairly simple equipment and basic training.', '1,2,3,4,7,8'),
(3, 'Special Metals', 'For testing only. Vibranium will not be probed for in the field...', '15,13,24'),
(4, 'Special Metal test2', 'Really, we do not want to probe for Cryptonite either...', '25,24'),
(5, 'Standard Test', 'Allround test for critical values.', '15,14,19,11,6,7,9,16,1,5,12,13,17,18,10,20,3,8,4,2'),
(6, 'GESTION DE LA QUALITE DE L&#39;EAU ', 'Ensemble complet de mesures selon le document Gestion de la qualité.', '15,14,11,32,33,9,35,34,1,5,36,12,37,18,43,44,10,20,3,4,38,39,40,31,2');

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pm_tracker`
--

CREATE TABLE `pm_tracker` (
  `tid` int(12) NOT NULL,
  `event` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `timestamp` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
  `target_table` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `target` int(9) NOT NULL COMMENT 'affected row in another table that is defined via event',
  `user` int(6) NOT NULL,
  `remark` text COLLATE utf8_unicode_ci NOT NULL,
  `status` int(3) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pm_work`
--

CREATE TABLE `pm_work` (
  `wid` int(8) NOT NULL,
  `employee` int(8) NOT NULL,
  `date` varchar(256) COLLATE utf8mb4_unicode_ci NOT NULL,
  `time` int(4) NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `timeframe` varchar(256) COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` int(2) NOT NULL,
  `status` int(2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Daten für Tabelle `pm_work`
--

INSERT INTO `pm_work` (`wid`, `employee`, `date`, `time`, `description`, `timeframe`, `type`, `status`) VALUES
(1, 1, '1522573200', 4, 'Gartenarbeit. Aufr&auml;umarbeiten Holzschnitt.', '13:00 - 19:00', 3, 4),
(2, 1, '1522918800', 4, 'Renovierung Hausflur, Vorbereitung, Abschlagen loser Wandbel&auml;ge', '10:00 - 14:00', 2, 4),
(3, 1, '1523091600', 6, 'Renovierung Hausflur: Spachtelarbeiten.', '10:00 - 19:00', 2, 4),
(4, 1, '1523264400', 4, 'Renovierung Hausflur: Spachtelarbeiten.', '12:00 - 16:00', 2, 4),
(5, 1, '1523350800', 4, 'Renovierung Hausflur: Spachtelarbeiten.', '10:00 - 20:00', 2, 4),
(6, 1, '1523437200', 4, 'Schleifarbeiten, Einkauf Baumarkt.', '10:00 - 19:00', 2, 4),
(7, 1, '1523523600', 4, 'Einkauf Baumarkt, Malerarbeiten', '14:00 -18:00', 2, 4),
(8, 1, '1523610000', 4, 'Einkauf Baumarkt, Malerarbeiten.', '12:00 - 18:00', 2, 4),
(11, 1, '1526335200', 4, 'Renovierung Hausflur', '11:00 - 18:00', 2, 4),
(12, 1, '1526421600', 9, 'Renovierung Hausflur', '10:00 - 23:00', 2, 4),
(13, 1, '1526508000', 6, 'Renovierung Hausflur', '11:00 - 20:00', 2, 4),
(14, 1, '1526594400', 8, 'Renovierung Hausflur', '10:00 - 21:00', 2, 4),
(15, 1, '1526940000', 8, 'Renovierung Hausflur', '10:00 - 21:00', 2, 4),
(16, 1, '1527026400', 7, 'Renovierung Hausflur AufrÃ¤umarbeiten', '11:00 - 20:00', 2, 4),
(17, 1, '1528063200', 8, 'Mauer Kronestr', '12:00 - 21:00', 2, 2),
(18, 1, '1528149600', 6, 'Mauer Kronestr', '11:00 - 20:00', 2, 2),
(19, 1, '1528236000', 4, 'Mauer Kronestr', '10:00 - 15:00', 2, 2),
(20, 1, '1528322400', 6, 'Mauer Kronestr', '10:00 - 21:00', 2, 2),
(21, 1, '1528408800', 3, 'Mauer Kronestr', '10:00 - 14:00', 2, 2);

--
-- Indizes der exportierten Tabellen
--

--
-- Indizes für die Tabelle `pm_attributes`
--
ALTER TABLE `pm_attributes`
  ADD PRIMARY KEY (`aid`),
  ADD KEY `name` (`name`);

--
-- Indizes für die Tabelle `pm_bills`
--
ALTER TABLE `pm_bills`
  ADD PRIMARY KEY (`bid`),
  ADD UNIQUE KEY `bid` (`bid`);

--
-- Indizes für die Tabelle `pm_collections`
--
ALTER TABLE `pm_collections`
  ADD PRIMARY KEY (`coid`);

--
-- Indizes für die Tabelle `pm_connector`
--
ALTER TABLE `pm_connector`
  ADD PRIMARY KEY (`cid`);

--
-- Indizes für die Tabelle `pm_data_definitions`
--
ALTER TABLE `pm_data_definitions`
  ADD PRIMARY KEY (`ddid`),
  ADD KEY `type_name` (`type_name`(255));

--
-- Indizes für die Tabelle `pm_documents`
--
ALTER TABLE `pm_documents`
  ADD PRIMARY KEY (`did`);

--
-- Indizes für die Tabelle `pm_events`
--
ALTER TABLE `pm_events`
  ADD PRIMARY KEY (`evid`),
  ADD KEY `name` (`name`(191)),
  ADD KEY `begin` (`begin`(191));

--
-- Indizes für die Tabelle `pm_external_persons`
--
ALTER TABLE `pm_external_persons`
  ADD PRIMARY KEY (`epid`),
  ADD UNIQUE KEY `epid` (`epid`),
  ADD KEY `date_of_creation` (`date_of_creation`),
  ADD KEY `nicename` (`nicename`);

--
-- Indizes für die Tabelle `pm_files`
--
ALTER TABLE `pm_files`
  ADD PRIMARY KEY (`fid`);

--
-- Indizes für die Tabelle `pm_inventory_items`
--
ALTER TABLE `pm_inventory_items`
  ADD PRIMARY KEY (`iid`),
  ADD UNIQUE KEY `iid` (`iid`),
  ADD UNIQUE KEY `inventory_id` (`inventory_id`);

--
-- Indizes für die Tabelle `pm_links`
--
ALTER TABLE `pm_links`
  ADD PRIMARY KEY (`lid`);

--
-- Indizes für die Tabelle `pm_map_config`
--
ALTER TABLE `pm_map_config`
  ADD PRIMARY KEY (`mcid`);

--
-- Indizes für die Tabelle `pm_mini_bim`
--
ALTER TABLE `pm_mini_bim`
  ADD PRIMARY KEY (`bim_id`);

--
-- Indizes für die Tabelle `pm_objects`
--
ALTER TABLE `pm_objects`
  ADD PRIMARY KEY (`oid`);

--
-- Indizes für die Tabelle `pm_options`
--
ALTER TABLE `pm_options`
  ADD PRIMARY KEY (`opid`);

--
-- Indizes für die Tabelle `pm_posts`
--
ALTER TABLE `pm_posts`
  ADD PRIMARY KEY (`pid`),
  ADD UNIQUE KEY `pid` (`pid`);

--
-- Indizes für die Tabelle `pm_projects`
--
ALTER TABLE `pm_projects`
  ADD PRIMARY KEY (`spid`),
  ADD UNIQUE KEY `spid` (`spid`);

--
-- Indizes für die Tabelle `pm_samplepoint_data_definitions`
--
ALTER TABLE `pm_samplepoint_data_definitions`
  ADD PRIMARY KEY (`sddid`);

--
-- Indizes für die Tabelle `pm_samplepoint_objects`
--
ALTER TABLE `pm_samplepoint_objects`
  ADD PRIMARY KEY (`soid`);

--
-- Indizes für die Tabelle `pm_samplepoint_surveys`
--
ALTER TABLE `pm_samplepoint_surveys`
  ADD PRIMARY KEY (`spsid`);

--
-- Indizes für die Tabelle `pm_simple_annotations`
--
ALTER TABLE `pm_simple_annotations`
  ADD PRIMARY KEY (`said`);

--
-- Indizes für die Tabelle `pm_sp_survey_data`
--
ALTER TABLE `pm_sp_survey_data`
  ADD PRIMARY KEY (`spsdid`);

--
-- Indizes für die Tabelle `pm_sp_survey_types`
--
ALTER TABLE `pm_sp_survey_types`
  ADD PRIMARY KEY (`sstid`);

--
-- Indizes für die Tabelle `pm_tracker`
--
ALTER TABLE `pm_tracker`
  ADD PRIMARY KEY (`tid`);

--
-- Indizes für die Tabelle `pm_work`
--
ALTER TABLE `pm_work`
  ADD PRIMARY KEY (`wid`);

--
-- AUTO_INCREMENT für exportierte Tabellen
--

--
-- AUTO_INCREMENT für Tabelle `pm_attributes`
--
ALTER TABLE `pm_attributes`
  MODIFY `aid` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=72;

--
-- AUTO_INCREMENT für Tabelle `pm_bills`
--
ALTER TABLE `pm_bills`
  MODIFY `bid` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT für Tabelle `pm_collections`
--
ALTER TABLE `pm_collections`
  MODIFY `coid` int(8) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT für Tabelle `pm_connector`
--
ALTER TABLE `pm_connector`
  MODIFY `cid` int(9) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=424;

--
-- AUTO_INCREMENT für Tabelle `pm_data_definitions`
--
ALTER TABLE `pm_data_definitions`
  MODIFY `ddid` int(9) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT für Tabelle `pm_documents`
--
ALTER TABLE `pm_documents`
  MODIFY `did` int(8) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26;

--
-- AUTO_INCREMENT für Tabelle `pm_events`
--
ALTER TABLE `pm_events`
  MODIFY `evid` int(9) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT für Tabelle `pm_external_persons`
--
ALTER TABLE `pm_external_persons`
  MODIFY `epid` int(8) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;

--
-- AUTO_INCREMENT für Tabelle `pm_files`
--
ALTER TABLE `pm_files`
  MODIFY `fid` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=97;

--
-- AUTO_INCREMENT für Tabelle `pm_inventory_items`
--
ALTER TABLE `pm_inventory_items`
  MODIFY `iid` int(8) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT für Tabelle `pm_links`
--
ALTER TABLE `pm_links`
  MODIFY `lid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=70;

--
-- AUTO_INCREMENT für Tabelle `pm_map_config`
--
ALTER TABLE `pm_map_config`
  MODIFY `mcid` int(3) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT für Tabelle `pm_mini_bim`
--
ALTER TABLE `pm_mini_bim`
  MODIFY `bim_id` int(9) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT für Tabelle `pm_objects`
--
ALTER TABLE `pm_objects`
  MODIFY `oid` int(9) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=32;

--
-- AUTO_INCREMENT für Tabelle `pm_options`
--
ALTER TABLE `pm_options`
  MODIFY `opid` int(8) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT für Tabelle `pm_posts`
--
ALTER TABLE `pm_posts`
  MODIFY `pid` int(8) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=197;

--
-- AUTO_INCREMENT für Tabelle `pm_projects`
--
ALTER TABLE `pm_projects`
  MODIFY `spid` int(8) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT für Tabelle `pm_samplepoint_data_definitions`
--
ALTER TABLE `pm_samplepoint_data_definitions`
  MODIFY `sddid` int(9) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=45;

--
-- AUTO_INCREMENT für Tabelle `pm_samplepoint_objects`
--
ALTER TABLE `pm_samplepoint_objects`
  MODIFY `soid` int(9) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=666;

--
-- AUTO_INCREMENT für Tabelle `pm_samplepoint_surveys`
--
ALTER TABLE `pm_samplepoint_surveys`
  MODIFY `spsid` int(9) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=44;

--
-- AUTO_INCREMENT für Tabelle `pm_simple_annotations`
--
ALTER TABLE `pm_simple_annotations`
  MODIFY `said` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT für Tabelle `pm_sp_survey_data`
--
ALTER TABLE `pm_sp_survey_data`
  MODIFY `spsdid` int(9) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=406;

--
-- AUTO_INCREMENT für Tabelle `pm_sp_survey_types`
--
ALTER TABLE `pm_sp_survey_types`
  MODIFY `sstid` int(4) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT für Tabelle `pm_tracker`
--
ALTER TABLE `pm_tracker`
  MODIFY `tid` int(12) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT für Tabelle `pm_work`
--
ALTER TABLE `pm_work`
  MODIFY `wid` int(8) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;
COMMIT;

