Kaynağa Gözat

MVC architecture. Redesign in progress.

Iñigo Valentin 7 yıl önce
ebeveyn
işleme
e361552228
100 değiştirilmiş dosya ile 421 ekleme ve 4749 silme
  1. 0 239
      sql/00_STRUCTURE.SQL
  2. 0 37
      sql/01_PERMISSIONS.SQL
  3. 1 1
      sql/01_structure.sql
  4. 0 553
      sql/02_DATA.SQL
  5. 1 1
      sql/02_security.sql
  6. 0 8
      sql/__SETUP.SQL
  7. 0 31
      www-admin/blog/delete.php
  8. 0 28
      www-admin/blog/deletecomment.php
  9. 0 295
      www-admin/blog/edit.php
  10. 0 149
      www-admin/blog/index.php
  11. 0 20
      www-admin/blog/new.php
  12. 0 28
      www-admin/blog/uploadimage.php
  13. 0 29
      www-admin/blog/visible.php
  14. 0 127
      www/.htaccess
  15. 2 2
      www/application/Controller.php
  16. 0 56
      www/application/class/controller/controller.php
  17. 0 37
      www/application/class/model/Profile_Page.php
  18. 0 60
      www/application/class/model/home.php
  19. 0 7
      www/application/class/model/model.php
  20. 0 100
      www/application/class/view/profile.php
  21. 1 6
      www/application/config/auth.php
  22. 9 12
      www/application/config/config.php
  23. 109 0
      www/application/entity/Cv.php
  24. 71 0
      www/application/entity/Cv_Category.php
  25. 0 0
      www/application/entity/Entity.php
  26. 2 2
      www/application/entity/Footer.php
  27. 1 1
      www/application/entity/Lang.php
  28. 1 1
      www/application/entity/License.php
  29. 9 9
      www/application/entity/Project.php
  30. 1 1
      www/application/entity/Project_Comment.php
  31. 1 1
      www/application/entity/Project_Image.php
  32. 1 1
      www/application/entity/Project_Tag.php
  33. 1 1
      www/application/entity/Project_Type.php
  34. 2 2
      www/application/entity/Project_Url.php
  35. 1 1
      www/application/entity/Project_Url_Type.php
  36. 2 2
      www/application/entity/Project_Version.php
  37. 1 1
      www/application/entity/Project_Version_Type.php
  38. 1 1
      www/application/entity/Social.php
  39. 7 6
      www/application/helper/text.php
  40. 2 2
      www/application/page/Footer_Page.php
  41. 1 1
      www/application/page/Help_Page.php
  42. 2 2
      www/application/page/Home_Page.php
  43. 1 1
      www/application/page/Page.php
  44. 69 0
      www/application/page/Profile_Page.php
  45. 2 2
      www/application/page/Project_Page.php
  46. 2 2
      www/application/page/Projects_Page.php
  47. 0 0
      www/application/view/cv.php
  48. 0 0
      www/application/view/help.php
  49. 12 12
      www/application/view/home.php
  50. 2 2
      www/application/view/inc/footer.php
  51. 3 3
      www/application/view/inc/header.php
  52. 63 0
      www/application/view/profile.php
  53. 25 13
      www/application/view/project.php
  54. 7 7
      www/application/view/projects.php
  55. 0 0
      www/application/view/rss.php
  56. 5 5
      www/application/view/skills.php
  57. 0 0
      www/application/view/string/LICENSE_CC-BY-SA_SUMMARY__EN
  58. 0 0
      www/application/view/string/LICENSE_CC-BY-SA_SUMMARY__ES
  59. 0 0
      www/application/view/string/LICENSE_CC-BY-SA_SUMMARY__EU
  60. 0 0
      www/application/view/string/LICENSE_CC-BY-SA__EN
  61. 0 0
      www/application/view/string/LICENSE_CC-BY-SA__ES
  62. 0 0
      www/application/view/string/LICENSE_CC-BY-SA__EU
  63. 0 0
      www/application/view/string/LICENSE_GPLV3_SUMMARY__EN
  64. 0 0
      www/application/view/string/LICENSE_GPLV3_SUMMARY__ES
  65. 0 0
      www/application/view/string/LICENSE_GPLV3_SUMMARY__EU
  66. 0 0
      www/application/view/string/LICENSE_GPLV3__EN
  67. 0 0
      www/application/view/string/LICENSE_GPLV3__ES
  68. 0 0
      www/application/view/string/LICENSE_GPLV3__EU
  69. 0 245
      www/blog/index.php
  70. 0 382
      www/blog/post.php
  71. 0 247
      www/css/blog.css
  72. 0 43
      www/css/error.css
  73. 0 86
      www/css/home.css
  74. 0 0
      www/css/m/blog.css
  75. 0 0
      www/css/m/error.css
  76. 0 22
      www/css/m/home.css
  77. 0 0
      www/css/m/profile.css
  78. 0 22
      www/css/m/project.css
  79. 0 64
      www/css/m/ui.css
  80. 0 0
      www/css/m/ui.scc
  81. 0 58
      www/css/profile.css
  82. 0 296
      www/css/project.css
  83. 0 592
      www/css/ui.css
  84. 0 91
      www/error.php
  85. BIN
      www/fonts/Nunito-Bold.ttf
  86. BIN
      www/fonts/Nunito-Light.ttf
  87. BIN
      www/fonts/Nunito-Regular.ttf
  88. 0 93
      www/fonts/OFL.txt
  89. 0 38
      www/footer.php
  90. 0 457
      www/functions.php
  91. 0 32
      www/header.php
  92. 0 73
      www/help/index.php
  93. BIN
      www/img/icon/blog.gif
  94. BIN
      www/img/icon/home.gif
  95. BIN
      www/img/icon/profile.gif
  96. BIN
      www/img/icon/project.gif
  97. BIN
      www/img/icon/projects.gif
  98. BIN
      www/img/icon/x1/blog.gif
  99. BIN
      www/img/icon/x1/home.gif
  100. BIN
      www/img/icon/x1/profile.gif

+ 0 - 239
sql/00_STRUCTURE.SQL

@@ -1,239 +0,0 @@
-DROP DATABASE IF EXISTS iv;
-CREATE DATABASE iv CHARACTER SET utf8 COLLATE utf8_bin;
-
-SET NAMES utf8;
-
-CONNECT iv;
-
-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 post (
-    id         INT           AUTO_INCREMENT  PRIMARY KEY,
-    permalink  VARCHAR(300)  NOT NULL,
-    title      VARCHAR(32)   NOT NULL        REFERENCES text.id,
-    text       VARCHAR(32)   NOT NULL        REFERENCES text.id,
-    user       INT           NOT NULL        REFERENCES user.id,
-    dtime      TIMESTAMP     NOT NULL        DEFAULT now(),
-    visible    BOOLEAN       NOT NULL        DEFAULT 1,
-    comments   BOOLEAN       NOT NULL        DEFAULT 1
-);
-
-CREATE TABLE post_tag (
-    post    INT          NOT NULL  REFERENCES post.id,
-    tag     VARCHAR(32)  NOT NULL  REFERENCES text.id,
-    PRIMARY KEY (post, tag)
-);
-
-CREATE TABLE post_image (
-    id     INT           AUTO_INCREMENT  PRIMARY KEY,
-    post   INT           NOT NULL        REFERENCES post.id,
-    idx    INT           NOT NULL,
-    image  VARCHAR(200)  NOT NULL
-);
-
-CREATE TABLE post_comment (
-    id        INT            AUTO_INCREMENT            PRIMARY KEY,
-    post      INT            NOT NULL                  REFERENCES post(id),
-    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 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);
-
-

+ 0 - 37
sql/01_PERMISSIONS.SQL

@@ -1,37 +0,0 @@
--- Replace all instances of XXX with the external site db password (same one as in www/.htaccess).
--- Uncomment all entries.
-
---GRANT SELECT ON         iv.cv_category          TO 'ivext'@'localhost' IDENTIFIED BY 'XXX';
---GRANT SELECT ON         iv.cv_entry             TO 'ivext'@'localhost' IDENTIFIED BY 'XXX';
---GRANT SELECT ON         iv.lang                 TO 'ivext'@'localhost' IDENTIFIED BY 'XXX';
---GRANT SELECT ON         iv.license              TO 'ivext'@'localhost' IDENTIFIED BY 'XXX';
---GRANT SELECT ON         iv.text                 TO 'ivext'@'localhost' IDENTIFIED BY 'XXX';
---GRANT SELECT ON         iv.user                 TO 'ivext'@'localhost' IDENTIFIED BY 'XXX';
---GRANT SELECT ON         iv.post                 TO 'ivext'@'localhost' IDENTIFIED BY 'XXX';
---GRANT SELECT ON         iv.post_tag             TO 'ivext'@'localhost' IDENTIFIED BY 'XXX';
---GRANT SELECT ON         iv.post_image           TO 'ivext'@'localhost' IDENTIFIED BY 'XXX';
---GRANT SELECT, INSERT ON iv.post_comment         TO 'ivext'@'localhost' IDENTIFIED BY 'XXX';
---GRANT SELECT ON         iv.project              TO 'ivext'@'localhost' IDENTIFIED BY 'XXX';
---GRANT SELECT ON         iv.project_type         TO 'ivext'@'localhost' IDENTIFIED BY 'XXX';
---GRANT SELECT ON         iv.project_tag          TO 'ivext'@'localhost' IDENTIFIED BY 'XXX';
---GRANT SELECT ON         iv.project_url          TO 'ivext'@'localhost' IDENTIFIED BY 'XXX';
---GRANT SELECT ON         iv.project_url_type     TO 'ivext'@'localhost' IDENTIFIED BY 'XXX';
---GRANT SELECT ON         iv.project_image        TO 'ivext'@'localhost' IDENTIFIED BY 'XXX';
---GRANT SELECT ON         iv.project_tag          TO 'ivext'@'localhost' IDENTIFIED BY 'XXX';
---GRANT SELECT ON         iv.project_version      TO 'ivext'@'localhost' IDENTIFIED BY 'XXX';
---GRANT SELECT ON         iv.project_version_type TO 'ivext'@'localhost' IDENTIFIED BY 'XXX';
---GRANT SELECT, INSERT ON iv.project_comment      TO 'ivext'@'localhost' IDENTIFIED BY 'XXX';
---GRANT SELECT ON         iv.settings             TO 'ivext'@'localhost' IDENTIFIED BY 'XXX';
---GRANT SELECT ON         iv.share                TO 'ivext'@'localhost' IDENTIFIED BY 'XXX';
---GRANT SELECT, INSERT ON iv.stat_view            TO 'ivext'@'localhost' IDENTIFIED BY 'XXX';
---GRANT SELECT, INSERT ON iv.stat_visit           TO 'ivext'@'localhost' IDENTIFIED BY 'XXX';
---GRANT SELECT ON         iv.social               TO 'ivext'@'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 iv.* TO 'ivint'@'localhost' IDENTIFIED BY 'YYY';

+ 1 - 1
sql/01_structure.sql

@@ -162,7 +162,7 @@ CREATE TABLE cv_category (
     priority  INT          NOT NULL            UNIQUE
 );
 
-CREATE TABLE cv_entry (
+CREATE TABLE cv (
     id               INT          AUTO_INCREMENT  PRIMARY KEY,
     category         INT          NOT NULL        REFERENCES cv_category.id,
     role             VARCHAR(32)  NOT NULL        REFERENCES text.id,

+ 0 - 553
sql/02_DATA.SQL

@@ -1,553 +0,0 @@
--- 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);
-
--- 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 Header
-INSERT INTO text VALUES ('HEADER_HOME',     'es', 'HEADER', 'Inicio', null);
-INSERT INTO text VALUES ('HEADER_PROFILE',  'es', 'HEADER', 'Yo', null);
-INSERT INTO text VALUES ('HEADER_PROJECTS', 'es', 'HEADER', 'Proyectos', null);
-INSERT INTO text VALUES ('HEADER_BLOG',     'es', 'HEADER', 'Blog', null);
-INSERT INTO text VALUES ('HEADER_HOME',     'en', 'HEADER', 'Home', null);
-INSERT INTO text VALUES ('HEADER_PROFILE',  'en', 'HEADER', 'Me', null);
-INSERT INTO text VALUES ('HEADER_PROJECTS', 'en', 'HEADER', 'Projects', null);
-INSERT INTO text VALUES ('HEADER_BLOG',     'en', 'HEADER', 'Blog', null);
-INSERT INTO text VALUES ('HEADER_HOME',     'eu', 'HEADER', 'Hasiera', null);
-INSERT INTO text VALUES ('HEADER_PROFILE',  'eu', 'HEADER', 'Ni', null);
-INSERT INTO text VALUES ('HEADER_PROJECTS', 'eu', 'HEADER', 'Proiektuak', null);
-INSERT INTO text VALUES ('HEADER_BLOG',     'eu', 'HEADER', 'Blog', 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_LATEST_PROJECTS', 'es', 'INDEX', 'Últimos proyectos', null);
-INSERT INTO text VALUES ('INDEX_LATEST_PROJECTS', 'en', 'INDEX', 'Latest projects', null);
-INSERT INTO text VALUES ('INDEX_LATEST_PROJECTS', 'eu', 'INDEX', 'Asken projektuak', null);
-INSERT INTO text VALUES ('INDEX_LATEST_POSTS', 'es', 'INDEX', 'Últimos posts', null);
-INSERT INTO text VALUES ('INDEX_LATEST_POSTS', 'en', 'INDEX', 'Latest posts', null);
-INSERT INTO text VALUES ('INDEX_LATEST_POSTS', 'eu', 'INDEX', 'Asken postak', 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_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 blog
-INSERT INTO text VALUES ('BLOG_TITLE',         'es', 'BLOG', 'Blog', null);
-INSERT INTO text VALUES ('BLOG_TITLE',         'en', 'BLOG', 'Blog', null);
-INSERT INTO text VALUES ('BLOG_TITLE',         'eu', 'BLOG', 'Blog', null);
-INSERT INTO text VALUES ('BLOG_DESCRIPTION',   'es', 'BLOG', '', null); --TODO
-INSERT INTO text VALUES ('BLOG_DESCRIPTION',   'en', 'BLOG', '', null); --TODO
-INSERT INTO text VALUES ('BLOG_DESCRIPTION',   'eu', 'BLOG', '', null); --TODO
-INSERT INTO text VALUES ('BLOG_MORE',          'es', 'BLOG', 'leer más', null);
-INSERT INTO text VALUES ('BLOG_MORE',          'en', 'BLOG', 'read more', null);
-INSERT INTO text VALUES ('BLOG_MORE',          'eu', 'BLOG', 'gehiago irakurri', null);
-INSERT INTO text VALUES ('BLOG_TAGS',          'es', 'BLOG', 'Tags', null);
-INSERT INTO text VALUES ('BLOG_TAGS',          'en', 'BLOG', 'Tags', null);
-INSERT INTO text VALUES ('BLOG_TAGS',          'eu', 'BLOG', 'Tags', null);
-INSERT INTO text VALUES ('BLOG_SEARCH',        'es', 'BLOG', 'Buscar', null);
-INSERT INTO text VALUES ('BLOG_SEARCH',        'en', 'BLOG', 'Search', null);
-INSERT INTO text VALUES ('BLOG_SEARCH',        'eu', 'BLOG', 'Bilatu', null);
-INSERT INTO text VALUES ('BLOG_DETAILS',       'es', 'BLOG', 'Detalles', null);
-INSERT INTO text VALUES ('BLOG_DETAILS',       'en', 'BLOG', 'Details', null);
-INSERT INTO text VALUES ('BLOG_DETAILS',       'eu', 'BLOG', 'Xehentasunak', null);
-INSERT INTO text VALUES ('BLOG_ARCHIVE',       'es', 'BLOG', 'Archivo', null);
-INSERT INTO text VALUES ('BLOG_ARCHIVE',       'en', 'BLOG', 'Archive', null);
-INSERT INTO text VALUES ('BLOG_ARCHIVE',       'eu', 'BLOG', 'Archibo', null);
-INSERT INTO text VALUES ('BLOG_RELATED',       'es', 'BLOG', 'Posts relacionados', null);
-INSERT INTO text VALUES ('BLOG_RELATED',       'en', 'BLOG', 'Related posts', null);
-INSERT INTO text VALUES ('BLOG_RELATED',       'eu', 'BLOG', 'Harramenak', null);
-INSERT INTO text VALUES ('BLOG_SHARE',         'es', 'BLOG', 'Comparte este post', null);
-INSERT INTO text VALUES ('BLOG_SHARE',         'en', 'BLOG', 'Shate this post', null);
-INSERT INTO text VALUES ('BLOG_SHARE',         'eu', 'BLOG', 'Banatu', null);
-INSERT INTO text VALUES ('BLOG_TAG_CLOUD',     'es', 'BLOG', 'Nube de tags', null);
-INSERT INTO text VALUES ('BLOG_TAG_CLOUD',     'en', 'BLOG', 'Tag Cloud', null);
-INSERT INTO text VALUES ('BLOG_TAG_CLOUD',     'eu', 'BLOG', 'Tag Cloud', null);
-INSERT INTO text VALUES ('BLOG_COMMENTS',      'es', 'BLOG', 'Comentarios', null);
-INSERT INTO text VALUES ('BLOG_COMMENTS',      'en', 'BLOG', 'Comments', null);
-INSERT INTO text VALUES ('BLOG_COMMENTS',      'eu', 'BLOG', 'Comentarios', null);
-INSERT INTO text VALUES ('BLOG_COMMENTS_0',    'es', 'BLOG', 'No hay comentarios aún.', null);
-INSERT INTO text VALUES ('BLOG_COMMENTS_0',    'en', 'BLOG', 'No comments yet.', null);
-INSERT INTO text VALUES ('BLOG_COMMENTS_0',    'eu', 'BLOG', 'No hay comentarios aún.', null);
-INSERT INTO text VALUES ('BLOG_COMMENTS_1',    'es', 'BLOG', 'comentario.', null);
-INSERT INTO text VALUES ('BLOG_COMMENTS_1',    'en', 'BLOG', 'comment.', null);
-INSERT INTO text VALUES ('BLOG_COMMENTS_1',    'eu', 'BLOG', 'comantario.', null);
-INSERT INTO text VALUES ('BLOG_COMMENTS_X',    'es', 'BLOG', 'comentarios.', null);
-INSERT INTO text VALUES ('BLOG_COMMENTS_X',    'en', 'BLOG', 'comments.', null);
-INSERT INTO text VALUES ('BLOG_COMMENTS_X',    'eu', 'BLOG', 'comentarios.', null);
-INSERT INTO text VALUES ('BLOG_COMMENTS_YOUR', 'es', 'BLOG', 'Tu comentario...', null);
-INSERT INTO text VALUES ('BLOG_COMMENTS_YOUR', 'en', 'BLOG', 'Your comment...', null);
-INSERT INTO text VALUES ('BLOG_COMMENTS_YOUR', 'eu', 'BLOG', 'Tu comentario...', 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);
-
-
--- 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:

+ 1 - 1
sql/02_security.sql

@@ -2,7 +2,7 @@
 -- 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.cv                   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';

+ 0 - 8
sql/__SETUP.SQL

@@ -1,8 +0,0 @@
--- DB structure.
-SOURCE 00_STRUCTURE.SQL;
-
--- DB permissions. Entries are commented by default.
-SOURCE 01_PERMISSIONS.SQL;
-
--- Initial data.
-SOURCE 02_DATA.SQL;

+ 0 - 31
www-admin/blog/delete.php

@@ -1,31 +0,0 @@
-<?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;
-    $pserver = substr($server, 0, strpos($http_host, ':')); // public server
-    if (!check_session($con)){
-        http_response_code(401); // Not logged in: Forbidden.
-    }
-    else{
-        $id = intval(mysqli_real_escape_string($con, $_GET["p"]));
-        if (strlen($id) < 1){
-            http_response_code(400); // No or bad ID: Bad request.
-        }
-        else{
-            if (mysqli_num_rows(mysqli_query($con, "SELECT id FROM post WHERE id = $id;")) == 0){
-                http_response_code(404); // Unexistent id: Not found.
-            }
-            else{
-                mysqli_query($con, "DELETE FROM post_tag WHERE project = $id;");
-                mysqli_query($con, "DELETE FROM post_image WHERE project = $id;");
-                mysqli_query($con, "DELETE FROM post_comment WHERE project = $id;");
-                mysqli_query($con, "DELETE FROM post WHERE id = $id;");
-                http_response_code(200); //OK.
-            }
-        }
-    }
-?>

+ 0 - 28
www-admin/blog/deletecomment.php

@@ -1,28 +0,0 @@
-<?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;
-    $pserver = substr($server, 0, strpos($http_host, ':')); // public server
-    if (!check_session($con)){
-        http_response_code(401); // Not logged in: Forbidden.
-    }
-    else{
-        $id = intval(mysqli_real_escape_string($con, $_GET["i"]));
-        if (strlen($id) < 1){
-            http_response_code(400); // No or bad ID: Bad request.
-        }
-        else{
-            if (mysqli_num_rows(mysqli_query($con, "SELECT id FROM post_comment WHERE id = $id;")) == 0){
-                http_response_code(404); // Unexistent id: Not found.
-            }
-            else{
-                mysqli_query($con, "DELETE FROM post_comment WHERE id = $id;");
-                http_response_code(200); //OK.
-            }
-        }
-    }
-?>

+ 0 - 295
www-admin/blog/edit.php

@@ -1,295 +0,0 @@
-<?php
-    session_start();
-    $http_host = $_SERVER["HTTP_HOST"];
-    $doc_root = $_SERVER["DOCUMENT_ROOT"] . "/";
-    include $doc_root . "functions.php";
-    $proto = get_protocol();
-    $lang = "en";
-    $con = start_db();
-    $server = $proto . $http_host;
-    $pserver = $proto . substr($http_host, 0, strpos($http_host, ':')); // public server
-    if (!check_session($con)){
-        http_response_code(401);
-        header("Location: /authentication.php");
-    }
-    else{
-        $id = intval(mysqli_real_escape_string($con, $_GET["p"]));
-        if (strlen($id) < 1){
-            http_response_code(400); // No or bad ID: Bad request.
-            header("Location: /blog/");
-        }
-        else{
-            $q_post = mysqli_query($con, "SELECT * FROM post WHERE id = $id;");
-            if (mysqli_num_rows($q_post) == 0){
-                http_response_code(404); // Unexistent id: Not found.
-                header("Location: /blog/");
-            }
-            else{
-                $r_post = mysqli_fetch_array($q_post);
-                $id = $r_post["id"];
-                $title = text($con, $r_post["title"], $lang);
-                $q_lang = mysqli_query($con, "SELECT * FROM lang;");
-?>
-<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'>
-        <link rel='shortcut icon' href='<?=$pserver?>/img/logo/x2/favicon.ico'/>
-        <title><?=$title?>I&ntilde;igo Valentin - Administration Panel</title>
-        <style>
-<?php
-            include $doc_root . "css/ui.css";
-            include $doc_root . "css/blog.css";
-?>
-        </style>
-        <!-- CSS for mobile version -->
-        <style media='(max-width : 990px)'>
-<?php
-            include $doc_root . "css/m/ui.css";
-            include $doc_root . "css/m/blog.css";
-?>
-        </style>
-        <!-- Script files -->
-        <script type='text/javascript'>
-<?php
-            include $doc_root . "script/ui.js";
-            include $doc_root . "script/blog.js";
-?>
-        </script>
-         <script src='/script/ckeditor/ckeditor.js'></script>
-    </head>
-    <body>
-<?php
-        include $doc_root . "header.php";
-?>
-        <div id='content'>
-            <div class='section' id='post_edit'>
-                <h3 class='section_title'><?=$title?></h3>
-                <div class='entry'>
-                    <div id='lang_tabs'>
-                        <table>
-                            <tr>
-<?php
-                                mysqli_data_seek($q_lang, 0);
-                                $active = 'lang_tabs_active';
-                                while ($r_lang = mysqli_fetch_array($q_lang)){
-?>
-                                    <td class='pointer <?=$active?>' id='lang_tab_<?=$r_lang["code"]?>' onclick='showLanguage("<?=$r_lang["code"]?>");'>
-                                        <?=$r_lang["name"]?>
-                                    </td>
-<?php
-                                    $active = '';
-                                }
-?>
-                            </tr>
-                        </table>
-                    </div> <!-- #lang_tabs -->
-                    <span class='bold'>URL:</span>
-                    <?=$pserver?>/blog/
-                    <span class='editable'>
-                        <span class='field_result'><?=$r_post["permalink"]?></span>
-                        <img class='button_edit' src='<?=$server?>/img/icon/edit.png' onclick='enableEdit(this);'/>
-                        <input class='field_editable' type='text' value='<?=$r_post["permalink"]?>'/>
-                        <img class='button_save' src='<?=$server?>/img/icon/save.png' onclick='saveEdit(this, "post", "permalink", <?=$id?>);'/>
-                        <img class='button_cancel' src='<?=$server?>/img/icon/cancel.png' onclick='cancelEdit(this);'/>
-                    </span>
-                    <hr class='separator'/>
-<?php
-                    mysqli_data_seek($q_lang, 0);
-                    $active = "content_lang_active";
-                    while ($r_lang = mysqli_fetch_array($q_lang)){
-?>
-                        <div class='content_lang_<?=$r_lang["code"]?> content_lang <?=$active?>'>
-                            <div class='editable'>
-                                <span class='bold'>Title (<?=$r_lang["name"]?>):</span>
-                                <span class='field_result'><?=text($con, $r_post["title"], $r_lang["code"])?></span>
-                                <img class='button_edit' src='<?=$server?>/img/icon/edit.png' onclick='enableEdit(this);'/>
-                                <input class='field_editable' type='text' value='<?=text($con, $r_post["title"], $r_lang["code"])?>'/>
-                                <img class='button_save' src='<?=$server?>/img/icon/save.png' onclick='saveEdit(this, "text", "<?=$r_lang["code"]?>", "<?=$r_post["title"]?>");'/>
-                                <img class='button_cancel' src='<?=$server?>/img/icon/cancel.png' onclick='cancelEdit(this);'/>
-                            </div>
-                            <hr class='separator'/>
-                            <div class='editable'>
-                                <span class='bold'>Text (<?=$r_lang["name"]?>):</span>
-                                <img class='button_edit' src='<?=$server?>/img/icon/edit.png' onclick='enableEdit(this);'/>
-                                <img class='button_save' src='<?=$server?>/img/icon/save.png' onclick='saveEdit(this, "text", "<?=$r_lang["code"]?>", "<?=$r_post["text"]?>");'/>
-                                <img class='button_cancel' src='<?=$server?>/img/icon/cancel.png' onclick='cancelEdit(this);'/>
-                                <br/>
-                                <p class='field_result'><?=text($con, $r_post["text"], $r_lang["code"])?></p>
-                                <textarea id='text_<?=$r_lang["code"]?>' class='field_editable'><?=text($con, $r_post["text"], $r_lang["code"])?></textarea>
-                                <script>CKEDITOR.replace('text_<?=$r_lang["code"]?>');</script>
-                            </div>
-                        </div> <!-- .content_lang_<?=$r_lang["code"]?> -->
-<?php
-                        $active = '';
-                    }
-?>
-                    <hr class='separator'/>
-                    <h4>Images</h4>
-                    <div id='image_reel' class='horizontal_scroll'>
-<?php
-                        $q_image = mysqli_query($con, "SELECT id, image FROM post_image WHERE post = $id;");
-                        while ($r_image = mysqli_fetch_array($q_image)){
-?>
-                            <div class='post_image' id='post_image_<?=$r_image["id"]?>'>
-                                <img alt='<?=$title?>' title='<?=$title?>' src='<?=$pserver?>/img/blog/x4/<?=$r_image["image"]?>' />
-                                <br/>
-                                <label class="image_control image_upload">
-                                    <input id="image" onchange="preview_image();" type="file" name="image" accept="image/x-png, image/gif, image/jpeg"/>
-                                    @
-                                </label>
-                                <input class='image_control' type='button' onClick='deleteImage(<?=$r_image["id"]?>)' value='X' />
-                            </div>
-<?php
-                        }
-?>
-                        <div class='post_image' id='post_image_add'>
-                            <img onClick='addImage(<?=$id?>)' alt='Add image' title='Add image' src='<?=$server?>/img/icon/addimage.png' />
-                            <input type='file' id='header_img_selector' onChange='uploadHeaderImage(event, <?=$r["id"]?>);'/>
-                            <img id="image_preview" src="<?php echo $img; ?>"/><br/><br/>
-                        </div>
-                    </div>
-                    <hr class='separator'/>
-                    <h4>Tags</h4>
-                    TODO
-                    <hr class='separator'/>
-                    <h4>Settings</h4>
-<?php
-                    if ($r_post["visible"] == 1){
-                        $v = "Yes";
-                        $selected1 = "selected";
-                        $selected0 = "";
-                    }
-                    else{
-                        $v = "No";
-                        $selected1 = "";
-                        $selected0 = "selected";
-                    }
-?>
-                    <div class='editable'>
-                        <span class='bold'>Visible:</span>
-                        <span class='field_result'><?=$v?></span>
-                        <img class='button_edit' src='<?=$server?>/img/icon/edit.png' onclick='enableEdit(this);'/>
-                        <select class='field_editable'>
-                            <option value='1' <?=$selected1?>>Yes</option>
-                            <option value='0' <?=$selected0?>>No</option>
-                        </select>
-                        <img class='button_save' src='<?=$server?>/img/icon/save.png' onclick='saveEdit(this, "post", "visible", "<?=$id?>");'/>
-                        <img class='button_cancel' src='<?=$server?>/img/icon/cancel.png' onclick='cancelEdit(this);'/>
-                    </div>
-<?php
-                    if ($r_post["comments"] == 1){
-                        $v = "Yes";
-                        $selected1 = "selected";
-                        $selected0 = "";
-                    }
-                    else{
-                        $v = "No";
-                        $selected1 = "";
-                        $selected0 = "selected";
-                    }
-?>
-                    <div class='editable'>
-                        <span class='bold'>Comments enabled:</span>
-                        <span class='field_result'><?=$v?></span>
-                        <img class='button_edit' src='<?=$server?>/img/icon/edit.png' onclick='enableEdit(this);'/>
-                        <select class='field_editable'>
-                            <option value='1' <?=$selected1?>>Yes</option>
-                            <option value='0' <?=$selected0?>>No</option>
-                        </select>
-                        <img class='button_save' src='<?=$server?>/img/icon/save.png' onclick='saveEdit(this, "post", "comments", "<?=$id?>");'/>
-                        <img class='button_cancel' src='<?=$server?>/img/icon/cancel.png' onclick='cancelEdit(this);'/>
-                    </div>
-                    <input type='button' onclick='deletePost(<?=$id?>, "<?=$title?>");' value='Delete post'/>
-                    <h4>Comments</h4>
-<?php
-                        $q_comment = mysqli_query($con, "SELECT post_comment.id AS id, text, dtime, user, username, lang, (SELECT name FROM lang WHERE code = post_comment.lang) AS lang_name, approved, ip, browser, os, uagent FROM post_comment, stat_visit WHERE stat_visit.id = visit AND post = $id;");
-                        if (mysqli_num_rows($q_comment) == 0){
-?>
-                            <span>No comments yet</span>
-<?php
-                        }
-                        else{
-?>
-                            <table id='comments'>
-<?php
-                            while ($r_comment = mysqli_fetch_array($q_comment)){
-?>
-                                <tr>
-                                    <td class='text'>
-                                        <p><?=$r_comment["text"]?></p>
-                                    </td>
-                                    <td class='details'>
-                                        On <?=format_date($r_comment["dtime"], $lang, true)?>
-                                        <br/>
-<?php
-                                        if (strlen($r_comment["user"]) > 0){
-                                            $q_user = mysqli_query($con, "SELECT concat(fname, concat(' ', lname)) AS name, username FROM user WHERE id = $r_comment[user];");
-                                            $r_user = mysqli_fetch_array($q_user);
-?>
-                                            By <?=$r_user["name"]?> (<span class='bold'><?=$r_user["username"]?></span>)
-<?php
-                                        }
-                                        else{
-?>
-                                            By <?=$r_comment["username"]?>
-<?php
-                                        }
-                                        if (strlen($r_comment["lang_name"]) > 0){
-                                            $strlang = $r_comment["lang_name"];
-                                        }
-                                        else{
-                                            $strlang = $r_comment["lang"];
-                                        }
-                                        if (file_exists($doc_root . "img/lang/" . $r_comment["lang"] . ".gif")){
-                                            $imgpath = $doc_root . "img/lang/" . $r_comment["lang"] . ".gif";
-                                            $strlang = $strlang . " <img class='lang' title='$r_comment[lang]' alt='$r_comment[lang]' src='$server/$imgpath' />";
-                                        }
-?>
-                                        <br/>
-                                        Language: <?=$strlang?>
-<?php
-                                        if ($r_post["visible"] == 1){
-                                            $v = "Yes";
-                                            $selected1 = "selected";
-                                            $selected0 = "";
-                                        }
-                                        else{
-                                            $v = "No";
-                                            $selected1 = "";
-                                            $selected0 = "selected";
-                                        }
-?>
-                                        <div class='editable'>
-                                            Approved:
-                                            <span class='field_result'><?=$v?></span>
-                                            <img class='button_edit' src='<?=$server?>/img/icon/edit.png' onclick='enableEdit(this);'/>
-                                            <select class='field_editable'>
-                                                <option value='1' <?=$selected1?>>Yes</option>
-                                                <option value='0' <?=$selected0?>>No</option>
-                                            </select>
-                                            <img class='button_save' src='<?=$server?>/img/icon/save.png' onclick='saveEdit(this, "post_comment", "approved", "<?=$r_comment["id"]?>");'/>
-                                            <img class='button_cancel' src='<?=$server?>/img/icon/cancel.png' onclick='cancelEdit(this);'/>
-                                        </div>
-                                    </td>
-                                    <td class='actions'>
-                                        <input type='button' onclick='deletePostComment(<?=$id?>);' value='Delete'/>
-                                    </td>
-                                </tr>
-<?php
-                            }
-?>
-                            </table>
-<?php
-                        }
-?>
-                </div> <!-- .entry -->
-            </div> <!-- .section -->
-        </div> <!-- #content -->
-    </body>
-</html>
-<?php
-            }
-        }
-    }
-?>

+ 0 - 149
www-admin/blog/index.php

@@ -1,149 +0,0 @@
-<?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;
-    $pserver = substr($server, 0, strpos($http_host, ':')); // public server
-    $lang = "en";
-    if (!check_session($con)){
-        header("Location: /authentication.php");
-        exit(-1);
-    }
-    else{
-?>
-<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'>
-        <link rel='shortcut icon' href='<?=$pserver?>/img/logo/x2/favicon.ico'/>
-        <title>Blog - I&ntilde;igo Valentin - Administration Panel</title>
-        <style>
-<?php
-            include $doc_root . "css/ui.css";
-            include $doc_root . "css/blog.css";
-?>
-        </style>
-        <!-- CSS for mobile version -->
-        <style media='(max-width : 990px)'>
-<?php
-            include $doc_root . "css/m/ui.css";
-            include $doc_root . "css/m/blog.css";
-?>
-        </style>
-        <!-- Script files -->
-        <script type='text/javascript'>
-<?php
-            include $doc_root . "script/ui.js";
-            include $doc_root . "script/blog.js";
-?>
-        </script>
-    </head>
-    <body>
-<?php
-        include $doc_root . "header.php";
-?>
-        <div id='content'>
-            <div class='section'>
-                <h3 class='section_title'>Post list</h3>
-                <div class='entry'>
-                    <table id='post_list'>
-                        <tr>
-                            <th>Post</th>
-                            <th>Detalles</th>
-                            <th>Acciones</th>
-                        </tr>
-<?php
-                        $q_post = mysqli_query($con, "SELECT post.id AS id, permalink, title, text, dtime, comments, (SELECT count(id) FROM post_comment WHERE post = post.id) AS comment_count, concat(fname, concat(' ', lname)) AS user, visible, comments, (SELECT image FROM post_image WHERE post = post.id ORDER BY idx LIMIT 1) AS image, (SELECT count(image) FROM post_image WHERE post = post.id) AS image_count FROM post, user WHERE user = user.id");
-                        while ($r_post = mysqli_fetch_array($q_post)){
-                            $title = text($con, $r_post["title"], $lang);
-?>
-                            <tr>
-                                <td class='td_post'>
-                                    <h4>
-                                        <a title='View <?=$title?> on a new tab' target='_blank' href='<?=$pserver?>/blog/<?=$r_post["permalink"]?>'>
-                                            <?=$title?>
-                                        </a>
-                                    </h4>
-                                    <p><?=cut_text(text($con, $r_post["text"], $lang), 200)?></p>
-<?php
-                                    if ($r_post["image_count"] > 0){
-?>
-                                        <img class='post_image' alt='<?=$title?>' title='<?=$title?>' src='<?=$pserver?>/img/blog/x2/<?=$r_post["image"]?>' />
-<?php
-                                        if ($r_post["image_count"] == 2){
-?>
-                                            + other image.
-<?php
-                                        }
-                                        elseif ($r_post["image_count"] > 2){
-                                            $pl = $r_post["image_count"] - 1;
-?>
-                                            + <?=$pl?> other images.
-<?php
-                                        }
-                                    }
-?>
-                                </td>
-                                <td class='td_details'>
-                                    By <?=$r_post["user"]?>.<br/>
-                                    Posted <?=format_date($r_post["dtime"], $lang, true)?>.<br/>
-                                    Visible:
-<?php
-                                    if ($r_post["visible"] == 1){
-?>
-                                        Yes
-<?php
-                                    }
-                                    else{
-?>
-                                        No
-<?php
-                                    }
-?>
-                                    <br/>Comments: <?=$r_post["comment_count"]?><br/>
-                                    Comments allowed:
-<?php
-                                    if ($r_post["comments"] == 1){
-?>
-                                        Yes
-<?php
-                                    }
-                                    else{
-?>
-                                        No
-<?php
-                                    }
-?>
-                                </td>
-                                <td class='td_actions'>
-                                    <input type='button' onclick='managePost(<?=$r_post["id"]?>);' value='Manage / Translate'/>
-                                    <input type='button' onclick='deletePost(<?=$r_post["id"]?>, "<?=$title?>");' value='Delete'/>
-                                    <?php
-                                    if ($r_post["visible"] == 1){
-?>
-                                        <input type='button' onclick='visiblePost(<?=$r_post["id"]?>, "<?=$title?>", 0);' value='Unpublish'/>
-<?php
-                                    }
-                                    else{
-?>
-                                        <input type='button' onclick='visiblePost(<?=$r_post["id"]?>, "<?=$title?>", 1);' value='Publish'/>
-<?php
-                                    }
-?>
-                                </td>
-                            </tr>
-<?php
-                        }
-?>
-                    </table>
-                </div> <!-- .entry -->
-            </div> <!-- .section -->
-        </div> <!-- #content -->
-    </body>
-</html>
-<?php
-    }
-?>

+ 0 - 20
www-admin/blog/new.php

@@ -1,20 +0,0 @@
-<?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;
-    $pserver = substr($server, 0, strpos($http_host, ':')); // public server
-    if (!check_session($con)){
-        http_response_code(401);
-        header("Location: /authentication.php");
-    }
-    else{
-        $user = mysqli_real_escape_string($_SESSION['id']);
-        mysqli_query($con, "INSERT INTO post (id, permalink, title, text, user, dtime, visible) VALUES ((SELECT max(id) +1 FROM post p), concat((SELECT max(id) +1 FROM post p), ''), '', '', $user, now(), 0);");
-        $id = mysqli_fetch_array(mysqli_query($con, "SELECT max(id) AS id FROM project;"))["id"];
-        header("Location: /blog/edit.php?p=" + $id);
-    }
-?>

+ 0 - 28
www-admin/blog/uploadimage.php

@@ -1,28 +0,0 @@
-<?php
-    session_start();
-    $http_host = $_SERVER["HTTP_HOST"];
-    $doc_root = $_SERVER["DOCUMENT_ROOT"] . "/";
-    include $doc_root . "functions.php";
-    $proto = get_protocol();
-    $lang = "en";
-    $con = start_db();
-    $server = $proto . $http_host;
-    $pserver = $proto . substr($http_host, 0, strpos($http_host, ':')); // public server
-    if (!check_session($con)){
-        http_response_code(401);
-        header("Location: /authentication.php");
-    }
-    else{
-        foreach ($_POST as $key => $value){
-            error_log("{$key} = {$value}");
-        }
-        $name = mysqli_real_escape_string($con, $_GET["name"]);
-        $base64string = $_POST["image"];
-        error_log("FILENAME: $name");
-        error_log("PATH: $doc_root../www/img/blog/DEBUG_$name");
-        error_log("B64: $base64string");
-        file_put_contents("$doc_root../www/img/blog/DEBUG_$name", base64_decode($base64string));
-
-        echo("OK");
-    }
-?>

+ 0 - 29
www-admin/blog/visible.php

@@ -1,29 +0,0 @@
-<?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;
-    $pserver = substr($server, 0, strpos($http_host, ':')); // public server
-    if (!check_session($con)){
-        http_response_code(401); // Not logged in: Forbidden.
-    }
-    else{
-        $id = intval(mysqli_real_escape_string($con, $_GET["p"]));
-        $visible = intval(mysqli_real_escape_string($con, $_GET["v"]));
-        if (strlen($id) < 1 || ($visible != 1 && $visible != 0)){
-            http_response_code(400); // No or bad ID, visible not 1 or 0: Bad request.
-        }
-        else{
-            if (mysqli_num_rows(mysqli_query($con, "SELECT id FROM post WHERE id = $id;")) == 0){
-                http_response_code(404); // Unexistent id: Not found.
-            }
-            else{
-                mysqli_query($con, "UPDATE post SET visible = $visible WHERE id = $id;");
-                http_response_code(200); //OK.
-            }
-        }
-    }
-?>

+ 0 - 127
www/.htaccess

@@ -1,127 +0,0 @@
-Options -MultiViews
-
-
-
-#
-# REWRITE
-#
-# Used to: create nice urls, force https, and hav the site multilanguage.
-#
-<IfModule mod_rewrite.c>
-	RewriteEngine On
-	RewriteBase /
-
-	# Force https
-	RewriteCond %{HTTPS} !=on
-	RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
-
-	# Add final slash.
-	RewriteRule ^([a-zA-Z]{2})$ $1/ [R=301]
-
-	# For files, remove the last /
-	RewriteCond %{REQUEST_URI} ^/([a-zA-Z]{2}/)?(.{3,})/$
-	RewriteCond %{DOCUMENT_ROOT}/%2 !-d
-	RewriteCond %{REQUEST_URI} /$
-	RewriteRule ^(.{3,})/$ $1 [R=301]
-
-	# For sections, add the last /
-	RewriteCond %{REQUEST_URI} ^/([a-zA-Z]{2}/)?(.{3,})$
-	RewriteCond %{DOCUMENT_ROOT}/%2 -d
-	RewriteCond %{REQUEST_URI} !/$
-	RewriteRule ^(.{3,})$ $1/ [R=301]
-
-	# Hide the 'index.php'
-	RewriteRule ^(.*)index\.php?$ $1 [L,R=301]
-
-	# Remove page extensions
-	RewriteCond %{THE_REQUEST} ^GET\ (.*)\.(php|html)([#?][^\ ]*)?\ HTTP
-	RewriteRule ^(.*)\.(php|html)$ $1 [R=301]
-
-	# Redirect permalinks.
-        RewriteRule ^project/([A-Z\-a-z0-9]{3,}+)[\/]?$ /project/project.php?permalink=$1 [NC]
-        RewriteRule ^blog/([A-Z\-a-z0-9]{3,}+)[\/]?$ /blog/post.php?permalink=$1 [NC]
-        RewriteRule ^help[\/]?$ /help/index.php [NC]
-        RewriteRule ^(perfil|xprofile|profila)[\/]?$ /profile/index.php [NC]
-
-        # PHP to xml.
-        RewriteRule ^sitemap.xml$ /sitemap.php [NC]
-        RewriteRule ^imgmap.xml$ /sitemap-image.php [NC]
-        RewriteRule ^rss.xml$ /rss.php
-
-	# Language as GET param.
-	RewriteCond %{REQUEST_FILENAME} !-d
-	RewriteCond %{REQUEST_FILENAME} !-f
-	RewriteCond %{REQUEST_URI} ^/([a-zA-Z]{2})(/(.*))?$
-	RewriteRule ^([a-zA-Z]{2})(/(.*))?$ $3?lang=$1 [L,QSA]
-
-	# Add .php extension when needed. TODO: Actualy used?
-	RewriteCond %{REQUEST_FILENAME} !-d
-	RewriteCond %{REQUEST_FILENAME} !-f
-	RewriteCond %{REQUEST_FILENAME}.php -f
-	RewriteRule ^(.*)$ $1\.php [L]
-
-</ifModule>
-
-
-#
-# 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>
-
-<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
-
-

+ 2 - 2
www/application/class/controller/Controller.php → www/application/Controller.php

@@ -1,10 +1,10 @@
 <?php
 
-    require_once("../application/config/config.php");
+    require_once(__DIR__ . "/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){
+    foreach (glob($path["page"] . "*.php") as $pagename){
         require_once($pagename);
     }
 

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

@@ -1,56 +0,0 @@
-<?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;
-        }
-    }
-?>

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

@@ -1,37 +0,0 @@
-<?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 . "/";
-        }
-    }
-?>

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

@@ -1,60 +0,0 @@
-<?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);
-        }
-    }

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

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

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

@@ -1,100 +0,0 @@
-<?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>

+ 1 - 6
www/application/config/auth.php

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

+ 9 - 12
www/application/config/config.php

@@ -1,15 +1,11 @@
 <?php
 
     include __DIR__ . "/auth.php";
+    require_once(__DIR__ . "/../helper/net.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"] . "/";
-    }
+    $root = get_protocol() . $_SERVER["HTTP_HOST"] . "/";
 
-    $base_dir = $_SERVER["DOCUMENT_ROOT"];
+    $base_dir = $_SERVER["DOCUMENT_ROOT"] . "/";
 
     $path = [
         "img" => [
@@ -18,14 +14,15 @@
         ],
         "fonts" => $root . "fonts/",
         "css" => $root . "css/",
+        "demo" => $root . "demo/",
         "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/",
+        "controller" => "$base_dir../application/Controller.php",
+        "entity" => "$base_dir../application/entity/",
+        "page" => "$base_dir../application/page/",
+        "view" => "$base_dir../application/view/",
         "helper" => "$base_dir../application/helper/",
-        "string" => "$base_dir../application/class/view/string/"
+        "string" => "$base_dir../application/view/string/"
     ];
 
 ?>

+ 109 - 0
www/application/entity/Cv.php

@@ -0,0 +1,109 @@
+<?php
+
+    require_once($path["entity"] . "Entity.php");
+    require_once($path["entity"] . "Cv_Category.php");
+    require_once($path["helper"] . "text.php");
+
+
+    /**
+     * Entry on the CV.
+     *
+     * Represents an object from the table 'cv'.
+     */
+    class Cv extends Entity{
+
+        /**
+         * Project identifier.
+         */
+        public $id;
+
+        /**
+         * {@see Cv_Category} of the entry.
+         */
+        public $category;
+
+        /**
+         * Role of the entry in the defined language.
+         */
+        public $role;
+
+        /**
+         * Company or center of the entry in the defined language.
+         */
+        public $company;
+
+        /**
+         * City.
+         */
+        public $city;
+
+        /**
+         * Start date of the activity.
+         */
+        public $start;
+
+        /**
+         * End date of the activity, or null if it's a current one.
+         */
+        public $end;
+
+        /**
+         * Date precission to show ("M" for months, "Y for years").
+         */
+        public $date_precission;
+
+        /**
+         * Description of the role in the defined language.
+         */
+        public $summary;
+
+        /**
+         * Indicates wether the activity must or mustn's be displayed.
+         */
+        public $visible;
+
+        /**
+         * Constructor.
+         *
+         * Searches the database and retrieves the information about the
+         * entry, populating it and it's items.
+         *
+         * @param MySQL_connection $db Connection to the database.
+         * @param string $lang Lowercase, two-letter language code.
+         * @param int $id Identifier of the cv entry.
+         */
+        public function __construct($db, $lang, $id){
+            parent::__construct($db, $lang);
+            $s =
+              "SELECT " .
+              "  id, " .
+              "  category, " .
+              "  role, " .
+              "  company, " .
+              "  city, " .
+              "  start, " .
+              "  end, " .
+              "  date_precission, " .
+              "  summary, " .
+              "  visible " .
+              "FROM cv " .
+              "WHERE " .
+              "  visible = 1 AND " .
+              "  id = $id ; ";
+            $q = mysqli_query($this->db, $s);
+            if (mysqli_num_rows($q) > 0){
+                $r = mysqli_fetch_array($q);
+                $this->id = $r["id"];
+                $this->role = text($this, $r["role"]);
+                $this->company = $r["company"];
+                $this->city = text($this, $r["city"]);
+                $this->start = $r["start"];
+                $this->end = $r["end"];
+                $this->date_precission = $r["date_precission"];
+                $this->summary = text($this, $r["summary"]);
+                $this->visible = $r["visible"];
+                $this->category = new Cv_Category($this->db, $this->lang, $r["category"]);
+            }
+        }
+    }
+?>

+ 71 - 0
www/application/entity/Cv_Category.php

@@ -0,0 +1,71 @@
+<?php
+
+    require_once($path["entity"] . "Entity.php");
+    require_once($path["helper"] . "text.php");
+
+
+    /**
+     * Category of a CV entry.
+     *
+     * Represents an object from the table 'cv_category'.
+     */
+    class Cv_Category extends Entity{
+
+        /**
+         * Identifier of the category.
+         */
+        public $id;
+
+        /**
+         * Category denomination, in the defined language.
+         */
+        public $title;
+
+        /**
+         * Category description, in the defined language.
+         */
+        public $summary;
+
+        /**
+         * Indicates wether the category must or mustn's be displayed.
+         */
+        public $visible;
+
+        /**
+         * Display order.
+         */
+        public $priority;
+
+        /**
+         * Constructor.
+         *
+         * Searches the database and retrieves the information about the
+         * category, populating it.
+         *
+         * @param MySQL_connection $db Connection to the database.
+         * @param string $lang Lowercase, two-letter language code.
+         * @param int $id Identifier of the cv category.
+         */
+        public function __construct($db, $lang, $id){
+            parent::__construct($db, $lang);
+            $s =
+              "SELECT " .
+              "  id, " .
+              "  title, " .
+              "  summary, " .
+              "  visible, " .
+              "  priority " .
+              "FROM cv_category " .
+              "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->visible = $r["visible"];
+                $this->priority = $r["priority"];
+            }
+        }
+    }
+?>

+ 0 - 0
www/application/class/model/Entity.php → www/application/entity/Entity.php


+ 2 - 2
www/application/class/model/Footer.php → www/application/entity/Footer.php

@@ -1,7 +1,7 @@
 <?php
 
-    require_once($path["model"] . "Lang.php");
-    require_once($path["model"] . "Social.php");
+    require_once($path["entity"] . "Lang.php");
+    require_once($path["entity"] . "Social.php");
 
     /**
      * Page footer.

+ 1 - 1
www/application/class/model/Lang.php → www/application/entity/Lang.php

@@ -1,6 +1,6 @@
 <?php
 
-    require_once($path["model"] . "Entity.php");
+    require_once($path["entity"] . "Entity.php");
 
 
     /**

+ 1 - 1
www/application/class/model/License.php → www/application/entity/License.php

@@ -1,6 +1,6 @@
 <?php
 
-    require_once($path["model"] . "Entity.php");
+    require_once($path["entity"] . "Entity.php");
     require_once($path["helper"] . "text.php");
 
 

+ 9 - 9
www/application/class/model/Project.php → www/application/entity/Project.php

@@ -1,13 +1,13 @@
 <?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["entity"] . "Entity.php");
+    require_once($path["entity"] . "License.php");
+    require_once($path["entity"] . "Project_Type.php");
+    require_once($path["entity"] . "Project_Image.php");
+    require_once($path["entity"] . "Project_Comment.php");
+    require_once($path["entity"] . "Project_Version.php");
+    require_once($path["entity"] . "Project_Tag.php");
+    require_once($path["entity"] . "Project_Url.php");
     require_once($path["helper"] . "text.php");
 
 
@@ -156,7 +156,7 @@
             }
             $s_url =
               "SELECT id " .
-              "FROM project_comment " .
+              "FROM project_url " .
               "WHERE project = " . $this->id . ";";
             error_log($s_url);
             $q_url = mysqli_query($this->db, $s_url);

+ 1 - 1
www/application/class/model/Project_Comment.php → www/application/entity/Project_Comment.php

@@ -1,6 +1,6 @@
 <?php
 
-    require_once($path["model"] . "Entity.php");
+    require_once($path["entity"] . "Entity.php");
 
 
     /**

+ 1 - 1
www/application/class/model/Project_Image.php → www/application/entity/Project_Image.php

@@ -1,6 +1,6 @@
 <?php
 
-    require_once($path["model"] . "Entity.php");
+    require_once($path["entity"] . "Entity.php");
 
 
     /**

+ 1 - 1
www/application/class/model/Project_Tag.php → www/application/entity/Project_Tag.php

@@ -1,6 +1,6 @@
 <?php
 
-    require_once($path["model"] . "Entity.php");
+    require_once($path["entity"] . "Entity.php");
     require_once($path["helper"] . "text.php");
 
 

+ 1 - 1
www/application/class/model/Project_Type.php → www/application/entity/Project_Type.php

@@ -1,6 +1,6 @@
 <?php
 
-    require_once($path["model"] . "Entity.php");
+    require_once($path["entity"] . "Entity.php");
     require_once($path["helper"] . "text.php");
 
 

+ 2 - 2
www/application/class/model/Project_Url.php → www/application/entity/Project_Url.php

@@ -1,7 +1,7 @@
 <?php
 
-    require_once($path["model"] . "Entity.php");
-    require_once($path["model"] . "Project_Url_Type.php");
+    require_once($path["entity"] . "Entity.php");
+    require_once($path["entity"] . "Project_Url_Type.php");
 
 
     /**

+ 1 - 1
www/application/class/model/Project_Url_Type.php → www/application/entity/Project_Url_Type.php

@@ -1,6 +1,6 @@
 <?php
 
-    require_once($path["model"] . "Entity.php");
+    require_once($path["entity"] . "Entity.php");
     require_once($path["helper"] . "text.php");
 
 

+ 2 - 2
www/application/class/model/Project_Version.php → www/application/entity/Project_Version.php

@@ -1,7 +1,7 @@
 <?php
 
-    require_once($path["model"] . "Entity.php");
-    require_once($path["model"] . "Project_Version_Type.php");
+    require_once($path["entity"] . "Entity.php");
+    require_once($path["entity"] . "Project_Version_Type.php");
     require_once($path["helper"] . "text.php");
 
     /**

+ 1 - 1
www/application/class/model/Project_Version_Type.php → www/application/entity/Project_Version_Type.php

@@ -1,6 +1,6 @@
 <?php
 
-    require_once($path["model"] . "Entity.php");
+    require_once($path["entity"] . "Entity.php");
     require_once($path["helper"] . "text.php");
 
 

+ 1 - 1
www/application/class/model/Social.php → www/application/entity/Social.php

@@ -1,6 +1,6 @@
 <?php
 
-    require_once($path["model"] . "Entity.php");
+    require_once($path["entity"] . "Entity.php");
     require_once($path["helper"] . "text.php");
 
 

+ 7 - 6
www/application/helper/text.php

@@ -2,7 +2,7 @@
 
 
     /**
-     * This function selects the language the page will be displayed on.
+     * 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
@@ -45,9 +45,9 @@
 
 
     /**
-     * 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.
+     * 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.
@@ -83,8 +83,8 @@
 
 
     /**
-     * This function turns a date string into a human readable string on the
-     * specified language. Only works for spanish, basque and english.
+     * Tturns 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).
@@ -145,6 +145,7 @@
      */
     function text($model, $id){
         global $path;
+error_log("SELECT text, file FROM text WHERE id = '$id' AND lang = '" . $model->lang . "';");
         $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){

+ 2 - 2
www/application/class/model/Footer_Page.php → www/application/page/Footer_Page.php

@@ -1,7 +1,7 @@
 <?php
 
-    require_once($path["model"] . "Lang.php");
-    require_once($path["model"] . "Social.php");
+    require_once($path["entity"] . "Lang.php");
+    require_once($path["entity"] . "Social.php");
 
     class Footer_Page{
         public $social = [];

+ 1 - 1
www/application/class/model/Help_Page.php → www/application/page/Help_Page.php

@@ -1,6 +1,6 @@
 <?php
 
-    require_once($path["model"] . "Page.php");
+    require_once($path["page"] . "Page.php");
     require_once($path["helper"] . "text.php");
 
 

+ 2 - 2
www/application/class/model/Home_Page.php → www/application/page/Home_Page.php

@@ -1,7 +1,7 @@
 <?php
 
-    require_once($path["model"] . "Page.php");
-    require_once($path["model"] . "Project.php");
+    require_once($path["page"] . "Page.php");
+    require_once($path["entity"] . "Project.php");
     require_once($path["helper"] . "text.php");
 
 

+ 1 - 1
www/application/class/model/Page.php → www/application/page/Page.php

@@ -1,6 +1,6 @@
 <?php
 
-    require_once($path["model"] . "Footer.php");
+    require_once($path["entity"] . "Footer.php");
 
 
     /**

+ 69 - 0
www/application/page/Profile_Page.php

@@ -0,0 +1,69 @@
+<?php
+
+    require_once($path["page"] . "Page.php");
+    require_once($path["entity"] . "Cv.php");
+    require_once($path["helper"] . "text.php");
+
+
+    /**
+     * Profile page model.
+     */
+    class Profile_Page extends Page{
+
+
+        public $category = [
+          "WORK" => 0,
+          "EDUCATION" => 1,
+          "PROJECTS" => 2,
+          "OTHERS" => 3
+        ];
+
+
+        public $entry = [
+          "WORK" => [],
+          "EDUCATION" => [],
+          "PROJECTS" => [],
+          "OTHERS" => []
+        ];
+
+
+        /**
+         * 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";
+            foreach ($this->category as $cat){
+                $s =
+                  "SELECT id " .
+                  "FROM cv " .
+                  "WHERE " .
+                  "  visible = 1 AND " .
+                  "  category = " . ($cat + 1) . " " .
+                  "ORDER BY " . 
+                  "  IF(end IS NULL, 9, end) DESC, " .
+                  "  start DESC; ";
+                $q = mysqli_query($this->db, $s);
+                while($r = mysqli_fetch_array($q)){
+                    $k = array_keys($this->category)[$cat];
+                    $e = new Cv($this->db, $this->lang, $r["id"]);
+                    array_push($this->entry[$k], $e);
+                }
+            }
+            $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 . "/profile/";
+            $this->author = $root . $lang . "/";
+        }
+    }
+?>

+ 2 - 2
www/application/class/model/Project_Page.php → www/application/page/Project_Page.php

@@ -1,7 +1,7 @@
 <?php
 
-    require_once($path["model"] . "Page.php");
-    require_once($path["model"] . "Project.php");
+    require_once($path["page"] . "Page.php");
+    require_once($path["entity"] . "Project.php");
     require_once($path["helper"] . "text.php");
 
 

+ 2 - 2
www/application/class/model/Projects_Page.php → www/application/page/Projects_Page.php

@@ -1,7 +1,7 @@
 <?php
 
-    require_once($path["model"] . "Page.php");
-    require_once($path["model"] . "Project.php");
+    require_once($path["page"] . "Page.php");
+    require_once($path["entity"] . "Project.php");
     require_once($path["helper"] . "text.php");
 
 

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


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


+ 12 - 12
www/application/class/view/home.php → www/application/view/home.php

@@ -34,14 +34,14 @@
 <?php
         include __DIR__ . "/inc/header.php";
 ?>
-        <div id='content'>
+        <main>
             <div id='left'>
-                <div class='section'>
-                    <h3 class='section_title'>
+                <section>
+                    <h3>
                         <?=$page->name?>
                     </h3>
                     <!-- TODO: Profile form model -->
-                    <div class='entry'>
+                    <article>
                         <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>
@@ -54,18 +54,18 @@
                                 <?=text($page, "INDEX_PROFILE");?>
                             </span>
                         </a>
-                    </div> <!-- .entry -->
-                </div> <!-- .section -->
+                    </article>
+                </section>
             </div> <!-- left -->
             <div id='right'>
-                <div class='section'>
-                    <h3 class='section_title'>
+                <section>
+                    <h3>
                         <?=text($page, "INDEX_PROJECTS");?>
                     </h3>
 <?php
                     foreach ($page->project as $project){
 ?>
-                        <div class='entry'>
+                        <article>
                             <table>
                                 <tr>
 <?php
@@ -89,7 +89,7 @@
                                     </td>
                                 </tr>
                             </table>
-                        </div> <!-- .entry -->
+                        </article>
 <?php
                     }
 ?>
@@ -101,9 +101,9 @@
                             <?=text($page, "INDEX_PROJECTS");?>
                         </span>
                     </a>
-                </div> <!-- .section -->
+                </section>
             </div> <!-- #right -->
-        </div> <!-- #content -->
+        </main>
 <?php
         include __DIR__ . "/inc/footer.php";
 ?>

+ 2 - 2
www/application/class/view/inc/footer.php → www/application/view/inc/footer.php

@@ -1,4 +1,4 @@
-<div id='footer'>
+<footer>
     <hr id='footer_separator'/>
     <br/>
     <table id='footer_table'>
@@ -42,4 +42,4 @@
             </td>
         </tr>
     </table>
-</div>
+</footer>

+ 3 - 3
www/application/class/view/inc/header.php → www/application/view/inc/header.php

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

+ 63 - 0
www/application/view/profile.php

@@ -0,0 +1,63 @@
+<!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"]?>profile.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";
+?>
+        <main>
+            <section>
+                <div id='left'>
+                    <div id='logo'>
+                        <img id='profile' src='<?=$path["img"]["content"]?>profile/x6/0.png' alt='<?=text($page, "USER_NAME");?>' title='<?=text($page, "USER_NAME");?>' />
+                    </div>
+                    <!-- TODO: Skills -->
+                </div> <!-- #left -->
+                <div id='right'>
+<?php
+                    foreach($page->entry["WORK"] as $entry){
+                        // TODO: Something if its the current one.
+?>
+                        <div class='entry'>
+                            <h4><?=$entry->role?> - <?=$entry->company?></h4>
+                        </div>
+<?php
+                    }
+?>
+                </div> <!-- #right -->
+            </section>
+        </main>
+<?php
+        include __DIR__ . "/inc/footer.php";
+?>
+    </body>
+</html>

+ 25 - 13
www/application/class/view/project.php → www/application/view/project.php

@@ -11,6 +11,7 @@
         <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>project.css'/>
         <!-- Script files -->
         <script type="text/javascript" src="<?=$path["js"]?>ui.js"></script>
+        <script type="text/javascript" src="<?=$path["js"]?>project.js"></script>
         <!-- Meta tags -->
         <link rel='canonical' href='<?=$page->canonical?>'/>
         <link rel='author' href='<?=$page->author?>'/>
@@ -34,9 +35,9 @@
 <?php
         include __DIR__ . "/inc/header.php";
 ?>
-        <div id='content'>
-            <div id='info' class='section'>
-                <h3 class='section_title'>
+        <main>
+            <section id='info'>
+                <h3>
                     <?=$page->project->title?>
                 </h3>
                 <h4 id='summary'>
@@ -52,6 +53,15 @@
 ?>
                     <?=$page->project->text?>
                 </p>
+<?php
+                foreach($page->project->url as $embed){
+                    if ($embed->type->id == "E"){
+?>
+                        <iframe id='demo' src='<?=$path["demo"]?><?=$embed->url?>' onload='resizeDemo(this);'></iframe>
+<?php
+                    }
+                }
+?>
 <?php
                 if (sizeof($page->project->image) > 0){
 ?>
@@ -74,7 +84,7 @@
                 }
 ?>
             </div> <!-- #info -->
-            <div id='details' class='section'>
+            <section id='details'>
                 <h3 class='section_title'>
                     <?=text($page, "PROJECT_INFO")?>
                 </h3>
@@ -95,14 +105,16 @@
                     <div id='links' class='details'>
 <?php
                         foreach($page->project->url as $url){
+                            if ($url->type->id != "E"){
 ?>
-                            <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>
+                                <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'/>
@@ -118,10 +130,10 @@
                 </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?>'/>
+                    <img src='<?=$path["img"]["content"]?>license/<?=$page->project->license->logo?>' title='<?=$page->project->license->id?>' alt='<?=$page->project->license->id?>'/>
                 </div> <!-- #license -->
-            </div> <!-- #details -->
-        </div> <!-- .content -->
+            </section> <!-- #details -->
+        </main> <!-- .content -->
 <?php
         include __DIR__ . "/inc/footer.php";
 ?>

+ 7 - 7
www/application/class/view/projects.php → www/application/view/projects.php

@@ -34,15 +34,15 @@
 <?php
         include __DIR__ . "/inc/header.php";
 ?>
-        <div id='content'>
-            <div class='section'>
-                <h3 class='section_title'><?=$page->title?></h3>
+        <main>
+            <section>
+                <h3><?=$page->title?></h3>
                 <!-- TODO: Search and sorting -->
                 <div id='project_list'>
 <?php
                     foreach ($page->project as $project){
 ?>
-                        <div class='entry project'>
+                        <article class='project'>
                             <table>
                                 <tr>
 <?php
@@ -66,13 +66,13 @@
                                     </td>
                                 </tr>
                             </table>
-                        </div> <!-- .entry -->
+                        </article> <!-- .project -->
 <?php
                     }
 ?>
                 </div> <!-- #project_list -->
-            </div> <!-- .section -->
-        </div> <!-- .content -->
+            </section>
+        </main>
 <?php
         include __DIR__ . "/inc/footer.php";
 ?>

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


+ 5 - 5
www/application/class/view/skills.php → www/application/view/skills.php

@@ -1,5 +1,5 @@
-<div class='section'>
-    <h3 class='section_title'><?=text($con, "PROFILE_CV", $lang);?></h3>
+<section>
+    <h3><?=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>
@@ -12,7 +12,7 @@
     $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'>
+        <article id='cv' class='cv_entry'>
             <h4 class='cv_entry_title'><?=text($con, $r_section["title"], $lang)?></h4>
 <?php
             if (strlen($r_section["summary"]) > 0){
@@ -73,8 +73,8 @@
 <?php
             } // while ($r_item = mysqli_fetch_array($q_item))
 ?>
-        </div>
+        </article>
 <?php
     }
 ?>
-</div> <!-- .section -->
+</section> <!-- .section -->

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


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


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


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


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


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


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


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


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


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


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


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


+ 0 - 245
www/blog/index.php

@@ -1,245 +0,0 @@
-<?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 = "blog";
-    $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, "BLOG_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/blog.css";
-?>
-        </style>
-        <!-- CSS for mobile version -->
-        <style media='(max-width : 990px)'>
-<?php
-            include $doc_root . "css/m/ui.css";
-            include $doc_root . "css/m/blog.css";
-?>
-        </style>
-        <!-- Script files -->
-        <script type='text/javascript'>
-<?php
-            include $doc_root . "script/ui.js";
-            include $doc_root . "script/blog.js";
-?>
-        </script>
-        <!-- Meta tags -->
-        <link rel='canonical' href='<?=$lserver?>/blog/'/>
-        <link rel='author' href='<?=$lserver?>'/>
-        <link rel='publisher' href='<?=$lserver?>'/>
-        <meta name='description' content='<?=text($con, "BLOG_DESCRIPTION", $lang)?>'/>
-        <meta property='og:title' content='<?=text($con, "BLOG_TITLE", $lang)?> - <?=text($con, "USER_NAME", $lang);?>'/>
-        <meta property='og:url' content='<?=$lserver?>/blog/'/>
-        <meta property='og:description' content='<?=text($con, "BLOG_DESCRIPTION", $lang)?>'/>
-        <meta property='og:image' content='<?=$lserver?>/img/logo/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, "BLOG_TITLE", $lang)?> - <?=text($con, "USER_NAME", $lang);?>'/>
-        <meta name='twitter:description' content='<?=text($con, "BLOG_DESCRIPTION", $lang)?>'/>
-        <meta name='twitter:image' content='<?=$lserver?>/img/logo/favicon.ico'/>
-        <meta name='twitter:url' content='<?=$lserver?>/project/'/>
-        <meta name='robots' content='index follow'/>
-    </head>
-    <body>
-<?php
-        include $doc_root . "header.php";
-?>
-        <div id='content'>
-            <div id='content_row'>
-                <div class='content_cell' id='content_cell_main'>
-                    <div id='post_list' class='section'>
-                        <h3 class='section_title'><?=text($con, "BLOG_TITLE", $lang)?></h3>
-<?php
-                            $q_blog = mysqli_query($con, "SELECT id, permalink, title, text, DATE_FORMAT(dtime, '%Y-%m-%dT%T') AS isodate, dtime, comments FROM post WHERE visible = 1 ORDER BY dtime DESC;");
-                            while($r_blog = mysqli_fetch_array($q_blog)){
-?>
-                                <div itemscope itemtype='http://schema.org/BlogPosting' class='entry entry_list blog_entry'>
-                                    <meta itemprop='inLanguage' content='<?=$lang?>'/>
-                                    <meta itemprop='datePublished dateModified' content='<?=$r_blog["isodate"]?>'/>
-                                    <meta itemprop='headline name' content='<?=text($con, $r_blog["title"], $lang)?>'/>
-                                    <meta itemprop='articleBody text' content='<?=text($con, $r_blog["text"], $lang)?>'/>
-                                    <meta itemprop='mainEntityOfPage' content='<?=$lserver?>'/>
-                                    <h3 class='entry_title'>
-                                        <a itemprop='url' href='<?=$lserver?>/blog/<?=$r_blog["permalink"]?>'><?=text($con, $r_blog["title"], $lang)?></a>
-                                    </h3>
-<?php
-                                    $q_image = mysqli_query($con, "SELECT image FROM post_image WHERE post = $r_blog[id] ORDER BY idx LIMIT 1;");
-                                    if (mysqli_num_rows($q_image) > 0){
-                                        $r_image = mysqli_fetch_array($q_image);
-?>
-                                        <div class='post_list_image_container'>
-                                            <a href='<?=$lserver?>/blog/<?=$r_blog["permalink"]?>'>
-                                                <meta itemprop='image' content='<?=$lserver?>/img/blog/x4/<?=$r_image["image"]?>'/>
-                                                <img class='post_list_image' alt='<?=$r_blog["title"]?>' src='<?=$lserver?>/img/blog/x2/<?=$r_image["image"]?>'/>
-                                            </a>
-                                        </div>
-<?php
-                                    }
-?>
-                                    <p><?=cut_text(text($con, $r_blog["text"], $lang), 200, text($con, "BLOG_MORE", $lang), "$lserver/blog/$r_blog[permalink]/")?></p>
-                                    <hr/>
-                                    <table class='post_list_footer'>
-                                        <tr>
-                                            <td class='date'>
-                                                <span class='date'><?=format_date($r_blog['dtime'], $lang, false)?></span>
-                                            </td>
-<?php
-                                            #Comment counter
-                                            if ($r_blog["comments"] == 1){
-                                                $q_comment = mysqli_query($con, "SELECT count(id) AS count FROM post_comment WHERE post = $r_blog[id] AND approved = 1;");
-                                                $r_comment = mysqli_fetch_array($q_comment);
-?>
-                                                <meta itemprop='commentCount interationCount' content='<?=$r_comment["count"]?>'/>
-                                                <td class='comment_counter'>
-<?php
-                                                    if ($r_comment['count'] == 1){
-?>
-                                                        <span class='comment_counter'>1 <?=text($con, "BLOG_COMMENTS_1", $lang)?></span>
-<?php
-                                                    }
-                                                    else if ($r_comment['count'] == 0){
-?>
-                                                        <span class='comment_counter'><?=text($con, "BLOG_COMMENTS_0", $lang)?></span>
-<?php
-                                                    }
-                                                    else{
-?>
-                                                        <span class='comment_counter'><?=$r_comment["count"]?> <?=text($con, "BLOG_COMMENTS_X", $lang)?></span>
-<?php
-                                                    }
-?>
-                                                </td>
-<?php
-                                            } // if ($r_blog["comments"] == 1)
-?>
-                                        </tr>
-                                    </table> <!-- .post_list_footer -->
-<?php
-                                    // Tags
-                                    $q_tag = mysqli_query($con, "SELECT tag FROM post_tag WHERE post= $r_blog[id];");
-                                    if (mysqli_num_rows($q_tag) > 0){
-                                        $tag_string = "<span class='tags'>" . text($con, "BLOG_TAGS", $lang);
-                                        $tag_raw = "";
-                                        while ($r_tag = mysqli_fetch_array($q_tag)){
-                                            $tag_string = $tag_string . "<a href='$proto$http_host/blog/search/tag/$r_tag[tag]'> " . text($con, $r_tag["tag"], $lang) . "</a>, ";
-                                            $tag_raw = $tag_raw . "$r_tag[tag],";
-                                        }
-                                        $tag_string = substr($tag_string, 0, strlen($tag_string) - 2);
-                                        $tag_string = $tag_string . "</span>";
-                                        $tag_raw = substr($tag_raw, 0, strlen($tag_raw) - 1);
-?>
-                                        <meta itemprop='keywords' content='<?=$tag_raw?>'/>
-                                        <?=$tag_string?>
-<?php
-                                    }
-?>
-                                </div> <!-- .blog_entry -->
-                                </br>
-<?php
-                            } // while($r_blog = mysqli_fetch_array($q_blog))
-?>
-                    </div> <!-- #main_column -->
-                </div> <!-- #content_cell_main -->
-                <div class='content_cell'  id='content_cell_right'>
-                    <div class='section' id='info'>
-                        <h3 class='section_title'><?=text($con, "BLOG_DETAILS", $lang)?></h3>
-                        <div id='info_search' class='entry'>
-                            <h4><?=text($con, "BLOG_SEARCH", $lang)?></h4>
-                            <div id='search_panel_inputs'>
-                                <form action='#' onSubmit='event.preventDefault();launchSearch("<?=$lng["search_field_all"]?>");'>
-                                    <input id='search_panel_input' class='search_element' type='text' name='query' placeholder='<?=text($con, "BLOG_SEARCH", $lang)?>'/>
-                                    <input id='search_panel_submit' class='search_element' type='submit' value='<?=text($con, "BLOG_SEARCH", $lang)?>'/>
-                                </form>
-                            </div>
-                        </div> <!-- #info_search -->
-                        <hr/>
-                        <div id='info_tag_cloud' class='entry'>
-                            <h4><?=text($con, "BLOG_TAG_CLOUD", $lang)?></h4>
-                            <div id='cloud'>
-<?php
-                                //Get the most used tag
-                                $q_max = mysqli_query($con, "SELECT max(count) AS max FROM (SELECT count(post) AS count FROM post_tag GROUP BY tag) AS t;");
-                                $r_max = mysqli_fetch_array($q_max);
-                                $max = $r_max["max"];
-                                $q_tag = mysqli_query($con, "SELECT tag, count(post) AS count FROM post_tag GROUP BY tag;");
-                                while($r_tag = mysqli_fetch_array($q_tag)){
-                                    $size = round(60 + 100 * $r_tag['count'] / $max);
-?>
-                                    <a href='<?=$lserver?>/blog/search/tag/<?=$r_tag["tag"]?>'>
-                                        <span style='font-size: <?=$size?>%'><?=text($con, $r_tag["tag"], $lang)?></span>
-                                    </a>
-<?php
-                                }
-?>
-                            </div>
-                        </div> <!-- #info_tag_cloud -->
-                        <hr/>
-                        <div id='info_all' class='entry'>
-                            <h4><?=text($con, "BLOG_ARCHIVE", $lang)?></h4>
-<?php
-                            $q_year = mysqli_query($con, "SELECT year(dtime) AS year FROM post WHERE visible = 1 GROUP BY year(dtime) ORDER BY year DESC;");
-                            while($r_year = mysqli_fetch_array($q_year)){
-?>
-                                <div class='year pointer' onClick='toggleElement("year_<?=$r_year["year"]?>");'>
-                                    <img class='slider' id='slid_year_<?=$r_year["year"]?>' src='<?=$server?>/img/misc/slid-right.png' alt='<?=$r_year["year"]?>'/>
-                                    <span class='fake_a'><?=$r_year["year"]?></span>
-                                </div>
-                                <div class='list_year pointer' id='list_year_<?=$r_year["year"]?>'>
-<?php
-                                    $q_month = mysqli_query($con, "SELECT month(dtime) AS month FROM post WHERE visible = 1 AND year(dtime) = $r_year[year] GROUP BY month(dtime) ORDER BY month DESC;");
-                                    while($r_month = mysqli_fetch_array($q_month)){
-?>
-                                        <div class='month pointer' onClick='toggleElement("month_<?=$r_year["year"]?>_<?=$r_month["month"]?>");'>
-                                            <img class='slider' id='slid_month_<?=$r_year["year"]?>_<?=$r_month["month"]?>' src='<?=$server?>/img/misc/slid-right.png' alt='<?=$r_month["month"]?>'/>
-                                            <span class='fake_a'><?=ucfirst(text($con, "MONTH_" . str_pad($r_month["month"], 2, "0", STR_PAD_LEFT), $lang))?></span>
-                                        </div>
-                                        <ul id='list_month_<?=$r_year["year"]?>_<?=$r_month["month"]?>' class='post_list'>
-<?php
-                                            $q_title = mysqli_query($con, "SELECT id, permalink, title FROM post WHERE visible = 1 AND year(dtime) = $r_year[year] AND month(dtime) = '$r_month[month]' ORDER BY dtime DESC;");
-                                            while($r_title = mysqli_fetch_array($q_title)){
-?>
-                                                <li>
-                                                    <a href='<?=$lserver?>/blog/<?=$r_title["permalink"]?>'><?=text($con, $r_title["title"], $lang)?></a>
-                                                </li>
-<?php
-                                            }
-?>
-                                        </ul>
-<?php
-                                    }
-?>
-                                </div> <!-- #list_year_<?=$r_year["year"]?> -->
-<?php
-                            } //while($r_year = mysqli_fetch_array($q_year))
-?>
-                        </div> <!-- #info_all -->
-                    </div> <!-- #info -->
-                </div> <!-- .content_cell -->
-             </div> <!-- #content_row -->
-         </div> <!-- #content -->
-<?php
-        include $doc_root . "footer.php";
-        stats($con, $cur_section, $cur_entry);
-?>
-    </body>
-</html>

+ 0 - 382
www/blog/post.php

@@ -1,382 +0,0 @@
-<?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;
-
-    // Get post data
-    $permalink = mysqli_real_escape_string($con, $_GET["permalink"]);
-    $q_post = mysqli_query($con, "SELECT * FROM post WHERE permalink = '$permalink' AND visible = 1;");
-    if (mysqli_num_rows($q_post) == 0){
-        header("Location: $lserver/blog/");
-        exit(-1);
-    }
-    $r_post = mysqli_fetch_array($q_post);
-    $id = $r_post["id"];
-    $title = text($con, $r_post["title"], $lang);
-    $text = text($con, $r_post["text"], $lang);
-
-    $cur_section = "blog";
-    $cur_entry = $id;
-
-    // First image (if any)
-    $image = "";
-    $q_image = mysqli_query($con, "SELECT image FROM post_image WHERE post = $id ORDER BY idx LIMIT 1");
-    if (mysqli_num_rows($q_image) > 0){
-        $image = mysqli_fetch_array($q_image)["image"];
-    }
-?>
-<!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><?=$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/blog.css";
-?>
-        </style>
-        <!-- CSS for mobile version -->
-        <style media='(max-width : 990px)'>
-<?php
-            include $doc_root . "css/m/ui.css";
-            include $doc_root . "css/m/blog.css";
-?>
-        </style>
-        <!-- Script files -->
-        <script type='text/javascript'>
-<?php
-            include $doc_root . "script/ui.js";
-            include $doc_root . "script/blog.js";
-?>
-        </script>
-        <!-- Meta tags -->
-        <link rel='canonical' href='<?=$lserver?>/blog/<?=$permalink?>'/>
-        <link rel='author' href='<?=$lserver?>'/>
-        <link rel='publisher' href='<?=$lserver?>'/>
-        <meta name='description' content='<?=$text?>'/>
-        <meta property='og:title' content='<?=$title?> - <?=text($con, "USER_NAME", $lang);?>'/>
-        <meta property='og:url' content='<?=$lserver?>/blog/<?=$permalink?>'/>
-        <meta property='og:description' content='<?=$text?>'/>
-<?php
-        if (strlen($image) == 0){
-?>
-            <meta property="og:image" content="<?=$lserver?>/img/logo/x3/favicon.ico"/>
-<?php
-        }
-        else{
-?>
-            <meta property="og:image" content="<?=$lserver?>/img/blog/x3/<?=$image?>"/>
-<?php
-        }
-?>
-        <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='<?=$title?> - <?=text($con, "USER_NAME", $lang);?>'/>
-        <meta name='twitter:description' content='<?=$text?>'/>
-<?php
-        if (strlen($image) == 0){
-?>
-            <meta property="twitter:image" content="<?=$lserver?>/img/logo/x3/favicon.ico"/>
-<?php
-        }
-        else{
-?>
-            <meta property="twitter:image" content="<?=$lserver?>/img/blog/x3/<?=$image?>"/>
-<?php
-        }
-?>        <meta name='twitter:url' content='<?=$lserver?>/blog/<?=$permalink?>'/>
-        <meta name='robots' content='index follow'/>
-    </head>
-    <body>
-<?php
-        include $doc_root . "header.php";
-?>
-        <div id='content'>
-            <div id='content_row'>
-                <div id='content_cell_post' class='content_cell'>
-                    <div class='section' id='post'>
-                        <h3 class='section_title'><?=$title?></h3>
-                        <div class='entry'>
-<?php
-                            if (strlen($image) > 0){
-?>
-                                <img id='post_main_image' src='<?=$lserver?>/img/blog/x6/<?=$image?>' alt='<?=$title?>' title='<?=$title?>' />
-<?php
-                            }
-?>
-                            <?=$text?>
-<?php
-                            $q_image = mysqli_query($con, "SELECT image FROM post_image WHERE post = $id ORDER BY idx OFFSET 1");
-                            if (mysqli_num_rows($q_image) > 0){
-?>
-                                <div id='image_reel'>
-<?php
-                                    while ($r_image = mysqli_fetch_array($q_image)){
-?>
-                                        <img src='<?=$lserver?>/img/blog/x6/<?=$r_image["image"]?>' alt='<?=$title?>' title='<?=$title?>' />
-<?php
-                                    }
-?>
-                                </div> <!-- #image_reel -->
-<?php
-                            }
-?>
-                            <hr/>
-<?php
-                            #Comments
-                            if ($r_post["comments"] == 1){
-                                $q_comment = mysqli_query($con, "SELECT id, post, DATE_FORMAT(dtime, '%Y-%m-%dT%T') AS cdate, DATE_FORMAT(dtime,'%b %d, %Y - %H:%i') AS dtime, user, username, text FROM post_comment WHERE post = $id;");
-                                $count = mysqli_num_rows($q_comment);
-                                if ($count == 1){
-?>
-                                    <span class='comment_counter'>1 <?=text($con, "BLOG_COMMENTS_1", $lang)?></span>
-<?php
-                                }
-                                else if ($count == 0){
-?>
-                                    <span class='comment_counter'><?=text($con, "BLOG_COMMENTS_0", $lang)?></span>
-<?php
-                                }
-                                else{
-?>
-                                    <span class='comment_counter'><?=$count?> <?=text($con, "BLOG_COMMENTS_X", $lang)?></span>
-<?php
-                                }
-                                while ($r_comment = mysqli_fetch_array($q_comment)){
-                                    $user = $r_comment["username"];
-                                    $user_string = $user;
-                                    if (strlen($user) == 0){
-                                        $user = mysqli_fetch_array(mysqli_query($con, "SELECT concat(fname, concat(' ', lname)) AS name FROM user WHERE id = $r_comment[user];"))["name"];
-                                        $user_string = "<span class='comment_user_registered'>$user</span>";
-                                    }
-?>
-                                    <div itemprop='comment' itemscope itemtype='http://schema.org/UserComments' id='comment_<?=$r_comment["id"]?>' class='comment'>
-                                        <h4  class='comment_user'><?=$user_string?></h4>
-                                        <meta itemprop='creator' content='<?=$user?>'>
-                                        <span class='comment_date date'>
-                                            <time itemprop='commentTime' datetime='<?=$r_comment["cdate"]?>'>
-                                            <?=$r_comment["dtime"]?>
-                                        </span>
-                                        <p itemprop='commentText' class='comment_text'><?=$r_comment["text"]?></p>
-                                    </div>
-<?php
-                                }
-                                //Comment form
-?>
-                                <div class='comment' id='comment_new'>
-                                    <textarea id='new_comment_text' name='text' maxlength='1800' onfocus='showCommentIdentification();' placeholder='<?=text($con, "BLOG_COMMENTS_YOUR", $lang)?>'></textarea>
-                                    <div id='identification_form'>
-                                        <br/>
-                                        <input id='new_comment_user' name='user' maxlength='50' type='text' placeholder='<?text($con, "COMMENT_YOUR_NAME", $lang)?>'/>
-                                        <input type='button' value='<?text($con, "COMMENT_PUBLISH", $lang)?>'/>
-                                    </div>
-                                </div>
-<?php
-                            }
-                            else{
-?>
-                                <h4><?text($con, "COMMENT_CLOSED_POST", $lang)?></h4>
-<?php
-                            }
-?>
-                        </div> <!-- .entry -->
-                    </div> <!-- .section -->
-                </div> <!-- .content_cell -->
-                <div id='content_cell_info' class='content_cell'>
-                    <div class='section' id='info'>
-                        <h3 class='section_title'><?=text($con, "BLOG_DETAILS", $lang)?></h3>
-                        <div id="info_date" class='entry'>
-                            <span class='date'><?=format_date($r_post["dtime"], $lang)?></span>
-                        </div>
-                        <hr/>
-                        <div id="info_share" class='entry'>
-                            <h4><?=text($con, "BLOG_SHARE", $lang)?></h4>
-                            <div id='social'>
-<?php
-                                $q_share = mysqli_query($con, "SELECT id FROM share WHERE visible = 1 ORDER BY idx;");
-                                while ($r_share = mysqli_fetch_array($q_share)){
-?>
-                                    <?=share_link($con, $r_share["id"], $lserver, "$server/blog/$permalink", $lang)?>
-<?php
-                                }
-?>
-                            </div> <!-- #social -->
-                        </div> <!-- #info_share -->
-                        <hr/>
-<?php
-                        $q_tag = mysqli_query($con, "SELECT tag FROM post_tag WHERE post = $id;");
-                        if (mysqli_num_rows($q_tag) > 0){
-?>
-                            <div id="info_tags" class='entry'>
-<?php
-                                $tag_string = "<span id='tags'>" . text($con, "BLOG_TAGS", $lang) . ": ";
-                                $tag_raw = "";
-                                while ($r_tag = mysqli_fetch_array($q_tag)){
-                                    $tag_string = $tag_string . "<a href='$lserver/blog/search/tag/$r_tag[tag]'>$r_tag[tag]</a>, ";
-                                    $tag_raw = $tag_raw . "$r_tag[tag],";
-                                }
-                                $tag_string = substr($tag_string, 0, strlen($tag_string) - 2);
-                                $tag_string = $tag_string . "</span>";
-                                $tag_raw = substr($tag_raw, 0, strlen($tag_raw) - 1);
-?>
-                                <span class='tags'><?=$tag_string?></span>
-                                <meta itemprop='keywords' content='<?=$tag_raw?>'/>
-                            </div> <!-- #info_tags -->
-                            <hr/>
-<?php
-                        } // if (mysqli_num_rows($q_tag) > 0)
-?>
-<?php
-                        // Previous / next
-                        $q_prev = mysqli_query($con, "SELECT id, permalink, title FROM post WHERE id <> $id AND dtime <= '$r_post[dtime]' ORDER BY dtime DESC LIMIT 1;");
-                        $q_next = mysqli_query($con, "SELECT id, permalink, title FROM post WHERE id <> $id AND dtime >= '$r_post[dtime]' ORDER BY dtime LIMIT 1;");
-                        if (mysqli_num_rows($q_prev) > 0 || mysqli_num_rows($q_next) > 0){
-?>
-                            <div id='info_prev_next' class='entry'>
-                                <table id='prev_next'>
-                                    <tr>
-                                        <td id='prev'>
-<?php
-                                            if (mysqli_num_rows($q_prev) > 0){
-                                                $r_prev = mysqli_fetch_array($q_prev);
-?>
-                                                <a href='<?=$lserver?>/blog/<?=$r_prev["permalink"]?>'>
-                                                    <span class='info'>Previous post:</span>
-                                                    <br/>
-                                                    <span class='title'><?=text($con, $r_prev["title"], $lang)?></span>
-                                                </a>
-<?php
-                                            }
-?>
-                                        </td>
-                                        <td id='next'>
-<?php
-                                            if (mysqli_num_rows($q_next) > 0){
-                                                $r_next = mysqli_fetch_array($q_next);
-?>
-                                                <a href='<?=$lserver?>/blog/<?=$r_next["permalink"]?>'>
-                                                    <span class='info'>Next post:</span>
-                                                    <br/>
-                                                    <span class='title'><?=text($con, $r_next["title"], $lang)?></span>
-                                                </a>
-<?php
-                                            }
-?>
-                                        </td>
-                                    </tr>
-                                </table>
-                            </div> <!-- #info_prev_next -->
-                            <hr/>
-<?php
-                        } //  if (mysqli_num_rows($q_prev) > 0 || mysqli_num_rows($q_next) > 0)
-?>
-                        <div id='info_related' class='entry'>
-                            <h4><?=text($con, "BLOG_RELATED", $lang)?></h4>
-                            <ul>
-<?php
-                                // TODO: Truly select related
-                                $q_related = mysqli_query($con, "SELECT permalink, title FROM post WHERE id <> $id ORDER BY rand() LIMIT 3;");
-                                while($r_related = mysqli_fetch_array($q_related)){
-?>
-                                    <li>
-                                        <a href='<?=$lserver?>/blog/<?=$r_related["permalink"]?>'><?=text($con, $r_related["title"], $lang)?></a>
-                                    </li>
-<?php
-                                }
-?>
-                            </ul>
-                        </div>
-                        <hr/>
-                        <div id='info_search' class='entry'>
-                            <h4><?=text($con, "BLOG_SEARCH", $lang)?></h4>
-                            <div id='search_panel_inputs'>
-                                <form action='#' onSubmit='event.preventDefault();launchSearch("<?=$lng["search_field_all"]?>");'>
-                                    <input id='search_panel_input' class='search_element' type='text' name='query' placeholder='<?=text($con, "BLOG_SEARCH", $lang)?>'/>
-                                    <input id='search_panel_submit' class='search_element' type='submit' value='<?=text($con, "BLOG_SEARCH", $lang)?>'/>
-                                </form>
-                            </div>
-                        </div> <!-- #info_search -->
-                        <hr/>
-                        <div id='info_tag_cloud' class='entry'>
-                            <h4><?=text($con, "BLOG_TAG_CLOUD", $lang)?></h4>
-                            <div id='cloud'>
-<?php
-                                //Get the most used tag
-                                $q_max = mysqli_query($con, "SELECT max(count) AS max FROM (SELECT count(post) AS count FROM post_tag GROUP BY tag) AS t;");
-                                $r_max = mysqli_fetch_array($q_max);
-                                $max = $r_max["max"];
-                                $q_tag = mysqli_query($con, "SELECT tag, count(post) AS count FROM post_tag GROUP BY tag;");
-                                while($r_tag = mysqli_fetch_array($q_tag)){
-                                    $size = round(60 + 100 * $r_tag['count'] / $max);
-?>
-                                    <a href='<?=$lserver?>/blog/search/tag/<?=$r_tag["tag"]?>'>
-                                        <span style='font-size: <?=$size?>%'><?=text($con, $r_tag["tag"], $lang)?></span>
-                                    </a>
-<?php
-                                }
-?>
-                            </div>
-                        </div> <!-- #info_tag_cloud -->
-                        <hr/>
-                        <div id='info_all' class='entry'>
-                            <h4><?=text($con, "BLOG_ARCHIVE", $lang)?></h4>
-<?php
-                            $q_year = mysqli_query($con, "SELECT year(dtime) AS year FROM post WHERE visible = 1 GROUP BY year(dtime) ORDER BY year DESC;");
-                            while($r_year = mysqli_fetch_array($q_year)){
-?>
-                                <div class='year pointer' onClick='toggleElement("year_<?=$r_year["year"]?>");'>
-                                    <img class='slider' id='slid_year_<?=$r_year["year"]?>' src='<?=$server?>/img/misc/slid-right.png' alt='<?=$r_year["year"]?>'/>
-                                    <span class='fake_a'><?=$r_year["year"]?></span>
-                                </div>
-                                <div class='list_year pointer' id='list_year_<?=$r_year["year"]?>'>
-<?php
-                                    $q_month = mysqli_query($con, "SELECT month(dtime) AS month FROM post WHERE visible = 1 AND year(dtime) = $r_year[year] GROUP BY month(dtime) ORDER BY month DESC;");
-                                    while($r_month = mysqli_fetch_array($q_month)){
-?>
-                                        <div class='month pointer' onClick='toggleElement("month_<?=$r_year["year"]?>_<?=$r_month["month"]?>");'>
-                                            <img class='slider' id='slid_month_<?=$r_year["year"]?>_<?=$r_month["month"]?>' src='<?=$server?>/img/misc/slid-right.png' alt='<?=$r_month["month"]?>'/>
-                                            <span class='fake_a'><?=ucfirst(text($con, "MONTH_" . str_pad($r_month["month"], 2, "0", STR_PAD_LEFT), $lang))?></span>
-                                        </div>
-                                        <ul id='list_month_<?=$r_year["year"]?>_<?=$r_month["month"]?>' class='post_list'>
-<?php
-                                            $q_title = mysqli_query($con, "SELECT id, permalink, title FROM post WHERE visible = 1 AND year(dtime) = $r_year[year] AND month(dtime) = '$r_month[month]' ORDER BY dtime DESC;");
-                                            while($r_title = mysqli_fetch_array($q_title)){
-?>
-                                                <li>
-                                                    <a href='<?=$lserver?>/blog/<?=$r_title["permalink"]?>'><?=text($con, $r_title["title"], $lang)?></a>
-                                                </li>
-<?php
-                                            }
-?>
-                                        </ul>
-<?php
-                                    }
-?>
-                                </div> <!-- #list_year_<?=$r_year["year"]?> -->
-<?php
-                            } //while($r_year = mysqli_fetch_array($q_year))
-?>
-                        </div> <!-- #info_all -->
-                    </div> <!-- #info -->
-                </div> <!-- .content-cell -->
-            </div> <!-- #content-row -->
-        </div> <!-- #content -->
-<?php
-        include $doc_root . "footer.php";
-        stats($con, $cur_section, $cur_entry);
-?>
-    </body>
-</html>

+ 0 - 247
www/css/blog.css

@@ -1,247 +0,0 @@
-/****************************************
- * Pages layout.                        *
- ****************************************/
-div#content{
-    display: table;
-}
-
-div#content div#content_row{
-    display: table-row;
-}
-
-div#content div#content_row div.content_cell{
-    padding: 1em;
-    display: table-cell;
-    vertical-align: top;
-}
-
-div#content div#content_row div#content_cell_main{
-    width: 75%;
-}
-
-div#content div#content_row div#content_cell_info{
-    /* Post info container. */
-    width: 25%;
-    min-width: 8em;
-    max-width: 20em;
-}
-
-
-/****************************************
- * Right panel.                         *
- ****************************************/
-div#info hr{
-    margin: 0 5% 0 5%;
-    opacity: 0.3;
-}
-
-div#info h4{
-    margin-top: 0.2em;
-    margin-bottom: 0.2em;
-}
-
-div#info div.entry{
-    margin: 0.2em;
-}
-
-div#info div#info_date{
-    /* Date of the post. */
-    text-align: center;
-    font-style: italic;
-    font-size: 70%;
-    opacity: 80%;
-}
-
-div#info div#info_share{
-    /* Share icons. */
-}
-
-div#info div#info_share div#social{
-    text-align: center;
-}
-
-div#info div#info_tags{
-    /* Post tages. */
-    font-size: 80%;
-    opacity: 90%;
-}
-
-div#info div#info_prev_next{
-    /* Previous / next post. */
-}
-
-div#info div#info_prev_next table#prev_next{
-    /* Previous/next posts links. */
-    border-collapse: collapse;
-    margin: 0 auto 0 auto;
-}
-
-div#info div#info_prev_next table#prev_next td{
-    width: 50%;
-    padding: 0.5em;
-}
-
-div#info div#info_prev_next table#prev_next td#prev{
-    border-right: 0.03em solid #00440088;
-    margin-right: 0.5em;
-    text-align: right;
-}
-
-div#info div#info_prev_next table#prev_next td#next{
-    border-left: 0.03em solid #00440088;
-    margin-left: 0.5em;
-    text-align: left;
-}
-
-div#info div#info_prev_next table#prev_next td span.info{
-    font-size: 80%;
-}
-
-div#info div#info_prev_next table#prev_next td span.title{
-    font-weight: bold;
-}
-
-div#info div#info_related{
-    /* Related posts. */
-}
-
-div#info div#info_related ul{
-    margin: 0 0 0 0.6em;
-    padding-left: 0.7em;
-}
-
-div#info div#info_related ul li{
-    margin: 0;
-}
-
-div#info div#info_search{
-    /* Post search form. */
-}
-
-div#info div#info_search input#search_panel_input{
-    display: inline-block;
-    width: 60%;
-}
-
-div#info div#info_search input#search_panel_submit{
-    display: inline-block;
-    width: 30%;
-}
-
-div#info div#info_tag_cloud{
-    /* Tag cloud. */
-}
-
-div#info div#info_tag_cloud div#cloud{
-    text-align: center;
-}
-
-div#info div#info_all{
-    /* Post archive. */
-    margin-right: 0;
-    padding-right: 0;
-}
-
-div#info_all div.list_year{
-    /* Year list in the archive.*/
-    margin-left: 1em;
-    max-height: 0em;
-    overflow-y: hidden;
-    transition: max-height 0.6s ease-in-out;
-}
-
-div#info_all ul.post_list{
-    margin-top: 0em;
-    margin-bottom: 0em;
-    max-height: 0em;
-    overflow-y: hidden;
-    transition: max-height 0.6s ease-in-out;
-}
-
-div#info_all ul.post_list li{
-    padding: 0.2em 0 0 0;
-}
-
-div#info_all div.post_list_image_container{
-    text-align: center;
-}
-
-div#info_all img.post_list_image{
-    float: center;
-    max-width: 15em;
-    max-width: 90%;
-    max-height: 9em;
-    margin: 0.5em 1em 0 0.5em;
-    border: 0.15em solid #333333;
-    border-radius: 0.2em;
-    box-shadow: 0 0 0.5em #111111;
-}
-
-
-/****************************************
- * Blog main page.                      *
- ****************************************/
-div#post_list img.post_list_image{
-    float: left;
-    background-color: #ffffff;
-    border: 0.1em solid #003300;
-    border-radius: 0.3em;
-    margin: 0 0.7em 0.7em 0.7em;
-    max-width: 5em;
-    max-height: 3em;
-}
-
-div#post_list table.post_list_footer{
-    font-size: 80%;
-    width: 100%;
-}
-
-div#post_list table.post_list_footer td.comment_counter{
-    font-style: italic;
-    text-align: right;
-}
-
-div#post_list span.tags{
-    font-size: 80%;
-    font-style: italic;
-}
-
-
-/****************************************
- * Post view page.                      *
- ****************************************/
-div#content_cell_post{
-    /* Post and comments container. */
-    width: 75%;
-}
-
-div#post img#post_main_image{
-    /* Post main image. */
-    display: block;
-    max-height: 11em;
-    margin: 0.5em auto 1em auto;
-    border: 0.1em solid #003400;
-    border-radius: 0.5em;
-    background-color: #ffffff;
-}
-
-div#post div#image_reel{
-    /* Post secondary images container. */
-    overflow-x: scroll;
-    border: 0.1em solid #003400;
-    border-radius: 0.3em;
-    height: 7em;
-    background-color: #334433;
-    padding: 0.5em;
-}
-
-div#post div#image_reel img{
-    /* Secondary images of the post. */
-    vertical-align: middle;
-    max-height: 5em;
-    max-width: 7em;
-    border: 0.2em solid #003400;
-    border-radius: 0.1em;
-    margin: 0.5em;
-    background-color: #ffffff;
-}

+ 0 - 43
www/css/error.css

@@ -1,43 +0,0 @@
-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;
-}

+ 0 - 86
www/css/home.css

@@ -1,86 +0,0 @@
-/* Page logo in the top of the toolbar */
-div#logo{
-    width: 100%;
-    text-align: center;
-}
-div#logo img{
-    max-height: 7em;
-}
-
-div#content{
-    display: table;
-}
-
-div#content div#content_row{
-    display: table-row;
-}
-
-div#content div#content_row div.content_cell{
-    display: table-cell;
-    vertical-align: top;
-    margin:1em;
-}
-
-div#content div#content_row div#content_cell_profile{
-    width: 30%;
-}
-
-div#content div#content_row div#content_cell_content{
-    width: 70%;
-}
-
-/* Profile section */
-div#content_cell_profile img{
-    position: relative;
-    max-width: 8em;
-    max-height: 8em;
-    border-radius: 1.2em;
-    margin: 0.5em;
-    border: 0.1em solid #000000;
-    vertical-align: top;
-    z-index: 2;
-}
-
-div#content_cell_profile span#tagline{
-    display: inline-block;
-    padding-top: 0.5em;
-    margin-left: -1em;
-    padding-left: 1em;
-    padding-right: 0.5em;
-    border-bottom: 0.1em solid #000000;
-    border-bottom-right-radius: 0.3em;
-    z-index: 1;
-}
-
-/* Projects section */
-div#projects_section img.project_list_image{
-    float: left;
-    background-color: #ffffff;
-    border: 0.1em solid #003300;
-    border-radius: 0.3em;
-    margin: 0 0.5em 0.5em 0.5em;
-    max-width: 5em;
-    max-height: 3em;
-}
-
-
-/* Blog section */
-div#blog_section img.post_list_image{
-    float: left;
-    background-color: #ffffff;
-    border: 0.1em solid #003300;
-    border-radius: 0.3em;
-    margin: 0 0.5em 0.5em 0.5em;
-    max-width: 5em;
-    max-height: 3em;
-}
-
-div#blog_section table.post_list_footer{
-    font-size: 80%;
-    width: 100%;
-}
-
-div#blog_section table.post_list_footer td.comment_counter{
-    font-style: italic;
-    text-align: right;
-}

+ 0 - 0
www/css/m/blog.css


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


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

@@ -1,22 +0,0 @@
-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/css/m/profile.css


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

@@ -1,22 +0,0 @@
-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;
-}

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

@@ -1,64 +0,0 @@
-.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/css/m/ui.scc


+ 0 - 58
www/css/profile.css

@@ -1,58 +0,0 @@
-div#profile{
-    display: table;
-}
-
-div#profile div.table_row{
-    diplay: table-row;
-}
-
-div#profile div.table_row div.table_cell{
-    display: table-cell;
-    vertical-align: middle;
-}
-
-div#profile img{
-    max-width: 10em;
-    max-height: 10em;
-    border-radius: 1.2em;
-    margin: 1em;
-    border: 0.3em solid #000000;
-}
-
-div.cv_entry{
-    margin: 0.5em;
-}
-
-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.role{
-    margin: 0em 1em 0 1em;
-    border-left: 0.1em solid #00330077;
-}
-
-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.role h5{
-    font-style: italic;
-    margin: 0.5em 1em 0.5em 1em;
-}
-
-div.role p{
-    margin: 0.5em 2em 0 2em;
-    padding-bottom: 1em;
-}

+ 0 - 296
www/css/project.css

@@ -1,296 +0,0 @@
-/****************************************
- * Pages layout.                        *
- ****************************************/
-div#content{
-    display: table;
-}
-
-div#content div#content_row{
-    display: table-row;
-}
-
-div#content div#content_row div.content_cell{
-    display: table-cell;
-    padding: 1em;
-    vertical-align: top;
-}
-
-div#content_cell_main{
-    width: 75%;
-}
-
-div#content div#content_row div#content_cell_info{
-    /* Project info container. */
-    width: 25%;
-    min-width: 8em;
-    max-width: 20em;
-}
-
-
-/****************************************
- * Right panel.                         *
- ****************************************/
-div#info hr{
-    margin: 0 5% 0 5%;
-    opacity: 0.3;
-}
-
-div#info h4{
-    margin-top: 0.2em;
-    margin-bottom: 0.2em;
-}
-
-div#info div.entry{
-    margin: 0.2em;
-}
-
-div#info div#info_date{
-    /* Date of the post. */
-    text-align: center;
-    font-style: italic;
-    font-size: 70%;
-    opacity: 80%;
-}
-
-div#info div#info_share{
-    /* Share icons. */
-}
-
-div#info div#info_share div#social{
-    text-align: center;
-}
-
-div#info div#info_tags{
-    /* Post tages. */
-    font-size: 80%;
-    opacity: 90%;
-}
-
-div#info div#info_prev_next{
-    /* Previous / next post. */
-}
-
-div#info div#info_prev_next table#prev_next{
-    /* Previous/next posts links. */
-    border-collapse: collapse;
-    margin: 0 auto 0 auto;
-}
-
-div#info div#info_prev_next table#prev_next td{
-    width: 50%;
-    padding: 0.5em;
-}
-
-div#info div#info_prev_next table#prev_next td#prev{
-    border-right: 0.03em solid #00440088;
-    margin-right: 0.5em;
-    text-align: right;
-}
-
-div#info div#info_prev_next table#prev_next td#next{
-    border-left: 0.03em solid #00440088;
-    margin-left: 0.5em;
-    text-align: left;
-}
-
-div#info div#info_prev_next table#prev_next td span.info{
-    font-size: 80%;
-}
-
-div#info div#info_prev_next table#prev_next td span.title{
-    font-weight: bold;
-}
-
-div#info div#info_related{
-    /* Related posts. */
-}
-
-div#info div#info_related ul{
-    margin: 0 0 0 0.6em;
-    padding-left: 0.7em;
-}
-
-div#info div#info_related ul li{
-    margin: 0;
-}
-
-div#info div#info_search{
-    /* Post search form. */
-}
-
-div#info div#info_search input#search_panel_input{
-    display: inline-block;
-    width: 60%;
-}
-
-div#info div#info_search input#search_panel_submit{
-    display: inline-block;
-    width: 30%;
-}
-
-div#info div#info_tag_cloud{
-    /* Tag cloud. */
-}
-
-div#info div#info_tag_cloud div#cloud{
-    text-align: center;
-}
-
-div#info div#info_all{
-    /* Post archive. */
-    margin-right: 0;
-    padding-right: 0;
-}
-
-div#info_all div.list_year{
-    /* Year list in the archive.*/
-    margin-left: 1em;
-    max-height: 0em;
-    overflow-y: hidden;
-    transition: max-height 0.6s ease-in-out;
-}
-
-div#info_all ul.post_list{
-    margin-top: 0em;
-    margin-bottom: 0em;
-    max-height: 0em;
-    overflow-y: hidden;
-    transition: max-height 0.6s ease-in-out;
-}
-
-div#info_all ul.post_list li{
-    padding: 0.2em 0 0 0;
-}
-
-div#info_all div.post_list_image_container{
-    text-align: center;
-}
-
-div#info_all img.post_list_image{
-    float: center;
-    max-width: 15em;
-    max-width: 90%;
-    max-height: 9em;
-    margin: 0.5em 1em 0 0.5em;
-    border: 0.15em solid #333333;
-    border-radius: 0.2em;
-    box-shadow: 0 0 0.5em #111111;
-}
-
-
-/* Common elements */
-span.version_type{
-    padding: 0.05em;
-    border 0.1em solid #444444;
-    border-radius: 0.2em;
-    font-size: 85%;
-    font-family: monospace; 
-    font-weight: bold;
-}
-
-
-/* Projects main page */
-div#right_column div#advanced_search{
-    margin: 0.6em 0.1em 0.5em 0.1em;
-    transition: all .3s ease-in-out;
-    overflow: hidden;
-    height: 0;
-}
-
-/* Project view page */
-
-
-div#main_column div#image_reel{
-    text-align: center;
-    width: 80%;
-    margin: 1em auto 1em auto;
-    border: 0.3em solid #000000;
-    border-radius: 0.3em;
-    padding: 0.5em;
-    background-color: #556655;
-    overflow-x: auto;
-}
-
-div#main_column div#image_reel table{
-    margin: 0 auto 0 auto;
-}
-
-div#main_column div#image_reel img{
-    display: inline-block;
-    border: 0.1em solid #000000;
-    border-radius: 0.1em;
-    background-color: #000000;
-    vertical-align: middle;
-    max-height: 6em;
-    max-width: 6em;
-}
-
-div#main_column div.iframe_container{
-    width: 100%;
-    text-align: center;
-}
-
-div#main_column iframe.project_embed{
-    background-color: #ffffff;
-    border-radius: 0.8em;
-    border: 0.1em solid #110022;
-    max-width: 90%;
-    max-height: 70em;
-}
-
-div#right_column{
-    transition: all .3s ease-in-out;
-}
-
-div#right_column div.url{
-    vertical-align: middle;
-    font-size: 70%;
-    margin-bottom: 0.3em;
-}
-
-div#right_column div.url img{
-    width: 2em;
-    height: 2em;
-    vertical-align: middle;
-}
-
-div#right_column img#img_license{
-    max-height: 2.3em;
-    text-align: center;
-}
-
-div#license{
-    display: none;
-    opacity: 0;
-    position: fixed;
-    transition: opacity .4s ease-in-out;
-    top: 3em;
-    left: 5em;
-    right: 5em;
-    bottom: 2em;
-}
-
-div#license h3 img.pointer{ /* Close icon*/
-    float: right;
-    height: 0.5em;
-    width: 0.5em;
-    margin-right: 1.2em;
-    margin-top: 0.2em;
-}
-
-div#license div.entry{
-    height: 30%;
-    margin: 0 0.5em 0.5em 0.5em;
-    overflow-y: scroll;
-}
-
-div#license div.entry h4{
-    margin: 0;
-}
-
-div#license div.entry div.license_text{
-    margin: 0;
-    
-}
-
-

+ 0 - 592
www/css/ui.css

@@ -1,592 +0,0 @@
-/**********************************
- * Fonts used across the page     *
- **********************************/
-
-/* Font */
-@font-face {
-    font-family: 'Nunito'; 
-    src:  url('/fonts/Nunito-Regular.ttf'); 
-}
-
-/**********************************
- * Elements that are solely for   *
- * the desktop or mobile          *
- * version.                       *
- **********************************/
-
-.desktop{
-    display: initial;
-}
-
-.mobile{
-    display: none;
-}
-
-/**********************************
- * Styles to be applied across    *
- * all the site for all the       *
- * elements of it's type          *
- **********************************/
-
-/* Styles for the body of the page */
-body{
-    background-color: #111111;
-}
-
-/* Style for all links */
-a{
-    color: #555555;
-    text-shadow: 0 0 0.5em #7777ff;
-    text-decoration: none;
-}
-
-.fake_a{
-    color: #555555;
-    text-shadow: 0 0 0.5em #7777ff;
-    text-decoration: none;
-}
-
-
-/* Elements fith bold font */
-.bold{
-    font-weight: bold;
-}
-
-.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;
-}
-
-
-/**********************************
- * Toolbar style                  *
- **********************************/
-
-/* Container for the header */
-div#header_parent{
-    width: 100%;
-    text-align: center;
-}
-
-/* The actual header */
-nav#header{
-    text-align: center;
-    height: 3.4em;
-    display: inline;
-    z-index: 300;
-    margin-left: auto;
-    margin-right: auto;
-    font-weight: bold;
-    font-size: 110%;
-}
-
-/* Dummy span to use as vertical separator between links */
-nav#header span.link_separator{
-    border-left: 0.077em solid rgba(200, 200, 200, .5);
-}
-
-/* All the links in the bar. Contains the text and the icon */
-nav#header a{
-    margin: auto;
-    text-decoration: none;
-    color: #cccccc;
-    text-shadow: 0 0 0.5em #000000;
-}
-
-/* Contains everithing inside each link (direct and only child of a.header_link) */
-nav#header span.header_container {
-    margin: auto;
-    text-align: center;
-    min-width: 3.125em;
-    margin-right: 0.43em;
-    margin-left: 0.43em;
-    padding-left: 0.625em;
-    padding-top: 0.375em;
-    padding-bottom: 0.375em;
-    padding-right: 2.19em;
-    display: inline-block;
-    position: relative;
-    transition: all .3s ease-in-out;
-    box-shadow: 0 0 0.063em #ffffff00;
-    border: 0.06em solid #ffffff00;
-    border-radius: 0.5em;
-}
-
-nav#header span.header_container:hover {
-    border: 0.06em solid #ffffff88;
-    background-color: #ffffff33;
-}
-
-/* Contains the icon for each entry */
-nav#header span.header_icon_container{
-    border-bottom: 0.063em solid #999999;
-    padding-bottom: 0.313em;
-}
-
-/* Icon for each entry of the header */
-nav#header img.header_icon{
-    opacity: 0.3;
-    width: 1.563em;
-    height: 1.563em;
-    vertical-align: middle;
-    transition: opacity 0.4s ease-in-out;
-}
-nav#header span.header_container:hover img.header_icon{
-    opacity: 1;
-}
-
-
-/* A line separating the header from the rest of the page */
-hr#header_separator{
-    width: 70%;
-}
-
-
-
-/**********************************
- * Footer style                   *
- **********************************/
-
-/* The actual footer */
-div#footer{
-    display: inline-block;
-    font-size: 80%;
-    text-align: center;
-    height: 3.438em;
-    margin-left: auto;
-    margin-right: auto;
-    margin-top: 3.125em;
-    margin-bottom: 3.125em;
-    color: #dddddd;
-}
-
-/* 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;
-}
-
-/* An horizontal line separating the page contents from the footer */
-div#footer hr#footer_separator{
-/*  margin-top: 3.125em; */
-    border: 0;
-    background-color: #444444;
-    height: 0.1em;
-    width: 70%;
-}
-
-/* Left area of the footer */
-div#footer td#footer_left{
-    width: 33%;
-    text-align: center;
-}
-
-/* Middle area of the footer */
-div#footer td#footer_center{
-    width: 33%;
-    text-align: center;
-}
-
-/* Right area of the footer */
-div#footer td#footer_right{
-    width: 33%;
-    text-align: center;
-}
-
-/* Icons for social media */
-div#footer img.footer_social_icon{
-    width: 1.875em;
-    vertical-align: middle;
-    background-color: #ffffff;
-    border: 0.1em solid #ffffff;
-    border-radius: 0.3em;
-}
-
-div#footer 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 a.lang img:hover{
-    box-shadow: 0 0 1em #111;
-}
-
-
-
-
-/**********************************
- * Styles for the elements that   *
- * compose the basic strucure of  *
- * the site.                      *
- **********************************/
-
-/* The content is everything between the header and the footer */
-div#content{
-    position: relative;
-    width: 100%;
-    height: 100%;
-    margin-bottom: 1.875em;
-}
-
-div.section{
-    margin: 0.5em;
-    padding: 0;
-    background-color: #ffffff;
-    border: 0.063em solid #005500;
-    border-radius: 1em 1em;
-    box-shadow: 0 0 0.75em #003300;
-    overflow: hidden;
-}
-
-div.section h3.section_title{
-    font-weight: bold;
-    color: #ccddff;
-    text_align: left;
-    padding: 0.2em 0.4em 0.2em 0.4em;
-    margin: 0;
-    text-shadow: 0 0 0.4em #000022;
-    font-size: 150%;
-    background: linear-gradient(to bottom, #1e9957 0%,#29d889 89%,#20ca7c 97%,#7de8b9 100%);
-}
-
-/* .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;
-}

+ 0 - 91
www/error.php

@@ -1,91 +0,0 @@
-<?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 = "error";
-    $cur_entry = http_response_code();
-    $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>
-<?php
-        include $doc_root . "header.php";
-?>
-        <div class='section' >
-            <h3 class='section_title'><?=text($con, "ERROR_ERROR", $lang)?></h3>
-            <table id='error_header'>
-                <tr>
-                    <td>
-                        <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>
-                    </td>
-                    <td>
-                        <h2><?=text($con, "ERROR_" . $error . "_TITLE", $lang);?></h2>
-                    </td>
-                </tr>
-            </table>
-            <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> <!-- .section -->
-<?php
-        include $doc_root . "footer.php";
-        stats($con, $cur_section, $cur_entry);
-        http_response_code($cur_entry);
-?>
-    </body>
-</html>

BIN
www/fonts/Nunito-Bold.ttf


BIN
www/fonts/Nunito-Light.ttf


BIN
www/fonts/Nunito-Regular.ttf


+ 0 - 93
www/fonts/OFL.txt

@@ -1,93 +0,0 @@
-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.

+ 0 - 38
www/footer.php

@@ -1,38 +0,0 @@
-<div id='footer'>
-    <hr id='footer_separator'/><br/>
-    <table id='footer_table'>
-        <tr>
-            <td id='footer_left'>
-                <span id='footer_follow' class='desktop'><?=text($con, "FOOTER_FOLLOW", $lang);?><br/></span>
-<?php
-                $q_social = mysqli_query($con, "SELECT title, icon, url FROM social WHERE visible = 1 ORDER BY idx;");
-                while ($r_social = mysqli_fetch_array($q_social)){
-?>
-                    <a title='<?=text($con, $r_social["title"], $lang)?>' href='<?=$r_social["url"]?>'>
-                        <img class='footer_social_icon' src='<?=$lserver?>/img/social/x2/<?=$r_social["icon"]?>' alt='<?=text($con, $r_social["title"], $lang)?>' title='<?=text($con, $r_social["title"], $lang)?>'/>
-                    </a>
-<?php
-                }
-?>
-            </td>
-            <td id='footer_center'><?=str_replace("#YEAR#", date("Y"), text($con, "FOOTER_COPY", $lang));?></td>
-            <td id='footer_right'>
-                <a href='<?=$lserver?>/help/'><?=text($con, "FOOTER_HELP", $lang);?></a>
-                <br/><br/>
-<?php
-                $q_lang = mysqli_query($con, "SELECT * FROM lang WHERE active = 1;");
-                while ($r = mysqli_fetch_array($q_lang)){
-                    $uri = $_SERVER["REQUEST_URI"];
-                    if (substr($uri, 3, 1) == '/'){
-                        $uri = substr($uri, 3);
-                    }
-                    $dest = $server . "/" . $r["code"] . $uri;
-?>
-                    <a class='lang' href='<?=$dest?>'><img src='<?=$lserver?>/img/lang/<?=$r["code"]?>.gif' alt='<?=$r['name']?>' /></a>
-<?php
-                }
-?>
-            </td>
-        </tr>
-    </table>
-</div>

+ 0 - 457
www/functions.php

@@ -1,457 +0,0 @@
-<?php
-
-
-    /*****************************************************
-     * This function is called from almost everywhere at *
-     * the beggining of the page. It initializes the     *
-     * session variables, connect to the db, enabling    *
-     * the variable $con for futher use everywhere in    *
-     * the php code, and populates the arrays $user      *
-     * and $permission, with info about the user.        *
-     *                                                   *
-     * @return: (db connection): The connection handler. *
-     *****************************************************/
-    function start_db(){
-        //Include the db configuration file. It's somehow like this
-        /*
-        <?php
-            $db_host = "XXXX";
-            $db_name = "XXXX";
-            $db_user = "XXXX";
-            $db_pass = "XXXX";
-        ?>
-        */
-        include ".htpasswd";
-
-        $con = mysqli_connect($db_host, $db_user, $db_pass, $db_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($con, "utf-8");
-        header("Content-Type: text/html; charset=utf8");
-        mysqli_query($con, "SET NAMES utf8;");
-
-        //Return the db connection
-        return $con;
-    }
-
-
-    /*****************************************************
-     * Finds out the protocol the user is connecting to  *
-     * the site with (http or https)                     *
-     * @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;
-    }
-
-
-    /*****************************************************
-     * This function selects the language the page will  *
-     * be displayed inf the page. Several methods are    *
-     * used: cookie detection, and browser language      *
-     * preferences.                                      *
-     * @params:                                          *
-     *    con (Mysql connection): Connection handler.    *
-     * @return: (string): Language code.                 *
-     *****************************************************/
-    function select_language($con){
-
-        // Get available languages from db
-        $available_languages = array();
-        $q_lang = mysqli_query($con, "SELECT code FROM lang WHERE active = 1;");
-        while ($r_lang = mysqli_fetch_array($q_lang)){
-            array_push($available_languages, $r_lang["code"]);
-        }
-
-        // Check for language in uri
-        $lang = substr($_SERVER["REQUEST_URI"], 1, 2);
-        if (in_array($lang, $available_languages)){
-            return $lang;
-        }
-        else{
-            // Language is not in url. Find it out and redirect
-            // Is passed on the URL?
-            $lang = $_GET["lang"];
-            if (in_array($lang, $available_languages)){
-                header("Location: " . get_protocol() . $_SERVER["HTTP_HOST"] . "/" . $lang . $_SERVER["REQUEST_URI"]);
-                return $lang;
-            }
-
-            // Try to read cookie.
-            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.
-            else{
-                $langs = prefered_language($available_languages, $_SERVER["HTTP_ACCEPT_LANGUAGE"]);
-                $lang = $langs[0];
-                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 th languages *
-     * offered by the site.                              *
-     *                                                   *
-     * @params:                                          *
-     *    available_languages: (string array) Contains   *
-     *                         a list of strins offered  *
-     *                         by the site.              *
-     *    http_accept_language: (string) Raw header with *
-     *                          info about client        *
-     *                          language preferences.    *
-     * @return: (string array) List of the languages     *
-     *          offered, sorted by prefference.          *
-     *****************************************************/
-    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;
-    }
-
-
-    /*****************************************************
-     * This function turns a date string into a human    *
-     * readable string, deppending o the specified       *
-     * language.                                         *
-     *                                                   *
-     * @params:                                          *
-     *    strdate: (string): Date string.                *
-     *    lang: (string): Language code (es, en, eu).    *
-     *    time: (boolean): Append the time at the end.   *
-     * @return: (string): Formatted date string.         *
-     *****************************************************/
-    function format_date($strdate, $lang, $time = true){
-        $date = strtotime($strdate);
-        $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;
-    }
-
-
-
-    /*****************************************************
-     * Generates a URL-valid string from a regular one.  *
-     *                                                   *
-     * @params:                                          *
-     *    text: (string): Original string.               *
-     * @return: (string): URL-valid string.              *
-     *****************************************************/
-    function permalink($text){
-        $unwanted_array = array("Š"=>"S", "š"=>"s", "Ž"=>"Z", "ž"=>"z", "À"=>"A", "Á"=>"A", "Â"=>"A", "Ã"=>"A", "Ä"=>"A", "Å"=>"A", "Æ"=>"A", "Ç"=>"C", "È"=>"E", "É"=>"E",
-                            "Ê"=>"E", "Ë"=>"E", "Ì"=>"I", "Í"=>"I", "Î"=>"I", "Ï"=>"I", "Ñ"=>"N", "Ò"=>"O", "Ó"=>"O", "Ô"=>"O", "Õ"=>"O", "Ö"=>"O", "Ø"=>"O", "Ù"=>"U",
-                            "Ú"=>"U", "Û"=>"U", "Ü"=>"U", "Ý"=>"Y", "Þ"=>"B", "ß"=>"Ss", "à"=>"a", "á"=>"a", "â"=>"a", "ã"=>"a", "ä"=>"a", "å"=>"a", "æ"=>"a", "ç"=>"c",
-                            "è"=>"e", "é"=>"e", "ê"=>"e", "ë"=>"e", "ì"=>"i", "í"=>"i", "î"=>"i", "ï"=>"i", "ð"=>"o", "ñ"=>"n", "ò"=>"o", "ó"=>"o", "ô"=>"o", "õ"=>"o",
-                            "ö"=>"o", "ø"=>"o", "ù"=>"u", "ú"=>"u", "û"=>"u", "ý"=>"y", "þ"=>"b", "ÿ"=>"y" );
-        $str = strtr( $text, $unwanted_array );
-        $str = preg_replace("/[^\da-zA-Z ]/i", "", $str);
-        $str = str_replace(" ", "-", $str);
-        return $str;
-    }
-
-    /*****************************************************
-     * Generates a "Share" link for a network.           *
-     *                                                   *
-     * @params:                                          *
-     *    con (Mysql connection): Connection handler.    *
-     *    network (int): Social network ID.              *
-     *    server: (string): Server name. Can be empty.   *
-     *    url: (string): URL to be shared.               *
-     *    lang: (string): Language code (two letters).   *
-     * @return: (string): URL-valid string.              *
-     *****************************************************/
-    function share_link($con, $network, $server, $url, $lang){
-        if (strlen($url) == 0){
-            return "";
-        }
-        $out = "<a class='share' target='_blank' ";
-        $q_network = mysqli_query($con, "SELECT url, icon, title, text FROM share WHERE visible = 1 AND id = $network;");
-        if (mysqli_num_rows($q_network) == 0){
-            return "";
-        }
-        else{
-            $r_network = mysqli_fetch_array($q_network);
-            $out = $out . "href='" . $r_network["url"] . htmlspecialchars($url) . "' title='" . text($con, $r_network["text"], $lang) . "'>";
-            $out = $out . "<img class='share' src='" . $server . "/img/social/x1/" . $r_network["icon"] . "' alt='" . text($con, $r_network["text"], $lang) . "' title='" . text($con, $r_network["text"], $lang) . "' />";
-            $out = $out . "</a>";
-            return $out;
-        }
-    }
-
-
-    /*****************************************************
-     * Retrieves a text fragment from the database.      *
-     *                                                   *
-     * @params:                                          *
-     *    con (Mysql connection): Connection handler.    *
-     *    id: (string): Text identifier.                 *
-     *    lang: (string): Language identifier.           *
-     * @return: (string): Text.                          *
-     *****************************************************/
-    function text($con, $id, $lang){
-        $q = mysqli_query($con, "SELECT text, file FROM text WHERE id = '$id' AND lang = '$lang';");
-        $r = mysqli_fetch_array($q);
-        if (strlen($r["file"]) > 0){
-            return file_get_contents($_SERVER["DOCUMENT_ROOT"] . "string/" . $r["file"]);
-        }
-        else{
-            return $r["text"];
-        }
-    }
-
-
-    /*****************************************************
-     * This function closes all the opened HTML tags in  *
-     * a given string.                                   *
-     *                                                   *
-     * @params:                                          *
-     *    html: (string): The string with HTML tags.     *
-     * @return: (string): HTML with closed tags.         *
-     *****************************************************/
-    function close_tags($html) {
-        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, ut to the next   *
-     * white character. If indicated, it will append a   *
-     * link to the full text.                            *
-     *                                                   *
-     * @params:                                          *
-     *    text: (string): The text to shorten.           *
-     *    length: (int): The desired length.             *
-     *    linktext: (string): Text fot the link.         *
-     *    link: (string): URI of the full text.          *
-     * @return: (string): Cutted text.                   *
-     *****************************************************/
-     function cut_text($text, $length, $linktext, $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)){
-            $cut = $cut . "... <a href='$link'>$linktext</a>";
-        }
-        return $cut;
-    }
-
-
-    /*****************************************************
-     * 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. It will also increase the ad views     *
-     * count (if any was shown).                         *
-     *                                                   *
-     * @params:                                          *
-     *    con (Mysql connection): Connection handler.    *
-     *    section: (string): Site section being visited. *
-     *    id: (int): ID of the entri being visited       *
-     *****************************************************/
-    function stats($con, $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";
-
-        $i = 0;
-        while ($i < sizeof($bot_kw)) {
-            if (strpos(strtolower($uagent), $bot_kw[$i]) !== false || strpos(strtolower($browser), $bot_kw[$i]) !== false){
-                mysqli_close($con);
-                return;
-            }
-            $i ++;
-        }
-        if (strlen($os) == 0 || strlen($browser) == 0){ // Certain chinese hosting provider makes a lot of requests...
-            mysqli_close($con);
-            return;
-        }
-
-        //Look for a visit with the same IP in the last 30 mins.
-        $q = mysqli_query($con, "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($con, "INSERT INTO stat_visit (ip, uagent, os, browser) VALUES ('$ip', '$uagent', '$os', '$browser');");
-            $q = mysqli_query($con, "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($con, "INSERT INTO stat_view (visit, section, entry) VALUES ($visit, '$section', '$id');");
-
-    }
-?>
-

+ 0 - 32
www/header.php

@@ -1,32 +0,0 @@
-<div id='header_parent'>
-    <nav id='header'>
-        <a href='<?=$lserver?>/'>
-            <span class='header_container'>
-                <span class='header_icon_container'><img class='header_icon' alt='<?=text($con, "HEADER_HOME", $lang);?>' src='<?=$lserver?>/img/icon/home.gif'/></span>
-                <?=text($con, "HEADER_HOME", $lang);?>
-            </span>
-        </a>
-        <span class='link_separator desktop'></span>
-        <a 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, "HEADER_PROFILE", $lang);?>
-            </span>
-        </a>
-        <span class='link_separator desktop'></span>
-        <a 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/project.gif'/></span>
-                <?=text($con, "HEADER_PROJECTS", $lang);?>
-            </span>
-        </a>
-        <span class='link_separator desktop'></span>
-        <a href='<?=$lserver?>/blog/'>
-            <span class='header_container'>
-                <span class='header_icon_container'><img class='header_icon' alt='<?=text($con, "HEADER_BLOG", $lang);?>' src='<?=$lserver?>/img/icon/blog.gif'/></span>
-                <?=text($con, "HEADER_BLOG", $lang);?>
-            </span>
-        </a>
-    </nav>
-</div>
-<hr id='header_separator'/>

+ 0 - 73
www/help/index.php

@@ -1,73 +0,0 @@
-<?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>
-<?php
-        include $doc_root . "header.php";
-?>
-        <div id='content'>
-
-        </div> <!-- #content -->
-<?php
-        include $doc_root . "footer.php";
-        stats($con, $cur_section, $cur_entry);
-?>
-    </body>
-</html>

BIN
www/img/icon/blog.gif


BIN
www/img/icon/home.gif


BIN
www/img/icon/profile.gif


BIN
www/img/icon/project.gif


BIN
www/img/icon/projects.gif


BIN
www/img/icon/x1/blog.gif


BIN
www/img/icon/x1/home.gif


BIN
www/img/icon/x1/profile.gif


Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor