diff --git a/doc/model/pbraiders.mwb b/doc/model/pbraiders.mwb new file mode 100644 index 0000000..bc5fc80 Binary files /dev/null and b/doc/model/pbraiders.mwb differ diff --git a/doc/model/report/basic.css b/doc/model/report/basic.css new file mode 100644 index 0000000..49477bb --- /dev/null +++ b/doc/model/report/basic.css @@ -0,0 +1,429 @@ +/* General settings */ +body { + color: #000000; + font-family : Trebuchet MS, Arial, Verdana, sans-serif; + background : #FFFFFF; + margin-bottom : 0px; + margin-left : 0px; + margin-right : 0px; + margin-top : 0px; +} + +img { + border: none; +} + +a { + color: white; + text-decoration: none; +} + +a:hover { + color: white; + text-decoration: underline; +} + +a:focus { + border: none; + outline: none; +} + +.report_na_entry { + color: #AAA; +} + +.top-title { + font-family: Tahoma, Verdana, sans-serif; + font-size: 150%; + font-weight: bold; + vertical-align: middle; + background: url(images/title-background.png) no-repeat right; +} + +/* Sections in navigation bar */ +.overview-heading { + padding-top: 8px; + padding-bottom: 8px; + color: white; +} + +.overview-heading a { + display: block; + width: 100%; +} + +.ov_section_link { + background: #4D9100; + color: white; + font-weight : normal; + text-align : center; + width : 100%; + display : block; + padding-top: 12px; + padding-bottom: 12px; + border-bottom: 1px solid #B7B7B7; +} + +.ov_section_link a { + color: white; + font-weight : bold; + text-align : center; + text-decoration: none; + display : inline; + width: 100%; +} + +.ov_section_link a:hover { + font-weight: bold; + text-decoration: underline; + color: white; +} + +.ov_section_qualifier { + color: #3D8100; +} + +.ov_section_subitem { + background: #5DA110; + font-weight: normal; + text-align: center; + width: 100%; + padding-top: 2px; + padding-bottom: 4px; + display : block; + height: 14px; +} + +/* Object links in navigation bar */ +.ov_object_link { + font-size: 75%; + font-weight: normal; + text-align: left; + text-indent: 15px; + width: 100%; +} + +.ov_object_link a { + color: black; + background: #E7F7D4; + text-decoration : none; + display : block; + border-top: 1px solid #D7E7C4; + width: 100%; +} + +.ov_object_link a:hover { + background: white; +} + +.ov_object_link a:focus { + background: white; + outline: none; +} + +/* Overview on content page */ +.overview { + margin-left: auto; + margin-right: auto; + padding: 50px; + background: #F0F0F0; + border: 1px solid #CCC; +} + +.overview-head { + font-family: Tahoma, sans-serif; + text-align: center; + text-decoration: none; + margin-top: 50px; +} + +.property-name { + font-weight: bold; +} + +.property-value { + color: #4D9100; +} + +/* Table details on content page */ +.tbl_detail_page { + margin: 10px; +} + +.schema_header { + background: #FB9B21; + font-size : 12pt; + font-weight : bold; + padding-left : 10px; + padding-bottom : 5px; + padding-top : 5px; + border: 1px solid #888888; + display : block; +} + +/* Full details on content page */ +.full_detail_page { + padding-left: 10px; + padding-right: 10px; +} + +/* Shared formatting table details and full details */ +.table_header { + background: #DB7B01; + font-size : 10pt; + font-weight : bold; + padding-left : 10px; + padding-bottom : 5px; + padding-top : 5px; + border: 1px solid #BBBBBB; + display : block; +} + +.table_body { + background: #EEEEEE; + padding: 15px; + border-left: 1px solid #BBBBBB; + border-bottom: 1px solid #BBBBBB; + border-right: 1px solid #BBBBBB; + margin-bottom:10px; +} + +.subitem_header { + color: black; + font-size : 75%; + font-weight : bold; + padding-bottom : 5px; + padding-top : 5px; +} + +.subitems_table { + border:1px solid #CCCCCC; + margin-bottom: 15px; +} + +.subitem_table_head { + color: white; + background: #DB4801; + font-size : 90%; + font-weight : bold; + text-align : left; + border: 0pt solid #000000; + padding-bottom : 3px; + padding-left : 10px; + padding-right : 2px; + padding-top : 3px; +} + +.details-property-name { + color: white; + background: #DB4801; + font-size: 75%; + font-weight: bold; + text-align: left; + border: 0pt solid #000000; + padding-bottom : 3px; + padding-left: 10px; + padding-right: 2px; + padding-top: 3px; +} + +.details-property-value { + color: #333333; + font-size: 75%; + font-weight: normal; + text-align: left; + border: 0pt solid #000000; + padding-bottom: 3px; + padding-left: 10px; + padding-right: 2px; + padding-top: 3px; + vertical-align: top; + background: white; +} + +.details-sub-property-name { + color: white; + background: #E5520B; + font-size: 75%; + font-weight: normal; + text-align: left; + border: none; + padding: 3px 2px 3px 30px; +} + +.details-sub-property-value { + color: #333333; + background: #F0F0F0; + font-size: 75%; + font-weight: normal; + text-align: left; + border: none; + padding: 3px 2px 3px 30px; + vertical-align: top; +} + +.properties-table-head { + font-size: 80%; + background: #F7DFD4; + font-weight: bold; +} + +.subitem_table_field { + color: #333333; + font-size: 75%; + font-weight: normal; + text-align: left; + border: 0pt solid #000000; + padding-bottom: 3px; + padding-left: 10px; + padding-right: 2px; + padding-top: 3px; + vertical-align: top; + background:white; +} + +.ddl_field { + color: #333333; + font-size:85%; + font-weight: normal; + text-align: left; + padding: 5px 5px 0px 5px; + vertical-align: top; + background: white; + border:1px solid #CCCCCC; +} + +.ddl_field pre { + overflow: auto; +} + +.small_text { + font-size: 75%; +} + +.ov_overview_page { + background: white; +} + +.ov_main { + background: #007791; + color: white; + font-weight: bold; + display : block; + text-align : center; + padding-left : 0px; + padding-right : 0px; +} + +/* Syntax highlighting styles ------------------------------------ */ +.syntax_default { + color: black; + font-weight: normal; +} + +.syntax_comment { + color: #097BF7; + font-weight: normal; +} + +.syntax_comment_line { + color: #097BF7; + font-weight: normal; +} + +.syntax_variable { + color: #378EA5; + font-weight: normal; +} + +.syntax_system_variable { + color: #378EA5; + font-weight: normal; +} + +.syntax_known_system_variable { + color: #3A37A5; + font-weight: normal; +} + +.syntax_number { + color: #7F7F00; + font-weight: normal; +} + +.syntax_major_keyword { + color: black; + font-weight: bold; +} + +.syntax_keyword { + color: #007F00; + font-weight: bold; +} + +.syntax_database_object { + color: red; + font-weight: normal; +} + +.syntax_procedure_keyword { + color: #56007F; + font-weight: bold; +} + +.syntax_string { + color: #FFAA3E; + font-weight: normal; +} + +.syntax_single_quoted_string { + color: #FFAA3E; + font-weight: normal; +} + +.syntax_double_quoted_string { + color: #274A6D; + font-weight: normal; +} + +.syntax_operator { + color: black; + font-weight: bold; +} + +.syntax_function { + color: #903600; + font-weight: normal; +} + +.syntax_identifier { + color: black; + font-weight: normal; +} + +.syntax_quoted_identifier { + color: #274A6D; + font-weight: normal; +} + +.syntax_user1 { + color: #808080; + font-weight: normal; +} + +.syntax_user2 { + color: #808080; + font-weight: normal; +} + +.syntax_user3 { + color: #E0E0E0; + font-weight: normal; +} + +.syntax_hidden_command { + color: #097BF7; + background: #F0F0F0; + font-weight: normal; +} + diff --git a/doc/model/report/coated.css b/doc/model/report/coated.css new file mode 100644 index 0000000..10832e1 --- /dev/null +++ b/doc/model/report/coated.css @@ -0,0 +1,428 @@ +/* General settings */ +body { + color: #000000; + font-family : Trebuchet MS, Arial, Verdana, sans-serif; + background : #FFFFFF; + margin-bottom : 0px; + margin-left : 0px; + margin-right : 0px; + margin-top : 0px; +} + +img { + border: none; +} + +a { + color: white; + text-decoration: none; +} + +a:hover { + color: white; + text-decoration: underline; +} + +a:focus { + border: none; + outline: none; +} + +.report_na_entry { + color: #AAA; +} + +.top-title { + font-family: Tahoma, Verdana, sans-serif; + font-size: 150%; + font-weight: bold; + vertical-align: middle; + background: url(images/title-background.png) no-repeat right; +} + +/* Sections in navigation bar */ +.overview-heading { + padding-top: 8px; + padding-bottom: 8px; + color: white; +} + +.overview-heading a { + display: block; + width: 100%; +} + +.ov_section_link { + background: #6F9149; + color: white; + font-weight : normal; + text-align : center; + width : 100%; + display : block; + padding-top: 12px; + padding-bottom: 12px; + border-bottom: 1px solid #B7B7B7; +} + +.ov_section_link a { + color: white; + font-weight : bold; + text-align : center; + text-decoration: none; + display : inline; + width: 100%; +} + +.ov_section_link a:hover { + font-weight: bold; + text-decoration: underline; + color: white; +} + +.ov_section_qualifier { + color: #3D8100; +} + +.ov_section_subitem { + background: #7BA151; + font-weight: normal; + text-align: center; + width: 100%; + padding-top: 2px; + padding-bottom: 4px; + display : block; + height: 14px; +} + +/* Object links in navigation bar */ +.ov_object_link { + font-size: 75%; + font-weight: normal; + text-align: left; + text-indent: 15px; + width: 100%; +} + +.ov_object_link a { + color: black; + background: #E7F7D4; + text-decoration : none; + display : block; + border-top: 1px solid #D7E7C4; + width: 100%; +} + +.ov_object_link a:hover { + background: white; +} + +.ov_object_link a:focus { + background: white; + outline: none; +} + +/* Overview on content page */ +.overview { + margin-left: auto; + margin-right: auto; + padding: 50px; + background: #F0F0F0; + border: 1px solid #CCC; +} + +.overview-head { + font-family: Tahoma, sans-serif; + text-align: center; + text-decoration: none; + margin-top: 50px; +} + +.property-name { + font-weight: bold; +} + +.property-value { + color: #6F9149; +} + +/* Table details on content page */ +.tbl_detail_page { + margin: 10px; +} + +.schema_header { + background: #FBC47E; + font-size : 12pt; + font-weight : bold; + padding-left : 10px; + padding-bottom : 5px; + padding-top : 5px; + border: 1px solid #888888; + display : block; +} + +/* Full details on content page */ +.full_detail_page { + padding-left: 10px; + padding-right: 10px; +} + +/* Shared formatting table details and full details */ +.table_header { + background: #DBAB6E; + font-size : 10pt; + font-weight : bold; + padding-left : 10px; + padding-bottom : 5px; + padding-top : 5px; + border: 1px solid #BBBBBB; + display : block; +} + +.table_body { + background: #EEEEEE; + padding: 15px; + border-left: 1px solid #BBBBBB; + border-bottom: 1px solid #BBBBBB; + border-right: 1px solid #BBBBBB; + margin-bottom:10px; +} + +.subitem_header { + color: black; + font-size : 75%; + font-weight : bold; + padding-bottom : 5px; + padding-top : 5px; +} + +.subitems_table { + border:1px solid #CCCCCC; + margin-bottom: 15px; +} + +.subitem_table_head { + color: white; + background: #DB916E; + font-size : 90%; + font-weight : bold; + text-align : left; + border: 0pt solid #000000; + padding-bottom : 3px; + padding-left : 10px; + padding-right : 2px; + padding-top : 3px; +} + +.details-property-name { + color: white; + background: #DB916E; + font-size: 75%; + font-weight: bold; + text-align: left; + border: 0pt solid #000000; + padding-bottom : 3px; + padding-left: 10px; + padding-right: 2px; + padding-top: 3px; +} + +.details-property-value { + color: #333333; + font-size: 75%; + font-weight: normal; + text-align: left; + border: 0pt solid #000000; + padding-bottom: 3px; + padding-left: 10px; + padding-right: 2px; + padding-top: 3px; + vertical-align: top; + background: white; +} + +.details-sub-property-name { + color: white; + background: #E59B78; + font-size: 75%; + font-weight: normal; + text-align: left; + border: none; + padding: 3px 2px 3px 30px; +} + +.details-sub-property-value { + color: #333333; + background: #F0F0F0; + font-size: 75%; + font-weight: normal; + text-align: left; + border: none; + padding: 3px 2px 3px 30px; + vertical-align: top; +} + +.properties-table-head { + font-size: 80%; + background: #F7DFD4; + font-weight: bold; +} + +.subitem_table_field { + color: #333333; + font-size: 75%; + font-weight: normal; + text-align: left; + border: 0pt solid #000000; + padding-bottom: 3px; + padding-left: 10px; + padding-right: 2px; + padding-top: 3px; + vertical-align: top; + background: white; +} + +.ddl_field { + color: #333333; + font-size:85%; + font-weight: normal; + text-align: left; + padding: 5px 5px 0px 5px; + vertical-align: top; + background: white; + border:1px solid #CCCCCC; +} + +.ddl_field pre { + overflow: auto; +} + +.small_text { + font-size: 75%; +} + +.ov_overview_page { + background: white; +} + +.ov_main { + background: #498491; + color: white; + font-weight: bold; + display : block; + text-align : center; + padding-left : 0px; + padding-right : 0px; +} + +/* Syntax highlighting styles ------------------------------------ */ +.syntax_default { + color: black; + font-weight: normal; +} + +.syntax_comment { + color: #097BF7; + font-weight: normal; +} + +.syntax_comment_line { + color: #097BF7; + font-weight: normal; +} + +.syntax_variable { + color: #378EA5; + font-weight: normal; +} + +.syntax_system_variable { + color: #378EA5; + font-weight: normal; +} + +.syntax_known_system_variable { + color: #3A37A5; + font-weight: normal; +} + +.syntax_number { + color: #7F7F00; + font-weight: normal; +} + +.syntax_major_keyword { + color: black; + font-weight: bold; +} + +.syntax_keyword { + color: #007F00; + font-weight: bold; +} + +.syntax_database_object { + color: red; + font-weight: normal; +} + +.syntax_procedure_keyword { + color: #56007F; + font-weight: bold; +} + +.syntax_string { + color: #FFAA3E; + font-weight: normal; +} + +.syntax_single_quoted_string { + color: #FFAA3E; + font-weight: normal; +} + +.syntax_double_quoted_string { + color: #274A6D; + font-weight: normal; +} + +.syntax_operator { + color: black; + font-weight: bold; +} + +.syntax_function { + color: #903600; + font-weight: normal; +} + +.syntax_identifier { + color: black; + font-weight: normal; +} + +.syntax_quoted_identifier { + color: #274A6D; + font-weight: normal; +} + +.syntax_user1 { + color: #808080; + font-weight: normal; +} + +.syntax_user2 { + color: #808080; + font-weight: normal; +} + +.syntax_user3 { + color: #E0E0E0; + font-weight: normal; +} + +.syntax_hidden_command { + color: #097BF7; + background: #F0F0F0; + font-weight: normal; +} diff --git a/doc/model/report/images/Logo.gif b/doc/model/report/images/Logo.gif new file mode 100644 index 0000000..4e0aa99 Binary files /dev/null and b/doc/model/report/images/Logo.gif differ diff --git a/doc/model/report/images/back.png b/doc/model/report/images/back.png new file mode 100644 index 0000000..182e45e Binary files /dev/null and b/doc/model/report/images/back.png differ diff --git a/doc/model/report/images/next.png b/doc/model/report/images/next.png new file mode 100644 index 0000000..1d8c27b Binary files /dev/null and b/doc/model/report/images/next.png differ diff --git a/doc/model/report/images/preview_coated.png b/doc/model/report/images/preview_coated.png new file mode 100644 index 0000000..27876ef Binary files /dev/null and b/doc/model/report/images/preview_coated.png differ diff --git a/doc/model/report/images/preview_main.png b/doc/model/report/images/preview_main.png new file mode 100644 index 0000000..b20b251 Binary files /dev/null and b/doc/model/report/images/preview_main.png differ diff --git a/doc/model/report/images/title-background.png b/doc/model/report/images/title-background.png new file mode 100644 index 0000000..b17ad99 Binary files /dev/null and b/doc/model/report/images/title-background.png differ diff --git a/doc/model/report/index.html b/doc/model/report/index.html new file mode 100644 index 0000000..6b03275 --- /dev/null +++ b/doc/model/report/index.html @@ -0,0 +1 @@ + Model Report <body> <p>This browser does not support frames. Please try Mozilla Firefox.</p> </body> \ No newline at end of file diff --git a/doc/model/report/overview.html b/doc/model/report/overview.html new file mode 100644 index 0000000..5aacd77 --- /dev/null +++ b/doc/model/report/overview.html @@ -0,0 +1,87 @@ + + + + + Model Report - Overview + + + + +

Overview

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Document Title: pbraiders
Project Name: pbraiders.com
Author: Olivier JULLIEN
Version: 1.1.0-CAMP
Description: PBRaiders release CAMP
Created: 30-01-2009
Last Updated: 2010-06-15 17:50
Schemata: 1
Tables: 6
Views: 0
Stored Routines: 0
Columns: 54
Indices: 19
Foreign Keys: 5
Triggers: 0
Events: not supported
Report Generated: 2010-06-15 17:50
+ + + diff --git a/doc/model/report/overview_list.html b/doc/model/report/overview_list.html new file mode 100644 index 0000000..21ecc00 --- /dev/null +++ b/doc/model/report/overview_list.html @@ -0,0 +1,52 @@ + + + + + Model Report - Overview + + + + +
+
Schema Overview
+ + + + + + + + + + + + +
+ + + diff --git a/doc/model/report/routine_details.html b/doc/model/report/routine_details.html new file mode 100644 index 0000000..1d89962 --- /dev/null +++ b/doc/model/report/routine_details.html @@ -0,0 +1,16 @@ + + + + + Model Report - Table Details + + + + + + + + + + + diff --git a/doc/model/report/table_details.html b/doc/model/report/table_details.html new file mode 100644 index 0000000..47ad4f9 --- /dev/null +++ b/doc/model/report/table_details.html @@ -0,0 +1,1564 @@ + + + + + Model Report - Table Details + + + + + + + +
Schema pbrcampdb
(1/1)
+
+ +
+
DDL script
+ + + + +
CREATE SCHEMA IF NOT EXISTS `pbrcampdb` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci 
+
+ + + +
Table config
(1/6)
+
+
+ + +
Table Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Average Row Lengthn/aUse Check Sumno
Connection Stringn/aDefault Character Setn/a
Default Collationn/aDelay Key Updatesno
Minimal Row Countn/aMaximum Row Countn/a
Union Tablesn/aMerge Methodn/a
Pack Keysn/aHas Passwordno
Data Directoryn/aIndex Directoryn/a
EngineInnoDBRow Formatn/a
+ + + + +
Columns
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyColumn NameDatatypeNot NullDefaultComment
PKnameVARCHAR(45)Yesname of the option
valueVARCHAR(255)Yesvalue of the option
roleTINYINT(1)Yes10minimun credential to modify the value
+ + +
Indices
+ + + + + + + + + + + + + + + + + + + + + + +
Index NameColumnsPrimaryUniqueTypeKindComment
PRIMARY + +
YesNoPRIMARY
+ + + + +
Table Comments
+ + + + +
Contains configuration options
+ + +
DDL script
+ + + + +
CREATE  TABLE IF NOT EXISTS `pbrcampdb`.`config` (
`name` VARCHAR(45) NOT NULL COMMENT 'name of the option' ,
`value` VARCHAR(255) NOT NULL COMMENT 'value of the option' ,
`role` TINYINT(1) UNSIGNED NOT NULL DEFAULT 10 COMMENT 'minimun credential to modify the value' ,
PRIMARY KEY (`name`) )
ENGINE = InnoDB
COMMENT = 'Contains configuration options'
+ +
+ + +
Table user
(2/6)
+
+
+ + +
Table Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Average Row Lengthn/aUse Check Sumno
Connection Stringn/aDefault Character Setn/a
Default Collationn/aDelay Key Updatesno
Minimal Row Countn/aMaximum Row Countn/a
Union Tablesn/aMerge Methodn/a
Pack Keysn/aHas Passwordno
Data Directoryn/aIndex Directoryn/a
EngineInnoDBRow Formatn/a
+ + + + +
Columns
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyColumn NameDatatypeNot NullDefaultComment
PKiduserSMALLINTYesunique internal identifier
loginVARCHAR(45)Yesuser name
passwordVARCHAR(40)Yesencrypted user password
registeredDATETIMEYesdate of registration. In server timezone.
roleTINYINT(1)Yes00=user, 10=administrator
last_visitDATETIMENodate of the last visit. In server time zone.
stateTINYINT(1)Yes10:deleted, 1:activated
+ + +
Indices
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Index NameColumnsPrimaryUniqueTypeKindComment
PRIMARY + +
YesNoPRIMARY
ui_user_name + +
NoNoUNIQUE
ix_user_name + +
NoNoINDEX
+ + +
Relationships
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Relationship NameRelationship TypeParent TableChild TableCard.
fk_contact_user_createNon-Identifyingusercontact1:n
fk_contact_user_updateNon-Identifyingusercontact1:n
fk_reservation_user_createNon-Identifyinguserreservation1:n
fk_reservation_user_updateNon-Identifyinguserreservation1:n
+ + + +
Table Comments
+ + + + +
Contains users
+ + +
DDL script
+ + + + +
CREATE  TABLE IF NOT EXISTS `pbrcampdb`.`user` (
`iduser` SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'unique internal identifier' ,
`login` VARCHAR(45) NOT NULL COMMENT 'user name' ,
`password` VARCHAR(40) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NOT NULL COMMENT 'encrypted user password' ,
`registered` DATETIME NOT NULL COMMENT 'date of registration. In server timezone.' ,
`role` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '0=user, 10=administrator' ,
`last_visit` DATETIME NULL COMMENT 'date of the last visit. In server time zone.' ,
`state` TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '0:deleted, 1:activated' ,
PRIMARY KEY (`iduser`) ,
UNIQUE INDEX `ui_user_name` (`login` ASC) ,
INDEX `ix_user_name` (`login` ASC) )
ENGINE = InnoDB
COMMENT = 'Contains users'
+ +
+ + +
Table log
(3/6)
+
+
+ + +
Table Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Average Row Lengthn/aUse Check Sumno
Connection Stringn/aDefault Character Setn/a
Default Collationn/aDelay Key Updatesno
Minimal Row Countn/aMaximum Row Countn/a
Union Tablesn/aMerge Methodn/a
Pack Keysn/aHas Passwordno
Data Directoryn/aIndex Directoryn/a
EngineInnoDBRow Formatn/a
+ + + + +
Columns
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyColumn NameDatatypeNot NullDefaultComment
PKidlogBIGINTYesunique internal identifier
loggedDATETIMEYesdate when the error is raised
usernameVARCHAR(45)Yesuser name
typeVARCHAR(15)Yeslog type (warn, error,...)
titleTEXTYestitle
descriptionTEXTYesdescription
mysqluserVARCHAR(255)Nomysql user authentication
mysqlcurrentuserVARCHAR(255)Nomysql current user authentication
+ + +
Indices
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Index NameColumnsPrimaryUniqueTypeKindComment
PRIMARY + +
YesNoPRIMARY
in_log_date + +
NoNoINDEX
+ + + + +
Table Comments
+ + + + +
Errors and logs
+ + +
DDL script
+ + + + +
CREATE  TABLE IF NOT EXISTS `pbrcampdb`.`log` (
`idlog` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'unique internal identifier' ,
`logged` DATETIME NOT NULL COMMENT 'date when the error is raised' ,
`username` VARCHAR(45) NOT NULL COMMENT 'user name' ,
`type` VARCHAR(15) NOT NULL COMMENT 'log type (warn, error,...)' ,
`title` TEXT NOT NULL COMMENT 'title' ,
`description` TEXT NOT NULL COMMENT 'description' ,
`mysqluser` VARCHAR(255) NULL COMMENT 'mysql user authentication' ,
`mysqlcurrentuser` VARCHAR(255) NULL COMMENT 'mysql current user authentication' ,
PRIMARY KEY (`idlog`) ,
INDEX `in_log_date` (`logged` ASC) )
ENGINE = InnoDB
COMMENT = 'Errors and logs'
+ +
+ + +
Table session
(4/6)
+
+
+ + +
Table Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Average Row Lengthn/aUse Check Sumno
Connection Stringn/aDefault Character Setn/a
Default Collationn/aDelay Key Updatesno
Minimal Row Countn/aMaximum Row Countn/a
Union Tablesn/aMerge Methodn/a
Pack Keysn/aHas Passwordno
Data Directoryn/aIndex Directoryn/a
EngineInnoDBRow Formatn/a
+ + + + +
Columns
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyColumn NameDatatypeNot NullDefaultComment
PKloginVARCHAR(45)Yesuser identifier
sessionVARCHAR(200)Yessession identifier
inetINTYesCRC32 checksum of the concatenation of IP and USER_AGENT
create_dateINTYesDate of creation
expire_dateINTYesDate of expiration
logoffTINYINT(1)Yes01: should be deleted. Updated when user ask for deconnection
+ + +
Indices
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Index NameColumnsPrimaryUniqueTypeKindComment
PRIMARY + +
YesNoPRIMARY
ix_session_session + +
NoNoINDEX
+ + + + +
Table Comments
+ + + + +
Session Table - store sessions in mysql so it matters not what server rpc request goes too
+ + +
DDL script
+ + + + +
CREATE  TABLE IF NOT EXISTS `pbrcampdb`.`session` (
`login` VARCHAR(45) NOT NULL COMMENT 'user identifier' ,
`session` VARCHAR(200) NOT NULL COMMENT 'session identifier' ,
`inet` INT UNSIGNED NOT NULL COMMENT 'CRC32 checksum of the concatenation of IP and USER_AGENT' ,
`create_date` INT UNSIGNED NOT NULL COMMENT 'Date of creation' ,
`expire_date` INT UNSIGNED NOT NULL COMMENT 'Date of expiration' ,
`logoff` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '1: should be deleted. Updated when user ask for deconnection' ,
PRIMARY KEY (`login`) ,
INDEX `ix_session_session` (`session` ASC) )
ENGINE = InnoDB
COMMENT = 'Session Table - store sessions in mysql so it matters not what server rpc request goes too'
+ +
+ + +
Table contact
(5/6)
+
+
+ + +
Table Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Average Row Lengthn/aUse Check Sumno
Connection Stringn/aDefault Character Setn/a
Default Collationn/aDelay Key Updatesno
Minimal Row Countn/aMaximum Row Countn/a
Union Tablesn/aMerge Methodn/a
Pack Keysn/aHas Passwordno
Data Directoryn/aIndex Directoryn/a
EngineInnoDBRow Formatn/a
+ + + + +
Columns
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyColumn NameDatatypeNot NullDefaultComment
PKidcontactMEDIUMINTYesunique internal identifier
lastnameVARCHAR(40)Yescontact name
firstnameVARCHAR(40)Yescontact first name
telVARCHAR(40)Yestel numbers
emailVARCHAR(255)Noemails
addressVARCHAR(255)Noaddress
address_moreVARCHAR(255)Noaddress more
cityVARCHAR(255)Nocity
zipVARCHAR(8)Nozip
commentTEXTNocomment
create_dateDATETIMEYescreation date in server time zone
create_iduserSMALLINTYesuser who created the contact
update_dateDATETIMENolast update date in server time zone
update_iduserSMALLINTNouser who updated the contact
+ + +
Indices
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Index NameColumnsPrimaryUniqueTypeKindComment
PRIMARY + +
YesNoPRIMARY
fk_contact_user_create + +
NoNoFOREIGN
fk_contact_user_update + +
NoNoFOREIGN
ix_contact_lastname + +
NoNoINDEX
+ + +
Relationships
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Relationship NameRelationship TypeParent TableChild TableCard.
fk_contact_user_createNon-Identifyingusercontact1:n
fk_contact_user_updateNon-Identifyingusercontact1:n
fk_reservation_contactNon-Identifyingcontactreservation1:n
+ + + +
Table Comments
+ + + + +
Contains the contacts
+ + +
DDL script
+ + + + +
CREATE  TABLE IF NOT EXISTS `pbrcampdb`.`contact` (
`idcontact` MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'unique internal identifier' ,
`lastname` VARCHAR(40) NOT NULL COMMENT 'contact name' ,
`firstname` VARCHAR(40) NOT NULL COMMENT 'contact first name' ,
`tel` VARCHAR(40) NOT NULL COMMENT 'tel numbers' ,
`email` VARCHAR(255) NULL COMMENT 'emails' ,
`address` VARCHAR(255) NULL COMMENT 'address' ,
`address_more` VARCHAR(255) NULL COMMENT 'address more' ,
`city` VARCHAR(255) NULL COMMENT 'city' ,
`zip` VARCHAR(8) NULL COMMENT 'zip' ,
`comment` TEXT NULL COMMENT 'comment' ,
`create_date` DATETIME NOT NULL COMMENT 'creation date in server time zone' ,
`create_iduser` SMALLINT UNSIGNED NOT NULL COMMENT 'user who created the contact' ,
`update_date` DATETIME NULL COMMENT 'last update date in server time zone' ,
`update_iduser` SMALLINT UNSIGNED NULL COMMENT 'user who updated the contact' ,
PRIMARY KEY (`idcontact`) ,
INDEX `fk_contact_user_create` (`create_iduser` ASC) ,
INDEX `fk_contact_user_update` (`update_iduser` ASC) ,
INDEX `ix_contact_lastname` (`lastname` ASC) ,
CONSTRAINT `fk_contact_user_create`
FOREIGN KEY (`create_iduser` )
REFERENCES `pbrcampdb`.`user` (`iduser` )
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_contact_user_update`
FOREIGN KEY (`update_iduser` )
REFERENCES `pbrcampdb`.`user` (`iduser` )
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
COMMENT = 'Contains the contacts'
+ +
+ + +
Table reservation
(6/6)
+
+
+ + +
Table Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Average Row Lengthn/aUse Check Sumno
Connection Stringn/aDefault Character Setn/a
Default Collationn/aDelay Key Updatesno
Minimal Row Countn/aMaximum Row Countn/a
Union Tablesn/aMerge Methodn/a
Pack Keysn/aHas Passwordno
Data Directoryn/aIndex Directoryn/a
EngineInnoDBRow Formatn/a
+ + + + +
Columns
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyColumn NameDatatypeNot NullDefaultComment
PKidreservationMEDIUMINTYesunique internal identifier
idcontactMEDIUMINTYescontact identifier
yearSMALLINTYesreservation date year
monthTINYINTYesreservation date month
dayTINYINTYesreservation date day
rent_realSMALLINTYes0real rent count
rent_plannedSMALLINTYes0planned rent count
rent_canceledSMALLINTYes0canceled rent count
rent_maxSMALLINTYesmax rent allowed
ageTINYINTNo1:16-25, 2:26-35, 3:35 and more.
arrheTINYINTNo1:cash, 2:check, 3:credit card
commentTEXTNocomment
create_dateDATETIMEYescreation date in server time zone
create_iduserSMALLINTYesuser who created the reservation
update_dateDATETIMENolast update date in server time zone
update_iduserSMALLINTNouser who updated the reservation
+ + +
Indices
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Index NameColumnsPrimaryUniqueTypeKindComment
PRIMARY + +
YesNoPRIMARY
fk_reservation_contact + +
NoNoFOREIGN
fk_reservation_user_create + +
NoNoFOREIGN
fk_reservation_user_update + +
NoNoFOREIGN
ix_reservation_year + +
NoNoINDEX
ix_reservation_month + +
NoNoINDEX
ix_reservation_day + +
NoNoINDEX
+ + +
Relationships
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Relationship NameRelationship TypeParent TableChild TableCard.
fk_reservation_contactNon-Identifyingcontactreservation1:n
fk_reservation_user_createNon-Identifyinguserreservation1:n
fk_reservation_user_updateNon-Identifyinguserreservation1:n
+ + + +
Table Comments
+ + + + +
Contains the reservations
+ + +
DDL script
+ + + + +
CREATE  TABLE IF NOT EXISTS `pbrcampdb`.`reservation` (
`idreservation` MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'unique internal identifier' ,
`idcontact` MEDIUMINT UNSIGNED NOT NULL COMMENT 'contact identifier' ,
`year` SMALLINT UNSIGNED NOT NULL COMMENT 'reservation date year' ,
`month` TINYINT UNSIGNED NOT NULL COMMENT 'reservation date month' ,
`day` TINYINT UNSIGNED NOT NULL COMMENT 'reservation date day' ,
`rent_real` SMALLINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'real rent count' ,
`rent_planned` SMALLINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'planned rent count' ,
`rent_canceled` SMALLINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'canceled rent count' ,
`rent_max` SMALLINT UNSIGNED NOT NULL COMMENT 'max rent allowed' ,
`age` TINYINT UNSIGNED NULL COMMENT '1:16-25, 2:26-35, 3:35 and more.' ,
`arrhe` TINYINT UNSIGNED NULL COMMENT '1:cash, 2:check, 3:credit card' ,
`comment` TEXT NULL COMMENT 'comment' ,
`create_date` DATETIME NOT NULL COMMENT 'creation date in server time zone' ,
`create_iduser` SMALLINT UNSIGNED NOT NULL COMMENT 'user who created the reservation' ,
`update_date` DATETIME NULL COMMENT 'last update date in server time zone' ,
`update_iduser` SMALLINT UNSIGNED NULL COMMENT 'user who updated the reservation' ,
PRIMARY KEY (`idreservation`) ,
INDEX `fk_reservation_contact` (`idcontact` ASC) ,
INDEX `fk_reservation_user_create` (`create_iduser` ASC) ,
INDEX `fk_reservation_user_update` (`update_iduser` ASC) ,
INDEX `ix_reservation_year` (`year` ASC) ,
INDEX `ix_reservation_month` (`month` ASC) ,
INDEX `ix_reservation_day` (`day` ASC) ,
CONSTRAINT `fk_reservation_contact`
FOREIGN KEY (`idcontact` )
REFERENCES `pbrcampdb`.`contact` (`idcontact` )
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_reservation_user_create`
FOREIGN KEY (`create_iduser` )
REFERENCES `pbrcampdb`.`user` (`iduser` )
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_reservation_user_update`
FOREIGN KEY (`update_iduser` )
REFERENCES `pbrcampdb`.`user` (`iduser` )
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
COMMENT = 'Contains the reservations'
+ +
+ + + + + diff --git a/doc/model/report/table_details_list.html b/doc/model/report/table_details_list.html new file mode 100644 index 0000000..059c65f --- /dev/null +++ b/doc/model/report/table_details_list.html @@ -0,0 +1,194 @@ + + + + + Model Report - Overview + + + + +
+
Schema Overview
+ + + + + + +
+ + + diff --git a/doc/model/report/table_element_details.html b/doc/model/report/table_element_details.html new file mode 100644 index 0000000..f3f695f --- /dev/null +++ b/doc/model/report/table_element_details.html @@ -0,0 +1,4952 @@ + + + + + + + + + + + +
Column name
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Nameconfig
Key PartPrimary key
NullableNo
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentname of the option
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeVARCHAR(45)
Is User TypeNo
+
+
+ + +
Column value
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Nameconfig
Key Part
NullableNo
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentvalue of the option
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeVARCHAR(255)
Is User TypeNo
+
+
+ + +
Column role
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Nameconfig
Key Part
NullableNo
Default Value10
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentminimun credential to modify the value
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeTINYINT(1)
Is User TypeNo
+
+
+ + +
Column iduser
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Nameuser
Key PartPrimary key
NullableNo
Default Value
Auto IncrementYes
Character SetSchema Default
Collation NameSchema Default
Commentunique internal identifier
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeSMALLINT
Is User TypeNo
+
+
+ + +
Column login
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Nameuser
Key Part
NullableNo
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentuser name
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeVARCHAR(45)
Is User TypeNo
+
+
+ + +
Column password
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Nameuser
Key Part
NullableNo
Default Value
Auto IncrementNo
Character Setutf8
Collation Nameutf8_bin
Commentencrypted user password
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeVARCHAR(40)
Is User TypeNo
+
+
+ + +
Column registered
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Nameuser
Key Part
NullableNo
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentdate of registration. In server timezone.
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeDATETIME
Is User TypeNo
+
+
+ + +
Column role
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Nameuser
Key Part
NullableNo
Default Value0
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Comment0=user, 10=administrator
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeTINYINT(1)
Is User TypeNo
+
+
+ + +
Column last_visit
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Nameuser
Key Part
NullableYes
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentdate of the last visit. In server time zone.
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeDATETIME
Is User TypeNo
+
+
+ + +
Column state
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Nameuser
Key Part
NullableNo
Default Value1
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Comment0:deleted, 1:activated
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeTINYINT(1)
Is User TypeNo
+
+
+ + +
Column idlog
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namelog
Key PartPrimary key
NullableNo
Default Value
Auto IncrementYes
Character SetSchema Default
Collation NameSchema Default
Commentunique internal identifier
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeBIGINT
Is User TypeNo
+
+
+ + +
Column logged
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namelog
Key Part
NullableNo
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentdate when the error is raised
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeDATETIME
Is User TypeNo
+
+
+ + +
Column username
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namelog
Key Part
NullableNo
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentuser name
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeVARCHAR(45)
Is User TypeNo
+
+
+ + +
Column type
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namelog
Key Part
NullableNo
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentlog type (warn, error,...)
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeVARCHAR(15)
Is User TypeNo
+
+
+ + +
Column title
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namelog
Key Part
NullableNo
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commenttitle
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeTEXT
Is User TypeNo
+
+
+ + +
Column description
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namelog
Key Part
NullableNo
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentdescription
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeTEXT
Is User TypeNo
+
+
+ + +
Column mysqluser
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namelog
Key Part
NullableYes
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentmysql user authentication
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeVARCHAR(255)
Is User TypeNo
+
+
+ + +
Column mysqlcurrentuser
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namelog
Key Part
NullableYes
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentmysql current user authentication
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeVARCHAR(255)
Is User TypeNo
+
+
+ + +
Column login
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namesession
Key PartPrimary key
NullableNo
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentuser identifier
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeVARCHAR(45)
Is User TypeNo
+
+
+ + +
Column session
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namesession
Key Part
NullableNo
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentsession identifier
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeVARCHAR(200)
Is User TypeNo
+
+
+ + +
Column inet
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namesession
Key Part
NullableNo
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
CommentCRC32 checksum of the concatenation of IP and USER_AGENT
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeINT
Is User TypeNo
+
+
+ + +
Column create_date
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namesession
Key Part
NullableNo
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
CommentDate of creation
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeINT
Is User TypeNo
+
+
+ + +
Column expire_date
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namesession
Key Part
NullableNo
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
CommentDate of expiration
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeINT
Is User TypeNo
+
+
+ + +
Column logoff
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namesession
Key Part
NullableNo
Default Value0
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Comment1: should be deleted. Updated when user ask for deconnection
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeTINYINT(1)
Is User TypeNo
+
+
+ + +
Column idcontact
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namecontact
Key PartPrimary key
NullableNo
Default Value
Auto IncrementYes
Character SetSchema Default
Collation NameSchema Default
Commentunique internal identifier
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeMEDIUMINT
Is User TypeNo
+
+
+ + +
Column lastname
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namecontact
Key Part
NullableNo
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentcontact name
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeVARCHAR(40)
Is User TypeNo
+
+
+ + +
Column firstname
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namecontact
Key Part
NullableNo
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentcontact first name
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeVARCHAR(40)
Is User TypeNo
+
+
+ + +
Column tel
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namecontact
Key Part
NullableNo
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commenttel numbers
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeVARCHAR(40)
Is User TypeNo
+
+
+ + +
Column email
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namecontact
Key Part
NullableYes
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentemails
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeVARCHAR(255)
Is User TypeNo
+
+
+ + +
Column address
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namecontact
Key Part
NullableYes
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentaddress
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeVARCHAR(255)
Is User TypeNo
+
+
+ + +
Column address_more
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namecontact
Key Part
NullableYes
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentaddress more
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeVARCHAR(255)
Is User TypeNo
+
+
+ + +
Column city
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namecontact
Key Part
NullableYes
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentcity
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeVARCHAR(255)
Is User TypeNo
+
+
+ + +
Column zip
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namecontact
Key Part
NullableYes
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentzip
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeVARCHAR(8)
Is User TypeNo
+
+
+ + +
Column comment
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namecontact
Key Part
NullableYes
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentcomment
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeTEXT
Is User TypeNo
+
+
+ + +
Column create_date
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namecontact
Key Part
NullableNo
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentcreation date in server time zone
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeDATETIME
Is User TypeNo
+
+
+ + +
Column create_iduser
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namecontact
Key PartForeign key
NullableNo
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentuser who created the contact
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeSMALLINT
Is User TypeNo
+
+
+ + +
Column update_date
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namecontact
Key Part
NullableYes
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentlast update date in server time zone
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeDATETIME
Is User TypeNo
+
+
+ + +
Column update_iduser
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namecontact
Key PartForeign key
NullableYes
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentuser who updated the contact
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeSMALLINT
Is User TypeNo
+
+
+ + +
Column idreservation
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namereservation
Key PartPrimary key
NullableNo
Default Value
Auto IncrementYes
Character SetSchema Default
Collation NameSchema Default
Commentunique internal identifier
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeMEDIUMINT
Is User TypeNo
+
+
+ + +
Column idcontact
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namereservation
Key PartForeign key
NullableNo
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentcontact identifier
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeMEDIUMINT
Is User TypeNo
+
+
+ + +
Column year
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namereservation
Key Part
NullableNo
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentreservation date year
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeSMALLINT
Is User TypeNo
+
+
+ + +
Column month
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namereservation
Key Part
NullableNo
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentreservation date month
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeTINYINT
Is User TypeNo
+
+
+ + +
Column day
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namereservation
Key Part
NullableNo
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentreservation date day
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeTINYINT
Is User TypeNo
+
+
+ + +
Column rent_real
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namereservation
Key Part
NullableNo
Default Value0
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentreal rent count
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeSMALLINT
Is User TypeNo
+
+
+ + +
Column rent_planned
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namereservation
Key Part
NullableNo
Default Value0
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentplanned rent count
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeSMALLINT
Is User TypeNo
+
+
+ + +
Column rent_canceled
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namereservation
Key Part
NullableNo
Default Value0
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentcanceled rent count
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeSMALLINT
Is User TypeNo
+
+
+ + +
Column rent_max
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namereservation
Key Part
NullableNo
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentmax rent allowed
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeSMALLINT
Is User TypeNo
+
+
+ + +
Column age
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namereservation
Key Part
NullableYes
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Comment1:16-25, 2:26-35, 3:35 and more.
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeTINYINT
Is User TypeNo
+
+
+ + +
Column arrhe
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namereservation
Key Part
NullableYes
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Comment1:cash, 2:check, 3:credit card
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeTINYINT
Is User TypeNo
+
+
+ + +
Column comment
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namereservation
Key Part
NullableYes
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentcomment
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeTEXT
Is User TypeNo
+
+
+ + +
Column create_date
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namereservation
Key Part
NullableNo
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentcreation date in server time zone
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeDATETIME
Is User TypeNo
+
+
+ + +
Column create_iduser
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namereservation
Key PartForeign key
NullableNo
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentuser who created the reservation
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeSMALLINT
Is User TypeNo
+
+
+ + +
Column update_date
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namereservation
Key Part
NullableYes
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentlast update date in server time zone
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeDATETIME
Is User TypeNo
+
+
+ + +
Column update_iduser
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namereservation
Key PartForeign key
NullableYes
Default Value
Auto IncrementNo
Character SetSchema Default
Collation NameSchema Default
Commentuser who updated the reservation
+ +
Data Type Details
+ + + + + + + + + + + + + +
DatatypeSMALLINT
Is User TypeNo
+
+
+ + + + +
Index PRIMARY
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Nameconfig
Is Primary KeyYes
Is UniqueNo
TypePRIMARY
Kind
Key Block Size0
Comment
+ +
Columns
+ + + + + + + + + + + + + +
Column NameColumn OrderComment
nameAscendingno comment
+
+
+ + +
Index PRIMARY
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Nameuser
Is Primary KeyYes
Is UniqueNo
TypePRIMARY
Kind
Key Block Size0
Comment
+ +
Columns
+ + + + + + + + + + + + + +
Column NameColumn OrderComment
iduserAscendingno comment
+
+
+ + +
Index ui_user_name
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Nameuser
Is Primary KeyNo
Is UniqueNo
TypeUNIQUE
Kind
Key Block Size0
Comment
+ +
Columns
+ + + + + + + + + + + + + +
Column NameColumn OrderComment
loginAscendingno comment
+
+
+ + +
Index ix_user_name
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Nameuser
Is Primary KeyNo
Is UniqueNo
TypeINDEX
Kind
Key Block Size0
Comment
+ +
Columns
+ + + + + + + + + + + + + +
Column NameColumn OrderComment
loginAscendingno comment
+
+
+ + +
Index PRIMARY
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namelog
Is Primary KeyYes
Is UniqueNo
TypePRIMARY
Kind
Key Block Size0
Comment
+ +
Columns
+ + + + + + + + + + + + + +
Column NameColumn OrderComment
idlogAscendingno comment
+
+
+ + +
Index in_log_date
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namelog
Is Primary KeyNo
Is UniqueNo
TypeINDEX
Kind
Key Block Size0
Comment
+ +
Columns
+ + + + + + + + + + + + + +
Column NameColumn OrderComment
loggedAscendingno comment
+
+
+ + +
Index PRIMARY
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namesession
Is Primary KeyYes
Is UniqueNo
TypePRIMARY
Kind
Key Block Size0
Comment
+ +
Columns
+ + + + + + + + + + + + + +
Column NameColumn OrderComment
loginAscendingno comment
+
+
+ + +
Index ix_session_session
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namesession
Is Primary KeyNo
Is UniqueNo
TypeINDEX
Kind
Key Block Size0
Comment
+ +
Columns
+ + + + + + + + + + + + + +
Column NameColumn OrderComment
sessionAscendingno comment
+
+
+ + +
Index PRIMARY
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namecontact
Is Primary KeyYes
Is UniqueNo
TypePRIMARY
Kind
Key Block Size0
Comment
+ +
Columns
+ + + + + + + + + + + + + +
Column NameColumn OrderComment
idcontactAscendingno comment
+
+
+ + +
Index fk_contact_user_create
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namecontact
Is Primary KeyNo
Is UniqueNo
TypeFOREIGN
Kind
Key Block Size0
Comment
+ +
Columns
+ + + + + + + + + + + + + +
Column NameColumn OrderComment
create_iduserAscendingno comment
+
+
+ + +
Index fk_contact_user_update
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namecontact
Is Primary KeyNo
Is UniqueNo
TypeFOREIGN
Kind
Key Block Size0
Comment
+ +
Columns
+ + + + + + + + + + + + + +
Column NameColumn OrderComment
update_iduserAscendingno comment
+
+
+ + +
Index ix_contact_lastname
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namecontact
Is Primary KeyNo
Is UniqueNo
TypeINDEX
Kind
Key Block Size0
Comment
+ +
Columns
+ + + + + + + + + + + + + +
Column NameColumn OrderComment
lastnameAscendingno comment
+
+
+ + +
Index PRIMARY
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namereservation
Is Primary KeyYes
Is UniqueNo
TypePRIMARY
Kind
Key Block Size0
Comment
+ +
Columns
+ + + + + + + + + + + + + +
Column NameColumn OrderComment
idreservationAscendingno comment
+
+
+ + +
Index fk_reservation_contact
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namereservation
Is Primary KeyNo
Is UniqueNo
TypeFOREIGN
Kind
Key Block Size0
Comment
+ +
Columns
+ + + + + + + + + + + + + +
Column NameColumn OrderComment
idcontactAscendingno comment
+
+
+ + +
Index fk_reservation_user_create
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namereservation
Is Primary KeyNo
Is UniqueNo
TypeFOREIGN
Kind
Key Block Size0
Comment
+ +
Columns
+ + + + + + + + + + + + + +
Column NameColumn OrderComment
create_iduserAscendingno comment
+
+
+ + +
Index fk_reservation_user_update
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namereservation
Is Primary KeyNo
Is UniqueNo
TypeFOREIGN
Kind
Key Block Size0
Comment
+ +
Columns
+ + + + + + + + + + + + + +
Column NameColumn OrderComment
update_iduserAscendingno comment
+
+
+ + +
Index ix_reservation_year
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namereservation
Is Primary KeyNo
Is UniqueNo
TypeINDEX
Kind
Key Block Size0
Comment
+ +
Columns
+ + + + + + + + + + + + + +
Column NameColumn OrderComment
yearAscendingno comment
+
+
+ + +
Index ix_reservation_month
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namereservation
Is Primary KeyNo
Is UniqueNo
TypeINDEX
Kind
Key Block Size0
Comment
+ +
Columns
+ + + + + + + + + + + + + +
Column NameColumn OrderComment
monthAscendingno comment
+
+
+ + +
Index ix_reservation_day
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schema Namepbrcampdb
Table Namereservation
Is Primary KeyNo
Is UniqueNo
TypeINDEX
Kind
Key Block Size0
Comment
+ +
Columns
+ + + + + + + + + + + + + +
Column NameColumn OrderComment
dayAscendingno comment
+
+
+ + + + +
Foreign Key fk_contact_user_create
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Parent Tableuser
Child Tablecontact
Cardinality1:n
Delete RuleNO ACTION
Update RuleNO ACTION
Is MandatoryNo
+
+
+ + +
Foreign Key fk_contact_user_update
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Parent Tableuser
Child Tablecontact
Cardinality1:n
Delete RuleNO ACTION
Update RuleNO ACTION
Is MandatoryNo
+
+
+ + +
Foreign Key fk_reservation_contact
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Parent Tablecontact
Child Tablereservation
Cardinality1:n
Delete RuleNO ACTION
Update RuleNO ACTION
Is MandatoryNo
+
+
+ + +
Foreign Key fk_reservation_user_create
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Parent Tableuser
Child Tablereservation
Cardinality1:n
Delete RuleNO ACTION
Update RuleNO ACTION
Is MandatoryNo
+
+
+ + +
Foreign Key fk_reservation_user_update
+
+
+
General Info
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Parent Tableuser
Child Tablereservation
Cardinality1:n
Delete RuleNO ACTION
Update RuleNO ACTION
Is MandatoryNo
+
+
+ + + + + + + diff --git a/doc/model/report/top.html b/doc/model/report/top.html new file mode 100644 index 0000000..00504ab --- /dev/null +++ b/doc/model/report/top.html @@ -0,0 +1,17 @@ + + + + + + + + + + +
+ MySQL Homepage + + MySQL Workbench Detailed Model Report +
+ + \ No newline at end of file diff --git a/doc/model/report/view_details.html b/doc/model/report/view_details.html new file mode 100644 index 0000000..1d89962 --- /dev/null +++ b/doc/model/report/view_details.html @@ -0,0 +1,16 @@ + + + + + Model Report - Table Details + + + + + + + + + + + diff --git a/src/config-sample.php b/src/config-sample.php index 353e602..3c3a2c1 100644 --- a/src/config-sample.php +++ b/src/config-sample.php @@ -64,6 +64,10 @@ * Réglages application ***************************/ +// LIFETIME +define('PBR_LIFETIME_COOKIE',36000); +define('PBR_LIFETIME_SESSION',36000); + // PAGING - Number of contacts and rents to display per page. define('PBR_PAGE_CONTACTS',50); define('PBR_PAGE_RENTS',50); diff --git a/src/contact.php b/src/contact.php index adaaecb..a5b43fa 100644 --- a/src/contact.php +++ b/src/contact.php @@ -31,13 +31,16 @@ /************************************************************************* * file encoding: UTF-8 * description: build and display the contact page. - * GET: act=update|show, cti=, pag=, del= + * GET: cti=contact identifier, pag= + * POST: update=update case, ctX= + * delete=delete case, cti=contact identifier * author: Olivier JULLIEN - 2010-02-04 + * update: Olivier JULLIEN - 2010-06-15 - improvement *************************************************************************/ /** Defines **********/ - define('PBR_VERSION','1.1.0'); + define('PBR_VERSION','1.2.0'); define('PBR_PATH',dirname(__FILE__)); /** Include config @@ -48,182 +51,168 @@ ********************/ require(PBR_PATH.'/includes/function/functions.php'); - /** Initialize - *************/ - require(PBR_PATH.'/includes/init/init.php'); - $sAction=NULL; - $iMessageCode=0; + /** Initialize context + *********************/ + require(PBR_PATH.'/includes/init/context.php'); /** Authenticate ***************/ - require(PBR_PATH.'/includes/init/inituser.php'); + require(PBR_PATH.'/includes/init/authuser.php'); - /** Include main object(s) - *************************/ + /** Initialize + *************/ require(PBR_PATH.'/includes/class/ccontact.php'); require(PBR_PATH.'/includes/class/cdate.php'); + require(PBR_PATH.'/includes/class/crent.php'); require(PBR_PATH.'/includes/class/cpaging.php'); + $pContact = new CContact(); + $pPaging = new CPaging(); + $iMessageCode = 0; /** Read input parameters ************************/ - if( CUser::GetInstance()->IsAuthenticated() && filter_has_var(INPUT_GET, 'act') - && filter_has_var(INPUT_GET, 'cti') ) - { - // Get action - $sAction = trim(filter_input( INPUT_GET, 'act', FILTER_SANITIZE_SPECIAL_CHARS)); - // Get the page - CPaging::GetInstance()->ReadInput(); - // Get identifier - CContact::GetInstance()->SetIdentifier( filter_input( INPUT_GET,'cti',FILTER_VALIDATE_INT)); - // Verify readed values - if( (CContact::GetInstance()->GetIdentifier()<1) || (($sAction!='update') && ($sAction!='show')) ) - { - // Parameters are not valid - CUser::GetInstance()->Invalidate(); - }//if( (CContact::GetInstance()->GetIdentifier()<1) || (($sAction!='update') && ($sAction!='show')) ) - }//if( filter_has_var(... - /** Build the page - ******************/ - if( CUser::GetInstance()->IsAuthenticated() && !is_null($sAction) ) + // Delete + if( filter_has_var( INPUT_POST, 'del') ) { - /** Delete - **********/ - if( ($sAction=='update') && filter_has_var(INPUT_POST, 'del') ) - { - // Create session - require(PBR_PATH.'/includes/class/csession.php'); - CSession::CreateSession(); - // Build token - $sToken = md5(uniqid(rand(), TRUE)); - CSession::GetInstance()->SetToken($sToken); - // Send - $sBuffer=PBR_URL.'contactdelete.php?act=confirm&cti='.CContact::GetInstance()->GetIdentifier().'&tok='.$sToken; - include(PBR_PATH.'/includes/init/initclean.php'); - header('Location: '.$sBuffer); - exit; - }//delete - - /** Update - **********/ - if( $sAction=='update' ) - { - // Get the value - CContact::GetInstance()->ReadInput(); - // Update database - if( CContact::GetInstance()->MandatoriesAreFilled()===TRUE ) - { - require(PBR_PATH.'/includes/db/'.PBR_DB_DIR.'/contactupdate.php'); - $iReturn=ContactUpdate( CUser::GetInstance()->GetUsername() - , CUser::GetInstance()->GetSession() - , GetIP().GetUserAgent() - , CContact::GetInstance()); - if( $iReturn>0 ) - { - // Succeeded - $iMessageCode=2; - $sAction='show'; - } - else - { - // Failed - RedirectError( $iReturn, __FILE__, __LINE__ ); - exit; - }//if( $iReturn>0 ) - } - else - { - // Missing values - $iMessageCode=1; - $sAction='show'; - }//if{ CContact::GetInstance()->MandatoriesAreFilled()===TRUE ) - }//update - - /** Show - ********/ - if( $sAction=='show' ) + // Read contact identifier + $pContact->ReadInputIdentifier(INPUT_POST); + + // Redirect + $sBuffer = CContact::IDENTIFIERTAG.'='.$pContact->GetIdentifier(); + unset( $pPaging, $pContact ); + include(PBR_PATH.'/includes/init/clean.php'); + header('Location: '.PBR_URL.'contactdelete.php?'.$sBuffer); + exit; + } + // Update + elseif( filter_has_var( INPUT_POST, 'upd') ) + { + // Read contact data + $pContact->ReadInput(INPUT_POST); + + // Update database + if( $pContact->IsValid()===TRUE ) { - // Clean the old data (if update case) - $iBuffer=CContact::GetInstance()->GetIdentifier(); - CContact::DeleteInstance(); - - // Get contact - require(PBR_PATH.'/includes/db/'.PBR_DB_DIR.'/contactget.php'); - $iReturn=ContactGet( CUser::GetInstance()->GetUsername() - , CUser::GetInstance()->GetSession() - , GetIP().GetUserAgent() - , $iBuffer - , CContact::GetInstance()); - if( $iReturn<1 ) + require(PBR_PATH.'/includes/db/function/contactupdate.php'); + $iReturn = ContactUpdate( CAuth::GetInstance()->GetUsername() + , CAuth::GetInstance()->GetSession() + , GetIP().GetUserAgent() + , $pContact ); + + // Error + if( ($iReturn===FALSE) || ($iReturn<0) ) { - // Failed - RedirectError( $iReturn, __FILE__, __LINE__ ); + unset( $pPaging, $pContact ); + RedirectError( $iReturn, __FILE__, __LINE__ ); exit; - }//if( $iReturn<1 ) - - // Get the reservations count - require(PBR_PATH.'/includes/db/'.PBR_DB_DIR.'/contactrentsgetcount.php'); - $iReturn=ContactRentsGetCount( CUser::GetInstance()->GetUsername() - , CUser::GetInstance()->GetSession() - , GetIP().GetUserAgent() - , CContact::GetInstance()->GetIdentifier()); - if( $iReturn>=0 ) - { - // Succeeded - CPaging::GetInstance()->Compute( (integer)PBR_PAGE_RENTS, (integer)$iReturn ); - } - else - { - // Failed - RedirectError( $iReturn, __FILE__, __LINE__ ); - exit; - }//if( $iReturn>0 ) - - // Get rent - require(PBR_PATH.'/includes/db/'.PBR_DB_DIR.'/contactrentsget.php'); - $tRecordset=ContactRentsGet( CUser::GetInstance()->GetUsername() - , CUser::GetInstance()->GetSession() - , GetIP().GetUserAgent() - , CContact::GetInstance()->GetIdentifier() - , CPaging::GetInstance()->GetOffset() - , CPaging::GetInstance()->GetLimit()); - if( !is_array($tRecordset) ) - { - // Failed - RedirectError( $tRecordset, __FILE__, __LINE__ ); - exit; - }//if( !is_array($tRecordset) ) - - }//if( $sAction=='show' ) - - /** Build header - ***************/ - require(PBR_PATH.'/includes/class/cheader.php'); - $sBuffer=CContact::GetInstance()->GetLastName().' '.CContact::GetInstance()->GetFirstName(); - CHeader::GetInstance()->SetNoCache(); - CHeader::GetInstance()->SetTitle($sBuffer); - CHeader::GetInstance()->SetDescription($sBuffer); - CHeader::GetInstance()->SetKeywords($sBuffer); - - /** Display - **********/ - require(PBR_PATH.'/includes/display/displayheader.php'); - require(PBR_PATH.'/includes/display/displaycontact.php'); - require(PBR_PATH.'/includes/display/displayfooter.php'); - - /** Clean - ********/ - CHeader::DeleteInstance(); + }//if( ($iReturn===FALSE) || ($iReturn<0) ) + + // Succeeded + $iMessageCode = 2; + } + else + { + // Missing values + $iMessageCode = 1; + }//if( $pContact->IsValid()===TRUE ) + + // Clean the old data + $iReturn = $pContact->GetIdentifier(); + $pContact->ResetMe(); + $pContact->SetIdentifier($iReturn); } else { - //Error - RedirectError( -2, __FILE__, __LINE__ ); - exit; - }//if( CUser::GetInstance()->IsAuthenticated() ) + // Read contact identifier + $pContact->ReadInputIdentifier(INPUT_GET); + + // Read the message code + $iMessageCode = GetMessageCode(); + + // Read the page + $pPaging->ReadInput(); + + }//Read action + + /** Build the page + *****************/ + + // Get contact + require(PBR_PATH.'/includes/db/function/contactget.php'); + $iReturn = ContactGet( CAuth::GetInstance()->GetUsername() + , CAuth::GetInstance()->GetSession() + , GetIP().GetUserAgent() + , $pContact ); + + // Error + if( ($iReturn===FALSE) || ($iReturn<=0) ) + { + unset( $pPaging, $pContact ); + if( $iReturn===0 ) + { + $sTitle='fichier: '.basename(__FILE__).', ligne:'.__LINE__; + ErrorLog( CAuth::GetInstance()->GetUsername(), $sTitle, 'identifiant inconnu', E_USER_ERROR, TRUE); + $iReturn=-2; + }//if( $iReturn==0 ) + RedirectError( $iReturn, __FILE__, __LINE__ ); + exit; + }//if( ($iReturn===FALSE) || ($iReturn<=0) ) + + // Get the reservations count + require(PBR_PATH.'/includes/db/function/contactrentsgetcount.php'); + $iReturn = ContactRentsGetCount( CAuth::GetInstance()->GetUsername() + , CAuth::GetInstance()->GetSession() + , GetIP().GetUserAgent() + , $pContact ); + + // Error + if( ($iReturn===FALSE) || ($iReturn<0) ) + { + unset( $pPaging, $pContact ); + RedirectError( $iReturn, __FILE__, __LINE__ ); + exit; + }//if( ($iReturn===FALSE) || ($iReturn<0) ) + + // Succeeded + $pPaging->Compute( PBR_PAGE_RENTS, $iReturn ); + + // Get rents + require(PBR_PATH.'/includes/db/function/contactrentsget.php'); + $tRecordset = ContactRentsGet( CAuth::GetInstance()->GetUsername() + , CAuth::GetInstance()->GetSession() + , GetIP().GetUserAgent() + , $pContact + , $pPaging ); + + // Error + if( !is_array($tRecordset) ) + { + unset( $pPaging, $pContact ); + RedirectError( $tRecordset, __FILE__, __LINE__ ); + exit; + }//if( !is_array($tRecordset) ) + + /** Build header + ***************/ + require(PBR_PATH.'/includes/class/cheader.php'); + $pDate = new CDate(); + $pHeader = new CHeader(); + $sBuffer = $pContact->GetLastName().' '.$pContact->GetFirstName(); + $pHeader->SetNoCache(); + $pHeader->SetTitle($sBuffer); + $pHeader->SetDescription($sBuffer); + $pHeader->SetKeywords($sBuffer); + + /** Display + **********/ + require(PBR_PATH.'/includes/display/header.php'); + require(PBR_PATH.'/includes/display/contact.php'); + require(PBR_PATH.'/includes/display/footer.php'); /** Delete objects *****************/ - include(PBR_PATH.'/includes/init/initclean.php'); + unset( $pPaging, $pContact, $pHeader, $pDate ); + include(PBR_PATH.'/includes/init/clean.php'); ?> diff --git a/src/contactdelete.php b/src/contactdelete.php index ceb5596..6534c4a 100644 --- a/src/contactdelete.php +++ b/src/contactdelete.php @@ -31,158 +31,155 @@ /************************************************************************* * file encoding: UTF-8 * description: build and display the contact delete page. - * GET: act=confirm|delete, tok=, cti - * cancel= + * GET: cti=contact identifier + * POST: can=cancel case + * con=confirm case, tok=token, cti=contact identifier * author: Olivier JULLIEN - 2010-02-04 + * update: Olivier JULLIEN - 2010-06-15 - improvement *************************************************************************/ /** Defines **********/ - define('PBR_VERSION','1.1.0'); + define('PBR_VERSION','1.2.0'); define('PBR_PATH',dirname(__FILE__)); /** Include config *****************/ require(PBR_PATH.'/config.php'); - /** Create session - *****************/ - require(PBR_PATH.'/includes/class/csession.php'); - CSession::CreateSession(); - /** Include functions ********************/ require(PBR_PATH.'/includes/function/functions.php'); - /** Initialize - *************/ - require(PBR_PATH.'/includes/init/init.php'); - $sAction=NULL; - $sToken=NULL; + /** Initialize context + *********************/ + require(PBR_PATH.'/includes/init/context.php'); /** Authenticate ***************/ - require(PBR_PATH.'/includes/init/inituser.php'); + require(PBR_PATH.'/includes/init/authuser.php'); - /** Include main object(s) - *************************/ + /** Initialize + *************/ require(PBR_PATH.'/includes/class/ccontact.php'); + $pContact = new CContact(); - /** Read input parameters - ************************/ - if( CUser::GetInstance()->IsAuthenticated() && filter_has_var(INPUT_GET, 'act') - && filter_has_var(INPUT_GET, 'tok') - && filter_has_var(INPUT_GET, 'cti') ) + /** Cancel + *********/ + if( filter_has_var( INPUT_POST, 'can') ) { - // Get action - $sAction = trim(filter_input( INPUT_GET, 'act', FILTER_SANITIZE_SPECIAL_CHARS)); - // Get token - $sToken = trim(filter_input( INPUT_GET, 'tok', FILTER_SANITIZE_SPECIAL_CHARS)); - // Get identifier - CContact::GetInstance()->SetIdentifier( (integer)filter_input( INPUT_GET,'cti',FILTER_VALIDATE_INT)); - // Verify readed values - if( $sToken!=CSession::GetToken() || (($sAction!='delete') && ($sAction!='confirm')) - || (CContact::GetInstance()->GetIdentifier()<1) ) - { - // Parameters are not valid - CUser::GetInstance()->Invalidate(); - }// if(.... - }//if( filter_has_var(... + // Read contact identifier + $pContact->ReadInputIdentifier(INPUT_POST); + $sBuffer = CContact::IDENTIFIERTAG.'='.$pContact->GetIdentifier(); + unset( $pContact ); + include(PBR_PATH.'/includes/init/clean.php'); + header('Location: '.PBR_URL.'contact.php?'.$sBuffer); + exit; + }//Cancel - // Unset token - CSession::CleanToken(); + /** Create session + *****************/ + require(PBR_PATH.'/includes/class/cphpsession.php'); + CPHPSession::CreateSession(); - /** Build the page - ******************/ - if( (CUser::GetInstance()->IsAuthenticated()===TRUE) && !is_null($sAction) ) + /** Delete + *********/ + if( filter_has_var( INPUT_POST, 'con') && (CPHPSession::GetInstance()->ValidInput(INPUT_POST)===TRUE) ) { - // Get contact - require(PBR_PATH.'/includes/db/'.PBR_DB_DIR.'/contactget.php'); - $iReturn=ContactGet( CUser::GetInstance()->GetUsername() - , CUser::GetInstance()->GetSession() - , GetIP().GetUserAgent() - , CContact::GetInstance()->GetIdentifier() - , CContact::GetInstance()); - if( $iReturn<1 ) - { - RedirectError( $iReturn, __FILE__, __LINE__ ); - exit; - }//if( $iReturn<1 ) + // Read contact identifier + $pContact->ReadInputIdentifier(INPUT_POST); - /** Cancel - *********/ - if( $sAction=='delete' && filter_has_var(INPUT_GET, 'cancel') ) - { - $sBuffer=PBR_URL.'contact.php?act=show&cti='.CContact::GetInstance()->GetIdentifier(); - include(PBR_PATH.'/includes/init/initclean.php'); - header('Location: '.$sBuffer); - exit; - }//if( $sAction='delete' && filter_has_var(INPUT_GET, 'cancel') ) + // Clean SESSION + CPHPSession::CleanToken(); + CPHPSession::Clean(); + + // Delete + require(PBR_PATH.'/includes/db/function/contactdel.php'); + $iReturn = ContactDel( CAuth::GetInstance()->GetUsername() + , CAuth::GetInstance()->GetSession() + , GetIP().GetUserAgent() + , $pContact ); - /** Delete - *********/ - if( $sAction=='delete' ) + unset($pContact); + + // Failed + if( ($iReturn===FALSE) || ($iReturn<=0) ) { - require(PBR_PATH.'/includes/db/'.PBR_DB_DIR.'/contactdel.php'); - $iReturn=ContactDel( CUser::GetInstance()->GetUsername() - , CUser::GetInstance()->GetSession() - , GetIP().GetUserAgent() - , CContact::GetInstance()->GetIdentifier()); - // Error - if( $iReturn<1 ) + if( $iReturn===0 ) { - // Failed - RedirectError( $iReturn, __FILE__, __LINE__ ); - exit; - }//if( $iReturn<1 ) - - // No error - $sBuffer='?error=3'; - include(PBR_PATH.'/includes/init/initclean.php'); - header('Location: '.PBR_URL.'contacts.php'.$sBuffer); + $sTitle='fichier: '.basename(__FILE__).', ligne:'.__LINE__; + ErrorLog( CAuth::GetInstance()->GetUsername(), $sTitle, 'identifiant inconnu', E_USER_ERROR, TRUE); + $iReturn=-2; + }//if( $iReturn==0 ) + RedirectError( $iReturn, __FILE__, __LINE__ ); exit; - }//if( $sAction='confirm' && filter_has_var(INPUT_GET, 'cancel') ) + }//if( ($iReturn===FALSE) || ($iReturn<0) ) - /** Confirm - **********/ - if( $sAction=='confirm' ) - { + // Succeeded + include(PBR_PATH.'/includes/init/clean.php'); + header('Location: '.PBR_URL.'contacts.php?error=3'); + exit; - /** Build token - **************/ - $sToken = md5(uniqid(rand(), TRUE)); - CSession::GetInstance()->SetToken($sToken); - - /** Build header - ***************/ - require(PBR_PATH.'/includes/class/cheader.php'); - $sBuffer='Supprimer '.CContact::GetInstance()->GetLastName().' '.CContact::GetInstance()->GetFirstName(); - CHeader::GetInstance()->SetNoCache(); - CHeader::GetInstance()->SetTitle($sBuffer); - CHeader::GetInstance()->SetDescription($sBuffer); - CHeader::GetInstance()->SetKeywords($sBuffer); - - /** Display - **********/ - require(PBR_PATH.'/includes/display/displayheader.php'); - require(PBR_PATH.'/includes/display/displaycontactdelete.php'); - require(PBR_PATH.'/includes/display/displayfooter.php'); - - /** Clean - ********/ - CHeader::DeleteInstance(); - - }//if( $sAction='confirm' ) - - } - else + }//Delete + + // Clean SESSION token + CPHPSession::CleanToken(); + + /** Generate and write SESSION token + ***********************************/ + $sToken = CPHPSession::GetInstance()->WriteToken(); + if( $sToken===FALSE ) + { + $sTitle = 'fichier: '.basename(__FILE__).', ligne:'.__LINE__; + ErrorLog( CAuth::GetInstance()->GetUsername(), $sTitle, 'impossible de fixer le jeton de la session', E_USER_ERROR, TRUE); + CPHPSession::CleanToken(); + CPHPSession::Clean(); + unset($pContact); + RedirectError( 1, __FILE__, __LINE__ ); + exit; + }//if( $sToken===FALSE ) + + /** Get contact data + *******************/ + $pContact->ReadInputIdentifier(INPUT_GET); + require(PBR_PATH.'/includes/db/function/contactget.php'); + $iReturn = ContactGet( CAuth::GetInstance()->GetUsername() + , CAuth::GetInstance()->GetSession() + , GetIP().GetUserAgent() + , $pContact ); + + // Error + if( ($iReturn===FALSE) || ($iReturn<=0) ) { - //Error - RedirectError( -2, __FILE__, __LINE__ ); - exit; - }//if( CUser::GetInstance()->IsAuthenticated() ) + unset( $pContact ); + if( $iReturn===0 ) + { + $sTitle='fichier: '.basename(__FILE__).', ligne:'.__LINE__; + ErrorLog( CAuth::GetInstance()->GetUsername(), $sTitle, 'identifiant inconnu', E_USER_ERROR, TRUE); + $iReturn=-2; + }//if( $iReturn==0 ) + RedirectError( $iReturn, __FILE__, __LINE__ ); + exit; + }//if( ($iReturn===FALSE) || ($iReturn<=0) ) + + /** Build header + ***************/ + require(PBR_PATH.'/includes/class/cheader.php'); + $pHeader = new CHeader(); + $sBuffer='Supprimer '.$pContact->GetLastName().' '.$pContact->GetFirstName(); + $pHeader->SetNoCache(); + $pHeader->SetTitle($sBuffer); + $pHeader->SetDescription($sBuffer); + $pHeader->SetKeywords('delete,erase,effacer,supprimer,suppression,contact'); + + /** Display + **********/ + require(PBR_PATH.'/includes/display/header.php'); + require(PBR_PATH.'/includes/display/contactdelete.php'); + require(PBR_PATH.'/includes/display/footer.php'); /** Delete objects *****************/ - include(PBR_PATH.'/includes/init/initclean.php'); + unset( $pContact ); + include(PBR_PATH.'/includes/init/clean.php'); ?> diff --git a/src/contactnew.php b/src/contactnew.php index edf930a..a18ca36 100644 --- a/src/contactnew.php +++ b/src/contactnew.php @@ -31,13 +31,14 @@ /************************************************************************* * file encoding: UTF-8 * description: build and display the new contact page. - * POST: act=new, ctX= + * POST: act=, ctX= * author: Olivier JULLIEN - 2010-02-04 + * update: Olivier JULLIEN - 2010-06-15 - improvement *************************************************************************/ /** Defines **********/ - define('PBR_VERSION','1.1.0'); + define('PBR_VERSION','1.2.0'); define('PBR_PATH',dirname(__FILE__)); /** Include config @@ -48,111 +49,77 @@ ********************/ require(PBR_PATH.'/includes/function/functions.php'); - /** Initialize - *************/ - require(PBR_PATH.'/includes/init/init.php'); - $sAction=NULL; - $iMessageCode=0; + /** Initialize context + *********************/ + require(PBR_PATH.'/includes/init/context.php'); /** Authenticate ***************/ - require(PBR_PATH.'/includes/init/inituser.php'); + require(PBR_PATH.'/includes/init/authuser.php'); - /** Include main object(s) - *************************/ + /** Initialize + *************/ require(PBR_PATH.'/includes/class/ccontact.php'); - require(PBR_PATH.'/includes/class/cdate.php'); + $pContact = new CContact(); + $iMessageCode = 0; /** Read input parameters ************************/ - if( CUser::GetInstance()->IsAuthenticated() && filter_has_var(INPUT_POST, 'act') - && filter_has_var(INPUT_POST, 'ctl') - && filter_has_var(INPUT_POST, 'ctf') - && filter_has_var(INPUT_POST, 'ctp') ) + require(PBR_PATH.'/includes/class/caction.php'); + if( filter_has_var( INPUT_POST, 'new' ) ) { - // Get action - $sAction = trim(filter_input( INPUT_POST, 'act', FILTER_SANITIZE_SPECIAL_CHARS)); - // Verify action - if( $sAction=='new' ) + // Read data + $pContact->ReadInput(INPUT_POST); + if( $pContact->MandatoriesAreFilled()===TRUE ) { - // Get the value - CContact::GetInstance()->ReadInput(); - } - else - { - // Parameters are not valid - CUser::GetInstance()->Invalidate(); - }// if( $sToken==CSession::GetToken() && ($sAction=='new') ) - }//if( filter_has_var(... + require(PBR_PATH.'/includes/db/function/contactadd.php'); + $iReturn = ContactAdd( CAuth::GetInstance()->GetUsername() + , CAuth::GetInstance()->GetSession() + , GetIP().GetUserAgent() + , $pContact ); - /** Build Page - *************/ - if( CUser::GetInstance()->IsAuthenticated() ) - { - /** Add a new contact - ********************/ - if( $sAction=='new' ) - { - if( CContact::GetInstance()->MandatoriesAreFilled()===TRUE ) - { - require(PBR_PATH.'/includes/db/'.PBR_DB_DIR.'/contactadd.php'); - $iReturn = ContactAdd( CUser::GetInstance()->GetUsername() - , CUser::GetInstance()->GetSession() - , GetIP().GetUserAgent() - , CContact::GetInstance()); - if( $iReturn>0 ) - { - // Succeed - $sBuffer='?act=search'; - $sBuffer.='&ctl='.rawurlencode(CContact::GetInstance()->GetLastName()); - $sBuffer.='&error=1'; - include(PBR_PATH.'/includes/init/initclean.php'); - header('Location: '.PBR_URL.'contacts.php'.$sBuffer); - exit; - } - else - { - // Failed - RedirectError( $iReturn, __FILE__, __LINE__ ); - exit; - }//if( $iReturn>0 ) - } - else + // Error + if( ($iReturn===FALSE) || ($iReturn<=0) ) { - // Missing values - $iMessageCode=1; - }//if{ CContact::GetInstance()->MandatoriesAreFilled()===TRUE ) - }// if( $sAction=='new' ) - - /** Build header - ***************/ - require(PBR_PATH.'/includes/class/cheader.php'); - $sBuffer='Nouveau contact'; - CHeader::GetInstance()->SetNoCache(); - CHeader::GetInstance()->SetTitle($sBuffer); - CHeader::GetInstance()->SetDescription($sBuffer); - CHeader::GetInstance()->SetKeywords($sBuffer); + unset($pContact); + RedirectError( $iReturn, __FILE__, __LINE__ ); + exit; + }//if( ($iReturn===FALSE) || ($iReturn<=0) ) - /** Display - **********/ - $sAction='new'; - require(PBR_PATH.'/includes/display/displayheader.php'); - require(PBR_PATH.'/includes/display/displaycontact.php'); - require(PBR_PATH.'/includes/display/displayfooter.php'); + // Succeed + $sBuffer = PBR_URL.'contacts.php?'.CAction::ACTIONTAG.'=search'; + $sBuffer .= '&'.CContact::LASTNAMETAG.'='.$pContact->GetLastName(2); + $sBuffer .= '&error=1'; + unset($pContact); + include(PBR_PATH.'/includes/init/clean.php'); + header('Location: '.$sBuffer); + exit; + } + else + { + // Missing values + $iMessageCode = 1; + }//if( $pContact->MandatoriesAreFilled()===TRUE ) + }//if( CAction::IsValid(... - /** Clean - ********/ - CHeader::DeleteInstance(); + /** Build header + ***************/ + require(PBR_PATH.'/includes/class/cheader.php'); + $pHeader = new CHeader(); + $sBuffer = 'Nouveau contact'; + $pHeader->SetNoCache(); + $pHeader->SetTitle($sBuffer); + $pHeader->SetDescription($sBuffer); + $pHeader->SetKeywords($sBuffer); - } - else - { - //Error - RedirectError( -2, __FILE__, __LINE__ ); - exit; - }//if( CUser::GetInstance()->IsAuthenticated() ) + /** Display + **********/ + require(PBR_PATH.'/includes/display/header.php'); + require(PBR_PATH.'/includes/display/contactnew.php'); + require(PBR_PATH.'/includes/display/footer.php'); /** Delete objects *****************/ - include(PBR_PATH.'/includes/init/initclean.php'); + unset( $pContact, $pHeader ); + include(PBR_PATH.'/includes/init/clean.php'); ?> diff --git a/src/contacts.php b/src/contacts.php index 0353e89..940b880 100644 --- a/src/contacts.php +++ b/src/contacts.php @@ -31,14 +31,15 @@ /************************************************************************* * file encoding: UTF-8 * description: build and display the contacts page. - * GET: act=null|search, ctl=, error= - * , pag= + * GET: act=search|export, ctl=, error= + * , pag=, opX=