Bladeren bron

MVC structure. New UI. SVG images. Lots of things to do.

Iñigo Valentin 8 jaren geleden
bovenliggende
commit
387a06e79b
100 gewijzigde bestanden met toevoegingen van 7402 en 8 verwijderingen
  1. 10 5
      .gitignore
  2. 8 0
      sql/00_setup.sql
  3. 203 0
      sql/01_structure.sql
  4. 33 0
      sql/02_security.sql
  5. 520 0
      sql/03_data.sql
  6. 3 3
      sql/README.md
  7. 86 0
      www/application/class/controller/Controller.php
  8. 56 0
      www/application/class/controller/controller.php
  9. 35 0
      www/application/class/model/Entity.php
  10. 50 0
      www/application/class/model/Footer.php
  11. 29 0
      www/application/class/model/Footer_Page.php
  12. 37 0
      www/application/class/model/Help_Page.php
  13. 99 0
      www/application/class/model/Home_Page.php
  14. 56 0
      www/application/class/model/Lang.php
  15. 72 0
      www/application/class/model/License.php
  16. 82 0
      www/application/class/model/Page.php
  17. 37 0
      www/application/class/model/Profile_Page.php
  18. 176 0
      www/application/class/model/Project.php
  19. 98 0
      www/application/class/model/Project_Comment.php
  20. 62 0
      www/application/class/model/Project_Image.php
  21. 47 0
      www/application/class/model/Project_Page.php
  22. 41 0
      www/application/class/model/Project_Tag.php
  23. 57 0
      www/application/class/model/Project_Type.php
  24. 64 0
      www/application/class/model/Project_Url.php
  25. 65 0
      www/application/class/model/Project_Url_Type.php
  26. 93 0
      www/application/class/model/Project_Version.php
  27. 64 0
      www/application/class/model/Project_Version_Type.php
  28. 63 0
      www/application/class/model/Projects_Page.php
  29. 79 0
      www/application/class/model/Social.php
  30. 60 0
      www/application/class/model/home.php
  31. 7 0
      www/application/class/model/model.php
  32. 79 0
      www/application/class/view/cv.php
  33. 98 0
      www/application/class/view/help.php
  34. 111 0
      www/application/class/view/home.php
  35. 45 0
      www/application/class/view/inc/footer.php
  36. 19 0
      www/application/class/view/inc/header.php
  37. 100 0
      www/application/class/view/profile.php
  38. 129 0
      www/application/class/view/project.php
  39. 80 0
      www/application/class/view/projects.php
  40. 62 0
      www/application/class/view/rss.php
  41. 80 0
      www/application/class/view/skills.php
  42. 49 0
      www/application/class/view/string/LICENSE_CC-BY-SA_SUMMARY__EN
  43. 49 0
      www/application/class/view/string/LICENSE_CC-BY-SA_SUMMARY__ES
  44. 49 0
      www/application/class/view/string/LICENSE_CC-BY-SA_SUMMARY__EU
  45. 128 0
      www/application/class/view/string/LICENSE_CC-BY-SA__EN
  46. 128 0
      www/application/class/view/string/LICENSE_CC-BY-SA__ES
  47. 128 0
      www/application/class/view/string/LICENSE_CC-BY-SA__EU
  48. 1 0
      www/application/class/view/string/LICENSE_GPLV3_SUMMARY__EN
  49. 1 0
      www/application/class/view/string/LICENSE_GPLV3_SUMMARY__ES
  50. 1 0
      www/application/class/view/string/LICENSE_GPLV3_SUMMARY__EU
  51. 683 0
      www/application/class/view/string/LICENSE_GPLV3__EN
  52. 683 0
      www/application/class/view/string/LICENSE_GPLV3__ES
  53. 683 0
      www/application/class/view/string/LICENSE_GPLV3__EU
  54. 13 0
      www/application/config/auth.php
  55. 31 0
      www/application/config/config.php
  56. 27 0
      www/application/helper/db.php
  57. 117 0
      www/application/helper/net.php
  58. 214 0
      www/application/helper/text.php
  59. 87 0
      www/public/.htaccess
  60. 43 0
      www/public/css/error.css
  61. 24 0
      www/public/css/home.css
  62. 0 0
      www/public/css/m/error.css
  63. 22 0
      www/public/css/m/home.css
  64. 0 0
      www/public/css/m/profile.css
  65. 22 0
      www/public/css/m/project.css
  66. 64 0
      www/public/css/m/ui.css
  67. 0 0
      www/public/css/m/ui.scc
  68. 74 0
      www/public/css/profile.css
  69. 0 0
      www/public/css/profile.js
  70. 77 0
      www/public/css/project.css
  71. 45 0
      www/public/css/projects.css
  72. 580 0
      www/public/css/ui.css
  73. 91 0
      www/public/error.php
  74. BIN
      www/public/fonts/Latin-Modern-Mono-Light-Bold.otf
  75. BIN
      www/public/fonts/Nunito-Bold.ttf
  76. BIN
      www/public/fonts/Nunito-Light.ttf
  77. BIN
      www/public/fonts/Nunito-Regular.ttf
  78. 93 0
      www/public/fonts/OFL.txt
  79. BIN
      www/public/img/content/license/CC-0.png
  80. BIN
      www/public/img/content/license/CC-BY-SA.png
  81. BIN
      www/public/img/content/license/GPLV3.png
  82. BIN
      www/public/img/content/license/icon/CC-0.png
  83. BIN
      www/public/img/content/license/icon/CC-BY-SA.png
  84. BIN
      www/public/img/content/license/icon/GPLV3.png
  85. BIN
      www/public/img/content/license/logo/CC-0.png
  86. BIN
      www/public/img/content/license/logo/CC-BY-SA.png
  87. BIN
      www/public/img/content/license/logo/GPLV3.png
  88. BIN
      www/public/img/content/license/x1/CC-0.png
  89. BIN
      www/public/img/content/license/x1/CC-BY-SA.png
  90. BIN
      www/public/img/content/license/x1/GPLV3.png
  91. BIN
      www/public/img/content/license/x2/CC-0.png
  92. BIN
      www/public/img/content/license/x2/CC-BY-SA.png
  93. BIN
      www/public/img/content/license/x2/GPLV3.png
  94. BIN
      www/public/img/content/license/x3/CC-0.png
  95. BIN
      www/public/img/content/license/x3/CC-BY-SA.png
  96. BIN
      www/public/img/content/license/x3/GPLV3.png
  97. BIN
      www/public/img/content/license/x4/CC-0.png
  98. BIN
      www/public/img/content/license/x4/CC-BY-SA.png
  99. BIN
      www/public/img/content/license/x4/GPLV3.png
  100. BIN
      www/public/img/content/license/x5/CC-0.png

+ 10 - 5
.gitignore

@@ -1,6 +1,8 @@
-#Kate files
+#IDE files
 .kateproject.d/
 .kateproject
+.project
+.settings
 
 #OS files
 .directory
@@ -10,6 +12,7 @@
 .Trashes
 ehthumbs.db
 Thumbs.db
+*.swp
 
 #Utility folders
 3rdparty/
@@ -21,14 +24,16 @@ remoteadmin
 www-admin/redirect_s.php
 
 #SQL data
-sql/CUSTOM_ROWS.SQL
-sql/DEBUG_ROWS.SQL
+sql/XX*
 
 #Passwords file
-www/.htpasswd
+.htpasswd*
+auth.php_*
 www-admin/.htpasswd
 www/.htaccess_local
-www-admin/.htaccess_local
+
+# Test environments-related files
+.ht*_*
 
 #3rd party software
 www-admin/script/ckeditor

+ 8 - 0
sql/00_setup.sql

@@ -0,0 +1,8 @@
+-- DB structure.
+SOURCE 01_structure.sql;
+
+-- DB permissions. Entries are commented by default.
+SOURCE 02_security.sql;
+
+-- Initial data.
+SOURCE 03_data.sql;

+ 203 - 0
sql/01_structure.sql

@@ -0,0 +1,203 @@
+DROP DATABASE IF EXISTS web;
+CREATE DATABASE web CHARACTER SET utf8 COLLATE utf8_bin;
+
+SET NAMES utf8;
+
+CONNECT web;
+
+CREATE TABLE lang (
+    code    VARCHAR(2)   PRIMARY KEY,
+    name    VARCHAR(16)  NOT NULL,
+    active  BOOLEAN      DEFAULT 0
+);
+
+CREATE TABLE text (
+    id       VARCHAR(32),
+    lang     VARCHAR(2)     REFERENCES lang.code,
+    section  VARCHAR(32),
+    text     VARCHAR(5000),
+    file     VARCHAR(32),
+    PRIMARY KEY(id, lang)
+);
+CREATE INDEX i_text ON text(id, lang);
+
+CREATE TABLE user (
+    id        INT            AUTO_INCREMENT  PRIMARY KEY,
+    username  VARCHAR(64)    NOT NULL,
+    email     VARCHAR(128)   NOT NULL,
+    password  CHAR(128)      NOT NULL,
+    salt      CHAR(128)      NOT NULL,
+    fname     VARCHAR(64),
+    lname     VARCHAR(64),
+    picture   VARCHAR(100),
+    phone     VARCHAR(16),
+    cp        VARCHAR(6),
+    admin     BOOLEAN        NOT NULL        DEFAULT 0,
+    active    BOOLEAN        NOT NULL        DEFAULT 0
+);
+
+CREATE TABLE login_attempts (
+    user     INT          NOT NULL  REFERENCES user.id,
+    dtime    VARCHAR(30)  NOT NULL,
+    success  BOOLEAN      NOT NULL  DEFAULT 0
+);
+
+CREATE TABLE permissions(
+    user        INT          REFERENCES user.id,
+    permission  VARCHAR(32)  NOT NULL,
+    PRIMARY KEY(user, permission)
+);
+
+CREATE TABLE social(
+    id       INT           AUTO_INCREMENT  PRIMARY KEY,
+    idx      INT           NOT NULL        UNIQUE,
+    visible  BOOLEAN       NOT NULL        DEFAULT 1,
+    title    VARCHAR(32)   NOT NULL        UNIQUE       REFERENCES text.id,
+    icon     VARCHAR(16)   NOT NULL,
+    url      VARCHAR(256)  NOT NULL
+);
+
+CREATE TABLE share(
+    id       INT           AUTO_INCREMENT      PRIMARY KEY,
+    idx      INT           NOT NULL            UNIQUE,
+    visible  BOOLEAN       NOT NULL            DEFAULT 1,
+    title    VARCHAR(32)   NOT NULL            UNIQUE       REFERENCES text.id,
+    text     VARCHAR(32)   REFERENCES text.id,
+    icon     VARCHAR(16)   NOT NULL,
+    url      VARCHAR(256)  NOT NULL
+);
+
+CREATE TABLE license (
+    id       VARCHAR(32)  PRIMARY KEY,
+    summary  VARCHAR(32)  NOT NULL     REFERENCES text.id,
+    legal    VARCHAR(32)  NOT NULL     REFERENCES text.id,
+    logo     VARCHAR(32),
+    icon     VARCHAR(32)
+);
+
+CREATE TABLE project_type (
+    id       VARCHAR(1)   NOT NULL  PRIMARY KEY,
+    title    VARCHAR(32)  NOT NULL  REFERENCES text.id,
+    summary  VARCHAR(32)  NOT NULL  REFERENCES text.id
+);
+
+CREATE TABLE project (
+    id         INT           AUTO_INCREMENT         PRIMARY KEY,
+    permalink  VARCHAR(300)  NOT NULL,
+    type       VARCHAR(1)    NOT NULL               REFERENCES project_type.id,
+    title      VARCHAR(32)   NOT NULL               REFERENCES text.id,
+    logo       VARCHAR(32),
+    header     VARCHAR(32)   REFERENCES text.id,
+    text       VARCHAR(32)   REFERENCES text.id,
+    license    VARCHAR(32)   REFERENCES license.id,
+    user       INT           NOT NULL               REFERENCES user.id,
+    visible    BOOLEAN       NOT NULL               DEFAULT 1,
+    comments   BOOLEAN       NOT NULL               DEFAULT 1
+);
+
+CREATE TABLE project_version_type (
+    id       VARCHAR(1)   NOT NULL  PRIMARY KEY,
+    title    VARCHAR(32)  NOT NULL  REFERENCES text.id,
+    summary  VARCHAR(32)  NOT NULL  REFERENCES text.id,
+    color    VARCHAR(7)
+);
+
+CREATE TABLE project_version (
+    project       INT          NOT NULL,
+    version_code  INT          NOT NULL,
+    version_name  VARCHAR(16)  NOT NULL,
+    type          VARCHAR(1)   NOT NULL            REFERENCES project_version_type.id,
+    summary       VARCHAR(32)  NOT NULL            REFERENCES text.id,
+    changelog     VARCHAR(32)  REFERENCES text.id,
+    dtime         DATETIME     NOT NULL            DEFAULT now(),
+    visible       BOOLEAN      NOT NULL            DEFAULT 1,
+    PRIMARY KEY (project, version_code)
+);
+
+CREATE TABLE project_url_type (
+    id       VARCHAR(1)   NOT NULL            PRIMARY KEY,
+    title    VARCHAR(32)  REFERENCES text.id,
+    summary  VARCHAR(32)  REFERENCES text.id,
+    logo     VARCHAR(32)
+);
+
+CREATE TABLE project_url (
+    id       INT            AUTO_INCREMENT  PRIMARY KEY,
+    project  INT            NOT NULL        REFERENCES project.id,
+    type     VARCHAR(1)     NOT NULL        REFERENCES project_url_type,
+    url      VARCHAR(1024)  NOT NULL
+);
+
+CREATE TABLE project_image (
+    id       INT           AUTO_INCREMENT  PRIMARY KEY,
+    project  INT           NOT NULL        REFERENCES project.id,
+    idx      INT           NOT NULL,
+    image    VARCHAR(200)  NOT NULL
+);
+
+CREATE TABLE project_tag (
+    project  INT          NOT NULL  REFERENCES project.id,
+    tag      VARCHAR(32)  NOT NULL  REFERENCES text.id,
+    PRIMARY KEY (project, tag)
+);
+
+CREATE TABLE project_comment (
+    id        INT            AUTO_INCREMENT            PRIMARY KEY,
+    project   INT            NOT NULL                  REFERENCES project(id),
+    version   INT            NOT NULL                  REFERENCES project_version(version_code),
+    text      VARCHAR(5000)  NOT NULL,
+    dtime     TIMESTAMP      NOT NULL                  DEFAULT now(),
+    user      INT            REFERENCES user.id,
+    username  VARCHAR(200),
+    lang      VARCHAR(10),
+    approved  BOOLEAN        NOT NULL                  DEFAULT 1,
+    visit     INT            REFERENCES stat_visit.id
+);
+
+CREATE TABLE cv_category (
+    id        INT          AUTO_INCREMENT      PRIMARY KEY,
+    title     VARCHAR(32)  REFERENCES text.id,
+    summary   VARCHAR(32)  REFERENCES text.id,
+    visible   BOOLEAN      NOT NULL            DEFAULT 1,
+    priority  INT          NOT NULL            UNIQUE
+);
+
+CREATE TABLE cv_entry (
+    id               INT          AUTO_INCREMENT  PRIMARY KEY,
+    category         INT          NOT NULL        REFERENCES cv_category.id,
+    role             VARCHAR(32)  NOT NULL        REFERENCES text.id,
+    company          VARCHAR(64)  NOT NULL,
+    city             VARCHAR(32)  NOT NULL        REFERENCES text.id,
+    start            DATETIME     NOT NULL,
+    end              DATETIME,
+    date_precission  VARCHAR(1)   NOT NULL        DEFAULT 'M',
+    summary          VARCHAR(32)  NOT NULL        REFERENCES text.id,
+    visible          BOOLEAN      NOT NULL        DEFAULT 1
+);
+
+CREATE TABLE settings (
+    name     VARCHAR(64)  PRIMARY KEY,
+    value    VARCHAR(64)  NOT NULL,
+    user     INT          REFERENCES user.id,
+    changed  TIMESTAMP    NOT NULL            DEFAULT now()
+);
+
+CREATE TABLE stat_visit (
+    id       INT           AUTO_INCREMENT  PRIMARY KEY,
+    ip       VARCHAR(50),
+    uagent   VARCHAR(400),
+    os       VARCHAR(150),
+    browser  VARCHAR(150),
+    dtime    TIMESTAMP     NOT NULL  DEFAULT now()
+);
+
+CREATE TABLE stat_view (
+    id       INT           NOT NULL  AUTO_INCREMENT            PRIMARY KEY,
+    visit    INT           NOT NULL  REFERENCES stat_visit.id,
+    section  VARCHAR(80)   NOT NULL,
+    entry    VARCHAR(100)  NOT NULL,
+    dtime    TIMESTAMP     NOT NULL  DEFAULT now()
+);
+CREATE INDEX i_visit ON stat_view(visit, dtime);
+
+

+ 33 - 0
sql/02_security.sql

@@ -0,0 +1,33 @@
+-- Replace all instances of XXX with the external site db password (same one as in www/.htaccess).
+-- Uncomment all entries.
+
+--GRANT SELECT ON         web.cv_category          TO 'webext'@'localhost' IDENTIFIED BY 'XXX';
+--GRANT SELECT ON         web.cv_entry             TO 'webext'@'localhost' IDENTIFIED BY 'XXX';
+--GRANT SELECT ON         web.lang                 TO 'webext'@'localhost' IDENTIFIED BY 'XXX';
+--GRANT SELECT ON         web.license              TO 'webext'@'localhost' IDENTIFIED BY 'XXX';
+--GRANT SELECT ON         web.text                 TO 'webext'@'localhost' IDENTIFIED BY 'XXX';
+--GRANT SELECT ON         web.user                 TO 'webext'@'localhost' IDENTIFIED BY 'XXX';
+--GRANT SELECT ON         web.project              TO 'webext'@'localhost' IDENTIFIED BY 'XXX';
+--GRANT SELECT ON         web.project_type         TO 'webext'@'localhost' IDENTIFIED BY 'XXX';
+--GRANT SELECT ON         web.project_tag          TO 'webext'@'localhost' IDENTIFIED BY 'XXX';
+--GRANT SELECT ON         web.project_url          TO 'webext'@'localhost' IDENTIFIED BY 'XXX';
+--GRANT SELECT ON         web.project_url_type     TO 'webext'@'localhost' IDENTIFIED BY 'XXX';
+--GRANT SELECT ON         web.project_image        TO 'webext'@'localhost' IDENTIFIED BY 'XXX';
+--GRANT SELECT ON         web.project_tag          TO 'webext'@'localhost' IDENTIFIED BY 'XXX';
+--GRANT SELECT ON         web.project_version      TO 'webext'@'localhost' IDENTIFIED BY 'XXX';
+--GRANT SELECT ON         web.project_version_type TO 'webext'@'localhost' IDENTIFIED BY 'XXX';
+--GRANT SELECT, INSERT ON web.project_comment      TO 'webext'@'localhost' IDENTIFIED BY 'XXX';
+--GRANT SELECT ON         web.settings             TO 'webext'@'localhost' IDENTIFIED BY 'XXX';
+--GRANT SELECT ON         web.share                TO 'webext'@'localhost' IDENTIFIED BY 'XXX';
+--GRANT SELECT, INSERT ON web.stat_view            TO 'webext'@'localhost' IDENTIFIED BY 'XXX';
+--GRANT SELECT, INSERT ON web.stat_visit           TO 'webext'@'localhost' IDENTIFIED BY 'XXX';
+--GRANT SELECT ON         web.social               TO 'webext'@'localhost' IDENTIFIED BY 'XXX';
+
+
+
+
+
+-- Replace YYY with the internal site db password (same one as in www-admin/.htaccess).
+-- Uncomment entry.
+
+--GRANT SELECT, INSERT, DELETE, UPDATE, SHOW VIEW ON web.* TO 'webint'@'localhost' IDENTIFIED BY 'YYY';

+ 520 - 0
sql/03_data.sql

@@ -0,0 +1,520 @@
+-- AVAILABLE LANGUAGES
+INSERT INTO lang VALUES ('es', 'Castellano', '1');
+INSERT INTO lang VALUES ('en', 'English', '1');
+INSERT INTO lang VALUES ('eu', 'Euskara', '1');
+
+-- DATE ELEMENTS
+INSERT INTO text VALUES ('MONTH_01', 'es', 'DATE', 'enero', null);
+INSERT INTO text VALUES ('MONTH_01', 'en', 'DATE', 'January', null);
+INSERT INTO text VALUES ('MONTH_01', 'eu', 'DATE', 'urtarrila', null);
+INSERT INTO text VALUES ('MONTH_02', 'es', 'DATE', 'febrero', null);
+INSERT INTO text VALUES ('MONTH_02', 'en', 'DATE', 'February', null);
+INSERT INTO text VALUES ('MONTH_02', 'eu', 'DATE', 'otsaila', null);
+INSERT INTO text VALUES ('MONTH_03', 'es', 'DATE', 'marzo', null);
+INSERT INTO text VALUES ('MONTH_03', 'en', 'DATE', 'March', null);
+INSERT INTO text VALUES ('MONTH_03', 'eu', 'DATE', 'martxoa', null);
+INSERT INTO text VALUES ('MONTH_04', 'es', 'DATE', 'abril', null);
+INSERT INTO text VALUES ('MONTH_04', 'en', 'DATE', 'April', null);
+INSERT INTO text VALUES ('MONTH_04', 'eu', 'DATE', 'apirila', null);
+INSERT INTO text VALUES ('MONTH_05', 'es', 'DATE', 'mayo', null);
+INSERT INTO text VALUES ('MONTH_05', 'en', 'DATE', 'May', null);
+INSERT INTO text VALUES ('MONTH_05', 'eu', 'DATE', 'maiatza', null);
+INSERT INTO text VALUES ('MONTH_06', 'es', 'DATE', 'junio', null);
+INSERT INTO text VALUES ('MONTH_06', 'en', 'DATE', 'June', null);
+INSERT INTO text VALUES ('MONTH_06', 'eu', 'DATE', 'ekaina', null);
+INSERT INTO text VALUES ('MONTH_07', 'es', 'DATE', 'julio', null);
+INSERT INTO text VALUES ('MONTH_07', 'en', 'DATE', 'July', null);
+INSERT INTO text VALUES ('MONTH_07', 'eu', 'DATE', 'uztaila', null);
+INSERT INTO text VALUES ('MONTH_08', 'es', 'DATE', 'agosto', null);
+INSERT INTO text VALUES ('MONTH_08', 'en', 'DATE', 'August', null);
+INSERT INTO text VALUES ('MONTH_08', 'eu', 'DATE', 'abuztua', null);
+INSERT INTO text VALUES ('MONTH_09', 'es', 'DATE', 'septiembre', null);
+INSERT INTO text VALUES ('MONTH_09', 'en', 'DATE', 'September', null);
+INSERT INTO text VALUES ('MONTH_09', 'eu', 'DATE', 'iraila', null);
+INSERT INTO text VALUES ('MONTH_10', 'es', 'DATE', 'octubre', null);
+INSERT INTO text VALUES ('MONTH_10', 'en', 'DATE', 'October', null);
+INSERT INTO text VALUES ('MONTH_10', 'eu', 'DATE', 'urria', null);
+INSERT INTO text VALUES ('MONTH_11', 'es', 'DATE', 'noviembre', null);
+INSERT INTO text VALUES ('MONTH_11', 'en', 'DATE', 'November', null);
+INSERT INTO text VALUES ('MONTH_11', 'eu', 'DATE', 'azaroa', null);
+INSERT INTO text VALUES ('MONTH_12', 'es', 'DATE', 'diciembre', null);
+INSERT INTO text VALUES ('MONTH_12', 'en', 'DATE', 'December', null);
+INSERT INTO text VALUES ('MONTH_12', 'eu', 'DATE', 'abendua', null);
+INSERT INTO text VALUES ('DAY_1', 'es', 'DATE', 'lunes', null);
+INSERT INTO text VALUES ('DAY_1', 'en', 'DATE', 'Monday', null);
+INSERT INTO text VALUES ('DAY_1', 'eu', 'DATE', 'astelehena', null);
+INSERT INTO text VALUES ('DAY_2', 'es', 'DATE', 'martes', null);
+INSERT INTO text VALUES ('DAY_2', 'en', 'DATE', 'Tuesday', null);
+INSERT INTO text VALUES ('DAY_2', 'eu', 'DATE', 'asteartea', null);
+INSERT INTO text VALUES ('DAY_3', 'es', 'DATE', 'miércoles', null);
+INSERT INTO text VALUES ('DAY_3', 'en', 'DATE', 'Wednesday', null);
+INSERT INTO text VALUES ('DAY_3', 'eu', 'DATE', 'astezkena', null);
+INSERT INTO text VALUES ('DAY_4', 'es', 'DATE', 'jueves', null);
+INSERT INTO text VALUES ('DAY_4', 'en', 'DATE', 'Thursday', null);
+INSERT INTO text VALUES ('DAY_4', 'eu', 'DATE', 'osteguna', null);
+INSERT INTO text VALUES ('DAY_5', 'es', 'DATE', 'viernes', null);
+INSERT INTO text VALUES ('DAY_5', 'en', 'DATE', 'Friday', null);
+INSERT INTO text VALUES ('DAY_5', 'eu', 'DATE', 'ostirala', null);
+INSERT INTO text VALUES ('DAY_6', 'es', 'DATE', 'sábado', null);
+INSERT INTO text VALUES ('DAY_6', 'en', 'DATE', 'Saturday', null);
+INSERT INTO text VALUES ('DAY_6', 'eu', 'DATE', 'larunbata', null);
+INSERT INTO text VALUES ('DAY_7', 'es', 'DATE', 'domingo', null);
+INSERT INTO text VALUES ('DAY_7', 'en', 'DATE', 'Sunday', null);
+INSERT INTO text VALUES ('DAY_7', 'eu', 'DATE', 'igandea', null);
+INSERT INTO text VALUES ('CV_DATE_FROM_YEAR', 'es', 'DATE', 'Desde #YEAR_START#', null);
+INSERT INTO text VALUES ('CV_DATE_FROM_YEAR', 'en', 'DATE', 'Since #YEAR_START#', null);
+INSERT INTO text VALUES ('CV_DATE_FROM_YEAR', 'eu', 'DATE', '#YEAR_START#tik', null);
+INSERT INTO text VALUES ('CV_DATE_DURING_YEAR', 'es', 'DATE', '#YEAR_START#', null);
+INSERT INTO text VALUES ('CV_DATE_DURING_YEAR', 'en', 'DATE', '#YEAR_START#', null);
+INSERT INTO text VALUES ('CV_DATE_DURING_YEAR', 'eu', 'DATE', '#YEAR_START#n', null);
+INSERT INTO text VALUES ('CV_DATE_FROM_TO_YEAR', 'es', 'DATE', 'Desde #YEAR_START# hasta #YEAR_END#', null);
+INSERT INTO text VALUES ('CV_DATE_FROM_TO_YEAR', 'en', 'DATE', 'From #YEAR_START# until #YEAR_END#', null);
+INSERT INTO text VALUES ('CV_DATE_FROM_TO_YEAR', 'eu', 'DATE', '#YEAR_START#tik #YEAR_END#ra', null);
+INSERT INTO text VALUES ('CV_DATE_FROM_MONTH', 'es', 'DATE', 'Desde #MONTH_START# de #YEAR_START#', null);
+INSERT INTO text VALUES ('CV_DATE_FROM_MONTH', 'en', 'DATE', 'Since #MONTH_START# #YEAR_START#', null);
+INSERT INTO text VALUES ('CV_DATE_FROM_MONTH', 'eu', 'DATE', '#YEAR_START#ko #MONTH_START#tik', null);
+INSERT INTO text VALUES ('CV_DATE_DURING_MONTH', 'es', 'DATE', '#MONTH_START# de #YEAR_START#', null);
+INSERT INTO text VALUES ('CV_DATE_DURING_MONTH', 'en', 'DATE', '#MONTH_START# #YEAR_START#', null);
+INSERT INTO text VALUES ('CV_DATE_DURING_MONTH', 'eu', 'DATE', '#YEAR_START#ko #MONTH_START#n', null);
+INSERT INTO text VALUES ('CV_DATE_FROM_TO_MONTH', 'es', 'DATE', 'Desde #MONTH_START# de #YEAR_START# hasta #MONTH_END# de #YEAR_END#', null);
+INSERT INTO text VALUES ('CV_DATE_FROM_TO_MONTH', 'en', 'DATE', 'From #MONTH_START# #YEAR_START# until #MONTH_END# #YEAR_END#', null);
+INSERT INTO text VALUES ('CV_DATE_FROM_TO_MONTH', 'eu', 'DATE', '#YEAR_START#ko #MONTH_START#tik #YEAR_END#ko #MONTH_END#ra', null);
+INSERT INTO text VALUES ('CV_DATE_FROM_TO_MONTH_YEAR', 'es', 'DATE', 'Desde #MONTH_START# hasta #MONTH_END# de #YEAR_START#', null);
+INSERT INTO text VALUES ('CV_DATE_FROM_TO_MONTH_YEAR', 'en', 'DATE', 'From #MONTH_START# until #MONTH_END# #YEAR_START#', null);
+INSERT INTO text VALUES ('CV_DATE_FROM_TO_MONTH_YEAR', 'eu', 'DATE', '#YEAR_START#ko #MONTH_START#tik #MONTH_START#ra', null);
+
+-- SECTIONS
+INSERT INTO text VALUES ('SECTION_HOME', 'es', 'SECTION', 'Inicio', null);
+INSERT INTO text VALUES ('SECTION_HOME', 'en', 'SECTION', 'Home', null);
+INSERT INTO text VALUES ('SECTION_HOME', 'eu', 'SECTION', 'Hasiera', null);
+INSERT INTO text VALUES ('SECTION_ME', 'es', 'SECTION', 'Yo', null);
+INSERT INTO text VALUES ('SECTION_ME', 'en', 'SECTION', 'Me', null);
+INSERT INTO text VALUES ('SECTION_ME', 'eu', 'SECTION', 'Ni', null);
+INSERT INTO text VALUES ('SECTION_PROJECTS', 'es', 'SECTION', 'Proyectos', null);
+INSERT INTO text VALUES ('SECTION_PROJECTS', 'en', 'SECTION', 'Projects', null);
+INSERT INTO text VALUES ('SECTION_PROJECTS', 'eu', 'SECTION', 'Proiektuak', null);
+
+-- SOCIAL
+INSERT INTO text VALUES ('SOCIAL_GITHUB', 'es', 'SOCIAL', 'Github', null);
+INSERT INTO text VALUES ('SOCIAL_GITHUB', 'en', 'SOCIAL', 'Github', null);
+INSERT INTO text VALUES ('SOCIAL_GITHUB', 'eu', 'SOCIAL', 'Github', null);
+INSERT INTO text VALUES ('SOCIAL_RSS', 'es', 'SOCIAL', 'RSS', null);
+INSERT INTO text VALUES ('SOCIAL_RSS', 'en', 'SOCIAL', 'RSS', null);
+INSERT INTO text VALUES ('SOCIAL_RSS', 'eu', 'SOCIAL', 'RSS', null);
+INSERT INTO text VALUES ('SOCIAL_MAIL', 'es', 'SOCIAL', 'Correo electrónico', null);
+INSERT INTO text VALUES ('SOCIAL_MAIL', 'en', 'SOCIAL', 'eMail', null);
+INSERT INTO text VALUES ('SOCIAL_MAIL', 'eu', 'SOCIAL', 'ePosta', null);
+INSERT INTO text VALUES ('SOCIAL_LINKEDIN', 'es', 'SOCIAL', 'LinkedIn', null);
+INSERT INTO text VALUES ('SOCIAL_LINKEDIN', 'en', 'SOCIAL', 'LinkedIn', null);
+INSERT INTO text VALUES ('SOCIAL_LINKEDIN', 'eu', 'SOCIAL', 'LinkedIn', null);
+
+-- SHARE
+INSERT INTO text VALUES ('SHARE_FACEBOOK', 'es', 'SHARE', 'Facebook', null);
+INSERT INTO text VALUES ('SHARE_FACEBOOK', 'en', 'SHARE', 'Facebook', null);
+INSERT INTO text VALUES ('SHARE_FACEBOOK', 'eu', 'SHARE', 'Facebook', null);
+INSERT INTO text VALUES ('SHARE_TWITTER', 'es', 'SHARE', 'Twitter', null);
+INSERT INTO text VALUES ('SHARE_TWITTER', 'en', 'SHARE', 'Twitter', null);
+INSERT INTO text VALUES ('SHARE_TWITTER', 'eu', 'SHARE', 'Twitter', null);
+INSERT INTO text VALUES ('SHARE_GOOGLE', 'es', 'SHARE', 'Google +', null);
+INSERT INTO text VALUES ('SHARE_GOOGLE', 'en', 'SHARE', 'Google +', null);
+INSERT INTO text VALUES ('SHARE_GOOGLE', 'eu', 'SHARE', 'Google +', null);
+INSERT INTO text VALUES ('SHARE_TELEGRAM', 'es', 'SHARE', 'Telegram', null);
+INSERT INTO text VALUES ('SHARE_TELEGRAM', 'en', 'SHARE', 'Telegram', null);
+INSERT INTO text VALUES ('SHARE_TELEGRAM', 'eu', 'SHARE', 'Telegram', null);
+INSERT INTO text VALUES ('SHARE_LINKEDIN', 'es', 'SHARE', 'LinkedIn', null);
+INSERT INTO text VALUES ('SHARE_LINKEDIN', 'en', 'SHARE', 'LinkedIn', null);
+INSERT INTO text VALUES ('SHARE_LINKEDIN', 'eu', 'SHARE', 'LinkedIn', null);
+INSERT INTO text VALUES ('SHARE_VKONTAKTE', 'es', 'SHARE', 'VKontakte', null);
+INSERT INTO text VALUES ('SHARE_VKONTAKTE', 'en', 'SHARE', 'VKontakte', null);
+INSERT INTO text VALUES ('SHARE_VKONTAKTE', 'eu', 'SHARE', 'VKontakte', null);
+INSERT INTO text VALUES ('SHARE_FACEBOOK_DESC', 'es', 'SHARE', 'Publicar en Facebook', null);
+INSERT INTO text VALUES ('SHARE_FACEBOOK_DESC', 'en', 'SHARE', 'Share on Facebook', null);
+INSERT INTO text VALUES ('SHARE_FACEBOOK_DESC', 'eu', 'SHARE', 'Facebook', null);
+INSERT INTO text VALUES ('SHARE_TWITTER_DESC', 'es', 'SHARE', 'Publicar en Twitter', null);
+INSERT INTO text VALUES ('SHARE_TWITTER_DESC', 'en', 'SHARE', 'Share on Twitter', null);
+INSERT INTO text VALUES ('SHARE_TWITTER_DESC', 'eu', 'SHARE', 'Twitter', null);
+INSERT INTO text VALUES ('SHARE_GOOGLE_DESC', 'es', 'SHARE', 'Publicar en Google +', null);
+INSERT INTO text VALUES ('SHARE_GOOGLE_DESC', 'en', 'SHARE', 'Share on Google +', null);
+INSERT INTO text VALUES ('SHARE_GOOGLE_DESC', 'eu', 'SHARE', 'Google +', null);
+INSERT INTO text VALUES ('SHARE_TELEGRAM_DESC', 'es', 'SHARE', 'Publicar en Telegram', null);
+INSERT INTO text VALUES ('SHARE_TELEGRAM_DESC', 'en', 'SHARE', 'Share on Telegram', null);
+INSERT INTO text VALUES ('SHARE_TELEGRAM_DESC', 'eu', 'SHARE', 'Telegram', null);
+INSERT INTO text VALUES ('SHARE_LINKEDIN_DESC', 'es', 'SHARE', 'Publicar en LinkedIn', null);
+INSERT INTO text VALUES ('SHARE_LINKEDIN_DESC', 'en', 'SHARE', 'Share on LinkedIn', null);
+INSERT INTO text VALUES ('SHARE_LINKEDIN_DESC', 'eu', 'SHARE', 'LinkedIn', null);
+INSERT INTO text VALUES ('SHARE_VKONTAKTE_DESC', 'es', 'SHARE', 'Publicar en VKontakte', null);
+INSERT INTO text VALUES ('SHARE_VKONTAKTE_DESC', 'en', 'SHARE', 'Share on VKontakte', null);
+INSERT INTO text VALUES ('SHARE_VKONTAKTE_DESC', 'eu', 'SHARE', 'VKontakte', null);
+INSERT INTO share VALUES (1, 1, 1, 'SHARE_FACEBOOK', 'SHARE_FACEBOOK_DESC', 'facebook.gif', 'https://www.facebook.com/sharer/sharer.php?u=');
+INSERT INTO share VALUES (2, 2, 1, 'SHARE_TWITTER', 'SHARE_TWITTER_DESC', 'twitter.gif', 'https://twitter.com/share?url=');
+INSERT INTO share VALUES (3, 3, 1, 'SHARE_GOOGLE', 'SHARE_GOOGLE_DESC', 'google.gif', 'https://plus.google.com/share?url=');
+INSERT INTO share VALUES (4, 4, 1, 'SHARE_TELEGRAM', 'SHARE_TELEGRAM_DESC', 'telegramn.gif', 'https://t.me/share/url?url=');
+INSERT INTO share VALUES (5, 5, 1, 'SHARE_LINKEDIN', 'SHARE_LINKEDIN_DESC', 'linkedin.gif', 'https://www.linkedin.com/shareArticle?mini=true&url=');
+INSERT INTO share VALUES (6, 6, 1, 'SHARE_VKONTAKTE', 'SHARE_VKONTAKTE_DESC', 'vkontakte.gif', 'http://vk.com/share.php?url=');
+
+-- TAGS
+INSERT INTO text VALUES ('TAG_JS',      'es', 'TAG', 'Javascript', null);
+INSERT INTO text VALUES ('TAG_JS',      'en', 'TAG', 'Javascript', null);
+INSERT INTO text VALUES ('TAG_JS',      'eu', 'TAG', 'Javascript', null);
+INSERT INTO text VALUES ('TAG_HTML5',   'es', 'TAG', 'HTML5', null);
+INSERT INTO text VALUES ('TAG_HTML5',   'en', 'TAG', 'HTML5', null);
+INSERT INTO text VALUES ('TAG_HTML5',   'eu', 'TAG', 'HTML5', null);
+INSERT INTO text VALUES ('TAG_ANDROID', 'es', 'TAG', 'Android', null);
+INSERT INTO text VALUES ('TAG_ANDROID', 'en', 'TAG', 'Android', null);
+INSERT INTO text VALUES ('TAG_ANDROID', 'eu', 'TAG', 'Android', null);
+INSERT INTO text VALUES ('TAG_IOS',     'es', 'TAG', 'iOS', null);
+INSERT INTO text VALUES ('TAG_IOS',     'en', 'TAG', 'iOS', null);
+INSERT INTO text VALUES ('TAG_IOS',     'eu', 'TAG', 'iOS', null);
+INSERT INTO text VALUES ('TAG_JAVA',    'es', 'TAG', 'Java', null);
+INSERT INTO text VALUES ('TAG_JAVA',    'en', 'TAG', 'Java', null);
+INSERT INTO text VALUES ('TAG_JAVA',    'eu', 'TAG', 'Java', null);
+INSERT INTO text VALUES ('TAG_SWIFT',   'es', 'TAG', 'Swift', null);
+INSERT INTO text VALUES ('TAG_SWIFT',   'en', 'TAG', 'Swift', null);
+INSERT INTO text VALUES ('TAG_SWIFT',   'eu', 'TAG', 'Swift', null);
+INSERT INTO text VALUES ('TAG_WEB',     'es', 'TAG', 'Web', null);
+INSERT INTO text VALUES ('TAG_WEB',     'en', 'TAG', 'Web', null);
+INSERT INTO text VALUES ('TAG_WEB',     'eu', 'TAG', 'Web', null);
+
+
+
+-- PAGE footer
+INSERT INTO text VALUES ('FOOTER_FOLLOW', 'es', 'FOOTER', 'Sígueme', null);
+INSERT INTO text VALUES ('FOOTER_COPY',   'es', 'FOOTER', 'Copyright Iñigo Valentin 2014 - #YEAR#', null);
+INSERT INTO text VALUES ('FOOTER_HELP',   'es', 'FOOTER', 'Ayuda', null);
+INSERT INTO text VALUES ('FOOTER_FOLLOW', 'en', 'FOOTER', 'Follow me', null);
+INSERT INTO text VALUES ('FOOTER_COPY',   'en', 'FOOTER', 'Copyright Iñigo Valentin 2014 - #YEAR#', null);
+INSERT INTO text VALUES ('FOOTER_HELP',   'en', 'FOOTER', 'Help', null);
+INSERT INTO text VALUES ('FOOTER_FOLLOW', 'eu', 'FOOTER', 'Jarraitu', null);
+INSERT INTO text VALUES ('FOOTER_COPY',   'eu', 'FOOTER', 'Copyright Iñigo Valentin 2014 - #YEAR#', null);
+INSERT INTO text VALUES ('FOOTER_HELP',   'eu', 'FOOTER', 'Laguntza', null);
+
+
+-- PAGE index
+INSERT INTO text VALUES ('INDEX_PROFILE',  'es', 'HEADER', 'Yo', null);
+INSERT INTO text VALUES ('INDEX_PROFILE',  'en', 'HEADER', 'Me', null);
+INSERT INTO text VALUES ('INDEX_PROFILE',  'eu', 'HEADER', 'Ni', null);
+INSERT INTO text VALUES ('INDEX_PROJECTS', 'es', 'HEADER', 'Proyectos', null);
+INSERT INTO text VALUES ('INDEX_PROJECTS', 'en', 'HEADER', 'Projects', null);
+INSERT INTO text VALUES ('INDEX_PROJECTS', 'eu', 'HEADER', 'Proiektuak', null);
+
+
+-- PAGE project
+INSERT INTO text VALUES ('PROJECT_TITLE',           'es', 'PROJECT', 'Proyectos', null);
+INSERT INTO text VALUES ('PROJECT_TITLE',           'en', 'PROJECT', 'Projects', null);
+INSERT INTO text VALUES ('PROJECT_TITLE',           'eu', 'PROJECT', 'Projektuak', null);
+INSERT INTO text VALUES ('PROJECT_DESCRIPTION',     'es', 'PROJECT', '', null); --TODO
+INSERT INTO text VALUES ('PROJECT_DESCRIPTION',     'en', 'PROJECT', '', null); --TODO
+INSERT INTO text VALUES ('PROJECT_DESCRIPTION',     'eu', 'PROJECT', '', null); --TODO
+INSERT INTO text VALUES ('PROJECT_SEARCH',          'es', 'PROJECT', 'Buscar', null);
+INSERT INTO text VALUES ('PROJECT_SEARCH',          'en', 'PROJECT', 'Search', null);
+INSERT INTO text VALUES ('PROJECT_SEARCH',          'eu', 'PROJECT', 'Bilatu', null);
+INSERT INTO text VALUES ('PROJECT_SEARCH_ADVANCED', 'es', 'PROJECT', 'Búsqueda avanzada', null);
+INSERT INTO text VALUES ('PROJECT_SEARCH_ADVANCED', 'en', 'PROJECT', 'Advanced search', null);
+INSERT INTO text VALUES ('PROJECT_SEARCH_ADVANCED', 'eu', 'PROJECT', 'Búsqueda avanzada', null);
+INSERT INTO text VALUES ('PROJECT_SEARCH_TYPE',     'es', 'PROJECT', 'Tipo', null);
+INSERT INTO text VALUES ('PROJECT_SEARCH_TYPE',     'en', 'PROJECT', 'Project type', null);
+INSERT INTO text VALUES ('PROJECT_SEARCH_TYPE',     'eu', 'PROJECT', 'Tipu', null);
+INSERT INTO text VALUES ('PROJECT_SEARCH_LICENSE',  'es', 'PROJECT', 'Licencia', null);
+INSERT INTO text VALUES ('PROJECT_SEARCH_LICENSE',  'en', 'PROJECT', 'License', null);
+INSERT INTO text VALUES ('PROJECT_SEARCH_LICENSE',  'eu', 'PROJECT', 'Lizenzia', null);
+INSERT INTO text VALUES ('PROJECT_VERSION',         'es', 'PROJECT', 'Versión', null);
+INSERT INTO text VALUES ('PROJECT_VERSION',         'en', 'PROJECT', 'Version', null);
+INSERT INTO text VALUES ('PROJECT_VERSION',         'eu', 'PROJECT', 'Versión', null);
+INSERT INTO text VALUES ('PROJECT_CLOSE',           'es', 'PROJECT', 'Cerrar', null);
+INSERT INTO text VALUES ('PROJECT_CLOSE',           'en', 'PROJECT', 'Close', null);
+INSERT INTO text VALUES ('PROJECT_CLOSE',           'eu', 'PROJECT', 'Itxali', null);
+INSERT INTO text VALUES ('PROJECT_INFO',            'es', 'PROJECT', 'Detalles', null);
+INSERT INTO text VALUES ('PROJECT_INFO',            'en', 'PROJECT', 'Details', null);
+INSERT INTO text VALUES ('PROJECT_INFO',            'eu', 'PROJECT', 'Informazioa', null);
+INSERT INTO text VALUES ('PROJECT_TAGS',            'es', 'PROJECT', 'Tags', null);
+INSERT INTO text VALUES ('PROJECT_TAGS',            'en', 'PROJECT', 'Tags', null);
+INSERT INTO text VALUES ('PROJECT_TAGS',            'eu', 'PROJECT', 'Tags', null);
+INSERT INTO text VALUES ('PROJECT_LICENSE',         'es', 'PROJECT', 'License', null);
+INSERT INTO text VALUES ('PROJECT_LICENSE',         'en', 'PROJECT', 'Licencia', null);
+INSERT INTO text VALUES ('PROJECT_LICENSE',         'eu', 'PROJECT', 'Lizentzia', null);
+INSERT INTO text VALUES ('PROJECT_VERSION_TREE',    'es', 'PROJECT', 'Ver el histórico de versiones', null);
+INSERT INTO text VALUES ('PROJECT_VERSION_TREE',    'en', 'PROJECT', 'Open version tree', null);
+INSERT INTO text VALUES ('PROJECT_VERSION_TREE',    'eu', 'PROJECT', 'Ver el histórico de versiones', null);
+INSERT INTO text VALUES ('PROJECT_LICENSE_SUMMARY', 'es', 'PROJECT', 'En resumen:', null);
+INSERT INTO text VALUES ('PROJECT_LICENSE_SUMMARY', 'en', 'PROJECT', 'In a few words:', null);
+INSERT INTO text VALUES ('PROJECT_LICENSE_SUMMARY', 'eu', 'PROJECT', 'En resumen:', null);
+INSERT INTO text VALUES ('PROJECT_LICENSE_LEGAL',   'es', 'PROJECT', 'Texto completo:', null);
+INSERT INTO text VALUES ('PROJECT_LICENSE_LEGAL',   'en', 'PROJECT', 'Full legal text:', null);
+INSERT INTO text VALUES ('PROJECT_LICENSE_LEGAL',   'eu', 'PROJECT', 'Textu osoa:', null);
+
+
+-- PAGE profile
+INSERT INTO text VALUES ('PROFILE_TITLE',            'es', 'PROFILE', 'Yo', null);
+INSERT INTO text VALUES ('PROFILE_TITLE',            'en', 'PROFILE', 'Me', null);
+INSERT INTO text VALUES ('PROFILE_TITLE',            'eu', 'PROFILE', 'Ni', null);
+INSERT INTO text VALUES ('PROFILE_DESCRIPTION',      'es', 'PROFILE', 'Sobre mí', null);
+INSERT INTO text VALUES ('PROFILE_DESCRIPTION',      'en', 'PROFILE', 'About me', null);
+INSERT INTO text VALUES ('PROFILE_DESCRIPTION',      'eu', 'PROFILE', 'Niri buruz', null);
+INSERT INTO text VALUES ('PROFILE_DOWNLOAD_CURRENT', 'es', 'PROFILE', 'Descargar en castellano', null);
+INSERT INTO text VALUES ('PROFILE_DOWNLOAD_CURRENT', 'en', 'PROFILE', 'Download in english', null);
+INSERT INTO text VALUES ('PROFILE_DOWNLOAD_CURRENT', 'eu', 'PROFILE', 'Euzkaraz deskargatu', null);
+INSERT INTO text VALUES ('PROFILE_DOWNLOAD_OTHER',   'es', 'PROFILE', 'Descargar en otros idiomas', null);
+INSERT INTO text VALUES ('PROFILE_DOWNLOAD_OTHER',   'en', 'PROFILE', 'Download in other languages', null);
+INSERT INTO text VALUES ('PROFILE_DOWNLOAD_OTHER',   'eu', 'PROFILE', 'Beste hizkuntzetan deskargatu', null);
+INSERT INTO text VALUES ('PROFILE_CV',               'es', 'PROFILE', 'Curriculum', null);
+INSERT INTO text VALUES ('PROFILE_CV',               'en', 'PROFILE', 'Curriculum', null);
+INSERT INTO text VALUES ('PROFILE_CV',               'eu', 'PROFILE', 'Curriculum', null);
+INSERT INTO text VALUES ('PROFILE_SKILLS',           'es', 'PROFILE', 'Habilidades', null);
+INSERT INTO text VALUES ('PROFILE_SKILLS',           'en', 'PROFILE', 'Skills', null);
+INSERT INTO text VALUES ('PROFILE_SKILLS',           'eu', 'PROFILE', 'Habilitateak', null);
+
+
+-- PAGE error
+INSERT INTO text VALUES ('ERROR_TITLE',           'es', 'ERROR', 'Error', null);
+INSERT INTO text VALUES ('ERROR_TITLE',           'en', 'ERROR', 'Error', null);
+INSERT INTO text VALUES ('ERROR_TITLE',           'eu', 'ERROR', 'Errorea', null);
+INSERT INTO text VALUES ('ERROR_ERROR',           'es', 'ERROR', 'ERROR', null);
+INSERT INTO text VALUES ('ERROR_ERROR',           'en', 'ERROR', 'ERROR', null);
+INSERT INTO text VALUES ('ERROR_ERROR',           'eu', 'ERROR', 'ERROR', null);
+INSERT INTO text VALUES ('ERROR_CODE',            'es', 'ERROR', 'CODE', null);
+INSERT INTO text VALUES ('ERROR_CODE',            'en', 'ERROR', 'CODE', null);
+INSERT INTO text VALUES ('ERROR_CODE',            'eu', 'ERROR', 'CODE', null);
+INSERT INTO text VALUES ('ERROR_400_TITLE',       'es', 'ERROR', 'Bad request', null);
+INSERT INTO text VALUES ('ERROR_400_TITLE',       'en', 'ERROR', 'Bad request', null);
+INSERT INTO text VALUES ('ERROR_400_TITLE',       'eu', 'ERROR', 'Bad request', null);
+INSERT INTO text VALUES ('ERROR_400_DESCRIPTION', 'es', 'ERROR', 'La solicitud se ha recibido con errores... y no se como responder.', null);
+INSERT INTO text VALUES ('ERROR_400_DESCRIPTION', 'en', 'ERROR', 'This server doesnt understand your request.', null);
+INSERT INTO text VALUES ('ERROR_400_DESCRIPTION', 'eu', 'ERROR', 'La solicitud se ha recibido con errores... y no se como responder.', null);
+INSERT INTO text VALUES ('ERROR_400_SOLUTION',    'es', 'ERROR', 'Prueba una solución:', null);
+INSERT INTO text VALUES ('ERROR_400_SOLUTION',    'en', 'ERROR', 'Try a solution:', null);
+INSERT INTO text VALUES ('ERROR_400_SOLUTION',    'eu', 'ERROR', 'Prueba una solución:', null);
+INSERT INTO text VALUES ('ERROR_400_SOLUTION_0',  'es', 'ERROR', 'Volver a la página anterior', null);
+INSERT INTO text VALUES ('ERROR_400_SOLUTION_0',  'en', 'ERROR', 'Go to the previous page', null);
+INSERT INTO text VALUES ('ERROR_400_SOLUTION_0',  'eu', 'ERROR', 'Volver a la página anterior', null);
+INSERT INTO text VALUES ('ERROR_400_SOLUTION_1',  'es', 'ERROR', 'Ir a la pá principal', null);
+INSERT INTO text VALUES ('ERROR_400_SOLUTION_1',  'en', 'ERROR', 'Go to the main page', null);
+INSERT INTO text VALUES ('ERROR_400_SOLUTION_1',  'eu', 'ERROR', 'Ir a la pá principal', null);
+INSERT INTO text VALUES ('ERROR_400_SOLUTION_2',  'es', 'ERROR', 'Ver vídeos de gatitos en Youtube', null);
+INSERT INTO text VALUES ('ERROR_400_SOLUTION_2',  'en', 'ERROR', 'Watch cute cat videos in Youtube', null);
+INSERT INTO text VALUES ('ERROR_400_SOLUTION_2',  'eu', 'ERROR', 'Ver vídeos de gatitos en Youtube', null);
+INSERT INTO text VALUES ('ERROR_401_TITLE',       'es', 'ERROR', 'Sin autorización', null);
+INSERT INTO text VALUES ('ERROR_401_TITLE',       'en', 'ERROR', 'Unauthorized', null);
+INSERT INTO text VALUES ('ERROR_401_TITLE',       'eu', 'ERROR', 'Sin autorización', null);
+INSERT INTO text VALUES ('ERROR_401_DESCRIPTION', 'es', 'ERROR', 'Estás intentando ver algo que no debes. No soy muy de prohibir, así que lo m&aacutes probable es que sea algo momentaneo.', null);
+INSERT INTO text VALUES ('ERROR_401_DESCRIPTION', 'en', 'ERROR', 'You are trying to see something you are not supposed to.', null);
+INSERT INTO text VALUES ('ERROR_401_DESCRIPTION', 'eu', 'ERROR', 'Estás intentando ver algo que no debes. No soy muy de prohibir, así que lo m&aacutes probable es que sea algo momentaneo.', null);
+INSERT INTO text VALUES ('ERROR_401_SOLUTION',    'es', 'ERROR', 'Prueba una solución:', null);
+INSERT INTO text VALUES ('ERROR_401_SOLUTION',    'en', 'ERROR', 'Try a solution:', null);
+INSERT INTO text VALUES ('ERROR_401_SOLUTION',    'eu', 'ERROR', 'Prueba una solución:', null);
+INSERT INTO text VALUES ('ERROR_401_SOLUTION_0',  'es', 'ERROR', 'Volver a la página anterior', null);
+INSERT INTO text VALUES ('ERROR_401_SOLUTION_0',  'en', 'ERROR', 'Go to the previous page', null);
+INSERT INTO text VALUES ('ERROR_401_SOLUTION_0',  'eu', 'ERROR', 'Volver a la página anterior', null);
+INSERT INTO text VALUES ('ERROR_401_SOLUTION_1',  'es', 'ERROR', 'Ir a la pá principal', null);
+INSERT INTO text VALUES ('ERROR_401_SOLUTION_1',  'en', 'ERROR', 'Go to the main page', null);
+INSERT INTO text VALUES ('ERROR_401_SOLUTION_1',  'eu', 'ERROR', 'Ir a la pá principal', null);
+INSERT INTO text VALUES ('ERROR_401_SOLUTION_2',  'es', 'ERROR', 'Ver vídeos de gatitos en Youtube', null);
+INSERT INTO text VALUES ('ERROR_401_SOLUTION_2',  'en', 'ERROR', 'Watch cute cat videos in Youtube', null);
+INSERT INTO text VALUES ('ERROR_401_SOLUTION_2',  'eu', 'ERROR', 'Ver vídeos de gatitos en Youtube', null);
+INSERT INTO text VALUES ('ERROR_403_TITLE',       'es', 'ERROR', 'Prohibido', null);
+INSERT INTO text VALUES ('ERROR_403_TITLE',       'en', 'ERROR', 'Forbidden', null);
+INSERT INTO text VALUES ('ERROR_403_TITLE',       'eu', 'ERROR', 'Debekatuta', null);
+INSERT INTO text VALUES ('ERROR_403_DESCRIPTION', 'es', 'ERROR', 'Estás intentando ver algo que no debes. No soy muy de prohibir, así que lo m&aacutes probable es que sea algo momentaneo.', null);
+INSERT INTO text VALUES ('ERROR_403_DESCRIPTION', 'en', 'ERROR', 'You are trying to see something you are not supposed to.', null);
+INSERT INTO text VALUES ('ERROR_403_DESCRIPTION', 'eu', 'ERROR', 'Estás intentando ver algo que no debes. No soy muy de prohibir, así que lo m&aacutes probable es que sea algo momentaneo.', null);
+INSERT INTO text VALUES ('ERROR_403_SOLUTION',    'es', 'ERROR', 'Prueba una solución:', null);
+INSERT INTO text VALUES ('ERROR_403_SOLUTION',    'en', 'ERROR', 'Try a solution:', null);
+INSERT INTO text VALUES ('ERROR_403_SOLUTION',    'eu', 'ERROR', 'Prueba una solución:', null);
+INSERT INTO text VALUES ('ERROR_403_SOLUTION_0',  'es', 'ERROR', 'Volver a la página anterior', null);
+INSERT INTO text VALUES ('ERROR_403_SOLUTION_0',  'en', 'ERROR', 'Go to the previous page', null);
+INSERT INTO text VALUES ('ERROR_403_SOLUTION_0',  'eu', 'ERROR', 'Volver a la página anterior', null);
+INSERT INTO text VALUES ('ERROR_403_SOLUTION_1',  'es', 'ERROR', 'Ir a la pá principal', null);
+INSERT INTO text VALUES ('ERROR_403_SOLUTION_1',  'en', 'ERROR', 'Go to the main page', null);
+INSERT INTO text VALUES ('ERROR_403_SOLUTION_1',  'eu', 'ERROR', 'Ir a la pá principal', null);
+INSERT INTO text VALUES ('ERROR_403_SOLUTION_2',  'es', 'ERROR', 'Ver vídeos de gatitos en Youtube', null);
+INSERT INTO text VALUES ('ERROR_403_SOLUTION_2',  'en', 'ERROR', 'Watch cute cat videos in Youtube', null);
+INSERT INTO text VALUES ('ERROR_403_SOLUTION_2',  'eu', 'ERROR', 'Ver vídeos de gatitos en Youtube', null);
+INSERT INTO text VALUES ('ERROR_404_TITLE',       'es', 'ERROR', 'No enconrtado', null);
+INSERT INTO text VALUES ('ERROR_404_TITLE',       'en', 'ERROR', 'Not found', null);
+INSERT INTO text VALUES ('ERROR_404_TITLE',       'eu', 'ERROR', 'No enconrtado', null);
+INSERT INTO text VALUES ('ERROR_404_DESCRIPTION', 'es', 'ERROR', 'La página que buscas no existe en este universo. Inténtalo en uno diferente.', null);
+INSERT INTO text VALUES ('ERROR_404_DESCRIPTION', 'en', 'ERROR', 'Sorry. The page you are looking for doesn't exist in this universe. Try in an alternate one.', null);
+INSERT INTO text VALUES ('ERROR_404_DESCRIPTION', 'eu', 'ERROR', 'La página que buscas no existe en este universo. Inténtalo en uno diferente.', null);
+INSERT INTO text VALUES ('ERROR_404_SOLUTION',    'es', 'ERROR', 'Prueba una solución:', null);
+INSERT INTO text VALUES ('ERROR_404_SOLUTION',    'en', 'ERROR', 'Try a solution:', null);
+INSERT INTO text VALUES ('ERROR_404_SOLUTION',    'eu', 'ERROR', 'Prueba una solución:', null);
+INSERT INTO text VALUES ('ERROR_404_SOLUTION_0',  'es', 'ERROR', 'Volver a la página anterior', null);
+INSERT INTO text VALUES ('ERROR_404_SOLUTION_0',  'en', 'ERROR', 'Go to the previous page', null);
+INSERT INTO text VALUES ('ERROR_404_SOLUTION_0',  'eu', 'ERROR', 'Volver a la página anterior', null);
+INSERT INTO text VALUES ('ERROR_404_SOLUTION_1',  'es', 'ERROR', 'Ir a la pá principal', null);
+INSERT INTO text VALUES ('ERROR_404_SOLUTION_1',  'en', 'ERROR', 'Go to the main page', null);
+INSERT INTO text VALUES ('ERROR_404_SOLUTION_1',  'eu', 'ERROR', 'Ir a la pá principal', null);
+INSERT INTO text VALUES ('ERROR_404_SOLUTION_2',  'es', 'ERROR', 'Ver vídeos de gatitos en Youtube', null);
+INSERT INTO text VALUES ('ERROR_404_SOLUTION_2',  'en', 'ERROR', 'Watch cute cat videos in Youtube', null);
+INSERT INTO text VALUES ('ERROR_404_SOLUTION_2',  'eu', 'ERROR', 'Ver vídeos de gatitos en Youtube', null);
+INSERT INTO text VALUES ('ERROR_500_TITLE',       'es', 'ERROR', 'Error del servidor', null);
+INSERT INTO text VALUES ('ERROR_500_TITLE',       'en', 'ERROR', 'Server error', null);
+INSERT INTO text VALUES ('ERROR_500_TITLE',       'eu', 'ERROR', 'Errorea serbidorean', null);
+INSERT INTO text VALUES ('ERROR_500_DESCRIPTION', 'es', 'ERROR', 'La he liado parda. El fallo está en mi lado, pero no te preocupes, ahorá mismo el informático estará sudando tinta gorda para arreglarlo.', null);
+INSERT INTO text VALUES ('ERROR_500_DESCRIPTION', 'en', 'ERROR', 'This one is on me: I've messed something up. Sorry! I'm probably trying to fix it right now.', null);
+INSERT INTO text VALUES ('ERROR_500_DESCRIPTION', 'eu', 'ERROR', 'La he liado parda. El fallo está en mi lado, pero no te preocupes, ahorá mismo el informático estará sudando tinta gorda para arreglarlo.', null);
+INSERT INTO text VALUES ('ERROR_500_SOLUTION',    'es', 'ERROR', 'Prueba una solución:', null);
+INSERT INTO text VALUES ('ERROR_500_SOLUTION',    'en', 'ERROR', 'Try a solution:', null);
+INSERT INTO text VALUES ('ERROR_500_SOLUTION',    'eu', 'ERROR', 'Prueba una solución:', null);
+INSERT INTO text VALUES ('ERROR_500_SOLUTION_0',  'es', 'ERROR', 'Volver a la página anterior', null);
+INSERT INTO text VALUES ('ERROR_500_SOLUTION_0',  'en', 'ERROR', 'Go to the previous page', null);
+INSERT INTO text VALUES ('ERROR_500_SOLUTION_0',  'eu', 'ERROR', 'Volver a la página anterior', null);
+INSERT INTO text VALUES ('ERROR_500_SOLUTION_1',  'es', 'ERROR', 'Ir a la pá principal', null);
+INSERT INTO text VALUES ('ERROR_500_SOLUTION_1',  'en', 'ERROR', 'Go to the main page', null);
+INSERT INTO text VALUES ('ERROR_500_SOLUTION_1',  'eu', 'ERROR', 'Ir a la pá principal', null);
+INSERT INTO text VALUES ('ERROR_500_SOLUTION_2',  'es', 'ERROR', 'Ver vídeos de gatitos en Youtube', null);
+INSERT INTO text VALUES ('ERROR_500_SOLUTION_2',  'en', 'ERROR', 'Watch cute cat videos in Youtube', null);
+INSERT INTO text VALUES ('ERROR_500_SOLUTION_2',  'eu', 'ERROR', 'Ver vídeos de gatitos en Youtube', null);
+INSERT INTO text VALUES ('ERROR_XXX_TITLE',       'es', 'ERROR', 'Error inesperado', null);
+INSERT INTO text VALUES ('ERROR_XXX_TITLE',       'en', 'ERROR', 'Unexpected error', null);
+INSERT INTO text VALUES ('ERROR_XXX_TITLE',       'eu', 'ERROR', 'Error inesperado', null);
+INSERT INTO text VALUES ('ERROR_XXX_DESCRIPTION', 'es', 'ERROR', 'Algo ha ido mal...', null);
+INSERT INTO text VALUES ('ERROR_XXX_DESCRIPTION', 'en', 'ERROR', 'Something went wrong...', null);
+INSERT INTO text VALUES ('ERROR_XXX_DESCRIPTION', 'eu', 'ERROR', 'Algo ha ido mal...', null);
+INSERT INTO text VALUES ('ERROR_XXX_SOLUTION',    'es', 'ERROR', 'Prueba una solución:', null);
+INSERT INTO text VALUES ('ERROR_XXX_SOLUTION',    'en', 'ERROR', 'Try a solution:', null);
+INSERT INTO text VALUES ('ERROR_XXX_SOLUTION',    'eu', 'ERROR', 'Prueba una solución:', null);
+INSERT INTO text VALUES ('ERROR_XXX_SOLUTION_0',  'es', 'ERROR', 'Volver a la página anterior', null);
+INSERT INTO text VALUES ('ERROR_XXX_SOLUTION_0',  'en', 'ERROR', 'Go to the previous page', null);
+INSERT INTO text VALUES ('ERROR_XXX_SOLUTION_0',  'eu', 'ERROR', 'Volver a la página anterior', null);
+INSERT INTO text VALUES ('ERROR_XXX_SOLUTION_1',  'es', 'ERROR', 'Ir a la pá principal', null);
+INSERT INTO text VALUES ('ERROR_XXX_SOLUTION_1',  'en', 'ERROR', 'Go to the main page', null);
+INSERT INTO text VALUES ('ERROR_XXX_SOLUTION_1',  'eu', 'ERROR', 'Ir a la pá principal', null);
+INSERT INTO text VALUES ('ERROR_XXX_SOLUTION_2',  'es', 'ERROR', 'Ver vídeos de gatitos en Youtube', null);
+INSERT INTO text VALUES ('ERROR_XXX_SOLUTION_2',  'en', 'ERROR', 'Watch cute cat videos in Youtube', null);
+INSERT INTO text VALUES ('ERROR_XXX_SOLUTION_2',  'eu', 'ERROR', 'Ver vídeos de gatitos en Youtube', null);
+
+
+-- TABLE project_type
+INSERT INTO text VALUES ('PROJECT_TYPE_D',         'es', 'DB_PROJECT_TYPE', 'Desarrollo', null);
+INSERT INTO text VALUES ('PROJECT_TYPE_D',         'en', 'DB_PROJECT_TYPE', 'Development', null);
+INSERT INTO text VALUES ('PROJECT_TYPE_D',         'eu', 'DB_PROJECT_TYPE', 'Development', null);
+INSERT INTO text VALUES ('PROJECT_TYPE_D_SUMMARY', 'es', 'DB_PROJECT_TYPE', 'Desarrollo', null);
+INSERT INTO text VALUES ('PROJECT_TYPE_D_SUMMARY', 'en', 'DB_PROJECT_TYPE', 'Development', null);
+INSERT INTO text VALUES ('PROJECT_TYPE_D_SUMMARY', 'eu', 'DB_PROJECT_TYPE', 'Development', null);
+INSERT INTO text VALUES ('PROJECT_TYPE_S',         'es', 'DB_PROJECT_TYPE', 'Sistemas', null);
+INSERT INTO text VALUES ('PROJECT_TYPE_S',         'en', 'DB_PROJECT_TYPE', 'System', null);
+INSERT INTO text VALUES ('PROJECT_TYPE_S',         'eu', 'DB_PROJECT_TYPE', 'System', null);
+INSERT INTO text VALUES ('PROJECT_TYPE_S_SUMMARY', 'es', 'DB_PROJECT_TYPE', 'Sistemas', null);
+INSERT INTO text VALUES ('PROJECT_TYPE_S_SUMMARY', 'en', 'DB_PROJECT_TYPE', 'System', null);
+INSERT INTO text VALUES ('PROJECT_TYPE_S_SUMMARY', 'eu', 'DB_PROJECT_TYPE', 'System', null);
+INSERT INTO project_type VALUES ('D', 'PROJECT_TYPE_D', 'PROJECT_TYPE_D_SUMMARY');
+INSERT INTO project_type VALUES ('S', 'PROJECT_TYPE_S', 'PROJECT_TYPE_S_SUMMARY');
+
+
+-- TABLE project_url_type
+INSERT INTO text VALUES ('URL_TYPE_W',         'es', 'DB_URL_TYPE', 'Ver sitio web', null);
+INSERT INTO text VALUES ('URL_TYPE_W',         'en', 'DB_URL_TYPE', 'Go to web site', null);
+INSERT INTO text VALUES ('URL_TYPE_W',         'eu', 'DB_URL_TYPE', 'Horrialdera', null);
+INSERT INTO text VALUES ('URL_TYPE_W_SUMMARY', 'es', 'DB_URL_TYPE', 'Ver sitio wew de este proyecto en funcionamiento.', null);
+INSERT INTO text VALUES ('URL_TYPE_W_SUMMARY', 'en', 'DB_URL_TYPE', 'See production web site.', null);
+INSERT INTO text VALUES ('URL_TYPE_W_SUMMARY', 'eu', 'DB_URL_TYPE', 'Horrialdera.', null);
+INSERT INTO text VALUES ('URL_TYPE_P',         'es', 'DB_URL_TYPE', 'Google Play', null);
+INSERT INTO text VALUES ('URL_TYPE_P',         'en', 'DB_URL_TYPE', 'Google Play', null);
+INSERT INTO text VALUES ('URL_TYPE_P',         'eu', 'DB_URL_TYPE', 'Google Play', null);
+INSERT INTO text VALUES ('URL_TYPE_P_SUMMARY', 'es', 'DB_URL_TYPE', 'Ver app en Google Play.', null);
+INSERT INTO text VALUES ('URL_TYPE_P_SUMMARY', 'en', 'DB_URL_TYPE', 'See on Google Play.', null);
+INSERT INTO text VALUES ('URL_TYPE_P_SUMMARY', 'eu', 'DB_URL_TYPE', 'Google Play-n.', null);
+INSERT INTO text VALUES ('URL_TYPE_A',         'es', 'DB_URL_TYPE', 'App Store', null);
+INSERT INTO text VALUES ('URL_TYPE_A',         'en', 'DB_URL_TYPE', 'App Store', null);
+INSERT INTO text VALUES ('URL_TYPE_A',         'eu', 'DB_URL_TYPE', 'App Store', null);
+INSERT INTO text VALUES ('URL_TYPE_A_SUMMARY', 'es', 'DB_URL_TYPE', 'Ver app en App Store.', null);
+INSERT INTO text VALUES ('URL_TYPE_A_SUMMARY', 'en', 'DB_URL_TYPE', 'See on App Store.', null);
+INSERT INTO text VALUES ('URL_TYPE_A_SUMMARY', 'eu', 'DB_URL_TYPE', 'App Store-an.', null);
+INSERT INTO text VALUES ('URL_TYPE_G',         'es', 'DB_URL_TYPE', 'Github', null);
+INSERT INTO text VALUES ('URL_TYPE_G',         'en', 'DB_URL_TYPE', 'Github', null);
+INSERT INTO text VALUES ('URL_TYPE_G',         'eu', 'DB_URL_TYPE', 'Github', null);
+INSERT INTO text VALUES ('URL_TYPE_G_SUMMARY', 'es', 'DB_URL_TYPE', 'Ver código fuente en Github.', null);
+INSERT INTO text VALUES ('URL_TYPE_G_SUMMARY', 'en', 'DB_URL_TYPE', 'Checkout source code on Github.', null);
+INSERT INTO text VALUES ('URL_TYPE_G_SUMMARY', 'eu', 'DB_URL_TYPE', 'Kodea Github-n.', null);
+INSERT INTO text VALUES ('URL_TYPE_M',         'es', 'DB_URL_TYPE', 'Ver', null);
+INSERT INTO text VALUES ('URL_TYPE_M',         'en', 'DB_URL_TYPE', 'See', null);
+INSERT INTO text VALUES ('URL_TYPE_M',         'eu', 'DB_URL_TYPE', 'Ikusi', null);
+INSERT INTO text VALUES ('URL_TYPE_M_SUMMARY', 'es', 'DB_URL_TYPE', 'Ver', null);
+INSERT INTO text VALUES ('URL_TYPE_M_SUMMARY', 'en', 'DB_URL_TYPE', 'See', null);
+INSERT INTO text VALUES ('URL_TYPE_M_SUMMARY', 'eu', 'DB_URL_TYPE', 'Ikusi', null);
+INSERT INTO project_url_type VALUES ('E', null, null, null);
+INSERT INTO project_url_type VALUES ('W', 'URL_TYPE_W', 'URL_TYPE_W_SUMMARY', 'web.png');
+INSERT INTO project_url_type VALUES ('P', 'URL_TYPE_P', 'URL_TYPE_P_SUMMARY', 'googleplay.png');
+INSERT INTO project_url_type VALUES ('A', 'URL_TYPE_A', 'URL_TYPE_A_SUMMARY', 'appstore.png');
+INSERT INTO project_url_type VALUES ('G', 'URL_TYPE_G', 'URL_TYPE_G_SUMMARY', 'github.png');
+INSERT INTO project_url_type VALUES ('M', 'URL_TYPE_M', 'URL_TYPE_M_SUMMARY', 'misc.png');
+
+
+-- TABLE project_version_type
+INSERT INTO text VALUES ('VERSION_TYPE_ALPHA',         'es', 'VERSION_TYPE', 'Alfa', null);
+INSERT INTO text VALUES ('VERSION_TYPE_ALPHA',         'en', 'VERSION_TYPE', 'Alpha', null);
+INSERT INTO text VALUES ('VERSION_TYPE_ALPHA',         'eu', 'VERSION_TYPE', 'Alpha', null);
+INSERT INTO text VALUES ('VERSION_TYPE_ALPHA_SUMMARY', 'es', 'VERSION_TYPE', 'En sesarrollo. Inestable.', null);
+INSERT INTO text VALUES ('VERSION_TYPE_ALPHA_SUMMARY', 'en', 'VERSION_TYPE', 'In development. Unstable.', null);
+INSERT INTO text VALUES ('VERSION_TYPE_ALPHA_SUMMARY', 'eu', 'VERSION_TYPE', 'En desarrollo. Inestable', null);
+INSERT INTO text VALUES ('VERSION_TYPE_BETA',          'es', 'VERSION_TYPE', 'Beta', null);
+INSERT INTO text VALUES ('VERSION_TYPE_BETA',          'en', 'VERSION_TYPE', 'Beta', null);
+INSERT INTO text VALUES ('VERSION_TYPE_BETA',          'eu', 'VERSION_TYPE', 'Beta', null);
+INSERT INTO text VALUES ('VERSION_TYPE_BETA_SUMMARY',  'es', 'VERSION_TYPE', 'En pruebas. Parcialmente estable.', null);
+INSERT INTO text VALUES ('VERSION_TYPE_BETA_SUMMARY',  'en', 'VERSION_TYPE', 'Under testing. Stability not guaranteed.', null);
+INSERT INTO text VALUES ('VERSION_TYPE_BETA_SUMMARY',  'eu', 'VERSION_TYPE', 'En pruebas. Parcialmente estable.', null);
+INSERT INTO text VALUES ('VERSION_TYPE_PRO',           'es', 'VERSION_TYPE', 'Estable', null);
+INSERT INTO text VALUES ('VERSION_TYPE_PRO',           'en', 'VERSION_TYPE', 'Stable', null);
+INSERT INTO text VALUES ('VERSION_TYPE_PRO',           'eu', 'VERSION_TYPE', 'Estable', null);
+INSERT INTO text VALUES ('VERSION_TYPE_PRO_SUMMARY',   'es', 'VERSION_TYPE', 'Listo para uso en entorno de producción.', null);
+INSERT INTO text VALUES ('VERSION_TYPE_PRO_SUMMARY',   'en', 'VERSION_TYPE', 'Ready for production.', null);
+INSERT INTO text VALUES ('VERSION_TYPE_PRO_SUMMARY',   'eu', 'VERSION_TYPE', 'Listo para uso en entorno de producción.', null);
+INSERT INTO project_version_type VALUES ('A', 'VERSION_TYPE_ALPHA', 'VERSION_TYPE_ALPHA_SUMMARY', '#ff0000');
+INSERT INTO project_version_type VALUES ('B', 'VERSION_TYPE_BETA',  'VERSION_TYPE_BETA_SUMMARY',  '#ffaa00');
+INSERT INTO project_version_type VALUES ('P', 'VERSION_TYPE_PRO',   'VERSION_TYPE_PRO_SUMMARY',   '#00ff00');
+
+
+-- TABLE license
+INSERT INTO text VALUES ('LICENSE_CC-BY-SA_SUMMARY', 'es', 'LICENSE', null, 'LICENSE_CC-BY-SA_SUMMARY__ES');
+INSERT INTO text VALUES ('LICENSE_CC-BY-SA_SUMMARY', 'en', 'LICENSE', null, 'LICENSE_CC-BY-SA_SUMMARY__EN');
+INSERT INTO text VALUES ('LICENSE_CC-BY-SA_SUMMARY', 'eu', 'LICENSE', null, 'LICENSE_CC-BY-SA_SUMMARY__EU');
+INSERT INTO text VALUES ('LICENSE_CC-BY-SA',         'es', 'LICENSE', null, 'LICENSE_CC-BY-SA__ES');
+INSERT INTO text VALUES ('LICENSE_CC-BY-SA',         'en', 'LICENSE', null, 'LICENSE_CC-BY-SA__EN');
+INSERT INTO text VALUES ('LICENSE_CC-BY-SA',         'eu', 'LICENSE', null, 'LICENSE_CC-BY-SA__EU');
+INSERT INTO text VALUES ('LICENSE_GPLV3_SUMMARY',    'es', 'LICENSE', null, 'LICENSE_GPLV3_SUMMARY__ES');
+INSERT INTO text VALUES ('LICENSE_GPLV3_SUMMARY',    'en', 'LICENSE', null, 'LICENSE_GPLV3_SUMMARY__EN');
+INSERT INTO text VALUES ('LICENSE_GPLV3_SUMMARY',    'eu', 'LICENSE', null, 'LICENSE_GPLV3_SUMMARY__EU');
+INSERT INTO text VALUES ('LICENSE_GPLV3',            'es', 'LICENSE', null, 'LICENSE_GPLV3__ES');
+INSERT INTO text VALUES ('LICENSE_GPLV3',            'en', 'LICENSE', null, 'LICENSE_GPLV3__EN');
+INSERT INTO text VALUES ('LICENSE_GPLV3',            'eu', 'LICENSE', null, 'LICENSE_GPLV3__EU');
+INSERT INTO license VALUES ('CC-BY-SA', 'LICENSE_CC-BY-SA_SUMMARY', 'LICENSE_CC-BY-SA', 'CC-BY-SA.png', 'CC-BY-SA.png');
+INSERT INTO license VALUES ('GPLv3',    'LICENSE_GPLV3_SUMMARY',    'LICENSE_GPLV3',    'GPLV3.png',    'GPLV3.png');
+
+
+-- TABLE cv_category
+INSERT INTO text VALUES ('CV_CATEGORY_WORK',             'es', 'DB_CV', 'Experiencia', null);
+INSERT INTO text VALUES ('CV_CATEGORY_WORK',             'en', 'DB_CV', 'Experience', null);
+INSERT INTO text VALUES ('CV_CATEGORY_WORK',             'eu', 'DB_CV', 'Experiencia', null);
+INSERT INTO text VALUES ('CV_CATEGORY_EDUCATION',        'es', 'DB_CV', 'Formación', null);
+INSERT INTO text VALUES ('CV_CATEGORY_EDUCATION',        'en', 'DB_CV', 'Hezkuntza', null);
+INSERT INTO text VALUES ('CV_CATEGORY_EDUCATION',        'eu', 'DB_CV', 'Education', null);
+INSERT INTO text VALUES ('CV_CATEGORY_PROJECTS',         'es', 'DB_CV', 'Otros proyectos', null);
+INSERT INTO text VALUES ('CV_CATEGORY_PROJECTS',         'en', 'DB_CV', 'Other projects', null);
+INSERT INTO text VALUES ('CV_CATEGORY_PROJECTS',         'eu', 'DB_CV', 'Beste projecktuak', null);
+INSERT INTO text VALUES ('CV_CATEGORY_PROJECTS_SUMMARY', 'es', 'DB_CV', 'Proyectos de software eralizados por cuenta propia', null);
+INSERT INTO text VALUES ('CV_CATEGORY_PROJECTS_SUMMARY', 'en', 'DB_CV', 'Proyectos de software eralizados por cuenta propia', null);
+INSERT INTO text VALUES ('CV_CATEGORY_PROJECTS_SUMMARY', 'eu', 'DB_CV', 'Proyectos de software eralizados por cuenta propia', null);
+INSERT INTO text VALUES ('CV_CATEGORY_OTHER',            'es', 'DB_CV', 'Otra experiencia laboral', null);
+INSERT INTO text VALUES ('CV_CATEGORY_OTHER',            'en', 'DB_CV', 'Otra experiencia laboral', null);
+INSERT INTO text VALUES ('CV_CATEGORY_OTHER',            'eu', 'DB_CV', 'Otra experiencia laboral', null);
+INSERT INTO text VALUES ('CV_CATEGORY_OTHER_SUMMARY',    'es', 'DB_CV', 'Experiencia laboral fuera del ámbito de IT', null);
+INSERT INTO text VALUES ('CV_CATEGORY_OTHER_SUMMARY',    'en', 'DB_CV', 'Experiencia laboral fuera del ámbito de IT', null);
+INSERT INTO text VALUES ('CV_CATEGORY_OTHER_SUMMARY',    'eu', 'DB_CV', 'Experiencia laboral fuera del ámbito de IT', null);
+INSERT INTO cv_category VALUES (1, 'CV_CATEGORY_WORK',      null,                          1 , 1);
+INSERT INTO cv_category VALUES (2, 'CV_CATEGORY_EDUCATION', null,                          1 , 3);
+INSERT INTO cv_category VALUES (3, 'CV_CATEGORY_PROJECTS', 'CV_CATEGORY_PROJECTS_SUMMARY', 0 , 2);
+INSERT INTO cv_category VALUES (4, 'CV_CATEGORY_OTHER',    'CV_CATEGORY_OTHER_SUMMARY',    1 , 4);
+
+
+-- To be filled before installing
+INSERT INTO text VALUES ('USER_NAME', 'es', 'USER', '', null);
+INSERT INTO text VALUES ('USER_NAME', 'en', 'USER', '', null);
+INSERT INTO text VALUES ('USER_NAME', 'eu', 'USER', '', null);
+INSERT INTO text VALUES ('USER_TAGLINE', 'es', 'USER', '', null);
+INSERT INTO text VALUES ('USER_TAGLINE', 'en', 'USER', '', null);
+INSERT INTO text VALUES ('USER_TAGLINE', 'eu', 'USER', '', null);
+INSERT INTO text VALUES ('USER_BIO', 'es', 'USER', '', null);
+INSERT INTO text VALUES ('USER_BIO', 'en', 'USER', '', null);
+INSERT INTO text VALUES ('USER_BIO', 'eu', 'USER', '', null);
+
+-- ADD MORE ROWS AS YOU SEE FIT:

+ 3 - 3
sql/README.md

@@ -1,7 +1,7 @@
 To create de database:
 
-1) Edit the file 01_STRUCTURE.SQL. Replace both passwords with two of your own. Uncomment all GRANT entries.
+1) Edit the file 01_structure.sql. Replace both passwords with two of your own. Uncomment all GRANT entries.
 
-2) Modify the file 02_DATA.SQL at will to fit your needs.
+2) Modify the file 03_data.sql at will to fit your needs.
 
-3) Run the __SETUP.SQL script.
+3) Run the 00_setup.sql script.

+ 86 - 0
www/application/class/controller/Controller.php

@@ -0,0 +1,86 @@
+<?php
+
+    require_once("../application/config/config.php");
+    require_once($path["helper"] . "db.php");
+    require_once($path["helper"] . "text.php");
+    require_once($path["helper"] . "net.php");
+    foreach (glob($path["model"] . "*_Page.php") as $pagename){
+        require_once($pagename);
+    }
+
+
+    /**
+     * Application controller.
+     *
+     * Handles every request, creating the required models and selecting the
+     * view.
+     */
+    class Controller {
+
+        /**
+         * Constructor.
+         *
+         * Handles every request, creating the required models and selecting the
+         * view.
+         */
+        public function __construct($params){
+
+            global $path;
+            global $root;
+            $page;
+
+            $db = start_db();
+
+            // Parse parameters, get lang and build the route.
+            $pars = [];
+            foreach($params as $p){
+                if (strlen($p) > 0){
+                    array_push($pars, $p);
+                }
+            }
+            $route = [];
+            if (sizeof($pars) > 0 && preg_match("/^[a-zA-Z]{2}$/", $pars[0])){
+                $lang = $pars[0];
+                array_splice($pars, 0, 1);
+            }
+            else{
+                $lang = select_language($db);
+                // TODO: Redirect to url with lang?
+            }
+            foreach($pars as $p){
+                array_push($route, $p);
+            }
+
+            // Select the model to load.
+            if (sizeof($route) == 0){
+                $page = new Home_Page($db, $lang);
+            }
+            else{
+                if (strtoupper($route[0]) == "HELP"){
+                    $page = new Help_Page($db, $lang);
+                }
+                if (strtoupper($route[0]) == "PROFILE"){
+                    $page = new Profile_Page($db, $lang);
+                }
+                elseif (strtoupper($route[0]) == "PROJECT"){
+                    if (sizeof($route) > 1){
+                        // Project page
+                        $page = new Project_Page($db, $lang, $route[1]);
+                    }
+                    else{
+                        // Project list page
+                        $page = new Projects_Page($db, $lang);
+                    }
+                }
+            }
+
+            // Load the view, or set an error code.
+            if (isset($page)){
+                require_once($page->view);
+            }
+            else{
+                http_response_code(404);
+            }
+        }
+    }
+?>

+ 56 - 0
www/application/class/controller/controller.php

@@ -0,0 +1,56 @@
+<?php
+
+    require_once("../application/config/config.php");
+    require_once("../application/config/auth.php");
+    require_once($path["helper"] . "db.php");
+    require_once($path["helper"] . "text.php");
+    require_once($path["helper"] . "net.php");
+    require_once($path["model"] . "model.php");
+    foreach (glob($path["model"] . "*.php") as $modelname){
+        require_once($modelname);
+    }
+
+    $model = null;
+
+    class Controller {
+
+        public function __construct(){}
+
+        public function handle_request($params){
+
+            global $path;
+            global $model;
+
+            // Get language (first param)
+            // TODO GET
+            //$lang = $params[0];
+            $lang = 'en';
+
+            // Connect to the database
+            $con = start_db();
+
+            if ($params == null || count($params) == 0){
+                // This should not be possible due to language redirects
+                // TODO: remove home
+                $model = new Home();
+            }
+            elseif (count($params) == 1){
+                // Home screen
+                $model = new Home();
+            }
+            else{
+                // TODO: Other sections
+                $model = new Home();
+            }
+
+
+            // Load the view
+            $model->lang = $lang;
+            $model->con = $con;
+            $model->prepare();
+            //require_once($model->view);
+            error_log("INCLUDING " . $model->view);
+            include $model->view;
+        }
+    }
+?>

+ 35 - 0
www/application/class/model/Entity.php

@@ -0,0 +1,35 @@
+<?php
+
+    /**
+     * Entity superclass.
+     *
+     * Every other entity must inherit from this one. It represents a database
+     * entity.
+     */
+    abstract class Entity{
+
+        /**
+         * Database connection.
+         */
+        public $db;
+
+        /**
+         * The language of the class's text fields (lowercase, two-letter
+         * language code).
+         */
+        public $lang;
+
+        /**
+         * Constructor.
+         *
+         * Sets the database conection and the language.
+         *
+         * @param MySQL_connection $db Connection to the database.
+         * @param string $lang Lowercase, two-letter language code.
+         */
+        public function __construct($db, $lang){
+            $this->db = $db;
+            $this->lang = $lang;
+        }
+    }
+?>

+ 50 - 0
www/application/class/model/Footer.php

@@ -0,0 +1,50 @@
+<?php
+
+    require_once($path["model"] . "Lang.php");
+    require_once($path["model"] . "Social.php");
+
+    /**
+     * Page footer.
+     *
+     * Used to display the footer in every page.
+     */
+    class Footer{
+
+        /**
+         * Array of {@see Social} to display social network links.
+         */
+        public $social = [];
+
+        /**
+         * Array of {@see Lang} the page can be served on.
+         */
+        public $lang = [];
+
+        /**
+         * Constructor.
+         *
+         * Searches the database and populates the social and lang arrays.
+         *
+         * @param MySQL_connection $db Connection to the database.
+         * @param string $lang Lowercase, two-letter language code.
+         */
+        public function __construct($db, $lang){
+            $s_social =
+              "SELECT id " .
+              "FROM social " .
+              "WHERE visible = 1; ";
+            $q_social = mysqli_query($db, $s_social);
+            while($r_social = mysqli_fetch_array($q_social)){
+                array_push($this->social, new Social($db, $lang, $r_social["id"]));
+            }
+            $s_lang =
+              "SELECT code AS id " .
+              "FROM lang " .
+              "WHERE active = 1; ";
+            $q_lang = mysqli_query($db, $s_lang);
+            while($r_lang = mysqli_fetch_array($q_lang)){
+                array_push($this->lang, new Lang($db, $r_lang["id"]));
+            }
+        }
+    }
+?>

+ 29 - 0
www/application/class/model/Footer_Page.php

@@ -0,0 +1,29 @@
+<?php
+
+    require_once($path["model"] . "Lang.php");
+    require_once($path["model"] . "Social.php");
+
+    class Footer_Page{
+        public $social = [];
+        public $lang = [];
+
+        public function __construct($db, $lang){
+            $s_social =
+              "SELECT id " .
+              "FROM social " .
+              "WHERE visible = 1; ";
+            $q_social = mysqli_query($db, $s_social);
+            while($r_social = mysqli_fetch_array($q_social)){
+                array_push($this->social, new Social($db, $lang, $r_social["id"]));
+            }
+            $s_lang =
+              "SELECT code AS id " .
+              "FROM lang " .
+              "WHERE active = 1; ";
+            $q_lang = mysqli_query($db, $s_lang);
+            while($r_lang = mysqli_fetch_array($q_lang)){
+                array_push($this->lang, new Lang($db, $r_lang["id"]));
+            }
+        }
+    }
+?>

+ 37 - 0
www/application/class/model/Help_Page.php

@@ -0,0 +1,37 @@
+<?php
+
+    require_once($path["model"] . "Page.php");
+    require_once($path["helper"] . "text.php");
+
+
+    /**
+     * Help page model.
+     */
+    class Help_Page extends Page{
+
+        /**
+         * Constructor.
+         *
+         * Retrieves the data and initializes the variables.
+         *
+         * @param MySQL_connection $db Connection to the database.
+         * @param string $lang Lowercase, two-letter language code.
+         */
+        public function __construct($db, $lang){
+            global $path;
+            global $root;
+            parent::__construct($db, $lang);
+            $this->view = $path["view"] . "help.php";
+
+            // TODO: Get data
+
+            $this->title = text($this, "USER_NAME");
+            $this->name = text($this, "USER_NAME");
+            $this->description = text($this, "USER_NAME") . " - " . text($this, "USER_TAGLINE");
+            $this->favicon = $path["img"]["layout"] . "logo/logo.svg";
+            $this->icon = $path["img"]["layout"] . "logo/logo.svg";
+            $this->canonical = $root . $lang . "/";
+            $this->author = $root . $lang . "/";
+        }
+    }
+?>

+ 99 - 0
www/application/class/model/Home_Page.php

@@ -0,0 +1,99 @@
+<?php
+
+    require_once($path["model"] . "Page.php");
+    require_once($path["model"] . "Project.php");
+    require_once($path["helper"] . "text.php");
+
+
+    /**
+     * Home page model.
+     */
+    class Home_Page extends Page{
+
+        private $max_projects = 3;
+
+        /**
+         * Array with profile data.
+         */
+        public $profile = [
+            "role" => "",
+            "company" => "",
+            "city" => "",
+            "days" => "",
+            "summary" => ""
+        ];
+
+        /**
+         * List of recent projects.
+         */
+        public $project = [];
+
+        /**
+         * Constructor.
+         *
+         * Retrieves the data and initializes the variables.
+         *
+         * @param MySQL_connection $db Connection to the database.
+         * @param string $lang Lowercase, two-letter language code.
+         */
+        public function __construct($db, $lang){
+            global $path;
+            global $root;
+            parent::__construct($db, $lang);
+            $this->view = $path["view"] . "home.php";
+            $s_profile =
+              "SELECT " .
+              "  role, " .
+              "  company, " .
+              "  city, " .
+              "  datediff(now(), start) AS days, " .
+              "  summary " .
+              "FROM cv_entry " .
+              "WHERE " .
+              "  category = 1 AND " .
+              "  visible = 1 AND " .
+              "  end IS NULL " .
+              "ORDER BY start " .
+              "DESC LIMIT 1;";
+            $q_profile = mysqli_query($this->db, $s_profile);
+            if (mysqli_num_rows($q_profile) > 0){
+                $r_profile = mysqli_fetch_array($q_profile);
+                $this->profile["role"] = text($this, $r_profile["role"]);
+                $this->profile["company"] = $r_profile["company"];
+                $this->profile["city"] = $r_profile["city"];
+                $this->profile["days"] = $r_profile["days"];
+                $this->profile["summary"] = text($this, $r_profile["summary"]);
+            }
+            $s_project =
+              "SELECT id " .
+              "FROM project " .
+              "WHERE " .
+              "  project.id = ( " .
+              "    SELECT project " .
+              "    FROM " .
+              "      ( " .
+              "        SELECT " .
+              "          project, " .
+              "          max(dtime) " .
+              "        FROM project_version " .
+              "        GROUP BY project " .
+              "        ORDER BY dtime DESC " .
+              "        LIMIT " . $this->max_projects .
+              "      ) lp " .
+              "    WHERE lp.project = project.id " .
+              "  ) AND " .
+              "  visible = 1;";
+            $q_project = mysqli_query($this->db, $s_project);
+            while($r_project = mysqli_fetch_array($q_project)){
+                array_push($this->project, new Project($this->db, $this->lang, $r_project["id"]));
+            }
+            $this->title = text($this, "USER_NAME");
+            $this->name = text($this, "USER_NAME");
+            $this->description = text($this, "USER_NAME") . " - " . text($this, "USER_TAGLINE");
+            $this->favicon = $path["img"]["layout"] . "logo/logo.svg";
+            $this->icon = $path["img"]["layout"] . "logo/logo.svg";
+            $this->canonical = $root . $lang . "/";
+            $this->author = $root . $lang . "/";
+        }
+    }
+?>

+ 56 - 0
www/application/class/model/Lang.php

@@ -0,0 +1,56 @@
+<?php
+
+    require_once($path["model"] . "Entity.php");
+
+
+    /**
+     * Language.
+     *
+     * Represents an object from the table 'lang'.
+     */
+    class Lang extends Entity{
+
+        /**
+         * Lowercase, two-letter language code.
+         */
+        public $code;
+
+        /**
+         * Language name, in it's own language.
+         */
+        public $name;
+
+        /**
+         * Indictes wether the language is offered in this language.
+         */
+        public $active;
+
+        /**
+         * Constructor.
+         *
+         * Searches the database and retrieves the information about the
+         * object, populating it.
+         *
+         * @param MySQL_connection $db Connection to the database.
+         * @param int $id Database identifier of the language.
+         */
+        public function __construct($db, $id){
+            parent::__construct($db, null);
+            $s =
+              "SELECT " .
+              "  code, " .
+              "  name, " .
+              "  active " .
+              "FROM lang " .
+              "WHERE " .
+              "  code = '$id'; ";
+            $q = mysqli_query($this->db, $s);
+            if (mysqli_num_rows($q) > 0){
+                $r = mysqli_fetch_array($q);
+                $this->code = $r["code"];
+                $this->name = $r["name"];
+                $this->active = $r["active"];
+            }
+        }
+    }
+?>

+ 72 - 0
www/application/class/model/License.php

@@ -0,0 +1,72 @@
+<?php
+
+    require_once($path["model"] . "Entity.php");
+    require_once($path["helper"] . "text.php");
+
+
+    /**
+     * License.
+     *
+     * Represents an object from the table 'license'.
+     */
+    class License extends Entity{
+
+        /**
+         * License identifier. Usually an abbreviation.
+         */
+        public $id;
+
+        /**
+         * Short, easily readable text summarizing the full text of the
+         * license.
+         */
+        public $summary;
+
+        /**
+         * Full text of the license.
+         */
+        public $legal;
+
+        /**
+         * License logo.
+         */
+        public $logo;
+
+        /**
+         * License icon, small.
+         */
+        public $icon;
+
+        /**
+         * Constructor.
+         *
+         * Searches the database and retrieves the information about the
+         * object, populating it.
+         *
+         * @param MySQL_connection $db Connection to the database.
+         * @param string $lang Lowercase, two-letter language code.
+         * @param string $id Database identifier of the license.
+         */
+        public function __construct($db, $lang, $id){
+            parent::__construct($db, $lang);
+            $s =
+              "SELECT " .
+              "  id, " .
+              "  summary, " .
+              "  legal, " .
+              "  logo, " .
+              "  icon " .
+              "FROM license " .
+              "WHERE id = '$id'; ";
+            $q = mysqli_query($this->db, $s);
+            if (mysqli_num_rows($q) > 0){
+                $r = mysqli_fetch_array($q);
+                $this->id = $r["id"];
+                $this->summary = text($this, $r["summary"]);
+                $this->legal = text($this, $r["legal"]);
+                $this->logo = $r["logo"];
+                $this->icon = $r["icon"];
+            }
+        }
+    }
+?>

+ 82 - 0
www/application/class/model/Page.php

@@ -0,0 +1,82 @@
+<?php
+
+    require_once($path["model"] . "Footer.php");
+
+
+    /**
+     * Page superclass.
+     *
+     * Every visitable page type must inherit from this one.
+     */
+    abstract class Page{
+
+        /**
+         * Database connection.
+         */
+        public $db;
+
+        /**
+         * View associated with the page.
+         */
+        public $view;
+
+        /**
+         * Language the page will be served on (lowercase, two-letter
+         * language code).
+         */
+        public $lang;
+
+        /**
+         * Footer.
+         * @see Footer_Page
+         */
+        public $footer;
+
+        /**
+         * Title of the page, in the defined language.
+         */
+        public $title;
+
+        /**
+         * Site name.
+         */
+        public $name;
+
+        /**
+         * Page description, in the defined language.
+         */
+        public $description;
+
+        /**
+         * Path to the site favicon.
+         */
+        public $favicon;
+
+        /**
+         * Path to the page icon or main image.
+         */
+        public $icon;
+
+        /**
+         * Canonical URL.
+         */
+        public $canonical;
+
+        /**
+         * Autjhor URL.
+         */
+        public $author;
+
+        /**
+         * Constructor.
+         *
+         * @param MySQL_connection $db Connection to the database.
+         * @param string $lang Lowercase, two-letter language code.
+         */
+        public function __construct($db, $lang){
+            $this->db = $db;
+            $this->lang = $lang;
+            $this->footer = new Footer($db, $lang);
+        }
+    }
+?>

+ 37 - 0
www/application/class/model/Profile_Page.php

@@ -0,0 +1,37 @@
+<?php
+
+    require_once($path["model"] . "Page.php");
+    require_once($path["helper"] . "text.php");
+
+
+    /**
+     * Profile page model.
+     */
+    class Profile_Page extends Page{
+
+        /**
+         * Constructor.
+         *
+         * Retrieves the data and initializes the variables.
+         *
+         * @param MySQL_connection $db Connection to the database.
+         * @param string $lang Lowercase, two-letter language code.
+         */
+        public function __construct($db, $lang){
+            global $path;
+            global $root;
+            parent::__construct($db, $lang);
+            $this->view = $path["view"] . "profile.php";
+
+            // TODO: Get data
+
+            $this->title = text($this, "USER_NAME");
+            $this->name = text($this, "USER_NAME");
+            $this->description = text($this, "USER_NAME") . " - " . text($this, "USER_TAGLINE");
+            $this->favicon = $path["img"]["layout"] . "logo/logo.svg";
+            $this->icon = $path["img"]["layout"] . "logo/logo.svg";
+            $this->canonical = $root . $lang . "/";
+            $this->author = $root . $lang . "/";
+        }
+    }
+?>

+ 176 - 0
www/application/class/model/Project.php

@@ -0,0 +1,176 @@
+<?php
+
+    require_once($path["model"] . "Entity.php");
+    require_once($path["model"] . "License.php");
+    require_once($path["model"] . "Project_Type.php");
+    require_once($path["model"] . "Project_Image.php");
+    require_once($path["model"] . "Project_Comment.php");
+    require_once($path["model"] . "Project_Version.php");
+    require_once($path["model"] . "Project_Tag.php");
+    require_once($path["model"] . "Project_Url.php");
+    require_once($path["helper"] . "text.php");
+
+
+    /**
+     * Project.
+     *
+     * Represents an object from the table 'project'.
+     */
+    class Project extends Entity{
+
+        /**
+         * Project identifier.
+         */
+        public $id;
+
+        /**
+         * Permalink for linking the project (relative).
+         */
+        public $permalink;
+
+        /**
+         * {@see Project_Type} of project.
+         */
+        public $type;
+
+        /**
+         * Project title in the defined language.
+         */
+        public $title;
+
+        /**
+         * Project logo filename.
+         */
+        public $logo;
+
+        /**
+         * Project summary in the defined language.
+         */
+        public $header;
+
+        /**
+         * Project description in the defined language.
+         */
+        public $text;
+
+        /**
+         * Project {@see License}.
+         */
+        public $license;
+
+        /**
+         * Array with the project {@see Project_Image}.
+         */
+        public $image = [];
+
+        /**
+         * Array with the released {@see Project_Version} of the project,
+         * sorted from new to old.
+         */
+        public $version = [];
+
+        /**
+         * Array with the {@see Project_Comment} posted in the project, sorted
+         * from new to old.
+         */
+        public $comment = [];
+
+        /**
+         * Array with the {@see Project_Tag} of the project.
+         */
+        public $tag = [];
+
+        /**
+         * Array with {@see Project_Url} related to the project.
+         */
+        public $url = [];
+
+        /**
+         * Constructor.
+         *
+         * Searches the database and retrieves the information about the
+         * project, populating it and it's items.
+         *
+         * @param MySQL_connection $db Connection to the database.
+         * @param string $lang Lowercase, two-letter language code.
+         * @param string $id Identifier or permalink of the project.
+         */
+        public function __construct($db, $lang, $id){
+            parent::__construct($db, $lang);
+            $s =
+              "SELECT " .
+              "  id, " .
+              "  permalink, " .
+              "  type, " .
+              "  title, " .
+              "  logo, " .
+              "  header, " .
+              "  text, " .
+              "  license " .
+              "FROM project " .
+              "WHERE " .
+              "  visible = 1 AND " .
+              "  ( " .
+              "    id = '$id' OR " .
+              "    permalink = '$id' " .
+              "  );";
+            $q = mysqli_query($this->db, $s);
+            if (mysqli_num_rows($q) > 0){
+                $r = mysqli_fetch_array($q);
+                $this->id = $r["id"];
+                $this->permalink = $r["permalink"];
+                $this->title = text($this, $r["title"]);
+                $this->logo = $r["logo"];
+                $this->header = text($this, $r["header"]);
+                $this->text = text($this, $r["text"]);
+                $this->type = new Project_Type($this->db, $this->lang, $r["type"]);
+                $this->license = new License($this->db, $this->lang, $r["license"]);
+            }
+            $s_image =
+              "SELECT id " .
+              "FROM project_image " .
+              "WHERE project = " . $this->id . " " .
+              "ORDER BY idx; ";
+            $q_image = mysqli_query($this->db, $s_image);
+            while($r_image = mysqli_fetch_array($q_image)){
+                array_push($this->image, new Project_Image($this->db, $r_image["id"]));
+            }
+            $s_version =
+              "SELECT version_code AS code " .
+              "FROM project_version " .
+              "WHERE " .
+              "  project = " . $this->id . " AND " .
+              "  visible = 1 " .
+              "ORDER BY dtime DESC; ";
+            $q_version = mysqli_query($this->db, $s_version);
+            while($r_version = mysqli_fetch_array($q_version)){
+                array_push($this->version, new Project_Version($this->db, $this->lang, $this->id, $r_version["code"]));
+            }
+            $s_tag =
+              "SELECT tag " .
+              "FROM project_tag " .
+              "WHERE project = " . $this->id . ";";
+            $q_tag = mysqli_query($this->db, $s_tag);
+            while($r_tag = mysqli_fetch_array($q_tag)){
+                array_push($this->tag, new Project_Tag($this->db, $this->lang, $this->id, $r_tag["tag"]));
+            }
+            $s_url =
+              "SELECT id " .
+              "FROM project_comment " .
+              "WHERE project = " . $this->id . ";";
+            error_log($s_url);
+            $q_url = mysqli_query($this->db, $s_url);
+            while($r_url = mysqli_fetch_array($q_url)){
+                array_push($this->url, new Project_Url($this->db, $this->lang, $r_url["id"]));
+            }
+            $s_comment =
+              "SELECT id " .
+              "FROM project_comment " .
+              "WHERE project = " . $this->id . ";";
+            $q_comment = mysqli_query($this->db, $s_comment);
+            while($r_comment = mysqli_fetch_array($q_comment)){
+                array_push($this->comment, new Project_Comment($this->db, $r_comment["id"]));
+            }
+        }
+    }
+?>

+ 98 - 0
www/application/class/model/Project_Comment.php

@@ -0,0 +1,98 @@
+<?php
+
+    require_once($path["model"] . "Entity.php");
+
+
+    /**
+     * Project posted on a comment.
+     *
+     * Represents an object from the table 'project_comment'.
+     */
+    class Project_Comment extends Entity{
+
+        /**
+         * Comment unique identifier.
+         */
+        public $id;
+
+        /**
+         * Identifier of the project the comment is on.
+         */
+        public $project;
+
+        /**
+         * Version identifier of the project at the time the post was posted.
+         */
+        public $version;
+
+        /**
+         * Text of the comment.
+         */
+        public $text;
+
+        /**
+         * Time the comment was published.
+         */
+        public $dtime;
+
+        /**
+         * User identifier of the poster, if it was a registered user.
+         */
+        public $user;
+
+        /**
+         * Username of the poster, if it was not a registered user.
+         */
+        public $username;
+
+        /**
+         * Lowercase, two-letter language code of the comment. Guessed at the
+         * time of posting.
+         */
+        public $lang;
+
+        /**
+         * Indicates wether the comment has been approved and can be displayed.
+         */
+        public $approved;
+
+        /**
+         * Constructor.
+         *
+         * Searches the database and retrieves the information about the
+         * comment, populating it.
+         *
+         * @param MySQL_connection $db Connection to the database.
+         * @param int $id Identifier of the comment.
+         */
+        public function __construct($db, $id){
+            parent::__construct($db, null);
+            $s =
+              "SELECT " .
+              "  id, " .
+              "  project, " .
+              "  version, " .
+              "  text, " .
+              "  dtime, " .
+              "  user, " .
+              "  username, " .
+              "  lang, " .
+              "  approved " .
+              "FROM project_comment " .
+              "WHERE id = $id ;";
+            $q = mysqli_query($this->db, $s);
+            if (mysqli_num_rows($q) > 0){
+                $r = mysqli_fetch_array($q);
+                $this->id = $r["id"];
+                $this->project = $r["project"];
+                $this->version = $r["version"];
+                $this->text = $r["text"];
+                $this->dtime = $r["dtime"];
+                $this->user = $r["user"];
+                $this->username = $r["username"];
+                $this->lang = $r["lang"];
+                $this->approved = $r["approved"];
+            }
+        }
+    }
+?>

+ 62 - 0
www/application/class/model/Project_Image.php

@@ -0,0 +1,62 @@
+<?php
+
+    require_once($path["model"] . "Entity.php");
+
+
+    /**
+     * Image of a project.
+     *
+     * Represents an object from the table 'project_image'.
+     */
+    class Project_Image extends Entity{
+
+        /**
+         * Image identifier.
+         */
+        public $id;
+
+        /**
+         * Project identifier.
+         */
+        public $project;
+
+        /**
+         * Indicates the order position among other images.
+         */
+        public $idx;
+
+        /**
+         * Filename of the image.
+         */
+        public $image;
+
+        /**
+         * Constructor.
+         *
+         * Searches the database and retrieves the information about the
+         * image, populating it.
+         *
+         * @param MySQL_connection $db Connection to the database.
+         * @param int $id Identifier of the image.
+         */
+        public function __construct($db, $id){
+            parent::__construct($db, null);
+            $s =
+              "SELECT " .
+              "  id, " .
+              "  project, " .
+              "  idx, " .
+              "  image " .
+              "FROM project_image " .
+              "WHERE id = $id ;";
+            $q = mysqli_query($this->db, $s);
+            if (mysqli_num_rows($q) > 0){
+                $r = mysqli_fetch_array($q);
+                $this->id = $r["id"];
+                $this->project = $r["project"];
+                $this->idx = $r["idx"];
+                $this->image = $r["image"];
+            }
+        }
+    }
+?>

+ 47 - 0
www/application/class/model/Project_Page.php

@@ -0,0 +1,47 @@
+<?php
+
+    require_once($path["model"] . "Page.php");
+    require_once($path["model"] . "Project.php");
+    require_once($path["helper"] . "text.php");
+
+
+    /**
+     * Project page model.
+     */
+    class Project_Page extends Page{
+
+        /**
+         * The selected {@see Project}.
+         */
+        public $project;
+
+        /**
+         * Constructor.
+         *
+         * Retrieves the data and initializes the variables.
+         *
+         * @param MySQL_connection $db Connection to the database.
+         * @param string $lang Lowercase, two-letter language code.
+         * @param string $id Project id or permalink.
+         */
+        public function __construct($db, $lang, $id){
+            global $path;
+            global $root;
+            parent:: __construct($db, $lang);
+            $this->view = $path["view"] . "project.php";
+            $this->project = new Project($this->db, $this->lang, $id);
+            $this->title = $this->project->title . " - " . text($this, "USER_NAME");
+            $this->name = text($this, "USER_NAME");
+            $this->description = $this->project->header;
+            $this->favicon = $path["img"]["layout"] . "logo/logo.svg";
+            if (strlen($this->project->logo) > 0){
+                $this->icon = $path["img"]["content"] . "project/" . $this->project->logo;
+            }
+            else{
+                $this->icon = $path["img"]["layout"] . "logo/logo.svg";
+            }
+            $this->canonical = $root . $lang . "/project/" . $this->project->permalink;
+            $this->author = $root . $lang . "/";
+        }
+    }
+?>

+ 41 - 0
www/application/class/model/Project_Tag.php

@@ -0,0 +1,41 @@
+<?php
+
+    require_once($path["model"] . "Entity.php");
+    require_once($path["helper"] . "text.php");
+
+
+    /**
+     * Tag of a project.
+     *
+     * Represents an object from the table 'project_tag'.
+     */
+    class Project_Tag extends Entity{
+
+        /**
+         * Identifier of the project the tag belongs to.
+         */
+        public $project;
+
+        /**
+         * Tag text.
+         */
+        public $tag;
+
+        /**
+         * Constructor.
+         *
+         * Searches the database and retrieves the information about the
+         * tag, populating it.
+         *
+         * @param MySQL_connection $db Connection to the database.
+         * @param string $lang Lowercase, two-letter language code.
+         * @param int $project Identifier of the project the tag belongs to.
+         * @param string $tag Tag identifier. Same as it's text.
+         */
+        public function __construct($db, $lang, $project, $tag){
+            parent::__construct($db, $lang);
+            $this->project = $project;
+            $this->tag = text($this, $tag);
+        }
+    }
+?>

+ 57 - 0
www/application/class/model/Project_Type.php

@@ -0,0 +1,57 @@
+<?php
+
+    require_once($path["model"] . "Entity.php");
+    require_once($path["helper"] . "text.php");
+
+
+    /**
+     * Type of a project.
+     *
+     * Represents an object from the table 'project_type'.
+     */
+    class Project_Type extends Entity{
+
+        /**
+         * Identifier of the project type.
+         */
+        public $id;
+
+        /**
+         * Type denomination, in the defined language.
+         */
+        public $title;
+
+        /**
+         * Type description, in the defined language.
+         */
+        public $summary;
+
+        /**
+         * Constructor.
+         *
+         * Searches the database and retrieves the information about the
+         * type, populating it.
+         *
+         * @param MySQL_connection $db Connection to the database.
+         * @param string $lang Lowercase, two-letter language code.
+         * @param string $id Identifier of the project type.
+         */
+        public function __construct($db, $lang, $id){
+            parent::__construct($db, $lang);
+            $s =
+              "SELECT " .
+              "  id, " .
+              "  title, " .
+              "  summary " .
+              "FROM project_type " .
+              "WHERE id = '$id' ;";
+            $q = mysqli_query($this->db, $s);
+            if (mysqli_num_rows($q) > 0){
+                $r = mysqli_fetch_array($q);
+                $this->id = $r["id"];
+                $this->title = text($this, $r["title"]);
+                $this->summary = text($this, $r["summary"]);
+            }
+        }
+    }
+?>

+ 64 - 0
www/application/class/model/Project_Url.php

@@ -0,0 +1,64 @@
+<?php
+
+    require_once($path["model"] . "Entity.php");
+    require_once($path["model"] . "Project_Url_Type.php");
+
+
+    /**
+     * URL related to a project.
+     *
+     * Represents an object from the table 'project_url'.
+     */
+    class Project_Url extends Entity{
+
+        /**
+         * Identifier of the url.
+         */
+        public $id;
+
+        /**
+         * Identifier of the project the URL is related to.
+         */
+        public $project;
+
+        /**
+         * URL {@see Project_Url_Type}.
+         */
+        public $type;
+
+        /**
+         * Full URL address.
+         */
+        public $url;
+
+        /**
+         * Constructor.
+         *
+         * Searches the database and retrieves the information about the
+         * url, populating it and its items.
+         *
+         * @param MySQL_connection $db Connection to the database.
+         * @param string $lang Lowercase, two-letter language code.
+         * @param int $id Identifier of the url.
+         */
+        public function __construct($db, $lang, $id){
+            parent::__construct($db, $lang);
+            $s =
+              "SELECT " .
+              "  id, " .
+              "  project, " .
+              "  type, " .
+              "  url " .
+              "FROM project_url " .
+              "WHERE id = $id ;";
+            $q = mysqli_query($this->db, $s);
+            if (mysqli_num_rows($q) > 0){
+                $r = mysqli_fetch_array($q);
+                $this->id = $r["id"];
+                $this->project = $r["project"];
+                $this->url = $r["url"];
+                $this->type = new Project_Url_Type($this->db, $this->lang, $r["type"]);
+            }
+        }
+    }
+?>

+ 65 - 0
www/application/class/model/Project_Url_Type.php

@@ -0,0 +1,65 @@
+<?php
+
+    require_once($path["model"] . "Entity.php");
+    require_once($path["helper"] . "text.php");
+
+
+    /**
+     * Type of URL.
+     *
+     * Represents an object from the table 'project_url_type'.
+     */
+    class Project_Url_Type extends Entity{
+
+        /**
+         * URL type identifier.
+         */
+        public $id;
+
+        /**
+         * URL denomination, in the defined language.
+         */
+        public $title;
+
+        /**
+         * URL short explanation, in the defined language.
+         */
+        public $summary;
+
+        /**
+         * Filename of the logo of the URL. Usually, the logo of the site it
+         * points to.
+         */
+        public $logo;
+
+        /**
+         * Constructor.
+         *
+         * Searches the database and retrieves the information about the
+         * url type, populating it and its items.
+         *
+         * @param MySQL_connection $db Connection to the database.
+         * @param string $lang Lowercase, two-letter language code.
+         * @param int $id Identifier of the url type.
+         */
+        public function __construct($db, $lang, $id){
+            parent::__construct($db, $lang);
+            $s =
+              "SELECT " .
+              "  id, " .
+              "  title, " .
+              "  summary, " .
+              "  logo " .
+              "FROM project_url_type " .
+              "WHERE id = '$id' ;";
+            $q = mysqli_query($this->db, $s);
+            if (mysqli_num_rows($q) > 0){
+                $r = mysqli_fetch_array($q);
+                $this->id = $r["id"];
+                $this->title = text($this, $r["title"]);
+                $this->summary = text($this, $r["summary"]);
+                $this->logo = $r["logo"];
+            }
+        }
+    }
+?>

+ 93 - 0
www/application/class/model/Project_Version.php

@@ -0,0 +1,93 @@
+<?php
+
+    require_once($path["model"] . "Entity.php");
+    require_once($path["model"] . "Project_Version_Type.php");
+    require_once($path["helper"] . "text.php");
+
+    /**
+     * Version of a project.
+     *
+     * Represents an object from the table 'project_version'.
+     */
+    class Project_Version extends Entity{
+
+        /**
+         * Project identifier.
+         */
+        public $project;
+
+        /**
+         * Version code, autogenerated.
+         */
+        public $code;
+
+        /**
+         * Version name or number.
+         */
+        public $name;
+
+        /**
+         * Version {@see Project_Version_Type}.
+         */
+        public $type;
+
+        /**
+         * Short text about the version, in the defined language.
+         */
+        public $summary;
+
+        /**
+         * Full changelog, in the defined language.
+         */
+        public $changelog;
+
+        /**
+         * Time the version was released at.
+         */
+        public $dtime;
+
+        /**
+         * Indictes wether the version must be visible.
+         */
+        public $visible;
+
+        /**
+         * Constructor.
+         *
+         * Searches the database and retrieves the information about the
+         * version, populating it and its items.
+         *
+         * @param MySQL_connection $db Connection to the database.
+         * @param string $lang Lowercase, two-letter language code.
+         * @param int $project Project identifier.
+         * @param int $code Version code.
+         */
+        public function __construct($db, $lang, $project, $code){
+            parent::__construct($db, $lang);
+            $s =
+              "SELECT " .
+              "  project, " .
+              "  version_code AS code, " .
+              "  version_name AS name, " .
+              "  type, " .
+              "  changelog, " .
+              "  dtime, " .
+              "  visible " .
+              "FROM project_version " .
+              "WHERE " .
+              "  project = $project AND " .
+              "  version_code = $code ;";
+            $q = mysqli_query($this->db, $s);
+            if (mysqli_num_rows($q) > 0){
+                $r = mysqli_fetch_array($q);
+                $this->project = $r["project"];
+                $this->code = $r["code"];
+                $this->name = $r["name"];
+                $this->changelog = text($this, $r["changelog"]);
+                $this->dtime = $r["dtime"];
+                $this->visible = $r["visible"];
+                $this->type = new Project_Version_Type($this->db, $this->lang, $r["type"]);
+            }
+        }
+    }
+?>

+ 64 - 0
www/application/class/model/Project_Version_Type.php

@@ -0,0 +1,64 @@
+<?php
+
+    require_once($path["model"] . "Entity.php");
+    require_once($path["helper"] . "text.php");
+
+
+    /**
+     * Type of version.
+     *
+     * Represents an object from the table 'project_version_type'.
+     */
+    class Project_Version_Type extends Entity{
+
+        /**
+         * Version type identifier.
+         */
+        public $id;
+
+        /**
+         * Version type denomination, in the defined language.
+         */
+        public $title;
+
+        /**
+         * Short version type description, in the defined language.
+         */
+        public $summary;
+
+        /**
+         * Color code, in HEX format, identifying the version type.
+         */
+        public $color;
+
+        /**
+         * Constructor.
+         *
+         * Searches the database and retrieves the information about the
+         * version type, populating it and its items.
+         *
+         * @param MySQL_connection $db Connection to the database.
+         * @param string $lang Lowercase, two-letter language code.
+         * @param int $id Identifier of the version type.
+         */
+        public function __construct($db, $lang, $id){
+            parent::__construct($db, $lang);
+            $s =
+              "SELECT " .
+              "  id, " .
+              "  title, " .
+              "  summary, " .
+              "  color " .
+              "FROM project_version_type " .
+              "WHERE id = '$id' ;";
+            $q = mysqli_query($this->db, $s);
+            if (mysqli_num_rows($q) > 0){
+                $r = mysqli_fetch_array($q);
+                $this->id = $r["id"];
+                $this->title = text($this, $r["title"]);
+                $this->summary = text($this, $r["summary"]);
+                $this->id = $r["color"];
+            }
+        }
+    }
+?>

+ 63 - 0
www/application/class/model/Projects_Page.php

@@ -0,0 +1,63 @@
+<?php
+
+    require_once($path["model"] . "Page.php");
+    require_once($path["model"] . "Project.php");
+    require_once($path["helper"] . "text.php");
+
+
+    /**
+     * Projects list page model.
+     */
+    class Projects_Page extends Page{
+
+        /**
+         * Array with the {@see Project}.
+         */
+        public $project = [];
+
+        /**
+         * Constructor.
+         *
+         * Retrieves the data and initializes the variables.
+         *
+         * @param MySQL_connection $db Connection to the database.
+         * @param string $lang Lowercase, two-letter language code.
+         * @param string $id Project id or permalink.
+         */
+        public function __construct($db, $lang){
+            global $path;
+            global $root;
+            parent:: __construct($db, $lang);
+            $this->view = $path["view"] . "projects.php";
+            $s =
+              "SELECT id " .
+              "FROM project " .
+              "WHERE " .
+              "  project.id = ( " .
+              "    SELECT project " .
+              "    FROM " .
+              "      ( " .
+              "        SELECT " .
+              "          project, " .
+              "          max(dtime) " .
+              "        FROM project_version " .
+              "        GROUP BY project " .
+              "        ORDER BY dtime DESC " .
+              "      ) lp " .
+              "    WHERE lp.project = project.id " .
+              "  ) AND " .
+              "  visible = 1;";
+            $q = mysqli_query($this->db, $s);
+            while($r = mysqli_fetch_array($q)){
+                array_push($this->project, new Project($this->db, $this->lang, $r["id"]));
+            }
+            $this->title = text($this, "PROJECT_TITLE") . " - " . text($this, "USER_NAME");
+            $this->name = text($this, "USER_NAME");
+            $this->description = text($this, "PROJECT_DESCRIPTION");
+            $this->favicon = $path["img"]["layout"] . "logo/logo.svg";
+            $this->icon = $path["img"]["layout"] . "logo/logo.svg";
+            $this->canonical = $root . $lang . "/project/";
+            $this->author = $root . $lang . "/";
+        }
+    }
+?>

+ 79 - 0
www/application/class/model/Social.php

@@ -0,0 +1,79 @@
+<?php
+
+    require_once($path["model"] . "Entity.php");
+    require_once($path["helper"] . "text.php");
+
+
+    /**
+     * Social, contains a button to a social network.
+     *
+     * Represents an object from the table 'social'.
+     */
+    class Social extends Entity{
+
+        /**
+         * Identifier.
+         */
+        public $id;
+
+        /**
+         * Indicates the order position among other social buttons.
+         */
+        public $idx;
+
+        /**
+         * Indicates wether the object must or mustn's be displayed.
+         */
+        public $visible;
+
+        /**
+         * Name of the social network.
+         */
+        public $title;
+
+        /**
+         * Icon of the social network.
+         */
+        public $icon;
+
+        /**
+         * URL to the profile in the social network.
+         */
+        public $url;
+
+        /**
+         * Constructor.
+         *
+         * Searches the database and retrieves the information about the
+         * object, populating it.
+         *
+         * @param MySQL_connection $db Connection to the database.
+         * @param string $lang Lowercase, two-letter language code.
+         * @param int $id Database identifier of the social network.
+         */
+        public function __construct($db, $lang, $id){
+            parent::__construct($db, $lang);
+            $s =
+              "SELECT " .
+              "  id, " .
+              "  idx, " .
+              "  visible, " .
+              "  title, " .
+              "  icon, " .
+              "  url " .
+              "FROM social " .
+              "WHERE " .
+              "  id = $id; ";
+            $q = mysqli_query($this->db, $s);
+            if (mysqli_num_rows($q) > 0){
+                $r = mysqli_fetch_array($q);
+                $this->id = $r["id"];
+                $this->idx = $r["idx"];
+                $this->visible = $r["visible"];
+                $this->title = text($this, $r["title"]);
+                $this->icon = $r["icon"];
+                $this->url = $r["url"];
+            }
+        }
+    }
+?>

+ 60 - 0
www/application/class/model/home.php

@@ -0,0 +1,60 @@
+<?php
+
+    class Home extends Model{
+        public $q_work;
+        public $q_project;
+
+        public function __construct(){
+        }
+
+        public function prepare(){
+            global $path;
+
+            $this->view = $path["view"] . "home.php";
+            $s_work =
+              "SELECT " .
+              "  role, " .
+              "  company, " .
+              "  city, " .
+              "  datediff(now(), start) AS days, " .
+              "  summary " .
+              "FROM cv_entry " .
+              "WHERE " .
+              "  category = 1 AND " .
+              "  visible = 1 AND " .
+              "  end IS NULL " .
+              "ORDER BY start " .
+              "DESC LIMIT 1;";
+            $this->q_work = mysqli_query($this->con, $s_work);
+
+            $s_project =
+              "SELECT " .
+              "  project.permalink, " .
+              "  project_type.title AS type, " .
+              "  project.title, " .
+              "  project.logo, " .
+              "  project.header, " .
+              "  project.text " .
+              "FROM " .
+              "  project, " .
+              "  project_type " .
+              "WHERE " .
+              "  project.type = project_type.id AND " .
+              "  project.id = ( " .
+              "    SELECT project " .
+              "    FROM " .
+              "      ( " .
+              "        SELECT " .
+              "          project, " .
+              "          max(dtime) " .
+              "        FROM project_version " .
+              "        GROUP BY project " .
+              "        ORDER BY dtime " .
+              "        DESC LIMIT 3 " .
+              "      ) lp " .
+              "    WHERE lp.project = project.id " .
+              "  ) AND " .
+              "  visible = 1;";
+              $this->q_project = mysqli_query($this->con, $s_work);
+        }
+    }

+ 7 - 0
www/application/class/model/model.php

@@ -0,0 +1,7 @@
+<?php
+    abstract class Model{
+        public $lang;
+        public $con;
+        public $view;
+    }
+?>

+ 79 - 0
www/application/class/view/cv.php

@@ -0,0 +1,79 @@
+<h3 class='section_title'><?=text($con, "PROFILE_CV", $lang);?></h3>
+<ul class='cv_download'>
+    <li>
+        <a target='_blank' href='TODO' title='<?=text($con, "USER_NAME", $lang);?> - <?=text($con, "PROFILE_CV", $lang);?>'><?=text($con, "PROFILE_DOWNLOAD_CURRENT", $lang);?></a>
+    </li>
+    <li>
+        <a href='TODO' title='<?=text($con, "PROFILE_CV_DOWNLOAD_LANG", $lang);?>'><?=text($con, "PROFILE_DOWNLOAD_OTHER", $lang);?></a>
+    </li>
+</ul>
+<?php
+$q_section = mysqli_query($con, "SELECT * FROM cv_category WHERE visible = 1 ORDER BY priority;");
+while ($r_section = mysqli_fetch_array($q_section)){
+?>
+    <div id='cv' class='cv_entry'>
+        <h4 class='cv_entry_title'><?=text($con, $r_section["title"], $lang)?></h4>
+<?php
+        if (strlen($r_section["summary"]) > 0){
+?>
+            <h5><?=text($con, $r_section["summary"], $lang)?></h5>
+<?php
+        }
+        $q_item = mysqli_query($con, "SELECT id, role, company, summary, city, start, end, year(start) AS start_y, DATE_FORMAT(start, '%m') AS start_m, year(end) AS end_y, DATE_FORMAT(end, '%m') AS end_m, date_precission FROM cv_entry WHERE category = $r_section[id] AND visible = 1 ORDER BY start DESC");
+        while ($r_item = mysqli_fetch_array($q_item)){
+            switch ($r_item["date_precission"]){
+                case "Y":
+                    if (strlen($r_item["end"]) <= 0){    // Since 2016
+                        $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_FROM_YEAR", $lang));
+                    }
+                    else{
+                        if ($r_item["start_y"] == $r_item["end_y"]){    // 2016
+                            $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_DURING_YEAR", $lang));
+                        }
+                        else{    // From 2015 until 2017
+                            $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_FROM_TO_YEAR", $lang));
+                            $str_date = str_replace("#YEAR_END#", $r_item["end_y"], $str_date);
+                        }
+                    }
+                    break;
+                case "M":
+                    if (strlen($r_item["end"]) <= 0){    // Since March 2016
+                        $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_FROM_MONTH", $lang));
+                        $str_date = str_replace("#MONTH_START#", text($con, "MONTH_" . $r_item["start_m"], $lang), $str_date);
+                    }
+                    else{
+                        if ($r_item["start_y"] == $r_item["end_y"]){
+                            if ($r_item["start_m"] == $r_item["end_m"]){    // March 2016
+                                $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_DURING_MONTH", $lang));
+                                $str_date = str_replace("#MONTH_START#", text($con, "MONTH_" . $r_item["start_m"], $lang), $str_date);
+                            }
+                            else{    // From February until March 2016
+                                $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_FROM_TO_MONTH_YEAR", $lang));
+                                $str_date = str_replace("#MONTH_START#", text($con, "MONTH_" . $r_item["start_m"], $lang), $str_date);
+                                $str_date = str_replace("#MONTH_END#", text($con, "MONTH_" . $r_item["end_m"], $lang), $str_date);
+                            }
+                        }
+                        else{
+                            // From February 2015 until March 2016
+                            $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_FROM_TO_MONTH", $lang));
+                            $str_date = str_replace("#YEAR_END#", $r_item["end_y"], $str_date);
+                            $str_date = str_replace("#MONTH_START#", text($con, "MONTH_" . $r_item["start_m"], $lang), $str_date);
+                            $str_date = str_replace("#MONTH_END#", text($con, "MONTH_" . $r_item["end_m"], $lang), $str_date);
+                        }
+                    }
+                    break;
+            } // switch ($r_item["date_precission"])
+?>
+            <div class='role'>
+                <h4><?=text($con, $r_item["role"], $lang)?></h4>
+                <h5><?=$str_date?>. <?=$r_item["company"]?> (<?=text($con, $r_item["city"], $lang)?>)</h5>
+                <p><?=text($con, $r_item["summary"], $lang)?></p>
+            </div>
+<?php
+        } // while ($r_item = mysqli_fetch_array($q_item))
+?>
+    </div> <!-- .cv_entry -->
+<?php
+}
+?>
+

+ 98 - 0
www/application/class/view/help.php

@@ -0,0 +1,98 @@
+<?php
+    session_start();
+    $http_host = $_SERVER["HTTP_HOST"];
+    $doc_root = $_SERVER["DOCUMENT_ROOT"] . "/";
+    include $doc_root . "functions.php";
+    $proto = get_protocol();
+    $con = start_db();
+    $server = $proto . $http_host;
+    $lang = select_language($con);
+    $lserver = $server . "/" . $lang;
+    $cur_section = "";
+    $cur_entry = "";
+?>
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta content='text/html; charset=utf-8' http-equiv='content-type'/>
+        <meta charset='utf-8'/>
+        <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1'/>
+        <title><?=text($con, "USER_NAME", $lang);?></title>
+        <link rel='shortcut icon' href='<?=$lserver?>/img/logo/favicon.ico'/>
+        <!-- CSS files -->
+        <style>
+<?php
+            include $doc_root . "css/ui.css";
+            include $doc_root . "css/home.css";
+?>
+        </style>
+        <!-- CSS for mobile version -->
+        <style media='(max-width : 990px)'>
+<?php
+            include $doc_root . "css/m/ui.css";
+            include $doc_root . "css/m/home.css";
+?>
+        </style>
+        <!-- Script files -->
+        <script type='text/javascript'>
+<?php
+            include $doc_root . "script/ui.js";
+?>
+        </script>
+        <!-- Meta tags -->
+        <link rel='canonical' href='<?=$lserver?>'/>
+        <link rel='author' href='<?=$lserver?>'/>
+        <link rel='publisher' href='<?=$lserver?>'/>
+        <meta name='description' content=''/>
+        <meta property='og:title' content='<?=text($con, "USER_NAME", $lang);?>'/>
+        <meta property='og:url' content='<?=$lserver?>'/>
+        <meta property='og:description' content=''/>
+        <meta property='og:image' content=''/>
+        <meta property='og:site_name' content='<?=text($con, "USER_NAME", $lang);?>'/>
+        <meta property='og:type' content='website'/>
+        <meta property='og:locale' content='<?=$lang?>'/>
+        <meta name='twitter:card' content='summary'/>
+        <meta name='twitter:title' content='<?=text($con, "USER_NAME", $lang);?>'/>
+        <meta name='twitter:description' content=''/>
+        <meta name='twitter:image' content=''/>
+        <meta name='twitter:url' content='<?=$lserver?>'/>
+        <meta name='robots' content='index follow'/>
+    </head>
+    <body>
+        <div id='body'>
+            <div id='body_row'>
+                <div id='left'>
+                    <div id='logo'>
+                        <img id='logo' src='<?=$lserver?>/img/logo/x6/inigovalentin.png' alt='<?=text($con, "USER_NAME", $lang);?>'/>
+                    </div>
+                    <div class='entry'>
+                        <img id='profile' src='<?=$lserver?>/img/profile/x6/0.png' alt='<?=text($con, "USER_NAME", $lang);?>' title='<?=text($con, "USER_NAME", $lang);?>' />
+                        <br/>
+                        <span id='tagline'><?=text($con, "USER_TAGLINE", $lang);?></span>
+                    </div> <!-- .entry -->
+                    <a class='a_button' href='<?=$lserver?>/profile/'>
+                        <span class='header_container'>
+                            <span class='header_icon_container'><img class='header_icon' alt='<?=text($con, "HEADER_ME", $lang);?>' src='<?=$lserver?>/img/icon/profile.gif'/></span>
+                            <?=text($con, "INDEX_PROFILE", $lang);?>
+                        </span>
+                    </a>
+                    <span class='link_separator desktop'></span>
+                    <a class='a_button' href='<?=$lserver?>/project/'>
+                        <span class='header_container'>
+                            <span class='header_icon_container'><img class='header_icon' alt='<?=text($con, "HEADER_PROJECTS", $lang);?>' src='<?=$lserver?>/img/icon/projects.gif'/></span>
+                            <?=text($con, "INDEX_PROJECTS", $lang);?>
+                        </span>
+                    </a>
+<?php
+                    include $doc_root . "footer.php";
+?>
+                </div> <!-- left -->
+                <div id='right'>
+                    <p>
+                        <?=text($con, "USER_BIO", $lang);?>
+                    </p>
+                </div>
+            </div> <!-- #body_row -->
+        </div> <!-- #body -->
+    </body>
+</html>

+ 111 - 0
www/application/class/view/home.php

@@ -0,0 +1,111 @@
+<!DOCTYPE html>
+<html lang='<?=$page->lang?>'>
+    <head>
+        <meta content='text/html; charset=utf-8' http-equiv='content-type'/>
+        <meta charset='utf-8'/>
+        <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1'/>
+        <title><?=$page->title?></title>
+        <link rel='shortcut icon' href='<?=$page->favicon?>'/>
+        <!-- CSS files -->
+        <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>ui.css'/>
+        <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>home.css'/>
+        <!-- Script files -->
+        <script type="text/javascript" src="<?=$path["js"]?>ui.js"></script>
+        <!-- Meta tags -->
+        <link rel='canonical' href='<?=$page->canonical?>'/>
+        <link rel='author' href='<?=$page->author?>'/>
+        <link rel='publisher' href='<?=$page->author?>'/>
+        <meta name='description' content='<?=$page->description?>'/>
+        <meta property='og:title' content='<?=$page->title?>'/>
+        <meta property='og:url' content='<?=$page->canonical?>'/>
+        <meta property='og:description' content='<?=$page->description?>'/>
+        <meta property='og:image' content='<?=$page->icon?>'/>
+        <meta property='og:site_name' content='<?=$page->name?>'/>
+        <meta property='og:type' content='website'/>
+        <meta property='og:locale' content='<?=$page->lang?>'/>
+        <meta name='twitter:card' content='summary'/>
+        <meta name='twitter:title' content='<?=$page->title?>'/>
+        <meta name='twitter:description' content='<?=$page->description?>'/>
+        <meta name='twitter:image' content='<?=$page->icon?>'/>
+        <meta name='twitter:url' content='<?=$page->canonical?>'/>
+        <meta name='robots' content='index follow'/>
+    </head>
+    <body>
+<?php
+        include __DIR__ . "/inc/header.php";
+?>
+        <div id='content'>
+            <div id='left'>
+                <div class='section'>
+                    <h3 class='section_title'>
+                        <?=$page->name?>
+                    </h3>
+                    <!-- TODO: Profile form model -->
+                    <div class='entry'>
+                        <div id='profile_container'>
+                            <img id='profile' src='<?=$path["img"]["content"]?>profile/x6/0.png' alt='<?=text($page, "USER_NAME");?>' title='<?=text($page, "USER_NAME");?>' />
+                        </div>
+                        <span id='tagline'><?=text($page, "USER_TAGLINE");?></span>
+                        <a class='a_button' href='<?=$root?>profile/'>
+                            <span class='header_container'>
+                                <span class='header_icon_container'>
+                                    <img class='header_icon' alt='<?=text($page, "HEADER_ME");?>' src='<?=$path["img"]["content"]?>icon/profile.gif'/>
+                                </span>
+                                <?=text($page, "INDEX_PROFILE");?>
+                            </span>
+                        </a>
+                    </div> <!-- .entry -->
+                </div> <!-- .section -->
+            </div> <!-- left -->
+            <div id='right'>
+                <div class='section'>
+                    <h3 class='section_title'>
+                        <?=text($page, "INDEX_PROJECTS");?>
+                    </h3>
+<?php
+                    foreach ($page->project as $project){
+?>
+                        <div class='entry'>
+                            <table>
+                                <tr>
+<?php
+                                    if (strlen($project->logo) > 0){
+?>
+                                        <td>
+                                            <a href='<?=$root?>project/<?=$project->permalink?>'>
+                                                <img alt='<?=text($page, $project->title)?>' title='<?=text($page, $project->title)?>' src='<?=$path["img"]["content"]?>project/x2/<?=$project->logo?>'/>
+                                            </a>
+                                        </td>
+<?php
+                                    }
+?>
+                                    <td>
+                                        <a href='<?=$root?>project/<?=$project->permalink?>'>
+                                            <h4 class='project_name'><?=$project->title?></h4>
+                                        </a>
+                                        <span>
+                                            <?=$project->header?>
+                                        </span>
+                                    </td>
+                                </tr>
+                            </table>
+                        </div> <!-- .entry -->
+<?php
+                    }
+?>
+                    <a class='a_button' href='<?=$root?>project/'>
+                        <span class='header_container'>
+                            <span class='header_icon_container'>
+                                <img class='header_icon' alt='<?=text($page, "HEADER_PROJECTS");?>' src='<?=$path["img"]["layout"]?>icon/projects.gif'/>
+                            </span>
+                            <?=text($page, "INDEX_PROJECTS");?>
+                        </span>
+                    </a>
+                </div> <!-- .section -->
+            </div> <!-- #right -->
+        </div> <!-- #content -->
+<?php
+        include __DIR__ . "/inc/footer.php";
+?>
+    </body>
+</html>

+ 45 - 0
www/application/class/view/inc/footer.php

@@ -0,0 +1,45 @@
+<div id='footer'>
+    <hr id='footer_separator'/>
+    <br/>
+    <table id='footer_table'>
+        <tr>
+            <td id='footer_left'>
+                <span id='footer_follow' class='desktop'>
+                    <?=text($page, "FOOTER_FOLLOW");?>
+                </span>
+<?php
+                foreach ($page->footer->social as $social){
+?>
+                    <a title='<?=text($page, $social->title)?>' href='<?=$social->url?>'>
+                        <img class='footer_social_icon' src='<?=$path["img"]["content"]?>social/x2/<?=$social->icon?>' alt='<?=text($page, $social->title)?>' title='<?=text($page, $social->title)?>'/>
+                    </a>
+<?php
+                }
+?>
+            </td>
+            <td id='footer_center'>
+                <?=str_replace("#YEAR#", date("Y"), text($page, "FOOTER_COPY"));?>
+            </td>
+            <td id='footer_right'>
+                <a id='footer_help' href='<?=$root?>help/'>
+                    <?=text($page, "FOOTER_HELP");?>
+                </a>
+                <br/><br/>
+<?php
+                foreach ($page->footer->lang as $lang){
+                    $uri = $_SERVER["REQUEST_URI"];
+                    if (substr($uri, 3, 1) == '/'){
+                        $uri = substr($uri, 3);
+                    }
+                    $dest = $root . $lang->code . $uri;
+?>
+                    <a class='lang' href='<?=$dest?>'>
+                        <img src='<?=$path["img"]["layout"]?>lang/<?=$lang->code?>.svg' alt='<?=$lang->name?>' title='<?=$lang->name?>'/>
+                    </a>
+<?php
+                }
+?>
+            </td>
+        </tr>
+    </table>
+</div>

+ 19 - 0
www/application/class/view/inc/header.php

@@ -0,0 +1,19 @@
+<div id='header'>
+    <div id='logo'>
+        inigoValentin
+    </div>
+    <nav>
+        <a href='<?=$root?>'>
+            <img src='<?=$path["img"]["layout"]?>icon/home.svg'/>
+            <?=text($page, "SECTION_HOME")?>
+        </a>
+        <a href='<?=$root?>me'/>
+            <img src='<?=$path["img"]["layout"]?>icon/profile.svg'/>
+            <?=text($page, "SECTION_ME")?>
+        </a>
+        <a href='<?=$root?>project/'>
+            <img src='<?=$path["img"]["layout"]?>icon/project.svg'/>
+            <?=text($page, "SECTION_PROJECTS")?>
+        </a>
+    </nav>
+</div>

+ 100 - 0
www/application/class/view/profile.php

@@ -0,0 +1,100 @@
+<?php
+    session_start();
+    $http_host = $_SERVER["HTTP_HOST"];
+    $doc_root = $_SERVER["DOCUMENT_ROOT"] . "/";
+    include $doc_root . "functions.php";
+    $proto = get_protocol();
+    $con = start_db();
+    $server = $proto . $http_host;
+    $lang = select_language($con);
+    $lserver = $server . "/" . $lang;
+    $cur_section = "me";
+    $cur_entry = "";
+?>
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta content='text/html; charset=utf-8' http-equiv='content-type'/>
+        <meta charset='utf-8'/>
+        <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1'/>
+        <title><?=text($con, "PROFILE_TITLE", $lang)?> - <?=text($con, "USER_NAME", $lang);?></title>
+        <link rel='shortcut icon' href='<?=$lserver?>/img/logo/x2/favicon.ico'/>
+        <!-- CSS files -->
+        <style>
+<?php
+            include $doc_root . "css/ui.css";
+            include $doc_root . "css/profile.css";
+?>
+        </style>
+        <!-- CSS for mobile version -->
+        <style media='(max-width : 990px)'>
+<?php
+            include $doc_root . "css/m/ui.css";
+            include $doc_root . "css/m/profile.css";
+?>
+        </style>
+        <!-- Script files -->
+        <script type='text/javascript'>
+<?php
+            include $doc_root . "script/ui.js";
+            include $doc_root . "script/me.js";
+?>
+        </script>
+        <!-- Meta tags -->
+        <link rel='canonical' href='<?=$lserver?>/me/'/>
+        <link rel='author' href='<?=$lserver?>'/>
+        <link rel='publisher' href='<?=$lserver?>'/>
+        <meta name='description' content='<?=text($con, "PROFILE_DESCRIPTION", $lang)?>'/>
+        <meta property='og:title' content='<?=text($con, "PROFILE_TITLE", $lang)?> - <?=text($con, "USER_NAME", $lang);?>'/>
+        <meta property='og:url' content='<?=$lserver?>/me'/>
+        <meta property='og:description' content='<?=text($con, "PROFILE_DESCRIPTION", $lang)?>'/>
+        <meta property='og:image' content='<?=$lserver?>/img/logo/x3/favicon.ico'/>
+        <meta property='og:site_name' content='<?=text($con, "USER_NAME", $lang);?>'/>
+        <meta property='og:type' content='website'/>
+        <meta property='og:locale' content='<?=$lang?>'/>
+        <meta name='twitter:card' content='summary'/>
+        <meta name='twitter:title' content='<?=text($con, "PROFILE_TITLE", $lang)?> - <?=text($con, "USER_NAME", $lang);?>'/>
+        <meta name='twitter:description' content='<?=text($con, "PROFILE_DESCRIPTION", $lang)?>'/>
+        <meta name='twitter:image' content='<?=$lserver?>/img/logo/x3/favicon.ico'/>
+        <meta name='twitter:url' content='<?=$lserver?>'/>
+        <meta name='robots' content='index follow'/>
+    </head>
+    <body>
+        <div id='body'>
+            <div id='body_row'>
+                <div id='left'>
+                    <div id='logo'>
+                        <img id='logo' src='<?=$lserver?>/img/logo/x6/inigovalentin.png' alt='<?=text($con, "USER_NAME", $lang);?>'/>
+                    </div>
+                    <a class='profile_button a_button' href='<?=$lserver?>/profile/'>
+                        <span class='header_container'>
+                            <span class='header_icon_container'><img class='header_icon' alt='<?=text($con, "PROFILE_CV", $lang);?>' src='<?=$lserver?>/img/icon/profile.gif'/></span>
+                            <?=text($con, "PROFILE_CV", $lang);?>
+                        </span>
+                    </a>
+                    <br/>
+                    <a class='profile_button a_button' href='<?=$lserver?>/project/'>
+                        <span class='header_container'>
+                            <span class='header_icon_container'><img class='header_icon' alt='<?=text($con, "PROFILE_SKILLS", $lang);?>' src='<?=$lserver?>/img/icon/project.gif'/></span>
+                            <?=text($con, "PROFILE_SKILLS", $lang);?>
+                        </span>
+                    </a>
+<?php
+                    include $doc_root . "footer.php";
+                    stats($con, $cur_section, $cur_entry);
+?>
+                </div> <!-- #left -->
+                <div id='right'>
+<?php
+                    if ($_GET['section'] == 'skills'){
+                        include "skills.php";
+                    }
+                    else{
+                        include "cv.php";
+                    }
+?>
+                </div> <!-- #right -->
+            </div> <!-- #body_row -->
+        </div> <!-- #body -->
+    </body>
+</html>

+ 129 - 0
www/application/class/view/project.php

@@ -0,0 +1,129 @@
+<!DOCTYPE html>
+<html lang='<?=$page->lang?>'>
+    <head>
+        <meta content='text/html; charset=utf-8' http-equiv='content-type'/>
+        <meta charset='utf-8'/>
+        <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1'/>
+        <title><?=$page->title?></title>
+        <link rel='shortcut icon' href='<?=$page->favicon?>'/>
+        <!-- CSS files -->
+        <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>ui.css'/>
+        <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>project.css'/>
+        <!-- Script files -->
+        <script type="text/javascript" src="<?=$path["js"]?>ui.js"></script>
+        <!-- Meta tags -->
+        <link rel='canonical' href='<?=$page->canonical?>'/>
+        <link rel='author' href='<?=$page->author?>'/>
+        <link rel='publisher' href='<?=$page->author?>'/>
+        <meta name='description' content='<?=$page->description?>'/>
+        <meta property='og:title' content='<?=$page->title?>'/>
+        <meta property='og:url' content='<?=$page->canonical?>'/>
+        <meta property='og:description' content='<?=$page->description?>'/>
+        <meta property='og:image' content='<?=$page->icon?>'/>
+        <meta property='og:site_name' content='<?=$page->name?>'/>
+        <meta property='og:type' content='website'/>
+        <meta property='og:locale' content='<?=$page->lang?>'/>
+        <meta name='twitter:card' content='summary'/>
+        <meta name='twitter:title' content='<?=$page->title?>'/>
+        <meta name='twitter:description' content='<?=$page->description?>'/>
+        <meta name='twitter:image' content='<?=$page->icon?>'/>
+        <meta name='twitter:url' content='<?=$page->canonical?>'/>
+        <meta name='robots' content='index follow'/>
+    </head>
+    <body>
+<?php
+        include __DIR__ . "/inc/header.php";
+?>
+        <div id='content'>
+            <div id='info' class='section'>
+                <h3 class='section_title'>
+                    <?=$page->project->title?>
+                </h3>
+                <h4 id='summary'>
+                    <?=$page->project->header?>
+                </h4>
+                <p id='text'>
+<?php
+                    if (strlen($page->project->logo) > 0){
+?>
+                        <img id='logo' src='<?=$path["img"]["content"]?>project/<?=$page->project->logo?>' title='<?=$page->project->title?>' alt='<?=$page->project->title?>'/>
+<?php
+                    }
+?>
+                    <?=$page->project->text?>
+                </p>
+<?php
+                if (sizeof($page->project->image) > 0){
+?>
+                    <div id='image_reel'>
+                        <table>
+                            <tr>
+<?php
+                                foreach($page->project->image as $image){
+?>
+                                    <td>
+                                        <img title='<?=$page->project->title?>' alt='<?=$page->project->title?>' src='<?=$path["img"]["content"]?>project/<?=$image->image?>'/>
+                                    </td>
+<?php
+                                }
+?>
+                            </tr>
+                        </table>
+                    </div> <!-- #image_reel -->
+<?php
+                }
+?>
+            </div> <!-- #info -->
+            <div id='details' class='section'>
+                <h3 class='section_title'>
+                    <?=text($page, "PROJECT_INFO")?>
+                </h3>
+                <div id='tags' class='details'>
+<?php
+                    $str_tag = "";
+                    foreach($page->project->tag as $tag){
+                        $str_tag = $str_tag . "<a class='tag' href='TODO' title='" . $tag->tag . "'>" . $tag->tag . "</a>, ";
+                    }
+                    $str_tag = rtrim($str_tag, ", ");
+?>
+                    <?=text($page, "PROJECT_TAGS")?>: <?=$str_tag?>
+                    <hr class='details_separator'/>
+                </div> <!-- #tags -->
+<?php
+                if (sizeof($page->project->url) > 0){
+?>
+                    <div id='links' class='details'>
+<?php
+                        foreach($page->project->url as $url){
+?>
+                            <td>
+                                <a class='link' href='<?=$url->url?>'>
+                                    <img class='link' title='<?=$url->type->title?>' alt='<?=$url->type->title?>' src='<?=$path["img"]["content"]?>url/<?=$url->type->logo?>'/>
+                                    <?=$url->type->title?>
+                                </a>
+                            </td>
+<?php
+                        }
+?>
+                        <hr class='details_separator'/>
+                    </div> <!-- #links -->
+<?php
+                }
+?>
+                <div id='version' class='details'>
+                    <?=text($page, "PROJECT_VERSION")?>:<?=$page->project->version[0]->name?>
+                    <br/>
+                    <a href='TODO'><?=text($page, "PROJECT_VERSION_TREE")?></a>
+                    <hr class='details_separator'/>
+                </div> <!-- #license -->
+                <div id='license' class='details'>
+                    <?=text($page, "PROJECT_LICENSE")?>:
+                    <img src='<?=$path["img"]["content"]?>license/<?=$page->project->license->logo?>' title='<?=$page->project->license->id?>' alt='<?=$page->license->id?>'/>
+                </div> <!-- #license -->
+            </div> <!-- #details -->
+        </div> <!-- .content -->
+<?php
+        include __DIR__ . "/inc/footer.php";
+?>
+    </body>
+</html>

+ 80 - 0
www/application/class/view/projects.php

@@ -0,0 +1,80 @@
+<!DOCTYPE html>
+<html lang='<?=$page->lang?>'>
+    <head>
+        <meta content='text/html; charset=utf-8' http-equiv='content-type'/>
+        <meta charset='utf-8'/>
+        <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1'/>
+        <title><?=$page->title?></title>
+        <link rel='shortcut icon' href='<?=$page->favicon?>'/>
+        <!-- CSS files -->
+        <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>ui.css'/>
+        <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>projects.css'/>
+        <!-- Script files -->
+        <script type="text/javascript" src="<?=$path["js"]?>ui.js"></script>
+        <!-- Meta tags -->
+        <link rel='canonical' href='<?=$page->canonical?>'/>
+        <link rel='author' href='<?=$page->author?>'/>
+        <link rel='publisher' href='<?=$page->author?>'/>
+        <meta name='description' content='<?=$page->description?>'/>
+        <meta property='og:title' content='<?=$page->title?>'/>
+        <meta property='og:url' content='<?=$page->canonical?>'/>
+        <meta property='og:description' content='<?=$page->description?>'/>
+        <meta property='og:image' content='<?=$page->icon?>'/>
+        <meta property='og:site_name' content='<?=$page->name?>'/>
+        <meta property='og:type' content='website'/>
+        <meta property='og:locale' content='<?=$page->lang?>'/>
+        <meta name='twitter:card' content='summary'/>
+        <meta name='twitter:title' content='<?=$page->title?>'/>
+        <meta name='twitter:description' content='<?=$page->description?>'/>
+        <meta name='twitter:image' content='<?=$page->icon?>'/>
+        <meta name='twitter:url' content='<?=$page->canonical?>'/>
+        <meta name='robots' content='index follow'/>
+    </head>
+    <body>
+<?php
+        include __DIR__ . "/inc/header.php";
+?>
+        <div id='content'>
+            <div class='section'>
+                <h3 class='section_title'><?=$page->title?></h3>
+                <!-- TODO: Search and sorting -->
+                <div id='project_list'>
+<?php
+                    foreach ($page->project as $project){
+?>
+                        <div class='entry project'>
+                            <table>
+                                <tr>
+<?php
+                                    if (strlen($project->logo) > 0){
+?>
+                                        <td>
+                                            <a href='<?=$root?>project/<?=$project->permalink?>'>
+                                                <img class='project_logo' alt='<?=$project->title?>' title='<?=$project->title?>' src='<?=$path["img"]["content"]?>project/<?=$project->logo?>'/>
+                                            </a>
+                                        </td>
+<?php
+                                    }
+?>
+                                    <td>
+                                        <a href='<?=$root?>project/<?=$project->permalink?>'>
+                                            <h4 class='project_name'><?=$project->title?></h4>
+                                        </a>
+                                        <span>
+                                            <?=$project->header?>
+                                        </span>
+                                    </td>
+                                </tr>
+                            </table>
+                        </div> <!-- .entry -->
+<?php
+                    }
+?>
+                </div> <!-- #project_list -->
+            </div> <!-- .section -->
+        </div> <!-- .content -->
+<?php
+        include __DIR__ . "/inc/footer.php";
+?>
+    </body>
+</html>

+ 62 - 0
www/application/class/view/rss.php

@@ -0,0 +1,62 @@
+<?php
+    header('Content-type: application/xml');
+    session_start();
+    $http_host = $_SERVER["HTTP_HOST"];
+    $doc_root = $_SERVER["DOCUMENT_ROOT"] . "/";
+    include $doc_root . "functions.php";
+    $proto = get_protocol();
+    $con = start_db();
+    $server = $proto . $http_host;
+    $lang = select_language($con);
+    $lserver = $server . "/" . $lang;
+    $cur_section = "";
+    $cur_entry = "";
+    ob_clean();
+    echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+?>
+<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
+    <channel>
+        <title>Iñigo Valentin</title>
+        <link><?=$lserver?></link>
+        <atom:link href="<?=$lserver?>/rss.xml" rel="self" type="application/rss+xml" />
+        <description>TODO 3D art</description>
+        <category>TODO cgi</category>
+        <image>
+            <url><?=$lserver?>/img/logo/cover.png</url>
+            <title>Iñigo Valentin</title>
+            <link><?=$lserver?></link>
+            <width>140</width>
+            <height>140</height>
+        </image>
+        <language><?=$lang?></language>
+<?php
+            $res_date = mysqli_query($con, "(SELECT DATE_FORMAT(dtime, '%a, %d %b %Y %H:%i:%s +0100') AS cdate FROM project_version) UNION (SELECT DATE_FORMAT(dtime, '%a, %d %b %Y %H:%i:%s +0100') AS cdate FROM post) ORDER BY cdate DESC LIMIT 1;");
+            $row_date = mysqli_fetch_array($res_date);
+?>
+            <pubDate><?=$row_date["cdate"]?></pubDate>
+<?php
+            $res = mysqli_query($con, "SELECT id, permalink, dtime, DATE_FORMAT(dtime, '%a, %d %b %Y %H:%i:%s +0100') AS cdate, title, text, logo AS image FROM project, project_version WHERE project = project.id  ORDER BY dtime DESC;");
+            while ($row = mysqli_fetch_array($res)){
+?>
+                <item>
+                    <title><?=text($con, $row["title"], $lang)?></title>
+                    <category><?=text($con, $row["type"], $lang)?></category>
+<?php
+                    $text = html_entity_decode(text($con, $row["text"], $lang));
+?>
+                    <description>
+                        <![CDATA[
+                            <img src='<?=$lserver?>/img/project/x5/<?=$row["image"]?>' height='160' width='160' />
+                            <?=$text?>
+                        ]]>
+                    </description>
+                    <link><?=$lserver?>/project/<?=$row["permalink"]?></link>
+                    <guid><?=$lserver?>/project/<?=$row["permalink"]?></guid>
+                    <pubDate><?=$row["cdate"]?></pubDate>
+                </item>
+<?php
+            }
+            mysqli_close($con);
+?>
+    </channel>
+</rss>

+ 80 - 0
www/application/class/view/skills.php

@@ -0,0 +1,80 @@
+<div class='section'>
+    <h3 class='section_title'><?=text($con, "PROFILE_CV", $lang);?></h3>
+    <ul class='cv_download'>
+        <li>
+            <a target='_blank' href='TODO' title='<?=text($con, "USER_NAME", $lang);?> - <?=text($con, "PROFILE_CV", $lang);?>'><?=text($con, "PROFILE_DOWNLOAD_CURRENT", $lang);?></a>
+        </li>
+        <li>
+            <a href='TODO' title='<?=text($con, "PROFILE_CV_DOWNLOAD_LANG", $lang);?>'><?=text($con, "PROFILE_DOWNLOAD_OTHER", $lang);?></a>
+        </li>
+    </ul>
+<?php
+    $q_section = mysqli_query($con, "SELECT * FROM cv_category WHERE visible = 1 ORDER BY priority;");
+    while ($r_section = mysqli_fetch_array($q_section)){
+?>
+        <div id='cv' class='entry cv_entry'>
+            <h4 class='cv_entry_title'><?=text($con, $r_section["title"], $lang)?></h4>
+<?php
+            if (strlen($r_section["summary"]) > 0){
+?>
+                <h5><?=text($con, $r_section["summary"], $lang)?></h5>
+<?php
+            }
+            $q_item = mysqli_query($con, "SELECT id, role, company, summary, city, start, end, year(start) AS start_y, DATE_FORMAT(start, '%m') AS start_m, year(end) AS end_y, DATE_FORMAT(end, '%m') AS end_m, date_precission FROM cv_entry WHERE category = $r_section[id] AND visible = 1 ORDER BY start DESC");
+            while ($r_item = mysqli_fetch_array($q_item)){
+                switch ($r_item["date_precission"]){
+                    case "Y":
+                        if (strlen($r_item["end"]) <= 0){    // Since 2016
+                            $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_FROM_YEAR", $lang));
+                        }
+                        else{
+                            if ($r_item["start_y"] == $r_item["end_y"]){    // 2016
+                                $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_DURING_YEAR", $lang));
+                            }
+                            else{    // From 2015 until 2017
+                                $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_FROM_TO_YEAR", $lang));
+                                $str_date = str_replace("#YEAR_END#", $r_item["end_y"], $str_date);
+                            }
+                        }
+                        break;
+                    case "M":
+                        if (strlen($r_item["end"]) <= 0){    // Since March 2016
+                            $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_FROM_MONTH", $lang));
+                            $str_date = str_replace("#MONTH_START#", text($con, "MONTH_" . $r_item["start_m"], $lang), $str_date);
+                        }
+                        else{
+                            if ($r_item["start_y"] == $r_item["end_y"]){
+                                if ($r_item["start_m"] == $r_item["end_m"]){    // March 2016
+                                    $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_DURING_MONTH", $lang));
+                                    $str_date = str_replace("#MONTH_START#", text($con, "MONTH_" . $r_item["start_m"], $lang), $str_date);
+                                }
+                                else{    // From February until March 2016
+                                    $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_FROM_TO_MONTH_YEAR", $lang));
+                                    $str_date = str_replace("#MONTH_START#", text($con, "MONTH_" . $r_item["start_m"], $lang), $str_date);
+                                    $str_date = str_replace("#MONTH_END#", text($con, "MONTH_" . $r_item["end_m"], $lang), $str_date);
+                                }
+                            }
+                            else{
+                                // From February 2015 until March 2016
+                                $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_FROM_TO_MONTH", $lang));
+                                $str_date = str_replace("#YEAR_END#", $r_item["end_y"], $str_date);
+                                $str_date = str_replace("#MONTH_START#", text($con, "MONTH_" . $r_item["start_m"], $lang), $str_date);
+                                $str_date = str_replace("#MONTH_END#", text($con, "MONTH_" . $r_item["end_m"], $lang), $str_date);
+                            }
+                        }
+                        break;
+                } // switch ($r_item["date_precission"])
+?>
+                <div class='role'>
+                    <h4><?=text($con, $r_item["role"], $lang)?></h4>
+                    <h5><?=$str_date?>. <?=$r_item["company"]?> (<?=text($con, $r_item["city"], $lang)?>)</h5>
+                    <p><?=text($con, $r_item["summary"], $lang)?></p>
+                </div>
+<?php
+            } // while ($r_item = mysqli_fetch_array($q_item))
+?>
+        </div>
+<?php
+    }
+?>
+</div> <!-- .section -->

+ 49 - 0
www/application/class/view/string/LICENSE_CC-BY-SA_SUMMARY__EN

@@ -0,0 +1,49 @@
+<div style="text-align: left">
+    <div>
+        <h3 style="text-align: center">You are free to:</h3>
+        <ul>
+            <li><strong>Share</strong> — copy and redistribute the material in any medium or format</li>
+            <li resource="http://creativecommons.org/ns#DerivativeWorks"><strong>Adapt</strong> — remix, transform, and build upon the material for any purpose, even commercially.</li>
+        </ul>
+    </div>
+    <div>
+        <img src="/img/license/freeculturalworks.jpg" style="border: 0" alt="This license is acceptable for Free Cultural Works."/>
+    </div>
+</div>
+<div>
+    <ul style="text-align: center">
+        <li>The licensor cannot revoke these freedoms as long as you follow the license terms.</li>
+    </ul>
+</div>
+<div>
+    <div>
+        <hr>
+    </div>
+</div>
+<div>
+    <h3 style="text-align: center">Under the following terms:</h3>
+    <ul style="text-align: left">
+        <li>
+            <p><strong>Attribution</strong> — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.</p>
+            <p style="display:none;"><strong>Attribute this work:</strong><br><img src="/images/information.png"></p>
+        </li>
+        <li><p><strong>ShareAlike</strong> — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.</p></li>
+    </ul>
+</div>
+<div>
+    <ul>
+        <li><strong>No additional restrictions</strong> — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.</li>
+    </ul>
+</div>
+<div>
+    <div class="col-md-offset-1 col-md-10">
+        <hr>
+    </div>
+</div>
+<div>
+    <h3 style="text-align: center">Notices:</h3>
+    <ul>
+        <li>You do not have to comply with the license for elements of the material in the public domain or where your use is permitted by an applicable exception or limitation.</li>
+        <li>No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material.</li>
+    </ul>
+</div>

+ 49 - 0
www/application/class/view/string/LICENSE_CC-BY-SA_SUMMARY__ES

@@ -0,0 +1,49 @@
+<div style="text-align: left">
+    <div>
+        <h3 style="text-align: center">You are free to:</h3>
+        <ul>
+            <li><strong>Share</strong> — copy and redistribute the material in any medium or format</li>
+            <li resource="http://creativecommons.org/ns#DerivativeWorks"><strong>Adapt</strong> — remix, transform, and build upon the material for any purpose, even commercially.</li>
+        </ul>
+    </div>
+    <div>
+        <img src="/img/license/freeculturalworks.jpg" style="border: 0" alt="This license is acceptable for Free Cultural Works."/>
+    </div>
+</div>
+<div>
+    <ul style="text-align: center">
+        <li>The licensor cannot revoke these freedoms as long as you follow the license terms.</li>
+    </ul>
+</div>
+<div>
+    <div>
+        <hr>
+    </div>
+</div>
+<div>
+    <h3 style="text-align: center">Under the following terms:</h3>
+    <ul style="text-align: left">
+        <li>
+            <p><strong>Attribution</strong> — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.</p>
+            <p style="display:none;"><strong>Attribute this work:</strong><br><img src="/images/information.png"></p>
+        </li>
+        <li><p><strong>ShareAlike</strong> — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.</p></li>
+    </ul>
+</div>
+<div>
+    <ul>
+        <li><strong>No additional restrictions</strong> — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.</li>
+    </ul>
+</div>
+<div>
+    <div class="col-md-offset-1 col-md-10">
+        <hr>
+    </div>
+</div>
+<div>
+    <h3 style="text-align: center">Notices:</h3>
+    <ul>
+        <li>You do not have to comply with the license for elements of the material in the public domain or where your use is permitted by an applicable exception or limitation.</li>
+        <li>No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material.</li>
+    </ul>
+</div>

+ 49 - 0
www/application/class/view/string/LICENSE_CC-BY-SA_SUMMARY__EU

@@ -0,0 +1,49 @@
+<div style="text-align: left">
+    <div>
+        <h3 style="text-align: center">You are free to:</h3>
+        <ul>
+            <li><strong>Share</strong> — copy and redistribute the material in any medium or format</li>
+            <li resource="http://creativecommons.org/ns#DerivativeWorks"><strong>Adapt</strong> — remix, transform, and build upon the material for any purpose, even commercially.</li>
+        </ul>
+    </div>
+    <div>
+        <img src="/img/license/freeculturalworks.jpg" style="border: 0" alt="This license is acceptable for Free Cultural Works."/>
+    </div>
+</div>
+<div>
+    <ul style="text-align: center">
+        <li>The licensor cannot revoke these freedoms as long as you follow the license terms.</li>
+    </ul>
+</div>
+<div>
+    <div>
+        <hr>
+    </div>
+</div>
+<div>
+    <h3 style="text-align: center">Under the following terms:</h3>
+    <ul style="text-align: left">
+        <li>
+            <p><strong>Attribution</strong> — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.</p>
+            <p style="display:none;"><strong>Attribute this work:</strong><br><img src="/images/information.png"></p>
+        </li>
+        <li><p><strong>ShareAlike</strong> — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.</p></li>
+    </ul>
+</div>
+<div>
+    <ul>
+        <li><strong>No additional restrictions</strong> — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.</li>
+    </ul>
+</div>
+<div>
+    <div class="col-md-offset-1 col-md-10">
+        <hr>
+    </div>
+</div>
+<div>
+    <h3 style="text-align: center">Notices:</h3>
+    <ul>
+        <li>You do not have to comply with the license for elements of the material in the public domain or where your use is permitted by an applicable exception or limitation.</li>
+        <li>No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material.</li>
+    </ul>
+</div>

+ 128 - 0
www/application/class/view/string/LICENSE_CC-BY-SA__EN

@@ -0,0 +1,128 @@
+<h3>Creative Commons Attribution-ShareAlike 4.0 International Public License</h3>
+<p>By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.</p>
+<p><strong>Section 1 – Definitions.</strong></p>
+<ol>
+    <li><strong>Adapted Material</strong> means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.</li>
+    <li><strong>Adapter&#39;s License</strong> means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.</li>
+    <li><strong>BY-SA Compatible License</strong> means a license listed at <a href="//creativecommons.org/compatiblelicenses"> creativecommons.org/compatiblelicenses</a>, approved by Creative Commons as essentially the equivalent of this Public License.</li>
+    <li><strong>Copyright and Similar Rights</strong> means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.</li>
+    <li><strong>Effective Technological Measures</strong> means those measures that, in the absence of proper authority, may notbe circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similarinternational agreements.</li>
+    <li><strong>Exceptions and Limitations</strong> means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.</li>
+    <li><strong>License Elements</strong> means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution and ShareAlike.</li>
+    <li><strong>Licensed Material</strong> means the artistic or literary work, database, or other material to which the Licensor applied this Public License.</li>
+    <li><strong>Licensed Rights</strong> means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.</li>
+    <li><strong>Licensor</strong> means the individual(s) or entity(ies) granting rights under this Public License.</li>
+    <li><strong>Share</strong> means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.</li>
+    <li><strong>Sui Generis Database Rights</strong> means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.</li>
+    <li><strong>You</strong> means the individual or entity exercising the Licensed Rights under this Public License. <strong>Your</strong> has a corresponding meaning.</li>
+</ol>
+<p><strong>Section 2 – Scope.</strong></p>
+<ol>
+    <li>
+        <strong>License grant</strong>.
+        <ol>
+            <li>Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
+                <ol>
+                    <li>reproduce and Share the Licensed Material, in whole or in part; and</li>
+                    <li>produce, reproduce, and Share Adapted Material.</li>
+                </ol>
+            </li>
+            <li><span style="text-decoration: underline;">Exceptions and Limitations</span>. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.</li>
+            <li><span style="text-decoration: underline;">Term</span>. The term of this Public License is specified in Section 6(a).</li>
+            <li><span style="text-decoration: underline;">Media and formats; technical modifications allowed</span>. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.</li>
+            <li>
+                <span style="text-decoration: underline;">Downstream recipients</span>.
+                <div>
+                    <ol>
+                        <li><span style="text-decoration: underline;">Offer from the Licensor – Licensed Material</span>. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.</li>
+                        <li><span style="text-decoration: underline;">Additional offer from the Licensor – Adapted Material</span>. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter&#39;s License You apply.</li>
+                        <li><span style="text-decoration: underline;">No downstream restrictions</span>. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.</li>
+                    </ol>
+                </div>
+            </li>
+            <li><span style="text-decoration: underline;">No endorsement</span>. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).</li>
+        </ol>
+    </li>
+    <li>
+        <p><strong>Other rights</strong>.</p>
+        <ol>
+            <li>Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.</li>
+            <li>Patent and trademark rights are not licensed under this Public License.</li>
+            <li>To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties.</li>
+        </ol>
+    </li>
+</ol>
+<p><strong>Section 3 – License Conditions.</strong></p><p>Your exercise of the Licensed Rights is expressly made subject to the following conditions.</p>
+<ol>
+    <li>
+        <p><strong>Attribution</strong>.</p>
+        <ol>
+            <li><p>If You Share the Licensed Material (including in modified form), You must:</p>
+                <ol>
+                    <li>retain the following if it is supplied by the Licensor with the Licensed Material:
+                        <ol>
+                            <li>identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);</li>
+                            <li>a copyright notice;</li>
+                            <li>a notice that refers to this Public License; </li>
+                            <li>a notice that refers to the disclaimer of warranties;</li>
+                            <li>a URI or hyperlink to the Licensed Material to the extent reasonably practicable;</li>
+                        </ol>
+                    </li>
+                    <li>indicate if You modified the Licensed Material and retain an indication of any previous modifications; and</li>
+                    <li>indicate the Licensed Material is licensed under this Public License,and include the text of, or the URI or hyperlink to, this PublicLicense.</li>
+                </ol>
+            </li>
+            <li>You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.</li>
+            <li>If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.</li>
+        </ol>
+    </li>
+    <li><strong>ShareAlike</strong>.
+        <p>In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply.</p>
+        <ol>
+            <li>The Adapter&#39;s License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-SA Compatible License.</li>
+            <li>You must include the text of, or the URI or hyperlink to, the Adapter&#39;s License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material.</li>
+            <li>You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter&#39;s License You apply.</li>
+        </ol>
+    </li>
+</ol>
+<p><strong>Section 4 – Sui Generis Database Rights.</strong></p>
+<p>Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:</p>
+<ol>
+    <li>for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database;</li>
+    <li>if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and</li>
+    <li>You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.</li>
+</ol>For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
+<p><strong>Section 5 – Disclaimer of Warranties and Limitation of Liability.</strong></p>
+<ol style="font-weight: bold;">
+    <li><strong>Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.</strong></li>
+    <li><strong>To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.</strong></li>
+</ol>
+<ol start="3">
+    <li>The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.</li>
+</ol>
+<p><strong>Section 6 – Term and Termination.</strong></p>
+<ol>
+    <li>This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.</li>
+    <li>
+        <p>Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:</p>
+        <ol>
+            <li>automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or</li>
+            <li>upon express reinstatement by the Licensor.</li>
+        </ol>
+        For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
+    </li>
+    <li>For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.</li>
+    <li>Sections 1, 5, 6, 7, and 8 survive termination of this Public License.</li>
+</ol>
+<p><strong>Section 7 – Other Terms and Conditions.</strong></p>
+<ol>
+    <li>The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.</li>
+    <li>Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.</li>
+</ol>
+<p><strong>Section 8 – Interpretation.</strong></p>
+<ol>
+    <li>For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.</li>
+    <li>To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.</li>
+    <li>No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.</li>
+    <li>Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.</li>
+</ol>

+ 128 - 0
www/application/class/view/string/LICENSE_CC-BY-SA__ES

@@ -0,0 +1,128 @@
+<h3>Creative Commons Attribution-ShareAlike 4.0 International Public License</h3>
+<p>By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.</p>
+<p><strong>Section 1 – Definitions.</strong></p>
+<ol>
+    <li><strong>Adapted Material</strong> means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.</li>
+    <li><strong>Adapter&#39;s License</strong> means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.</li>
+    <li><strong>BY-SA Compatible License</strong> means a license listed at <a href="//creativecommons.org/compatiblelicenses"> creativecommons.org/compatiblelicenses</a>, approved by Creative Commons as essentially the equivalent of this Public License.</li>
+    <li><strong>Copyright and Similar Rights</strong> means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.</li>
+    <li><strong>Effective Technological Measures</strong> means those measures that, in the absence of proper authority, may notbe circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similarinternational agreements.</li>
+    <li><strong>Exceptions and Limitations</strong> means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.</li>
+    <li><strong>License Elements</strong> means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution and ShareAlike.</li>
+    <li><strong>Licensed Material</strong> means the artistic or literary work, database, or other material to which the Licensor applied this Public License.</li>
+    <li><strong>Licensed Rights</strong> means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.</li>
+    <li><strong>Licensor</strong> means the individual(s) or entity(ies) granting rights under this Public License.</li>
+    <li><strong>Share</strong> means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.</li>
+    <li><strong>Sui Generis Database Rights</strong> means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.</li>
+    <li><strong>You</strong> means the individual or entity exercising the Licensed Rights under this Public License. <strong>Your</strong> has a corresponding meaning.</li>
+</ol>
+<p><strong>Section 2 – Scope.</strong></p>
+<ol>
+    <li>
+        <strong>License grant</strong>.
+        <ol>
+            <li>Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
+                <ol>
+                    <li>reproduce and Share the Licensed Material, in whole or in part; and</li>
+                    <li>produce, reproduce, and Share Adapted Material.</li>
+                </ol>
+            </li>
+            <li><span style="text-decoration: underline;">Exceptions and Limitations</span>. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.</li>
+            <li><span style="text-decoration: underline;">Term</span>. The term of this Public License is specified in Section 6(a).</li>
+            <li><span style="text-decoration: underline;">Media and formats; technical modifications allowed</span>. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.</li>
+            <li>
+                <span style="text-decoration: underline;">Downstream recipients</span>.
+                <div>
+                    <ol>
+                        <li><span style="text-decoration: underline;">Offer from the Licensor – Licensed Material</span>. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.</li>
+                        <li><span style="text-decoration: underline;">Additional offer from the Licensor – Adapted Material</span>. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter&#39;s License You apply.</li>
+                        <li><span style="text-decoration: underline;">No downstream restrictions</span>. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.</li>
+                    </ol>
+                </div>
+            </li>
+            <li><span style="text-decoration: underline;">No endorsement</span>. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).</li>
+        </ol>
+    </li>
+    <li>
+        <p><strong>Other rights</strong>.</p>
+        <ol>
+            <li>Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.</li>
+            <li>Patent and trademark rights are not licensed under this Public License.</li>
+            <li>To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties.</li>
+        </ol>
+    </li>
+</ol>
+<p><strong>Section 3 – License Conditions.</strong></p><p>Your exercise of the Licensed Rights is expressly made subject to the following conditions.</p>
+<ol>
+    <li>
+        <p><strong>Attribution</strong>.</p>
+        <ol>
+            <li><p>If You Share the Licensed Material (including in modified form), You must:</p>
+                <ol>
+                    <li>retain the following if it is supplied by the Licensor with the Licensed Material:
+                        <ol>
+                            <li>identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);</li>
+                            <li>a copyright notice;</li>
+                            <li>a notice that refers to this Public License; </li>
+                            <li>a notice that refers to the disclaimer of warranties;</li>
+                            <li>a URI or hyperlink to the Licensed Material to the extent reasonably practicable;</li>
+                        </ol>
+                    </li>
+                    <li>indicate if You modified the Licensed Material and retain an indication of any previous modifications; and</li>
+                    <li>indicate the Licensed Material is licensed under this Public License,and include the text of, or the URI or hyperlink to, this PublicLicense.</li>
+                </ol>
+            </li>
+            <li>You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.</li>
+            <li>If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.</li>
+        </ol>
+    </li>
+    <li><strong>ShareAlike</strong>.
+        <p>In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply.</p>
+        <ol>
+            <li>The Adapter&#39;s License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-SA Compatible License.</li>
+            <li>You must include the text of, or the URI or hyperlink to, the Adapter&#39;s License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material.</li>
+            <li>You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter&#39;s License You apply.</li>
+        </ol>
+    </li>
+</ol>
+<p><strong>Section 4 – Sui Generis Database Rights.</strong></p>
+<p>Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:</p>
+<ol>
+    <li>for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database;</li>
+    <li>if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and</li>
+    <li>You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.</li>
+</ol>For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
+<p><strong>Section 5 – Disclaimer of Warranties and Limitation of Liability.</strong></p>
+<ol style="font-weight: bold;">
+    <li><strong>Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.</strong></li>
+    <li><strong>To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.</strong></li>
+</ol>
+<ol start="3">
+    <li>The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.</li>
+</ol>
+<p><strong>Section 6 – Term and Termination.</strong></p>
+<ol>
+    <li>This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.</li>
+    <li>
+        <p>Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:</p>
+        <ol>
+            <li>automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or</li>
+            <li>upon express reinstatement by the Licensor.</li>
+        </ol>
+        For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
+    </li>
+    <li>For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.</li>
+    <li>Sections 1, 5, 6, 7, and 8 survive termination of this Public License.</li>
+</ol>
+<p><strong>Section 7 – Other Terms and Conditions.</strong></p>
+<ol>
+    <li>The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.</li>
+    <li>Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.</li>
+</ol>
+<p><strong>Section 8 – Interpretation.</strong></p>
+<ol>
+    <li>For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.</li>
+    <li>To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.</li>
+    <li>No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.</li>
+    <li>Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.</li>
+</ol>

+ 128 - 0
www/application/class/view/string/LICENSE_CC-BY-SA__EU

@@ -0,0 +1,128 @@
+<h3>Creative Commons Attribution-ShareAlike 4.0 International Public License</h3>
+<p>By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.</p>
+<p><strong>Section 1 – Definitions.</strong></p>
+<ol>
+    <li><strong>Adapted Material</strong> means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.</li>
+    <li><strong>Adapter&#39;s License</strong> means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.</li>
+    <li><strong>BY-SA Compatible License</strong> means a license listed at <a href="//creativecommons.org/compatiblelicenses"> creativecommons.org/compatiblelicenses</a>, approved by Creative Commons as essentially the equivalent of this Public License.</li>
+    <li><strong>Copyright and Similar Rights</strong> means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.</li>
+    <li><strong>Effective Technological Measures</strong> means those measures that, in the absence of proper authority, may notbe circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similarinternational agreements.</li>
+    <li><strong>Exceptions and Limitations</strong> means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.</li>
+    <li><strong>License Elements</strong> means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution and ShareAlike.</li>
+    <li><strong>Licensed Material</strong> means the artistic or literary work, database, or other material to which the Licensor applied this Public License.</li>
+    <li><strong>Licensed Rights</strong> means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.</li>
+    <li><strong>Licensor</strong> means the individual(s) or entity(ies) granting rights under this Public License.</li>
+    <li><strong>Share</strong> means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.</li>
+    <li><strong>Sui Generis Database Rights</strong> means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.</li>
+    <li><strong>You</strong> means the individual or entity exercising the Licensed Rights under this Public License. <strong>Your</strong> has a corresponding meaning.</li>
+</ol>
+<p><strong>Section 2 – Scope.</strong></p>
+<ol>
+    <li>
+        <strong>License grant</strong>.
+        <ol>
+            <li>Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
+                <ol>
+                    <li>reproduce and Share the Licensed Material, in whole or in part; and</li>
+                    <li>produce, reproduce, and Share Adapted Material.</li>
+                </ol>
+            </li>
+            <li><span style="text-decoration: underline;">Exceptions and Limitations</span>. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.</li>
+            <li><span style="text-decoration: underline;">Term</span>. The term of this Public License is specified in Section 6(a).</li>
+            <li><span style="text-decoration: underline;">Media and formats; technical modifications allowed</span>. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.</li>
+            <li>
+                <span style="text-decoration: underline;">Downstream recipients</span>.
+                <div>
+                    <ol>
+                        <li><span style="text-decoration: underline;">Offer from the Licensor – Licensed Material</span>. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.</li>
+                        <li><span style="text-decoration: underline;">Additional offer from the Licensor – Adapted Material</span>. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter&#39;s License You apply.</li>
+                        <li><span style="text-decoration: underline;">No downstream restrictions</span>. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.</li>
+                    </ol>
+                </div>
+            </li>
+            <li><span style="text-decoration: underline;">No endorsement</span>. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).</li>
+        </ol>
+    </li>
+    <li>
+        <p><strong>Other rights</strong>.</p>
+        <ol>
+            <li>Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.</li>
+            <li>Patent and trademark rights are not licensed under this Public License.</li>
+            <li>To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties.</li>
+        </ol>
+    </li>
+</ol>
+<p><strong>Section 3 – License Conditions.</strong></p><p>Your exercise of the Licensed Rights is expressly made subject to the following conditions.</p>
+<ol>
+    <li>
+        <p><strong>Attribution</strong>.</p>
+        <ol>
+            <li><p>If You Share the Licensed Material (including in modified form), You must:</p>
+                <ol>
+                    <li>retain the following if it is supplied by the Licensor with the Licensed Material:
+                        <ol>
+                            <li>identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);</li>
+                            <li>a copyright notice;</li>
+                            <li>a notice that refers to this Public License; </li>
+                            <li>a notice that refers to the disclaimer of warranties;</li>
+                            <li>a URI or hyperlink to the Licensed Material to the extent reasonably practicable;</li>
+                        </ol>
+                    </li>
+                    <li>indicate if You modified the Licensed Material and retain an indication of any previous modifications; and</li>
+                    <li>indicate the Licensed Material is licensed under this Public License,and include the text of, or the URI or hyperlink to, this PublicLicense.</li>
+                </ol>
+            </li>
+            <li>You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.</li>
+            <li>If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.</li>
+        </ol>
+    </li>
+    <li><strong>ShareAlike</strong>.
+        <p>In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply.</p>
+        <ol>
+            <li>The Adapter&#39;s License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-SA Compatible License.</li>
+            <li>You must include the text of, or the URI or hyperlink to, the Adapter&#39;s License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material.</li>
+            <li>You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter&#39;s License You apply.</li>
+        </ol>
+    </li>
+</ol>
+<p><strong>Section 4 – Sui Generis Database Rights.</strong></p>
+<p>Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:</p>
+<ol>
+    <li>for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database;</li>
+    <li>if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and</li>
+    <li>You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.</li>
+</ol>For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
+<p><strong>Section 5 – Disclaimer of Warranties and Limitation of Liability.</strong></p>
+<ol style="font-weight: bold;">
+    <li><strong>Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.</strong></li>
+    <li><strong>To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.</strong></li>
+</ol>
+<ol start="3">
+    <li>The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.</li>
+</ol>
+<p><strong>Section 6 – Term and Termination.</strong></p>
+<ol>
+    <li>This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.</li>
+    <li>
+        <p>Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:</p>
+        <ol>
+            <li>automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or</li>
+            <li>upon express reinstatement by the Licensor.</li>
+        </ol>
+        For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
+    </li>
+    <li>For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.</li>
+    <li>Sections 1, 5, 6, 7, and 8 survive termination of this Public License.</li>
+</ol>
+<p><strong>Section 7 – Other Terms and Conditions.</strong></p>
+<ol>
+    <li>The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.</li>
+    <li>Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.</li>
+</ol>
+<p><strong>Section 8 – Interpretation.</strong></p>
+<ol>
+    <li>For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.</li>
+    <li>To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.</li>
+    <li>No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.</li>
+    <li>Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.</li>
+</ol>

+ 1 - 0
www/application/class/view/string/LICENSE_GPLV3_SUMMARY__EN

@@ -0,0 +1 @@
+You may copy, distribute and modify the software as long as you track changes/dates in source files. Any modifications to or software including (via compiler) GPL-licensed code must also be made available under the GPL along with build & install instructions.

+ 1 - 0
www/application/class/view/string/LICENSE_GPLV3_SUMMARY__ES

@@ -0,0 +1 @@
+You may copy, distribute and modify the software as long as you track changes/dates in source files. Any modifications to or software including (via compiler) GPL-licensed code must also be made available under the GPL along with build & install instructions.

+ 1 - 0
www/application/class/view/string/LICENSE_GPLV3_SUMMARY__EU

@@ -0,0 +1 @@
+You may copy, distribute and modify the software as long as you track changes/dates in source files. Any modifications to or software including (via compiler) GPL-licensed code must also be made available under the GPL along with build & install instructions.

+ 683 - 0
www/application/class/view/string/LICENSE_GPLV3__EN

@@ -0,0 +1,683 @@
+<h3 style="text-align: center;">GNU GENERAL PUBLIC LICENSE</h3>
+<p style="text-align: center;">Version 3, 29 June 2007</p>
+
+<p>Copyright &copy; 2007 Free Software Foundation, Inc.
+ &lt;<a href="http://fsf.org/">http://fsf.org/</a>&gt;</p><p>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.</p>
+
+<h3>Preamble</h3>
+
+<p>The GNU General Public License is a free, copyleft license for
+software and other kinds of works.</p>
+
+<p>The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.</p>
+
+<p>When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.</p>
+
+<p>To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.</p>
+
+<p>For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.</p>
+
+<p>Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.</p>
+
+<p>For the developers&#39; and authors&#39; protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users&#39; and
+authors&#39; sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.</p>
+
+<p>Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users&#39; freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.</p>
+
+<p>Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.</p>
+
+<p>The precise terms and conditions for copying, distribution and
+modification follow.</p>
+
+<h3>TERMS AND CONDITIONS</h3>
+
+<h4>0. Definitions.</h4>
+
+<p>&ldquo;This License&rdquo; refers to version 3 of the GNU General Public License.</p>
+
+<p>&ldquo;Copyright&rdquo; also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.</p>
+ 
+<p>&ldquo;The Program&rdquo; refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as &ldquo;you&rdquo;.  &ldquo;Licensees&rdquo; and
+&ldquo;recipients&rdquo; may be individuals or organizations.</p>
+
+<p>To &ldquo;modify&rdquo; a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a &ldquo;modified version&rdquo; of the
+earlier work or a work &ldquo;based on&rdquo; the earlier work.</p>
+
+<p>A &ldquo;covered work&rdquo; means either the unmodified Program or a work based
+on the Program.</p>
+
+<p>To &ldquo;propagate&rdquo; a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.</p>
+
+<p>To &ldquo;convey&rdquo; a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.</p>
+
+<p>An interactive user interface displays &ldquo;Appropriate Legal Notices&rdquo;
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.</p>
+
+<h4>1. Source Code.</h4>
+
+<p>The &ldquo;source code&rdquo; for a work means the preferred form of the work
+for making modifications to it.  &ldquo;Object code&rdquo; means any non-source
+form of a work.</p>
+
+<p>A &ldquo;Standard Interface&rdquo; means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.</p>
+
+<p>The &ldquo;System Libraries&rdquo; of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+&ldquo;Major Component&rdquo;, in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.</p>
+
+<p>The &ldquo;Corresponding Source&rdquo; for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work&#39;s
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.</p>
+
+<p>The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.</p>
+
+<p>The Corresponding Source for a work in source code form is that
+same work.</p>
+
+<h4>2. Basic Permissions.</h4>
+
+<p>All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.</p>
+
+<p>You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.</p>
+
+<p>Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.</p>
+
+<h4>3. Protecting Users&#39; Legal Rights From Anti-Circumvention Law.</h4>
+
+<p>No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.</p>
+
+<p>When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work&#39;s
+users, your or third parties&#39; legal rights to forbid circumvention of
+technological measures.</p>
+
+<h4>4. Conveying Verbatim Copies.</h4>
+
+<p>You may convey verbatim copies of the Program&#39;s source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.</p>
+
+<p>You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.</p>
+
+<h4>5. Conveying Modified Source Versions.</h4>
+
+<p>You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:</p>
+
+<ul>
+<li>a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.</li>
+
+<li>b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    &ldquo;keep intact all notices&rdquo;.</li>
+
+<li>c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.</li>
+
+<li>d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.</li>
+</ul>
+
+<p>A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+&ldquo;aggregate&rdquo; if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation&#39;s users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.</p>
+
+<h4>6. Conveying Non-Source Forms.</h4>
+
+<p>You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:</p>
+
+<ul>
+<li>a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.</li>
+
+<li>b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.</li>
+
+<li>c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.</li>
+
+<li>d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.</li>
+
+<li>e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.</li>
+</ul>
+
+<p>A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.</p>
+
+<p>A &ldquo;User Product&rdquo; is either (1) a &ldquo;consumer product&rdquo;, which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, &ldquo;normally used&rdquo; refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.</p>
+
+<p>&ldquo;Installation Information&rdquo; for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.</p>
+
+<p>If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).</p>
+
+<p>The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.</p>
+
+<p>Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.</p>
+
+<h4>7. Additional Terms.</h4>
+
+<p>&ldquo;Additional permissions&rdquo; are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.</p>
+
+<p>When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.</p>
+
+<p>Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:</p>
+
+<ul>
+<li>a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or</li>
+
+<li>b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or</li>
+
+<li>c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or</li>
+
+<li>d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or</li>
+
+<li>e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or</li>
+
+<li>f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.</li>
+</ul>
+
+<p>All other non-permissive additional terms are considered &ldquo;further
+restrictions&rdquo; within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.</p>
+
+<p>If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.</p>
+
+<p>Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.</p>
+
+<h4>8. Termination.</h4>
+
+<p>You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).</p>
+
+<p>However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.</p>
+
+<p>Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.</p>
+
+<p>Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.</p>
+
+<h4>9. Acceptance Not Required for Having Copies.</h4>
+
+<p>You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.</p>
+
+<h4>10. Automatic Licensing of Downstream Recipients.</h4>
+
+<p>Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.</p>
+
+<p>An &ldquo;entity transaction&rdquo; is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party&#39;s predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.</p>
+
+<p>You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.</p>
+
+<h4>11. Patents.</h4>
+
+<p>A &ldquo;contributor&rdquo; is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor&#39;s &ldquo;contributor version&rdquo;.</p>
+
+<p>A contributor&#39;s &ldquo;essential patent claims&rdquo; are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, &ldquo;control&rdquo; includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.</p>
+
+<p>Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor&#39;s essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.</p>
+
+<p>In the following three paragraphs, a &ldquo;patent license&rdquo; is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To &ldquo;grant&rdquo; such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.</p>
+
+<p>If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  &ldquo;Knowingly relying&rdquo; means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient&#39;s use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.</p>
+  
+<p>If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.</p>
+
+<p>A patent license is &ldquo;discriminatory&rdquo; if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.</p>
+
+<p>Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.</p>
+
+<h4>12. No Surrender of Others&#39; Freedom.</h4>
+
+<p>If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.</p>
+
+<h4>13. Use with the GNU Affero General Public License.</h4>
+
+<p>Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.</p>
+
+<h4>14. Revised Versions of this License.</h4>
+
+<p>The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.</p>
+
+<p>Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License &ldquo;or any later version&rdquo; applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.</p>
+
+<p>If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy&#39;s
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.</p>
+
+<p>Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.</p>
+
+<h4>15. Disclaimer of Warranty.</h4>
+
+<p>THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM &ldquo;AS IS&rdquo; WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.</p>
+
+<h4>16. Limitation of Liability.</h4>
+
+<p>IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.</p>
+
+<h4>17. Interpretation of Sections 15 and 16.</h4>
+
+<p>If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.</p>
+
+<p>END OF TERMS AND CONDITIONS</p>
+
+<h3>How to Apply These Terms to Your New Programs</h3>
+
+<p>If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.</p>
+
+<p>To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the &ldquo;copyright&rdquo; line and a pointer to where the full notice is found.</p>
+
+<pre>    &lt;one line to give the program&#39;s name and a brief idea of what it does.&gt;
+    Copyright (C) &lt;year&gt;  &lt;name of author&gt;
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see &lt;http://www.gnu.org/licenses/&gt;.
+</pre>
+
+<p>Also add information on how to contact you by electronic and paper mail.</p>
+
+<p>If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:</p>
+
+<pre>    &lt;program&gt;  Copyright (C) &lt;year&gt;  &lt;name of author&gt;
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w&#39;.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c&#39; for details.
+</pre>
+
+<p>The hypothetical commands `show w&#39; and `show c&#39; should show the appropriate
+parts of the General Public License.  Of course, your program&#39;s commands
+might be different; for a GUI interface, you would use an &ldquo;about box&rdquo;.</p>
+
+<p>You should also get your employer (if you work as a programmer) or school,
+if any, to sign a &ldquo;copyright disclaimer&rdquo; for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+&lt;<a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>&gt;.</p>
+
+<p>The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+&lt;<a href="http://www.gnu.org/philosophy/why-not-lgpl.html">http://www.gnu.org/philosophy/why-not-lgpl.html</a>&gt;.</p>

+ 683 - 0
www/application/class/view/string/LICENSE_GPLV3__ES

@@ -0,0 +1,683 @@
+<h3 style="text-align: center;">GNU GENERAL PUBLIC LICENSE</h3>
+<p style="text-align: center;">Version 3, 29 June 2007</p>
+
+<p>Copyright &copy; 2007 Free Software Foundation, Inc.
+ &lt;<a href="http://fsf.org/">http://fsf.org/</a>&gt;</p><p>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.</p>
+
+<h3>Preamble</h3>
+
+<p>The GNU General Public License is a free, copyleft license for
+software and other kinds of works.</p>
+
+<p>The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.</p>
+
+<p>When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.</p>
+
+<p>To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.</p>
+
+<p>For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.</p>
+
+<p>Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.</p>
+
+<p>For the developers&#39; and authors&#39; protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users&#39; and
+authors&#39; sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.</p>
+
+<p>Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users&#39; freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.</p>
+
+<p>Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.</p>
+
+<p>The precise terms and conditions for copying, distribution and
+modification follow.</p>
+
+<h3>TERMS AND CONDITIONS</h3>
+
+<h4>0. Definitions.</h4>
+
+<p>&ldquo;This License&rdquo; refers to version 3 of the GNU General Public License.</p>
+
+<p>&ldquo;Copyright&rdquo; also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.</p>
+ 
+<p>&ldquo;The Program&rdquo; refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as &ldquo;you&rdquo;.  &ldquo;Licensees&rdquo; and
+&ldquo;recipients&rdquo; may be individuals or organizations.</p>
+
+<p>To &ldquo;modify&rdquo; a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a &ldquo;modified version&rdquo; of the
+earlier work or a work &ldquo;based on&rdquo; the earlier work.</p>
+
+<p>A &ldquo;covered work&rdquo; means either the unmodified Program or a work based
+on the Program.</p>
+
+<p>To &ldquo;propagate&rdquo; a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.</p>
+
+<p>To &ldquo;convey&rdquo; a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.</p>
+
+<p>An interactive user interface displays &ldquo;Appropriate Legal Notices&rdquo;
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.</p>
+
+<h4>1. Source Code.</h4>
+
+<p>The &ldquo;source code&rdquo; for a work means the preferred form of the work
+for making modifications to it.  &ldquo;Object code&rdquo; means any non-source
+form of a work.</p>
+
+<p>A &ldquo;Standard Interface&rdquo; means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.</p>
+
+<p>The &ldquo;System Libraries&rdquo; of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+&ldquo;Major Component&rdquo;, in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.</p>
+
+<p>The &ldquo;Corresponding Source&rdquo; for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work&#39;s
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.</p>
+
+<p>The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.</p>
+
+<p>The Corresponding Source for a work in source code form is that
+same work.</p>
+
+<h4>2. Basic Permissions.</h4>
+
+<p>All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.</p>
+
+<p>You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.</p>
+
+<p>Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.</p>
+
+<h4>3. Protecting Users&#39; Legal Rights From Anti-Circumvention Law.</h4>
+
+<p>No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.</p>
+
+<p>When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work&#39;s
+users, your or third parties&#39; legal rights to forbid circumvention of
+technological measures.</p>
+
+<h4>4. Conveying Verbatim Copies.</h4>
+
+<p>You may convey verbatim copies of the Program&#39;s source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.</p>
+
+<p>You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.</p>
+
+<h4>5. Conveying Modified Source Versions.</h4>
+
+<p>You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:</p>
+
+<ul>
+<li>a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.</li>
+
+<li>b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    &ldquo;keep intact all notices&rdquo;.</li>
+
+<li>c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.</li>
+
+<li>d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.</li>
+</ul>
+
+<p>A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+&ldquo;aggregate&rdquo; if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation&#39;s users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.</p>
+
+<h4>6. Conveying Non-Source Forms.</h4>
+
+<p>You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:</p>
+
+<ul>
+<li>a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.</li>
+
+<li>b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.</li>
+
+<li>c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.</li>
+
+<li>d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.</li>
+
+<li>e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.</li>
+</ul>
+
+<p>A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.</p>
+
+<p>A &ldquo;User Product&rdquo; is either (1) a &ldquo;consumer product&rdquo;, which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, &ldquo;normally used&rdquo; refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.</p>
+
+<p>&ldquo;Installation Information&rdquo; for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.</p>
+
+<p>If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).</p>
+
+<p>The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.</p>
+
+<p>Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.</p>
+
+<h4>7. Additional Terms.</h4>
+
+<p>&ldquo;Additional permissions&rdquo; are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.</p>
+
+<p>When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.</p>
+
+<p>Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:</p>
+
+<ul>
+<li>a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or</li>
+
+<li>b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or</li>
+
+<li>c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or</li>
+
+<li>d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or</li>
+
+<li>e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or</li>
+
+<li>f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.</li>
+</ul>
+
+<p>All other non-permissive additional terms are considered &ldquo;further
+restrictions&rdquo; within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.</p>
+
+<p>If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.</p>
+
+<p>Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.</p>
+
+<h4>8. Termination.</h4>
+
+<p>You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).</p>
+
+<p>However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.</p>
+
+<p>Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.</p>
+
+<p>Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.</p>
+
+<h4>9. Acceptance Not Required for Having Copies.</h4>
+
+<p>You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.</p>
+
+<h4>10. Automatic Licensing of Downstream Recipients.</h4>
+
+<p>Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.</p>
+
+<p>An &ldquo;entity transaction&rdquo; is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party&#39;s predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.</p>
+
+<p>You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.</p>
+
+<h4>11. Patents.</h4>
+
+<p>A &ldquo;contributor&rdquo; is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor&#39;s &ldquo;contributor version&rdquo;.</p>
+
+<p>A contributor&#39;s &ldquo;essential patent claims&rdquo; are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, &ldquo;control&rdquo; includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.</p>
+
+<p>Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor&#39;s essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.</p>
+
+<p>In the following three paragraphs, a &ldquo;patent license&rdquo; is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To &ldquo;grant&rdquo; such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.</p>
+
+<p>If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  &ldquo;Knowingly relying&rdquo; means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient&#39;s use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.</p>
+  
+<p>If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.</p>
+
+<p>A patent license is &ldquo;discriminatory&rdquo; if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.</p>
+
+<p>Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.</p>
+
+<h4>12. No Surrender of Others&#39; Freedom.</h4>
+
+<p>If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.</p>
+
+<h4>13. Use with the GNU Affero General Public License.</h4>
+
+<p>Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.</p>
+
+<h4>14. Revised Versions of this License.</h4>
+
+<p>The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.</p>
+
+<p>Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License &ldquo;or any later version&rdquo; applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.</p>
+
+<p>If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy&#39;s
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.</p>
+
+<p>Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.</p>
+
+<h4>15. Disclaimer of Warranty.</h4>
+
+<p>THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM &ldquo;AS IS&rdquo; WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.</p>
+
+<h4>16. Limitation of Liability.</h4>
+
+<p>IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.</p>
+
+<h4>17. Interpretation of Sections 15 and 16.</h4>
+
+<p>If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.</p>
+
+<p>END OF TERMS AND CONDITIONS</p>
+
+<h3>How to Apply These Terms to Your New Programs</h3>
+
+<p>If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.</p>
+
+<p>To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the &ldquo;copyright&rdquo; line and a pointer to where the full notice is found.</p>
+
+<pre>    &lt;one line to give the program&#39;s name and a brief idea of what it does.&gt;
+    Copyright (C) &lt;year&gt;  &lt;name of author&gt;
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see &lt;http://www.gnu.org/licenses/&gt;.
+</pre>
+
+<p>Also add information on how to contact you by electronic and paper mail.</p>
+
+<p>If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:</p>
+
+<pre>    &lt;program&gt;  Copyright (C) &lt;year&gt;  &lt;name of author&gt;
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w&#39;.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c&#39; for details.
+</pre>
+
+<p>The hypothetical commands `show w&#39; and `show c&#39; should show the appropriate
+parts of the General Public License.  Of course, your program&#39;s commands
+might be different; for a GUI interface, you would use an &ldquo;about box&rdquo;.</p>
+
+<p>You should also get your employer (if you work as a programmer) or school,
+if any, to sign a &ldquo;copyright disclaimer&rdquo; for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+&lt;<a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>&gt;.</p>
+
+<p>The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+&lt;<a href="http://www.gnu.org/philosophy/why-not-lgpl.html">http://www.gnu.org/philosophy/why-not-lgpl.html</a>&gt;.</p>

+ 683 - 0
www/application/class/view/string/LICENSE_GPLV3__EU

@@ -0,0 +1,683 @@
+<h3 style="text-align: center;">GNU GENERAL PUBLIC LICENSE</h3>
+<p style="text-align: center;">Version 3, 29 June 2007</p>
+
+<p>Copyright &copy; 2007 Free Software Foundation, Inc.
+ &lt;<a href="http://fsf.org/">http://fsf.org/</a>&gt;</p><p>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.</p>
+
+<h3>Preamble</h3>
+
+<p>The GNU General Public License is a free, copyleft license for
+software and other kinds of works.</p>
+
+<p>The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.</p>
+
+<p>When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.</p>
+
+<p>To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.</p>
+
+<p>For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.</p>
+
+<p>Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.</p>
+
+<p>For the developers&#39; and authors&#39; protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users&#39; and
+authors&#39; sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.</p>
+
+<p>Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users&#39; freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.</p>
+
+<p>Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.</p>
+
+<p>The precise terms and conditions for copying, distribution and
+modification follow.</p>
+
+<h3>TERMS AND CONDITIONS</h3>
+
+<h4>0. Definitions.</h4>
+
+<p>&ldquo;This License&rdquo; refers to version 3 of the GNU General Public License.</p>
+
+<p>&ldquo;Copyright&rdquo; also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.</p>
+ 
+<p>&ldquo;The Program&rdquo; refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as &ldquo;you&rdquo;.  &ldquo;Licensees&rdquo; and
+&ldquo;recipients&rdquo; may be individuals or organizations.</p>
+
+<p>To &ldquo;modify&rdquo; a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a &ldquo;modified version&rdquo; of the
+earlier work or a work &ldquo;based on&rdquo; the earlier work.</p>
+
+<p>A &ldquo;covered work&rdquo; means either the unmodified Program or a work based
+on the Program.</p>
+
+<p>To &ldquo;propagate&rdquo; a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.</p>
+
+<p>To &ldquo;convey&rdquo; a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.</p>
+
+<p>An interactive user interface displays &ldquo;Appropriate Legal Notices&rdquo;
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.</p>
+
+<h4>1. Source Code.</h4>
+
+<p>The &ldquo;source code&rdquo; for a work means the preferred form of the work
+for making modifications to it.  &ldquo;Object code&rdquo; means any non-source
+form of a work.</p>
+
+<p>A &ldquo;Standard Interface&rdquo; means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.</p>
+
+<p>The &ldquo;System Libraries&rdquo; of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+&ldquo;Major Component&rdquo;, in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.</p>
+
+<p>The &ldquo;Corresponding Source&rdquo; for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work&#39;s
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.</p>
+
+<p>The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.</p>
+
+<p>The Corresponding Source for a work in source code form is that
+same work.</p>
+
+<h4>2. Basic Permissions.</h4>
+
+<p>All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.</p>
+
+<p>You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.</p>
+
+<p>Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.</p>
+
+<h4>3. Protecting Users&#39; Legal Rights From Anti-Circumvention Law.</h4>
+
+<p>No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.</p>
+
+<p>When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work&#39;s
+users, your or third parties&#39; legal rights to forbid circumvention of
+technological measures.</p>
+
+<h4>4. Conveying Verbatim Copies.</h4>
+
+<p>You may convey verbatim copies of the Program&#39;s source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.</p>
+
+<p>You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.</p>
+
+<h4>5. Conveying Modified Source Versions.</h4>
+
+<p>You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:</p>
+
+<ul>
+<li>a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.</li>
+
+<li>b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    &ldquo;keep intact all notices&rdquo;.</li>
+
+<li>c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.</li>
+
+<li>d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.</li>
+</ul>
+
+<p>A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+&ldquo;aggregate&rdquo; if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation&#39;s users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.</p>
+
+<h4>6. Conveying Non-Source Forms.</h4>
+
+<p>You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:</p>
+
+<ul>
+<li>a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.</li>
+
+<li>b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.</li>
+
+<li>c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.</li>
+
+<li>d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.</li>
+
+<li>e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.</li>
+</ul>
+
+<p>A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.</p>
+
+<p>A &ldquo;User Product&rdquo; is either (1) a &ldquo;consumer product&rdquo;, which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, &ldquo;normally used&rdquo; refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.</p>
+
+<p>&ldquo;Installation Information&rdquo; for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.</p>
+
+<p>If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).</p>
+
+<p>The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.</p>
+
+<p>Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.</p>
+
+<h4>7. Additional Terms.</h4>
+
+<p>&ldquo;Additional permissions&rdquo; are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.</p>
+
+<p>When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.</p>
+
+<p>Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:</p>
+
+<ul>
+<li>a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or</li>
+
+<li>b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or</li>
+
+<li>c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or</li>
+
+<li>d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or</li>
+
+<li>e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or</li>
+
+<li>f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.</li>
+</ul>
+
+<p>All other non-permissive additional terms are considered &ldquo;further
+restrictions&rdquo; within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.</p>
+
+<p>If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.</p>
+
+<p>Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.</p>
+
+<h4>8. Termination.</h4>
+
+<p>You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).</p>
+
+<p>However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.</p>
+
+<p>Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.</p>
+
+<p>Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.</p>
+
+<h4>9. Acceptance Not Required for Having Copies.</h4>
+
+<p>You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.</p>
+
+<h4>10. Automatic Licensing of Downstream Recipients.</h4>
+
+<p>Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.</p>
+
+<p>An &ldquo;entity transaction&rdquo; is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party&#39;s predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.</p>
+
+<p>You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.</p>
+
+<h4>11. Patents.</h4>
+
+<p>A &ldquo;contributor&rdquo; is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor&#39;s &ldquo;contributor version&rdquo;.</p>
+
+<p>A contributor&#39;s &ldquo;essential patent claims&rdquo; are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, &ldquo;control&rdquo; includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.</p>
+
+<p>Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor&#39;s essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.</p>
+
+<p>In the following three paragraphs, a &ldquo;patent license&rdquo; is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To &ldquo;grant&rdquo; such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.</p>
+
+<p>If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  &ldquo;Knowingly relying&rdquo; means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient&#39;s use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.</p>
+  
+<p>If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.</p>
+
+<p>A patent license is &ldquo;discriminatory&rdquo; if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.</p>
+
+<p>Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.</p>
+
+<h4>12. No Surrender of Others&#39; Freedom.</h4>
+
+<p>If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.</p>
+
+<h4>13. Use with the GNU Affero General Public License.</h4>
+
+<p>Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.</p>
+
+<h4>14. Revised Versions of this License.</h4>
+
+<p>The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.</p>
+
+<p>Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License &ldquo;or any later version&rdquo; applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.</p>
+
+<p>If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy&#39;s
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.</p>
+
+<p>Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.</p>
+
+<h4>15. Disclaimer of Warranty.</h4>
+
+<p>THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM &ldquo;AS IS&rdquo; WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.</p>
+
+<h4>16. Limitation of Liability.</h4>
+
+<p>IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.</p>
+
+<h4>17. Interpretation of Sections 15 and 16.</h4>
+
+<p>If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.</p>
+
+<p>END OF TERMS AND CONDITIONS</p>
+
+<h3>How to Apply These Terms to Your New Programs</h3>
+
+<p>If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.</p>
+
+<p>To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the &ldquo;copyright&rdquo; line and a pointer to where the full notice is found.</p>
+
+<pre>    &lt;one line to give the program&#39;s name and a brief idea of what it does.&gt;
+    Copyright (C) &lt;year&gt;  &lt;name of author&gt;
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see &lt;http://www.gnu.org/licenses/&gt;.
+</pre>
+
+<p>Also add information on how to contact you by electronic and paper mail.</p>
+
+<p>If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:</p>
+
+<pre>    &lt;program&gt;  Copyright (C) &lt;year&gt;  &lt;name of author&gt;
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w&#39;.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c&#39; for details.
+</pre>
+
+<p>The hypothetical commands `show w&#39; and `show c&#39; should show the appropriate
+parts of the General Public License.  Of course, your program&#39;s commands
+might be different; for a GUI interface, you would use an &ldquo;about box&rdquo;.</p>
+
+<p>You should also get your employer (if you work as a programmer) or school,
+if any, to sign a &ldquo;copyright disclaimer&rdquo; for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+&lt;<a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>&gt;.</p>
+
+<p>The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+&lt;<a href="http://www.gnu.org/philosophy/why-not-lgpl.html">http://www.gnu.org/philosophy/why-not-lgpl.html</a>&gt;.</p>

+ 13 - 0
www/application/config/auth.php

@@ -0,0 +1,13 @@
+<?php
+
+    /*
+     * Example file. Password must be defined
+     */
+
+    $auth = [
+        "host" => "localhost",
+        "name" => "web",
+        "user" => "webext",
+        "pass" => "XXXXXXXXXX"
+    ];
+?>

+ 31 - 0
www/application/config/config.php

@@ -0,0 +1,31 @@
+<?php
+
+    include __DIR__ . "/auth.php";
+
+    if (isset($_SERVER["HTTPS"]) && ($_SERVER["HTTPS"] == "on" || $_SERVER["HTTPS"] == 1) || isset($_SERVER["HTTP_X_FORWARDED_PROTO"]) && $_SERVER["HTTP_X_FORWARDED_PROTO"] == "https") {
+        $root = "https://" . $_SERVER["HTTP_HOST"] . "/";
+    }
+    else {
+        $root = "http://" . $_SERVER["HTTP_HOST"] . "/";
+    }
+
+    $base_dir = $_SERVER["DOCUMENT_ROOT"];
+
+    $path = [
+        "img" => [
+            "content" => $root . "img/content/",
+            "layout" => $root . "img/layout/"
+        ],
+        "fonts" => $root . "fonts/",
+        "css" => $root . "css/",
+        "js" => $root . "js/",
+        "application" => "$base_dir../application/",
+        "classes" => "$base_dir../application/class/",
+        "controller" => "$base_dir../application/class/controller/Controller.php",
+        "model" => "$base_dir../application/class/model/",
+        "view" => "$base_dir../application/class/view/",
+        "helper" => "$base_dir../application/helper/",
+        "string" => "$base_dir../application/class/view/string/"
+    ];
+
+?>

+ 27 - 0
www/application/helper/db.php

@@ -0,0 +1,27 @@
+<?php
+
+
+    /**
+     * Creates a database connection using the data in the config files.
+     * 
+     * @return MySQL_connection Connection to the database.
+     */
+    function start_db(){
+        global $auth;
+        $db = mysqli_connect($auth["host"], $auth["user"], $auth["pass"], $auth["name"]);
+
+        // Check connection
+        if (mysqli_connect_errno()){
+            error_log("Failed to connect to database: " . mysqli_connect_error());
+            return -1;
+        }
+
+        //Set encoding options
+        mysqli_set_charset($db, "utf-8");
+        header("Content-Type: text/html; charset=utf8");
+        mysqli_query($db, "SET NAMES utf8;");
+
+        return $db;
+    }
+
+?>

+ 117 - 0
www/application/helper/net.php

@@ -0,0 +1,117 @@
+<?php
+
+
+    /**
+     * Finds out the protocol the user is connecting to the site with.
+     *
+     * @return string "http://" or "https://".
+     */
+    function get_protocol(){
+        if (isset($_SERVER["HTTPS"]) && ($_SERVER["HTTPS"] == "on" || $_SERVER["HTTPS"] == 1) || isset($_SERVER["HTTP_X_FORWARDED_PROTO"]) && $_SERVER["HTTP_X_FORWARDED_PROTO"] == "https") {
+            $protocol = "https://";
+        }
+        else {
+            $protocol = "http://";
+        }
+        return $protocol;
+    }
+
+
+    /**
+     * Finds out the IP address of the client.
+     * 
+     * @return string Client IP address.
+     */
+    function get_ip(){
+        $client  = @$_SERVER["HTTP_CLIENT_IP"];
+        $forward = @$_SERVER["HTTP_X_FORWARDED_FOR"];
+        $remote  = $_SERVER["REMOTE_ADDR"];
+        if(filter_var($client, FILTER_VALIDATE_IP)){
+            $ip = $client;
+        }
+        elseif(filter_var($forward, FILTER_VALIDATE_IP)){
+            $ip = $forward;
+        }
+        else{
+            $ip = $remote;
+        }
+        return $ip;
+    }
+
+
+    /**
+     * Registers the page viewed by the user. If it is first page shown in his
+     * visit, it also registers the visit. 
+     * 
+     * @param MySQL_connection $db Connection to the database.
+     * @param string $section Site section being visited.
+     * @param string $id ID of the entry being visited.
+     */
+    function stats($db, $section, $id){
+
+        // Get client data
+        $ip = get_ip();
+        $browser_data = get_browser(null, true);
+        $os = $browser_data["platform"];
+        $browser = $browser_data["browser"];
+        $uagent = $browser_data["browser_name_pattern"];
+
+        //If bot, do nothing
+        $bot_kw = Array();
+        $bot_kw[0] = "bot";
+        $bot_kw[1] = "spider";
+        $bot_kw[2] = "crawl";
+        $bot_kw[3] = ".com";
+        $bot_kw[4] = ".ru";
+        $bot_kw[5] = "baidu";
+        $bot_kw[6] = "survey";
+        $bot_kw[7] = "scan";
+        $bot_kw[8] = "feed";
+        $bot_kw[9] = "bing";
+        $bot_kw[10] = "yahoo";
+        $bot_kw[11] = "engine";
+        $bot_kw[12] = "preview";
+        $bot_kw[13] = "checker";
+        $bot_kw[14] = "catalog";
+        $bot_kw[15] = "accelerator";
+        $bot_kw[16] = "python";
+        $bot_kw[14] = "qt";
+        $bot_kw[15] = "webdav";
+        $bot_kw[16] = "http";
+        $bot_kw[17] = "url";
+        $bot_kw[18] = "fake";
+        $bot_kw[19] = "library";
+        $bot_kw[20] = "commerce";
+        $bot_kw[21] = "htmlbot";
+        $bot_kw[22] = "fetch";
+        $bot_kw[23] = "googleb";
+        $bot_kw[24] = "facebook";
+        $bot_kw[25] = "whatsapp";
+        $bot_kw[26] = "pinterest";
+        $bot_kw[27] = "scrapy";
+        $bot_kw[28] = "libwww";
+        $bot_kw[29] = "java standard library";
+        $bot_kw[30] = "default browser";
+        $bot_kw[31] = "twingly recon";
+        $bot_kw[32] = "siteexplorer";
+        $bot_kw[33] = "yandex";
+        $bot_kw[34] = "wotbox";
+        $bot_kw[35] = "apache synapse";
+        $bot_kw[36] = "catexplorador";
+        $bot_kw[37] = "internet archive";
+        if (in_array(strtolower($uagent), $bot_kw)){
+            return;
+        }
+
+        //Look for a visit with the same IP in the last 30 mins.
+        $q = mysqli_query($db, "SELECT stat_visit.id AS visitid FROM stat_view, stat_visit WHERE visit = stat_visit.id AND stat_view.dtime > DATE_SUB(now(), INTERVAL 30 MINUTE) AND ip = '$ip' AND uagent = '$uagent';");
+        if (mysqli_num_rows($q) == 0){
+            mysqli_query($db, "INSERT INTO stat_visit (ip, uagent, os, browser) VALUES ('$ip', '$uagent', '$os', '$browser');");
+            $q = mysqli_query($db, "SELECT stat_visit.id AS visitid FROM stat_visit WHERE ip = '$ip' AND uagent = '$uagent' ORDER BY stat_visit.id DESC LIMIT 1;");
+        }
+        $r = mysqli_fetch_array($q);
+        $visit = $r['visitid'];
+        mysqli_query($db, "INSERT INTO stat_view (visit, section, entry) VALUES ($visit, '$section', '$id');");
+    }
+
+?>

+ 214 - 0
www/application/helper/text.php

@@ -0,0 +1,214 @@
+<?php
+
+
+    /**
+     * This function selects the language the page will be displayed on.
+     * 
+     * First, it tries to read the language cookie in the client. If none is
+     * set, get the browser language preference list. If none is provided or
+     * they are not supported, it will use the default language.
+     * 
+     * @param MySQL_connection $db Connection to the database.
+     * @return string Lowercase, two-letter language code.
+     */
+    function select_language($db){
+
+        // Get available languages from db
+        $available_languages = array();
+        $q_lang = mysqli_query($db, "SELECT code FROM lang WHERE active = 1;");
+        while ($r_lang = mysqli_fetch_array($q_lang)){
+            array_push($available_languages, $r_lang["code"]);
+        }
+
+        // Is there a language cookie installed on the client?.
+        header("Cache-control: private");
+        if (isSet($_COOKIE["lang"])){
+            $lang = $_COOKIE["lang"];
+            if (in_array($lang, $available_languages)){
+                header("Location: " . get_protocol() . $_SERVER["HTTP_HOST"] . "/" . $lang . $_SERVER["REQUEST_URI"]);
+                return $lang;
+            }
+        }
+
+        // If no cookie, select from client browser preferences.
+        $lang = prefered_language($available_languages, $_SERVER["HTTP_ACCEPT_LANGUAGE"]);
+        if (in_array($lang, $available_languages)){
+            header("Location: " . get_protocol() . $_SERVER["HTTP_HOST"] . "/" . $lang . $_SERVER["REQUEST_URI"]);
+            return $lang;
+        }
+
+        // If no method was succesfull, default language
+        $lang = $available_languages[0];
+        header("Location: " . get_protocol() . $_SERVER["HTTP_HOST"] . "/" . $lang . $_SERVER["REQUEST_URI"]);
+        return $lang;
+    }
+
+
+    /**
+     * This function parses the language prefrences of the client broser,
+     * comparing them to the languages offered by the site and selects the
+     * prefered one among the ones supported.
+     * 
+     * @param string[] available_languages List of lowercase, two-letter
+     *                                      language codes allowed by the site.
+     * @param string http_accept_language Raw header with info about client
+     *                                    language preferences.
+     * @return string Lowercase, two-letter code of the prefered available
+     *                language.
+     */
+    function prefered_language(array $available_languages, $http_accept_language) {
+
+        $available_languages = array_flip($available_languages);
+
+        $langs;
+        preg_match_all("~([\w-]+)(?:[^,\d]+([\d.]+))?~", strtolower($http_accept_language), $matches, PREG_SET_ORDER);
+        foreach($matches as $match) {
+
+            list($a, $b) = explode("-", $match[1]) + array("", "");
+            $value = isset($match[2]) ? (float) $match[2] : 1.0;
+
+            if(isset($available_languages[$match[1]])) {
+                $langs[$match[1]] = $value;
+                continue;
+            }
+
+            if(isset($available_languages[$a])) {
+                $langs[$a] = $value - 0.1;
+            }
+
+        }
+        arsort($langs);
+        return $langs[0];
+    }
+
+
+    /**
+     * This function turns a date string into a human readable string on the
+     * specified language. Only works for spanish, basque and english.
+     * 
+     * @param string $str_date Date string ('yyyy-mm-dd' or 'yyyy-mm-dd HH:MM:SS')
+     * @param string $lang Language code (es, en, eu).
+     * @param string $time Append the time at the end.
+     * @return string Formatted date string.
+     */
+    function format_date($str_date, $lang, $time = true){
+        $date = strtotime($str_date);
+        $year = date("o", $date);
+        $month = date("n", $date);
+        $month --;
+        $day = date("j", $date);
+        $wday = date("N", $date);
+        $wday --;
+        $hour = date("H", $date);
+        $minute = date("i", $date);
+        switch ($lang){
+            case "en":
+                $week = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];
+                $months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
+                if ($time){
+                    $str = "$week[$wday], $months[$month] $day, $year at $hour:$minute";
+                }
+                else{
+                    $str = "$week[$wday], $months[$month] $day, $year";
+                }
+                break;
+            case "eu":
+                $week = ["astelehena", "asteartea", "asteazkena", "osteguna", "ostirala", "larumbata", "igandea"];
+                $months = ["urtarrilaren", "otsailaren", "martxoaren", "apirilaren", "maiatzaren", "ekainaren", "uztailaren", "abuztuaren", "irailaren", "urriaren", "azaroaren", "abenduaren"];
+                if ($time){
+                    $str = $year . "ko $months[$month] $day" . "an, $week[$wday], $hour:$minute";
+                }
+                else{
+                    $str = $year . "ko $months[$month] $day" . "an, $week[$wday]";
+                }
+                break;
+            default:
+                $week = ["Lunes", "Martes", "Mi&eacute;rcoles", "Jueves", "Viernes", "S&aacute;bado", "Domingo"];
+                $months = ["enero", " febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"];
+                if ($time){
+                    $str = "$week[$wday] $day de $months[$month] de $year a las $hour:$minute";
+                }
+                else{
+                    $str = "$week[$wday] $day de $months[$month] de $year";
+                }
+        }
+        return $str;
+    }
+
+
+    /**
+     * Retrieves a text fragment from the database.
+     * 
+     * @param Page|Entity $model An initialized data model.
+     * @param string $id Text identifier.
+     * @returns string The text.
+     */
+    function text($model, $id){
+        global $path;
+        $q = mysqli_query($model->db, "SELECT text, file FROM text WHERE id = '$id' AND lang = '" . $model->lang . "';");
+        $r = mysqli_fetch_array($q);
+        if (strlen($r["file"]) > 0){
+            return file_get_contents($path["string"] . $r["file"]);
+        }
+        else{
+            return $r["text"];
+        }
+    }
+
+
+    /**
+     * This function closes all the opened HTML tags in a given string.
+     * 
+     * @param string html The string with HTML tags.
+     * @return string HTML with closed tags.
+     */
+    function close_tags($html) {
+        $result = [];
+        preg_match_all("#<(?!meta|img|br|hr|input\b)\b([a-z]+)(?: .*)?(?<![/|/ ])>#iU", $html, $result);
+        $openedtags = $result[1];
+        preg_match_all("#</([a-z]+)>#iU", $html, $result);
+        $closedtags = $result[1];
+        $len_opened = count($openedtags);
+        if (count($closedtags) == $len_opened) {
+            return $html;
+        }
+        $openedtags = array_reverse($openedtags);
+        for ($i=0; $i < $len_opened; $i++) {
+            if (!in_array($openedtags[$i], $closedtags)) {
+                $html .= "</".$openedtags[$i].">";
+            } else {
+                unset($closedtags[array_search($openedtags[$i], $closedtags)]);
+            }
+        }
+        return $html;
+    }
+
+
+    /**
+     * Text shortener. Given a string, it trims in the proximity of the
+     * desired string, up to the next white character. If indicated, it will
+     * append a link to the full text.
+     * 
+     * @param string $text The text to shorten.
+     * @param int $length The desired length.
+     * @param string $link_text Text for the link. Optional.
+     * @param string $link URI of the link.
+     * @return string Shortened text.
+     */
+     function cut_text($text, $length, $link_text = "", $link = ""){
+        if (strlen($text) < $length){
+            return $text;
+        }
+        $cut = substr($text, 0, strpos($text, " ", $length));
+        $cut = close_tags($cut);
+        if (strlen($cut) == 0){
+            $cut = $text;
+        }
+        if (strlen($text) != strlen($cut) && strlen($link) > 0 && strlen($link_text) > 0){
+            $cut = $cut . "... <a href='$link'>$link_text</a>";
+        }
+        return $cut;
+    }
+
+?>
+

+ 87 - 0
www/public/.htaccess

@@ -0,0 +1,87 @@
+Options -MultiViews
+
+
+#
+# REWRITES
+#
+# Used to: Force https.
+#
+<IfModule mod_rewrite.c>
+	# Force https
+	RewriteCond %{HTTPS} !=on
+	RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
+</ifModule>
+
+
+#
+# FALLBACKRESOURCE
+#
+# Used to: all pages to index.php
+#
+FallbackResource /index.php
+
+
+#
+# EXPIRES
+#
+# Used to: control the cache times of the different files on the server.
+#
+<IfModule mod_expires.c>
+        ExpiresActive on
+        ExpiresDefault "access plus 2 days"
+        ExpiresByType application/javascript "access plus 6 days"
+        ExpiresByType image/x-ico "access plus 12 days"
+        ExpiresByType image/jpg "access plus 12 days"
+        ExpiresByType image/jpeg "access plus 12 days"
+        ExpiresByType image/gif "access plus 12 days"
+        ExpiresByType image/png "access plus 12 days"
+        ExpiresByType video/mkv "access plus 12 days"
+        #ExpiresByType text/css "access plus 6 days"
+        ExpiresByType text/plain "access plus 6 days"
+</IfModule>
+
+
+#
+# HEADERS
+#
+# Used to: control the cache times of the different files on the client.
+#
+<ifModule mod_headers.c>
+	<filesMatch "\.(ico|jpe?g|png|gif|swf)$">
+		Header set Cache-Control "max-age=864000, public, must-revalidate"
+	</filesMatch>
+#	<filesMatch "\.(css)$">
+#		Header set Cache-Control "max-age=864000, public, must-revalidate"
+#	</filesMatch>
+	<filesMatch "\.(js)$">
+		Header set Cache-Control "max-age=864000, private, must-revalidate"
+	</filesMatch>
+	<filesMatch "\.(x?html?|php)$">
+		Header set Cache-Control "max-age=86400, private, must-revalidate"
+	</filesMatch>
+</ifModule>
+
+AddType image/svg+xml svg svgz
+<ifModule mod_deflate.c>
+	AddOutputFilterByType DEFLATE text/html text/xml text/css text/plain
+	AddOutputFilterByType DEFLATE image/x-icon
+	AddOutputFilterByType DEFLATE image/svg+xml application/xhtml+xml application/xml
+	AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml
+	AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript application/json
+	AddOutputFilterByType DEFLATE application/x-font-ttf application/x-font-otf
+	AddOutputFilterByType DEFLATE font/truetype font/opentype
+</ifModule>
+
+
+#
+# ERROR
+#
+# Used to: redirect to nice error pages.
+#
+ErrorDocument 400 /error.php
+ErrorDocument 401 /error.php
+ErrorDocument 403 /error.php
+ErrorDocument 404 /error.php
+ErrorDocument 500 /error.php
+
+

+ 43 - 0
www/public/css/error.css

@@ -0,0 +1,43 @@
+div.section{
+    width: 60%;
+    min-width: 20em;
+    max-width: 80em;
+    margin: auto;
+}
+
+table#error_header{
+    width: 80%;
+    margin: 2em auto 2em auto;
+}
+
+table#error_header td{
+    width: 50%;
+}
+
+table#error_code{
+    display: inline-block;
+    margin-left: 10%;
+    border: 0.1em solid #000011;
+    border-radius: 1em;
+    padding: 0.5em 0 0.5em 0;
+    background-color: #1e9957;
+    filter: drop-shadow(0 0 0.4em #002200);
+    color: #ffffff;
+}
+
+td#error_number{
+    font-size: 300%;
+    border-right: 0.063em solid #000000;
+    padding-right: 0.5em;
+    padding-left: 0.2em;
+}
+td#error_tag{
+    font-size: 110%;
+    padding-left: 1.2em;
+    padding-right: 1em;
+}
+div#error_message{
+    width: 80%;
+    margin: 0 10% 1em 10%;
+    margin-bottom: 4em;
+}

+ 24 - 0
www/public/css/home.css

@@ -0,0 +1,24 @@
+/* Profile section. */
+div#left{
+    display: inline-block;
+    vertical-align: top;
+    width: 46%;
+    margin: 0;
+    padding: 1em;
+}
+
+div#left div#profile_container img#profile{
+    width: 200px;
+    height: 200px;
+    border: 0.2em solid #446644;
+    border-radius: 1em 5em;
+}
+
+/* Projects section. */
+div#right{
+    display: inline-block;
+    vertical-align: top;
+    width: 46%;
+    margin: 0;
+    padding: 1em;
+}

+ 0 - 0
www/public/css/m/error.css


+ 22 - 0
www/public/css/m/home.css

@@ -0,0 +1,22 @@
+div#content {
+    display: initial;
+}
+
+div#content div#content_row{
+    display: initial;
+    margin: 0;
+    padding: 0;
+}
+
+div#content div#content_row div.content_cell{
+    display: initial;
+    margin: 0;
+}
+
+div#content div#content_row div#content_cell_profile{
+    width: initial;
+}
+
+div#content div#content_row div#content_cell_content{
+    width: initial;
+}

+ 0 - 0
www/public/css/m/profile.css


+ 22 - 0
www/public/css/m/project.css

@@ -0,0 +1,22 @@
+div#content {
+    display: initial;
+}
+
+div#content div#content_row{
+    display: initial;
+    margin: 0;
+    padding: 0;
+}
+
+div#content div#content_row div.content_cell{
+    display: initial;
+    margin: 0;
+}
+
+div#content div#content_row div#content_cell_main{
+    width: initial;
+}
+
+div#content div#content_row div#content_cell_right{
+    width: initial;
+}

+ 64 - 0
www/public/css/m/ui.css

@@ -0,0 +1,64 @@
+    .desktop{
+        display: none;
+    }
+
+    .mobile{
+        display: initial !important;
+    }
+
+    nav#header span.header_container {
+        min-width: 2em;
+        margin-right: 0.2em;
+        margin-left: 0.2em;
+        padding-left: 0.2em;
+        padding-top: 0.3em;
+        padding-bottom: 0.3em;
+        padding-right: 0.2em;
+    }
+
+    nav#header span.header_container:hover {
+        border: 0.06em solid #ffffff00;
+        background-color: #ffffff00;
+    }
+
+    nav#header img.header_icon{
+        opacity: 1;
+        width: 1.2em;
+        height: 1.2em;
+    }
+
+    hr#header_separator{
+        width: 90%;
+        margin-top: 1em;
+        margin-bottom: 1em;
+    }
+
+    div#footer table#footer_table{
+        width: 95%;
+    }
+
+    div#footer img.footer_social_icon{
+        width: 2em;
+        margin: 0.2em;
+    }
+
+    div#footer a.lang img{
+        height: 1.5em;
+        margin: 0.2em;
+        border-radius: 0.1em;
+        border: 0.1em solid #555555;
+        box-shadow: 0 0 0 #dde;
+    }
+
+    div#footer a.lang img:hover{
+        box-shadow: 0 0 0 #111;
+    }
+
+    div.section{
+        margin: 1em;
+    }
+
+    div.section div.entry_list{
+        background-color: #efffef;
+        border: 0.1em solid #aaffaaff;
+    }

+ 0 - 0
www/public/css/m/ui.scc


+ 74 - 0
www/public/css/profile.css

@@ -0,0 +1,74 @@
+div#left a.profile_button{
+    display: block;
+    width: 70%;
+    margin: 1em auto 1em auto;
+    border: 0.2em solid #007700;
+    background-color: #aaffaa;
+    font-weight: bold;
+}
+
+div#left a.profile_button img{
+    display: inline-block;
+    vertical-align: middle;
+}
+
+
+
+div#right div#profile{
+    display: table;
+}
+
+div#right div#profile div.table_row{
+    diplay: table-row;
+}
+
+div#right div#profile div.table_row div.table_cell{
+    display: table-cell;
+    vertical-align: middle;
+}
+
+div#right div#profile img{
+    max-width: 10em;
+    max-height: 10em;
+    border-radius: 1.2em;
+    margin: 1em;
+    border: 0.3em solid #000000;
+}
+
+div#right div.cv_entry{
+    margin: 0.5em;
+}
+
+div#right div.cv_entry h4.cv_entry_title{
+    padding-left: 1em;
+    font-weight: bold;
+    font-size: 130%;
+    border-bottom: 0.1em solid #00330077;
+    margin-bottom: 0em;
+    border-bottom-left-radius: 0.5em;
+}
+
+div#right div.role{
+    margin: 0em 1em 0 1em;
+    border-left: 0.1em solid #00330077;
+}
+
+div#right div.role h4{
+    border-bottom: 0.1em solid #00330077;
+    font-weight: bold;
+    font-size: 130%;
+    margin-left: 0;
+    margin-bottom: 0.2em;
+    padding: 0 1em 0 0.4em;
+    display: inline-block;
+}
+
+div#right div.role h5{
+    font-style: italic;
+    margin: 0.5em 1em 0.5em 1em;
+}
+
+div#right div.role p{
+    margin: 0.5em 2em 0 2em;
+    padding-bottom: 1em;
+}

+ 0 - 0
www/public/css/profile.js


+ 77 - 0
www/public/css/project.css

@@ -0,0 +1,77 @@
+div#info{
+    display: inline-block;
+    width: 60%;
+    vertical-align: top;
+}
+
+div#info h4#summary{
+    margin: 2em;
+    font-style: italic;
+}
+
+div#info p#text{
+    margin: 2em;
+}
+
+div#info p#text img#logo{
+    width: 6em;
+    height: 6em;
+    border: 0.1em solid #000000;
+    float: left;
+    margin: 0.5em 1.5em 1.5em 0.5em;
+    border-radius: 0.5em;
+}
+
+div#info div#image_reel{
+    margin: 2em auto 1em auto;
+    width: 80%;
+    overflow-x: scroll;
+    border: 0.1em solid #000000;
+    background-color: #aaaaaa;
+    text-align: center;
+}
+
+div#info div#image_reel table tr td img{
+    max-height: 7em;
+    max-width: 7em;
+    border: 0.2em solid #777777;
+    border-radius: 0.2em;
+    background-color: #ffffff;
+    margin: 0.5em;
+}
+
+div#details{
+    display: inline-block;
+    width: 30%;
+    vertical-align: top;
+}
+
+div#details div.details{
+    margin: 0.5em 1.5em 0.5em 1.5em;
+}
+
+div#details div.details hr.details_separator{
+    margin: 1em -0.5em 0.5em -0.5em;
+}
+
+div#details div#tags a.tag{
+    font-style: italic;
+    font-size: 90%;
+}
+
+div#details div#links a.link{
+    display: block;
+    margin-bottom: 1em;
+}
+
+div#details div#links a.link img.link{
+    vertical-align: middle;
+    width: 1.5em;
+    height: 1.5em;
+}
+
+div#details div#license img{
+    max-width: 8em;
+    max-height: 2em;
+    vertical-align: bottom;
+}

+ 45 - 0
www/public/css/projects.css

@@ -0,0 +1,45 @@
+/* Projects page */
+div#project_list{
+    width: 100%;
+    margin: 0;
+    padding: 0;
+    text-align: center;
+}
+
+div#project_list div.project{
+    position: relative;
+    display: inline-block;
+    height: 7em;
+    width: 27em;
+    margin: 1em;
+    padding: 1em;
+    border: 0.1em solid #000000;
+    border-left: 1.5em solid #000000;
+    text-align: left;
+    transition: all 1s ease-in-out;
+}
+div#project_list div.project:hover{
+    border: 0.1em solid #00ff00;
+    border-left: 1.5em solid #00ff00;
+}
+
+div#project_list div.project table{
+    width: 100%;
+}
+
+div#project_list div.project table img.project_logo{
+    height: 4em;
+    width: 4em;
+    border: 0.1em solid #000000;
+    border-radius: 0.3em;
+}
+
+div#project_list div.project table h4.project_name{
+    margin: 0.1em;
+    text-align: center;
+}
+
+div#project_list div.project table span.project_tagline{
+    font-size: 80%;
+    font-style: italic;
+}

+ 580 - 0
www/public/css/ui.css

@@ -0,0 +1,580 @@
+/* Website fonts. */
+@font-face {
+    font-family: 'Nunito'; 
+    src:  url('/fonts/Nunito-Regular.ttf'); 
+}
+@font-face {
+    font-family: 'Latin'; 
+    src:  url('/fonts/Latin-Modern-Mono-Light-Bold.otf');
+}
+
+/* Elements to be shown only in large screens. */
+.desktop{
+    display: initial;
+}
+@media screen and (max-width : 990px){
+    .desktop{
+        display: none;
+    }
+}
+
+/* Elements to be shown only in small screens. */
+.mobile{
+    display: none;
+}
+@media screen and (max-width : 990px){
+    .mobile{
+        display: initial !important;
+    }
+}
+
+/* Styles for the body of the page. */
+html {
+    height: 100%;
+}
+
+body{
+    height: 100%;
+    padding: 0;
+    margin: 0;
+    background-color: #000000;
+}
+
+/* Style for all links. */
+a{
+    color: #555555;
+    text-shadow: 0 0 0.5em #7777ff;
+    text-decoration: none;
+}
+
+/* Styles for elements that look and act as links. */
+.fake_a{
+    color: #555555;
+    text-shadow: 0 0 0.5em #7777ff;
+    text-decoration: none;
+    cursor: pointer;
+}
+
+
+/* Bold elements. */
+.bold{
+    font-weight: bold;
+}
+
+/* Elements that look and act as buttons or links.*/
+.pointer {
+    cursor: pointer;
+}
+
+/* Hidden elements. */
+.hidden{
+    display: none;
+}
+
+img.slider{
+    width: 1em;
+    height: 1em;
+    vertial-align: middle;
+    transition: all .3s ease-in-out;
+}
+
+div#cover{
+    display: none;
+    background-color: #000000bb;
+    opacity: 0;
+    transition: opacity .3s ease-in-out;
+    position: fixed;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+}
+
+
+div#header{
+    background-color: #000000;
+    width: 100%;
+    text-align: center;
+}
+
+div#header div#logo{
+	color: #ffffff;
+    font-size: 4em;
+    font-family: 'Latin';
+}
+
+div#header nav a{
+	font-size: 1.5em;
+    margin: 0.5em;
+    color: #ffffff;
+    text-decoration: none;
+    position: relative;
+}
+div#header nav a:hover{
+	color: #ffffff;
+}
+div#header nav a:before {
+	content: " ";
+	position: absolute;
+	width: 100%;
+	height: 0.1em;
+	bottom: -0.1em;
+	left: 0;
+	background-color: #ffffff;
+	visibility: hidden;
+	transform: scaleX(0);
+	transition: all 0.3s ease-in-out 0s;
+}
+div#header nav a:hover:before {
+  	visibility: visible;
+  	transform: scaleX(1);
+}
+div#header nav a img{
+	height: 1.5em;
+    vertical-align: bottom;
+}
+
+/* The actual footer */
+div#footer{
+    background-color: #000000;
+    font-size: 80%;
+    text-align: center;
+    height: 3.5em;
+    margin-left: auto;
+    margin-right: auto;
+    margin-top: 3em;
+    margin-bottom: 2em;
+    color: #dddddd;
+    bottom: 0;
+    left: 0;
+    padding: 1em 2em 3em 2em;
+}
+
+/* A table containing all the elements in the footer */
+div#footer table#footer_table{
+    margin-left: auto;
+    margin-right: auto;
+    width: 80%;
+    table-layout: fixed;
+}
+@media screen and (max-width : 990px){
+    div#footer table#footer_table{
+        width: 95%;
+    }
+}
+
+/* An horizontal line separating the page contents from the footer. */
+div#footer table#footer_table hr#footer_separator{
+    border: 0;
+    background-color: #444444;
+    height: 0.1em;
+    width: 70%;
+}
+
+/* Left area of the footer. */
+div#footer table#footer_table td#footer_left{
+    width: 33%;
+    text-align: center;
+}
+
+/* Social label. */
+div#footer table#footer_table td#footer_left span#footer_follow{
+    display: block;
+    margin: 0 0 1em 0;
+}
+
+/* Icons for social media */
+div#footer table#footer_table td#footer_left img.footer_social_icon{
+    width: 2em;
+    margin: 0.2em;
+    vertical-align: middle;
+    background-color: #ffffff;
+    border: 0.1em solid #ffffff;
+    border-radius: 0.3em;
+}
+
+/* Middle area of the footer */
+div#footer table#footer_table td#footer_center{
+    width: 33%;
+    text-align: center;
+}
+
+/* Right area of the footer */
+div#footer table#footer_table td#footer_right{
+    width: 33%;
+    text-align: center;
+}
+
+/* Help link. */
+div#footer table#footer_table td#footer_right span#footer_help{
+    display: block;
+    margin: 0 0 1em 0;
+}
+
+/* Language flags. */
+div#footer table#footer_table td#footer_right a.lang img{
+    height: 1em;
+    margin: 0.5em;
+    border-radius: 0.2em;
+    border: 0.15em solid #555555;
+    cursor: pointer;
+    box-shadow: 0 0 0.7em #dde;
+    transition: all .3s ease-in-out;
+}
+div#footer table#footer_table td#footer_right a.lang img:hover{
+    box-shadow: 0 0 1em #111;
+}
+@media screen and (max-width : 990px){
+    div#footer table#footer_table td#footer_right a.lang img{
+        height: 1.5em;
+        margin: 0.2em;
+        border-radius: 0.1em;
+        border: 0.1em solid #555555;
+        box-shadow: 0 0 0 #dde;
+    }
+}
+
+
+/* The content is everything between the header and the footer */
+div#content{
+    background-color: #000000;
+    width: 100%;
+}
+
+div.section{
+    margin: 0.5em;
+    padding: 1em;
+    background-color: #ffffff;
+    border: 0.2em solid #666666;
+    overflow: hidden;
+}
+@media screen and (max-width : 990px){
+    div.section{
+        margin: 1em;
+    }
+}
+
+div.section h3.section_title{
+	font-weight: bold;
+	color: #ffffff;
+	background-color: #000000;
+	border: 0.2em solid #666666;
+	font-size: 150%;
+	padding: 0.2em 0.5em 0.2em 0.5em;
+	margin: -1em -1em 1em -1em;
+}
+
+div.section h3.section_title:before {
+	content: " /";
+
+/* .entry is a style only class to show content. Must be allways children os a .lighted element */
+div.section div.entry{
+    border: 0.1em solid #aaffaa00;
+    border-radius: 0.3em;
+    padding: 0.5em;
+    margin: 0.5em;
+    transition: all .4s ease-in-out;
+}
+
+div.section div.entry_list:hover{
+    background-color: #efffef;
+    border: 0.1em solid #aaffaaff;
+}
+
+
+
+/* Style for the mathces in search results */
+span.result_counter{
+    margin-left: 1.2em;
+    margin-bottom: 0.5em;
+    font-weight: bold;
+    font-style: italic;
+}
+
+/* Shown when no records on database */
+div.unavailable{
+    margin-left: 4em;
+    font-style: italic;
+}
+
+
+/**********************************
+ * Styles to be applied to some   *
+ * horizontally scrollable        *
+ * elements                       *
+ **********************************/
+
+/* Horizontall scrollbar that apears when a project has lots of renders */
+.slider::-webkit-scrollbar{
+    width: 0.5em;
+    height: 0.25em;
+    background-color: #444444;
+} 
+.slider::-webkit-scrollbar-thumb{
+    background-color: #cccccc;
+    border-radius: 0.714em;
+}
+.slider::-webkit-scrollbar-thumb:hover{
+    background-color: #cccccc;
+    border: 0.143em solid #000000;
+}
+.slider::-webkit-scrollbar-thumb:active{
+    background-color: #cccccc;
+    border: 0.143em solid #000000;
+}
+
+/* Icons for sharing page in a social network */
+img.social_icon{
+    width: 3em;
+    height: 3em;
+}
+
+/* Elements that should have the cursor as pointer */
+.pointer{
+    cursor: pointer;
+}
+
+
+
+/**********************************
+ * Styles for diverse input       *
+ * elements. Type-assigned        *
+ **********************************/
+
+/* Font for all the input elements */
+input{
+    font-family: 'Nunito';
+}
+
+/* Style for the "submit" type elements in forms */
+input[type=submit]{
+    font-weight: bold;
+    color: #cccccc;
+    background-color: #555555;
+    border: 0.143em solid #bbbbbb;
+    border-radius: 0.429em;
+    padding: 0.5em;
+    text-shadow: 0 0 0.75em #000000;
+    cursor: pointer;
+}
+
+/* Style forr buttons */
+input[type=button]{
+    font-weight: bold;
+    color: #cccccc;
+    background-color: #555555;
+    border: 0.143em solid #bbbbbb;
+    border-radius: 0.429em;
+    padding: 0.5em;
+    text-shadow: 0 0 0.75em #000000;
+    cursor: pointer;
+}
+
+/* Style for textboxes */
+input[type=text]{
+    font-weight: bold;
+    color: #224422;
+    background-color: #bbccbb;
+    border: 0.286em solid #ddeedd; 
+    border-color: #dddddd;
+    border-radius: 0.429em;
+    padding: 0.25em;
+    text-shadow: 0 0 0.5em #ffffff;
+}
+
+input[type=checkbox]{
+    width: 1em;
+    height: 1em;
+    border-radius: 0.2em;
+    border: 0.063em solid #005500;
+}
+
+/* Style for textareas */
+textarea{
+    width: 80%;
+    font-weight: bold;
+    color: #444444;
+    background-color: #bbbbbb;
+    border: 0.286em solid #dddddd; 
+    border-color: #dddddd;
+    border-radius: 0.286em;
+    padding: 0.25em;
+    text-shadow: 0 0 0.5em #ffffff;
+    resize: none;
+}
+
+/* Style for selects */
+select{
+    font-weight: bold;
+    color: #444444;
+    background-color: #bbbbbb;
+    border: 0.286em solid #dddddd; 
+    border-radius: 0.286em;
+    padding: 0.25em;
+    text-shadow: 0 0 0.5em #ffffff;
+}
+
+/* Style for placeholders in input fields */
+::-webkit-input-placeholder { /* WebKit browsers */
+    color: #777777;
+}
+:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
+    color: #777777;
+}
+::-moz-placeholder { /* Mozilla Firefox 19+ */
+    color: #777777;
+}
+:-ms-input-placeholder { /* Internet Explorer 10+ */
+    color: #777777;
+}
+
+/* Style-only class user to indicate that a field is incorrect. Ususally this class is added to an element with js */
+.error{
+    border-color: #ffaaaa;
+}
+
+/* Style for the textbox input when the entered text is not the expected one */
+input[type=text].error{
+    border-color: #ffaaaa;
+}
+
+/* Style for the textared input when the entered text is not the expected one */
+textarea.error{
+    border-color: #ffaaaa;
+}
+
+/* Style for buttons that act as links */
+a.a_button{
+    display: inline-block;
+    color: #cccccc;
+    background-color: #555555;
+    border: 0.143em solid #bbbbbb;
+    border-radius: 0.429em;
+    padding: 0.5em;
+    text-shadow: 0 0 0.75em #000000;
+    text-decoration: none;
+    font: -webkit-small-control;
+    font-family: 'Nunito';
+    font-weight: bold;
+}
+
+/**********************************
+ * Styles for comment-related     *
+ * elements                       *
+ **********************************/
+
+/* Contains fields to identify the user before the comment can be posted. Hidden by css, must be displayed with js */
+div#identification_form{
+    display: none;
+}
+
+/* Contain a comment, with the details and the text */
+div.comment{
+    background-color: #efffef;
+    border: 0.1em solid #aaffaa;
+    border-radius: 0.3em;
+    padding: 0.5em;
+    margin: 0.5em;
+}
+
+/* User who posted the coment */
+div.comment h4.comment_user{
+    margin-top: 0.417em;
+    margin-bottom: 0;
+}
+
+div.comment h4.comment_user span.comment_user_registered{
+    font-weight: bold;
+    font-size: 110%;
+    color: #005500;
+}
+
+/* Style for the comment's images */
+img.comment_image{
+    border: 0.077em solid black;
+    max-height: 6em;
+    max-width: 60%;
+    display: block;
+    vertical-align: top;
+    border: 0.133em solid black;
+    margin-left: 0.938em;
+    margin-bottom: 0.938em;
+    box-shadow: 0 0 1em #444444;
+}
+
+/* Paragraph with the comment text */
+p.comment_text{
+    vertical-align: top;
+    width: auto;
+    display: block;
+    margin-top: 0.938em;
+    margin-left: 0.938em;
+}
+
+span.comment_date{
+    font-size: 80%;
+    font-style: italic;
+}
+
+/* Input field for the comment text */
+textarea#new_comment_text{
+    width: 98%;
+}
+
+/* Input field for the comment user */
+input#new_comment_user{
+    width: 47%;
+}
+
+/* Input field for the comment email */
+input#new_comment_email{
+    width: 47%;
+}
+
+/* Styles so the input field to upload an image with the comment looks like a button */
+label.image_upload {
+    font-weight: bold;
+    color: #cccccc;
+    background-color: #555555;
+    border: 0.067em solid #bbbbbb;
+    border-radius: 0.2em;
+    padding: 0.5em;
+    text-shadow: 0 0 0.750em #000000;
+    font-size: 0.813em; /*Same as buttons*/
+    font-family: 'Nunito';
+}
+
+label.image_upload input {
+    width: 0 !important;
+    opacity: 0 !important;
+    overflow: hidden !important;
+}
+
+/* Previsualization for the upload image in a comment */
+img#new_comment_image_preview{
+    max-height: 7.692em;
+    max-width: 11.538em;
+}
+
+
+/**********************************
+ * Styles for the social buttons. *
+ **********************************/
+
+a.share img.share{
+    display: inline-block;
+    vertical-align: top;
+    overflow: hidden;
+    width: 1.6em;
+    height: 1.6em;
+    border: 0.1em solid #003300;
+    border-radius: 2em;
+    box-shadow: 0 0 0.3em #005500;
+    margin: 0.2em;
+    transition: all .3s ease-in-out;
+}
+
+a.share img.share:hover{
+    box-shadow: 0 0 0.7em #005500;
+    border-radius: 0.7em;
+}

+ 91 - 0
www/public/error.php

@@ -0,0 +1,91 @@
+<?php
+    error_log("ERROR " . http_response_code());
+    return;
+    session_start();
+    $http_host = $_SERVER["HTTP_HOST"];
+    $doc_root = $_SERVER["DOCUMENT_ROOT"] . "/";
+    include $doc_root . "functions.php";
+    $proto = get_protocol();
+    $con = start_db();
+    $server = $proto . $http_host;
+    $lang = select_language($con);
+    $lserver = $server . "/" . $lang;
+    $cur_section = "error";
+    $cur_entry = http_response_code();
+    stats($con, $cur_section, $cur_entry);
+    $error = $cur_entry;
+    if (!in-array($error, array("400", "401", "403", "404", "500"))){
+        $error = "XXX";
+    }
+?>
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta content='text/html; charset=windows-1252' http-equiv='content-type'/>
+        <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1'>
+        <title><?=text($con, "ERROR_TITLE", $lang);?> - <?=text($con, "USER_NAME", $lang);?></title>
+        <link rel='shortcut icon' href='<?=$lserver?>/img/logo/favicon.ico'>
+                <!-- CSS files -->
+        <style>
+<?php
+            include $doc_root . "css/ui.css";
+            include $doc_root . "css/error.css";
+?>
+        </style>
+        <!-- CSS for mobile version -->
+        <style media="(max-width : 990px)">
+<?php
+            include $doc_root . "css/m/ui.css";
+            include $doc_root . "css/m/error.css";
+?>
+        </style>
+        <meta name="robots" content="noindex follow"/>
+    </head>
+    <body>
+        <div id='body'>
+            <div id='body_row'>
+                <div id='left'>
+                    <div id='logo'>
+                        <img id='logo' src='<?=$lserver?>/img/logo/x6/inigovalentin.png' alt='<?=text($con, "USER_NAME", $lang);?>'/>
+                    </div>
+                    <table id='error_code' class='entry'>
+                        <tr>
+                            <td id='error_number'>
+                                404
+                            </td>
+                            <td id='error_tag'>
+                                <?=text($con, "ERROR_ERROR", $lang);?>
+                                <br/>
+                                <?=text($con, "ERROR_CODE", $lang);?>
+                            </td>
+                        <tr>
+                    </table>
+<?php
+                    include $doc_root . "footer.php";
+?>
+                </div> <!-- left -->
+                <div id='right'>
+                    <div id='error_message' class='entry'>
+                        <?=text($con, "ERROR_" . $error . "_DESCRIPTION", $lang);?>
+                        <br/><br/>
+                        <?=text($con, "ERROR_" . $error . "_SOLUTION", $lang);?>
+                        <ul>
+                            <li>
+                                <a href='javascript: location.reload();'><?=text($con, "ERROR_" . $error . "_SOLUTION_0", $lang);?></a>
+                            </li>
+                            <li>
+                                <a href='javascript: history.go(-1);'><?=text($con, "ERROR_" . $error . "_SOLUTION_1", $lang);?></a>
+                            </li>
+                            <li>
+                                <a href='<?=$lserver?>/'><?=text($con, "ERROR_" . $error . "_SOLUTION_2", $lang);?></a>
+                            </li>
+                        </ul>
+                    </div> <!-- #error_message -->
+                </div>
+            </div> <!-- #body_row -->
+        </div> <!-- #body -->
+    </body>
+</html>
+<?php
+    http_response_code($cur_entry);
+?>

BIN
www/public/fonts/Latin-Modern-Mono-Light-Bold.otf


BIN
www/public/fonts/Nunito-Bold.ttf


BIN
www/public/fonts/Nunito-Light.ttf


BIN
www/public/fonts/Nunito-Regular.ttf


+ 93 - 0
www/public/fonts/OFL.txt

@@ -0,0 +1,93 @@
+Copyright (c) 2011, Vernon Adams (vern@newtypography.co.uk),
+with Reserved Font Name Nunito.
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded, 
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.

BIN
www/public/img/content/license/CC-0.png


BIN
www/public/img/content/license/CC-BY-SA.png


BIN
www/public/img/content/license/GPLV3.png


BIN
www/public/img/content/license/icon/CC-0.png


BIN
www/public/img/content/license/icon/CC-BY-SA.png


BIN
www/public/img/content/license/icon/GPLV3.png


BIN
www/public/img/content/license/logo/CC-0.png


BIN
www/public/img/content/license/logo/CC-BY-SA.png


BIN
www/public/img/content/license/logo/GPLV3.png


BIN
www/public/img/content/license/x1/CC-0.png


BIN
www/public/img/content/license/x1/CC-BY-SA.png


BIN
www/public/img/content/license/x1/GPLV3.png


BIN
www/public/img/content/license/x2/CC-0.png


BIN
www/public/img/content/license/x2/CC-BY-SA.png


BIN
www/public/img/content/license/x2/GPLV3.png


BIN
www/public/img/content/license/x3/CC-0.png


BIN
www/public/img/content/license/x3/CC-BY-SA.png


BIN
www/public/img/content/license/x3/GPLV3.png


BIN
www/public/img/content/license/x4/CC-0.png


BIN
www/public/img/content/license/x4/CC-BY-SA.png


BIN
www/public/img/content/license/x4/GPLV3.png


BIN
www/public/img/content/license/x5/CC-0.png


Some files were not shown because too many files changed in this diff