Compare commits
188 Commits
dffe207d0f
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49e83aef49 | ||
|
|
3996b79cf9 | ||
|
|
587572297d | ||
|
|
5c34318982 | ||
|
|
8c66a92e39 | ||
|
|
20c2c24988 | ||
|
|
991fff087e | ||
|
|
029635e509 | ||
|
|
be0bd0195a | ||
|
|
5c228c9533 | ||
|
|
723b81aebd | ||
|
|
1e5d1a7cc9 | ||
|
|
16ca71e399 | ||
|
|
df2e08f54a | ||
|
|
114c971184 | ||
|
|
d3c2987c9b | ||
|
|
c7aa53b1f0 | ||
|
|
159f21d5b2 | ||
|
|
5080425824 | ||
|
|
e4983112db | ||
|
|
f4325d3a5a | ||
|
|
6bdbcec947 | ||
|
|
79a33031d6 | ||
|
|
6aad02ce2d | ||
|
|
810207ef9b | ||
|
|
363df1ab75 | ||
|
|
b866cc890e | ||
|
|
6b3edaed02 | ||
|
|
a8bc3e7ef7 | ||
|
|
bd8786daed | ||
|
|
f284c1883c | ||
|
|
c4c91315ec | ||
|
|
f845eb3ef4 | ||
|
|
06bf74ea21 | ||
|
|
10a72dcdb9 | ||
|
|
86fad21898 | ||
|
|
83df17669d | ||
|
|
54226e3cbd | ||
|
|
fd76affce9 | ||
|
|
4eb8f685c5 | ||
|
|
2801ddf144 | ||
|
|
d75de36d61 | ||
|
|
208e3132ad | ||
|
|
d744317283 | ||
|
|
e3de743bb8 | ||
|
|
acfb15d5e3 | ||
|
|
4e1f6a9083 | ||
|
|
bb365942ab | ||
|
|
42a3aa08f5 | ||
|
|
d9963bf64b | ||
|
|
6137f6a027 | ||
|
|
f874f6b17e | ||
|
|
f9f6debe65 | ||
|
|
ca25bccbec | ||
|
|
74b3a8721a | ||
|
|
23f8123718 | ||
|
|
98103c096e | ||
|
|
6340175e44 | ||
|
|
92e21aa959 | ||
|
|
c77b9e524d | ||
|
|
f1ae1d174e | ||
|
|
ceda4b4d22 | ||
|
|
d2b556dec7 | ||
|
|
67b1b3c9e5 | ||
|
|
391cfc1273 | ||
|
|
a53ddf22ff | ||
|
|
238eebc00b | ||
|
|
bc44a41106 | ||
|
|
4ab51c9687 | ||
|
|
613776264c | ||
|
|
687de1ed71 | ||
|
|
36be8018b4 | ||
|
|
8490877990 | ||
|
|
662f72a006 | ||
|
|
f60cf54bab | ||
|
|
507bf492a0 | ||
|
|
af4103c31c | ||
|
|
36a42bb4f6 | ||
|
|
7ec61dbc63 | ||
|
|
3a497bbb64 | ||
|
|
fbdc2485aa | ||
|
|
dfa4dccd6c | ||
|
|
da27362fd5 | ||
|
|
f0b82ddb3d | ||
|
|
5c2f9dda2a | ||
|
|
aeebd5999d | ||
|
|
9a6a453351 | ||
|
|
62dd5d4c5e | ||
|
|
896a022fce | ||
|
|
403947a6e4 | ||
|
|
b776e4f41c | ||
|
|
9b9654745f | ||
|
|
4fd3b12f90 | ||
|
|
5b8dbc0797 | ||
|
|
59303dc737 | ||
|
|
072ef1d43e | ||
|
|
0f8259fe43 | ||
|
|
26ddc99766 | ||
|
|
35281f4e30 | ||
|
|
8397c032ef | ||
|
|
5bf22fe9cc | ||
|
|
eef50bc37f | ||
|
|
320d7dfa7e | ||
|
|
1c2e1b6fcb | ||
|
|
4816d14faa | ||
|
|
1c90c9ddab | ||
|
|
428ce900f0 | ||
|
|
82f334143f | ||
|
|
861131b98f | ||
|
|
8a37b9f902 | ||
|
|
b16469cf34 | ||
|
|
a088d1f3ca | ||
|
|
592d7852f8 | ||
|
|
082ae890a0 | ||
|
|
a3a125f18f | ||
|
|
5715280b87 | ||
|
|
08f5410448 | ||
|
|
1589a33aaf | ||
|
|
4679eaa82a | ||
|
|
5034763a18 | ||
|
|
91c9517dac | ||
|
|
ea33a110d7 | ||
|
|
5242999ba0 | ||
|
|
660488e5b6 | ||
|
|
4fe1200ef3 | ||
|
|
6ec5f4996d | ||
|
|
529a261351 | ||
|
|
7beb1f25ad | ||
|
|
9c0c5b5a95 | ||
|
|
37e0162676 | ||
|
|
fb0f9fa664 | ||
|
|
b234704b99 | ||
|
|
4489bdf0c4 | ||
|
|
b5fa4fd21a | ||
|
|
72af644fcb | ||
|
|
934f432c55 | ||
|
|
dd5bcfd8eb | ||
|
|
f73e3b6d28 | ||
|
|
00ce4118eb | ||
|
|
5d3dd7b351 | ||
|
|
b41d768cca | ||
|
|
fa8f50a3d9 | ||
|
|
2e2a79ed76 | ||
|
|
50e8552059 | ||
|
|
55ed7db3c4 | ||
|
|
35275d217b | ||
|
|
c6d69666bb | ||
|
|
2aa41e692d | ||
|
|
f215a6cf08 | ||
|
|
2258aa3fe0 | ||
|
|
f32e528d01 | ||
|
|
6356faa9ca | ||
|
|
41c1ea61b6 | ||
|
|
3ad4a6d08e | ||
|
|
b5115182d5 | ||
|
|
7a29f0825f | ||
|
|
9aa7498db7 | ||
|
|
7d3a00fd68 | ||
|
|
1f7a77e0d6 | ||
|
|
19b5cec9b5 | ||
|
|
a3d964e9c5 | ||
|
|
002c7db88c | ||
|
|
6f509c6edb | ||
|
|
391e84a241 | ||
|
|
324b13175b | ||
|
|
ec4e15f53d | ||
|
|
362affd496 | ||
|
|
735e99ac1c | ||
|
|
b60478b8c0 | ||
|
|
ede83cec73 | ||
|
|
a86fde7af7 | ||
|
|
634e96dda5 | ||
|
|
91fa18f78c | ||
|
|
f5bc8b8f70 | ||
|
|
2ff2d03b9c | ||
|
|
6fa2f5d4c9 | ||
|
|
2733e99c7f | ||
|
|
250aff13e5 | ||
|
|
53aae22a60 | ||
|
|
0f00e4d991 | ||
|
|
b8295bb66f | ||
|
|
604e42d323 | ||
|
|
74eb4c5618 | ||
|
|
7e1a24a2db | ||
|
|
98a4a5ae55 | ||
|
|
054e53d81a | ||
|
|
a35c82d2d9 | ||
|
|
8e64350ed3 |
5
.gitignore
vendored
@@ -1,5 +1,8 @@
|
||||
/includes/config.php
|
||||
/medias/*
|
||||
/_maps
|
||||
_ressources/dump.sql
|
||||
*.sublime-project
|
||||
*.sublime-workspace
|
||||
*.log
|
||||
*.log
|
||||
/tmp/*
|
||||
882
_ressources/db_model.dbm
Executable file
@@ -0,0 +1,882 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
CAUTION: Do not modify this file unless you know what you are doing.
|
||||
Unexpected results may occur if the code is changed deliberately.
|
||||
-->
|
||||
<dbmodel pgmodeler-ver="0.9.2-alpha1" last-position="0,998" last-zoom="0.9" max-obj-count="24"
|
||||
default-owner="postgres">
|
||||
<role name="kabano"
|
||||
inherit="true"
|
||||
login="true"
|
||||
encrypted="true"
|
||||
password="********">
|
||||
</role>
|
||||
|
||||
<database name="kabano" encoding="UTF8" lc-collate="fr_FR.UTF-8" lc-ctype="fr_FR.UTF-8" is-template="false" allow-conns="true">
|
||||
<role name="kabano"/>
|
||||
<tablespace name="pg_default"/>
|
||||
</database>
|
||||
|
||||
<schema name="public" layer="0" rect-visible="true" fill-color="#e1e1e1" sql-disabled="true">
|
||||
</schema>
|
||||
|
||||
<schema name="topology" layer="0" rect-visible="true" fill-color="#c8e6ff">
|
||||
<role name="kabano"/>
|
||||
<comment><![CDATA[PostGIS Topology schema]]></comment>
|
||||
</schema>
|
||||
|
||||
<extension name="postgis" cur-version="2.5.1">
|
||||
<schema name="public"/>
|
||||
<comment><![CDATA[PostGIS geometry, geography, and raster spatial types and functions]]></comment>
|
||||
</extension>
|
||||
|
||||
<extension name="postgis_topology" cur-version="2.5.1">
|
||||
<schema name="topology"/>
|
||||
<comment><![CDATA[PostGIS topology spatial types and functions]]></comment>
|
||||
</extension>
|
||||
|
||||
<usertype name="content_type_enum" configuration="enumeration">
|
||||
<schema name="public"/>
|
||||
<role name="kabano"/>
|
||||
<enumeration values="wiki,blog,forum"/>
|
||||
</usertype>
|
||||
|
||||
<usertype name="poi_type_enum" configuration="enumeration">
|
||||
<schema name="public"/>
|
||||
<role name="kabano"/>
|
||||
<enumeration values="basic_hut,wilderness_hut,alpine_hut,halt,bivouac,campsite"/>
|
||||
</usertype>
|
||||
|
||||
<usertype name="user_rank_enum" configuration="enumeration">
|
||||
<schema name="public"/>
|
||||
<role name="kabano"/>
|
||||
<enumeration values="blocked,registered,premium,moderator,administrator,visitor"/>
|
||||
</usertype>
|
||||
|
||||
<sequence name="content_comments_sequence" cycle="false" start="1" increment="1" min-value="1" max-value="9223372036854775807" cache="1">
|
||||
<schema name="public"/>
|
||||
<role name="kabano"/>
|
||||
</sequence>
|
||||
|
||||
<table name="content_comments" layer="0" collapse-mode="2" max-obj-count="12">
|
||||
<schema name="public"/>
|
||||
<role name="kabano"/>
|
||||
<position x="540" y="340"/>
|
||||
<column name="id" not-null="true" sequence="public.content_comments_sequence">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<column name="version">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<column name="creation_date">
|
||||
<type name="timestamp" length="0"/>
|
||||
</column>
|
||||
<column name="update_date">
|
||||
<type name="timestamp" length="0"/>
|
||||
</column>
|
||||
<column name="author">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<column name="is_public">
|
||||
<type name="boolean" length="0"/>
|
||||
</column>
|
||||
<column name="is_archive">
|
||||
<type name="boolean" length="0"/>
|
||||
</column>
|
||||
<column name="content">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<column name="comment">
|
||||
<type name="text" length="0"/>
|
||||
</column>
|
||||
<column name="locale">
|
||||
<type name="character varying" length="32"/>
|
||||
</column>
|
||||
<constraint name="content_comments_pkey" type="pk-constr" table="public.content_comments">
|
||||
<columns names="id" ref-type="src-columns"/>
|
||||
</constraint>
|
||||
</table>
|
||||
|
||||
<sequence name="content_contributors_sequence" cycle="false" start="1" increment="1" min-value="1" max-value="9223372036854775807" cache="1">
|
||||
<schema name="public"/>
|
||||
<role name="kabano"/>
|
||||
</sequence>
|
||||
|
||||
<table name="content_contributors" layer="0" collapse-mode="2" max-obj-count="4">
|
||||
<schema name="public"/>
|
||||
<role name="kabano"/>
|
||||
<position x="1460" y="300"/>
|
||||
<column name="id" not-null="true" sequence="public.content_contributors_sequence">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<column name="content">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<column name="contributor">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<constraint name="content_contributors_pkey" type="pk-constr" table="public.content_contributors">
|
||||
<columns names="id" ref-type="src-columns"/>
|
||||
</constraint>
|
||||
<constraint name="content_contributors_unique" type="uq-constr" table="public.content_contributors">
|
||||
<columns names="content,contributor" ref-type="src-columns"/>
|
||||
</constraint>
|
||||
</table>
|
||||
|
||||
<sequence name="contents_sequence" cycle="false" start="1" increment="1" min-value="1" max-value="9223372036854775807" cache="1">
|
||||
<schema name="public"/>
|
||||
<role name="kabano"/>
|
||||
</sequence>
|
||||
|
||||
<table name="contents" layer="0" collapse-mode="2" max-obj-count="7">
|
||||
<schema name="public"/>
|
||||
<role name="kabano"/>
|
||||
<position x="540" y="60"/>
|
||||
<column name="id" not-null="true" sequence="public.contents_sequence">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<column name="permalink" not-null="true">
|
||||
<type name="character varying" length="255"/>
|
||||
</column>
|
||||
<column name="creation_date" not-null="true">
|
||||
<type name="timestamp" length="0"/>
|
||||
</column>
|
||||
<column name="is_public" not-null="true" default-value="true">
|
||||
<type name="boolean" length="0"/>
|
||||
</column>
|
||||
<column name="is_commentable" not-null="true" default-value="true">
|
||||
<type name="boolean" length="0"/>
|
||||
</column>
|
||||
<column name="type" not-null="true">
|
||||
<type name="public.content_type_enum" length="0"/>
|
||||
</column>
|
||||
<constraint name="contents_pkey" type="pk-constr" table="public.contents">
|
||||
<columns names="id" ref-type="src-columns"/>
|
||||
</constraint>
|
||||
<constraint name="contents_permalink_type_key" type="uq-constr" table="public.contents">
|
||||
<columns names="permalink,type" ref-type="src-columns"/>
|
||||
</constraint>
|
||||
</table>
|
||||
|
||||
<table name="locales" layer="0" collapse-mode="2" max-obj-count="3">
|
||||
<schema name="public"/>
|
||||
<role name="kabano"/>
|
||||
<position x="700" y="800"/>
|
||||
<column name="name" not-null="true">
|
||||
<type name="character varying" length="32"/>
|
||||
</column>
|
||||
<column name="display_name" not-null="true">
|
||||
<type name="character varying" length="255"/>
|
||||
</column>
|
||||
<column name="flag_name">
|
||||
<type name="character varying" length="32"/>
|
||||
</column>
|
||||
<constraint name="locales_display_name_unique" type="uq-constr" table="public.locales">
|
||||
<columns names="display_name" ref-type="src-columns"/>
|
||||
</constraint>
|
||||
<constraint name="locales_flag_name_unique" type="uq-constr" table="public.locales">
|
||||
<columns names="flag_name" ref-type="src-columns"/>
|
||||
</constraint>
|
||||
<constraint name="locales_pkey" type="pk-constr" table="public.locales">
|
||||
<columns names="name" ref-type="src-columns"/>
|
||||
</constraint>
|
||||
</table>
|
||||
|
||||
<sequence name="poi_comments_sequence" cycle="false" start="1" increment="1" min-value="1" max-value="9223372036854775807" cache="1">
|
||||
<schema name="public"/>
|
||||
<role name="kabano"/>
|
||||
</sequence>
|
||||
|
||||
<table name="poi_comments" layer="0" collapse-mode="2" max-obj-count="13">
|
||||
<schema name="public"/>
|
||||
<role name="kabano"/>
|
||||
<position x="1100" y="980"/>
|
||||
<column name="id" not-null="true" sequence="public.poi_comments_sequence">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<column name="permalink">
|
||||
<type name="character varying" length="255"/>
|
||||
</column>
|
||||
<column name="version">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<column name="creation_date">
|
||||
<type name="timestamp" length="0"/>
|
||||
</column>
|
||||
<column name="update_date">
|
||||
<type name="timestamp" length="0"/>
|
||||
</column>
|
||||
<column name="author">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<column name="is_public">
|
||||
<type name="boolean" length="0"/>
|
||||
</column>
|
||||
<column name="is_archive">
|
||||
<type name="boolean" length="0"/>
|
||||
</column>
|
||||
<column name="poi">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<column name="comment">
|
||||
<type name="text" length="0"/>
|
||||
</column>
|
||||
<column name="locale">
|
||||
<type name="character varying" length="32"/>
|
||||
</column>
|
||||
<constraint name="poi_comments_permalink_version_key" type="uq-constr" table="public.poi_comments">
|
||||
<columns names="permalink,version" ref-type="src-columns"/>
|
||||
</constraint>
|
||||
<constraint name="poi_comments_pkey" type="pk-constr" table="public.poi_comments">
|
||||
<columns names="id" ref-type="src-columns"/>
|
||||
</constraint>
|
||||
</table>
|
||||
|
||||
<sequence name="poi_contributors_sequence" cycle="false" start="1" increment="1" min-value="1" max-value="9223372036854775807" cache="1">
|
||||
<schema name="public"/>
|
||||
<role name="kabano"/>
|
||||
</sequence>
|
||||
|
||||
<table name="poi_contributors" layer="0" collapse-mode="2" max-obj-count="4">
|
||||
<schema name="public"/>
|
||||
<role name="kabano"/>
|
||||
<position x="1560" y="820"/>
|
||||
<column name="id" not-null="true" sequence="public.poi_contributors_sequence">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<column name="poi">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<column name="contributor">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<constraint name="poi_contributors_pkey" type="pk-constr" table="public.poi_contributors">
|
||||
<columns names="id" ref-type="src-columns"/>
|
||||
</constraint>
|
||||
<constraint name="poi_contributors_unique" type="uq-constr" table="public.poi_contributors">
|
||||
<columns names="poi,contributor" ref-type="src-columns"/>
|
||||
</constraint>
|
||||
</table>
|
||||
|
||||
<sequence name="poi_locales_sequence" cycle="false" start="1" increment="1" min-value="1" max-value="9223372036854775807" cache="1">
|
||||
<schema name="public"/>
|
||||
<role name="kabano"/>
|
||||
</sequence>
|
||||
|
||||
<table name="poi_locales" layer="0" collapse-mode="2" max-obj-count="4">
|
||||
<schema name="public"/>
|
||||
<role name="kabano"/>
|
||||
<position x="720" y="1340"/>
|
||||
<column name="id" not-null="true" default-value="nextval('poi_locales_sequence'::regclass)">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<column name="locale" not-null="true">
|
||||
<type name="character varying" length="32"/>
|
||||
</column>
|
||||
<column name="poi_id" not-null="true">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<constraint name="poi_localised_pkey" type="pk-constr" table="public.poi_locales">
|
||||
<columns names="id" ref-type="src-columns"/>
|
||||
</constraint>
|
||||
<constraint name="poi_localised_unique" type="uq-constr" table="public.poi_locales">
|
||||
<columns names="locale,poi_id" ref-type="src-columns"/>
|
||||
</constraint>
|
||||
</table>
|
||||
|
||||
<table name="sources" layer="0" collapse-mode="2" max-obj-count="7">
|
||||
<schema name="public"/>
|
||||
<role name="kabano"/>
|
||||
<position x="1160" y="1660"/>
|
||||
<column name="id" not-null="true">
|
||||
<type name="character varying" length="3"/>
|
||||
</column>
|
||||
<column name="display_name" not-null="true">
|
||||
<type name="character varying" length="255"/>
|
||||
</column>
|
||||
<column name="icon_name">
|
||||
<type name="character varying" length="255"/>
|
||||
</column>
|
||||
<column name="website">
|
||||
<type name="character varying" length="255"/>
|
||||
</column>
|
||||
<column name="license_name">
|
||||
<type name="character varying" length="255"/>
|
||||
</column>
|
||||
<column name="license_url">
|
||||
<type name="character varying" length="255"/>
|
||||
</column>
|
||||
<constraint name="sources_display_name_unique" type="uq-constr" table="public.sources">
|
||||
<columns names="display_name" ref-type="src-columns"/>
|
||||
</constraint>
|
||||
<constraint name="sources_pkey" type="pk-constr" table="public.sources">
|
||||
<columns names="id" ref-type="src-columns"/>
|
||||
</constraint>
|
||||
</table>
|
||||
|
||||
<sequence name="poi_versions_sequence" cycle="false" start="1" increment="1" min-value="1" max-value="9223372036854775807" cache="1">
|
||||
<schema name="public"/>
|
||||
<role name="kabano"/>
|
||||
</sequence>
|
||||
|
||||
<sequence name="pois_sequence" cycle="false" start="1" increment="1" min-value="1" max-value="9223372036854775807" cache="1">
|
||||
<schema name="public"/>
|
||||
<role name="kabano"/>
|
||||
</sequence>
|
||||
|
||||
<sequence name="users_id_sequence" cycle="false" start="1" increment="1" min-value="1" max-value="9223372036854775807" cache="1">
|
||||
<schema name="public"/>
|
||||
<role name="kabano"/>
|
||||
</sequence>
|
||||
|
||||
<table name="users" layer="0" collapse-mode="2" max-obj-count="15">
|
||||
<schema name="public"/>
|
||||
<role name="kabano"/>
|
||||
<position x="1140" y="540"/>
|
||||
<column name="id" not-null="true" sequence="public.users_id_sequence">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<column name="name" not-null="true">
|
||||
<type name="character varying" length="255"/>
|
||||
</column>
|
||||
<column name="version" not-null="true" default-value="0">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<column name="email" not-null="true">
|
||||
<type name="character varying" length="255"/>
|
||||
</column>
|
||||
<column name="password" not-null="true">
|
||||
<type name="character varying" length="255"/>
|
||||
</column>
|
||||
<column name="website">
|
||||
<type name="character varying" length="255"/>
|
||||
</column>
|
||||
<column name="is_avatar_present" not-null="true">
|
||||
<type name="boolean" length="0"/>
|
||||
</column>
|
||||
<column name="is_archive" not-null="true">
|
||||
<type name="boolean" length="0"/>
|
||||
</column>
|
||||
<column name="rank" not-null="true">
|
||||
<type name="public.user_rank_enum" length="0"/>
|
||||
</column>
|
||||
<column name="locale" not-null="true">
|
||||
<type name="character varying" length="32"/>
|
||||
</column>
|
||||
<column name="timezone" not-null="true">
|
||||
<type name="character varying" length="8"/>
|
||||
</column>
|
||||
<column name="visit_date" not-null="true">
|
||||
<type name="timestamp" length="0"/>
|
||||
</column>
|
||||
<column name="register_date" not-null="true">
|
||||
<type name="timestamp" length="0"/>
|
||||
</column>
|
||||
<constraint name="users_email_unique" type="uq-constr" table="public.users">
|
||||
<columns names="email" ref-type="src-columns"/>
|
||||
</constraint>
|
||||
<constraint name="users_name_unique" type="uq-constr" table="public.users">
|
||||
<columns names="name,version" ref-type="src-columns"/>
|
||||
</constraint>
|
||||
<constraint name="users_pkey" type="pk-constr" table="public.users">
|
||||
<columns names="id" ref-type="src-columns"/>
|
||||
</constraint>
|
||||
</table>
|
||||
|
||||
<index name="content_comments_is_archive_index" table="public.content_comments"
|
||||
concurrent="false" unique="false" fast-update="false" buffering="false"
|
||||
index-type="btree" factor="90">
|
||||
<idxelement use-sorting="false">
|
||||
<column name="is_archive"/>
|
||||
</idxelement>
|
||||
</index>
|
||||
|
||||
<index name="content_comments_is_public_index" table="public.content_comments"
|
||||
concurrent="false" unique="false" fast-update="false" buffering="false"
|
||||
index-type="btree" factor="90">
|
||||
<idxelement use-sorting="false">
|
||||
<column name="is_public"/>
|
||||
</idxelement>
|
||||
</index>
|
||||
|
||||
<index name="contents_is_public_index" table="public.contents"
|
||||
concurrent="false" unique="false" fast-update="false" buffering="false"
|
||||
index-type="btree" factor="90">
|
||||
<idxelement use-sorting="false">
|
||||
<column name="is_public"/>
|
||||
</idxelement>
|
||||
</index>
|
||||
|
||||
<index name="poi_comments_is_archive_index" table="public.poi_comments"
|
||||
concurrent="false" unique="false" fast-update="false" buffering="false"
|
||||
index-type="btree" factor="90">
|
||||
<idxelement use-sorting="false">
|
||||
<column name="is_archive"/>
|
||||
</idxelement>
|
||||
</index>
|
||||
|
||||
<index name="poi_comments_is_public_index" table="public.poi_comments"
|
||||
concurrent="false" unique="false" fast-update="false" buffering="false"
|
||||
index-type="btree" factor="90">
|
||||
<idxelement use-sorting="false">
|
||||
<column name="is_public"/>
|
||||
</idxelement>
|
||||
</index>
|
||||
|
||||
<index name="users_is_archive_index" table="public.users"
|
||||
concurrent="false" unique="false" fast-update="false" buffering="false"
|
||||
index-type="btree" factor="90">
|
||||
<idxelement use-sorting="false">
|
||||
<column name="is_archive"/>
|
||||
</idxelement>
|
||||
</index>
|
||||
|
||||
<index name="users_register_date_index" table="public.users"
|
||||
concurrent="false" unique="false" fast-update="false" buffering="false"
|
||||
index-type="btree" factor="90">
|
||||
<idxelement use-sorting="false">
|
||||
<column name="register_date"/>
|
||||
</idxelement>
|
||||
</index>
|
||||
|
||||
<sequence name="content_locales_sequence" cycle="false" start="1" increment="1" min-value="1" max-value="9223372036854775807" cache="1">
|
||||
<schema name="public"/>
|
||||
<role name="kabano"/>
|
||||
</sequence>
|
||||
|
||||
<sequence name="content_versions_sequence" cycle="false" start="1" increment="1" min-value="1" max-value="9223372036854775807" cache="1">
|
||||
<schema name="public"/>
|
||||
<role name="kabano"/>
|
||||
</sequence>
|
||||
|
||||
<index name="fki_content_contributors_contributor_fkey" table="public.content_contributors"
|
||||
concurrent="false" unique="false" fast-update="false" buffering="false"
|
||||
index-type="btree" factor="90">
|
||||
<idxelement use-sorting="false">
|
||||
<column name="contributor"/>
|
||||
</idxelement>
|
||||
</index>
|
||||
|
||||
<index name="fki_content_contributors_content_fkey" table="public.content_contributors"
|
||||
concurrent="false" unique="false" fast-update="false" buffering="false"
|
||||
index-type="btree" factor="90">
|
||||
<idxelement use-sorting="false">
|
||||
<column name="content"/>
|
||||
</idxelement>
|
||||
</index>
|
||||
|
||||
<table name="content_locales" layer="0" collapse-mode="2" max-obj-count="6">
|
||||
<schema name="public"/>
|
||||
<role name="kabano"/>
|
||||
<position x="1020" y="60"/>
|
||||
<column name="id" not-null="true" sequence="public.content_locales_sequence">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<column name="content_id" not-null="true">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<column name="locale" not-null="true">
|
||||
<type name="character varying" length="32"/>
|
||||
</column>
|
||||
<column name="author" not-null="true">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<constraint name="content_locales_pkey" type="pk-constr" table="public.content_locales">
|
||||
<columns names="id" ref-type="src-columns"/>
|
||||
</constraint>
|
||||
<constraint name="content_locales_unique" type="uq-constr" table="public.content_locales">
|
||||
<columns names="content_id,locale" ref-type="src-columns"/>
|
||||
</constraint>
|
||||
</table>
|
||||
|
||||
<table name="content_versions" layer="0" collapse-mode="2" max-obj-count="8">
|
||||
<schema name="public"/>
|
||||
<role name="kabano"/>
|
||||
<position x="1500" y="40"/>
|
||||
<column name="id" not-null="true" sequence="public.content_versions_sequence">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<column name="version" not-null="true" default-value="0">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<column name="update_date" not-null="true">
|
||||
<type name="timestamp" length="0"/>
|
||||
</column>
|
||||
<column name="is_archive" not-null="true" default-value="false">
|
||||
<type name="boolean" length="0"/>
|
||||
</column>
|
||||
<column name="name">
|
||||
<type name="character varying" length="255"/>
|
||||
</column>
|
||||
<column name="content">
|
||||
<type name="text" length="0"/>
|
||||
</column>
|
||||
<column name="locale_id" not-null="true">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<constraint name="content_versions_pkey" type="pk-constr" table="public.content_versions">
|
||||
<columns names="id" ref-type="src-columns"/>
|
||||
</constraint>
|
||||
<constraint name="content_versions_version_locale_key" type="uq-constr" table="public.content_versions">
|
||||
<columns names="version,locale_id" ref-type="src-columns"/>
|
||||
</constraint>
|
||||
</table>
|
||||
|
||||
<table name="pois" layer="0" collapse-mode="2" max-obj-count="8">
|
||||
<schema name="public"/>
|
||||
<role name="kabano"/>
|
||||
<position x="300" y="1340"/>
|
||||
<column name="id" not-null="true" sequence="public.poi_versions_sequence">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<column name="is_public" not-null="true" default-value="true">
|
||||
<type name="boolean" length="0"/>
|
||||
</column>
|
||||
<column name="permalink" not-null="true">
|
||||
<type name="character varying" length="255"/>
|
||||
</column>
|
||||
<column name="creation_date" not-null="true">
|
||||
<type name="timestamp" length="0"/>
|
||||
</column>
|
||||
<column name="name" not-null="true">
|
||||
<type name="character varying" length="255"/>
|
||||
</column>
|
||||
<column name="position" not-null="true">
|
||||
<type name="geometry" length="0"/>
|
||||
</column>
|
||||
<column name="type" not-null="true">
|
||||
<type name="public.poi_type_enum" length="0"/>
|
||||
</column>
|
||||
<constraint name="pois_pkey" type="pk-constr" table="public.pois">
|
||||
<columns names="id" ref-type="src-columns"/>
|
||||
</constraint>
|
||||
<constraint name="pois_permalink_key" type="uq-constr" table="public.pois">
|
||||
<columns names="permalink" ref-type="src-columns"/>
|
||||
</constraint>
|
||||
<constraint name="pois_position_type_key" type="uq-constr" table="public.pois">
|
||||
<columns names="position,type" ref-type="src-columns"/>
|
||||
</constraint>
|
||||
</table>
|
||||
|
||||
<table name="poi_versions" layer="0" collapse-mode="2" max-obj-count="12">
|
||||
<schema name="public"/>
|
||||
<role name="kabano"/>
|
||||
<position x="1620" y="1260"/>
|
||||
<column name="id" not-null="true" sequence="public.pois_sequence">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<column name="version" not-null="true" default-value="0">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<column name="update_date" not-null="true">
|
||||
<type name="timestamp" length="0"/>
|
||||
</column>
|
||||
<column name="is_archive" not-null="true" default-value="false">
|
||||
<type name="boolean" length="0"/>
|
||||
</column>
|
||||
<column name="alt_type" not-null="true">
|
||||
<type name="public.poi_type_enum" length="0"/>
|
||||
</column>
|
||||
<column name="is_destroyed" not-null="true" default-value="false">
|
||||
<type name="boolean" length="0"/>
|
||||
</column>
|
||||
<column name="alt_name">
|
||||
<type name="character varying" length="255"/>
|
||||
</column>
|
||||
<column name="alt_position" not-null="true">
|
||||
<type name="geometry" length="0"/>
|
||||
</column>
|
||||
<column name="parameters">
|
||||
<type name="jsonb" length="0"/>
|
||||
</column>
|
||||
<column name="source_id" not-null="true">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<constraint name="poi_versions_pkey" type="pk-constr" table="public.poi_versions">
|
||||
<columns names="id" ref-type="src-columns"/>
|
||||
</constraint>
|
||||
<constraint name="poi_versions_version_source_key" type="uq-constr" table="public.poi_versions">
|
||||
<columns names="version,source_id" ref-type="src-columns"/>
|
||||
</constraint>
|
||||
</table>
|
||||
|
||||
<index name="poi_versions_is_archive_index" table="public.poi_versions"
|
||||
concurrent="false" unique="false" fast-update="false" buffering="false"
|
||||
index-type="btree" factor="90">
|
||||
<idxelement use-sorting="false">
|
||||
<column name="is_archive"/>
|
||||
</idxelement>
|
||||
</index>
|
||||
|
||||
<index name="poi_versions_is_destroyed_index" table="public.poi_versions"
|
||||
concurrent="false" unique="false" fast-update="false" buffering="false"
|
||||
index-type="btree" factor="90">
|
||||
<idxelement use-sorting="false">
|
||||
<column name="is_destroyed"/>
|
||||
</idxelement>
|
||||
</index>
|
||||
|
||||
<index name="poi_versions_type_index" table="public.poi_versions"
|
||||
concurrent="false" unique="false" fast-update="false" buffering="false"
|
||||
index-type="btree" factor="90">
|
||||
<idxelement use-sorting="false">
|
||||
<column name="alt_type"/>
|
||||
</idxelement>
|
||||
</index>
|
||||
|
||||
<sequence name="poi_sources_sequence" cycle="false" start="1" increment="1" min-value="1" max-value="9223372036854775807" cache="1">
|
||||
<schema name="public"/>
|
||||
<role name="kabano"/>
|
||||
</sequence>
|
||||
|
||||
<table name="poi_sources" layer="0" collapse-mode="2" max-obj-count="6">
|
||||
<schema name="public"/>
|
||||
<role name="kabano"/>
|
||||
<position x="1160" y="1400"/>
|
||||
<column name="id" not-null="true" sequence="public.poi_sources_sequence">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<column name="source">
|
||||
<type name="character varying" length="3"/>
|
||||
</column>
|
||||
<column name="remote_source_id">
|
||||
<type name="character varying" length="255"/>
|
||||
</column>
|
||||
<column name="author" not-null="true">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<column name="locale_id" not-null="true">
|
||||
<type name="integer" length="0"/>
|
||||
</column>
|
||||
<constraint name="poi_sources_pkey" type="pk-constr" table="public.poi_sources">
|
||||
<columns names="id" ref-type="src-columns"/>
|
||||
</constraint>
|
||||
<constraint name="poi_sources_source_key" type="uq-constr" table="public.poi_sources">
|
||||
<columns names="source,remote_source_id" ref-type="src-columns"/>
|
||||
</constraint>
|
||||
<constraint name="poi_sources_locale_key" type="uq-constr" table="public.poi_sources">
|
||||
<columns names="locale_id,source" ref-type="src-columns"/>
|
||||
</constraint>
|
||||
</table>
|
||||
|
||||
<constraint name="content_comments_author_fkey" type="fk-constr" comparison-type="MATCH SIMPLE"
|
||||
upd-action="NO ACTION" del-action="NO ACTION" ref-table="public.users" table="public.content_comments">
|
||||
<columns names="author" ref-type="src-columns"/>
|
||||
<columns names="id" ref-type="dst-columns"/>
|
||||
</constraint>
|
||||
|
||||
<constraint name="content_comments_content_fkey" type="fk-constr" comparison-type="MATCH SIMPLE"
|
||||
upd-action="NO ACTION" del-action="NO ACTION" ref-table="public.contents" table="public.content_comments">
|
||||
<columns names="content" ref-type="src-columns"/>
|
||||
<columns names="id" ref-type="dst-columns"/>
|
||||
</constraint>
|
||||
|
||||
<constraint name="content_comments_locale_fkey" type="fk-constr" comparison-type="MATCH SIMPLE"
|
||||
upd-action="NO ACTION" del-action="NO ACTION" ref-table="public.locales" table="public.content_comments">
|
||||
<columns names="locale" ref-type="src-columns"/>
|
||||
<columns names="name" ref-type="dst-columns"/>
|
||||
</constraint>
|
||||
|
||||
<constraint name="content_contributors_contributor_fkey" type="fk-constr" comparison-type="MATCH SIMPLE"
|
||||
upd-action="NO ACTION" del-action="NO ACTION" ref-table="public.users" table="public.content_contributors">
|
||||
<columns names="contributor" ref-type="src-columns"/>
|
||||
<columns names="id" ref-type="dst-columns"/>
|
||||
</constraint>
|
||||
|
||||
<constraint name="content_contributors_content_fkey" type="fk-constr" comparison-type="MATCH SIMPLE"
|
||||
upd-action="NO ACTION" del-action="NO ACTION" ref-table="public.content_locales" table="public.content_contributors">
|
||||
<columns names="content" ref-type="src-columns"/>
|
||||
<columns names="id" ref-type="dst-columns"/>
|
||||
</constraint>
|
||||
|
||||
<constraint name="poi_comments_author_fkey" type="fk-constr" comparison-type="MATCH SIMPLE"
|
||||
upd-action="NO ACTION" del-action="NO ACTION" ref-table="public.users" table="public.poi_comments">
|
||||
<columns names="author" ref-type="src-columns"/>
|
||||
<columns names="id" ref-type="dst-columns"/>
|
||||
</constraint>
|
||||
|
||||
<constraint name="poi_comments_locale_fkey" type="fk-constr" comparison-type="MATCH SIMPLE"
|
||||
upd-action="NO ACTION" del-action="NO ACTION" ref-table="public.locales" table="public.poi_comments">
|
||||
<columns names="locale" ref-type="src-columns"/>
|
||||
<columns names="name" ref-type="dst-columns"/>
|
||||
</constraint>
|
||||
|
||||
<constraint name="poi_comments_poi_fkey" type="fk-constr" comparison-type="MATCH SIMPLE"
|
||||
upd-action="NO ACTION" del-action="NO ACTION" ref-table="public.poi_sources" table="public.poi_comments">
|
||||
<columns names="poi" ref-type="src-columns"/>
|
||||
<columns names="id" ref-type="dst-columns"/>
|
||||
</constraint>
|
||||
|
||||
<constraint name="poi_contributors_contributor_fkey" type="fk-constr" comparison-type="MATCH SIMPLE"
|
||||
upd-action="NO ACTION" del-action="NO ACTION" ref-table="public.users" table="public.poi_contributors">
|
||||
<columns names="contributor" ref-type="src-columns"/>
|
||||
<columns names="id" ref-type="dst-columns"/>
|
||||
</constraint>
|
||||
|
||||
<constraint name="poi_contributors_poi_fkey" type="fk-constr" comparison-type="MATCH SIMPLE"
|
||||
upd-action="NO ACTION" del-action="NO ACTION" ref-table="public.poi_sources" table="public.poi_contributors">
|
||||
<columns names="poi" ref-type="src-columns"/>
|
||||
<columns names="id" ref-type="dst-columns"/>
|
||||
</constraint>
|
||||
|
||||
<constraint name="poi_localised_locale_fkey" type="fk-constr" comparison-type="MATCH SIMPLE"
|
||||
upd-action="NO ACTION" del-action="NO ACTION" ref-table="public.locales" table="public.poi_locales">
|
||||
<columns names="locale" ref-type="src-columns"/>
|
||||
<columns names="name" ref-type="dst-columns"/>
|
||||
</constraint>
|
||||
|
||||
<constraint name="poi_locales_poi_fkey" type="fk-constr" comparison-type="MATCH FULL"
|
||||
upd-action="NO ACTION" del-action="NO ACTION" ref-table="public.pois" table="public.poi_locales">
|
||||
<columns names="poi_id" ref-type="src-columns"/>
|
||||
<columns names="id" ref-type="dst-columns"/>
|
||||
</constraint>
|
||||
|
||||
<constraint name="users_locale_fkey" type="fk-constr" comparison-type="MATCH SIMPLE"
|
||||
upd-action="NO ACTION" del-action="NO ACTION" ref-table="public.locales" table="public.users">
|
||||
<columns names="locale" ref-type="src-columns"/>
|
||||
<columns names="name" ref-type="dst-columns"/>
|
||||
</constraint>
|
||||
|
||||
<constraint name="content_locales_locale" type="fk-constr" comparison-type="MATCH SIMPLE"
|
||||
upd-action="NO ACTION" del-action="NO ACTION" ref-table="public.locales" table="public.content_locales">
|
||||
<columns names="locale" ref-type="src-columns"/>
|
||||
<columns names="name" ref-type="dst-columns"/>
|
||||
</constraint>
|
||||
|
||||
<constraint name="content_locales_content" type="fk-constr" comparison-type="MATCH SIMPLE"
|
||||
upd-action="NO ACTION" del-action="NO ACTION" ref-table="public.contents" table="public.content_locales">
|
||||
<columns names="content_id" ref-type="src-columns"/>
|
||||
<columns names="id" ref-type="dst-columns"/>
|
||||
</constraint>
|
||||
|
||||
<constraint name="content_locales_author" type="fk-constr" comparison-type="MATCH SIMPLE"
|
||||
upd-action="NO ACTION" del-action="NO ACTION" ref-table="public.users" table="public.content_locales">
|
||||
<columns names="author" ref-type="src-columns"/>
|
||||
<columns names="id" ref-type="dst-columns"/>
|
||||
</constraint>
|
||||
|
||||
<constraint name="content_versions_locale" type="fk-constr" comparison-type="MATCH SIMPLE"
|
||||
upd-action="NO ACTION" del-action="NO ACTION" ref-table="public.content_locales" table="public.content_versions">
|
||||
<columns names="locale_id" ref-type="src-columns"/>
|
||||
<columns names="id" ref-type="dst-columns"/>
|
||||
</constraint>
|
||||
|
||||
<constraint name="poi_versions_source_fkey" type="fk-constr" comparison-type="MATCH SIMPLE"
|
||||
upd-action="NO ACTION" del-action="NO ACTION" ref-table="public.poi_sources" table="public.poi_versions">
|
||||
<columns names="source_id" ref-type="src-columns"/>
|
||||
<columns names="id" ref-type="dst-columns"/>
|
||||
</constraint>
|
||||
|
||||
<constraint name="poi_sources_locale_fkey" type="fk-constr" comparison-type="MATCH FULL"
|
||||
upd-action="NO ACTION" del-action="NO ACTION" ref-table="public.sources" table="public.poi_sources">
|
||||
<columns names="source" ref-type="src-columns"/>
|
||||
<columns names="id" ref-type="dst-columns"/>
|
||||
</constraint>
|
||||
|
||||
<constraint name="poi_sources_poi_locale_fkey" type="fk-constr" comparison-type="MATCH FULL"
|
||||
upd-action="NO ACTION" del-action="NO ACTION" ref-table="public.poi_locales" table="public.poi_sources">
|
||||
<columns names="locale_id" ref-type="src-columns"/>
|
||||
<columns names="id" ref-type="dst-columns"/>
|
||||
</constraint>
|
||||
|
||||
<relationship name="rel_content_comments_users" type="relfk" layer="0"
|
||||
src-table="public.content_comments"
|
||||
dst-table="public.users" reference-fk="content_comments_author_fkey"
|
||||
src-required="false" dst-required="false"/>
|
||||
|
||||
<relationship name="rel_content_comments_contents" type="relfk" layer="0"
|
||||
src-table="public.content_comments"
|
||||
dst-table="public.contents" reference-fk="content_comments_content_fkey"
|
||||
src-required="false" dst-required="false"/>
|
||||
|
||||
<relationship name="rel_content_comments_locales" type="relfk" layer="0"
|
||||
src-table="public.content_comments"
|
||||
dst-table="public.locales" reference-fk="content_comments_locale_fkey"
|
||||
src-required="false" dst-required="false"/>
|
||||
|
||||
<relationship name="rel_content_contributors_users" type="relfk" layer="0"
|
||||
src-table="public.content_contributors"
|
||||
dst-table="public.users" reference-fk="content_contributors_contributor_fkey"
|
||||
src-required="false" dst-required="false"/>
|
||||
|
||||
<relationship name="rel_content_contributors_content_locales" type="relfk" layer="0"
|
||||
src-table="public.content_contributors"
|
||||
dst-table="public.content_locales" reference-fk="content_contributors_content_fkey"
|
||||
src-required="false" dst-required="false"/>
|
||||
|
||||
<relationship name="rel_poi_comments_users" type="relfk" layer="0"
|
||||
src-table="public.poi_comments"
|
||||
dst-table="public.users" reference-fk="poi_comments_author_fkey"
|
||||
src-required="false" dst-required="false"/>
|
||||
|
||||
<relationship name="rel_poi_comments_locales" type="relfk" layer="0"
|
||||
src-table="public.poi_comments"
|
||||
dst-table="public.locales" reference-fk="poi_comments_locale_fkey"
|
||||
src-required="false" dst-required="false"/>
|
||||
|
||||
<relationship name="rel_poi_comments_poi_sources" type="relfk" layer="0"
|
||||
src-table="public.poi_comments"
|
||||
dst-table="public.poi_sources" reference-fk="poi_comments_poi_fkey"
|
||||
src-required="false" dst-required="false"/>
|
||||
|
||||
<relationship name="rel_poi_contributors_users" type="relfk" layer="0"
|
||||
src-table="public.poi_contributors"
|
||||
dst-table="public.users" reference-fk="poi_contributors_contributor_fkey"
|
||||
src-required="false" dst-required="false"/>
|
||||
|
||||
<relationship name="rel_poi_contributors_poi_sources" type="relfk" layer="0"
|
||||
src-table="public.poi_contributors"
|
||||
dst-table="public.poi_sources" reference-fk="poi_contributors_poi_fkey"
|
||||
src-required="false" dst-required="false"/>
|
||||
|
||||
<relationship name="rel_poi_locales_locales" type="relfk" layer="0"
|
||||
src-table="public.poi_locales"
|
||||
dst-table="public.locales" reference-fk="poi_localised_locale_fkey"
|
||||
src-required="false" dst-required="false"/>
|
||||
|
||||
<relationship name="rel_users_locales" type="relfk" layer="0"
|
||||
src-table="public.users"
|
||||
dst-table="public.locales" reference-fk="users_locale_fkey"
|
||||
src-required="false" dst-required="false"/>
|
||||
|
||||
<relationship name="rel_content_locales_locales" type="relfk" layer="0"
|
||||
src-table="public.content_locales"
|
||||
dst-table="public.locales" reference-fk="content_locales_locale"
|
||||
src-required="false" dst-required="false"/>
|
||||
|
||||
<relationship name="rel_content_locales_contents" type="relfk" layer="0"
|
||||
src-table="public.content_locales"
|
||||
dst-table="public.contents" reference-fk="content_locales_content"
|
||||
src-required="false" dst-required="false"/>
|
||||
|
||||
<relationship name="rel_content_locales_users" type="relfk" layer="0"
|
||||
src-table="public.content_locales"
|
||||
dst-table="public.users" reference-fk="content_locales_author"
|
||||
src-required="false" dst-required="false"/>
|
||||
|
||||
<relationship name="rel_content_versions_content_locales" type="relfk" layer="0"
|
||||
src-table="public.content_versions"
|
||||
dst-table="public.content_locales" reference-fk="content_versions_locale"
|
||||
src-required="false" dst-required="false"/>
|
||||
|
||||
<relationship name="rel_poi_versions_poi_sources" type="relfk" layer="0"
|
||||
src-table="public.poi_versions"
|
||||
dst-table="public.poi_sources" reference-fk="poi_versions_source_fkey"
|
||||
src-required="false" dst-required="false"/>
|
||||
|
||||
<relationship name="rel_poi_sources_sources" type="relfk" layer="0"
|
||||
src-table="public.poi_sources"
|
||||
dst-table="public.sources" reference-fk="poi_sources_locale_fkey"
|
||||
src-required="false" dst-required="false"/>
|
||||
|
||||
<relationship name="rel_poi_sources_poi_locales" type="relfk" layer="0"
|
||||
src-table="public.poi_sources"
|
||||
dst-table="public.poi_locales" reference-fk="poi_sources_poi_locale_fkey"
|
||||
src-required="false" dst-required="false"/>
|
||||
|
||||
<relationship name="rel_poi_locales_pois" type="relfk" layer="0"
|
||||
src-table="public.poi_locales"
|
||||
dst-table="public.pois" reference-fk="poi_locales_poi_fkey"
|
||||
src-required="false" dst-required="false"/>
|
||||
|
||||
</dbmodel>
|
||||
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
BIN
_ressources/logo_carre.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
85
_ressources/logo_carre.svg
Normal file
@@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="44"
|
||||
height="44"
|
||||
viewBox="0 0 44 44"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"
|
||||
sodipodi:docname="logo_carre.svg"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<defs
|
||||
id="defs4" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="3.959798"
|
||||
inkscape:cx="17.172593"
|
||||
inkscape:cy="21.465742"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="702"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1" />
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Calque 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(2.2888184e-7,-1008.3622)">
|
||||
<g
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
id="text4136"
|
||||
transform="matrix(1.1379801,0,0,1.1379801,3.1581138e-8,-151.20504)" />
|
||||
<g
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
id="text4136-1"
|
||||
transform="matrix(1.1379801,0,0,1.1379801,-348.56109,665.85293)">
|
||||
<path
|
||||
d="m 327.11423,334.16668 -10.09786,-27.23536 -10.34214,27.23536 z m -18.81955,-1.26818 5.88391,-15.54965 4.87414,-1.40926 6.40569,16.95891 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:200;font-stretch:normal;font-family:'Fira Sans';-inkscape-font-specification:'Fira Sans Ultra-Light';fill:#000000;fill-opacity:1"
|
||||
id="path4159"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccccc" />
|
||||
<path
|
||||
d="m 344.58688,334.12116 -0.008,-1.22266 h -1.36672 l -8.73903,-23.79476 0.83839,-1.55306 -0.73436,-0.62958 -0.82296,1.22506 -0.69448,-1.17371 -0.71601,0.66008 0.84437,1.49829 -9.42882,23.76768 h -1.23813 l 0.0188,1.26818 z m -17.50259,-1.22266 6.57828,-15.42426 6.1435,15.42426 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:200;font-stretch:normal;font-size:40px;line-height:125%;font-family:'Fira Sans';-inkscape-font-specification:'Fira Sans Ultra-Light';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
id="path4159-4"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccccccccccccccccc" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.7 KiB |
BIN
_ressources/logo_carre_blanc.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
_ressources/logo_carre_noir.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
507
_ressources/sql_skeleton.sql
Normal file → Executable file
@@ -2,10 +2,8 @@
|
||||
-- PostgreSQL database dump
|
||||
--
|
||||
|
||||
-- Dumped from database version 10.5
|
||||
-- Dumped by pg_dump version 10.5
|
||||
|
||||
-- Started on 2018-10-17 20:33:22 CEST
|
||||
-- Dumped from database version 13.4
|
||||
-- Dumped by pg_dump version 13.4
|
||||
|
||||
SET statement_timeout = 0;
|
||||
SET lock_timeout = 0;
|
||||
@@ -14,81 +12,27 @@ SET client_encoding = 'UTF8';
|
||||
SET standard_conforming_strings = on;
|
||||
SELECT pg_catalog.set_config('search_path', '', false);
|
||||
SET check_function_bodies = false;
|
||||
SET xmloption = content;
|
||||
SET client_min_messages = warning;
|
||||
SET row_security = off;
|
||||
|
||||
--
|
||||
-- TOC entry 7 (class 2615 OID 17905)
|
||||
-- Name: topology; Type: SCHEMA; Schema: -; Owner: postgres
|
||||
-- Name: topology; Type: SCHEMA; Schema: -; Owner: kabano
|
||||
--
|
||||
|
||||
CREATE SCHEMA topology;
|
||||
|
||||
|
||||
ALTER SCHEMA topology OWNER TO postgres;
|
||||
ALTER SCHEMA topology OWNER TO kabano;
|
||||
|
||||
--
|
||||
-- TOC entry 3890 (class 0 OID 0)
|
||||
-- Dependencies: 7
|
||||
-- Name: SCHEMA topology; Type: COMMENT; Schema: -; Owner: postgres
|
||||
-- Name: SCHEMA topology; Type: COMMENT; Schema: -; Owner: kabano
|
||||
--
|
||||
|
||||
COMMENT ON SCHEMA topology IS 'PostGIS Topology schema';
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 1 (class 3079 OID 12281)
|
||||
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
|
||||
--
|
||||
|
||||
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3891 (class 0 OID 0)
|
||||
-- Dependencies: 1
|
||||
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
|
||||
--
|
||||
|
||||
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3 (class 3079 OID 16398)
|
||||
-- Name: postgis; Type: EXTENSION; Schema: -; Owner:
|
||||
--
|
||||
|
||||
CREATE EXTENSION IF NOT EXISTS postgis WITH SCHEMA public;
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3892 (class 0 OID 0)
|
||||
-- Dependencies: 3
|
||||
-- Name: EXTENSION postgis; Type: COMMENT; Schema: -; Owner:
|
||||
--
|
||||
|
||||
COMMENT ON EXTENSION postgis IS 'PostGIS geometry, geography, and raster spatial types and functions';
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 2 (class 3079 OID 17906)
|
||||
-- Name: postgis_topology; Type: EXTENSION; Schema: -; Owner:
|
||||
--
|
||||
|
||||
CREATE EXTENSION IF NOT EXISTS postgis_topology WITH SCHEMA topology;
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3893 (class 0 OID 0)
|
||||
-- Dependencies: 2
|
||||
-- Name: EXTENSION postgis_topology; Type: COMMENT; Schema: -; Owner:
|
||||
--
|
||||
|
||||
COMMENT ON EXTENSION postgis_topology IS 'PostGIS topology spatial types and functions';
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 2036 (class 1247 OID 18254)
|
||||
-- Name: content_type_enum; Type: TYPE; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -102,20 +46,6 @@ CREATE TYPE public.content_type_enum AS ENUM (
|
||||
ALTER TYPE public.content_type_enum OWNER TO kabano;
|
||||
|
||||
--
|
||||
-- TOC entry 2021 (class 1247 OID 18166)
|
||||
-- Name: poi_key_enum; Type: TYPE; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
CREATE TYPE public.poi_key_enum AS ENUM (
|
||||
'description',
|
||||
'access'
|
||||
);
|
||||
|
||||
|
||||
ALTER TYPE public.poi_key_enum OWNER TO kabano;
|
||||
|
||||
--
|
||||
-- TOC entry 2007 (class 1247 OID 18088)
|
||||
-- Name: poi_type_enum; Type: TYPE; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -132,7 +62,6 @@ CREATE TYPE public.poi_type_enum AS ENUM (
|
||||
ALTER TYPE public.poi_type_enum OWNER TO kabano;
|
||||
|
||||
--
|
||||
-- TOC entry 2001 (class 1247 OID 18057)
|
||||
-- Name: user_rank_enum; Type: TYPE; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -149,8 +78,7 @@ CREATE TYPE public.user_rank_enum AS ENUM (
|
||||
ALTER TYPE public.user_rank_enum OWNER TO kabano;
|
||||
|
||||
--
|
||||
-- TOC entry 237 (class 1259 OID 18332)
|
||||
-- Name: content_comments_sequence; Type: SEQUENCE; Schema: public; Owner: postgres
|
||||
-- Name: content_comments_sequence; Type: SEQUENCE; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
CREATE SEQUENCE public.content_comments_sequence
|
||||
@@ -161,20 +89,18 @@ CREATE SEQUENCE public.content_comments_sequence
|
||||
CACHE 1;
|
||||
|
||||
|
||||
ALTER TABLE public.content_comments_sequence OWNER TO postgres;
|
||||
ALTER TABLE public.content_comments_sequence OWNER TO kabano;
|
||||
|
||||
SET default_tablespace = '';
|
||||
|
||||
SET default_with_oids = false;
|
||||
SET default_table_access_method = heap;
|
||||
|
||||
--
|
||||
-- TOC entry 229 (class 1259 OID 18288)
|
||||
-- Name: content_comments; Type: TABLE; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
CREATE TABLE public.content_comments (
|
||||
id integer DEFAULT nextval('public.content_comments_sequence'::regclass) NOT NULL,
|
||||
permalink character varying(255),
|
||||
version integer,
|
||||
creation_date timestamp without time zone,
|
||||
update_date timestamp without time zone,
|
||||
@@ -190,7 +116,6 @@ CREATE TABLE public.content_comments (
|
||||
ALTER TABLE public.content_comments OWNER TO kabano;
|
||||
|
||||
--
|
||||
-- TOC entry 236 (class 1259 OID 18330)
|
||||
-- Name: content_contributors_sequence; Type: SEQUENCE; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -205,7 +130,6 @@ CREATE SEQUENCE public.content_contributors_sequence
|
||||
ALTER TABLE public.content_contributors_sequence OWNER TO kabano;
|
||||
|
||||
--
|
||||
-- TOC entry 228 (class 1259 OID 18271)
|
||||
-- Name: content_contributors; Type: TABLE; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -219,7 +143,65 @@ CREATE TABLE public.content_contributors (
|
||||
ALTER TABLE public.content_contributors OWNER TO kabano;
|
||||
|
||||
--
|
||||
-- TOC entry 235 (class 1259 OID 18328)
|
||||
-- Name: content_locales_sequence; Type: SEQUENCE; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
CREATE SEQUENCE public.content_locales_sequence
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1;
|
||||
|
||||
|
||||
ALTER TABLE public.content_locales_sequence OWNER TO kabano;
|
||||
|
||||
--
|
||||
-- Name: content_locales; Type: TABLE; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
CREATE TABLE public.content_locales (
|
||||
id integer DEFAULT nextval('public.content_locales_sequence'::regclass) NOT NULL,
|
||||
content_id integer NOT NULL,
|
||||
locale character varying(32) NOT NULL,
|
||||
author integer NOT NULL
|
||||
);
|
||||
|
||||
|
||||
ALTER TABLE public.content_locales OWNER TO kabano;
|
||||
|
||||
--
|
||||
-- Name: content_versions_sequence; Type: SEQUENCE; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
CREATE SEQUENCE public.content_versions_sequence
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1;
|
||||
|
||||
|
||||
ALTER TABLE public.content_versions_sequence OWNER TO kabano;
|
||||
|
||||
--
|
||||
-- Name: content_versions; Type: TABLE; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
CREATE TABLE public.content_versions (
|
||||
id integer DEFAULT nextval('public.content_versions_sequence'::regclass) NOT NULL,
|
||||
version integer DEFAULT 0 NOT NULL,
|
||||
update_date timestamp without time zone NOT NULL,
|
||||
is_archive boolean DEFAULT false NOT NULL,
|
||||
name character varying(255),
|
||||
content text,
|
||||
locale_id integer NOT NULL
|
||||
);
|
||||
|
||||
|
||||
ALTER TABLE public.content_versions OWNER TO kabano;
|
||||
|
||||
--
|
||||
-- Name: contents_sequence; Type: SEQUENCE; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -234,31 +216,22 @@ CREATE SEQUENCE public.contents_sequence
|
||||
ALTER TABLE public.contents_sequence OWNER TO kabano;
|
||||
|
||||
--
|
||||
-- TOC entry 227 (class 1259 OID 18230)
|
||||
-- Name: contents; Type: TABLE; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
CREATE TABLE public.contents (
|
||||
id integer DEFAULT nextval('public.contents_sequence'::regclass) NOT NULL,
|
||||
permalink character varying(255) NOT NULL,
|
||||
version integer DEFAULT 0 NOT NULL,
|
||||
locale character varying(32) NOT NULL,
|
||||
creation_date timestamp without time zone NOT NULL,
|
||||
update_date timestamp without time zone NOT NULL,
|
||||
author integer NOT NULL,
|
||||
is_public boolean DEFAULT true NOT NULL,
|
||||
is_archive boolean DEFAULT false NOT NULL,
|
||||
is_commentable boolean DEFAULT true NOT NULL,
|
||||
type public.content_type_enum NOT NULL,
|
||||
name character varying(255),
|
||||
content text
|
||||
type public.content_type_enum NOT NULL
|
||||
);
|
||||
|
||||
|
||||
ALTER TABLE public.contents OWNER TO kabano;
|
||||
|
||||
--
|
||||
-- TOC entry 221 (class 1259 OID 18067)
|
||||
-- Name: locales; Type: TABLE; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -272,7 +245,6 @@ CREATE TABLE public.locales (
|
||||
ALTER TABLE public.locales OWNER TO kabano;
|
||||
|
||||
--
|
||||
-- TOC entry 234 (class 1259 OID 18326)
|
||||
-- Name: poi_comments_sequence; Type: SEQUENCE; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -287,7 +259,6 @@ CREATE SEQUENCE public.poi_comments_sequence
|
||||
ALTER TABLE public.poi_comments_sequence OWNER TO kabano;
|
||||
|
||||
--
|
||||
-- TOC entry 226 (class 1259 OID 18203)
|
||||
-- Name: poi_comments; Type: TABLE; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -309,7 +280,6 @@ CREATE TABLE public.poi_comments (
|
||||
ALTER TABLE public.poi_comments OWNER TO kabano;
|
||||
|
||||
--
|
||||
-- TOC entry 233 (class 1259 OID 18324)
|
||||
-- Name: poi_contributors_sequence; Type: SEQUENCE; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -324,7 +294,6 @@ CREATE SEQUENCE public.poi_contributors_sequence
|
||||
ALTER TABLE public.poi_contributors_sequence OWNER TO kabano;
|
||||
|
||||
--
|
||||
-- TOC entry 225 (class 1259 OID 18186)
|
||||
-- Name: poi_contributors; Type: TABLE; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -338,11 +307,10 @@ CREATE TABLE public.poi_contributors (
|
||||
ALTER TABLE public.poi_contributors OWNER TO kabano;
|
||||
|
||||
--
|
||||
-- TOC entry 232 (class 1259 OID 18322)
|
||||
-- Name: poi_localised_sequence; Type: SEQUENCE; Schema: public; Owner: kabano
|
||||
-- Name: poi_locales_sequence; Type: SEQUENCE; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
CREATE SEQUENCE public.poi_localised_sequence
|
||||
CREATE SEQUENCE public.poi_locales_sequence
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
@@ -350,43 +318,65 @@ CREATE SEQUENCE public.poi_localised_sequence
|
||||
CACHE 1;
|
||||
|
||||
|
||||
ALTER TABLE public.poi_localised_sequence OWNER TO kabano;
|
||||
ALTER TABLE public.poi_locales_sequence OWNER TO kabano;
|
||||
|
||||
--
|
||||
-- TOC entry 224 (class 1259 OID 18160)
|
||||
-- Name: poi_localised; Type: TABLE; Schema: public; Owner: kabano
|
||||
-- Name: poi_locales; Type: TABLE; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
CREATE TABLE public.poi_localised (
|
||||
id integer DEFAULT nextval('public.poi_localised_sequence'::regclass) NOT NULL,
|
||||
poi integer NOT NULL,
|
||||
CREATE TABLE public.poi_locales (
|
||||
id integer DEFAULT nextval('public.poi_locales_sequence'::regclass) NOT NULL,
|
||||
locale character varying(32) NOT NULL,
|
||||
key public.poi_key_enum NOT NULL,
|
||||
value text NOT NULL
|
||||
poi_id integer NOT NULL
|
||||
);
|
||||
|
||||
|
||||
ALTER TABLE public.poi_localised OWNER TO kabano;
|
||||
ALTER TABLE public.poi_locales OWNER TO kabano;
|
||||
|
||||
--
|
||||
-- Name: poi_sources_sequence; Type: SEQUENCE; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
CREATE SEQUENCE public.poi_sources_sequence
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1;
|
||||
|
||||
|
||||
ALTER TABLE public.poi_sources_sequence OWNER TO kabano;
|
||||
|
||||
--
|
||||
-- TOC entry 222 (class 1259 OID 18109)
|
||||
-- Name: poi_sources; Type: TABLE; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
CREATE TABLE public.poi_sources (
|
||||
id character varying(3) NOT NULL,
|
||||
display_name character varying(255) NOT NULL,
|
||||
icon_name character varying(255),
|
||||
website character varying(255),
|
||||
license_name character varying(255),
|
||||
license_url character varying(255)
|
||||
id integer DEFAULT nextval('public.poi_sources_sequence'::regclass) NOT NULL,
|
||||
source character varying(3),
|
||||
remote_source_id character varying(255),
|
||||
author integer NOT NULL,
|
||||
locale_id integer NOT NULL
|
||||
);
|
||||
|
||||
|
||||
ALTER TABLE public.poi_sources OWNER TO kabano;
|
||||
|
||||
--
|
||||
-- TOC entry 231 (class 1259 OID 18320)
|
||||
-- Name: poi_versions_sequence; Type: SEQUENCE; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
CREATE SEQUENCE public.poi_versions_sequence
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1;
|
||||
|
||||
|
||||
ALTER TABLE public.poi_versions_sequence OWNER TO kabano;
|
||||
|
||||
--
|
||||
-- Name: pois_sequence; Type: SEQUENCE; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -401,34 +391,22 @@ CREATE SEQUENCE public.pois_sequence
|
||||
ALTER TABLE public.pois_sequence OWNER TO kabano;
|
||||
|
||||
--
|
||||
-- TOC entry 223 (class 1259 OID 18119)
|
||||
-- Name: pois; Type: TABLE; Schema: public; Owner: kabano
|
||||
-- Name: sources; Type: TABLE; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
CREATE TABLE public.pois (
|
||||
id integer DEFAULT nextval('public.pois_sequence'::regclass) NOT NULL,
|
||||
permalink character varying(255) NOT NULL,
|
||||
version integer DEFAULT 0 NOT NULL,
|
||||
creation_date timestamp without time zone NOT NULL,
|
||||
update_date timestamp without time zone NOT NULL,
|
||||
author integer NOT NULL,
|
||||
is_public boolean DEFAULT true NOT NULL,
|
||||
is_archive boolean DEFAULT false NOT NULL,
|
||||
type public.poi_type_enum NOT NULL,
|
||||
is_detroyed boolean DEFAULT false NOT NULL,
|
||||
name character varying(255) NOT NULL,
|
||||
alt_names character varying(255),
|
||||
source character varying(3),
|
||||
source_id character varying(255),
|
||||
"position" public.geometry NOT NULL,
|
||||
parameters jsonb
|
||||
CREATE TABLE public.sources (
|
||||
id character varying(3) NOT NULL,
|
||||
display_name character varying(255) NOT NULL,
|
||||
icon_name character varying(255),
|
||||
website character varying(255),
|
||||
license_name character varying(255),
|
||||
license_url character varying(255)
|
||||
);
|
||||
|
||||
|
||||
ALTER TABLE public.pois OWNER TO kabano;
|
||||
ALTER TABLE public.sources OWNER TO kabano;
|
||||
|
||||
--
|
||||
-- TOC entry 230 (class 1259 OID 18317)
|
||||
-- Name: users_id_sequence; Type: SEQUENCE; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -443,7 +421,6 @@ CREATE SEQUENCE public.users_id_sequence
|
||||
ALTER TABLE public.users_id_sequence OWNER TO kabano;
|
||||
|
||||
--
|
||||
-- TOC entry 220 (class 1259 OID 18047)
|
||||
-- Name: users; Type: TABLE; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -458,7 +435,7 @@ CREATE TABLE public.users (
|
||||
is_archive boolean NOT NULL,
|
||||
rank public.user_rank_enum NOT NULL,
|
||||
locale character varying(32) NOT NULL,
|
||||
timezone character varying(8) NOT NULL,
|
||||
timezone character varying(32) NOT NULL,
|
||||
visit_date timestamp without time zone NOT NULL,
|
||||
register_date timestamp without time zone NOT NULL
|
||||
);
|
||||
@@ -467,16 +444,6 @@ CREATE TABLE public.users (
|
||||
ALTER TABLE public.users OWNER TO kabano;
|
||||
|
||||
--
|
||||
-- TOC entry 3717 (class 2606 OID 18297)
|
||||
-- Name: content_comments content_comments_permalink_version_key; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.content_comments
|
||||
ADD CONSTRAINT content_comments_permalink_version_key UNIQUE (permalink, version);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3719 (class 2606 OID 18295)
|
||||
-- Name: content_comments content_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -485,7 +452,6 @@ ALTER TABLE ONLY public.content_comments
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3711 (class 2606 OID 18275)
|
||||
-- Name: content_contributors content_contributors_pkey; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -494,7 +460,6 @@ ALTER TABLE ONLY public.content_contributors
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3713 (class 2606 OID 18277)
|
||||
-- Name: content_contributors content_contributors_unique; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -503,16 +468,46 @@ ALTER TABLE ONLY public.content_contributors
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3707 (class 2606 OID 18262)
|
||||
-- Name: contents contents_permalink_unique; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
-- Name: content_locales content_locales_pkey; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.content_locales
|
||||
ADD CONSTRAINT content_locales_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: content_locales content_locales_unique; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.content_locales
|
||||
ADD CONSTRAINT content_locales_unique UNIQUE (content_id, locale);
|
||||
|
||||
|
||||
--
|
||||
-- Name: content_versions content_versions_pkey; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.content_versions
|
||||
ADD CONSTRAINT content_versions_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: content_versions content_versions_version_locale_key; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.content_versions
|
||||
ADD CONSTRAINT content_versions_version_locale_key UNIQUE (version, locale_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: contents contents_permalink_type_key; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.contents
|
||||
ADD CONSTRAINT contents_permalink_unique UNIQUE (permalink, version, locale);
|
||||
ADD CONSTRAINT contents_permalink_type_key UNIQUE (permalink, type);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3709 (class 2606 OID 18238)
|
||||
-- Name: contents contents_pkey; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -521,7 +516,6 @@ ALTER TABLE ONLY public.contents
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3673 (class 2606 OID 18073)
|
||||
-- Name: locales locales_display_name_unique; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -530,7 +524,6 @@ ALTER TABLE ONLY public.locales
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3675 (class 2606 OID 18075)
|
||||
-- Name: locales locales_flag_name_unique; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -539,7 +532,6 @@ ALTER TABLE ONLY public.locales
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3677 (class 2606 OID 18071)
|
||||
-- Name: locales locales_pkey; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -548,7 +540,6 @@ ALTER TABLE ONLY public.locales
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3701 (class 2606 OID 18212)
|
||||
-- Name: poi_comments poi_comments_permalink_version_key; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -557,7 +548,6 @@ ALTER TABLE ONLY public.poi_comments
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3703 (class 2606 OID 18210)
|
||||
-- Name: poi_comments poi_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -566,7 +556,6 @@ ALTER TABLE ONLY public.poi_comments
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3695 (class 2606 OID 18190)
|
||||
-- Name: poi_contributors poi_contributors_pkey; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -575,7 +564,6 @@ ALTER TABLE ONLY public.poi_contributors
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3697 (class 2606 OID 18192)
|
||||
-- Name: poi_contributors poi_contributors_unique; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -584,34 +572,30 @@ ALTER TABLE ONLY public.poi_contributors
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3691 (class 2606 OID 18164)
|
||||
-- Name: poi_localised poi_localised_pkey; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
-- Name: poi_locales poi_localised_pkey; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.poi_localised
|
||||
ALTER TABLE ONLY public.poi_locales
|
||||
ADD CONSTRAINT poi_localised_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3693 (class 2606 OID 18185)
|
||||
-- Name: poi_localised poi_localised_unique; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
-- Name: poi_locales poi_localised_unique; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.poi_localised
|
||||
ADD CONSTRAINT poi_localised_unique UNIQUE (poi, locale, key);
|
||||
ALTER TABLE ONLY public.poi_locales
|
||||
ADD CONSTRAINT poi_localised_unique UNIQUE (locale, poi_id);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3679 (class 2606 OID 18118)
|
||||
-- Name: poi_sources poi_sources_display_name_unique; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
-- Name: poi_sources poi_sources_locale_key; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.poi_sources
|
||||
ADD CONSTRAINT poi_sources_display_name_unique UNIQUE (display_name);
|
||||
ADD CONSTRAINT poi_sources_locale_key UNIQUE (locale_id, source);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3681 (class 2606 OID 18116)
|
||||
-- Name: poi_sources poi_sources_pkey; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -620,25 +604,30 @@ ALTER TABLE ONLY public.poi_sources
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3686 (class 2606 OID 18145)
|
||||
-- Name: pois pois_permalink_unique; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
-- Name: poi_sources poi_sources_source_key; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.pois
|
||||
ADD CONSTRAINT pois_permalink_unique UNIQUE (permalink, version);
|
||||
ALTER TABLE ONLY public.poi_sources
|
||||
ADD CONSTRAINT poi_sources_source_key UNIQUE (source, remote_source_id);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3688 (class 2606 OID 18124)
|
||||
-- Name: pois pois_pkey; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
-- Name: sources sources_display_name_unique; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.pois
|
||||
ADD CONSTRAINT pois_pkey PRIMARY KEY (id);
|
||||
ALTER TABLE ONLY public.sources
|
||||
ADD CONSTRAINT sources_display_name_unique UNIQUE (display_name);
|
||||
|
||||
|
||||
--
|
||||
-- Name: sources sources_pkey; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.sources
|
||||
ADD CONSTRAINT sources_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3665 (class 2606 OID 18079)
|
||||
-- Name: users users_email_unique; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -647,7 +636,6 @@ ALTER TABLE ONLY public.users
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3668 (class 2606 OID 18077)
|
||||
-- Name: users users_name_unique; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -656,7 +644,6 @@ ALTER TABLE ONLY public.users
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3670 (class 2606 OID 18055)
|
||||
-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -665,7 +652,6 @@ ALTER TABLE ONLY public.users
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3714 (class 1259 OID 18313)
|
||||
-- Name: content_comments_is_archive_index; Type: INDEX; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -673,7 +659,6 @@ CREATE INDEX content_comments_is_archive_index ON public.content_comments USING
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3715 (class 1259 OID 18314)
|
||||
-- Name: content_comments_is_public_index; Type: INDEX; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -681,15 +666,6 @@ CREATE INDEX content_comments_is_public_index ON public.content_comments USING b
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3704 (class 1259 OID 18251)
|
||||
-- Name: contents_is_archive_index; Type: INDEX; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
CREATE INDEX contents_is_archive_index ON public.contents USING btree (is_archive);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3705 (class 1259 OID 18252)
|
||||
-- Name: contents_is_public_index; Type: INDEX; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -697,7 +673,20 @@ CREATE INDEX contents_is_public_index ON public.contents USING btree (is_public)
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3698 (class 1259 OID 18229)
|
||||
-- Name: fki_content_contributors_content_fkey; Type: INDEX; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
CREATE INDEX fki_content_contributors_content_fkey ON public.content_contributors USING btree (content);
|
||||
|
||||
|
||||
--
|
||||
-- Name: fki_content_contributors_contributor_fkey; Type: INDEX; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
CREATE INDEX fki_content_contributors_contributor_fkey ON public.content_contributors USING btree (contributor);
|
||||
|
||||
|
||||
--
|
||||
-- Name: poi_comments_is_archive_index; Type: INDEX; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -705,7 +694,6 @@ CREATE INDEX poi_comments_is_archive_index ON public.poi_comments USING btree (i
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3699 (class 1259 OID 18228)
|
||||
-- Name: poi_comments_is_public_index; Type: INDEX; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -713,39 +701,6 @@ CREATE INDEX poi_comments_is_public_index ON public.poi_comments USING btree (is
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3682 (class 1259 OID 18157)
|
||||
-- Name: pois_is_archive_index; Type: INDEX; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
CREATE INDEX pois_is_archive_index ON public.pois USING btree (is_archive);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3683 (class 1259 OID 18159)
|
||||
-- Name: pois_is_destroyed_index; Type: INDEX; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
CREATE INDEX pois_is_destroyed_index ON public.pois USING btree (is_detroyed);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3684 (class 1259 OID 18156)
|
||||
-- Name: pois_is_public_index; Type: INDEX; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
CREATE INDEX pois_is_public_index ON public.pois USING btree (is_public);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3689 (class 1259 OID 18158)
|
||||
-- Name: pois_type_index; Type: INDEX; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
CREATE INDEX pois_type_index ON public.pois USING btree (type);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3666 (class 1259 OID 18080)
|
||||
-- Name: users_is_archive_index; Type: INDEX; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -753,7 +708,6 @@ CREATE INDEX users_is_archive_index ON public.users USING btree (is_archive);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3671 (class 1259 OID 18081)
|
||||
-- Name: users_register_date_index; Type: INDEX; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -761,7 +715,6 @@ CREATE INDEX users_register_date_index ON public.users USING btree (register_dat
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3734 (class 2606 OID 18298)
|
||||
-- Name: content_comments content_comments_author_fkey; Type: FK CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -770,7 +723,6 @@ ALTER TABLE ONLY public.content_comments
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3736 (class 2606 OID 18308)
|
||||
-- Name: content_comments content_comments_content_fkey; Type: FK CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -779,7 +731,6 @@ ALTER TABLE ONLY public.content_comments
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3735 (class 2606 OID 18303)
|
||||
-- Name: content_comments content_comments_locale_fkey; Type: FK CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -788,16 +739,14 @@ ALTER TABLE ONLY public.content_comments
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3733 (class 2606 OID 18283)
|
||||
-- Name: content_contributors content_contributors_content_fkey; Type: FK CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.content_contributors
|
||||
ADD CONSTRAINT content_contributors_content_fkey FOREIGN KEY (content) REFERENCES public.contents(id);
|
||||
ADD CONSTRAINT content_contributors_content_fkey FOREIGN KEY (content) REFERENCES public.content_locales(id);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3732 (class 2606 OID 18278)
|
||||
-- Name: content_contributors content_contributors_contributor_fkey; Type: FK CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -806,25 +755,38 @@ ALTER TABLE ONLY public.content_contributors
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3730 (class 2606 OID 18241)
|
||||
-- Name: contents contents_author_fkey; Type: FK CONSTRAINT; Schema: public; Owner: kabano
|
||||
-- Name: content_locales content_locales_author; Type: FK CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.contents
|
||||
ADD CONSTRAINT contents_author_fkey FOREIGN KEY (author) REFERENCES public.users(id);
|
||||
ALTER TABLE ONLY public.content_locales
|
||||
ADD CONSTRAINT content_locales_author FOREIGN KEY (author) REFERENCES public.users(id);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3731 (class 2606 OID 18263)
|
||||
-- Name: contents contents_locale_fkey; Type: FK CONSTRAINT; Schema: public; Owner: kabano
|
||||
-- Name: content_locales content_locales_content; Type: FK CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.contents
|
||||
ADD CONSTRAINT contents_locale_fkey FOREIGN KEY (locale) REFERENCES public.locales(name);
|
||||
ALTER TABLE ONLY public.content_locales
|
||||
ADD CONSTRAINT content_locales_content FOREIGN KEY (content_id) REFERENCES public.contents(id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: content_locales content_locales_locale; Type: FK CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.content_locales
|
||||
ADD CONSTRAINT content_locales_locale FOREIGN KEY (locale) REFERENCES public.locales(name);
|
||||
|
||||
|
||||
--
|
||||
-- Name: content_versions content_versions_locale; Type: FK CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.content_versions
|
||||
ADD CONSTRAINT content_versions_locale FOREIGN KEY (locale_id) REFERENCES public.content_locales(id);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3727 (class 2606 OID 18213)
|
||||
-- Name: poi_comments poi_comments_author_fkey; Type: FK CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -833,7 +795,6 @@ ALTER TABLE ONLY public.poi_comments
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3728 (class 2606 OID 18218)
|
||||
-- Name: poi_comments poi_comments_locale_fkey; Type: FK CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -842,16 +803,14 @@ ALTER TABLE ONLY public.poi_comments
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3729 (class 2606 OID 18223)
|
||||
-- Name: poi_comments poi_comments_poi_fkey; Type: FK CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.poi_comments
|
||||
ADD CONSTRAINT poi_comments_poi_fkey FOREIGN KEY (poi) REFERENCES public.pois(id);
|
||||
ADD CONSTRAINT poi_comments_poi_fkey FOREIGN KEY (poi) REFERENCES public.poi_sources(id);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3725 (class 2606 OID 18193)
|
||||
-- Name: poi_contributors poi_contributors_contributor_fkey; Type: FK CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -860,52 +819,38 @@ ALTER TABLE ONLY public.poi_contributors
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3726 (class 2606 OID 18198)
|
||||
-- Name: poi_contributors poi_contributors_poi_fkey; Type: FK CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.poi_contributors
|
||||
ADD CONSTRAINT poi_contributors_poi_fkey FOREIGN KEY (poi) REFERENCES public.pois(id);
|
||||
ADD CONSTRAINT poi_contributors_poi_fkey FOREIGN KEY (poi) REFERENCES public.poi_sources(id);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3724 (class 2606 OID 18179)
|
||||
-- Name: poi_localised poi_localised_locale_fkey; Type: FK CONSTRAINT; Schema: public; Owner: kabano
|
||||
-- Name: poi_locales poi_localised_locale_fkey; Type: FK CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.poi_localised
|
||||
ALTER TABLE ONLY public.poi_locales
|
||||
ADD CONSTRAINT poi_localised_locale_fkey FOREIGN KEY (locale) REFERENCES public.locales(name);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3723 (class 2606 OID 18174)
|
||||
-- Name: poi_localised poi_localised_poi_fkey; Type: FK CONSTRAINT; Schema: public; Owner: kabano
|
||||
-- Name: poi_sources poi_sources_locale_fkey; Type: FK CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.poi_localised
|
||||
ADD CONSTRAINT poi_localised_poi_fkey FOREIGN KEY (poi) REFERENCES public.pois(id);
|
||||
ALTER TABLE ONLY public.poi_sources
|
||||
ADD CONSTRAINT poi_sources_locale_fkey FOREIGN KEY (source) REFERENCES public.sources(id) MATCH FULL;
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3721 (class 2606 OID 18146)
|
||||
-- Name: pois pois_author_fkey; Type: FK CONSTRAINT; Schema: public; Owner: kabano
|
||||
-- Name: poi_sources poi_sources_poi_locale_fkey; Type: FK CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.pois
|
||||
ADD CONSTRAINT pois_author_fkey FOREIGN KEY (author) REFERENCES public.users(id);
|
||||
ALTER TABLE ONLY public.poi_sources
|
||||
ADD CONSTRAINT poi_sources_poi_locale_fkey FOREIGN KEY (locale_id) REFERENCES public.poi_locales(id) MATCH FULL;
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3722 (class 2606 OID 18151)
|
||||
-- Name: pois pois_source_fkey; Type: FK CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.pois
|
||||
ADD CONSTRAINT pois_source_fkey FOREIGN KEY (source) REFERENCES public.poi_sources(id);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3720 (class 2606 OID 18082)
|
||||
-- Name: users users_locale_fkey; Type: FK CONSTRAINT; Schema: public; Owner: kabano
|
||||
--
|
||||
|
||||
@@ -913,7 +858,13 @@ ALTER TABLE ONLY public.users
|
||||
ADD CONSTRAINT users_locale_fkey FOREIGN KEY (locale) REFERENCES public.locales(name);
|
||||
|
||||
|
||||
-- Completed on 2018-10-17 20:33:23 CEST
|
||||
--
|
||||
-- Name: SCHEMA public; Type: ACL; Schema: -; Owner: postgres
|
||||
--
|
||||
|
||||
REVOKE ALL ON SCHEMA public FROM postgres;
|
||||
GRANT ALL ON SCHEMA public TO kabano;
|
||||
|
||||
|
||||
--
|
||||
-- PostgreSQL database dump complete
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<?
|
||||
|
||||
if(isset($controller->splitted_url[1]) && $user->role >= 800) {
|
||||
if(isset($controller->splitted_url[1]) && $user->rankIsHigher("moderator")) {
|
||||
switch ($controller->splitted_url[1]) {
|
||||
case '': case 'admin':
|
||||
$head['title'] = "Administration";
|
||||
include ($config['views_folder']."d.admin.html");
|
||||
break;
|
||||
case 'git-pull':
|
||||
if ($user->role >= 1000) {
|
||||
if ($user->rankIsHigher("administrator")) {
|
||||
$head['title'] = "Mise à jour";
|
||||
|
||||
$output = array();
|
||||
chdir($config['abs_root_folder']);
|
||||
exec("git pull origin master", $output);
|
||||
exec("git pull 2>&1", $output);
|
||||
|
||||
include ($config['views_folder']."d.admin.git-pull.html");
|
||||
}
|
||||
@@ -21,7 +21,7 @@ if(isset($controller->splitted_url[1]) && $user->role >= 800) {
|
||||
}
|
||||
break;
|
||||
case 'logs':
|
||||
if ($user->role >= 800) {
|
||||
if ($user->rankIsHigher("moderator")) {
|
||||
$head['title'] = "Logs";
|
||||
|
||||
$files_list = scandir($config['logs_folder']);
|
||||
@@ -42,12 +42,204 @@ if(isset($controller->splitted_url[1]) && $user->role >= 800) {
|
||||
$notfound = 1;
|
||||
}
|
||||
break;
|
||||
case 'wiki-files':
|
||||
if ($user->rankIsHigher("moderator")) {
|
||||
$head['css'] = "d.index.css;d.admin.css";
|
||||
$head['title'] = "Fichiers attachés au wiki";
|
||||
$rows_per_pages = 50;
|
||||
$files_folder = $config['medias_folder']."wiki/";
|
||||
|
||||
// Delete a file
|
||||
if ($user->rankIsHigher("administrator")) {
|
||||
if(isset($controller->splitted_url[2]) && $controller->splitted_url[2]=='delete' && isset($controller->splitted_url[3])) {
|
||||
$filename=$files_folder.$controller->splitted_url[3];
|
||||
if (file_exists($filename)) {
|
||||
unlink($filename);
|
||||
error_log(date('r')." \t".$user->name." (".$user->id.") \tDELETE \tDelete wiki file '".$controller->splitted_url[3]."'\r\n",3,$config['logs_folder'].'wiki-files.log');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add a file
|
||||
if(isset($controller->splitted_url[2]) && $controller->splitted_url[2]=='upload' && isset($_FILES['file'])) {
|
||||
$filename=$config['medias_folder']."wiki/".$_FILES['file']['name'];
|
||||
if(move_uploaded_file($_FILES['file']['tmp_name'], $filename)) {
|
||||
error_log(date('r')." \t".$user->name." (".$user->id.") \tUPLOAD Upload wiki file '".$_FILES['file']['name']."'\r\n",3,$config['logs_folder'].'wiki-files.log');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Get the file list
|
||||
$files_list = scandir($files_folder);
|
||||
// Populate table
|
||||
foreach ($files_list as $file) {
|
||||
$file_path = $files_folder.$file;
|
||||
|
||||
if (is_file($file_path)) {
|
||||
$file_info = [
|
||||
'name' => $file,
|
||||
'type' => mime_content_type($file_path),
|
||||
'creation_date' => date("Y-m-d H:i:s", filectime($file_path)),
|
||||
'size' => filesize($file_path),
|
||||
];
|
||||
|
||||
$files[] = $file_info;
|
||||
}
|
||||
}
|
||||
$filenb = count($files);
|
||||
|
||||
// Manage sorting
|
||||
if(isset($_GET['orderby']))
|
||||
$orderby = $_GET['orderby'];
|
||||
else
|
||||
$orderby = 'name';
|
||||
if(isset($_GET['order']) && $_GET['order']=='ASC') {
|
||||
$order = 'ASC';
|
||||
usort($files, function ($a, $b) use ($orderby) { return $a[$orderby] <=> $b[$orderby]; });
|
||||
}
|
||||
else {
|
||||
$order = 'DESC';
|
||||
usort($files, function ($a, $b) use ($orderby) { return $b[$orderby] <=> $a[$orderby]; });
|
||||
}
|
||||
|
||||
// Get the correct page number
|
||||
if (!isset($controller->splitted_url[2]) OR $controller->splitted_url[2]=="" OR $controller->splitted_url[2]=="0" OR !is_numeric($controller->splitted_url[2])) {
|
||||
$page = 0;
|
||||
} else {
|
||||
$page = $controller->splitted_url[2] - 1;
|
||||
}
|
||||
// In case the wanted page is too big
|
||||
if($rows_per_pages * $page >= $filenb)
|
||||
$page = 0;
|
||||
|
||||
$first = $page*$rows_per_pages+1;
|
||||
$last = (($page+1)*$rows_per_pages > $filenb ? $filenb : ($page+1)*$rows_per_pages);
|
||||
include ($config['views_folder']."d.admin.wiki-files.html");
|
||||
}
|
||||
else {
|
||||
$notfound = 1;
|
||||
}
|
||||
break;
|
||||
case 'stats':
|
||||
if ($user->rankIsHigher("moderator")) {
|
||||
$head['title'] = "Statistiques";
|
||||
|
||||
$report = $config['abs_root_folder'].'tmp/report.html';
|
||||
|
||||
$files = glob('/var/log/nginx/kabano.org-access.log*.gz');
|
||||
|
||||
$parts = [];
|
||||
|
||||
if (!empty($files)) {
|
||||
$parts[] = 'zcat ' . implode(' ', array_map('escapeshellarg', $files));
|
||||
}
|
||||
|
||||
if (file_exists('/var/log/nginx/kabano.org-access.log.1')) {
|
||||
$parts[] = 'cat /var/log/nginx/kabano.org-access.log.1';
|
||||
}
|
||||
|
||||
$parts[] = 'cat /var/log/nginx/kabano.org-access.log';
|
||||
|
||||
$command = '/bin/bash -c \'(' . implode(' && ', $parts) . ')'
|
||||
. ' | goaccess --log-format=COMBINED --no-progress -o '
|
||||
. escapeshellarg($report)
|
||||
. ' -\' 2>&1';
|
||||
|
||||
$output = shell_exec($command);
|
||||
|
||||
include ($config['views_folder']."d.admin.stats.html");
|
||||
}
|
||||
else {
|
||||
$notfound = 1;
|
||||
}
|
||||
break;
|
||||
case 'sql-backup':
|
||||
if ($user->rankIsHigher("administrator")) {
|
||||
$head['title'] = "Export SQL";
|
||||
|
||||
if(isset($controller->splitted_url[2]) && $controller->splitted_url[2]=='delete' && isset($controller->splitted_url[3])) {
|
||||
unlink($config['abs_root_folder'].'tmp/'.$controller->splitted_url[3]);
|
||||
$output = Array();
|
||||
$backup_file = Array();
|
||||
}
|
||||
else {
|
||||
// Nom du fichier de sauvegarde
|
||||
$timestamp = date('Ymd_His');
|
||||
$backup_filename[0] = $timestamp.'_backup.sql';
|
||||
$backup_file[0] = $config['abs_root_folder'].'tmp/'.$backup_filename[0];
|
||||
|
||||
// Construction de la commande pg_dump
|
||||
$cmd = 'PGPASSWORD="'.$config['SQL_pass'].'" pg_dump -h '.$config['SQL_host'].' -U '.$config['SQL_user'].' -F c -b -v -f "'.$backup_file[0].'" '.$config['SQL_db'].' 2>&1';
|
||||
|
||||
$output = [];
|
||||
$return_var = 0;
|
||||
exec($cmd, $output, $return_var);
|
||||
}
|
||||
|
||||
$backup_files = glob($config['abs_root_folder'].'tmp/*.sql');
|
||||
|
||||
include ($config['views_folder']."d.admin.backup.html");
|
||||
}
|
||||
else {
|
||||
$notfound = 1;
|
||||
}
|
||||
break;
|
||||
case 'files-backup':
|
||||
if ($user->rankIsHigher("administrator")) {
|
||||
$head['title'] = "Export des fichiers";
|
||||
$output = Array();
|
||||
$backup_file = Array();
|
||||
|
||||
if(isset($controller->splitted_url[2]) && $controller->splitted_url[2]=='delete' && isset($controller->splitted_url[3])) {
|
||||
unlink($config['abs_root_folder'].'tmp/'.$controller->splitted_url[3]);
|
||||
}
|
||||
else {
|
||||
// Nom du fichier de sauvegarde
|
||||
$timestamp = date('Ymd_His');
|
||||
$backup_source[0] = $config['abs_root_folder'].'medias/avatars';
|
||||
$backup_source[1] = $config['abs_root_folder'].'medias/wiki';
|
||||
$backup_filename[0] = $timestamp.'_avatar_files.zip';
|
||||
$backup_filename[1] = $timestamp.'_wiki_files.zip';
|
||||
|
||||
for($i=0;$i<2;$i++) {
|
||||
$backup_file[$i] = $config['abs_root_folder'].'tmp/'.$backup_filename[$i];
|
||||
|
||||
$backup[$i] = new ZipArchive();
|
||||
if ($backup[$i]->open($backup_file[$i], ZipArchive::CREATE | ZipArchive::OVERWRITE) === TRUE) {
|
||||
$files = new RecursiveIteratorIterator(
|
||||
new RecursiveDirectoryIterator($backup_source[$i]),
|
||||
RecursiveIteratorIterator::LEAVES_ONLY
|
||||
);
|
||||
|
||||
foreach ($files as $name => $file) {
|
||||
if (!$file->isDir()) {
|
||||
$filePath = $file->getRealPath();
|
||||
$relativePath = substr($filePath, strlen(realpath($backup_source[$i])) + 1);
|
||||
$backup[$i]->addFile($filePath, $relativePath);
|
||||
}
|
||||
}
|
||||
|
||||
$backup[$i]->close();
|
||||
} else {
|
||||
$output[0] = "Erreur lors de la création de l'archive $backup_filename[$i] avec les avatars de $backup_source[$i]";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$backup_files = glob($config['abs_root_folder'].'tmp/*.zip');
|
||||
|
||||
include ($config['views_folder']."d.admin.backup.html");
|
||||
}
|
||||
else {
|
||||
$notfound = 1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$notfound = 1;
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if($user->role >= 800) {
|
||||
else if($user->rankIsHigher("moderator")) {
|
||||
$head['title'] = "Administration";
|
||||
include ($config['views_folder']."d.admin.html");
|
||||
}
|
||||
@@ -55,4 +247,41 @@ else {
|
||||
$notfound = 1;
|
||||
}
|
||||
|
||||
// Fonctions de mise en forme
|
||||
|
||||
function getFontAwesomeIcon($mimeType) {
|
||||
$icons = [
|
||||
'application/pdf' => 'fa-file-pdf',
|
||||
'image/jpeg' => 'fa-file-image',
|
||||
'image/png' => 'fa-file-image',
|
||||
'application/zip' => 'fa-file-archive',
|
||||
'text/plain' => 'fa-file-alt',
|
||||
'application/vnd.ms-excel' => 'fa-file-excel',
|
||||
'application/msword' => 'fa-file-word',
|
||||
'video/mp4' => 'fa-file-video',
|
||||
'audio/mpeg' => 'fa-file-audio',
|
||||
];
|
||||
|
||||
return $icons[$mimeType] ?? 'fa-file'; // Default
|
||||
}
|
||||
|
||||
function formatBytes($bytes, $locale = 'en', $precision = 2) {
|
||||
$unitMap = [
|
||||
'en' => ['B', 'KB', 'MB', 'GB', 'TB', 'PB'],
|
||||
'fr' => ['o', 'Ko', 'Mo', 'Go', 'To', 'Po']
|
||||
];
|
||||
|
||||
$locale = explode('_', $locale)[0];
|
||||
$units = $unitMap[$locale] ?? $unitMap['en'];
|
||||
|
||||
if ($bytes == 0) {
|
||||
return '0 ' . $units[0];
|
||||
}
|
||||
|
||||
$power = floor(log($bytes, 1024));
|
||||
$formatted = round($bytes / pow(1024, $power), $precision);
|
||||
|
||||
return $formatted . ' ' . $units[$power];
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -5,7 +5,7 @@ require_once($config['models_folder']."d.users.php");
|
||||
|
||||
$head['css'] = "d.index.css;d.blog.css";
|
||||
|
||||
$blogArticle = new BlogArticle();
|
||||
$blogArticle = new Kabano\BlogArticle();
|
||||
|
||||
// In case we are in the list of articles, we set url to switch with according parameters
|
||||
if (!isset($controller->splitted_url[1]) OR $controller->splitted_url[1]=="" OR is_numeric($controller->splitted_url[1])) {
|
||||
@@ -29,27 +29,23 @@ switch ($controller->splitted_url[1]) {
|
||||
$list = "rss";
|
||||
$articles_per_pages = 20;
|
||||
case "list":
|
||||
$blogArticles = new BlogArticles();
|
||||
$blogArticles = new Kabano\BlogArticles();
|
||||
|
||||
$blogArticles->number(($user->role >= 600));
|
||||
$blogArticles->number(($user->rankIsHigher("premium")));
|
||||
|
||||
// In case the wanted page is too big
|
||||
if($articles_per_pages * $page >= $blogArticles->number)
|
||||
$page = 0;
|
||||
|
||||
$blogArticles->listArticles($page*$articles_per_pages,$articles_per_pages,($user->role >= 600));
|
||||
$blogArticles->listArticles($page*$articles_per_pages,$articles_per_pages,($user->rankIsHigher("premium")));
|
||||
|
||||
$i = 0;
|
||||
$blogArticles_list = array();
|
||||
foreach ($blogArticles->ids as $row) {
|
||||
$blogArticles_list[$i] = new BlogArticle();
|
||||
$blogArticles_list[$i]->id = $row;
|
||||
$blogArticles_list[$i]->populate();
|
||||
$blogArticles_list[$i]->md2txt();
|
||||
$tempUser = new User();
|
||||
$tempUser->id = $blogArticles_list[$i]->author;
|
||||
$tempUser->populate();
|
||||
$blogArticles_list[$i]->author_name = $tempUser->name;
|
||||
foreach ($blogArticles->objs as $row) {
|
||||
$row->md2txt();
|
||||
$tempUser = new Kabano\User();
|
||||
$tempUser->checkId($row->author);
|
||||
$row->author_name = $tempUser->name;
|
||||
unset($tempUser);
|
||||
$i++;
|
||||
}
|
||||
@@ -64,79 +60,80 @@ switch ($controller->splitted_url[1]) {
|
||||
}
|
||||
break;
|
||||
case "new":
|
||||
if($user->role >= 800) {
|
||||
if($user->rankIsHigher("moderator")) {
|
||||
if(isset($_POST['submit'])) {
|
||||
$blogArticle->content = $_POST['content'];
|
||||
$blogArticle->locale = $_POST['locale'];
|
||||
$blogArticle->title = $_POST['title'];
|
||||
$blogArticle->comments = isset($_POST['comments'])?'t':'f';
|
||||
$blogArticle->name = $_POST['name'];
|
||||
$blogArticle->is_commentable = isset($_POST['is_commentable'])?'t':'f';
|
||||
$blogArticle->author = $user->id;
|
||||
if(!$blogArticle->checkUrl($_POST['url'],1)) {
|
||||
if(!$blogArticle->checkPermalink($_POST['permalink'],1)) {
|
||||
$blogArticle->permalink = $_POST['permalink'];
|
||||
$blogArticle->insert();
|
||||
header('Location: '.$config['rel_root_folder']."blog/".$blogArticle->url);
|
||||
header('Location: '.$config['rel_root_folder']."blog/".$blogArticle->permalink);
|
||||
}
|
||||
else {
|
||||
$head['title'] = $blogArticle->title;
|
||||
$error = "url";
|
||||
$new = 1;
|
||||
include ($config['views_folder']."d.blog.edit.html");
|
||||
$head['title'] = $blogArticle->name;
|
||||
$error = "permalink";
|
||||
}
|
||||
}
|
||||
else {
|
||||
$head['title'] = "Nouvel article";
|
||||
$new = 1;
|
||||
include ($config['views_folder']."d.blog.edit.html");
|
||||
}
|
||||
|
||||
$locales = new Kabano\Locales();
|
||||
$locales->getAll();
|
||||
|
||||
$new = 1;
|
||||
include ($config['views_folder']."d.blog.edit.html");
|
||||
break;
|
||||
}
|
||||
default:
|
||||
// If the page exists
|
||||
if ($blogArticle->checkUrl($controller->splitted_url[1],$user->role >= 600)) {
|
||||
if (isset($controller->splitted_url[2]) && $controller->splitted_url[2] == "delete" && $user->role >= 800) {
|
||||
if ($blogArticle->checkPermalink($controller->splitted_url[1],$user->rankIsHigher("premium"))) {
|
||||
if (isset($controller->splitted_url[2]) && $controller->splitted_url[2] == "delete" && $user->rankIsHigher("moderator")) {
|
||||
$blogArticle->delete();
|
||||
header('Location: '.$config['rel_root_folder']."blog/".$blogArticle->url);
|
||||
header('Location: '.$config['rel_root_folder']."blog/".$blogArticle->permalink);
|
||||
}
|
||||
else if (isset($controller->splitted_url[2]) && $controller->splitted_url[2] == "edit" && $user->role >= 800) {
|
||||
else if (isset($controller->splitted_url[2]) && $controller->splitted_url[2] == "restore" && $user->rankIsHigher("moderator")) {
|
||||
$blogArticle->restore();
|
||||
header('Location: '.$config['rel_root_folder']."blog/".$blogArticle->permalink);
|
||||
}
|
||||
else if (isset($controller->splitted_url[2]) && $controller->splitted_url[2] == "edit" && $user->rankIsHigher("moderator")) {
|
||||
if(isset($_POST['submit'])) {
|
||||
$blogArticle->content = $_POST['content'];
|
||||
$blogArticle->locale = $_POST['locale'];
|
||||
$blogArticle->title = $_POST['title'];
|
||||
$blogArticle->comments = isset($_POST['comments'])?'t':'f';
|
||||
$blogArticle->name = $_POST['name'];
|
||||
$blogArticle->is_commentable = isset($_POST['is_commentable'])?'t':'f';
|
||||
$blogArticle->author = $user->id;
|
||||
$blogArticle->update();
|
||||
header('Location: '.$config['rel_root_folder']."blog/".$blogArticle->url);
|
||||
header('Location: '.$config['rel_root_folder']."blog/".$blogArticle->permalink);
|
||||
}
|
||||
else {
|
||||
$blogArticle->populate();
|
||||
$head['title'] = $blogArticle->title;
|
||||
$locales = new Kabano\Locales();
|
||||
$locales->getAll();
|
||||
|
||||
$head['title'] = $blogArticle->name;
|
||||
include ($config['views_folder']."d.blog.edit.html");
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Manage history of an article
|
||||
if($user->role >= 600) {
|
||||
$blogArticles_history = new BlogArticles();
|
||||
$blogArticles_history->getHistory($controller->splitted_url[1]);
|
||||
|
||||
$i = 0;
|
||||
foreach ($blogArticles_history->ids as $row) {
|
||||
$blogArticles_history_list[$i] = new BlogArticle();
|
||||
$blogArticles_history_list[$i]->id = $row;
|
||||
$blogArticles_history_list[$i]->populate();
|
||||
$i++;
|
||||
}
|
||||
if($user->rankIsHigher("premium")) {
|
||||
$blogHistory = new Kabano\BlogArticles();
|
||||
$blogHistory->getHistory($controller->splitted_url[1]);
|
||||
}
|
||||
if (isset($controller->splitted_url[2]) && is_numeric($controller->splitted_url[2]))
|
||||
$blogArticle->checkUrl($controller->splitted_url[1],$user->role>=600,$controller->splitted_url[2]);
|
||||
$blogArticle->checkPermalink($controller->splitted_url[1],$user->rankIsHigher("premium"),$controller->splitted_url[2]);
|
||||
|
||||
// Manage comment creation
|
||||
if (isset($controller->splitted_url[2]) && $controller->splitted_url[2]=="new_comment") {
|
||||
if (isset($_POST['submit']) && $user->role > 0) {
|
||||
$blogComment = new BlogComment();
|
||||
if (isset($_POST['submit']) && $user->rankIsHigher("registered")) {
|
||||
$blogComment = new Kabano\BlogComment();
|
||||
$blogComment->locale = $user->locale;
|
||||
$blogComment->author = $user->id;
|
||||
$blogComment->article = $blogArticle->id;
|
||||
$blogComment->content = $_POST['comment'];
|
||||
$blogComment->content = $blogArticle->content_id;
|
||||
$blogComment->comment = $_POST['comment'];
|
||||
$blogComment->insert();
|
||||
}
|
||||
}
|
||||
@@ -144,54 +141,45 @@ switch ($controller->splitted_url[1]) {
|
||||
// Manage comment deletion
|
||||
if (isset($controller->splitted_url[2]) && $controller->splitted_url[2]=="delete_comment") {
|
||||
if (isset($controller->splitted_url[3]) && is_numeric($controller->splitted_url[3])) {
|
||||
$blogComment = new BlogComment();
|
||||
$blogComment->id = $controller->splitted_url[3];
|
||||
$blogComment->populate();
|
||||
if ($user->role >= 800 || $user->id == $blogComment->author)
|
||||
$blogComment->delete();
|
||||
$blogComment = new Kabano\BlogComment();
|
||||
if($blogComment->checkId($controller->splitted_url[3]))
|
||||
if ($user->rankIsHigher("moderator") || $user->id == $blogComment->author)
|
||||
$blogComment->delete();
|
||||
}
|
||||
}
|
||||
|
||||
// Manage comment undeletion
|
||||
if (isset($controller->splitted_url[2]) && $controller->splitted_url[2]=="undelete_comment") {
|
||||
// Manage comment restoration
|
||||
if (isset($controller->splitted_url[2]) && $controller->splitted_url[2]=="restore_comment") {
|
||||
if (isset($controller->splitted_url[3]) && is_numeric($controller->splitted_url[3])) {
|
||||
$blogComment = new BlogComment();
|
||||
$blogComment->id = $controller->splitted_url[3];
|
||||
$blogComment->populate();
|
||||
if ($user->role >= 800 || $user->id == $blogComment->author)
|
||||
$blogComment->undelete();
|
||||
$blogComment = new Kabano\BlogComment();
|
||||
if($blogComment->checkId($controller->splitted_url[3]))
|
||||
if ($user->rankIsHigher("moderator") || $user->id == $blogComment->author)
|
||||
$blogComment->restore();
|
||||
}
|
||||
}
|
||||
|
||||
$blogArticle->populate();
|
||||
$blogArticle->md2html();
|
||||
|
||||
// Manage comments
|
||||
if ($blogArticle->comments == "t") {
|
||||
$blogArticles_comments = new BlogComments();
|
||||
$blogArticles_comments->listComments($blogArticle->id, ($user->role>400));
|
||||
if ($blogArticle->is_commentable == "t") {
|
||||
$blogArticles_comments = new Kabano\BlogComments();
|
||||
$blogArticles_comments->listComments($blogArticle->content_id, ($user->rankIsHigher("premium")));
|
||||
|
||||
$i = 0;
|
||||
foreach ($blogArticles_comments->ids as $row) {
|
||||
$blogArticles_comments_list[$i] = new BlogComment();
|
||||
$blogArticles_comments_list[$i]->id = $row;
|
||||
$blogArticles_comments_list[$i]->populate();
|
||||
$blogArticles_comments_list[$i]->md2html();
|
||||
$blogArticles_comments_list[$i]->author_obj = new User();
|
||||
$blogArticles_comments_list[$i]->author_obj->id = $blogArticles_comments_list[$i]->author;
|
||||
$blogArticles_comments_list[$i]->author_obj->populate();
|
||||
$i++;
|
||||
foreach ($blogArticles_comments->objs as $comment) {
|
||||
$comment->md2html();
|
||||
$comment->author_obj = new Kabano\User();
|
||||
$comment->author_obj->checkId($comment->author);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$tempUser = new User();
|
||||
$tempUser->id = $blogArticle->author;
|
||||
$tempUser->populate();
|
||||
$tempUser = new Kabano\User();
|
||||
$tempUser->checkId($blogArticle->author);
|
||||
$blogArticle->author_name = $tempUser->name;
|
||||
unset($tempUser);
|
||||
|
||||
$head['title'] = $blogArticle->title;
|
||||
$head['title'] = $blogArticle->name;
|
||||
include ($config['views_folder']."d.blog.view.html");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@ if(isset($_POST['submit'])) {
|
||||
$message .= "<hr>\r\n";
|
||||
$message .= "<pre style='padding: 10px; background: #ccc;'>".strip_tags(post('message'))."</pre><br>\r\n";
|
||||
|
||||
$headers = 'From: '. post('mail') . "\r\n" .
|
||||
'Reply-To: '. post('mail') . "\r\n" .
|
||||
$headers = 'From: '. post('email') . "\r\n" .
|
||||
'Reply-To: '. post('email') . "\r\n" .
|
||||
'X-Mailer: PHP/' . phpversion() . "\r\n" .
|
||||
'MIME-Version: 1.0' . "\r\n" .
|
||||
'Content-type: text/html; charset=UTF-8' . "\r\n";
|
||||
@@ -27,8 +27,8 @@ if(isset($_POST['submit'])) {
|
||||
$error = "subject";
|
||||
$send = false;
|
||||
}
|
||||
if(post('mail') == '') {
|
||||
$error = "mail";
|
||||
if(post('email') == '') {
|
||||
$error = "email";
|
||||
$send = false;
|
||||
}
|
||||
if(post('message') == '') {
|
||||
@@ -50,17 +50,17 @@ if(isset($_POST['submit'])) {
|
||||
|
||||
if(post('name') != '')
|
||||
$contact['name'] = post('name');
|
||||
else if($user->role > 0)
|
||||
else if($user->rankIsHigher("registered"))
|
||||
$contact['name'] = $user->name;
|
||||
else
|
||||
$contact['name'] = '';
|
||||
|
||||
if(post('mail') != '')
|
||||
$contact['mail'] = post('mail');
|
||||
else if($user->role > 0)
|
||||
$contact['mail'] = $user->mail;
|
||||
if(post('email') != '')
|
||||
$contact['email'] = post('email');
|
||||
else if($user->rankIsHigher("registered"))
|
||||
$contact['email'] = $user->email;
|
||||
else
|
||||
$contact['mail'] = '';
|
||||
$contact['email'] = '';
|
||||
|
||||
$contact['subject'] = post('subject');
|
||||
$contact['message'] = post('message');
|
||||
|
||||
@@ -14,6 +14,8 @@ else {
|
||||
$head['third'] = "leaflet/leaflet.js;leaflet-fullscreen/Leaflet.fullscreen.min.js;leaflet-easybutton/easy-button.js";
|
||||
$head['css'] .= ";d.map.css;../third/leaflet/leaflet.css;../third/leaflet-fullscreen/leaflet.fullscreen.css;../third/leaflet-easybutton/easy-button.css";
|
||||
$head['js'] = "d.map.js";
|
||||
|
||||
require_once($config['includes_folder']."poi_types.struct.php");
|
||||
include ($config['views_folder']."d.map.html");
|
||||
}
|
||||
|
||||
|
||||
162
controllers/d.poi.php
Executable file
@@ -0,0 +1,162 @@
|
||||
<?
|
||||
|
||||
require_once($config['models_folder']."d.poi.php");
|
||||
require_once($config['models_folder']."d.users.php");
|
||||
|
||||
$head['css'] = "d.index.css;d.poi.css";
|
||||
|
||||
$poi = new Kabano\Poi();
|
||||
|
||||
switch ($controller->splitted_url[1]) {
|
||||
case "new":
|
||||
if($user->rankIsHigher("registered")) {
|
||||
if(isset($_POST['submit'])) {
|
||||
$poi->name = $_POST['name'];
|
||||
$poi->locale = $_POST['locale'];
|
||||
$poi->poi_type = $_POST['poi_type'];
|
||||
$poi->lat = $_POST['lat'];
|
||||
$poi->lon = $_POST['lon'];
|
||||
$poi->ele = $_POST['ele'];
|
||||
$poi->author = $user->id;
|
||||
$poi->source = "k";
|
||||
if(!$poi->checkPermalink($_POST['permalink'],1)) {
|
||||
$poi->permalink = $_POST['permalink'];
|
||||
$poi->insert();
|
||||
header('Location: '.$config['rel_root_folder']."blog/".$poi->permalink);
|
||||
}
|
||||
else {
|
||||
$head['title'] = $poi->name;
|
||||
$error = "permalink";
|
||||
}
|
||||
}
|
||||
else {
|
||||
$head['title'] = "Nouvel hébergement";
|
||||
}
|
||||
|
||||
$locales = new Kabano\Locales();
|
||||
$locales->getAll();
|
||||
|
||||
$head['third'] = "leaflet/leaflet.js;leaflet-fullscreen/Leaflet.fullscreen.min.js;leaflet-easybutton/easy-button.js";
|
||||
$head['css'] .= ";../third/leaflet/leaflet.css;../third/leaflet-fullscreen/leaflet.fullscreen.css;../third/leaflet-easybutton/easy-button.css";
|
||||
$head['js'] = "d.poi_map.js";
|
||||
|
||||
$poi->lat = ""; $poi->lon = ""; $poi->ele = "";
|
||||
|
||||
$new = 1;
|
||||
include ($config['views_folder']."d.poi.edit.html");
|
||||
break;
|
||||
}
|
||||
else {
|
||||
$notfound = 1;
|
||||
}
|
||||
case "elevation_proxy":
|
||||
if(isset($_GET['location'])) {
|
||||
header("Content-Type: application/json;charset=utf-8");
|
||||
echo(file_get_contents("https://api.opentopodata.org/v1/mapzen?locations=".$_GET['location']));
|
||||
break;
|
||||
}
|
||||
else {
|
||||
$notfound = 1;
|
||||
}
|
||||
default:
|
||||
// // If the page exists
|
||||
// if ($blogArticle->checkPermalink($controller->splitted_url[1],$user->rankIsHigher("premium"))) {
|
||||
// if (isset($controller->splitted_url[2]) && $controller->splitted_url[2] == "delete" && $user->rankIsHigher("moderator")) {
|
||||
// $blogArticle->delete();
|
||||
// header('Location: '.$config['rel_root_folder']."blog/".$blogArticle->permalink);
|
||||
// }
|
||||
// else if (isset($controller->splitted_url[2]) && $controller->splitted_url[2] == "restore" && $user->rankIsHigher("moderator")) {
|
||||
// $blogArticle->restore();
|
||||
// header('Location: '.$config['rel_root_folder']."blog/".$blogArticle->permalink);
|
||||
// }
|
||||
// else if (isset($controller->splitted_url[2]) && $controller->splitted_url[2] == "edit" && $user->rankIsHigher("moderator")) {
|
||||
// if(isset($_POST['submit'])) {
|
||||
// $blogArticle->content = $_POST['content'];
|
||||
// $blogArticle->locale = $_POST['locale'];
|
||||
// $blogArticle->name = $_POST['name'];
|
||||
// $blogArticle->is_commentable = isset($_POST['is_commentable'])?'t':'f';
|
||||
// $blogArticle->author = $user->id;
|
||||
// $blogArticle->update();
|
||||
// header('Location: '.$config['rel_root_folder']."blog/".$blogArticle->permalink);
|
||||
// }
|
||||
// else {
|
||||
// $locales = new Kabano\Locales();
|
||||
// $locales->getAll();
|
||||
|
||||
// $head['title'] = $blogArticle->name;
|
||||
// include ($config['views_folder']."d.blog.edit.html");
|
||||
// }
|
||||
// }
|
||||
// else {
|
||||
// // Manage history of an article
|
||||
// if($user->rankIsHigher("premium")) {
|
||||
// $blogHistory = new Kabano\BlogArticles();
|
||||
// $blogHistory->getHistory($controller->splitted_url[1]);
|
||||
// }
|
||||
// if (isset($controller->splitted_url[2]) && is_numeric($controller->splitted_url[2]))
|
||||
// $blogArticle->checkPermalink($controller->splitted_url[1],$user->rankIsHigher("premium"),$controller->splitted_url[2]);
|
||||
|
||||
// // Manage comment creation
|
||||
// if (isset($controller->splitted_url[2]) && $controller->splitted_url[2]=="new_comment") {
|
||||
// if (isset($_POST['submit']) && $user->rankIsHigher("registered")) {
|
||||
// $blogComment = new Kabano\BlogComment();
|
||||
// $blogComment->locale = $user->locale;
|
||||
// $blogComment->author = $user->id;
|
||||
// $blogComment->content = $blogArticle->content_id;
|
||||
// $blogComment->comment = $_POST['comment'];
|
||||
// $blogComment->insert();
|
||||
// }
|
||||
// }
|
||||
|
||||
// // Manage comment deletion
|
||||
// if (isset($controller->splitted_url[2]) && $controller->splitted_url[2]=="delete_comment") {
|
||||
// if (isset($controller->splitted_url[3]) && is_numeric($controller->splitted_url[3])) {
|
||||
// $blogComment = new Kabano\BlogComment();
|
||||
// if($blogComment->checkId($controller->splitted_url[3]))
|
||||
// if ($user->rankIsHigher("moderator") || $user->id == $blogComment->author)
|
||||
// $blogComment->delete();
|
||||
// }
|
||||
// }
|
||||
|
||||
// // Manage comment restoration
|
||||
// if (isset($controller->splitted_url[2]) && $controller->splitted_url[2]=="restore_comment") {
|
||||
// if (isset($controller->splitted_url[3]) && is_numeric($controller->splitted_url[3])) {
|
||||
// $blogComment = new Kabano\BlogComment();
|
||||
// if($blogComment->checkId($controller->splitted_url[3]))
|
||||
// if ($user->rankIsHigher("moderator") || $user->id == $blogComment->author)
|
||||
// $blogComment->restore();
|
||||
// }
|
||||
// }
|
||||
|
||||
// $blogArticle->md2html();
|
||||
|
||||
// // Manage comments
|
||||
// if ($blogArticle->is_commentable == "t") {
|
||||
// $blogArticles_comments = new Kabano\BlogComments();
|
||||
// $blogArticles_comments->listComments($blogArticle->content_id, ($user->rankIsHigher("premium")));
|
||||
|
||||
// $i = 0;
|
||||
// foreach ($blogArticles_comments->objs as $comment) {
|
||||
// $comment->md2html();
|
||||
// $comment->author_obj = new Kabano\User();
|
||||
// $comment->author_obj->checkId($comment->author);
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// $tempUser = new Kabano\User();
|
||||
// $tempUser->checkId($blogArticle->author);
|
||||
// $blogArticle->author_name = $tempUser->name;
|
||||
// unset($tempUser);
|
||||
|
||||
// $head['title'] = $blogArticle->name;
|
||||
// include ($config['views_folder']."d.blog.view.html");
|
||||
// }
|
||||
// }
|
||||
// else {
|
||||
// $notfound = 1;
|
||||
// }
|
||||
// break;
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -11,11 +11,11 @@ if(isset($controller->splitted_url[1])) {
|
||||
if ($user->rank == "visitor") {
|
||||
if (isset($_POST['submit'])) {
|
||||
// PROCESS DATA FROM FORM
|
||||
$user = new User();
|
||||
$user = new Kabano\User();
|
||||
|
||||
if($user->login($_POST['login'], $_POST['password'])) {
|
||||
// SUCESSFULL LOGIN
|
||||
$_SESSION['userid'] = $user->get_id();
|
||||
$_SESSION['userid'] = $user->id;
|
||||
header('Location: '.$_SERVER['HTTP_REFERER']);
|
||||
}
|
||||
else {
|
||||
@@ -37,9 +37,9 @@ if(isset($controller->splitted_url[1])) {
|
||||
if ($user->rank == "visitor") {
|
||||
if (isset($_POST['submit'])) {
|
||||
// PROCESS DATA FROM FORM
|
||||
$user = new User();
|
||||
$user = new Kabano\User();
|
||||
$user->name = $_POST['login'];
|
||||
$user->email = strtolower($_POST['mail']);
|
||||
$user->email = strtolower($_POST['email']);
|
||||
$user->rank = "registered";
|
||||
|
||||
if($_POST['captcha'] == -2) {
|
||||
@@ -54,7 +54,7 @@ if(isset($controller->splitted_url[1])) {
|
||||
}
|
||||
}
|
||||
else {
|
||||
header('Location: '.$config['rel_root_folder'].'user/signin?error=mail');
|
||||
header('Location: '.$config['rel_root_folder'].'user/signin?error=email');
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -75,8 +75,8 @@ if(isset($controller->splitted_url[1])) {
|
||||
if ($user->rank == "visitor") {
|
||||
if (isset($_POST['submit'])) {
|
||||
// PROCESS DATA FROM FORM
|
||||
$user = new User();
|
||||
$user->mail = strtolower($_POST['mail']);
|
||||
$user = new Kabano\User();
|
||||
$user->email = strtolower($_POST['email']);
|
||||
|
||||
if($user->availableMail()) {
|
||||
header('Location: '.$config['rel_root_folder'].'user/password_lost?error=1');
|
||||
@@ -92,8 +92,8 @@ if(isset($controller->splitted_url[1])) {
|
||||
}
|
||||
break;
|
||||
case 'p':
|
||||
if ($user->rank_is_higher("registered")) {
|
||||
$userProfile = new User();
|
||||
if ($user->rankIsHigher("registered")) {
|
||||
$userProfile = new Kabano\User();
|
||||
if (!isset($controller->splitted_url[2]) OR $controller->splitted_url[2]=="") {
|
||||
// WE DISPLAY THE CONNECTED USER PROFILE
|
||||
$userProfile = $user;
|
||||
@@ -103,29 +103,31 @@ if(isset($controller->splitted_url[1])) {
|
||||
}
|
||||
$head['title'] = "Profil inexistant";
|
||||
if($userProfile->id != 0) {
|
||||
$userProfile->populate();
|
||||
$head['title'] = "Profil de ".$userProfile->name;
|
||||
}
|
||||
|
||||
// If we are editing the profile
|
||||
if(isset($controller->splitted_url[3]) && $controller->splitted_url[3]=="edit" && ($user->rank_is_higher("moderator") || $user->id == $userProfile->id)) {
|
||||
if(isset($controller->splitted_url[3]) && $controller->splitted_url[3]=="edit" && ($user->rankIsHigher("moderator") || $user->id == $userProfile->id)) {
|
||||
$locales = new Kabano\Locales();
|
||||
$locales->getAll();
|
||||
$head['js'] = "d.avatar.js";
|
||||
if (isset($_POST['submit'])) {
|
||||
$receivedUser = new User();
|
||||
$receivedUser = new Kabano\User();
|
||||
$receivedUser->name = $_POST['name'];
|
||||
if($receivedUser->name != $userProfile->name && $receivedUser->availableName())
|
||||
$userProfile->name = $receivedUser->name;
|
||||
else if($receivedUser->name != $userProfile->name)
|
||||
$nameError=1;
|
||||
$receivedUser->mail = strtolower($_POST['mail']);
|
||||
if($receivedUser->mail != $userProfile->mail && $receivedUser->availableMail())
|
||||
$userProfile->mail = $receivedUser->mail;
|
||||
else if ($receivedUser->mail != $userProfile->mail)
|
||||
$mailError=1;
|
||||
$receivedUser->email = strtolower($_POST['email']);
|
||||
if($receivedUser->email != $userProfile->email && $receivedUser->availableMail())
|
||||
$userProfile->email = $receivedUser->email;
|
||||
else if ($receivedUser->email != $userProfile->email)
|
||||
$emailError=1;
|
||||
if($_POST['password']!='')
|
||||
$userProfile->password=sha1($_POST['password']);
|
||||
$userProfile->locale=$_POST['locale'];
|
||||
if($user->rank_is_higher("administrator"))
|
||||
$userProfile->timezone=$_POST['timezone'];
|
||||
if($user->rankIsHigher("administrator"))
|
||||
$userProfile->rank = $_POST['rank'];
|
||||
$userProfile->website=$_POST['website'];
|
||||
|
||||
@@ -143,13 +145,13 @@ if(isset($controller->splitted_url[1])) {
|
||||
if(file_exists($pathToFile."_s.jpg")) unlink($pathToFile."_s.jpg");
|
||||
generate_image_thumbnail($pathToFile, $pathToFile."_s.jpg", 28, 28);
|
||||
|
||||
$userProfile->avatar = 't';
|
||||
$userProfile->is_avatar_present = 't';
|
||||
}
|
||||
elseif (!isset($_POST['avatar'])) {
|
||||
if(file_exists($pathToFile)) unlink($pathToFile);
|
||||
if(file_exists($pathToFile."_p.jpg")) unlink($pathToFile."_p.jpg");
|
||||
if(file_exists($pathToFile."_s.jpg")) unlink($pathToFile."_s.jpg");
|
||||
$userProfile->avatar = 'f';
|
||||
$userProfile->is_avatar_present = 'f';
|
||||
}
|
||||
|
||||
$userProfile->update();
|
||||
@@ -161,7 +163,7 @@ if(isset($controller->splitted_url[1])) {
|
||||
}
|
||||
// If we are displaying the profile
|
||||
else {
|
||||
if (isset($_POST['submit']) && $user->rank_is_higher("registered")) {
|
||||
if (isset($_POST['submit']) && $user->rankIsHigher("registered")) {
|
||||
// PROCESS DATA FROM CONTACT FORM
|
||||
$message = $_POST['message'];
|
||||
|
||||
@@ -176,7 +178,7 @@ if(isset($controller->splitted_url[1])) {
|
||||
}
|
||||
break;
|
||||
case 'member_list':
|
||||
if ($user->rank_is_higher("registered")) {
|
||||
if ($user->rankIsHigher("registered")) {
|
||||
$rows_per_pages = 50;
|
||||
// Get the correct page number
|
||||
if (!isset($controller->splitted_url[2]) OR $controller->splitted_url[2]=="" OR $controller->splitted_url[2]=="0" OR !is_numeric($controller->splitted_url[2])) {
|
||||
@@ -186,7 +188,7 @@ if(isset($controller->splitted_url[1])) {
|
||||
}
|
||||
$head['title'] = "Liste des membres";
|
||||
|
||||
$users = new Users();
|
||||
$users = new Kabano\Users();
|
||||
$users->number();
|
||||
|
||||
// In case the wanted page is too big
|
||||
@@ -204,14 +206,6 @@ if(isset($controller->splitted_url[1])) {
|
||||
|
||||
$users->list_users($page*$rows_per_pages,$rows_per_pages,$orderby,$order);
|
||||
|
||||
$i = 0;
|
||||
foreach ($users->ids as $row) {
|
||||
$user_list[$i] = new User();
|
||||
$user_list[$i]->id = $row;
|
||||
$user_list[$i]->populate();
|
||||
$i++;
|
||||
}
|
||||
|
||||
$first = $page*$rows_per_pages+1;
|
||||
$last = (($page+1)*$rows_per_pages > $users->number ? $users->number : ($page+1)*$rows_per_pages);
|
||||
|
||||
|
||||
@@ -4,20 +4,24 @@ require_once($config['models_folder']."d.wiki.php");
|
||||
|
||||
$head['css'] = "d.index.css;d.wiki.css";
|
||||
|
||||
$wikiPage = new WikiPage();
|
||||
$wikiPage = new Kabano\WikiPage();
|
||||
// Page doesn't exists
|
||||
if(isset($controller->splitted_url[1]) && !$wikiPage->checkUrl($controller->splitted_url[1],$user->rank_is_higher('premium')) && $controller->splitted_url[1]!="") {
|
||||
if($user->rank_is_higher('moderator')) {
|
||||
if(isset($controller->splitted_url[1]) && !$wikiPage->checkPermalink($controller->splitted_url[1],$user->rankIsHigher('premium')) && $controller->splitted_url[1]!="") {
|
||||
if($user->rankIsHigher('moderator')) {
|
||||
$wikiPage->permalink = $controller->splitted_url[1];
|
||||
// Create new page
|
||||
if(isset($_POST['submit'])) {
|
||||
$wikiPage->content = $_POST['content'];
|
||||
$wikiPage->locale = $_POST['locale'];
|
||||
$wikiPage->title = $_POST['title'];
|
||||
$wikiPage->name = $_POST['name'];
|
||||
$wikiPage->insert();
|
||||
|
||||
header('Location: '.$config['rel_root_folder']."wiki/".$wikiPage->url);
|
||||
header('Location: '.$config['rel_root_folder']."wiki/".$wikiPage->permalink);
|
||||
}
|
||||
else {
|
||||
$locales = new Kabano\Locales();
|
||||
$locales->getAll();
|
||||
|
||||
$head['title'] = "Nouvelle page";
|
||||
include ($config['views_folder']."d.wiki.edit.html");
|
||||
}
|
||||
@@ -27,45 +31,46 @@ if(isset($controller->splitted_url[1]) && !$wikiPage->checkUrl($controller->spli
|
||||
}
|
||||
}
|
||||
// Page exists
|
||||
else if(isset($controller->splitted_url[1]) && $wikiPage->checkUrl($controller->splitted_url[1],$user->rank_is_higher('premium'))) {
|
||||
if (isset($controller->splitted_url[2]) && $controller->splitted_url[2]=="edit" && $user->rank_is_higher('administrator')) {
|
||||
else if(isset($controller->splitted_url[1]) && $wikiPage->checkPermalink($controller->splitted_url[1],$user->rankIsHigher('premium'))) {
|
||||
$wikiPage->permalink = $controller->splitted_url[1];
|
||||
if (isset($controller->splitted_url[2]) && $controller->splitted_url[2]=="edit" && $user->rankIsHigher('moderator')) {
|
||||
// Edit page
|
||||
if(isset($_POST['submit'])) {
|
||||
$wikiPage->content = $_POST['content'];
|
||||
$wikiPage->locale = $_POST['locale'];
|
||||
$wikiPage->title = $_POST['title'];
|
||||
$wikiPage->name = $_POST['name'];
|
||||
$wikiPage->update();
|
||||
|
||||
header('Location: '.$config['rel_root_folder']."wiki/".$wikiPage->url);
|
||||
header('Location: '.$config['rel_root_folder']."wiki/".$wikiPage->permalink);
|
||||
}
|
||||
else {
|
||||
$wikiPage->populate();
|
||||
$head['title'] = $wikiPage->title;
|
||||
$locales = new Kabano\Locales();
|
||||
$locales->getAll();
|
||||
|
||||
$head['title'] = $wikiPage->name;
|
||||
include ($config['views_folder']."d.wiki.edit.html");
|
||||
}
|
||||
} else if (isset($controller->splitted_url[2]) && $controller->splitted_url[2]=="delete" && $user->rank_is_higher('moderator')) {
|
||||
} else if (isset($controller->splitted_url[2]) && $controller->splitted_url[2]=="delete" && $user->rankIsHigher('moderator')) {
|
||||
// Delete page
|
||||
$wikiPage->delete();
|
||||
header('Location: '.$config['rel_root_folder']."wiki/".$wikiPage->url);
|
||||
header('Location: '.$config['rel_root_folder']."wiki/".$wikiPage->permalink);
|
||||
} else if (isset($controller->splitted_url[2]) && $controller->splitted_url[2]=="restore" && $user->rankIsHigher('moderator')) {
|
||||
// Restore page
|
||||
$wikiPage->restore();
|
||||
header('Location: '.$config['rel_root_folder']."wiki/".$wikiPage->permalink);
|
||||
} else {
|
||||
// Display page
|
||||
if($user->rank_is_higher('premium')) {
|
||||
$wikiHistory = new WikiPages();
|
||||
if($user->rankIsHigher('premium')) {
|
||||
$wikiHistory = new Kabano\WikiPages();
|
||||
$wikiHistory->getHistory($controller->splitted_url[1]);
|
||||
|
||||
$i = 0;
|
||||
foreach ($wikiHistory->ids as $row) {
|
||||
$wikiHistory_list[$i] = new WikiPage();
|
||||
$wikiHistory_list[$i]->id = $row;
|
||||
$wikiHistory_list[$i]->populate();
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
if (isset($controller->splitted_url[2]) && is_numeric($controller->splitted_url[2]))
|
||||
$wikiPage->checkUrl($controller->splitted_url[1], $user->rank_is_higher('premium'), $controller->splitted_url[2]);
|
||||
$wikiPage->checkPermalink($controller->splitted_url[1], $user->rankIsHigher('premium'), $controller->splitted_url[2]);
|
||||
|
||||
$wikiPage->md2html();
|
||||
$head['title'] = $wikiPage->title;
|
||||
$head['title'] = $wikiPage->name;
|
||||
$head['css'] .= ";../third/simplelightbox/simple-lightbox.min.css";
|
||||
$head['third'] = "simplelightbox/simple-lightbox.min.js";
|
||||
include ($config['views_folder']."d.wiki.view.html");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
<?
|
||||
<?php
|
||||
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
locale_set_default("fr_FR");
|
||||
date_default_timezone_set("UTC"); // Default tz for date manipulation is UTC. Display tz is in session.php
|
||||
|
||||
|
||||
/*****
|
||||
@@ -15,6 +17,7 @@ $config['include_folder']=basename(__DIR__);
|
||||
$config['abs_root_folder']=str_replace($config['include_folder'],"",__DIR__);
|
||||
// This is the relative folder to the root of the website from the DocumentRoot (can also be called subfolder)
|
||||
$config['rel_root_folder']=str_replace($_SERVER['DOCUMENT_ROOT'],"",$config['abs_root_folder']);
|
||||
$config['web_root_folder']="https://kabano.test/";
|
||||
if($config['rel_root_folder']=="") $config['rel_root_folder']="/";
|
||||
|
||||
// Here all the absolute paths to specific folders
|
||||
@@ -46,20 +49,4 @@ $config['SQL_db'] = "postgres";
|
||||
$config['admin_mail'] = "leo@lstronic.com";
|
||||
$config['bot_mail'] = "robot@kabano.com";
|
||||
|
||||
/*****
|
||||
** Locales configuration
|
||||
*****/
|
||||
|
||||
$config['locales'] = array(
|
||||
"fr" => array("fr","fr_FR.UTF8","french","fr_FR","fr_FR.UTF-8", "Français")
|
||||
);
|
||||
$config['roles'] = array(
|
||||
1000 => array(1000,"Administrateur", "red"),
|
||||
800 => array(800,"Modérateur", "orangered"),
|
||||
600 => array(600,"Membre premium", "orange"),
|
||||
400 => array(400,"Utilisateur", "green"),
|
||||
200 => array(200,"Membre archivé", "#aaa"),
|
||||
0 => array(0,"Visiteur", "black")
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -25,10 +25,10 @@ function generate_image_thumbnail($source_image_path, $thumbnail_image_path, $wi
|
||||
// If the limitation is on the height (cuts on the width)
|
||||
if($height*$source_image_width/$source_image_height > $width) {
|
||||
$src_x = (int)(($source_image_width - $source_image_height * $width / $height) / 2);
|
||||
$source_image_width = $source_image_height * $width / $height;
|
||||
$source_image_width = (int)($source_image_height * $width / $height);
|
||||
} else {
|
||||
$src_y = (int)(($source_image_height - $source_image_width * $height / $width) / 2);
|
||||
$source_image_height = $source_image_width * $height / $width;
|
||||
$source_image_height = (int)($source_image_width * $height / $width);
|
||||
}
|
||||
|
||||
$thumbnail_gd_image = imagecreatetruecolor($thumbnail_image_width, $thumbnail_image_height);
|
||||
|
||||
65
includes/poi_types.struct.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?
|
||||
|
||||
// This array is related to the defined SQL enum, do not touch.
|
||||
// Types : t_: text ; b_: boolean ; n_: number ; l_: link
|
||||
|
||||
$poi_types = array(
|
||||
"basic_hut" => array("Abri sommaire", "Abri", "#ef2929", "basic_hut", "Un abri sommaire est un bâtiment qui ne permet pas l'hébergement, comme un kiosque.", array(
|
||||
't_owner' => "Informations sur le⋅la propriétaire et moyens de contacts",
|
||||
't_access' => "Description de l'accès, des transports en commun, et d'éventuels passages délicats",
|
||||
't_description' => "Description sur l'abri et remarques (mobilier, dates de disponibilité...)",
|
||||
'b_usable' => "Abri condamné, détruit ou fermé ?",
|
||||
'b_water' => "Eau à proximité ?",
|
||||
'b_wood' => "Bois à proximité ?")),
|
||||
"wilderness_hut" => array("Cabane non gardée", "Cabane", "#ef2929", "wilderness_hut", "Une cabane non gardée est un bâtiment qui permet l'hébergement, même sommaire, sans gardien.", array(
|
||||
't_owner' => "Informations sur le⋅la propriétaire et moyens de contacts",
|
||||
't_access' => "Description de l'accès, des transports en commun, et d'éventuels passages délicats",
|
||||
't_description' => "Description sur la cabane et remarques (mobilier, isolation, dates de disponibilité...)",
|
||||
'b_key' => "Nécessite une clé ?",
|
||||
'b_usable' => "Cabane condamnée, détruite ou fermée ?",
|
||||
'n_bed' => "Nombre de places prévues pour dormir :",
|
||||
'n_mattress' => "Nombre de matelas disponibles :",
|
||||
'b_cover' => "Couvertures ?",
|
||||
'b_water' => "Eau à proximité ?",
|
||||
'b_wood' => "Bois à proximité ?",
|
||||
'b_fireplace' => "Cheminée ou poêle à bois ?",
|
||||
'b_toilet' => "Latrines ou toilettes ?")),
|
||||
"alpine_hut" => array("Refuge gardé", "Refuge", "#ef2929", "alpine_hut", "Un refuge gardé est un bâtiment qui permet l'hébergement toute l'année, gardé tout ou partie de l'année.", array(
|
||||
't_owner' => "Informations sur le⋅la propriétaire, le⋅la gardien⋅ne et moyens de contacts",
|
||||
't_access' => "Description de l'accès, des transports en commun, et d'éventuels passages délicats",
|
||||
't_description' => "Description sur le refuge et remarques (mobilier, isolation, dates de gardiennage, tarifs, prestations, réservations...)",
|
||||
'b_usable' => "Refuge condamné, détruit ou fermé ?",
|
||||
'n_bed' => "Nombre de places prévues pour dormir en période gardée :",
|
||||
'n_bed_winter' => "Nombre de places prévues pour dormir en période non gardée :",
|
||||
'n_mattress' => "Nombre de matelas en période non gardée :",
|
||||
'b_cover' => "Couvertures disponibles en période non gardée ?",
|
||||
'b_water' => "Possibilité de se ravitailler en eau ?",
|
||||
'b_wood' => "Bois à proximité ?",
|
||||
'b_fireplace' => "Cheminée ou poêle à bois en période non gardée ?",
|
||||
'b_toilet' => "Latrines ou toilettes en période non gardée ?",
|
||||
'l_water' => "URL du site web :")),
|
||||
"halt" => array("Gîte d'étape", "Gîte", "#4e9a06", "halt", "Un gîte d'étape est un bâtiment qui permet l'hébergement uniquement sur ses périodes d'ouvertures.", array(
|
||||
't_owner' => "Informations sur le⋅la propriétaire, le⋅la gardien⋅ne et moyens de contacts",
|
||||
't_access' => "Description de l'accès, des transports en commun, et d'éventuels passages délicats",
|
||||
't_description' => "Description sur le gîte et remarques (période d'ouverture, tarifs, prestations, réservations...)",
|
||||
'b_usable' => "Gîte condamné, détruit ou fermé ?",
|
||||
'n_bed' => "Nombre de places prévues pour dormir :",
|
||||
'b_water' => "Possibilité de se ravitailler en eau ?",
|
||||
'l_water' => "URL du site web :")),
|
||||
"bivouac" => array("Zone de bivouac", "Bivouac", "#ef2929", "bivouac", "Une zone de bivouac est un espace aménagé permettant de planter la tente.", array(
|
||||
't_access' => "Description de l'accès, des transports en commun, et d'éventuels passages délicats",
|
||||
't_description' => "Description sur la zone de bivouac et remarques (réglementation spécifique...)",
|
||||
'n_bed' => "Nombre d'emplacements :",
|
||||
'b_water' => "Eau à proximité ?",
|
||||
'b_wood' => "Bois à proximité ?",
|
||||
'b_fireplace' => "Emplacement pour faire un feu ?")),
|
||||
"campsite" => array("Camping", "Camping", "#4e9a06", "campsite", "Un camping est un espace aménagé permettant de planter la tente plusieurs jours, avec gardien.", array(
|
||||
't_owner' => "Informations sur le⋅la propriétaire, le⋅la gardien⋅ne et moyens de contacts",
|
||||
't_access' => "Description de l'accès, des transports en commun, et d'éventuels passages délicats",
|
||||
't_description' => "Description du camping et remarques (période d'ouverture, tarifs, prestations...)",
|
||||
'n_bed' => "Nombre d'emplacements :",
|
||||
'b_water' => "Possibilité de se ravitailler en eau ?",
|
||||
'l_water' => "URL du site web :"))
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -20,12 +20,15 @@ $controller->prefix = "d.";
|
||||
$notfound = 0;
|
||||
$session = 1;
|
||||
|
||||
if($controller->splitted_url[0]=="") $controller->splitted_url[0]="index";
|
||||
|
||||
// Routing to the correct page from the correct link
|
||||
switch ($controller->splitted_url[0])
|
||||
{
|
||||
case "index": case "" :
|
||||
case "index":
|
||||
case "community" :
|
||||
$controller->name="";
|
||||
$view->name="index";
|
||||
$view->name=$controller->splitted_url[0];
|
||||
break;
|
||||
case "user" :
|
||||
$controller->name="users";
|
||||
@@ -35,6 +38,7 @@ switch ($controller->splitted_url[0])
|
||||
case "wiki" :
|
||||
case "blog" :
|
||||
case "map" :
|
||||
case "poi" :
|
||||
case "admin" :
|
||||
$controller->name=$controller->splitted_url[0];
|
||||
$view->name="";
|
||||
@@ -59,8 +63,8 @@ if($view->name != "") {
|
||||
if($notfound) {
|
||||
require_once('session.php');
|
||||
require_once($config['models_folder']."d.wiki.php");
|
||||
$wikiPage = new WikiPage();
|
||||
$wikiPage->checkUrl('404');
|
||||
$wikiPage = new Kabano\WikiPage();
|
||||
$wikiPage->checkPermalink('404');
|
||||
$wikiPage->md2html();
|
||||
$head['css'] = "d.index.css;d.wiki.css";
|
||||
$head['title'] = $wikiPage->name;
|
||||
|
||||
@@ -5,18 +5,34 @@ require_once($config['models_folder']."d.users.php");
|
||||
ini_set("session.cookie_lifetime",60*60*24*30);
|
||||
session_start();
|
||||
|
||||
$user = new User();
|
||||
$user->rank = "visitor"; // All users are visitors
|
||||
$user = new Kabano\User();
|
||||
|
||||
if(isset($_SESSION['userid'])) {
|
||||
$user->checkID($_SESSION['userid']);
|
||||
if ($user->checkID($_SESSION['userid'])) {
|
||||
$user->updateLoginDate();
|
||||
//setlocale(LC_ALL, $config['locales'][$user->locale][4]);
|
||||
$config['locale'] = $user->locale;
|
||||
$config['timezone'] = $user->timezone;
|
||||
}
|
||||
else {
|
||||
session_destroy();
|
||||
$config['locale'] = "fr_FR";
|
||||
$config['timezone'] = "Europe/Paris";
|
||||
$user->rank = "visitor"; // All users are visitors
|
||||
}
|
||||
}
|
||||
else {
|
||||
$config['locale'] = "fr_FR";
|
||||
$config['timezone'] = "Europe/Paris";
|
||||
$user->rank = "visitor"; // All users are visitors
|
||||
}
|
||||
|
||||
if (PHP_VERSION_ID < 80000) {
|
||||
$user->date_format = new IntlDateFormatter($config['locale'], IntlDateFormatter::LONG, IntlDateFormatter::NONE, $config['timezone']);
|
||||
} else {
|
||||
$user->date_format = new IntlDateFormatter($config['locale'], IntlDateFormatter::RELATIVE_LONG, IntlDateFormatter::NONE, $config['timezone']);
|
||||
}
|
||||
$user->datetime_format = new IntlDateFormatter($config['locale'], IntlDateFormatter::LONG, IntlDateFormatter::SHORT, $config['timezone']);
|
||||
$user->datetimeshort_format = new IntlDateFormatter($config['locale'], IntlDateFormatter::SHORT, IntlDateFormatter::SHORT, $config['timezone']);
|
||||
|
||||
|
||||
?>
|
||||
@@ -1,5 +1,7 @@
|
||||
<?
|
||||
|
||||
namespace Kabano;
|
||||
|
||||
/**********************************************************
|
||||
***********************************************************
|
||||
**
|
||||
@@ -12,46 +14,50 @@ require_once($config['third_folder']."Md/MarkdownExtra.inc.php");
|
||||
|
||||
class BlogArticle
|
||||
{
|
||||
public $id = 0;
|
||||
public $title = NULL;
|
||||
public $url = NULL;
|
||||
public $content_id = NULL;
|
||||
public $locale_id = NULL;
|
||||
public $version_id = NULL;
|
||||
public $permalink = NULL;
|
||||
public $version = 0;
|
||||
public $locale = NULL;
|
||||
public $lastedit = NULL;
|
||||
public $archive = NULL;
|
||||
public $content = NULL;
|
||||
public $creation_date = NULL;
|
||||
public $update_date = NULL;
|
||||
public $author = NULL;
|
||||
public $comments = NULL;
|
||||
public $is_public = NULL;
|
||||
public $is_archive = NULL;
|
||||
public $is_commentable = NULL;
|
||||
public $type = "blog";
|
||||
public $name = NULL;
|
||||
public $content = NULL;
|
||||
|
||||
/*****
|
||||
** Checks if a page at this URL exists and return the ID
|
||||
*****/
|
||||
public function checkUrl($url, $withArchive=0, $elementNb=0) {
|
||||
public function checkPermalink($permalink, $withArchive=0, $elementNb=0) {
|
||||
global $config;
|
||||
|
||||
$con = pg_connect("host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass'])
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
$query = "SELECT id FROM blog_articles WHERE url=$1";
|
||||
$query = "SELECT content_versions.id AS version_id, * FROM contents INNER JOIN content_locales ON contents.id = content_locales.content_id INNER JOIN content_versions ON content_locales.id = content_versions.locale_id WHERE permalink=$1 AND type='blog'";
|
||||
if($withArchive==0) {
|
||||
$query .= " AND archive=FALSE";
|
||||
$query .= " AND is_archive=FALSE AND is_public=TRUE";
|
||||
}
|
||||
$query .= " ORDER BY lastedit DESC LIMIT 1 OFFSET $2";
|
||||
$query .= " ORDER BY update_date DESC LIMIT 1 OFFSET $2";
|
||||
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare1", array($url, $elementNb))
|
||||
$result = pg_execute($con, "prepare1", array($permalink, $elementNb))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
pg_close($con);
|
||||
|
||||
if(pg_num_rows($result) == 1) {
|
||||
$article = pg_fetch_assoc($result);
|
||||
$this->id = $article['id'];
|
||||
$this->url = $url;
|
||||
$row = pg_fetch_assoc($result);
|
||||
$this->populate($row);
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
$this->url = $url;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -59,36 +65,22 @@ class BlogArticle
|
||||
/*****
|
||||
** Populate the object using its ID
|
||||
*****/
|
||||
public function populate() {
|
||||
global $config;
|
||||
|
||||
if($this->id != 0) {
|
||||
$con = pg_connect("host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass'])
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
$query = "SELECT * FROM blog_articles WHERE id=$1";
|
||||
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare1", array($this->id))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
pg_close($con);
|
||||
|
||||
$blog_article = pg_fetch_assoc($result);
|
||||
|
||||
$this->title = $blog_article['title'];
|
||||
$this->url = $blog_article['url'];
|
||||
$this->locale = $blog_article['locale'];
|
||||
$this->lastedit = $blog_article['lastedit'];
|
||||
$this->archive = $blog_article['archive'];
|
||||
$this->content = $blog_article['content'];
|
||||
$this->author = $blog_article['author'];
|
||||
$this->comments = $blog_article['comments'];
|
||||
}
|
||||
else {
|
||||
die("Cannot populate a blog article without ID");
|
||||
}
|
||||
public function populate($row) {
|
||||
$this->content_id = $row['content_id'];
|
||||
$this->locale_id = $row['locale_id'];
|
||||
$this->version_id = $row['version_id'];
|
||||
$this->permalink = $row['permalink'];
|
||||
$this->version = $row['version'];
|
||||
$this->locale = $row['locale'];
|
||||
$this->creation_date = $row['creation_date'];
|
||||
$this->update_date = $row['update_date'];
|
||||
$this->author = $row['author'];
|
||||
$this->is_public = $row['is_public'];
|
||||
$this->is_archive = $row['is_archive'];
|
||||
$this->is_commentable = $row['is_commentable'];
|
||||
$this->type = $row['type'];
|
||||
$this->name = $row['name'];
|
||||
$this->content = $row['content'];
|
||||
}
|
||||
|
||||
/*****
|
||||
@@ -97,43 +89,44 @@ class BlogArticle
|
||||
public function update() {
|
||||
global $config;
|
||||
global $user;
|
||||
|
||||
if($this->content_id == 0 || $this->locale_id == 0 || $this->version_id == 0)
|
||||
die("Cannot update entry without giving ID");
|
||||
|
||||
$this->version++;
|
||||
|
||||
$con = pg_connect("host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass'])
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
// Archive previous article
|
||||
$query = "UPDATE blog_articles SET archive = TRUE WHERE url = $1";
|
||||
$query = "UPDATE content_versions SET is_archive = TRUE WHERE locale_id = $1";
|
||||
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare1", array($this->url))
|
||||
$result = pg_execute($con, "prepare1", array($this->locale_id))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
// Publish the new one
|
||||
$query = "INSERT INTO blog_articles (url, title, content, lastedit, archive, locale, author, comments) VALUES
|
||||
($1, $2, $3, $4, FALSE, $5, $6, $7) RETURNING id";
|
||||
$query = "INSERT INTO content_versions (version, update_date, is_archive, name, content, locale_id) VALUES
|
||||
($1, $2, FALSE, $3, $4, $5) RETURNING id";
|
||||
|
||||
pg_prepare($con, "prepare2", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare2", array($this->url, $this->title, $this->content, date('r'), $this->locale, $this->author, $this->comments))
|
||||
$result = pg_execute($con, "prepare2", array($this->version, date('r'), $this->name, $this->content, $this->locale_id))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
$this->id = pg_fetch_assoc($result)['id'];
|
||||
$this->version_id = pg_fetch_assoc($result)['id'];
|
||||
|
||||
// Move all comments to the new one
|
||||
|
||||
$query = "UPDATE blog_comments bc SET article = $1 FROM blog_articles ba WHERE bc.article = ba.id AND ba.url = $2";
|
||||
$query = "INSERT INTO content_contributors (content, contributor) VALUES
|
||||
($1, $2) ON CONFLICT (content, contributor) DO NOTHING";
|
||||
|
||||
pg_prepare($con, "prepare3", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare3", array($this->id, $this->url))
|
||||
$result = pg_execute($con, "prepare3", array($this->locale_id, $user->id))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
|
||||
pg_close($con);
|
||||
|
||||
error_log(
|
||||
date('r')." \t".$user->name." (".$user->id.") \tUPDATE \tEdit blog article '".$this->url."'\r\n",
|
||||
date('r')." \t".$user->name." (".$user->id.") \tUPDATE \tEdit blog article '".$this->permalink."'\r\n",
|
||||
3,
|
||||
$config['logs_folder'].'blog.articles.log');
|
||||
}
|
||||
@@ -148,17 +141,42 @@ class BlogArticle
|
||||
$con = pg_connect("host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass'])
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
$query = "UPDATE blog_articles SET archive = TRUE WHERE url = $1";
|
||||
$query = "UPDATE contents SET is_public=FALSE WHERE permalink=$1 AND type='blog'";
|
||||
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare1", array($this->url))
|
||||
$result = pg_execute($con, "prepare1", array($this->permalink))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
pg_close($con);
|
||||
|
||||
error_log(
|
||||
date('r')." \t".$user->name." (".$user->id.") \tDELETE \tArchive blog article '".$this->url."'\r\n",
|
||||
date('r')." \t".$user->name." (".$user->id.") \tDELETE \tArchive blog article '".$this->permalink."'\r\n",
|
||||
3,
|
||||
$config['logs_folder'].'blog.articles.log');
|
||||
}
|
||||
|
||||
/*****
|
||||
** Restore a page from unpublishing it
|
||||
*****/
|
||||
public function restore() {
|
||||
global $config;
|
||||
global $user;
|
||||
|
||||
$con = pg_connect("host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass'])
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
$query = "UPDATE contents SET is_public=TRUE WHERE permalink=$1 AND type='blog'";
|
||||
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare1", array($this->permalink))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
pg_close($con);
|
||||
|
||||
error_log(
|
||||
date('r')." \t".$user->name." (".$user->id.") \tRESTORE \tPublish blog article '".$this->permalink."'\r\n",
|
||||
3,
|
||||
$config['logs_folder'].'blog.articles.log');
|
||||
}
|
||||
@@ -173,18 +191,48 @@ class BlogArticle
|
||||
$con = pg_connect("host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass'])
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
$query = "INSERT INTO blog_articles (url, title, content, lastedit, archive, locale, author, comments) VALUES
|
||||
($1, $2, $3, $4, FALSE, $5, $6, $7)";
|
||||
$query = "INSERT INTO contents (permalink, creation_date, is_public, is_commentable, type) VALUES
|
||||
($1, $2, TRUE, $3, 'blog') RETURNING id";
|
||||
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare1", array($this->permalink, date('r'), $this->is_commentable))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
$this->content_id = pg_fetch_assoc($result)['id'];
|
||||
|
||||
$query = "INSERT INTO content_locales (content_id, locale, author) VALUES
|
||||
($1, $2, $3) RETURNING id";
|
||||
|
||||
pg_prepare($con, "prepare2", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare2", array($this->url, $this->title, $this->content, date('r'), $this->locale, $this->author, $this->comments))
|
||||
$result = pg_execute($con, "prepare2", array($this->content_id, $this->locale, $user->id))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
$this->locale_id = pg_fetch_assoc($result)['id'];
|
||||
|
||||
$query = "INSERT INTO content_versions (version, update_date, is_archive, name, content, locale_id) VALUES
|
||||
('0', $1, FALSE, $2, $3, $4) RETURNING id";
|
||||
|
||||
pg_prepare($con, "prepare3", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare3", array(date('r'), $this->name, $this->content, $this->locale_id))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
$this->version_id = pg_fetch_assoc($result)['id'];
|
||||
|
||||
$query = "INSERT INTO content_contributors (content, contributor) VALUES
|
||||
($1, $2)";
|
||||
|
||||
pg_prepare($con, "prepare4", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare4", array($this->id, $user->id))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
pg_close($con);
|
||||
|
||||
error_log(
|
||||
date('r')." \t".$user->name." (".$user->id.") \tINSERT \tCreate new blog article '".$this->url."'\r\n",
|
||||
date('r')." \t".$user->name." (".$user->id.") \tINSERT \tCreate new blog article '".$this->permalink."'\r\n",
|
||||
3,
|
||||
$config['logs_folder'].'blog.articles.log');
|
||||
}
|
||||
@@ -216,7 +264,7 @@ class BlogArticle
|
||||
|
||||
class BlogArticles
|
||||
{
|
||||
public $ids = array();
|
||||
public $objs = array();
|
||||
public $number = NULL;
|
||||
|
||||
/*****
|
||||
@@ -228,13 +276,10 @@ class BlogArticles
|
||||
$con = pg_connect("host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass'])
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
if ($archive == 1) {
|
||||
// You just want one per url and the criteria is ORDER BY archives = true, time DES=C
|
||||
$query = "SELECT id FROM (SELECT a.id, a.lastedit , ROW_NUMBER() OVER (PARTITION BY a.url ORDER BY CASE WHEN a.archive IS TRUE THEN 1 ELSE 0 END, a.lastedit DESC) AS r FROM blog_articles AS a) AS b WHERE r = 1 ORDER BY lastedit DESC";
|
||||
}
|
||||
else {
|
||||
$query = "SELECT id FROM blog_articles WHERE archive IS NOT TRUE ORDER BY lastedit DESC";
|
||||
}
|
||||
$query = "SELECT content_versions.id AS version_id, * FROM contents INNER JOIN content_locales ON contents.id = content_locales.content_id INNER JOIN content_versions ON content_locales.id = content_versions.locale_id WHERE is_archive=FALSE ";
|
||||
if ($archive != 1)
|
||||
$query .= "AND is_public=TRUE ";
|
||||
$query .= "AND type='blog' ORDER BY update_date DESC";
|
||||
$query .= " LIMIT $1 OFFSET $2";
|
||||
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
@@ -246,9 +291,11 @@ class BlogArticles
|
||||
|
||||
for($i = 0; $i < pg_num_rows($result); $i++) {
|
||||
$row = pg_fetch_assoc($result, $i);
|
||||
$this->ids[$i] = $row['id'];
|
||||
$this->objs[$i] = new BlogArticle;
|
||||
$this->objs[$i]->populate($row);
|
||||
}
|
||||
}
|
||||
|
||||
/*****
|
||||
** Return the number of articles
|
||||
*****/
|
||||
@@ -258,13 +305,10 @@ class BlogArticles
|
||||
$con = pg_connect("host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass'])
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
if ($archive == 1) {
|
||||
// You just want one per url and the criteria is ORDER BY archives = true, time DES=C
|
||||
$query = "SELECT id FROM (SELECT a.id, a.lastedit , ROW_NUMBER() OVER (PARTITION BY a.url ORDER BY CASE WHEN a.archive IS TRUE THEN 1 ELSE 0 END, a.lastedit DESC) AS r FROM blog_articles AS a) AS b WHERE r = 1 ORDER BY lastedit DESC";
|
||||
}
|
||||
else {
|
||||
$query = "SELECT id FROM blog_articles WHERE archive IS NOT TRUE ORDER BY lastedit DESC";
|
||||
}
|
||||
$query = "SELECT content_versions.id AS version_id, * FROM contents INNER JOIN content_locales ON contents.id = content_locales.content_id INNER JOIN content_versions ON content_locales.id = content_versions.locale_id WHERE is_archive=FALSE ";
|
||||
if ($archive == 1)
|
||||
$query .= "AND is_public=TRUE ";
|
||||
$query .= "AND type='blog' ORDER BY update_date DESC";
|
||||
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
@@ -275,6 +319,7 @@ class BlogArticles
|
||||
|
||||
$this->number = pg_num_rows($result);
|
||||
}
|
||||
|
||||
/*****
|
||||
** Return the list of archived version of a blog article
|
||||
*****/
|
||||
@@ -284,7 +329,7 @@ class BlogArticles
|
||||
$con = pg_connect("host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass'])
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
$query = "SELECT id FROM blog_articles WHERE url=$1 ORDER BY lastedit DESC";
|
||||
$query = "SELECT content_versions.id AS version_id, * FROM contents INNER JOIN content_locales ON contents.id = content_locales.content_id INNER JOIN content_versions ON content_locales.id = content_versions.locale_id WHERE permalink=$1 AND type='blog' ORDER BY update_date DESC";
|
||||
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
@@ -297,12 +342,12 @@ class BlogArticles
|
||||
|
||||
for($i = 0; $i < $this->number; $i++) {
|
||||
$row = pg_fetch_assoc($result, $i);
|
||||
$this->ids[$i] = $row['id'];
|
||||
$this->objs[$i] = new BlogArticle;
|
||||
$this->objs[$i]->populate($row);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************
|
||||
***********************************************************
|
||||
**
|
||||
@@ -313,45 +358,60 @@ class BlogArticles
|
||||
|
||||
class BlogComment
|
||||
{
|
||||
public $id = 0;
|
||||
public $locale = NULL;
|
||||
public $lastedit = NULL;
|
||||
public $archive = NULL;
|
||||
public $content = NULL;
|
||||
public $id = NULL;
|
||||
public $version = 0;
|
||||
public $creation_date = NULL;
|
||||
public $update_date = NULL;
|
||||
public $author = NULL;
|
||||
public $article = NULL;
|
||||
public $is_public = NULL;
|
||||
public $is_archive = NULL;
|
||||
public $content = NULL;
|
||||
public $comment = NULL;
|
||||
public $locale = NULL;
|
||||
|
||||
|
||||
/*****
|
||||
** Connect to correct account using ID and stores its ID
|
||||
*****/
|
||||
public function checkID($id) {
|
||||
global $config;
|
||||
|
||||
$con = pg_connect("host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass'])
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
$query = "SELECT * FROM content_comments WHERE id=$1";
|
||||
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare1", array($id))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
pg_close($con);
|
||||
|
||||
if(pg_num_rows($result) == 1) {
|
||||
$row = pg_fetch_assoc($result);
|
||||
$this->populate($row);
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*****
|
||||
** Populate the object using its ID
|
||||
*****/
|
||||
public function populate() {
|
||||
global $config;
|
||||
|
||||
if($this->id != 0) {
|
||||
$con = pg_connect("host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass'])
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
$query = "SELECT * FROM blog_comments WHERE id=$1";
|
||||
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare1", array($this->id))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
pg_close($con);
|
||||
|
||||
$blog_comment = pg_fetch_assoc($result);
|
||||
|
||||
$this->locale = $blog_comment['locale'];
|
||||
$this->lastedit = $blog_comment['lastedit'];
|
||||
$this->archive = $blog_comment['archive'];
|
||||
$this->content = $blog_comment['content'];
|
||||
$this->author = $blog_comment['author'];
|
||||
$this->article = $blog_comment['article'];
|
||||
}
|
||||
else {
|
||||
die("Cannot populate a blog article without ID");
|
||||
}
|
||||
public function populate($row) {
|
||||
$this->id = $row['id'];
|
||||
$this->version = $row['version'];
|
||||
$this->creation_date = $row['creation_date'];
|
||||
$this->update_date = $row['update_date'];
|
||||
$this->author = $row['author'];
|
||||
$this->is_public = $row['is_public'];
|
||||
$this->is_archive = $row['is_archive'];
|
||||
$this->content = $row['content'];
|
||||
$this->comment = $row['comment'];
|
||||
$this->locale = $row['locale'];
|
||||
}
|
||||
|
||||
/*****
|
||||
@@ -363,14 +423,16 @@ class BlogComment
|
||||
$con = pg_connect("host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass'])
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
$query = "INSERT INTO blog_comments (content, lastedit, archive, locale, author, article) VALUES
|
||||
($1, $2, FALSE, $3, $4, $5)";
|
||||
$query = "INSERT INTO content_comments (version, creation_date, update_date, author, is_public, is_archive, content, comment, locale) VALUES
|
||||
('0', $1, $2, $3, TRUE, FALSE, $4, $5, $6) RETURNING id";
|
||||
|
||||
pg_prepare($con, "prepare2", $query)
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare2", array($this->content, date('r'), $this->locale, $this->author, $this->article))
|
||||
$result = pg_execute($con, "prepare1", array(date('r'), date('r'), $this->author, $this->content, $this->comment, $this->locale))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
$this->id = pg_fetch_assoc($result)['id'];
|
||||
|
||||
pg_close($con);
|
||||
}
|
||||
|
||||
@@ -384,11 +446,11 @@ class BlogComment
|
||||
$con = pg_connect("host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass'])
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
$query = "UPDATE blog_comments SET archive = TRUE WHERE id = $1";
|
||||
$query = "UPDATE content_comments SET is_public = FALSE WHERE id = $1";
|
||||
|
||||
pg_prepare($con, "prepare2", $query)
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare2", array($this->id))
|
||||
$result = pg_execute($con, "prepare1", array($this->id))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
pg_close($con);
|
||||
@@ -400,20 +462,20 @@ class BlogComment
|
||||
}
|
||||
|
||||
/*****
|
||||
** DeArchive a comment
|
||||
** Restore a comment
|
||||
*****/
|
||||
public function undelete() {
|
||||
public function restore() {
|
||||
global $config;
|
||||
global $user;
|
||||
|
||||
$con = pg_connect("host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass'])
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
$query = "UPDATE blog_comments SET archive = FALSE WHERE id = $1";
|
||||
$query = "UPDATE content_comments SET is_public = TRUE WHERE id = $1";
|
||||
|
||||
pg_prepare($con, "prepare2", $query)
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare2", array($this->id))
|
||||
$result = pg_execute($con, "prepare1", array($this->id))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
pg_close($con);
|
||||
@@ -425,18 +487,18 @@ class BlogComment
|
||||
}
|
||||
|
||||
/*****
|
||||
** Converts the Markdown content to HTML
|
||||
** Converts the Markdown comment to HTML
|
||||
*****/
|
||||
public function md2html() {
|
||||
$this->content_html = \Michelf\MarkdownExtra::defaultTransform($this->content);
|
||||
$this->comment_html = \Michelf\MarkdownExtra::defaultTransform($this->comment);
|
||||
}
|
||||
|
||||
/*****
|
||||
** Converts the Markdown content to text
|
||||
** Converts the Markdown comment to text
|
||||
*****/
|
||||
public function md2txt() {
|
||||
$this->md2html();
|
||||
$this->content_txt = strip_tags($this->content_html);
|
||||
$this->comment_txt = strip_tags($this->comment_html);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -451,7 +513,7 @@ class BlogComment
|
||||
|
||||
class BlogComments
|
||||
{
|
||||
public $ids = array();
|
||||
public $objs = array();
|
||||
public $number = NULL;
|
||||
|
||||
/*****
|
||||
@@ -463,10 +525,10 @@ class BlogComments
|
||||
$con = pg_connect("host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass'])
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
$query = "SELECT id FROM blog_comments WHERE article = $1 ";
|
||||
$query = "SELECT * FROM content_comments WHERE content = $1 ";
|
||||
if ($archive == 0)
|
||||
$query .= "AND archive IS FALSE ";
|
||||
$query .= "ORDER BY lastedit DESC";
|
||||
$query .= "AND is_archive IS FALSE AND is_public IS TRUE ";
|
||||
$query .= "ORDER BY update_date DESC";
|
||||
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
@@ -479,7 +541,8 @@ class BlogComments
|
||||
|
||||
for($i = 0; $i < pg_num_rows($result); $i++) {
|
||||
$row = pg_fetch_assoc($result, $i);
|
||||
$this->ids[$i] = $row['id'];
|
||||
$this->objs[$i] = new BlogComment;
|
||||
$this->objs[$i]->populate($row);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
98
models/d.locales.php
Executable file
@@ -0,0 +1,98 @@
|
||||
<?
|
||||
|
||||
namespace Kabano;
|
||||
|
||||
/**********************************************************
|
||||
***********************************************************
|
||||
**
|
||||
** This class is to manage Locale object
|
||||
**
|
||||
***********************************************************
|
||||
**********************************************************/
|
||||
|
||||
class Locale
|
||||
{
|
||||
public $name = 0;
|
||||
public $display_name = NULL;
|
||||
public $flag_name = NULL;
|
||||
|
||||
/*****
|
||||
** populate object using name
|
||||
*****/
|
||||
public function checkName($name) {
|
||||
global $config;
|
||||
|
||||
$con = pg_connect("host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass'])
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
$query = "SELECT * FROM locales WHERE name=$1";
|
||||
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare1", array($name))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
pg_close($con);
|
||||
|
||||
if(pg_num_rows($result) == 1) {
|
||||
$row = pg_fetch_assoc($result);
|
||||
$this->populate($row);
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*****
|
||||
** Populate the object using raw data from SQL
|
||||
*****/
|
||||
public function populate($row) {
|
||||
$this->name = $row['name'];
|
||||
$this->display_name = $row['display_name'];
|
||||
$this->flag_name = $row['flag_name'];
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************************
|
||||
***********************************************************
|
||||
**
|
||||
** This class is to manage Locales list object
|
||||
**
|
||||
***********************************************************
|
||||
**********************************************************/
|
||||
|
||||
class Locales
|
||||
{
|
||||
public $number = 0;
|
||||
public $objs = array();
|
||||
|
||||
/*****
|
||||
** Get all locales
|
||||
*****/
|
||||
public function getAll() {
|
||||
global $config;
|
||||
|
||||
$con = pg_connect("host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass'])
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
$query = "SELECT * FROM locales";
|
||||
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare1", array())
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
pg_close($con);
|
||||
|
||||
$this->number = pg_num_rows($result);
|
||||
|
||||
for($i = 0; $i < $this->number; $i++) {
|
||||
$locale = pg_fetch_assoc($result, $i);
|
||||
$this->objs[$i] = new Locale;
|
||||
$this->objs[$i]->populate($locale);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
179
models/d.poi.php
Executable file
@@ -0,0 +1,179 @@
|
||||
<?
|
||||
|
||||
namespace Kabano;
|
||||
|
||||
/**********************************************************
|
||||
***********************************************************
|
||||
**
|
||||
** This class is to manage a poi object
|
||||
**
|
||||
***********************************************************
|
||||
**********************************************************/
|
||||
|
||||
require_once($config['third_folder']."Md/MarkdownExtra.inc.php");
|
||||
require_once($config['includes_folder']."poi_types.struct.php");
|
||||
|
||||
|
||||
class Poi
|
||||
{
|
||||
public $poi_id = NULL;
|
||||
public $locale_id = NULL;
|
||||
public $source_id = NULL;
|
||||
public $version_id = NULL;
|
||||
public $is_public = NULL;
|
||||
public $permalink = NULL;
|
||||
public $creation_date = NULL;
|
||||
public $name = NULL;
|
||||
public $position = NULL;
|
||||
public $type = NULL;
|
||||
public $locale = NULL;
|
||||
public $source = NULL;
|
||||
public $remote_source_id = NULL;
|
||||
public $author = NULL;
|
||||
public $version = NULL;
|
||||
public $update_date = NULL;
|
||||
public $is_archive = NULL;
|
||||
public $alt_type = NULL;
|
||||
public $is_destroyed = NULL;
|
||||
public $alt_name = NULL;
|
||||
public $alt_position = NULL;
|
||||
public $parameters = NULL;
|
||||
|
||||
public $lat;
|
||||
public $lon;
|
||||
public $ele;
|
||||
|
||||
/*****
|
||||
** Checks if a page at this URL exists and return the ID
|
||||
*****/
|
||||
public function checkPermalink($permalink, $withArchive=0, $elementNb=0) {
|
||||
global $config;
|
||||
|
||||
$con = pg_connect("host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass'])
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
$query = "SELECT poi_versions.id AS version_id, * FROM pois INNER JOIN poi_locales ON pois.id = poi_locales.poi_id INNER JOIN poi_sources ON poi_locales.id = poi_sources.locale_id INNER JOIN poi_versions ON poi_sources.id = poi_versions.source_id WHERE permalink=$1";
|
||||
if($withArchive==0) {
|
||||
$query .= " AND is_archive=FALSE AND is_public=TRUE";
|
||||
}
|
||||
$query .= " ORDER BY update_date DESC LIMIT 1 OFFSET $2";
|
||||
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare1", array($permalink, $elementNb))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
pg_close($con);
|
||||
|
||||
if(pg_num_rows($result) == 1) {
|
||||
$row = pg_fetch_assoc($result);
|
||||
$this->populate($row);
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*****
|
||||
** Populate the object using its ID
|
||||
*****/
|
||||
public function populate($row) {
|
||||
$this->$poi_id = $row['poi_id'];
|
||||
$this->$locale_id = $row['locale_id'];
|
||||
$this->$source_id = $row['source_id'];
|
||||
$this->$version_id = $row['version_id'];
|
||||
$this->$is_public = $row['is_public'];
|
||||
$this->$permalink = $row['permalink'];
|
||||
$this->$creation_date = $row['creation_date'];
|
||||
$this->$name = $row['name'];
|
||||
$this->$position = $row['position'];
|
||||
$this->$type = $row['type'];
|
||||
$this->$locale = $row['locale'];
|
||||
$this->$source = $row['source'];
|
||||
$this->$remote_source_id = $row['remote_source_id'];
|
||||
$this->$author = $row['author'];
|
||||
$this->$version = $row['version'];
|
||||
$this->$update_date = $row['update_date'];
|
||||
$this->$is_archive = $row['is_archive'];
|
||||
$this->$alt_type = $row['alt_type'];
|
||||
$this->$is_destroyed = $row['is_destroyed'];
|
||||
$this->$alt_name = $row['alt_name'];
|
||||
$this->$alt_position = $row['alt_position'];
|
||||
$this->$parameters = $row['parameters'];
|
||||
}
|
||||
|
||||
/*****
|
||||
** Create a new poi, all field required except alt_*, *_id
|
||||
*****/
|
||||
public function insert() {
|
||||
global $config;
|
||||
global $user;
|
||||
|
||||
$con = pg_connect("host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass'])
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
// Because it is the first insert.
|
||||
$this->alt_type = $this->type;
|
||||
$this->alt_name = $this->name;
|
||||
$this->alt_position = $this->position;
|
||||
|
||||
$query = "INSERT INTO pois (is_public, permalink, creation_date, name, position, type) VALUES
|
||||
(TRUE, $1, $2, $3, $4, $5) RETURNING id";
|
||||
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare1", array($this->permalink, date('r'), $this->name, $this->position, $this->type))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
$this->poi_id = pg_fetch_assoc($result)['id'];
|
||||
|
||||
$query = "INSERT INTO poi_locales (locale, poi_id) VALUES
|
||||
($1, $2) RETURNING id";
|
||||
|
||||
pg_prepare($con, "prepare2", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare2", array($this->locale, $this->poi_id))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
$this->locale_id = pg_fetch_assoc($result)['id'];
|
||||
|
||||
$query = "INSERT INTO poi_sources (source, remote_source_id, author, locale_id) VALUES
|
||||
($1, $2, $3, $4) RETURNING id";
|
||||
|
||||
pg_prepare($con, "prepare3", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare3", array($this->source, $this->remote_source_id, $this->author, $this->locale_id))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
$this->source_id = pg_fetch_assoc($result)['id'];
|
||||
|
||||
$query = "INSERT INTO poi_versions (version, update_date, is_archive, alt_type, is_destroyed, alt_name, alt_position, parameters, source_id) VALUES
|
||||
('0', $1, FALSE, $2, $3, $4, $5, $6, $7) RETURNING id";
|
||||
|
||||
pg_prepare($con, "prepare4", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare4", array(date('r'), $this->alt_type, $this->is_destroyed, $this->alt_name, $this->alt_position, $this->parameters, $this->source_id))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
$this->version_id = pg_fetch_assoc($result)['id'];
|
||||
|
||||
$query = "INSERT INTO poi_contributors (poi, contributor) VALUES
|
||||
($1, $2)";
|
||||
|
||||
pg_prepare($con, "prepare5", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare5", array($this->source_id, $user->id))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
pg_close($con);
|
||||
|
||||
error_log(
|
||||
date('r')." \t".$user->name." (".$user->id.") \tINSERT \tCreate new poi '".$this->permalink."'\r\n",
|
||||
3,
|
||||
$config['logs_folder'].'wiki.log');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,5 +1,7 @@
|
||||
<?
|
||||
|
||||
namespace Kabano;
|
||||
|
||||
/**********************************************************
|
||||
***********************************************************
|
||||
**
|
||||
@@ -8,21 +10,40 @@
|
||||
***********************************************************
|
||||
**********************************************************/
|
||||
|
||||
require_once($config['models_folder']."d.locales.php");
|
||||
|
||||
// This array is related to the defined SQL enum, do not touch.
|
||||
$ranks = array(
|
||||
"administrator" => array(1000,"Administrateur", "red", "administrator"),
|
||||
"moderator" => array(800,"Modérateur", "orangered", "moderator"),
|
||||
"premium" => array(600,"Membre premium", "orange", "premium"),
|
||||
"registered" => array(400,"Utilisateur", "green", "registered"),
|
||||
"blocked" => array(200,"Membre archivé", "#aaa", "blocked"),
|
||||
"visitor" => array(0,"Visiteur", "black", "visitor")
|
||||
);
|
||||
|
||||
class User
|
||||
{
|
||||
private $id = 0;
|
||||
public $id = 0;
|
||||
public $name = NULL;
|
||||
private $version = NULL;
|
||||
public $version = NULL;
|
||||
public $email = NULL;
|
||||
private $password = NULL;
|
||||
public $password = NULL;
|
||||
public $website = NULL;
|
||||
private $is_avatar_present = NULL;
|
||||
private $is_archive = NULL;
|
||||
public $is_avatar_present = NULL;
|
||||
public $is_archive = NULL;
|
||||
public $rank = NULL;
|
||||
private $locale = NULL;
|
||||
private $timezone = NULL;
|
||||
private $visit_date = NULL;
|
||||
private $register_date = NULL;
|
||||
public $locale = NULL;
|
||||
public $timezone = NULL;
|
||||
public $visit_date = NULL;
|
||||
public $register_date = NULL;
|
||||
|
||||
public $date_format;
|
||||
public $datetime_format;
|
||||
public $datetimeshort_format;
|
||||
public $locale_obj;
|
||||
public $locale_loaded = false;
|
||||
|
||||
|
||||
/*****
|
||||
** Connect to correct account using ID and stores its ID
|
||||
@@ -80,7 +101,7 @@ class User
|
||||
/*****
|
||||
** Populate the object using raw data from SQL
|
||||
*****/
|
||||
private function populate($row) {
|
||||
public function populate($row) {
|
||||
$this->id = $row['id'];
|
||||
$this->name = $row['name'];
|
||||
$this->version = $row['version'];
|
||||
@@ -97,49 +118,34 @@ class User
|
||||
}
|
||||
|
||||
/*****
|
||||
** Populate the object using raw data from SQL
|
||||
** Simple return only functions
|
||||
*****/
|
||||
public function get_id() {
|
||||
return $this->id;
|
||||
public function get_rank() {
|
||||
global $ranks;
|
||||
|
||||
return '<span class="userrole" style="color: '.$ranks[$this->rank][2].';">'.$ranks[$this->rank][1].'</span>';
|
||||
}
|
||||
public function get_locale() {
|
||||
if( $this->locale_loaded) {
|
||||
return $this->locale_obj->display_name;
|
||||
}
|
||||
else {
|
||||
$this->locale_obj = new Locale;
|
||||
$this->locale_loaded = true;
|
||||
if( $this->locale_obj->checkName($this->locale) )
|
||||
return $this->locale_obj->display_name;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/*****
|
||||
** Returns true if user permissions are higher than $rank
|
||||
*****/
|
||||
public function rank_is_higher($rank) {
|
||||
if( $rank == 'blocked' ) {
|
||||
return true;
|
||||
}
|
||||
else if( $rank == 'visitor' ) {
|
||||
if( $this->rank == 'blocked' )
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
else if( $rank == 'registered' ) {
|
||||
if( $this->rank == 'blocked' || $this->rank == 'visitor' )
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
else if( $rank == 'premium' ) {
|
||||
if( $this->rank == 'premium' || $this->rank == 'moderator' || $this->rank == 'administrator' )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else if( $rank == 'moderator' ) {
|
||||
if( $this->rank == 'moderator' || $this->rank == 'administrator' )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
if( $this->rank == 'administrator' )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
public function rankIsHigher($rank) {
|
||||
global $ranks;
|
||||
|
||||
return $ranks[$this->rank][0] >= $ranks[$rank][0];
|
||||
}
|
||||
|
||||
/*****
|
||||
@@ -151,7 +157,7 @@ class User
|
||||
$con = pg_connect("host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass'])
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
$query = "SELECT id FROM users WHERE lower(name)=$1";
|
||||
$query = "SELECT * FROM users WHERE lower(name)=$1";
|
||||
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
@@ -165,8 +171,8 @@ class User
|
||||
}
|
||||
else {
|
||||
if(pg_num_rows($result)==1) {
|
||||
$user = pg_fetch_assoc($result);
|
||||
$this->id = $user['id'];
|
||||
$row = pg_fetch_assoc($result);
|
||||
$this->populate($row);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -181,7 +187,7 @@ class User
|
||||
$con = pg_connect("host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass'])
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
$query = "SELECT id FROM users WHERE lower(email)=$1";
|
||||
$query = "SELECT * FROM users WHERE lower(email)=$1";
|
||||
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
@@ -195,8 +201,8 @@ class User
|
||||
}
|
||||
else {
|
||||
if(pg_num_rows($result)==1) {
|
||||
$user = pg_fetch_assoc($result);
|
||||
$this->id = $user['id'];
|
||||
$row = pg_fetch_assoc($result);
|
||||
$this->populate($row);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -214,13 +220,13 @@ class User
|
||||
$this->visit_date = date('r');
|
||||
$this->register_date = date('r');
|
||||
$this->locale = "fr_FR";
|
||||
$this->timezone = "CEST";
|
||||
$this->timezone = "Europe/Paris";
|
||||
|
||||
$con = pg_connect("host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass'])
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
$query = "INSERT INTO users (name, version, email, password, website, is_avatar_present, is_archive, rank, locale, timezone, visit_date, register_date) VALUES
|
||||
($1, '0', $2, $3, $4, 'f', 'f', 'registered', $5, $6, $7, $8)";
|
||||
($1, '0', $2, $3, $4, FALSE, FALSE, 'registered', $5, $6, $7, $8)";
|
||||
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
@@ -240,22 +246,23 @@ class User
|
||||
$regex = '/^(https?:\/\/)/';
|
||||
if (!preg_match($regex, $this->website) && $this->website!="")
|
||||
$this->website = "http://".$this->website;
|
||||
$this->version++;
|
||||
|
||||
$con = pg_connect("host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass'])
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
if($this->password=='') {
|
||||
$query = "UPDATE users SET name = $1, avatar = $2, locale = $3, role = $4, mail = $5, website = $6 WHERE id = $7";
|
||||
$query = "UPDATE users SET version = $1, name = $2, is_avatar_present = $3, locale = $4, rank = $5, email = $6, website = $7, timezone = $8 WHERE id = $9";
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
pg_execute($con, "prepare1", array($this->name, $this->avatar, $this->locale, $this->role, $this->mail, $this->website, $this->id))
|
||||
pg_execute($con, "prepare1", array($this->version, $this->name, $this->is_avatar_present, $this->locale, $this->rank, $this->email, $this->website, $this->timezone, $this->id))
|
||||
or die ("Cannot execute statement\n");
|
||||
}
|
||||
else {
|
||||
$query = "UPDATE users SET name = $1, avatar = $2, locale = $3, role = $4, mail = $5, website = $6, password = $7 WHERE id = $8";
|
||||
$query = "UPDATE users SET name = $1, is_avatar_present = $2, locale = $3, rank = $4, email = $5, website = $6, password = $7, timezone = $8, version = $9 WHERE id = $10";
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
pg_execute($con, "prepare1", array($this->name, $this->avatar, $this->locale, $this->role, $this->mail, $this->website, $this->password, $this->id))
|
||||
pg_execute($con, "prepare1", array($this->name, $this->is_avatar_present, $this->locale, $this->rank, $this->email, $this->website, $this->password, $this->timezone, $this->version, $this->id))
|
||||
or die ("Cannot execute statement\n");
|
||||
}
|
||||
|
||||
@@ -279,17 +286,16 @@ class User
|
||||
$con = pg_connect("host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass'])
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
$query = "UPDATE users SET password = $1 WHERE mail = $2";
|
||||
$query = "UPDATE users SET password = $1 WHERE email = $2";
|
||||
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
pg_execute($con, "prepare1", array($this->password, $this->mail))
|
||||
pg_execute($con, "prepare1", array($this->password, $this->email))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
pg_close($con);
|
||||
|
||||
$this->availableMail();
|
||||
$this->populate();
|
||||
$this->availableMail(); // Retreive user data from email
|
||||
|
||||
$url = "http://".$_SERVER['SERVER_NAME'].$config['rel_root_folder'];
|
||||
|
||||
@@ -300,7 +306,7 @@ class User
|
||||
$message .= "Cordialement,<br>\r\n";
|
||||
$message .= "<br>\r\n";
|
||||
$message .= "L'équipe Kabano.<br>\r\n";
|
||||
$message .= "<small style='color:#777;'><i>Fait avec ♥ depuis Toulouse.</i></small><br>\r\n";
|
||||
$message .= "<small style='color:#777;'><i>Fait avec ♥ en Ariège.</i></small><br>\r\n";
|
||||
|
||||
$headers = 'From: '. $config['bot_mail'] . "\r\n" .
|
||||
'Reply-To: '. $config['bot_mail'] . "\r\n" .
|
||||
@@ -308,7 +314,7 @@ class User
|
||||
'MIME-Version: 1.0' . "\r\n" .
|
||||
'Content-type: text/html; charset=UTF-8' . "\r\n";
|
||||
|
||||
mail($this->mail, 'Kabano - Nouveau mot de passe', $message, $headers);
|
||||
mail($this->email, 'Kabano - Nouveau mot de passe', $message, $headers);
|
||||
}
|
||||
|
||||
/*****
|
||||
@@ -332,14 +338,6 @@ class User
|
||||
pg_close($con);
|
||||
}
|
||||
|
||||
/*****
|
||||
** Outputs the role of the user
|
||||
*****/
|
||||
public function role() {
|
||||
global $config;
|
||||
return '<span class="userrole" style="color: '.$config['roles'][$this->role][2].';">'.$config['roles'][$this->role][1].'</span>';
|
||||
}
|
||||
|
||||
/*****
|
||||
** Sends an email to the user from an other user
|
||||
*****/
|
||||
@@ -347,7 +345,6 @@ class User
|
||||
global $config;
|
||||
global $user;
|
||||
|
||||
$this->populate();
|
||||
$url = "http://".$_SERVER['SERVER_NAME'].$config['rel_root_folder'];
|
||||
|
||||
$message = "Bonjour ".$this->name.",<br>\r\n";
|
||||
@@ -361,13 +358,13 @@ class User
|
||||
$message .= "L'équipe Kabano.<br>\r\n";
|
||||
$message .= "<small style='color:#777;'><i>Fait avec ♥ depuis Toulouse.</i></small><br>\r\n";
|
||||
|
||||
$headers = 'From: '. $from->mail . "\r\n" .
|
||||
'Reply-To: '. $from->mail . "\r\n" .
|
||||
$headers = 'From: '. $from->email . "\r\n" .
|
||||
'Reply-To: '. $from->email . "\r\n" .
|
||||
'X-Mailer: PHP/' . phpversion() . "\r\n" .
|
||||
'MIME-Version: 1.0' . "\r\n" .
|
||||
'Content-type: text/html; charset=UTF-8' . "\r\n";
|
||||
|
||||
mail($this->mail, 'Kabano - Nouveau message privé', $message, $headers);
|
||||
mail($this->email, 'Kabano - Nouveau message privé', $message, $headers);
|
||||
|
||||
error_log(
|
||||
date('r')." \t".$user->name." (".$user->id.") \tMAIL \tMail sent to ".$this->name." (".$this->id.")\r\n",
|
||||
@@ -397,7 +394,7 @@ function randomPassword() {
|
||||
|
||||
class Users
|
||||
{
|
||||
public $ids = array();
|
||||
public $objs = array();
|
||||
public $number = NULL;
|
||||
|
||||
/*****
|
||||
@@ -435,9 +432,9 @@ class Users
|
||||
$orderbysafe=$orders[$key];
|
||||
|
||||
if ($order == 'ASC')
|
||||
$query = "SELECT id FROM users ORDER BY $orderbysafe ASC LIMIT $1 OFFSET $2";
|
||||
$query = "SELECT * FROM users ORDER BY $orderbysafe ASC LIMIT $1 OFFSET $2";
|
||||
else
|
||||
$query = "SELECT id FROM users ORDER BY $orderbysafe DESC LIMIT $1 OFFSET $2";
|
||||
$query = "SELECT * FROM users ORDER BY $orderbysafe DESC LIMIT $1 OFFSET $2";
|
||||
|
||||
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
@@ -449,7 +446,8 @@ class Users
|
||||
|
||||
for($i = 0; $i < pg_num_rows($result); $i++) {
|
||||
$row = pg_fetch_assoc($result, $i);
|
||||
$this->ids[$i] = $row['id'];
|
||||
$this->objs[$i] = new User;
|
||||
$this->objs[$i]->populate($row);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?
|
||||
|
||||
namespace Kabano;
|
||||
|
||||
/**********************************************************
|
||||
***********************************************************
|
||||
**
|
||||
@@ -12,30 +14,34 @@ require_once($config['third_folder']."Md/MarkdownExtra.inc.php");
|
||||
|
||||
class WikiPage
|
||||
{
|
||||
private $id = 0;
|
||||
private $permalink = 0;
|
||||
private $version = 0;
|
||||
private $locale = NULL;
|
||||
private $creation_date = NULL;
|
||||
private $update_date = NULL;
|
||||
private $author = NULL;
|
||||
private $is_public = NULL;
|
||||
private $is_archive = NULL;
|
||||
private $is_commentable = NULL;
|
||||
private $type = "wiki";
|
||||
public $content_id = NULL;
|
||||
public $locale_id = NULL;
|
||||
public $version_id = NULL;
|
||||
public $permalink = NULL;
|
||||
public $version = 0;
|
||||
public $locale = NULL;
|
||||
public $creation_date = NULL;
|
||||
public $update_date = NULL;
|
||||
public $author = NULL;
|
||||
public $is_public = NULL;
|
||||
public $is_archive = NULL;
|
||||
public $is_commentable = NULL;
|
||||
public $type = "wiki";
|
||||
public $name = NULL;
|
||||
public $content = NULL;
|
||||
|
||||
public $content_html;
|
||||
|
||||
/*****
|
||||
** Checks if a page at this URL exists and return the populated element
|
||||
** Checks if a page at this ermalink exists and return the populated element
|
||||
*****/
|
||||
public function checkUrl($url, $withArchive=0, $elementNb=0) {
|
||||
public function checkPermalink($permalink, $withArchive=0, $elementNb=0) {
|
||||
global $config;
|
||||
|
||||
$con = pg_connect("host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass'])
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
$query = "SELECT * FROM contents WHERE permalink=$1";
|
||||
$query = "SELECT content_versions.id AS version_id, * FROM contents INNER JOIN content_locales ON contents.id = content_locales.content_id INNER JOIN content_versions ON content_locales.id = content_versions.locale_id WHERE permalink=$1 AND type='wiki'";
|
||||
if($withArchive==0) {
|
||||
$query .= " AND is_archive=FALSE AND is_public=TRUE";
|
||||
}
|
||||
@@ -43,7 +49,7 @@ class WikiPage
|
||||
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare1", array($url, $elementNb))
|
||||
$result = pg_execute($con, "prepare1", array($permalink, $elementNb))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
pg_close($con);
|
||||
@@ -61,7 +67,10 @@ class WikiPage
|
||||
/*****
|
||||
** Populate the object using raw data from SQL
|
||||
*****/
|
||||
private function populate($row) {
|
||||
public function populate($row) {
|
||||
$this->content_id = $row['content_id'];
|
||||
$this->locale_id = $row['locale_id'];
|
||||
$this->version_id = $row['version_id'];
|
||||
$this->permalink = $row['permalink'];
|
||||
$this->version = $row['version'];
|
||||
$this->locale = $row['locale'];
|
||||
@@ -76,50 +85,50 @@ class WikiPage
|
||||
$this->content = $row['content'];
|
||||
}
|
||||
|
||||
/*****
|
||||
** Return archive status
|
||||
*****/
|
||||
public function is_archive() {
|
||||
return $this->is_archive;
|
||||
}
|
||||
|
||||
/*****
|
||||
** Return archive status
|
||||
*****/
|
||||
public function update_date() {
|
||||
return $this->update_date;
|
||||
}
|
||||
|
||||
/*****
|
||||
** Edit a page by archiving the current one and inserting a new one ID
|
||||
*****/
|
||||
public function update() {
|
||||
global $config;
|
||||
global $user;
|
||||
|
||||
|
||||
if($this->content_id == 0 || $this->locale_id == 0 || $this->version_id == 0)
|
||||
die("Cannot update entry without giving ID");
|
||||
|
||||
$this->version++;
|
||||
|
||||
$con = pg_connect("host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass'])
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
$query = "UPDATE wiki SET archive = TRUE WHERE url = $1";
|
||||
$query = "UPDATE content_versions SET is_archive = TRUE WHERE locale_id = $1";
|
||||
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare1", array($this->url))
|
||||
$result = pg_execute($con, "prepare1", array($this->locale_id))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
|
||||
$query = "INSERT INTO wiki (url, title, content, lastedit, archive, locale) VALUES
|
||||
($1, $2, $3, $4, FALSE, $5)";
|
||||
$query = "INSERT INTO content_versions (version, update_date, is_archive, name, content, locale_id) VALUES
|
||||
($1, $2, FALSE, $3, $4, $5) RETURNING id";
|
||||
|
||||
pg_prepare($con, "prepare2", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare2", array($this->url, $this->title, $this->content, date('r'), $this->locale))
|
||||
$result = pg_execute($con, "prepare2", array($this->version, date('r'), $this->name, $this->content, $this->locale_id))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
$this->version_id = pg_fetch_assoc($result)['id'];
|
||||
|
||||
$query = "INSERT INTO content_contributors (content, contributor) VALUES
|
||||
($1, $2) ON CONFLICT (content, contributor) DO NOTHING";
|
||||
|
||||
pg_prepare($con, "prepare3", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare3", array($this->locale_id, $user->id))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
pg_close($con);
|
||||
|
||||
error_log(
|
||||
date('r')." \t".$user->name." (".$user->id.") \tUPDATE \tEdit wiki page '".$this->url."'\r\n",
|
||||
date('r')." \t".$user->name." (".$user->id.") \tUPDATE \tEdit wiki page '".$this->permalink."'\r\n",
|
||||
3,
|
||||
$config['logs_folder'].'wiki.log');
|
||||
}
|
||||
@@ -134,23 +143,48 @@ class WikiPage
|
||||
$con = pg_connect("host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass'])
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
$query = "UPDATE wiki SET archive = TRUE WHERE url = $1";
|
||||
$query = "UPDATE contents SET is_public=FALSE WHERE permalink=$1 AND type='wiki'";
|
||||
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare1", array($this->url))
|
||||
$result = pg_execute($con, "prepare1", array($this->permalink))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
pg_close($con);
|
||||
|
||||
error_log(
|
||||
date('r')." \t".$user->name." (".$user->id.") \tDELETE \tArchive wiki page '".$this->url."'\r\n",
|
||||
date('r')." \t".$user->name." (".$user->id.") \tDELETE \tUnpublish wiki page '".$this->permalink."'\r\n",
|
||||
3,
|
||||
$config['logs_folder'].'wiki.log');
|
||||
}
|
||||
|
||||
/*****
|
||||
** Create a page by archiving the current one and inserting a new one ID
|
||||
** Restore a page from unpublishing it
|
||||
*****/
|
||||
public function restore() {
|
||||
global $config;
|
||||
global $user;
|
||||
|
||||
$con = pg_connect("host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass'])
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
$query = "UPDATE contents SET is_public=TRUE WHERE permalink=$1 AND type='wiki'";
|
||||
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare1", array($this->permalink))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
pg_close($con);
|
||||
|
||||
error_log(
|
||||
date('r')." \t".$user->name." (".$user->id.") \tRESTORE \tPublish wiki page '".$this->permalink."'\r\n",
|
||||
3,
|
||||
$config['logs_folder'].'wiki.log');
|
||||
}
|
||||
|
||||
/*****
|
||||
** Create a new page, fails if permalink already exists
|
||||
*****/
|
||||
public function insert() {
|
||||
global $config;
|
||||
@@ -159,18 +193,48 @@ class WikiPage
|
||||
$con = pg_connect("host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass'])
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
$query = "INSERT INTO wiki (url, title, content, lastedit, archive, locale) VALUES
|
||||
($1, $2, $3, $4, FALSE, $5)";
|
||||
$query = "INSERT INTO contents (permalink, creation_date, is_public, is_commentable, type) VALUES
|
||||
($1, $2, TRUE, FALSE, 'wiki') RETURNING id";
|
||||
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare1", array($this->permalink, date('r')))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
$this->content_id = pg_fetch_assoc($result)['id'];
|
||||
|
||||
$query = "INSERT INTO content_locales (content_id, locale, author) VALUES
|
||||
($1, $2, $3) RETURNING id";
|
||||
|
||||
pg_prepare($con, "prepare2", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare2", array($this->url, $this->title, $this->content, date('r'), $this->locale))
|
||||
$result = pg_execute($con, "prepare2", array($this->content_id, $this->locale, $user->id))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
$this->locale_id = pg_fetch_assoc($result)['id'];
|
||||
|
||||
$query = "INSERT INTO content_versions (version, update_date, is_archive, name, content, locale_id) VALUES
|
||||
('0', $1, FALSE, $2, $3, $4) RETURNING id";
|
||||
|
||||
pg_prepare($con, "prepare3", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare3", array(date('r'), $this->name, $this->content, $this->locale_id))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
$this->version_id = pg_fetch_assoc($result)['id'];
|
||||
|
||||
$query = "INSERT INTO content_contributors (content, contributor) VALUES
|
||||
($1, $2)";
|
||||
|
||||
pg_prepare($con, "prepare4", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
$result = pg_execute($con, "prepare4", array($this->locale_id, $user->id))
|
||||
or die ("Cannot execute statement\n");
|
||||
|
||||
pg_close($con);
|
||||
|
||||
error_log(
|
||||
date('r')." \t".$user->name." (".$user->id.") \tINSERT \tCreate new wiki page '".$this->url."'\r\n",
|
||||
date('r')." \t".$user->name." (".$user->id.") \tINSERT \tCreate new wiki page '".$this->permalink."'\r\n",
|
||||
3,
|
||||
$config['logs_folder'].'wiki.log');
|
||||
}
|
||||
@@ -183,9 +247,17 @@ class WikiPage
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************************
|
||||
***********************************************************
|
||||
**
|
||||
** This class is to manage a wiki page object
|
||||
**
|
||||
***********************************************************
|
||||
**********************************************************/
|
||||
|
||||
class WikiPages
|
||||
{
|
||||
public $ids = array();
|
||||
public $objs = array();
|
||||
public $number = NULL;
|
||||
|
||||
/*****
|
||||
@@ -197,7 +269,7 @@ class WikiPages
|
||||
$con = pg_connect("host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass'])
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
$query = "SELECT id FROM wiki WHERE url=$1 ORDER BY lastedit DESC";
|
||||
$query = "SELECT content_versions.id AS version_id, * FROM contents INNER JOIN content_locales ON contents.id = content_locales.content_id INNER JOIN content_versions ON content_locales.id = content_versions.locale_id WHERE permalink=$1 AND type='wiki' ORDER BY update_date DESC";
|
||||
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
@@ -210,7 +282,8 @@ class WikiPages
|
||||
|
||||
for($i = 0; $i < $this->number; $i++) {
|
||||
$row = pg_fetch_assoc($result, $i);
|
||||
$this->ids[$i] = $row['id'];
|
||||
$this->objs[$i] = new WikiPage;
|
||||
$this->objs[$i]->populate($row);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 7.2 KiB |
@@ -1,119 +0,0 @@
|
||||
COMMENT ON DATABASE kabano IS 'Kabano database';
|
||||
|
||||
|
||||
|
||||
-- SEQUENCES
|
||||
|
||||
CREATE SEQUENCE blog_articles_id_seq
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1;
|
||||
ALTER TABLE blog_articles_id_seq OWNER TO kabano;
|
||||
|
||||
|
||||
CREATE SEQUENCE blog_comments_id_seq
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1;
|
||||
ALTER TABLE blog_comments_id_seq OWNER TO kabano;
|
||||
|
||||
|
||||
CREATE SEQUENCE users_id_seq
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1;
|
||||
ALTER TABLE users_id_seq OWNER TO kabano;
|
||||
|
||||
|
||||
CREATE SEQUENCE wiki_id_seq
|
||||
START WITH 5
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1;
|
||||
ALTER TABLE wiki_id_seq OWNER TO kabano;
|
||||
|
||||
|
||||
|
||||
-- TABLES
|
||||
|
||||
CREATE TABLE blog_articles (
|
||||
id integer DEFAULT nextval('blog_articles_id_seq'::regclass) NOT NULL,
|
||||
url text,
|
||||
title text,
|
||||
content text,
|
||||
lastedit timestamp without time zone,
|
||||
archive boolean DEFAULT false NOT NULL,
|
||||
locale text,
|
||||
comments boolean DEFAULT true NOT NULL,
|
||||
author integer
|
||||
);
|
||||
ALTER TABLE blog_articles OWNER TO kabano;
|
||||
COMMENT ON TABLE blog_articles IS 'This table contains all archived and visible blog articles';
|
||||
ALTER TABLE ONLY blog_articles
|
||||
ADD CONSTRAINT blog_articles_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
CREATE TABLE blog_comments (
|
||||
id integer DEFAULT nextval('blog_comments_id_seq'::regclass) NOT NULL,
|
||||
article integer,
|
||||
lastedit timestamp without time zone,
|
||||
author integer,
|
||||
locale text,
|
||||
content text,
|
||||
archive boolean DEFAULT false NOT NULL
|
||||
);
|
||||
ALTER TABLE blog_comments OWNER TO kabano;
|
||||
COMMENT ON TABLE blog_comments IS 'This table contains all blog comments';
|
||||
ALTER TABLE ONLY blog_comments
|
||||
ADD CONSTRAINT blog_comments_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
CREATE TABLE users (
|
||||
id integer DEFAULT nextval('users_id_seq'::regclass) NOT NULL,
|
||||
name text,
|
||||
password text,
|
||||
locale text,
|
||||
lastlogin timestamp without time zone,
|
||||
mail text,
|
||||
website text,
|
||||
role integer DEFAULT 400 NOT NULL,
|
||||
avatar boolean DEFAULT false NOT NULL
|
||||
);
|
||||
ALTER TABLE users OWNER TO kabano;
|
||||
COMMENT ON TABLE users IS 'This user database contains all users informations';
|
||||
ALTER TABLE ONLY users
|
||||
ADD CONSTRAINT users_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
CREATE TABLE wiki (
|
||||
id integer DEFAULT nextval('wiki_id_seq'::regclass) NOT NULL,
|
||||
url text,
|
||||
title text,
|
||||
content text,
|
||||
lastedit timestamp without time zone,
|
||||
archive boolean DEFAULT false NOT NULL,
|
||||
locale text
|
||||
);
|
||||
ALTER TABLE wiki OWNER TO kabano;
|
||||
COMMENT ON TABLE wiki IS 'This wiki database contains all archived and displayed wiki pages';
|
||||
ALTER TABLE ONLY wiki
|
||||
ADD CONSTRAINT wiki_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
|
||||
-- Foreign keys
|
||||
|
||||
ALTER TABLE ONLY blog_articles
|
||||
ADD CONSTRAINT blog_articles_author_fkey FOREIGN KEY (author) REFERENCES users(id);
|
||||
ALTER TABLE ONLY blog_comments
|
||||
ADD CONSTRAINT blog_comments_article_fkey FOREIGN KEY (article) REFERENCES blog_articles(id);
|
||||
ALTER TABLE ONLY blog_comments
|
||||
ADD CONSTRAINT blog_comments_author_fkey FOREIGN KEY (author) REFERENCES users(id);
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="140" height="46" viewBox="0 0 140 46">
|
||||
<path id="kabanologomount" d="M40.652.398l-16.007 25.19 2.832-8.63-5.274-9.612L0 46h67.363l-4.455-7.607h-2.32L63.873 44H3.457l18.707-32.568 3.143 5.728-5.06 15.402.948.313.846.537L40.585 4.236l10.238 17.48v-3.954L40.652.398z" fill="#fff"/>
|
||||
<path id="kabanologomountbgtext" d="M50.822 17.762v3.955l9.766 16.676h2.32l-12.086-20.63z" fill="#fff"/>
|
||||
<path id="kabanologotext" d="M58.31 16.105h-2.375V33.33h2.375V16.105zm9.375 0h-2.7l-6.55 8.025 6.8 9.2h2.925l-7-9.35 6.525-7.875zM79.284 30.255V24.23c0-2.75-1.45-4.375-4.625-4.375-1.476 0-2.926.3-4.55.9l.574 1.675c1.35-.45 2.575-.7 3.55-.7 1.825 0 2.75.7 2.75 2.6v.975H74.96c-3.676 0-5.8 1.525-5.8 4.35 0 2.35 1.574 3.975 4.2 3.975 1.6 0 3-.6 3.924-1.975.4 1.3 1.25 1.825 2.575 1.975l.524-1.6c-.675-.25-1.1-.625-1.1-1.775zm-5.4 1.65c-1.5 0-2.275-.825-2.275-2.375 0-1.8 1.224-2.7 3.65-2.7h1.724v3.025c-.75 1.375-1.75 2.05-3.1 2.05zM90.057 19.855c-1.6 0-2.825.725-3.725 1.95V14.58l-2.3.275V33.33h2.025l.225-1.45c.9 1.1 2.05 1.75 3.5 1.75 3.2 0 5.175-2.775 5.175-6.9 0-4.4-1.925-6.875-4.9-6.875zm-.825 11.95c-1.175 0-2.225-.725-2.9-1.775v-6.3c.675-1.05 1.625-2.05 3.075-2.05 1.85 0 3.075 1.3 3.075 5.05 0 3.6-1.325 5.075-3.25 5.075zM107.75 30.255V24.23c0-2.75-1.45-4.375-4.624-4.375-1.475 0-2.925.3-4.55.9l.575 1.675c1.35-.45 2.576-.7 3.55-.7 1.826 0 2.75.7 2.75 2.6v.975h-2.024c-3.675 0-5.8 1.525-5.8 4.35 0 2.35 1.575 3.975 4.2 3.975 1.6 0 3-.6 3.925-1.975.4 1.3 1.25 1.825 2.576 1.975l.525-1.6c-.674-.25-1.1-.625-1.1-1.775zm-5.4 1.65c-1.5 0-2.274-.825-2.274-2.375 0-1.8 1.225-2.7 3.65-2.7h1.725v3.025c-.75 1.375-1.75 2.05-3.1 2.05zM118.7 19.855c-1.726 0-3.126.9-4.026 2.25l-.2-1.95H112.5V33.33h2.3v-9.35c.874-1.4 1.874-2.325 3.35-2.325 1.274 0 2.074.575 2.074 2.55v9.125h2.3v-9.45c0-2.5-1.4-4.025-3.825-4.025zM132.097 19.855c-3.75 0-5.9 2.825-5.9 6.9 0 4.175 2.125 6.875 5.875 6.875 3.725 0 5.875-2.825 5.875-6.9 0-4.175-2.1-6.875-5.85-6.875zm0 1.85c2.175 0 3.375 1.6 3.375 5.025 0 3.45-1.2 5.05-3.4 5.05s-3.4-1.6-3.4-5.025c0-3.45 1.225-5.05 3.425-5.05z" fill="#fff"/>
|
||||
<path id="kabanologobase" d="M67.364 46l-2.344-4H2.3L0 46z" fill="#fff"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.1 KiB |
217
src/logo.svg
@@ -1,217 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="180"
|
||||
height="50"
|
||||
viewBox="0 0 180 50.000001"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="logo.svg"
|
||||
inkscape:export-filename="/home/leo/public_html/Kabano/views/img/header3.png"
|
||||
inkscape:export-xdpi="84.599998"
|
||||
inkscape:export-ydpi="84.599998">
|
||||
<defs
|
||||
id="defs4">
|
||||
<linearGradient
|
||||
id="linearGradient4272"
|
||||
osb:paint="solid">
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop4274" />
|
||||
</linearGradient>
|
||||
<filter
|
||||
style="color-interpolation-filters:sRGB"
|
||||
inkscape:label="Invert"
|
||||
id="filter4242">
|
||||
<feColorMatrix
|
||||
type="hueRotate"
|
||||
values="180"
|
||||
result="color1"
|
||||
id="feColorMatrix4244" />
|
||||
<feColorMatrix
|
||||
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 -0.21 -0.72 -0.07 2 0 "
|
||||
result="fbSourceGraphic"
|
||||
id="feColorMatrix4246" />
|
||||
<feColorMatrix
|
||||
result="fbSourceGraphicAlpha"
|
||||
in="fbSourceGraphic"
|
||||
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
|
||||
id="feColorMatrix4248" />
|
||||
<feColorMatrix
|
||||
id="feColorMatrix4250"
|
||||
type="hueRotate"
|
||||
values="180"
|
||||
result="color1"
|
||||
in="fbSourceGraphic" />
|
||||
<feColorMatrix
|
||||
id="feColorMatrix4252"
|
||||
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 -0.21 -0.72 -0.07 2 0 "
|
||||
result="fbSourceGraphic" />
|
||||
<feColorMatrix
|
||||
result="fbSourceGraphicAlpha"
|
||||
in="fbSourceGraphic"
|
||||
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
|
||||
id="feColorMatrix4254" />
|
||||
<feColorMatrix
|
||||
id="feColorMatrix4256"
|
||||
type="hueRotate"
|
||||
values="180"
|
||||
result="color1"
|
||||
in="fbSourceGraphic" />
|
||||
<feColorMatrix
|
||||
id="feColorMatrix4258"
|
||||
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 -0.21 -0.72 -0.07 2 0 "
|
||||
result="color2" />
|
||||
</filter>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4272"
|
||||
id="linearGradient4276"
|
||||
x1="463.53574"
|
||||
y1="598.1972"
|
||||
x2="579.35376"
|
||||
y2="598.1972"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<filter
|
||||
style="color-interpolation-filters:sRGB"
|
||||
inkscape:label="Invert"
|
||||
id="filter4278">
|
||||
<feColorMatrix
|
||||
type="hueRotate"
|
||||
values="180"
|
||||
result="color1"
|
||||
id="feColorMatrix4280" />
|
||||
<feColorMatrix
|
||||
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 -0.21 -0.72 -0.07 2 0 "
|
||||
result="color2"
|
||||
id="feColorMatrix4282" />
|
||||
</filter>
|
||||
<filter
|
||||
style="color-interpolation-filters:sRGB"
|
||||
inkscape:label="Invert"
|
||||
id="filter4284">
|
||||
<feColorMatrix
|
||||
type="hueRotate"
|
||||
values="180"
|
||||
result="color1"
|
||||
id="feColorMatrix4286" />
|
||||
<feColorMatrix
|
||||
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 -0.21 -0.72 -0.07 2 0 "
|
||||
result="color2"
|
||||
id="feColorMatrix4288" />
|
||||
</filter>
|
||||
<filter
|
||||
style="color-interpolation-filters:sRGB"
|
||||
inkscape:label="Invert"
|
||||
id="filter4290">
|
||||
<feColorMatrix
|
||||
type="hueRotate"
|
||||
values="180"
|
||||
result="color1"
|
||||
id="feColorMatrix4292" />
|
||||
<feColorMatrix
|
||||
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 -0.21 -0.72 -0.07 2 0 "
|
||||
result="color2"
|
||||
id="feColorMatrix4294" />
|
||||
</filter>
|
||||
<filter
|
||||
style="color-interpolation-filters:sRGB"
|
||||
inkscape:label="Invert"
|
||||
id="filter4296">
|
||||
<feColorMatrix
|
||||
type="hueRotate"
|
||||
values="180"
|
||||
result="color1"
|
||||
id="feColorMatrix4298" />
|
||||
<feColorMatrix
|
||||
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 -0.21 -0.72 -0.07 2 0 "
|
||||
result="color2"
|
||||
id="feColorMatrix4300" />
|
||||
</filter>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#8d9894"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="2.8"
|
||||
inkscape:cx="67.921239"
|
||||
inkscape:cy="36.484649"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="745"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="23"
|
||||
inkscape:window-maximized="1"
|
||||
units="px" />
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Calque 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-1002.3622)">
|
||||
<g
|
||||
id="g4356"
|
||||
transform="matrix(1.1515318,0,0,1.1657795,-6.3342807,-170.57805)">
|
||||
<path
|
||||
sodipodi:nodetypes="cccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4260"
|
||||
d="m 6.4114189,1048.2461 21.0000001,-34.6129 7,11.2258 12.00019,-17.7743 24.114,41.161 z"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.72617102;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4278)" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4264"
|
||||
d="m 34.411419,1024.859 -14,23.3871"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.72617102;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4284)" />
|
||||
<path
|
||||
sodipodi:nodetypes="cccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4335"
|
||||
d="m 46.411609,1007.0847 0,41.161 24.114,0 z"
|
||||
style="opacity:0.65;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
</g>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter4296)"
|
||||
x="54.34478"
|
||||
y="1041.3604"
|
||||
id="text4268"
|
||||
sodipodi:linespacing="125%"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan4270"
|
||||
x="54.34478"
|
||||
y="1041.3604"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35px;font-family:'Fira Sans';-inkscape-font-specification:'Fira Sans';stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"><tspan
|
||||
style="font-weight:bold"
|
||||
id="tspan4333">K</tspan>abano</tspan></text>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 7.5 KiB |
102
src/logo2.svg
@@ -1,102 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="140"
|
||||
height="46"
|
||||
viewBox="0 0 140 46.000001"
|
||||
id="svg4170"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="logo2.svg">
|
||||
<defs
|
||||
id="defs4172" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.6568543"
|
||||
inkscape:cx="63.834622"
|
||||
inkscape:cy="18.257409"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="745"
|
||||
inkscape:window-x="1280"
|
||||
inkscape:window-y="23"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata4175">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Calque 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-1006.3622)">
|
||||
<path
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="M 50.822266 17.761719 L 50.822266 21.716797 L 60.587891 38.392578 L 62.908203 38.392578 L 50.822266 17.761719 z "
|
||||
id="path4884"
|
||||
transform="translate(0,1006.3622)" />
|
||||
<path
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="M 40.652344 0.3984375 L 24.644531 25.587891 L 27.476562 16.958984 L 22.203125 7.3457031 L 0 46 L 67.363281 46 L 62.908203 38.392578 L 60.587891 38.392578 L 63.873047 44 L 3.4570312 44 L 22.164062 11.431641 L 25.306641 17.160156 L 20.248047 32.5625 L 21.195312 32.875 L 22.041016 33.412109 L 40.583984 4.2363281 L 50.822266 21.716797 L 50.822266 17.761719 L 40.652344 0.3984375 z "
|
||||
id="path3349"
|
||||
transform="translate(0,1006.3622)" />
|
||||
<g
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
id="text4151">
|
||||
<path
|
||||
d="m 58.309608,1022.4674 -2.375,0 0,17.225 2.375,0 0,-17.225 z m 9.375,0 -2.7,0 -6.55,8.025 6.8,9.2 2.925,0 -7,-9.35 6.525,-7.875 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25px;font-family:'Fira Sans';-inkscape-font-specification:'Fira Sans';fill:#ffffff;fill-opacity:1"
|
||||
id="path4887" />
|
||||
<path
|
||||
d="m 79.284218,1036.6174 0,-6.025 c 0,-2.75 -1.45,-4.375 -4.625,-4.375 -1.475,0 -2.925,0.3 -4.55,0.9 l 0.575,1.675 c 1.35,-0.45 2.575,-0.7 3.55,-0.7 1.825,0 2.75,0.7 2.75,2.6 l 0,0.975 -2.025,0 c -3.675,0 -5.8,1.525 -5.8,4.35 0,2.35 1.575,3.975 4.2,3.975 1.6,0 3,-0.6 3.925,-1.975 0.4,1.3 1.25,1.825 2.575,1.975 l 0.525,-1.6 c -0.675,-0.25 -1.1,-0.625 -1.1,-1.775 z m -5.4,1.65 c -1.5,0 -2.275,-0.825 -2.275,-2.375 0,-1.8 1.225,-2.7 3.65,-2.7 l 1.725,0 0,3.025 c -0.75,1.375 -1.75,2.05 -3.1,2.05 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25px;font-family:'Fira Sans';-inkscape-font-specification:'Fira Sans';fill:#ffffff;fill-opacity:1"
|
||||
id="path4889" />
|
||||
<path
|
||||
d="m 90.057265,1026.2174 c -1.6,0 -2.825,0.725 -3.725,1.95 l 0,-7.225 -2.3,0.275 0,18.475 2.025,0 0.225,-1.45 c 0.9,1.1 2.05,1.75 3.5,1.75 3.2,0 5.175,-2.775 5.175,-6.9 0,-4.4 -1.925,-6.875 -4.9,-6.875 z m -0.825,11.95 c -1.175,0 -2.225,-0.725 -2.9,-1.775 l 0,-6.3 c 0.675,-1.05 1.625,-2.05 3.075,-2.05 1.85,0 3.075,1.3 3.075,5.05 0,3.6 -1.325,5.075 -3.25,5.075 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25px;font-family:'Fira Sans';-inkscape-font-specification:'Fira Sans';fill:#ffffff;fill-opacity:1"
|
||||
id="path4891" />
|
||||
<path
|
||||
d="m 107.75101,1036.6174 0,-6.025 c 0,-2.75 -1.45,-4.375 -4.625,-4.375 -1.475,0 -2.925,0.3 -4.549995,0.9 l 0.575,1.675 c 1.349995,-0.45 2.574995,-0.7 3.549995,-0.7 1.825,0 2.75,0.7 2.75,2.6 l 0,0.975 -2.025,0 c -3.674995,0 -5.799995,1.525 -5.799995,4.35 0,2.35 1.575,3.975 4.199995,3.975 1.6,0 3,-0.6 3.925,-1.975 0.4,1.3 1.25,1.825 2.575,1.975 l 0.525,-1.6 c -0.675,-0.25 -1.1,-0.625 -1.1,-1.775 z m -5.4,1.65 c -1.5,0 -2.275,-0.825 -2.275,-2.375 0,-1.8 1.225,-2.7 3.65,-2.7 l 1.725,0 0,3.025 c -0.75,1.375 -1.75,2.05 -3.1,2.05 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25px;font-family:'Fira Sans';-inkscape-font-specification:'Fira Sans';fill:#ffffff;fill-opacity:1"
|
||||
id="path4893" />
|
||||
<path
|
||||
d="m 118.69906,1026.2174 c -1.725,0 -3.125,0.9 -4.025,2.25 l -0.2,-1.95 -1.975,0 0,13.175 2.3,0 0,-9.35 c 0.875,-1.4 1.875,-2.325 3.35,-2.325 1.275,0 2.075,0.575 2.075,2.55 l 0,9.125 2.3,0 0,-9.45 c 0,-2.5 -1.4,-4.025 -3.825,-4.025 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25px;font-family:'Fira Sans';-inkscape-font-specification:'Fira Sans';fill:#ffffff;fill-opacity:1"
|
||||
id="path4895" />
|
||||
<path
|
||||
d="m 132.0975,1026.2174 c -3.75,0 -5.9,2.825 -5.9,6.9 0,4.175 2.125,6.875 5.875,6.875 3.725,0 5.875,-2.825 5.875,-6.9 0,-4.175 -2.1,-6.875 -5.85,-6.875 z m 0,1.85 c 2.175,0 3.375,1.6 3.375,5.025 0,3.45 -1.2,5.05 -3.4,5.05 -2.2,0 -3.4,-1.6 -3.4,-5.025 0,-3.45 1.225,-5.05 3.425,-5.05 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25px;font-family:'Fira Sans';-inkscape-font-specification:'Fira Sans';fill:#ffffff;fill-opacity:1"
|
||||
id="path4897" />
|
||||
</g>
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 67.364,1052.3622 -2.344,-4 -62.72,0 -2.3,4 z"
|
||||
id="path4820"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 14 KiB |
@@ -1 +0,0 @@
|
||||
INSERT INTO wiki (id, url, title, content, lastedit, archive, locale) VALUES (1, '404', 'Erreur 404', 'Le page recherchée n''existe pas', '2016-03-30 08:42:11', true, 'fr');
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
# Use this file if you cannot use class autoloading. It will include all the
|
||||
# files needed for the Markdown parser.
|
||||
#
|
||||
# Take a look at the PSR-0-compatible class autoloading implementation
|
||||
# in the Readme.php file if you want a simple autoloader setup.
|
||||
// Use this file if you cannot use class autoloading. It will include all the
|
||||
// files needed for the Markdown parser.
|
||||
//
|
||||
// Take a look at the PSR-0-compatible class autoloading implementation
|
||||
// in the Readme.php file if you want a simple autoloader setup.
|
||||
|
||||
require_once dirname(__FILE__) . '/MarkdownInterface.php';
|
||||
require_once dirname(__FILE__) . '/Markdown.php';
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
# Use this file if you cannot use class autoloading. It will include all the
|
||||
# files needed for the MarkdownExtra parser.
|
||||
#
|
||||
# Take a look at the PSR-0-compatible class autoloading implementation
|
||||
# in the Readme.php file if you want a simple autoloader setup.
|
||||
// Use this file if you cannot use class autoloading. It will include all the
|
||||
// files needed for the MarkdownExtra parser.
|
||||
//
|
||||
// Take a look at the PSR-0-compatible class autoloading implementation
|
||||
// in the Readme.php file if you want a simple autoloader setup.
|
||||
|
||||
require_once dirname(__FILE__) . '/MarkdownInterface.php';
|
||||
require_once dirname(__FILE__) . '/Markdown.php';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
# Use this file if you cannot use class autoloading. It will include all the
|
||||
# files needed for the MarkdownInterface interface.
|
||||
#
|
||||
# Take a look at the PSR-0-compatible class autoloading implementation
|
||||
# in the Readme.php file if you want a simple autoloader setup.
|
||||
// Use this file if you cannot use class autoloading. It will include all the
|
||||
// files needed for the MarkdownInterface interface.
|
||||
//
|
||||
// Take a look at the PSR-0-compatible class autoloading implementation
|
||||
// in the Readme.php file if you want a simple autoloader setup.
|
||||
|
||||
require_once dirname(__FILE__) . '/MarkdownInterface.php';
|
||||
|
||||
@@ -1,34 +1,38 @@
|
||||
<?php
|
||||
#
|
||||
# Markdown - A text-to-HTML conversion tool for web writers
|
||||
#
|
||||
# PHP Markdown
|
||||
# Copyright (c) 2004-2015 Michel Fortin
|
||||
# <https://michelf.ca/projects/php-markdown/>
|
||||
#
|
||||
# Original Markdown
|
||||
# Copyright (c) 2004-2006 John Gruber
|
||||
# <https://daringfireball.net/projects/markdown/>
|
||||
#
|
||||
/**
|
||||
* Markdown - A text-to-HTML conversion tool for web writers
|
||||
*
|
||||
* @package php-markdown
|
||||
* @author Michel Fortin <michel.fortin@michelf.com>
|
||||
* @copyright 2004-2019 Michel Fortin <https://michelf.com/projects/php-markdown/>
|
||||
* @copyright (Original Markdown) 2004-2006 John Gruber <https://daringfireball.net/projects/markdown/>
|
||||
*/
|
||||
|
||||
namespace Michelf;
|
||||
|
||||
|
||||
#
|
||||
# Markdown Parser Interface
|
||||
#
|
||||
|
||||
/**
|
||||
* Markdown Parser Interface
|
||||
*/
|
||||
interface MarkdownInterface {
|
||||
/**
|
||||
* Initialize the parser and return the result of its transform method.
|
||||
* This will work fine for derived classes too.
|
||||
*
|
||||
* @api
|
||||
*
|
||||
* @param string $text
|
||||
* @return string
|
||||
*/
|
||||
public static function defaultTransform($text);
|
||||
|
||||
#
|
||||
# Initialize the parser and return the result of its transform method.
|
||||
# This will work fine for derived classes too.
|
||||
#
|
||||
public static function defaultTransform($text);
|
||||
|
||||
#
|
||||
# Main function. Performs some preprocessing on the input text
|
||||
# and pass it through the document gamut.
|
||||
#
|
||||
public function transform($text);
|
||||
|
||||
/**
|
||||
* Main function. Performs some preprocessing on the input text
|
||||
* and pass it through the document gamut.
|
||||
*
|
||||
* @api
|
||||
*
|
||||
* @param string $text
|
||||
* @return string
|
||||
*/
|
||||
public function transform($text);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
<footer>
|
||||
<div id="footernav">
|
||||
<a href="<?=$config['rel_root_folder']?>wiki/legal">Mentions Légales</a> —
|
||||
<a href="<?=$config['rel_root_folder']?>contact">Contact</a>
|
||||
<div class="flex">
|
||||
<p class="flex-element"><a target="_blank" href="https://www.facebook.com/kabano09"><i class="fab fa-facebook-square"></i></a> Léo Serre — <script>document.write("06 " + "1" + "8 6" + "2 3" + "2 ");</script>05</p>
|
||||
<div id="footernav" class="flex-element">
|
||||
<a href="<?=$config['rel_root_folder']?>wiki/cgv">CGV</a> —
|
||||
<a href="<?=$config['rel_root_folder']?>wiki/legal">Mentions Légales</a> —
|
||||
<a href="<?=$config['rel_root_folder']?>contact">Contact</a>
|
||||
</div>
|
||||
</div>
|
||||
<p><i>Applications mobiles bientôt disponibles.</i></p>
|
||||
</footer>
|
||||
@@ -1,6 +1,6 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, height=device-height">
|
||||
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0">
|
||||
<link rel="shortcut icon" href="<?=$config['views_url']?>img/favicon.png">
|
||||
<? if (isset($head['css'])) {
|
||||
foreach(explode(";",$head['css']) as $css) { ?>
|
||||
@@ -10,9 +10,9 @@
|
||||
else { ?>
|
||||
<link rel="stylesheet" href="<?=$config['views_url']?>css/d.index.css"/>
|
||||
<? } ?>
|
||||
<link rel="stylesheet" href="<?=$config['views_url']?>third/font-awesome-4.7.0/css/font-awesome.min.css"/>
|
||||
<link rel="stylesheet" href="<?=$config['views_url']?>third/fontawesome-free-5.4.1-web/css/all.min.css"/>
|
||||
|
||||
<script type="text/javascript" src="<?=$config['views_url']?>third/jquery-3.1.1.min.js"></script>
|
||||
<script type="text/javascript" src="<?=$config['views_url']?>third/jquery-3.3.1.min.js"></script>
|
||||
<? if (isset($head['third'])) {
|
||||
foreach(explode(";",$head['third']) as $third) { ?>
|
||||
<script type="text/javascript" src="<?=$config['views_url']?>third/<?=$third?>"></script>
|
||||
@@ -29,18 +29,18 @@
|
||||
<title><?=$head['title']?> — Kabano</title>
|
||||
<? }
|
||||
else { ?>
|
||||
<title>Cabanes et bivouac en montagne</title>
|
||||
<title>Refuges de montagne et métallerie agricole</title>
|
||||
<? } ?>
|
||||
<? if (isset($head['description'])) { ?>
|
||||
<meta name="description" content="<?=$head['description']?>">
|
||||
? }
|
||||
else { ?>
|
||||
<meta name="description" content="Annuaire collaboratif des hébergements pour les activitées de plein air : cabanes, refuges, campings...">
|
||||
<meta name="description" content="Entreprise de services dans la fabrication, la réparation, et l'entretien de bâtiments et machines agricoles">
|
||||
<? } ?>
|
||||
<? if (isset($head['keywords'])) { ?>
|
||||
<meta name="keywords" content="<?=$head['keywords']?>">
|
||||
<? }
|
||||
else { ?>
|
||||
<meta name="keywords" content="kabano, huts, mountain, hiking, cabanes, refuges, bivouac, montagne, randonnée">
|
||||
<meta name="keywords" content="kabano, cabanes, refuges, bivouac, montagne, randonnée, métallerie, agricole">
|
||||
<? } ?>
|
||||
</head>
|
||||
@@ -4,18 +4,32 @@
|
||||
<img alt="Kabano logo" src="<?=$config['views_url'].'img/'?>header.svg">
|
||||
</a>
|
||||
<nav>
|
||||
<ul>
|
||||
<li class="on-bar"><a class="on-bar" href="<?=$config['rel_root_folder']?>map">Carte</a></li>
|
||||
<li class="on-bar"><a class="on-bar" href="<?=$config['rel_root_folder']?>search">Recherche</a></li>
|
||||
<li class="on-bar"><a class="on-bar" href="<?=$config['rel_root_folder']?>news">Nouveautés</a></li>
|
||||
<li class="on-bar"><a class="on-bar" href="<?=$config['rel_root_folder']?>community">Contribuer</a></li>
|
||||
<li class="on-bar has-sub">
|
||||
<? if (isset($user->avatar) AND $user->avatar=='t') { ?>
|
||||
<input type="checkbox" id="togglemenu"><label for="togglemenu" class="hamburger on-bar"><i class="icon fas fa-bars"></i></label>
|
||||
<ul id="menu">
|
||||
<li class="on-bar has-sub with-subtitle"><a class="on-bar" href="#">Restauration<br>
|
||||
<span class="subtitle">de refuges pastoraux</span></a>
|
||||
<ul>
|
||||
<li><a href="<?=$config['rel_root_folder']?>wiki/restauration-de-refuges">Activités</a></li>
|
||||
<li><a href="<?=$config['rel_root_folder']?>wiki/portfolio-restauration">Réalisations</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="on-bar with-subtitle"><a class="on-bar" href="<?=$config['rel_root_folder']?>wiki/metallerie">Métallerie<br>
|
||||
<span class="subtitle">agricole</span></a></li>
|
||||
<li class="on-bar has-sub with-subtitle">
|
||||
<a class="on-bar" href="#">Inventaire<br>
|
||||
<span class="subtitle">des cabanes de montagne</span></a>
|
||||
<ul>
|
||||
<li><a href="<?=$config['rel_root_folder']?>map">Carte</a></li>
|
||||
<li><a href="<?=$config['rel_root_folder']?>community">Contribuer</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="on-bar has-sub menu-icon">
|
||||
<? if ($user->id == 0) { ?>
|
||||
<a class="on-bar" href="#"><i class="icon fas fa-user"></i></a>
|
||||
<? } elseif ($user->is_avatar_present == 't') { ?>
|
||||
<a class="on-bar" href="#"><img alt="Avatar" class="icon avatar" src="<?=$config['rel_root_folder']?>medias/avatars/<?=$user->id?>_s.jpg"></a>
|
||||
<? } elseif (isset($user->avatar) AND $user->avatar=='f') { ?>
|
||||
<a class="on-bar" href="#"><i class="icon fa fa-user-secret"></i></a>
|
||||
<? } else { ?>
|
||||
<a class="on-bar" href="#"><i class="icon fa fa-user"></i></a>
|
||||
<a class="on-bar" href="#"><i class="icon fas fa-user-secret"></i></a>
|
||||
<? } ?>
|
||||
<ul>
|
||||
<? if($user->rank == 'visitor') { ?>
|
||||
@@ -30,19 +44,19 @@
|
||||
<? } else { ?>
|
||||
<li><a href="<?=$config['rel_root_folder']?>user/p">Mon profil</a></li>
|
||||
<li><a href="<?=$config['rel_root_folder']?>user/member_list">Liste des membres</a></li>
|
||||
<? if($user->rank_is_higher('moderator')) { ?>
|
||||
<? if($user->rankIsHigher('moderator')) { ?>
|
||||
<li><a href="<?=$config['rel_root_folder']?>admin">Administration</a></li>
|
||||
<? } ?>
|
||||
<li><a href="<?=$config['rel_root_folder']?>user/logout">Se déconnecter</a></li>
|
||||
<? } ?>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="on-bar has-sub"><a class="on-bar" href="#"><i class="icon fa fa-question"></i></a>
|
||||
<li class="on-bar has-sub menu-icon"><a class="on-bar" href="#"><i class="icon fas fa-question"></i></a>
|
||||
<ul>
|
||||
<li><a href="<?=$config['rel_root_folder']?>wiki/help">Aide</a></li>
|
||||
<!--<li><a href="<?=$config['rel_root_folder']?>wiki/help">Aide</a></li>-->
|
||||
<li><a href="<?=$config['rel_root_folder']?>blog">Blog</a></li>
|
||||
<li><a href="<?=$config['rel_root_folder']?>contact">Contact</a></li>
|
||||
<li><a href="<?=$config['rel_root_folder']?>wiki/api">API Développeurs</a></li>
|
||||
<!--<li><a href="<?=$config['rel_root_folder']?>wiki/api">API Développeurs</a></li>-->
|
||||
<li><a href="<?=$config['rel_root_folder']?>wiki/about">À propos</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
82
views/css/d.admin.css
Normal file
@@ -0,0 +1,82 @@
|
||||
/*********************************/
|
||||
/** Wiki files page **/
|
||||
/*********************************/
|
||||
|
||||
#wiki_files table {
|
||||
width: 100%;
|
||||
margin: 10px auto 30px;
|
||||
}
|
||||
|
||||
#wiki_files table, #wiki_files td {
|
||||
border: 1px solid #ccc;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
#wiki_files th {
|
||||
border: 1px solid #aaa;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
#wiki_files th a {
|
||||
color: inherit !important;
|
||||
}
|
||||
#wiki_files th i {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#wiki_files td, #wiki_files th {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
#wiki_files tr:nth-child(even) {
|
||||
background: #efefef;
|
||||
}
|
||||
#wiki_files tr:nth-child(odd) {
|
||||
background: #e1e1e1;
|
||||
}
|
||||
#wiki_files tr.first {
|
||||
background: #ccc;
|
||||
}
|
||||
#wiki_files tr:hover {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
#wiki_files tr.first:hover {
|
||||
background: #ccc;
|
||||
}
|
||||
|
||||
#wiki_files .pagebuttons {
|
||||
text-align: center;
|
||||
}
|
||||
#wiki_files .pagebuttons a {
|
||||
background: #efefef;
|
||||
border: 1px solid #ccc;
|
||||
padding: 5px;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
#wiki_files .pagebuttons .previous {
|
||||
margin-right: -1px;
|
||||
}
|
||||
|
||||
#wiki_files td a {
|
||||
display: block;
|
||||
}
|
||||
#wiki_files .center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#send_file {
|
||||
display: flex;
|
||||
}
|
||||
#send_file div {
|
||||
padding: 10px;
|
||||
margin: 10px;
|
||||
}
|
||||
#send_file div {
|
||||
flex: 2
|
||||
}
|
||||
#send_file input[type="submit"] {
|
||||
text-align: center;
|
||||
width: 150px;
|
||||
flex: 1;
|
||||
margin: 10px;
|
||||
padding: 10px;
|
||||
border-bottom: 2px solid blue;
|
||||
}
|
||||
@@ -89,6 +89,31 @@
|
||||
border: 1px inset;
|
||||
}
|
||||
|
||||
#blogContent img {
|
||||
max-width: 100%;
|
||||
border: 1px solid #bbb;
|
||||
}
|
||||
|
||||
#blogContent .imglegend {
|
||||
position: relative;
|
||||
}
|
||||
#blogContent .imglegend img {
|
||||
display: block;
|
||||
}
|
||||
#blogContent .imglegend p {
|
||||
display: block;
|
||||
background: rgba(0,0,0,0.5);
|
||||
color: white;
|
||||
font-size: 14px;
|
||||
font-variant: small-caps;
|
||||
line-height: 20px;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
margin: 0;
|
||||
padding: 2px 5px;
|
||||
}
|
||||
|
||||
#new_comment {
|
||||
clear: both;
|
||||
margin: 100px auto 0 auto;
|
||||
@@ -184,9 +209,10 @@ form.form input[type="checkbox"] {
|
||||
}
|
||||
|
||||
form.form input[type="checkbox"] + span:before {
|
||||
font-family: 'FontAwesome';
|
||||
font-family: "Font Awesome 5 Free";
|
||||
font-weight: 400;
|
||||
vertical-align: middle;
|
||||
padding: 2px 4px 0px 5px;
|
||||
padding: 2px 5px 2px 4px;
|
||||
margin-right: 10px;
|
||||
display: inline-block;
|
||||
width: 21px;
|
||||
@@ -195,11 +221,11 @@ form.form input[type="checkbox"] + span:before {
|
||||
}
|
||||
|
||||
form.form input[type="checkbox"] + span:before {
|
||||
content: "\f096"; /* check-empty */
|
||||
content: "\f0c8"; /* check-empty */
|
||||
}
|
||||
|
||||
form.form input[type="checkbox"]:checked + span:before {
|
||||
content: "\f046"; /* check */
|
||||
content: "\f14a"; /* check */
|
||||
}
|
||||
|
||||
/* Also used for new comment form in the view page */
|
||||
@@ -229,9 +255,20 @@ form.form label {
|
||||
float: right;
|
||||
font-size: 17px;
|
||||
}
|
||||
#url {
|
||||
width: calc(100% - 20px);
|
||||
#permalink_container {
|
||||
position: relative;
|
||||
}
|
||||
#permalink {
|
||||
width: calc(100% - 225px);
|
||||
padding-left: 215px;
|
||||
}
|
||||
#permalink_label {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 10px;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
|
||||
form.form input[type=submit] {
|
||||
width: auto;
|
||||
|
||||
@@ -4,11 +4,16 @@
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
html {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "Fira Sans", "Open Sans",Helvetica,Arial,sans-serif;
|
||||
color: #333;
|
||||
background: #ddd;
|
||||
padding-top: 65px;
|
||||
height: calc(100% - 65px)
|
||||
}
|
||||
|
||||
a {
|
||||
@@ -20,7 +25,8 @@ a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
input {
|
||||
input, textarea {
|
||||
font-family: "Fira Sans", "Open Sans",Helvetica,Arial,sans-serif;
|
||||
border-bottom-left-radius: 3px;
|
||||
border-bottom-right-radius: 3px;
|
||||
}
|
||||
@@ -33,6 +39,10 @@ small {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
pre {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.button {
|
||||
padding: 5px 10px;
|
||||
margin: 5px 10px;
|
||||
@@ -95,7 +105,7 @@ header {
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
header ul {
|
||||
#menu {
|
||||
float: right;
|
||||
position: relative;
|
||||
}
|
||||
@@ -106,18 +116,28 @@ header li {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
header li a {
|
||||
header li a, .hamburger {
|
||||
color: white;
|
||||
padding: 25px 15px 15px;
|
||||
height: 20px;
|
||||
display: block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
header li a:hover {
|
||||
header li a:hover, header li a:focus-within {
|
||||
color: white;
|
||||
}
|
||||
header li.with-subtitle a {
|
||||
padding: 15px 15px 25px;
|
||||
}
|
||||
|
||||
header li:hover a {
|
||||
header li .subtitle {
|
||||
font-size: 80%;
|
||||
font-style: italic;
|
||||
white-space: nowrap;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
header li:hover a, header li:focus-within a {
|
||||
border-bottom: 6px solid blue;
|
||||
background: #212121;
|
||||
}
|
||||
@@ -133,15 +153,18 @@ header .icon {
|
||||
}
|
||||
|
||||
header .icon.avatar {
|
||||
margin: -4px 0;
|
||||
padding: 0;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
header li.has-sub:hover a {
|
||||
header li.has-sub:hover a, header li.has-sub:focus-within a {
|
||||
border-bottom: 6px solid #212121;
|
||||
}
|
||||
|
||||
header li.has-sub:hover > ul {
|
||||
header li.has-sub:hover > a {
|
||||
cursor: default;
|
||||
}
|
||||
header li.has-sub:hover > ul, header li.has-sub:focus-within > ul {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@@ -153,6 +176,12 @@ header li.has-sub ul {
|
||||
background: #212121;
|
||||
}
|
||||
|
||||
header li.with-subtitle ul {
|
||||
right: unset;
|
||||
position: relative;
|
||||
min-width: 100%;
|
||||
}
|
||||
|
||||
header li.has-sub ul li {
|
||||
display: block;
|
||||
height: 46px;
|
||||
@@ -170,7 +199,7 @@ header li.has-sub ul li a {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
header li.has-sub ul li:hover {
|
||||
header li.has-sub ul li:hover, header li.has-sub ul li:focus-within {
|
||||
border-left: 6px solid blue;
|
||||
border-bottom: none;
|
||||
}
|
||||
@@ -201,13 +230,63 @@ header input[type=submit] {
|
||||
border-bottom: 1px solid #777;
|
||||
}
|
||||
|
||||
header input:hover {
|
||||
header input:hover, header input:focus-within {
|
||||
background: #DDD;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
.hamburger {
|
||||
display: none;
|
||||
float: right;
|
||||
}
|
||||
#togglemenu {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
#menu {
|
||||
display: none;
|
||||
background: black;
|
||||
float: inherit;
|
||||
position: static;
|
||||
}
|
||||
.hamburger {
|
||||
display: block;
|
||||
}
|
||||
#togglemenu:checked ~ #menu {
|
||||
display: block;
|
||||
}
|
||||
header li {
|
||||
width: 100%;
|
||||
height: inherit;
|
||||
}
|
||||
header li.menu-icon {
|
||||
width: unset;
|
||||
}
|
||||
header li.menu-icon a {
|
||||
padding: 20px 15px;
|
||||
}
|
||||
header li .subtitle {
|
||||
padding-left: 0px;
|
||||
}
|
||||
header li.has-sub ul {
|
||||
width: 100%;
|
||||
}
|
||||
header li.has-sub:hover ul, header li.has-sub:focus-within ul, header li.has-sub:hover ul li, header li.has-sub:focus-within ul li, header li.has-sub:hover ul a, header li.has-sub:focus-within ul a {
|
||||
background-color: #212121;
|
||||
border: 0;
|
||||
}
|
||||
header li.has-sub:hover a, header li.has-sub:focus-within a {
|
||||
border-left: 6px solid blue;
|
||||
border-bottom: 0;
|
||||
}
|
||||
header form {
|
||||
width: unset;
|
||||
}
|
||||
}
|
||||
|
||||
#Hcontent {
|
||||
width: 850px;
|
||||
max-width: 850px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
@@ -232,12 +311,15 @@ section {
|
||||
position: relative;
|
||||
background: white;
|
||||
margin: auto;
|
||||
width: 820px;
|
||||
min-height: 320px;
|
||||
max-width: 820px;
|
||||
min-height: calc(100% - 94px);
|
||||
z-index: 10;
|
||||
padding: 15px;
|
||||
text-align: justify;
|
||||
}
|
||||
section#index {
|
||||
min-height: calc(100% - 95px - 320px);
|
||||
}
|
||||
|
||||
section h1 {
|
||||
font-weight: 300;
|
||||
@@ -245,12 +327,15 @@ section h1 {
|
||||
margin-top: 20px;
|
||||
border-bottom: 1px solid #bbb;
|
||||
}
|
||||
section#index h1{
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
section .subtitle {
|
||||
font-variant: small-caps;
|
||||
font-weight: 500;
|
||||
background: #ddd;
|
||||
margin: 0 20px 20px 0;
|
||||
margin: 0 20px 5px 0;
|
||||
display: inline-block;
|
||||
padding: 3px 5px;
|
||||
float: right;
|
||||
@@ -260,21 +345,30 @@ section p {
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
section h1 {
|
||||
font-size: 1.8rem;
|
||||
text-align: left;
|
||||
}
|
||||
section#index h1 {
|
||||
font-size: 1.7rem;
|
||||
}
|
||||
}
|
||||
|
||||
/***************************************/
|
||||
|
||||
footer {
|
||||
background: #212121;
|
||||
width: 820px;
|
||||
max-width: 820px;
|
||||
padding: 15px;
|
||||
margin: 15px auto 0 auto;
|
||||
color: #c1c1c1;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
footer #footernav {
|
||||
float: right;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
footer a {
|
||||
@@ -285,13 +379,19 @@ footer a:hover {
|
||||
color: white;
|
||||
}
|
||||
|
||||
footer .flex {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
/*********************************/
|
||||
/** Index page **/
|
||||
/*********************************/
|
||||
|
||||
#indexFullW {
|
||||
position: relative;
|
||||
background: url('../img/aside.jpg') center center no-repeat #070707;
|
||||
background: url('../img/aside.jpg') left center no-repeat #070707;
|
||||
width: 100%;
|
||||
height: 320px;
|
||||
z-index: 100;
|
||||
@@ -300,42 +400,69 @@ footer a:hover {
|
||||
|
||||
#AScontent {
|
||||
height: 320px;
|
||||
width: 850px;
|
||||
max-width: 850px;
|
||||
margin: auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#spacebeforesponsors {
|
||||
height: 238px;
|
||||
}
|
||||
|
||||
#sponsors {
|
||||
height: 70px;
|
||||
#imglegend {
|
||||
text-align: right;
|
||||
background: rgba(0,0,0,0.5);
|
||||
padding: 5px 30px;
|
||||
}
|
||||
|
||||
#sponsors a {
|
||||
float: right;
|
||||
display: block;
|
||||
padding-top: 5px;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
#sponsors a img {
|
||||
height: 60px;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#sponsors p {
|
||||
float: left;
|
||||
color: white;
|
||||
font-size: 20px;
|
||||
font-size: 14px;
|
||||
font-variant: small-caps;
|
||||
line-height: 70px;
|
||||
line-height: 20px;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: 0px;
|
||||
}
|
||||
#imglegend p {
|
||||
padding: 5px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
section .thumb {
|
||||
margin: 0 10px;
|
||||
border: 1px solid #aaa;
|
||||
/*********************************/
|
||||
/** Community portal page **/
|
||||
/*********************************/
|
||||
|
||||
.action {
|
||||
clear: both;
|
||||
margin: 50px auto 0 auto;
|
||||
width: 90%;
|
||||
background: #efefef;
|
||||
}
|
||||
.action p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.action .title {
|
||||
background: #ccc;
|
||||
cursor: pointer;
|
||||
font-weight: 500;
|
||||
font-size: 1.1em;
|
||||
line-height: 56px;
|
||||
}
|
||||
.action .title a, .action .title p {
|
||||
padding: 0 10px 0 71px;
|
||||
margin: 0;
|
||||
color: inherit;
|
||||
display: block;
|
||||
}
|
||||
.action .title i {
|
||||
float: left;
|
||||
width: 56px;
|
||||
line-height: 56px;
|
||||
text-align: center;
|
||||
font-size: 30px;
|
||||
background: #333;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.action .description {
|
||||
display: none;
|
||||
border: solid #ccc;
|
||||
border-width: 0px 1px 3px 1px;
|
||||
}
|
||||
.action .description p {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
@@ -9,10 +9,54 @@ body {
|
||||
footer {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: calc(50% - 425px);
|
||||
right: 50%;
|
||||
transform: translateX(50%);
|
||||
width: 100%;
|
||||
max-width: 820px;
|
||||
z-index: 10000;
|
||||
}
|
||||
|
||||
#advert {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
z-index: 9999;
|
||||
background: rgba(50,50,50,0.8);
|
||||
color: #ddd;
|
||||
padding: 20px;
|
||||
border-bottom: 6px solid blue;
|
||||
text-align: center;
|
||||
}
|
||||
#advert a{
|
||||
color: white;
|
||||
}
|
||||
#advert .dots span {
|
||||
opacity: 0;
|
||||
animation: appear 1.5s infinite;
|
||||
}
|
||||
|
||||
#advert .dots span:nth-child(1) {
|
||||
animation-delay: 0s;
|
||||
}
|
||||
|
||||
#advert .dots span:nth-child(2) {
|
||||
animation-delay: 0.3s;
|
||||
}
|
||||
|
||||
#advert .dots span:nth-child(3) {
|
||||
animation-delay: 0.6s;
|
||||
}
|
||||
|
||||
@keyframes appear {
|
||||
0%, 80%, 100% {
|
||||
opacity: 0;
|
||||
}
|
||||
40% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
Controls of the map
|
||||
*****************************************/
|
||||
@@ -33,7 +77,7 @@ footer {
|
||||
}
|
||||
|
||||
.leaflet-bottom.leaflet-left {
|
||||
margin-bottom: 60px !important;
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
.leaflet-fullscreen-on .leaflet-bottom.leaflet-left {
|
||||
margin-bottom: 15px !important;
|
||||
@@ -41,7 +85,7 @@ footer {
|
||||
}
|
||||
|
||||
.leaflet-bottom.leaflet-right {
|
||||
margin-bottom: 60px !important;
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
.leaflet-fullscreen-on .leaflet-bottom.leaflet-right {
|
||||
margin-bottom: 15px !important;
|
||||
@@ -92,12 +136,14 @@ footer {
|
||||
}
|
||||
.leaflet-control-fullscreen a:before {
|
||||
content: "\f065";
|
||||
font-family: FontAwesome;
|
||||
font-family: "Font Awesome 5 Free";
|
||||
font-weight: 900;
|
||||
background: none !important;
|
||||
}
|
||||
.leaflet-fullscreen-on .leaflet-control-fullscreen a:before {
|
||||
content: "\f066";
|
||||
font-family: FontAwesome;
|
||||
font-family: "Font Awesome 5 Free";
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
/* Baselayers */
|
||||
@@ -111,17 +157,37 @@ footer {
|
||||
border-right: none !important;
|
||||
}
|
||||
.leaflet-control-layers a:before {
|
||||
content: "\f279";
|
||||
font-family: FontAwesome;
|
||||
content: "\f5fd";
|
||||
font-family: "Font Awesome 5 Free";
|
||||
font-weight: 900;
|
||||
background: none !important;
|
||||
}
|
||||
.leaflet-control-layers-expanded a {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.leaflet-control-layers-list {
|
||||
padding: 3px 8px !important;
|
||||
color: white !important;
|
||||
background: #212121 !important;
|
||||
width: inherit !important;
|
||||
}
|
||||
|
||||
/* Scale */
|
||||
|
||||
.leaflet-control-scale-line {
|
||||
height: 30px !important;
|
||||
top: 2px !important;
|
||||
position: relative !important;
|
||||
background: #212121 !important;
|
||||
color: #c1c1c1 !important;
|
||||
text-align: center !important;
|
||||
border: none !important;
|
||||
font-size: 12px !important;
|
||||
line-height: 30px !important;
|
||||
}
|
||||
.leaflet-control-scale {
|
||||
opacity: 0.8 !important;
|
||||
}
|
||||
|
||||
/* Credit / Legend */
|
||||
@@ -132,19 +198,23 @@ footer {
|
||||
|
||||
#footer-credits, #footer-legend {
|
||||
background: #212121;
|
||||
width: 820px;
|
||||
padding: 15px;
|
||||
margin: 15px auto 0 auto;
|
||||
color: #c1c1c1;
|
||||
text-align: left;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: calc(50% - 425px);
|
||||
right: 50%;
|
||||
transform: translateX(50%);
|
||||
width: 100%;
|
||||
max-width: 820px;
|
||||
z-index: 10000;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
#footer-credits .close-link, #footer-legend .close-link {
|
||||
float: right;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
color: white;
|
||||
padding: 0 8px;
|
||||
cursor: pointer;
|
||||
@@ -157,17 +227,14 @@ footer {
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* Scale */
|
||||
|
||||
.leaflet-control-scale-line {
|
||||
height: 26px !important;
|
||||
background: #212121 !important;
|
||||
color: #c1c1c1 !important;
|
||||
text-align: center !important;
|
||||
border: none !important;
|
||||
font-size: 12px !important;
|
||||
line-height: 20px !important;
|
||||
.legend_item {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
}
|
||||
.leaflet-control-scale {
|
||||
opacity: 0.8 !important;
|
||||
.poi_icon {
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
.leaflet-fullscreen-on .easy-button-container {
|
||||
display: none;
|
||||
}
|
||||
327
views/css/d.poi.css
Executable file
@@ -0,0 +1,327 @@
|
||||
/*********************************/
|
||||
/** Common **/
|
||||
/*********************************/
|
||||
|
||||
html, body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#sticky {
|
||||
position: relative;
|
||||
min-height: 0;
|
||||
top: 65%;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
@keyframes fadeinfadeout {
|
||||
0% {color: #444;}
|
||||
50% {color: #999;}
|
||||
100% {color: #444;}
|
||||
}
|
||||
#slide-icon {
|
||||
position: absolute;
|
||||
left: 400px;
|
||||
top: -35px;
|
||||
color: #000;
|
||||
font-size: 60px;
|
||||
color: #555;
|
||||
animation-name: fadeinfadeout;
|
||||
animation-duration: 2s;
|
||||
animation-iteration-count: infinite;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#mapid {
|
||||
position: fixed;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
/*********************************/
|
||||
/** Editor page **/
|
||||
/*********************************/
|
||||
|
||||
form.form input, form.form textarea, #locale {
|
||||
font-size: 16px;
|
||||
padding: 10px;
|
||||
}
|
||||
form.form input, form.form textarea, form.form input[type=radio]:checked+label, #locale {
|
||||
background: #ddd;
|
||||
border-bottom: 2px solid #ccc;
|
||||
}
|
||||
|
||||
form.form h1 input {
|
||||
flex: 2 !important;
|
||||
font-size: 18px;
|
||||
}
|
||||
form.form h1 {
|
||||
padding: 10px 0;
|
||||
margin: 0 0 10px 0;
|
||||
}
|
||||
#locale {
|
||||
flex: 1;
|
||||
margin: 10px 5px 0 5px;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.flex_line {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.flex_line > :first-child {
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
.flex_line > :last-child, .last-child {
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
|
||||
.flex_line input[type=number], .flex_line input[type=text] {
|
||||
flex: 1;
|
||||
margin: 10px 5px 0 5px;
|
||||
}
|
||||
.noarrow::-webkit-inner-spin-button,
|
||||
.noarrow::-webkit-outer-spin-button,
|
||||
.noarrow {
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: textfield;
|
||||
appearance: textfield;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
form.form input[type=submit] {
|
||||
width: auto;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
border-bottom: 2px solid blue;
|
||||
}
|
||||
|
||||
form.form input[type=radio] {
|
||||
position: absolute;
|
||||
float: left;
|
||||
opacity: 0%;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
}
|
||||
form.form input[type=radio]+label {
|
||||
margin-top: 10px;
|
||||
font-size: 13px;
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
padding: 10px;
|
||||
vertical-align: middle;
|
||||
border-bottom: 2px solid transparent;
|
||||
}
|
||||
form.form input[type=radio]+label img {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
#specific_form .threecb:after {
|
||||
font-family: "Font Awesome 5 Free";
|
||||
font-weight: 400;
|
||||
vertical-align: middle;
|
||||
padding: 3px 8px 2px 4px;
|
||||
margin: 2px 10px;
|
||||
display: inline-block;
|
||||
width: 21px;
|
||||
background: #ddd;
|
||||
font-size: 25px;
|
||||
border-radius: 100px;
|
||||
}
|
||||
#specific_form .threecb.check:after {
|
||||
content: "\f058"; /* check */
|
||||
}
|
||||
#specific_form .threecb.uncheck:after {
|
||||
content: "\f057"; /* cross */
|
||||
}
|
||||
#specific_form .threecb.intermediate:after {
|
||||
content: "\f059"; /* question */
|
||||
}
|
||||
#specific_form input {
|
||||
margin: 2px 10px;
|
||||
}
|
||||
#specific_form textarea {
|
||||
margin: 5px 0;
|
||||
display: block;
|
||||
width: calc(100% - 20px);
|
||||
height: 100px;
|
||||
}
|
||||
#specific_form .flex_line {
|
||||
align-items: center;
|
||||
}
|
||||
#specific_form .flex_line input {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
#abstract {
|
||||
text-align: center;
|
||||
color: #555;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
#permalink_container {
|
||||
position: relative;
|
||||
margin: 2px 0;
|
||||
}
|
||||
#permalink {
|
||||
width: calc(100% - 194px);
|
||||
padding-left: 184px;
|
||||
}
|
||||
#permalink_label {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 10px;
|
||||
opacity: 0.8;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
Controls of the map
|
||||
*****************************************/
|
||||
|
||||
/* General */
|
||||
|
||||
.leaflet-control-container {
|
||||
position: absolute !important;
|
||||
width: 850px !important;
|
||||
height: 100%;
|
||||
left: calc(50% - 425px) !important;
|
||||
font-family: "Fira Sans", "Open Sans",Helvetica,Arial,sans-serif !important;
|
||||
}
|
||||
.leaflet-fullscreen-on .leaflet-control-container {
|
||||
position: absolute !important;
|
||||
width: 100% !important;
|
||||
left: 0 !important;
|
||||
}
|
||||
|
||||
.leaflet-bottom.leaflet-left {
|
||||
bottom: 35% !important;
|
||||
margin-bottom: -50px !important;
|
||||
}
|
||||
.leaflet-fullscreen-on .leaflet-bottom.leaflet-left {
|
||||
margin-bottom: 15px !important;
|
||||
margin-left: 15px !important;
|
||||
bottom: 0 !important;
|
||||
}
|
||||
|
||||
.leaflet-bottom.leaflet-right {
|
||||
bottom: 35% !important;
|
||||
margin-bottom: -50px !important;
|
||||
}
|
||||
.leaflet-fullscreen-on .leaflet-bottom.leaflet-right {
|
||||
margin-bottom: 15px !important;
|
||||
margin-right: 15px !important;
|
||||
bottom: 0 !important;
|
||||
}
|
||||
|
||||
.leaflet-control {
|
||||
clear: none !important;
|
||||
padding: 0 !important;
|
||||
border-radius: 0 !important;
|
||||
box-shadow: none !important;
|
||||
color: #c1c1c1 !important;
|
||||
}
|
||||
.leaflet-right .leaflet-control {
|
||||
margin: 0 0 0 15px !important;
|
||||
}
|
||||
.leaflet-left .leaflet-control {
|
||||
margin: 0 15px 0 0 !important;
|
||||
}
|
||||
|
||||
.leaflet-control a, .leaflet-control button {
|
||||
display: inline-block !important;
|
||||
float: none !important;
|
||||
border: none !important;
|
||||
background-color: #212121 !important;
|
||||
border-radius: 0 !important;
|
||||
color: #c1c1c1 !important;
|
||||
border-right: 1px #3e3e3e solid !important;
|
||||
}
|
||||
.leaflet-control a:last-child, .leaflet-control button:last-child {
|
||||
border-right: none !important;
|
||||
}
|
||||
|
||||
/* Zoom */
|
||||
|
||||
.leaflet-control-zoom-in, .leaflet-control-zoom-out {
|
||||
font-size: 10px !important;
|
||||
}
|
||||
.leaflet-disabled {
|
||||
background-color: rgba(33, 33, 33, 0.8) !important;
|
||||
opacity: 0.8 !important;
|
||||
}
|
||||
|
||||
/* Fullscreen */
|
||||
|
||||
.leaflet-control-fullscreen a {
|
||||
background: #212121 !important;
|
||||
}
|
||||
.leaflet-control-fullscreen a:before {
|
||||
content: "\f065";
|
||||
font-family: "Font Awesome 5 Free";
|
||||
font-weight: 900;
|
||||
background: none !important;
|
||||
}
|
||||
.leaflet-fullscreen-on .leaflet-control-fullscreen a:before {
|
||||
content: "\f066";
|
||||
font-family: "Font Awesome 5 Free";
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
/* Baselayers */
|
||||
|
||||
.leaflet-control-layers a {
|
||||
background: #212121 !important;
|
||||
width: 26px !important;
|
||||
height: 26px !important;
|
||||
line-height: 26px !important;
|
||||
text-align: center !important;
|
||||
border-right: none !important;
|
||||
}
|
||||
.leaflet-control-layers a:before {
|
||||
content: "\f5fd";
|
||||
font-family: "Font Awesome 5 Free";
|
||||
font-weight: 900;
|
||||
background: none !important;
|
||||
}
|
||||
.leaflet-control-layers-expanded a {
|
||||
display: none !important;
|
||||
}
|
||||
.leaflet-control-layers-list {
|
||||
padding: 3px 8px !important;
|
||||
color: white !important;
|
||||
background: #212121 !important;
|
||||
width: inherit !important;
|
||||
}
|
||||
|
||||
/* Scale */
|
||||
|
||||
.leaflet-control-scale-line {
|
||||
height: 30px !important;
|
||||
top: 2px !important;
|
||||
position: relative !important;
|
||||
background: #212121 !important;
|
||||
color: #c1c1c1 !important;
|
||||
text-align: center !important;
|
||||
border: none !important;
|
||||
font-size: 12px !important;
|
||||
line-height: 30px !important;
|
||||
}
|
||||
.leaflet-control-scale {
|
||||
opacity: 0.8 !important;
|
||||
}
|
||||
|
||||
#elevation_icon {
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
top: 18px;
|
||||
right: 34px;
|
||||
}
|
||||
|
||||
#elevation_icon i {
|
||||
position: absolute;
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
/*********************************/
|
||||
|
||||
form.form {
|
||||
width: 50%;
|
||||
width: 80%;
|
||||
margin: 25px auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@ form.form input[type=submit] {
|
||||
#wikiContent blockquote { margin-left: 40px; margin-right: 40px }
|
||||
#wikiContent ol, #wikiContent ul, #wikiContent dd { margin-left: 40px }
|
||||
#wikiContent ol ul, #wikiContent ul ol, #wikiContent ul ul, #wikiContent ol ol { margin-top: 0; margin-bottom: 0 }
|
||||
#wikiContent hr { border: 1px solid #bbb }
|
||||
|
||||
#wikiContent .footnotes {
|
||||
font-size: 0.8em;
|
||||
@@ -57,10 +58,31 @@ form.form input[type=submit] {
|
||||
#wikiContent .footnotes p {
|
||||
margin: 0.4em 0;
|
||||
}
|
||||
#wikiContent hr {
|
||||
border: 1px inset;
|
||||
}
|
||||
|
||||
#wiki_page.archive {
|
||||
opacity: 0.5;
|
||||
}
|
||||
#wikiContent img {
|
||||
max-width: 100%;
|
||||
border: 1px solid #bbb;
|
||||
}
|
||||
|
||||
#wikiContent .imglegend {
|
||||
position: relative;
|
||||
}
|
||||
#wikiContent .imglegend img {
|
||||
display: block;
|
||||
}
|
||||
#wikiContent .imglegend p {
|
||||
display: block;
|
||||
background: rgba(0,0,0,0.5);
|
||||
color: white;
|
||||
font-size: 14px;
|
||||
font-variant: small-caps;
|
||||
line-height: 20px;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
margin: 0;
|
||||
padding: 2px 5px;
|
||||
}
|
||||
42
views/d.admin.backup.html
Normal file
@@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
|
||||
<body>
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1><?=$head['title']?></h1>
|
||||
<br>
|
||||
<pre><?
|
||||
foreach($output as $line) {
|
||||
echo $line."<br>";
|
||||
}
|
||||
?></pre>
|
||||
<br>
|
||||
|
||||
<? $i=0;
|
||||
foreach($backup_file as $file) {
|
||||
if (file_exists($file ?? '')) { ?>
|
||||
<a href='<?=$config['rel_root_folder']?>tmp/<?=$backup_filename[$i]?>' target='_blank'><i class="fas fa-file-export"></i> Télécharger le fichier "<i><?=$backup_filename[$i]?></i>"</a><br>
|
||||
<? } else { ?>
|
||||
Fichier <?=$file?> non généré
|
||||
<? }
|
||||
$i++;
|
||||
}?>
|
||||
|
||||
<br>
|
||||
<h4>Archives des anciennes sauvegardes</h4>
|
||||
<ul style="padding: 1em 0 1em 40px;">
|
||||
<? foreach($backup_files as $file) { ?>
|
||||
<li style="padding: 0 0 0.2em 0;"><?=basename($file)?> - <a href='<?=$config['rel_root_folder']?>tmp/<?=basename($file)?>' target='_blank'><i class="fas fa-download"></i> Télécharger</a> - <a href='<?=$config['rel_root_folder']?>admin/<?=$controller->splitted_url[1]?>/delete/<?=basename($file)?>'><i class="fas fa-trash"></i> Effacer</a></li>
|
||||
<? } ?>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -8,7 +8,7 @@
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1>Mise à jour.</h1>
|
||||
<h1><?=$head['title']?></h1>
|
||||
<br>
|
||||
<pre><?
|
||||
foreach($output as $line) {
|
||||
|
||||
@@ -8,13 +8,16 @@
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1>Administration.</h1>
|
||||
<h1>Administration</h1>
|
||||
<br>
|
||||
<? if($user->role >= 1000) { ?>
|
||||
<a href="<?=$config['rel_root_folder']?>admin/git-pull" class="button"><i class="fa fa-refresh"></i> Mettre à jour</a> <small>Met à jour le logiciel depuis le dépôt GIT.</small><br><br>
|
||||
<? if($user->rankIsHigher("administrator")) { ?>
|
||||
<a href="<?=$config['rel_root_folder']?>admin/git-pull" class="button"><i class="fas fa-sync-alt"></i> Mettre à jour</a> <small>Met à jour le logiciel depuis le dépôt GIT.</small><br><br>
|
||||
<a href="<?=$config['rel_root_folder']?>admin/sql-backup" class="button"><i class="fas fa-file-export"></i> Sauvegarde SQL</a><a href="<?=$config['rel_root_folder']?>admin/files-backup" class="button"><i class="fas fa-file-export"></i> Archive des médias</a><small>Génère un dump SQL et une archive de fichiers téléchargeable.</small><br><br>
|
||||
<? } ?>
|
||||
<? if($user->role >= 800) { ?>
|
||||
<a href="<?=$config['rel_root_folder']?>admin/logs" class="button"><i class="fa fa-history"></i> Voir les logs</a> <small>Permet d'accéder aux 200 dernières lignes des logs bruts des actions sur la base de données.</small><br><br>
|
||||
<? if($user->rankIsHigher("moderator")) { ?>
|
||||
<a href="<?=$config['rel_root_folder']?>admin/logs" class="button"><i class="fas fa-history"></i> Voir les logs</a> <small>Permet d'accéder aux 200 dernières lignes des logs bruts des actions sur la base de données.</small><br><br>
|
||||
<a href="<?=$config['rel_root_folder']?>admin/wiki-files" class="button"><i class="fas fa-paperclip"></i> Fichiers attachés</a><small>Gérer les fichiers attachés pour le wiki : liste, ajout, suppression...</small><br><br>
|
||||
<a href="<?=$config['rel_root_folder']?>admin/stats" class="button"><i class="fas fa-chart-line"></i> Statistiques</a><small>Analyser les logs et afficher les statistiques.</small><br><br>
|
||||
<? } ?>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1>Logs.</h1>
|
||||
<h1><?=$head['title']?></h1>
|
||||
<span class="subtitle">
|
||||
<select id="logfile">
|
||||
<? $i = 0;
|
||||
|
||||
27
views/d.admin.stats.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
|
||||
<body>
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1><?=$head['title']?></h1>
|
||||
<br>
|
||||
<pre><?
|
||||
print_r($output);
|
||||
?></pre>
|
||||
<br>
|
||||
<? if (file_exists($report)) { ?>
|
||||
<a href='<?=$config['rel_root_folder']?>tmp/report.html' target='_blank'><i class="fas fa-chart-line"></i> Voir le rapport</a>
|
||||
<? } else { ?>
|
||||
Echec de la commande
|
||||
<? } ?>
|
||||
</section>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
75
views/d.admin.wiki-files.html
Executable file
@@ -0,0 +1,75 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
|
||||
<body>
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section id="wiki_files">
|
||||
<h1><?=$head['title']?></h1>
|
||||
|
||||
<p class="subtitle">Fichiers attachés <?=$first?> à <?=$last?> sur les <?=$filenb?> présents</p>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<form action="<?=$config['rel_root_folder']?>admin/wiki-files/upload/" method="post" enctype="multipart/form-data" id="send_file">
|
||||
<div>
|
||||
<label for="file">Envoyer un fichier :</label>
|
||||
<input type="file" id="file" name="file">
|
||||
</div>
|
||||
<input type="submit" value="Envoyer">
|
||||
</form>
|
||||
|
||||
|
||||
<table>
|
||||
<tr class="first">
|
||||
<th>
|
||||
<a href="<?=$config['rel_root_folder']?>admin/wiki-files/<?=$page+1?>?orderby=name&order=<?=$order=='ASC'?'DESC':'ASC'?>">Nom</a>
|
||||
<?=$orderby=='name'?$order=='ASC'?'<i class="fas fa-caret-down" aria-hidden="true"></i>':'<i class="fas fa-caret-up" aria-hidden="true"></i>':''?>
|
||||
</th>
|
||||
<th>
|
||||
<a href="<?=$config['rel_root_folder']?>admin/wiki-files/<?=$page+1?>?orderby=type&order=<?=$order=='ASC'?'DESC':'ASC'?>">Type</a>
|
||||
<?=$orderby=='type'?$order=='ASC'?'<i class="fas fa-caret-down" aria-hidden="true"></i>':'<i class="fas fa-caret-up" aria-hidden="true"></i>':''?>
|
||||
</th>
|
||||
<th>
|
||||
<a href="<?=$config['rel_root_folder']?>admin/wiki-files/<?=$page+1?>?orderby=size&order=<?=$order=='ASC'?'DESC':'ASC'?>">Taille</a>
|
||||
<?=$orderby=='size'?$order=='ASC'?'<i class="fas fa-caret-down" aria-hidden="true"></i>':'<i class="fas fa-caret-up" aria-hidden="true"></i>':''?>
|
||||
</th>
|
||||
<th>
|
||||
<a href="<?=$config['rel_root_folder']?>admin/wiki-files/<?=$page+1?>?orderby=creation_date&order=<?=$order=='ASC'?'DESC':'ASC'?>">Date de création</a>
|
||||
<?=$orderby=='creation_date'?$order=='ASC'?'<i class="fas fa-caret-down" aria-hidden="true"></i>':'<i class="fas fa-caret-up" aria-hidden="true"></i>':''?>
|
||||
</th>
|
||||
<? if ($user->rankIsHigher("administrator")) { ?>
|
||||
<th>Suppression</th>
|
||||
<? } ?>
|
||||
</tr>
|
||||
<? foreach (array_slice($files, $first-1, $rows_per_pages, true) as $file) { ?>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="<?=$config['rel_root_folder']?>medias/wiki/<?=$file['name']?>"><?=$file['name']?></a>
|
||||
</td>
|
||||
<td><i class='fas <?=getFontAwesomeIcon($file['type'])?>'></i> <?=$file['type']?></td>
|
||||
<td><?=formatBytes($file['size'], $user->locale)?></td>
|
||||
<td><? echo datefmt_format($user->date_format,date_create($file['creation_date'], new DateTimeZone("UTC"))) ?></td>
|
||||
<? if ($user->rankIsHigher("administrator")) { ?>
|
||||
<td class="center">
|
||||
<a href="<?=$config['rel_root_folder']?>admin/wiki-files/delete/<?=$file['name']?>?orderby=<?=$orderby?>&order=<?=$order?>" onclick="return confirm('Es-tu sûr de vouloir supprimer ?');"><span class="external-link"><i class="fas fa-trash"></i></span></a>
|
||||
</td>
|
||||
<? } ?>
|
||||
</tr>
|
||||
<? } ?>
|
||||
</table>
|
||||
<div class="pagebuttons">
|
||||
<? if ($page != 0) { ?><a class="previous" href="<?=$config['rel_root_folder']?>admin/wiki-files/<?=$page?>?orderby=<?=$orderby?>&order=<?=$order?>"><i class="fas fa-chevron-left fa-fw"></i></a><? }
|
||||
if (($page+1)*$rows_per_pages < $filenb) { ?><a class="next" href="<?=$config['rel_root_folder']?>admin/wiki-files/<?=$page+2?>?orderby=<?=$orderby?>&order=<?=$order?>"><i class="fas fa-chevron-right fa-fw"></i></a><? } ?>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -12,31 +12,34 @@
|
||||
<form class="form" action="<?=$config['rel_root_folder']?>blog/new" method="post">
|
||||
<? }
|
||||
else { ?>
|
||||
<form class="form" action="<?=$config['rel_root_folder']?>blog/<?=$blogArticle->url?>/edit" method="post">
|
||||
<form class="form" action="<?=$config['rel_root_folder']?>blog/<?=$blogArticle->permalink?>/edit" method="post">
|
||||
<? } ?>
|
||||
|
||||
<h1>
|
||||
<select name="locale" id="locale">
|
||||
<? foreach($config['locales'] as $locale) { ?>
|
||||
<option <?=$blogArticle->locale==$locale[0]?'selected':''?> value="<?=$locale[0]?>"><?=$locale[5]?></option>
|
||||
<? foreach($locales->objs as $locale) { ?>
|
||||
<option <?=$blogArticle->locale==$locale->name?'selected':''?> value="<?=$locale->name?>"><?=$locale->display_name?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
<input type="text" value="<?=$blogArticle->title?>" name="title" id="title" placeholder="Titre">
|
||||
<input type="text" value="<?=$blogArticle->name?>" name="name" id="name" placeholder="Titre">
|
||||
</h1>
|
||||
|
||||
<? if(isset($error) AND $error=="url") { ?>
|
||||
<? if(isset($error) AND $error=="permalink") { ?>
|
||||
<p style="color: red;">L'URL sélectionnée est déjà prise.</p>
|
||||
<? } ?>
|
||||
|
||||
<textarea rows="30" name="content" id="content" placeholder="Contenu de la page"><?=$blogArticle->content?></textarea>
|
||||
<textarea rows="30" name="content" id="content" placeholder="Contenu de l'article"><?=$blogArticle->content?></textarea>
|
||||
|
||||
<? if(isset($new) AND $new==1) { ?>
|
||||
<input type="text" value="<?=$blogArticle->url?>" name="url" id="url" placeholder="URL">
|
||||
<div id="permalink_container">
|
||||
<label id="permalink_label" for="permalink"><?=$config['web_root_folder']?>blog/</label>
|
||||
<input type="text" name="permalink" id="permalink" placeholder="URL">
|
||||
</div>
|
||||
<? } ?>
|
||||
|
||||
<label for="comments">
|
||||
<input type="checkbox" name="comments" id="comments" value="comments"
|
||||
<? if($blogArticle->comments == 't') { ?>
|
||||
<label for="is_commentable">
|
||||
<input type="checkbox" name="is_commentable" id="is_commentable"
|
||||
<? if($blogArticle->is_commentable == 't') { ?>
|
||||
checked
|
||||
<? } ?>
|
||||
/>
|
||||
@@ -48,21 +51,21 @@
|
||||
</section>
|
||||
|
||||
<script type="text/javascript">
|
||||
$( "#title" ).keyup(function() {
|
||||
url = $( "#title" ).val();
|
||||
url = url.replace(/ /g,'_');
|
||||
url = url.toLowerCase();
|
||||
url = url.replace(/[^a-z0-9_]/g,'-');
|
||||
url = url.replace(/[_$]/g,'-');
|
||||
$( "#url" ).val(url);
|
||||
$( "#name" ).keyup(function() {
|
||||
permalink = $( "#name" ).val();
|
||||
permalink = permalink.replace(/ /g,'_');
|
||||
permalink = permalink.toLowerCase();
|
||||
permalink = permalink.replace(/[^a-z0-9_]/g,'-');
|
||||
permalink = permalink.replace(/[_-]+$/g,'');
|
||||
$( "#permalink" ).val(permalink);
|
||||
});
|
||||
$( "#title" ).change(function() {
|
||||
url = $( "#title" ).val();
|
||||
url = url.replace(/ /g,'_');
|
||||
url = url.toLowerCase();
|
||||
url = url.replace(/[^a-z0-9_]/g,'-');
|
||||
url = url.replace(/[_$]/g,'-');
|
||||
$( "#url" ).val(url);
|
||||
$( "#name" ).change(function() {
|
||||
permalink = $( "#name" ).val();
|
||||
permalink = permalink.replace(/ /g,'_');
|
||||
permalink = permalink.toLowerCase();
|
||||
permalink = permalink.replace(/[^a-z0-9_]/g,'-');
|
||||
permalink = permalink.replace(/[_-]+$/g,'');
|
||||
$( "#permalink" ).val(permalink);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -8,27 +8,27 @@
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section id="blog_list">
|
||||
<h1>Blog.</h1>
|
||||
<h1>Blog</h1>
|
||||
<p class="subtitle">
|
||||
<? if ($user->role >= 800) { ?>
|
||||
<a href="<?=$config['rel_root_folder']?>blog/new"><i class="fa fa-plus"></i> Nouvel article</a> —
|
||||
<? if ($user->rankIsHigher("moderator")) { ?>
|
||||
<a href="<?=$config['rel_root_folder']?>blog/new"><i class="fas fa-plus"></i> Nouvel article</a> —
|
||||
<? } ?>
|
||||
<a href="<?=$config['rel_root_folder']?>blog/rss"><i class="fa fa-rss" aria-hidden="true"></i> Flux RSS</a> —
|
||||
<a href="<?=$config['rel_root_folder']?>blog/rss"><i class="fas fa-rss" aria-hidden="true"></i> Flux RSS</a> —
|
||||
Articles <?=$first?> à <?=$last?> sur <?=$blogArticles->number?>
|
||||
</p>
|
||||
|
||||
<div id="articles_list">
|
||||
|
||||
<? foreach ($blogArticles_list as $row) { ?>
|
||||
<? foreach ($blogArticles->objs as $row) { ?>
|
||||
|
||||
<article <? if($row->archive == 't') echo 'class="article_archive" '; ?>>
|
||||
<h2 class="article_title"><?=$row->title?>.</h2>
|
||||
<article<? if($row->is_public == 'f') echo ' class="article_archive" '; ?>>
|
||||
<h2 class="article_title"><?=$row->name?></h2>
|
||||
<div class="article_content"><?=mb_substr($row->content_txt,0,200)?>...</div>
|
||||
<p class="article_legend">
|
||||
<a class="article_link" href="<?=$config['rel_root_folder']?>blog/<?=$row->url?>">Lire la suite...</a>
|
||||
<a class="article_link" href="<?=$config['rel_root_folder']?>blog/<?=$row->permalink?>">Lire la suite...</a>
|
||||
<span class="article_infos">
|
||||
Le <? echo strftime('%e %B %G',strtotime($row->lastedit)) ?> par
|
||||
<? if ($user->role > 0) { ?>
|
||||
<? echo datefmt_format($user->date_format,date_create($row->update_date, new DateTimeZone("UTC"))) ?> par
|
||||
<? if ($user->rankIsHigher("registered")) { ?>
|
||||
<a href="<?=$config['rel_root_folder']?>user/p/<?=$row->author?>"><?=$row->author_name?></a>
|
||||
<? }
|
||||
else { ?>
|
||||
@@ -43,8 +43,8 @@
|
||||
</div>
|
||||
|
||||
<div class="pagebuttons">
|
||||
<? if ($page != 0) { ?><a class="previous" href="<?=$config['rel_root_folder']?>blog/<?=$page?>"><i class="fa fa-chevron-left fa-fw"></i></a><? }
|
||||
if (($page+1)*$articles_per_pages < $blogArticles->number) { ?><a class="next" href="<?=$config['rel_root_folder']?>blog/<?=$page+2?>"><i class="fa fa-chevron-right fa-fw"></i></a><? } ?>
|
||||
<? if ($page != 0) { ?><a class="previous" href="<?=$config['rel_root_folder']?>blog/<?=$page?>"><i class="fas fa-chevron-left fa-fw"></i></a><? }
|
||||
if (($page+1)*$articles_per_pages < $blogArticles->number) { ?><a class="next" href="<?=$config['rel_root_folder']?>blog/<?=$page+2?>"><i class="fas fa-chevron-right fa-fw"></i></a><? } ?>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
@@ -14,25 +14,25 @@ echo ('<?xml version="1.0" encoding="UTF-8"?>'); ?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Kabano</title>
|
||||
<link><?=$config['rel_root_folder']?></link>
|
||||
<atom:link href="<?=$config['rel_root_folder']?>blog/rss" rel="self" type="application/rss+xml" />
|
||||
<link><?=$config['web_root_folder']?></link>
|
||||
<atom:link href="<?=$config['web_root_folder']?>blog/rss" rel="self" type="application/rss+xml" />
|
||||
<description>L'actualité du blog officiel de Kabano : Plateforme collaborative de recensement de cabanes et refuges.</description>
|
||||
<language>fr</language>
|
||||
<image>
|
||||
<url><?=$config['views_url']?>img/header_rss.svg</url>
|
||||
<url><?=$config['web_root_folder']?>views/img/header_rss.svg</url>
|
||||
<title>Kabano</title>
|
||||
<link><?=$config['rel_root_folder']?></link>
|
||||
<link><?=$config['web_root_folder']?></link>
|
||||
<height>44</height>
|
||||
<width>154</width>
|
||||
</image>
|
||||
|
||||
<? foreach ($blogArticles_list as $row) { ?>
|
||||
<? foreach ($blogArticles->objs as $row) { ?>
|
||||
|
||||
<item>
|
||||
<title><?=$row->title?></title>
|
||||
<link><?=$config['rel_root_folder']?>blog/<?=$row->url?></link>
|
||||
<guid><?=$config['rel_root_folder']?>blog/<?=$row->url?></guid>
|
||||
<pubDate><?=$row->lastedit?></pubDate>
|
||||
<title><?=$row->name?></title>
|
||||
<link><?=$config['web_root_folder']?>blog/<?=$row->permalink?></link>
|
||||
<guid><?=$config['web_root_folder']?>blog/<?=$row->permalink?></guid>
|
||||
<pubDate><?=gmdate(DATE_RSS, strtotime($row->update_date))?></pubDate>
|
||||
<description><![CDATA[
|
||||
<?=$row->content_html?>
|
||||
]]></description>
|
||||
|
||||
@@ -7,27 +7,28 @@
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section id="blog_article" <?=$blogArticle->archive=="t"?'class="archive"':''?>>
|
||||
<h1><?=$blogArticle->title?>.</h1>
|
||||
<? if($user->role >= 600) { ?>
|
||||
<section id="blog_article" <?=$blogArticle->is_archive=="t"||$blogArticle->is_public=="f"?'class="archive"':''?>>
|
||||
<h1><?=$blogArticle->name?></h1>
|
||||
<? if($user->rankIsHigher('premium')) { ?>
|
||||
<span class="subtitle">
|
||||
<? if(isset($blogArticles_history_list)) { ?>
|
||||
<? if(isset($blogHistory)) { ?>
|
||||
<select id="bloghistory">
|
||||
<? $i = 0;
|
||||
foreach ($blogArticles_history_list as $row) { ?>
|
||||
<option <?=$row->id==$blogArticle->id?'selected':''?> value="<?=$i?>"><?=$row->archive=="f"?'• ':''?><? echo strftime('%d/%m/%Y %H:%M:%S',strtotime($row->lastedit)) ?></option>
|
||||
foreach ($blogHistory->objs as $row) { ?>
|
||||
<option <?=$row->version_id==$blogArticle->version_id?'selected':''?> value="<?=$i?>"><?=$row->is_archive=="f"?'• ':''?><? echo datefmt_format($user->datetimeshort_format,date_create($row->update_date, new DateTimeZone("UTC"))) ?></option>
|
||||
<? $i++;
|
||||
} ?>
|
||||
</select>
|
||||
<? }
|
||||
if ($user->role >= 800 && isset($blogArticles_history_list)) { ?>
|
||||
if ($user->rankIsHigher('moderator') && isset($blogHistory)) { ?>
|
||||
—
|
||||
<? }
|
||||
if ($user->role >= 800) { ?>
|
||||
<a href="<?=$config['rel_root_folder']?>blog/<?=$blogArticle->url?>/edit"><i class="fa fa-pencil"></i> Éditer l'article</a>
|
||||
<? if ($blogArticle->archive == 'f') { ?>
|
||||
—
|
||||
<a href="<?=$config['rel_root_folder']?>blog/<?=$blogArticle->url?>/delete"><i class="fa fa-trash"></i> Effacer l'article</a>
|
||||
if ($user->rankIsHigher("moderator")) { ?>
|
||||
<a href="<?=$config['rel_root_folder']?>blog/<?=$blogArticle->permalink?>/edit"><i class="fas fa-pencil-alt"></i> Éditer l'article</a> —
|
||||
<? if ($blogArticle->is_public == 't') { ?>
|
||||
<a href="<?=$config['rel_root_folder']?>blog/<?=$blogArticle->permalink?>/delete"><i class="fas fa-trash"></i> Effacer l'article</a>
|
||||
<? } else { ?>
|
||||
<a href="<?=$config['rel_root_folder']?>blog/<?=$blogArticle->permalink?>/restore"><i class="fas fa-eye"></i> Restaurer l'article</a>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
</span>
|
||||
@@ -38,21 +39,23 @@
|
||||
</div>
|
||||
|
||||
<p id="blogTimestamp">Article écrit par
|
||||
<? if ($user->role > 0) { ?>
|
||||
<? if ($user->rankIsHigher("blocked")) { ?>
|
||||
<a href="<?=$config['rel_root_folder']?>user/p/<?=$blogArticle->author?>"><?=$blogArticle->author_name?></a>
|
||||
<? }
|
||||
else { ?>
|
||||
<?=$blogArticle->author_name?>
|
||||
<? } ?>
|
||||
le <? echo strftime('%e %B %G, %kh%Mm%Ss',strtotime($blogArticle->lastedit)) ?> <small><abbr title="Temps Universel Coordonné">UTC</abbr></small></p>
|
||||
le <? echo datefmt_format($user->datetime_format,date_create($blogArticle->creation_date, new DateTimeZone("UTC"))) ?></p>
|
||||
|
||||
<!-- COMMENTS -->
|
||||
|
||||
<? if ($blogArticle->comments == "t" && $blogArticle->archive == "f") { ?>
|
||||
<? if ($blogArticle->is_commentable == "t") { ?>
|
||||
<div id="new_comment">
|
||||
<form class="form" action="<?=$config['rel_root_folder']?>blog/<?=$blogArticle->url?>/new_comment" method="post">
|
||||
<div id="new_comment_label" <?=$user->role==0?"class='sent' ":""?>>
|
||||
<? if ($user->role > 0) { ?>
|
||||
<form class="form" action="<?=$config['rel_root_folder']?>blog/<?=$blogArticle->permalink?>/new_comment" method="post">
|
||||
<div id="new_comment_label" <?=$user->rank=="visitor"?"class='sent' ":""?>>
|
||||
<? if ($blogArticle->is_archive == "t" || $blogArticle->is_public == "f") { ?>
|
||||
<p>Impossible de commenter un article non publié</p>
|
||||
<? } else if ($user->rankIsHigher("registered")) { ?>
|
||||
<input name="submit" type="submit" value="Envoyer">
|
||||
<p>Ajouter un nouveau commentaire</p>
|
||||
<? } else { ?>
|
||||
@@ -65,31 +68,31 @@
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<? if(isset($blogArticles_comments_list)) {
|
||||
foreach ($blogArticles_comments_list as $row) { ?>
|
||||
<? if($blogArticle->is_commentable == 't') {
|
||||
foreach ($blogArticles_comments->objs as $comment) { ?>
|
||||
|
||||
<article <? if($row->archive == 't') echo 'class="comment_archive" '; ?>>
|
||||
<article <? if($comment->is_archive == 't' || $comment->is_public == 'f') echo 'class="comment_archive" '; ?>>
|
||||
<div class="comment_title">
|
||||
<? if ($row->author_obj->avatar=='t') { ?>
|
||||
<img alt="Avatar" class="icon avatar" src="<?=$config['rel_root_folder']?>medias/avatars/<?=$row->author_obj->id?>_s.jpg">
|
||||
<? if ($comment->author_obj->is_avatar_present=='t') { ?>
|
||||
<img alt="Avatar" class="icon avatar" src="<?=$config['rel_root_folder']?>medias/avatars/<?=$comment->author_obj->id?>_s.jpg">
|
||||
<? } else { ?>
|
||||
<i class="icon fa fa-user-secret"></i>
|
||||
<i class="icon fas fa-user-secret"></i>
|
||||
<? } ?>
|
||||
<? if ($user->role > 0) { ?>
|
||||
<a class="username" href="<?=$config['rel_root_folder']?>user/p/<?=$row->author_obj->id?>"><?=$row->author_obj->name?></a>
|
||||
<? if ($user->rankIsHigher("blocked")) { ?>
|
||||
<a class="username" href="<?=$config['rel_root_folder']?>user/p/<?=$comment->author_obj->id?>"><?=$comment->author_obj->name?></a>
|
||||
<? } else { ?>
|
||||
<?=$row->author_obj->name?>
|
||||
<?=$comment->author_obj->name?>
|
||||
<? } ?>
|
||||
le <? echo strftime('%e %B %G, %kh%Mm%Ss',strtotime($row->lastedit)) ?> <small><abbr title="Temps Universel Coordonné">UTC</abbr></small>
|
||||
<? if (($user->role >= 800 || $user->id == $row->author) && $row->archive == 'f') { ?>
|
||||
<span class="delete_link"><a href="<?=$config['rel_root_folder']?>blog/<?=$blogArticle->url?>/delete_comment/<?=$row->id?>"><i class="fa fa-trash"></i> Effacer le commentaire</a></span>
|
||||
le <? echo datefmt_format($user->datetime_format,date_create($comment->update_date, new DateTimeZone("UTC"))) ?>
|
||||
<? if (($user->rankIsHigher("moderator") || $user->id == $comment->author) && $comment->is_public == 't') { ?>
|
||||
<span class="delete_link"><a href="<?=$config['rel_root_folder']?>blog/<?=$blogArticle->permalink?>/delete_comment/<?=$comment->id?>"><i class="fas fa-trash"></i> Effacer le commentaire</a></span>
|
||||
<? } ?>
|
||||
<? if (($user->role >= 800 || $user->id == $row->author) && $row->archive == 't') { ?>
|
||||
<span class="delete_link"><a href="<?=$config['rel_root_folder']?>blog/<?=$blogArticle->url?>/undelete_comment/<?=$row->id?>"><i class="fa fa-eye"></i> Réafficher le commentaire</a></span>
|
||||
<? if (($user->rankIsHigher("moderator") || $user->id == $comment->author) && $comment->is_public == 'f') { ?>
|
||||
<span class="delete_link"><a href="<?=$config['rel_root_folder']?>blog/<?=$blogArticle->permalink?>/restore_comment/<?=$comment->id?>"><i class="fas fa-eye"></i> Restaurer le commentaire</a></span>
|
||||
<? } ?>
|
||||
</div>
|
||||
<div class="comment_content">
|
||||
<?=$row->content_html?>
|
||||
<?=$comment->comment_html?>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
@@ -102,14 +105,14 @@
|
||||
<div style="clear: both;"> </div>
|
||||
</section>
|
||||
|
||||
<? if($user->role >= 600) { ?>
|
||||
<? if($user->rankIsHigher("premium")) { ?>
|
||||
<script type="text/javascript">
|
||||
$( "#bloghistory" ).change(function() {
|
||||
window.location.href = "<?=$config['rel_root_folder']?>blog/<?=$blogArticle->url?>/"+$( this ).val();
|
||||
window.location.href = "<?=$config['rel_root_folder']?>blog/<?=$blogArticle->permalink?>/"+$( this ).val();
|
||||
});
|
||||
</script>
|
||||
<? } ?>
|
||||
<? if($user->role > 0) { ?>
|
||||
<? if($user->rankIsHigher("registered") && $blogArticle->is_archive == "f" && $blogArticle->is_public == "t") { ?>
|
||||
<script type="text/javascript">
|
||||
$( "#new_comment_label" ).click(function() {
|
||||
$( "#new_comment_form" ).show(400);
|
||||
|
||||
65
views/d.community.html
Executable file
@@ -0,0 +1,65 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
|
||||
<body>
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1>Contribuer au projet Kabano</h1>
|
||||
<p>Étant un projet collaboratif, Kabano se repose sur vos contributions pour diffuser des informations au plus proche de la réalité. En participant au projet Kabano, vous acceptez de placer vos collaborations sous <a href="<?=$config['rel_root_folder']?>wiki/licences">nos licences libres</a>.</p>
|
||||
<br>
|
||||
|
||||
<div class="action">
|
||||
<? if($user->rankIsHigher("registered")) { ?>
|
||||
<div class="title"><i class="fas fa-home"></i>
|
||||
<a href="<?=$config['rel_root_folder']?>poi/new">Ajouter un hébergement de montagne</a>
|
||||
</div>
|
||||
<? } else { ?>
|
||||
<div class="title" id="js_open_1"><i class="fas fa-home"></i>
|
||||
<p>Ajouter un hébergement de montagne</p>
|
||||
</div>
|
||||
<div class="description" id="js_openned_1">
|
||||
<p>Vous devez être connecté pour pouvoir ajouter un hébergement. Ça nous permet de laisser les robots à la porte.</p>
|
||||
</div>
|
||||
<? } ?>
|
||||
</div>
|
||||
|
||||
<div class="action">
|
||||
<div class="title" id="js_open_2"><i class="fas fa-comment"></i>
|
||||
<p>Ajouter un commentaire sur un hébergement</p>
|
||||
</div>
|
||||
<div class="description" id="js_openned_2">
|
||||
<p>Rendez-vous sur la page hébergement où vous souhaitez laisser un commentaire, puis ajoutez un commentaire en bas de page.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="action">
|
||||
<div class="title" id="js_open_3"><i class="fas fa-wrench"></i>
|
||||
<p>Faire une demande de travaux</p>
|
||||
</div>
|
||||
<div class="description" id="js_openned_3">
|
||||
<p>Cette fonctionnalité n'est pas encore disponible, mais n'hésitez pas à laisser un commentaire pour faire savoir le besoin d'entretien.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
<script type="text/javascript">
|
||||
$( "#js_open_1" ).click(function() {
|
||||
$( "#js_openned_1" ).show(400);
|
||||
});
|
||||
$( "#js_open_2" ).click(function() {
|
||||
$( "#js_openned_2" ).show(400);
|
||||
});
|
||||
$( "#js_open_3" ).click(function() {
|
||||
$( "#js_openned_3" ).show(400);
|
||||
});
|
||||
</script>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -8,7 +8,7 @@
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1>Nous contacter.</h1>
|
||||
<h1>Me contacter</h1>
|
||||
<form class="form" action="<?=$config['rel_root_folder']?>contact" method="post">
|
||||
<? if($error=="name") { ?>
|
||||
<p style="color: red;">Veuillez renseigner votre nom.</p>
|
||||
@@ -16,7 +16,7 @@
|
||||
<? if($error=="subject") { ?>
|
||||
<p style="color: red;">Veuillez renseigner un sujet.</p>
|
||||
<? } ?>
|
||||
<? if($error=="mail") { ?>
|
||||
<? if($error=="email") { ?>
|
||||
<p style="color: red;">Veuillez renseigner une adresse mail.</p>
|
||||
<? } ?>
|
||||
<? if($error=="message") { ?>
|
||||
@@ -33,18 +33,18 @@
|
||||
<p style="color: green;">Message bien envoyé.</p>
|
||||
<? } ?>
|
||||
<input type="text" name="name" id="name" placeholder="Nom" value="<?=$contact['name']?>">
|
||||
<input type="text" name="mail" id="mail" placeholder="Adresse mail" value="<?=$contact['mail']?>">
|
||||
<input type="email" name="email" id="email" placeholder="Adresse mail" value="<?=$contact['email']?>">
|
||||
<input type="text" name="subject" id="subject" placeholder="Sujet" value="<?=$contact['subject']?>">
|
||||
<textarea name="message" id="message" rows="12" placeholder="Contenu de votre message"><?=$contact['message']?></textarea>
|
||||
<? if($user->role >= 200) { ?>
|
||||
<? if($user->rankIsHigher("registered")) { ?>
|
||||
<input type="hidden" name="captcha" value="-2">
|
||||
<input type="submit" name="submit" value="Envoyer">
|
||||
<? }
|
||||
else { ?>
|
||||
<p id="captcha">
|
||||
<input type="hidden" id="captchahidden" name="captcha" value="10">
|
||||
<span id="captchatext">Merci d'attendre <b id="captchasec">10 s</b> avant de pouvoir nous contacter.<br>
|
||||
<small>Ceci nous permet de laisser les robots à la porte.</small></span>
|
||||
<span id="captchatext">Merci d'attendre <b id="captchasec">10 s</b> avant de pouvoir me contacter.<br>
|
||||
<small>Ceci me permet de laisser les robots à la porte.</small></span>
|
||||
<input disabled id="captchasubmit" style="display:none;" type="submit" name="submit" value="Envoyer">
|
||||
</p>
|
||||
<? } ?>
|
||||
|
||||
@@ -8,23 +8,32 @@
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<aside id="indexFullW">
|
||||
<!-- <div id="AScontent">
|
||||
<div id="spacebeforesponsors"></div>
|
||||
<div id="sponsors">
|
||||
<p style="font-size: 1.3em;">Aidez Kabano en partagant sa <a style="font-weight: 6b00; color: orange; float: none; padding: 0; display: inline;" href="http://fr.ulule.com/kabano/" target="_blank">campagne de financement Ulule</a> !</p>
|
||||
<div id="AScontent">
|
||||
<div id="imglegend">
|
||||
<p>Refuge de Pointe Basse</p>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<section>
|
||||
<h1>Cabanes et bivouac en montagne.</h1>
|
||||
<p><abbr title="Cabane en espéranto">Kabano</abbr> est une plateforme collaborative sur laquelle vous pouvez récupérer toutes les informations nécessaires relatives aux hébergements en montagne. Ces informations ont été ajoutées par vous, pour vous, c'est pourquoi il est primordial de ne pas cesser d'ajouter des commentaires, cabanes, refuges ou emplacements de bivouac. Attention toutefois, ces données ne sont en aucun cas garanties et des précautions dues à l'environnement montagnard sont à prendre.</p>
|
||||
<br>
|
||||
<p style="text-align: center;">
|
||||
<img alt="Illustration hut" src="<?=$config['views_url']?>img/thumb1.jpg" class="thumb" title="© ptit tapou - Forums Pyrénées Team">
|
||||
<img alt="Illustration tent" src="<?=$config['views_url']?>img/thumb2.jpg" class="thumb">
|
||||
<img alt="Illustration hut" src="<?=$config['views_url']?>img/thumb3.jpg" class="thumb" title="CC BY-SA - EricM - refuges.info">
|
||||
</p>
|
||||
<?
|
||||
require_once($config['models_folder']."d.wiki.php");
|
||||
$wikiPage = new Kabano\WikiPage();
|
||||
$wikiPage->checkPermalink('index');
|
||||
$wikiPage->md2html();
|
||||
?>
|
||||
|
||||
<section id="index">
|
||||
<h1><?=$wikiPage->name?></h1>
|
||||
|
||||
<? if($user->rankIsHigher('moderator')) { ?>
|
||||
<span class="subtitle">
|
||||
<a href="<?=$config['rel_root_folder']?>wiki/index/edit"><i class="fas fa-pencil-alt"></i> Éditer la page</a>
|
||||
</span>
|
||||
<? } ?>
|
||||
|
||||
<br><br>
|
||||
|
||||
<?=$wikiPage->content_html?>
|
||||
</section>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<div id="advert">En cours de création<span class="dots"><span>.</span><span>.</span><span>.</span></span><br>En attendant je vous recommande <a href="https://www.refuges.info/" target="_blank">refuges.info</a></div>
|
||||
|
||||
<div id="mapid" style="height: 100%;"></div>
|
||||
|
||||
<div id="footer-credits" style="display: none;">
|
||||
@@ -16,7 +18,9 @@
|
||||
|
||||
<div id="footer-legend" style="display: none;">
|
||||
<i class="fa fa-times close-link" aria-hidden="true"></i>
|
||||
<p><i id="map-legend">Légende.</i></p>
|
||||
<? foreach($poi_types as $type) { ?>
|
||||
<span class="legend_item"><img src="<?=$config['views_url']?>img/<?=$type[3]?>.svg" class="poi_icon"> <?=$type[1]?></span>
|
||||
<? } ?>
|
||||
</div>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
|
||||
165
views/d.poi.edit.html
Executable file
@@ -0,0 +1,165 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
|
||||
<body>
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<div id="mapid"></div>
|
||||
|
||||
<div id="sticky">
|
||||
<section>
|
||||
<i id="slide-icon" class="fas fa-chevron-up"></i>
|
||||
<? if(isset($new) AND $new==1) { ?>
|
||||
<form class="form" action="<?=$config['rel_root_folder']?>poi/new" method="post">
|
||||
<? }
|
||||
else { ?>
|
||||
<form class="form" action="<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/edit" method="post">
|
||||
<? } ?>
|
||||
<h1 class="flex_line">
|
||||
<input type="text" value="<?=$poi->name?>" name="name" id="name" placeholder="Nom de l'hébergement" required>
|
||||
<select name="locale" id="locale">
|
||||
<? foreach($locales->objs as $locale) { ?>
|
||||
<option <?=$poi->locale==$locale->name?'selected':''?> value="<?=$locale->name?>"><?=$locale->display_name?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
</h1>
|
||||
|
||||
<div class="flex_line">
|
||||
<input type="number" class="noarrow" step="any" value="<?=$poi->lat?>" name="lat" id="lat" placeholder="Latitude" required>
|
||||
<input type="number" class="noarrow" step="any" value="<?=$poi->lon?>" name="lon" id="lon" placeholder="Longitude" required>
|
||||
<input type="number" class="noarrow last-child" step="any" value="<?=$poi->ele?>" name="ele" id="ele" placeholder="Altitude">
|
||||
<div id="elevation_icon" style="display:none;" title="Calculer l'altitude"><i class="fas fa-search-location"></i></div>
|
||||
</div>
|
||||
|
||||
<div class="flex_line" id="type_selector">
|
||||
<? foreach($poi_types as $type) { ?>
|
||||
<input type="radio" name="poi_type" value="<?=$type[3]?>" id="<?=$type[3]?>" required>
|
||||
<label for="<?=$type[3]?>"><img src="<?=$config['views_url']?>img/<?=$type[3]?>.svg"><br><?=$type[0]?></label>
|
||||
<? } ?>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var unsaved = false;
|
||||
|
||||
// Used to store all the forms skeleton and abstracts
|
||||
<? foreach($poi_types as $type) { ?>
|
||||
<?=$type[3]?>_abstract="<?=$type[4]?>";
|
||||
<?=$type[3]?>_jsonform=<?=json_encode($type[5])?>;
|
||||
<? } ?>
|
||||
|
||||
// Manages the three state checkbox feature
|
||||
function update3State(id) {
|
||||
var input=$("input[name="+id+"]");
|
||||
var label=$("label[for="+id+"]");
|
||||
switch(+input.val()) {
|
||||
case 0:
|
||||
input.val(1);
|
||||
label.toggleClass('uncheck intermediate')
|
||||
break;
|
||||
case 1:
|
||||
input.val(2);
|
||||
label.toggleClass('intermediate check')
|
||||
break;
|
||||
default:
|
||||
input.val(0);
|
||||
label.toggleClass('check uncheck')
|
||||
|
||||
}
|
||||
unsaved = true; // The form values changed
|
||||
}
|
||||
|
||||
// Updates the specific form section when changing poi type
|
||||
function updateForm(type) {
|
||||
$("#abstract").html(this[type+'_abstract']); // Changes the abstract legend
|
||||
var html_form="";
|
||||
// Generates HTML for the sub-form
|
||||
$.each(this[type+'_jsonform'],function(index, value){
|
||||
switch(index.charAt(0)) {
|
||||
case 'b':
|
||||
html_form+='<label class="threecb intermediate" for="'+index+'" onclick="update3State(\''+index+'\')">'+value+'</label><input value="1" type="hidden" name="'+index+'" id="'+index+'"><br>'
|
||||
break;
|
||||
case 'n':
|
||||
html_form+='<div class="flex_line"><label for="'+index+'">'+value+'</label><input min="0" type="number" name="'+index+'" id="'+index+'"></div>'
|
||||
break;
|
||||
case 't':
|
||||
html_form+='<textarea name="'+index+'" id="'+index+'" placeholder="'+value+'"></textarea>'
|
||||
break;
|
||||
case 'l':
|
||||
html_form+='<div class="flex_line"><label for="'+index+'">'+value+'</label><input placeholder="https://" type="url" name="'+index+'" id="'+index+'"></div>'
|
||||
break;
|
||||
default:
|
||||
console.log("ERROR: "+index+"'s type is not known");
|
||||
}
|
||||
});
|
||||
$("#specific_form").html(html_form); // Updates HTML
|
||||
|
||||
// Display an alert if the poi type is changed before reseting the form
|
||||
unsaved = false;
|
||||
$("#specific_form :input").change(function(){
|
||||
unsaved = true;
|
||||
});
|
||||
}
|
||||
|
||||
// Handle click on type selector
|
||||
$(document).ready(function(){
|
||||
// First check if there is changes in the sub-form and if the user is OK to reset the form
|
||||
$('#type_selector label').click(function(){
|
||||
if(unsaved == true) {
|
||||
if(confirm("Des changements ont été apportés et vont être supprimés, voulez-vous continuer ?")) {}
|
||||
else {
|
||||
return false; // Cancel radio switch action
|
||||
}
|
||||
}
|
||||
|
||||
// Updates the sub-form
|
||||
updateForm($(this).prev().val());
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<p id="abstract"></p>
|
||||
<div id="specific_form"></div>
|
||||
|
||||
<? if(isset($new) AND $new==1) { ?>
|
||||
<div id="permalink_container">
|
||||
<label id="permalink_label" for="permalink"><?=$config['web_root_folder']?>poi/</label>
|
||||
<input type="text" name="permalink" id="permalink" placeholder="URL">
|
||||
</div>
|
||||
<? } ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
$( "#name" ).keyup(function() {
|
||||
permalink = $( "#name" ).val();
|
||||
permalink = permalink.replace(/ /g,'_');
|
||||
permalink = permalink.toLowerCase();
|
||||
permalink = permalink.replace(/[^a-z0-9_]/g,'-');
|
||||
permalink = permalink.replace(/[_-]+$/g,'');
|
||||
$( "#permalink" ).val(permalink);
|
||||
});
|
||||
$( "#name" ).change(function() {
|
||||
permalink = $( "#name" ).val();
|
||||
permalink = permalink.replace(/ /g,'_');
|
||||
permalink = permalink.toLowerCase();
|
||||
permalink = permalink.replace(/[^a-z0-9_]/g,'-');
|
||||
permalink = permalink.replace(/[_-]+$/g,'');
|
||||
$( "#permalink" ).val(permalink);
|
||||
});
|
||||
</script>
|
||||
|
||||
<input name="submit" id="submit" type="submit" value="Ajouter l'hébergement">
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<script type="text/javascript">
|
||||
$( "#slide-icon" ).click(function() {
|
||||
$( "html, body" ).animate({scrollTop: "300px"});
|
||||
});
|
||||
</script>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -8,7 +8,7 @@
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1>Connexion.</h1>
|
||||
<h1>Connexion</h1>
|
||||
<form class="form" action="<?=$config['rel_root_folder']?>user/login" method="post" id="login">
|
||||
<? if(isset($_GET['error']) AND $_GET['error']==1) { ?>
|
||||
<p style="color: red;">Erreur lors de la connexion, merci de réessayer.</p>
|
||||
|
||||
@@ -8,48 +8,48 @@
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section id="member_list">
|
||||
<h1>Liste des membres.</h1>
|
||||
<h1>Liste des membres</h1>
|
||||
<p class="subtitle">Membres <?=$first?> à <?=$last?> sur les <?=$users->number?> inscrits</p>
|
||||
|
||||
<table>
|
||||
<tr class="first">
|
||||
<th>
|
||||
<a href="<?=$config['rel_root_folder']?>user/member_list/<?=$page+1?>?orderby=name&order=<?=$order=='ASC'?'DESC':'ASC'?>">Nom d'utilisateur</a>
|
||||
<?=$orderby=='name'?$order=='ASC'?'<i class="fa fa-caret-down" aria-hidden="true"></i>':'<i class="fa fa-caret-up" aria-hidden="true"></i>':''?>
|
||||
<?=$orderby=='name'?$order=='ASC'?'<i class="fas fa-caret-down" aria-hidden="true"></i>':'<i class="fas fa-caret-up" aria-hidden="true"></i>':''?>
|
||||
</th>
|
||||
<th>
|
||||
<a href="<?=$config['rel_root_folder']?>user/member_list/<?=$page+1?>?orderby=role&order=<?=$order=='ASC'?'DESC':'ASC'?>">Rôle</a>
|
||||
<?=$orderby=='role'?$order=='ASC'?'<i class="fa fa-caret-down" aria-hidden="true"></i>':'<i class="fa fa-caret-up" aria-hidden="true"></i>':''?>
|
||||
<a href="<?=$config['rel_root_folder']?>user/member_list/<?=$page+1?>?orderby=rank&order=<?=$order=='ASC'?'DESC':'ASC'?>">Rôle</a>
|
||||
<?=$orderby=='rank'?$order=='ASC'?'<i class="fas fa-caret-down" aria-hidden="true"></i>':'<i class="fas fa-caret-up" aria-hidden="true"></i>':''?>
|
||||
</th>
|
||||
<th>
|
||||
<a href="<?=$config['rel_root_folder']?>user/member_list/<?=$page+1?>?orderby=registered&order=<?=$order=='ASC'?'DESC':'ASC'?>">Inscription</a>
|
||||
<?=$orderby=='registered'?$order=='ASC'?'<i class="fa fa-caret-down" aria-hidden="true"></i>':'<i class="fa fa-caret-up" aria-hidden="true"></i>':''?>
|
||||
<a href="<?=$config['rel_root_folder']?>user/member_list/<?=$page+1?>?orderby=register_date&order=<?=$order=='ASC'?'DESC':'ASC'?>">Inscription</a>
|
||||
<?=$orderby=='register_date'?$order=='ASC'?'<i class="fas fa-caret-down" aria-hidden="true"></i>':'<i class="fas fa-caret-up" aria-hidden="true"></i>':''?>
|
||||
</th>
|
||||
<th>
|
||||
<a href="<?=$config['rel_root_folder']?>user/member_list/<?=$page+1?>?orderby=lastlogin&order=<?=$order=='ASC'?'DESC':'ASC'?>">Dernière visite</a>
|
||||
<?=$orderby=='lastlogin'?$order=='ASC'?'<i class="fa fa-caret-down" aria-hidden="true"></i>':'<i class="fa fa-caret-up" aria-hidden="true"></i>':''?>
|
||||
<a href="<?=$config['rel_root_folder']?>user/member_list/<?=$page+1?>?orderby=visit_date&order=<?=$order=='ASC'?'DESC':'ASC'?>">Dernière visite</a>
|
||||
<?=$orderby=='visit_date'?$order=='ASC'?'<i class="fas fa-caret-down" aria-hidden="true"></i>':'<i class="fas fa-caret-up" aria-hidden="true"></i>':''?>
|
||||
</th>
|
||||
<th>
|
||||
<a href="<?=$config['rel_root_folder']?>user/member_list/<?=$page+1?>?orderby=website&order=<?=$order=='ASC'?'DESC':'ASC'?>">Site internet</a>
|
||||
<?=$orderby=='website'?$order=='ASC'?'<i class="fa fa-caret-down" aria-hidden="true"></i>':'<i class="fa fa-caret-up" aria-hidden="true"></i>':''?>
|
||||
<?=$orderby=='website'?$order=='ASC'?'<i class="fas fa-caret-down" aria-hidden="true"></i>':'<i class="fas fa-caret-up" aria-hidden="true"></i>':''?>
|
||||
</th>
|
||||
</tr>
|
||||
<? foreach ($user_list as $row) { ?>
|
||||
<? foreach ($users->objs as $row) { ?>
|
||||
<tr>
|
||||
<td>
|
||||
<? if ($row->avatar=='t') { ?>
|
||||
<? if ($row->is_avatar_present=='t') { ?>
|
||||
<img alt="Avatar" class="icon avatar" src="<?=$config['rel_root_folder']?>medias/avatars/<?=$row->id?>_s.jpg">
|
||||
<? } else { ?>
|
||||
<i class="icon fa fa-user-secret"></i>
|
||||
<i class="icon fas fa-user-secret"></i>
|
||||
<? } ?>
|
||||
<a class="username" href="<?=$config['rel_root_folder']?>user/p/<?=$row->id?>"><?=$row->name?></a>
|
||||
</td>
|
||||
<td><?=$row->role()?></td>
|
||||
<td><? echo strftime('%e %B %G',strtotime($row->registered)) ?></td>
|
||||
<td><? echo strftime('%e %B %G',strtotime($row->lastlogin)) ?></td>
|
||||
<td><?=$row->get_rank()?></td>
|
||||
<td><? echo datefmt_format($user->date_format,date_create($row->register_date, new DateTimeZone("UTC"))) ?></td>
|
||||
<td><? echo datefmt_format($user->date_format,date_create($row->visit_date, new DateTimeZone("UTC"))) ?></td>
|
||||
<td>
|
||||
<? if ($row->website != "") { ?>
|
||||
<a target="_blank" href="<?=$row->website?>">Site internet <span class="external-link"><i class="fa fa-external-link"></i></span></a>
|
||||
<a target="_blank" href="<?=$row->website?>">Site internet <span class="external-link"><i class="fas fa-external-link-alt"></i></span></a>
|
||||
<? } ?>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -57,8 +57,8 @@
|
||||
</table>
|
||||
|
||||
<div class="pagebuttons">
|
||||
<? if ($page != 0) { ?><a class="previous" href="<?=$config['rel_root_folder']?>user/member_list/<?=$page?>?orderby=<?=$orderby?>&order=<?=$order?>"><i class="fa fa-chevron-left fa-fw"></i></a><? }
|
||||
if (($page+1)*$rows_per_pages < $users->number) { ?><a class="next" href="<?=$config['rel_root_folder']?>user/member_list/<?=$page+2?>?orderby=<?=$orderby?>&order=<?=$order?>"><i class="fa fa-chevron-right fa-fw"></i></a><? } ?>
|
||||
<? if ($page != 0) { ?><a class="previous" href="<?=$config['rel_root_folder']?>user/member_list/<?=$page?>?orderby=<?=$orderby?>&order=<?=$order?>"><i class="fas fa-chevron-left fa-fw"></i></a><? }
|
||||
if (($page+1)*$rows_per_pages < $users->number) { ?><a class="next" href="<?=$config['rel_root_folder']?>user/member_list/<?=$page+2?>?orderby=<?=$orderby?>&order=<?=$order?>"><i class="fas fa-chevron-right fa-fw"></i></a><? } ?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1>Envoi d'un mot de passe.</h1>
|
||||
<h1>Envoi d'un mot de passe</h1>
|
||||
<form class="form" action="<?=$config['rel_root_folder']?>user/password_lost" method="post" id="password_lodt">
|
||||
<? if(isset($_GET['error']) AND $_GET['error']==1) { ?>
|
||||
<p style="color: red;">Cette adresse mail n'existe pas.</p>
|
||||
<? } ?>
|
||||
<input type="text" name="mail" id="mail" placeholder="Adresse mail">
|
||||
<input type="email" name="email" id="email" placeholder="Adresse mail">
|
||||
<input type="submit" name="submit" value="Envoyer un nouveau mot de passe">
|
||||
</form>
|
||||
</section>
|
||||
|
||||
@@ -14,53 +14,60 @@
|
||||
<? if(isset($nameError) AND $nameError==1) { ?>
|
||||
<p style="color: #660000;">Veuillez choisir un autre nom d'utilisateur.</p>
|
||||
<? } ?>
|
||||
<? if(isset($nameError) AND $nameError==1) { ?>
|
||||
<p style="color: #660000;">Veuillez choisir un autre nom d'utilisateur.</p>
|
||||
<? if(isset($emailError) AND $emailError==1) { ?>
|
||||
<p style="color: #660000;">Veuillez choisir un autre email.</p>
|
||||
<? } ?>
|
||||
<? if(isset($updated) AND $updated==1) { ?>
|
||||
<p style="color: #006600;">Le profil a été mis à jour.</p>
|
||||
<? } ?>
|
||||
<form action="<?=$config['rel_root_folder']?>user/p/<?=$userProfile->id?>/edit" method="post" class="edituser" enctype="multipart/form-data">
|
||||
<aside class="<?=$userProfile->avatar=='t'?'':'no'?>avatar">
|
||||
<aside class="<?=$userProfile->is_avatar_present=='t'?'':'no'?>avatar">
|
||||
<div id="picturebuttonscontainer">
|
||||
<div id="picturebuttons">
|
||||
<a href="#" id="uploadavatar"><i class="fa fa-camera"></i></a><a <?=$userProfile->avatar=='t'?'':'style="display: none;"'?> href="#" id="deleteavatar" style="font-size: 1.1em;"><i class="fa fa-trash"></i></a>
|
||||
<a href="#" id="uploadavatar"><i class="fas fa-camera"></i></a><a <?=$userProfile->is_avatar_present=='t'?'':'style="display: none;"'?> href="#" id="deleteavatar" style="font-size: 1.1em;"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<img alt="Avatar" id="profileavatar" src="<?=$config['rel_root_folder']?>medias/avatars/<?=$userProfile->id?>_p.jpg" alt="Profile picture">
|
||||
<i id="profilenoavatar" class="fa fa-user-secret"></i>
|
||||
<i id="profilenoavatar" class="fas fa-user-secret"></i>
|
||||
</aside>
|
||||
|
||||
<input id="avatarcheckbox" style="display: none;" type="checkbox" name="avatar" <?=$userProfile->avatar=='t'?'checked':''?>>
|
||||
<input id="avatarcheckbox" style="display: none;" type="checkbox" name="avatar" <?=$userProfile->is_avatar_present=='t'?'checked':''?>>
|
||||
<input type="hidden" name="MAX_FILE_SIZE" value="4194304" />
|
||||
<input id="avatarfile" name="avatarfile" style="display: none;" type="file" accept="image/*" />
|
||||
|
||||
<div id="description">
|
||||
<ul>
|
||||
<li><label for="name">Nom d'utilisateur :</label><input name="name" id="name" type="text" value="<?=$userProfile->name?>" placeholder="Charlie"></li>
|
||||
<li><label for="mail">Adresse mail :</label><input name="mail" id="mail" type="text" value="<?=$userProfile->mail?>" placeholder="charlie@mountain.org"></li>
|
||||
<li><label for="password">Mot de passe :</label><input name="password" id="password" type="password" placeholder="Nouveau mot de passe"></li>
|
||||
<li><label for="locale">Langue :</label>
|
||||
<select name="locale" id="locale">
|
||||
<? foreach($config['locales'] as $locale) { ?>
|
||||
<option <?=$userProfile->locale==$locale[0]?'selected':''?> value="<?=$locale[0]?>"><?=$locale[5]?></option>
|
||||
<? } ?>
|
||||
</select></li>
|
||||
<? if($user->role >= 1000) { ?>
|
||||
<li><label for="role">Rang : </label>
|
||||
<select name="role" id="role">
|
||||
<? foreach($config['roles'] as $role) { ?>
|
||||
<option <?=$userProfile->role==$role[0]?'selected':''?> value="<?=$role[0]?>"><?=$role[1]?></option>
|
||||
<? } ?>
|
||||
</select></li>
|
||||
<? } ?>
|
||||
<li><label for="website">Site internet :</label><input name="website" id="website" type="text" value="<?=$userProfile->website?>" placeholder="mountain.org"></li>
|
||||
<div id="description">
|
||||
<ul>
|
||||
<li><label for="name">Nom d'utilisateur :</label><input name="name" id="name" type="text" value="<?=$userProfile->name?>" placeholder="Charlie"></li>
|
||||
<li><label for="email">Adresse mail :</label><input name="email" id="email" type="email" value="<?=$userProfile->email?>" placeholder="charlie@mountain.org"></li>
|
||||
<li><label for="password">Mot de passe :</label><input name="password" id="password" type="password" placeholder="Nouveau mot de passe"></li>
|
||||
<li><label for="locale">Langue :</label>
|
||||
<select name="locale" id="locale">
|
||||
<? foreach($locales->objs as $locale) { ?>
|
||||
<option <?=$userProfile->get_locale()==$locale->display_name?'selected':''?> value="<?=$locale->name?>"><?=$locale->display_name?></option>
|
||||
<? } ?>
|
||||
</select></li>
|
||||
<li><label for="timezone">Fuseau horaire :</label>
|
||||
<select name="timezone" id="timezone">
|
||||
<? $timezones = timezone_identifiers_list();
|
||||
foreach($timezones as $timezone) { ?>
|
||||
<option <?=$userProfile->timezone==$timezone?'selected':''?> value="<?=$timezone?>"><?=$timezone?></option>
|
||||
<? } ?>
|
||||
</select></li>
|
||||
<? if($user->rankIsHigher("administrator")) { ?>
|
||||
<li><label for="rank">Rang : </label>
|
||||
<select name="rank" id="rank">
|
||||
<? foreach($ranks as $rank) { ?>
|
||||
<option <?=$userProfile->rank==$rank[3]?'selected':''?> value="<?=$rank[3]?>"><?=$rank[1]?></option>
|
||||
<? } ?>
|
||||
</select></li>
|
||||
<? } ?>
|
||||
<li><label for="website">Site internet :</label><input name="website" id="website" type="url" value="<?=$userProfile->website?>" placeholder="https://mountain.org"></li>
|
||||
|
||||
<input name="submit" id="submit" type="submit" value="Envoyer">
|
||||
</ul>
|
||||
</div>
|
||||
<div style="clear:both;"></div>
|
||||
<input name="submit" id="submit" type="submit" value="Envoyer">
|
||||
</ul>
|
||||
</div>
|
||||
<div style="clear:both;"></div>
|
||||
</form>
|
||||
</article>
|
||||
<? } else { ?>
|
||||
|
||||
@@ -10,26 +10,26 @@
|
||||
<section id="profile">
|
||||
<? if ($userProfile->id != 0) { ?>
|
||||
<h1><?=$userProfile->name?></h1>
|
||||
<? if($user->role >= 800 || $user->id == $userProfile->id) { ?>
|
||||
<a class="subtitle" id="editprofile" href="<?=$config['rel_root_folder']?>user/p/<?=$userProfile->id?>/edit"><i class="fa fa-pencil"></i> Éditer les paramètres du compte</a>
|
||||
<? if($user->rankIsHigher("moderator") || $user->id == $userProfile->id) { ?>
|
||||
<a class="subtitle" id="editprofile" href="<?=$config['rel_root_folder']?>user/p/<?=$userProfile->id?>/edit"><i class="fas fa-pencil-alt"></i> Éditer les paramètres du compte</a>
|
||||
<? } ?>
|
||||
<article>
|
||||
<div id="profilepart">
|
||||
<? if(isset($mailsent) AND $mailsent==1) { ?>
|
||||
<p style="color: #006600;">Le message a bien été envoyé.</p>
|
||||
<? } ?>
|
||||
<aside class="<?=$userProfile->avatar=='t'?'':'no'?>avatar">
|
||||
<aside class="<?=$userProfile->is_avatar_present=='t'?'':'no'?>avatar">
|
||||
<img alt="Avatar" id="profileavatar" src="<?=$config['rel_root_folder']?>medias/avatars/<?=$userProfile->id?>_p.jpg" alt="Profile picture">
|
||||
<i id="profilenoavatar" class="fa fa-user-secret"></i>
|
||||
<i id="profilenoavatar" class="fas fa-user-secret"></i>
|
||||
</aside>
|
||||
<div id="description">
|
||||
<p>Langue : <?=$config['locales'][$userProfile->locale][5]?></p>
|
||||
<p>Inscrit le <? echo strftime('%e %B %G, %kh%Mm%Ss',strtotime($userProfile->registered)) ?> <small><abbr title="Temps Universel Coordonné">UTC</abbr></small></p>
|
||||
<p>Dernière connexion le <? echo strftime('%e %B %G, %kh%Mm%Ss',strtotime($userProfile->lastlogin)) ?> <small><abbr title="Temps Universel Coordonné">UTC</abbr></small></p>
|
||||
<p><?=$userProfile->role()?></p>
|
||||
<p>Langue : <?=$userProfile->get_locale()?></p>
|
||||
<p>Inscrit le <? echo datefmt_format($user->datetime_format,date_create($userProfile->register_date, new DateTimeZone("UTC"))) ?></p>
|
||||
<p>Dernière connexion le <? echo datefmt_format($user->datetime_format,date_create($userProfile->visit_date, new DateTimeZone("UTC"))) ?></p>
|
||||
<p><?=$userProfile->get_rank()?></p>
|
||||
<p>
|
||||
<? if ($userProfile->website != "") { ?>
|
||||
<a target="_blank" href="<?=$userProfile->website?>">Site internet <span class="external-link"><i class="fa fa-external-link"></i></span></a>
|
||||
<a target="_blank" href="<?=$userProfile->website?>">Site internet <span class="external-link"><i class="fas fa-external-link-alt"></i></span></a>
|
||||
<? }
|
||||
if ($userProfile->website != "" AND $userProfile->id != $user->id) { ?>
|
||||
—
|
||||
@@ -37,11 +37,11 @@
|
||||
if ($userProfile->id != $user->id) { ?>
|
||||
<a href="#" onclick="$('#profilepart').hide(0, function(){$('#contact').show('fast');});">Contacter par mail</a>
|
||||
<? }
|
||||
if ($user->role >= 600 AND ($userProfile->website != "" OR $userProfile->id != $user->id)) { ?>
|
||||
if ($user->rankIsHigher("premium") AND ($userProfile->website != "" OR $userProfile->id != $user->id)) { ?>
|
||||
—
|
||||
<? }
|
||||
if ($user->role >= 600) { ?>
|
||||
<a href="mailto:<?=$userProfile->mail?>"><?=$userProfile->mail?></a>
|
||||
if ($user->rankIsHigher("premium")) { ?>
|
||||
<a href="mailto:<?=$userProfile->email?>"><?=$userProfile->email?></a>
|
||||
<? } ?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1>Inscription.</h1>
|
||||
<h1>Inscription</h1>
|
||||
<form class="form" action="<?=$config['rel_root_folder']?>user/signin" method="post" id="signin">
|
||||
<? if(isset($_GET['error']) AND $_GET['error']=="name") { ?>
|
||||
<p style="color: red;">Veuillez choisir un autre nom d'utilisateur.</p>
|
||||
<? } ?>
|
||||
<? if(isset($_GET['error']) AND $_GET['error']=="mail") { ?>
|
||||
<? if(isset($_GET['error']) AND $_GET['error']=="email") { ?>
|
||||
<p style="color: red;">Cette adresse mail est déjà prise.</p>
|
||||
<? } ?>
|
||||
<? if(isset($_GET['error']) AND $_GET['error']=="empty") { ?>
|
||||
@@ -25,7 +25,7 @@
|
||||
<? } ?>
|
||||
<input type="text" name="login" id="login" placeholder="Nom d'utilisateur">
|
||||
<input type="password" name="password" id="password" placeholder="Mot de passe">
|
||||
<input type="text" name="mail" id="mail" placeholder="Adresse mail">
|
||||
<input type="email" name="email" id="email" placeholder="Adresse mail">
|
||||
<p id="captcha">
|
||||
<input type="hidden" id="captchahidden" name="captcha" value="10">
|
||||
<span id="captchatext">Merci d'attendre <b id="captchasec">10 s</b> avant de pouvoir vous inscrire.<br>
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<form class="form" action="<?=$config['rel_root_folder']?>wiki/<?=$wikiPage->url?>/edit" method="post">
|
||||
<form class="form" action="<?=$config['rel_root_folder']?>wiki/<?=$wikiPage->permalink?>/edit" method="post">
|
||||
<h1>
|
||||
<select name="locale" id="locale">
|
||||
<? foreach($config['locales'] as $locale) { ?>
|
||||
<option <?=$wikiPage->locale==$locale[0]?'selected':''?> value="<?=$locale[0]?>"><?=$locale[5]?></option>
|
||||
<? foreach($locales->objs as $locale) { ?>
|
||||
<option <?=$wikiPage->locale==$locale->name?'selected':''?> value="<?=$locale->name?>"><?=$locale->display_name?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
<input type="text" value="<?=$wikiPage->title?>" name="title" id="title" placeholder="Titre">
|
||||
<input type="text" value="<?=$wikiPage->name?>" name="name" id="name" placeholder="Titre">
|
||||
</h1>
|
||||
|
||||
<textarea rows="30" name="content" id="content" placeholder="Contenu de la page"><?=$wikiPage->content?></textarea>
|
||||
|
||||
@@ -7,28 +7,29 @@
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section id="wiki_page" <?=!$wikiPage->is_archive()?'class="archive"':''?>>
|
||||
<h1><?=$wikiPage->name?>.</h1>
|
||||
<? if($user->rank_is_higher('premium')) { ?>
|
||||
<section id="wiki_page" <?=$wikiPage->is_archive=="t"||$wikiPage->is_public=="f"?'class="archive"':''?>>
|
||||
<h1><?=$wikiPage->name?></h1>
|
||||
<? if($user->rankIsHigher('premium')) { ?>
|
||||
<span class="subtitle">
|
||||
<? if(isset($wikiHistory_list)) { ?>
|
||||
<? if(isset($wikiHistory)) { ?>
|
||||
<select id="wikihistory">
|
||||
<? $i = 0;
|
||||
foreach ($wikiHistory_list as $row) { ?>
|
||||
<option <?=$row->id==$wikiPage->id?'selected':''?> value="<?=$i?>"><?=$row->is_archive=="f"?'• ':''?><? echo strftime('%d/%m/%Y %H:%M:%S',strtotime($row->lastedit)) ?></option>
|
||||
foreach ($wikiHistory->objs as $row) { ?>
|
||||
<option <?=$row->version_id==$wikiPage->version_id?'selected':''?> value="<?=$i?>"><?=$row->is_archive=="f"?'• ':''?><? echo datefmt_format($user->datetimeshort_format,date_create($row->update_date, new DateTimeZone("UTC"))) ?></option>
|
||||
<? $i++;
|
||||
} ?>
|
||||
</select>
|
||||
<? }
|
||||
if ($user->rank_is_higher('moderator') && isset($wikiHistory_list)) { ?>
|
||||
if ($user->rankIsHigher('moderator') && isset($wikiHistory)) { ?>
|
||||
—
|
||||
<? }
|
||||
if ($user->rank_is_higher('moderator')) { ?>
|
||||
<a href="<?=$config['rel_root_folder']?>wiki/<?=$wikiPage->url?>/edit"><i class="fa fa-pencil"></i> Éditer la page</a>
|
||||
<? if (!$wikiPage->is_archive()) { ?>
|
||||
—
|
||||
<a href="<?=$config['rel_root_folder']?>wiki/<?=$wikiPage->url?>/delete"><i class="fa fa-trash"></i> Effacer la page</a>
|
||||
<? } ?>
|
||||
if ($user->rankIsHigher('moderator')) { ?>
|
||||
<a href="<?=$config['rel_root_folder']?>wiki/<?=$wikiPage->permalink?>/edit"><i class="fas fa-pencil-alt"></i> Éditer la page</a> —
|
||||
<? if ($wikiPage->is_public=="t") { ?>
|
||||
<a href="<?=$config['rel_root_folder']?>wiki/<?=$wikiPage->permalink?>/delete"><i class="fas fa-trash"></i> Effacer la page</a>
|
||||
<? } else { ?>
|
||||
<a href="<?=$config['rel_root_folder']?>wiki/<?=$wikiPage->permalink?>/restore"><i class="fas fa-eye"></i> Restaurer la page</a>
|
||||
<? }?>
|
||||
<? } ?>
|
||||
</span>
|
||||
<? } ?>
|
||||
@@ -37,15 +38,15 @@
|
||||
<?=$wikiPage->content_html?>
|
||||
</div>
|
||||
|
||||
<p id="wikiTimestamp">Page mise à jour le <? echo strftime('%e %B %G, %kh%Mm%Ss',strtotime($wikiPage->update_date())) ?> <small><abbr title="Temps Universel Coordonné">UTC</abbr></small></p>
|
||||
<p id="wikiTimestamp">Page mise à jour le <? echo datefmt_format($user->datetime_format,date_create($wikiPage->update_date, new DateTimeZone("UTC"))) ?></p>
|
||||
|
||||
<div style="clear: both;"> </div>
|
||||
</section>
|
||||
|
||||
<? if($user->rank_is_higher('premium')) { ?>
|
||||
<? if($user->rankIsHigher('premium')) { ?>
|
||||
<script type="text/javascript">
|
||||
$( "#wikihistory" ).change(function() {
|
||||
window.location.href = "<?=$config['rel_root_folder']?>wiki/<?=$wikiPage->url?>/"+$( this ).val();
|
||||
window.location.href = "<?=$config['rel_root_folder']?>wiki/<?=$wikiPage->permalink?>/"+$( this ).val();
|
||||
});
|
||||
</script>
|
||||
<? } ?>
|
||||
|
||||
29
views/img/alpine_hut.svg
Executable file
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="32" height="32" viewBox="0 0 31.999999 31.999998" id="svg4371" version="1.1" inkscape:version="0.91 r13725" sodipodi:docname="refuge-garde.svg">
|
||||
<defs id="defs4373"/>
|
||||
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="15.839192" inkscape:cx="20.352187" inkscape:cy="10.481553" inkscape:document-units="px" inkscape:current-layer="g4689" showgrid="false" inkscape:window-width="1366" inkscape:window-height="745" inkscape:window-x="0" inkscape:window-y="23" inkscape:window-maximized="1" units="px"/>
|
||||
<metadata id="metadata4376">
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||
<dc:title/>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g inkscape:label="Calque 1" inkscape:groupmode="layer" id="layer1" transform="translate(0,-1020.3622)">
|
||||
<g transform="translate(-41.001273,2.4589125)" id="g4668" style="fill:#ef2929;fill-opacity:1">
|
||||
<g transform="translate(-22.998727,-2.4589163)" style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="g4689-8">
|
||||
<path style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 66,1034.3622 6,0 8,-6 8,6 6,0 0,-2 -14,-10 -14,10 z" id="path4462-1-2" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccccccc"/>
|
||||
<path style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 80,1050.3622 -10,0 0,-18 10,-7 10,7 0,18 z" id="path4460-7-7" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccccc"/>
|
||||
<path style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 71,1029.3622 0,-6 4,0 0,3 z" id="path4464-3-6" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccc"/>
|
||||
</g>
|
||||
<g transform="translate(-22.998727,-2.4589163)" id="g4689" style="fill:#ef2929;fill-opacity:1">
|
||||
<path sodipodi:nodetypes="ccccccccc" inkscape:connector-curvature="0" id="path4462-1" d="m 66,1034.3622 6,0 8,-6 8,6 6,0 0,-2 -14,-10 -14,10 z" style="fill:#ef2929;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/>
|
||||
<path sodipodi:nodetypes="ccccccc" inkscape:connector-curvature="0" id="path4460-7" d="m 80,1050.3622 -10,0 0,-18 10,-7 10,7 0,18 z" style="fill:#ef2929;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/>
|
||||
<path sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" id="path4464-3" d="m 71,1029.3622 0,-6 4,0 0,3 z" style="fill:#ef2929;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.7 KiB |
BIN
views/img/aside.jpg
Executable file → Normal file
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 94 KiB |
27
views/img/basic_hut.svg
Executable file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="32" height="32" viewBox="0 0 31.999999 31.999998" id="svg4371" version="1.1" inkscape:version="0.91 r13725" sodipodi:docname="abri.svg">
|
||||
<defs id="defs4373"/>
|
||||
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="7.9195959" inkscape:cx="33.591252" inkscape:cy="15.994383" inkscape:document-units="px" inkscape:current-layer="g4668" showgrid="false" inkscape:window-width="1366" inkscape:window-height="745" inkscape:window-x="0" inkscape:window-y="23" inkscape:window-maximized="1" units="px"/>
|
||||
<metadata id="metadata4376">
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||
<dc:title/>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g inkscape:label="Calque 1" inkscape:groupmode="layer" id="layer1" transform="translate(0,-1020.3622)">
|
||||
<g transform="translate(-32,-3.8146968e-6)" style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="g4668-0">
|
||||
<path style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 34,1034.3622 6,0 8,-6 8,6 6,0 0,-2 -14,-10 -14,10 z" id="path4462-3-8" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccccccc"/>
|
||||
<path style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 38,1050.3622 0,-18 4,0 0,18 z" id="path4489-64" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccc"/>
|
||||
<path style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 54,1050.3622 0,-18 4,0 0,18 z" id="path4489-6-3" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccc"/>
|
||||
</g>
|
||||
<g transform="translate(-32,-3.8146968e-6)" id="g4668" style="fill:#ef2929;fill-opacity:1">
|
||||
<path sodipodi:nodetypes="ccccccccc" inkscape:connector-curvature="0" id="path4462-3" d="m 34,1034.3622 6,0 8,-6 8,6 6,0 0,-2 -14,-10 -14,10 z" style="fill:#ef2929;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/>
|
||||
<path sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" id="path4489" d="m 38,1050.3622 0,-18 4,0 0,18 z" style="fill:#ef2929;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/>
|
||||
<path sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" id="path4489-6" d="m 54,1050.3622 0,-18 4,0 0,18 z" style="fill:#ef2929;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.5 KiB |
27
views/img/bivouac.svg
Executable file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="32" height="32" viewBox="0 0 31.999999 31.999998" id="svg4371" version="1.1" inkscape:version="0.91 r13725" sodipodi:docname="bivouac.svg">
|
||||
<defs id="defs4373"/>
|
||||
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="12.5625" inkscape:cx="19.992835" inkscape:cy="5.4636994" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" inkscape:window-width="1366" inkscape:window-height="745" inkscape:window-x="0" inkscape:window-y="23" inkscape:window-maximized="1" units="px"/>
|
||||
<metadata id="metadata4376">
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||
<dc:title/>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g inkscape:label="Calque 1" inkscape:groupmode="layer" id="layer1" transform="translate(0,-1020.3622)">
|
||||
<g transform="translate(-128,-3.814697e-6)" inkscape:export-ydpi="44.365292" inkscape:export-xdpi="44.365292" inkscape:export-filename="/home/leo/Projets/WRI/images/icones/bivouac.png" style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="g4682-8">
|
||||
<path style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 130,1050.3622 4,0 17,-28 -5,0 -16,26 z" id="path4554-2" inkscape:connector-curvature="0" sodipodi:nodetypes="cccccc"/>
|
||||
<path style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 158,1050.3622 -4,0 -17,-28 5,0 16,26 z" id="path4554-6-4" inkscape:connector-curvature="0" sodipodi:nodetypes="cccccc"/>
|
||||
<path style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 134,1050.3622 0,-4 7,0 3,-5 3,5 7,0 0,4 z" id="path4571-6" inkscape:connector-curvature="0" sodipodi:nodetypes="cccccccc"/>
|
||||
</g>
|
||||
<g transform="translate(-128,-3.814697e-6)" id="g4682" style="fill:#ef2929;fill-opacity:1" inkscape:export-filename="/home/leo/Projets/WRI/images/icones/bivouac.png" inkscape:export-xdpi="44.365292" inkscape:export-ydpi="44.365292">
|
||||
<path sodipodi:nodetypes="cccccc" inkscape:connector-curvature="0" id="path4554" d="m 130,1050.3622 4,0 17,-28 -5,0 -16,26 z" style="fill:#ef2929;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/>
|
||||
<path sodipodi:nodetypes="cccccc" inkscape:connector-curvature="0" id="path4554-6" d="m 158,1050.3622 -4,0 -17,-28 5,0 16,26 z" style="fill:#ef2929;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/>
|
||||
<path sodipodi:nodetypes="cccccccc" inkscape:connector-curvature="0" id="path4571" d="m 134,1050.3622 0,-4 7,0 3,-5 3,5 7,0 0,4 z" style="fill:#ef2929;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.8 KiB |
110
views/img/campsite.svg
Executable file
@@ -0,0 +1,110 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="32"
|
||||
height="32"
|
||||
viewBox="0 0 31.999999 31.999998"
|
||||
id="svg4371"
|
||||
version="1.1"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="camping.svg">
|
||||
<defs
|
||||
id="defs4373" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="12.5625"
|
||||
inkscape:cx="5.7838798"
|
||||
inkscape:cy="11.195043"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="998"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
units="px" />
|
||||
<metadata
|
||||
id="metadata4376">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Calque 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-1020.3622)">
|
||||
<g
|
||||
transform="translate(-128,-3.814697e-6)"
|
||||
inkscape:export-ydpi="44.365292"
|
||||
inkscape:export-xdpi="44.365292"
|
||||
inkscape:export-filename="/home/leo/Projets/WRI/images/icones/bivouac.png"
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="g4682-8">
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 130,1050.3622 h 4 l 17,-28 h -5 l -16,26 z"
|
||||
id="path4554-2"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccccc" />
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 158,1050.3622 h -4 l -17,-28 h 5 l 16,26 z"
|
||||
id="path4554-6-4"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccccc" />
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 134,1050.3622 v -4 h 7 l 3,-5 3,5 h 7 v 4 z"
|
||||
id="path4571-6"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccccccc" />
|
||||
</g>
|
||||
<g
|
||||
transform="translate(-128,-3.814697e-6)"
|
||||
id="g4682"
|
||||
style="fill:#4e9a06;fill-opacity:1"
|
||||
inkscape:export-filename="/home/leo/Projets/WRI/images/icones/bivouac.png"
|
||||
inkscape:export-xdpi="44.365292"
|
||||
inkscape:export-ydpi="44.365292">
|
||||
<path
|
||||
sodipodi:nodetypes="cccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4554"
|
||||
d="m 130,1050.3622 h 4 l 17,-28 h -5 l -16,26 z"
|
||||
style="fill:#4e9a06;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
<path
|
||||
sodipodi:nodetypes="cccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4554-6"
|
||||
d="m 158,1050.3622 h -4 l -17,-28 h 5 l 16,26 z"
|
||||
style="fill:#4e9a06;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
<path
|
||||
sodipodi:nodetypes="cccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4571"
|
||||
d="m 134,1050.3622 v -4 h 7 l 3,-5 3,5 h 7 v 4 z"
|
||||
style="fill:#4e9a06;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.4 KiB |
30
views/img/halt.svg
Executable file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="32" height="32" viewBox="0 0 31.999999 31.999998" id="svg4371" version="1.1" inkscape:version="0.91 r13725" sodipodi:docname="gite-d-etape.svg">
|
||||
<defs id="defs4373"/>
|
||||
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="11.2" inkscape:cx="19.601284" inkscape:cy="15.042108" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" inkscape:window-width="1366" inkscape:window-height="745" inkscape:window-x="0" inkscape:window-y="23" inkscape:window-maximized="1" units="px"/>
|
||||
<metadata id="metadata4376">
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||
<dc:title/>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g inkscape:label="Calque 1" inkscape:groupmode="layer" id="layer1" transform="translate(0,-1020.3622)">
|
||||
<g transform="translate(-41.001273,2.4589125)" id="g4668" style="fill:#ef2929;fill-opacity:1">
|
||||
<g transform="translate(-22.998727,-2.4589163)" id="g4689" style="fill:#ef2929;fill-opacity:1"/>
|
||||
<g transform="translate(-54.998727,-2.4589163)" style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="g4677-7">
|
||||
<path style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 112,1050.3622 -10,0 0,-18 10,-7 9.99999,7 0,18 z" id="path4460-7-1-2" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccccc"/>
|
||||
<path style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 98,1034.3622 6,0 8,-6 7.99999,6 6,0 0,-2 -13.99999,-10 -14,10 z" id="path4462-1-5-9" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccccccc"/>
|
||||
<path style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 103,1029.3622 0,-6 4,0 0,3 z" id="path4464-3-1-9" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccc"/>
|
||||
</g>
|
||||
<g transform="translate(-54.998727,-2.4589163)" id="g4677" style="fill:#4e9a06;fill-opacity:1">
|
||||
<path sodipodi:nodetypes="ccccccc" inkscape:connector-curvature="0" id="path4460-7-1" d="m 112,1050.3622 -10,0 0,-18 10,-7 9.99999,7 0,18 z" style="fill:#4e9a06;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/>
|
||||
<path sodipodi:nodetypes="ccccccccc" inkscape:connector-curvature="0" id="path4462-1-5" d="m 98,1034.3622 6,0 8,-6 7.99999,6 6,0 0,-2 -13.99999,-10 -14,10 z" style="fill:#4e9a06;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/>
|
||||
<path sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" id="path4464-3-1" d="m 103,1029.3622 0,-6 4,0 0,3 z" style="fill:#4e9a06;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 27 KiB |
28
views/img/wilderness_hut.svg
Executable file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="32" height="32" viewBox="0 0 31.999999 31.999998" id="svg4371" version="1.1" inkscape:version="0.91 r13725" sodipodi:docname="cabane-non-gardee.svg">
|
||||
<defs id="defs4373"/>
|
||||
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="2.8" inkscape:cx="65.143784" inkscape:cy="39.340085" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" inkscape:window-width="1366" inkscape:window-height="745" inkscape:window-x="0" inkscape:window-y="23" inkscape:window-maximized="1" units="px"/>
|
||||
<metadata id="metadata4376">
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||
<dc:title/>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g inkscape:label="Calque 1" inkscape:groupmode="layer" id="layer1" transform="translate(0,-1020.3622)">
|
||||
<g transform="translate(0,-3.8146968e-6)" style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="g4663-6">
|
||||
<path style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 16,1050.3622 -10,0 0,-18 4,0 0,14 12,0 0,-14 4,0 0,18 z" id="path4460-73" inkscape:connector-curvature="0" sodipodi:nodetypes="cccccccccc"/>
|
||||
<path style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 2,1034.3622 6,0 8,-6 8,6 6,0 0,-2 -14,-10 -14,10 z" id="path4462-4" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccccccc"/>
|
||||
<path style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 7,1029.3622 0,-6 4,0 0,3 z" id="path4464-1" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccc"/>
|
||||
<rect y="1028.9393" x="8.5736694" height="17.766058" width="15.467961" id="rect4328" style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"/>
|
||||
</g>
|
||||
<g transform="translate(0,-3.8146968e-6)" id="g4663" style="fill:#ef2929;fill-opacity:1">
|
||||
<path sodipodi:nodetypes="cccccccccc" inkscape:connector-curvature="0" id="path4460" d="m 16,1050.3622 -10,0 0,-18 4,0 0,14 12,0 0,-14 4,0 0,18 z" style="fill:#ef2929;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/>
|
||||
<path sodipodi:nodetypes="ccccccccc" inkscape:connector-curvature="0" id="path4462" d="m 2,1034.3622 6,0 8,-6 8,6 6,0 0,-2 -14,-10 -14,10 z" style="fill:#ef2929;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/>
|
||||
<path sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" id="path4464" d="m 7,1029.3622 0,-6 4,0 0,3 z" style="fill:#ef2929;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.9 KiB |
@@ -21,12 +21,18 @@ function reduce() {
|
||||
}, 100, function() {
|
||||
// Animation complete.
|
||||
});
|
||||
$( "header a.on-bar" ).animate({
|
||||
$( "header li:not(.with-subtitle) a.on-bar" ).animate({
|
||||
paddingTop: "15px",
|
||||
paddingBottom: "5px"
|
||||
}, 100, function() {
|
||||
// Animation complete.
|
||||
});
|
||||
$( "header li.with-subtitle a.on-bar" ).animate({
|
||||
paddingTop: "5px",
|
||||
paddingBottom: "15px"
|
||||
}, 100, function() {
|
||||
// Animation complete.
|
||||
});
|
||||
}
|
||||
|
||||
function enlarge() {
|
||||
@@ -50,21 +56,27 @@ function enlarge() {
|
||||
}, 100, function() {
|
||||
// Animation complete.
|
||||
});
|
||||
$( "header a.on-bar" ).animate({
|
||||
$( "header li:not(.with-subtitle) a.on-bar" ).animate({
|
||||
paddingTop: "25px",
|
||||
paddingBottom: "15px"
|
||||
}, 100, function() {
|
||||
// Animation complete.
|
||||
});
|
||||
$( "header li.with-subtitle a.on-bar" ).animate({
|
||||
paddingTop: "15px",
|
||||
paddingBottom: "25px"
|
||||
}, 100, function() {
|
||||
// Animation complete.
|
||||
});
|
||||
}
|
||||
|
||||
$(window).scroll(function() {
|
||||
var position = $(window).scrollTop();
|
||||
if (position>80 && small!=1) {
|
||||
if (position>80 && small!=1 && $('body').width() > 800) {
|
||||
small = 1;
|
||||
reduce();
|
||||
}
|
||||
else if (position<=80 && small!=0) {
|
||||
else if (position<=80 && small!=0 && $('body').width() > 800) {
|
||||
small = 0;
|
||||
enlarge();
|
||||
}
|
||||
|
||||
@@ -2,20 +2,20 @@ var mymap;
|
||||
|
||||
$( document ).ready(function() {
|
||||
// Differents layers for the map
|
||||
var osmfr = L.tileLayer('//{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png', {maxZoom: 20, attribution: 'Maps © <a href="http://www.openstreetmap.fr">OpenSreetMap France</a>, Data © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap contributors</a>'});
|
||||
var wikimedia = L.tileLayer('//maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png', {maxZoom: 18, attribution: 'Maps © <a href="http://wikimedia.org">Wikimedia</a>, Data © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap contributors</a>'});
|
||||
var topo_maptiler = L.tileLayer('https://api.maptiler.com/maps/topographique/{z}/{x}/{y}.png?key=Sm8M7mJ53GtYdl773rpi', {tms: false, attribution: 'Carte © <a href="https://www.maptiler.com/copyright/" target="_blank">MapTiler</a>, Données © <a href="http://www.openstreetmap.org/copyright" target="_blank">Contributeurs OpenStreetMap</a>', tileSize: 512, zoomOffset: -1, minZoom: 1});
|
||||
var ign = L.tileLayer('https://data.geopf.fr/private/wmts?&REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE=normal&TILEMATRIXSET=PM&FORMAT=image/jpeg&LAYER=GEOGRAPHICALGRIDSYSTEMS.MAPS&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&apikey=ign_scan_ws', {attribution: 'Carte & Connées © <a href="http://ign.fr/" target="_blank">IGN-F/Géoportail</a>'});
|
||||
|
||||
// Base layers
|
||||
var baseLayers = {
|
||||
"OSM France": osmfr,
|
||||
"OSM Wikimedia": wikimedia,
|
||||
"OpenStreetMap": topo_maptiler,
|
||||
"IGN France": ign
|
||||
};
|
||||
|
||||
mymap = L.map('mapid', {
|
||||
zoomControl: false,
|
||||
layers: [wikimedia],
|
||||
}).setView([47.018, 3.142], 6);
|
||||
$("#map-credits").html(wikimedia.getAttribution());
|
||||
layers: [topo_maptiler]
|
||||
}).setView([47, 3], 6);
|
||||
$("#map-credits").html(topo_maptiler.getAttribution());
|
||||
|
||||
L.control.scale({
|
||||
position: "bottomleft",
|
||||
|
||||
82
views/js/d.poi_map.js
Executable file
@@ -0,0 +1,82 @@
|
||||
var mymap;
|
||||
var poi_layer;
|
||||
|
||||
$( document ).ready(function() {
|
||||
// Differents layers for the map
|
||||
var topo_maptiler = L.tileLayer('https://api.maptiler.com/maps/topographique/{z}/{x}/{y}.png?key=Sm8M7mJ53GtYdl773rpi', {tms: false, attribution: 'Carte © <a href="https://www.maptiler.com/copyright/" target="_blank">MapTiler</a>, Données © <a href="http://www.openstreetmap.org/copyright" target="_blank">Contributeurs OpenStreetMap</a>', tileSize: 512, zoomOffset: -1, minZoom: 1});
|
||||
var ign = L.tileLayer('https://data.geopf.fr/private/wmts?&REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE=normal&TILEMATRIXSET=PM&FORMAT=image/jpeg&LAYER=GEOGRAPHICALGRIDSYSTEMS.MAPS&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&apikey=ign_scan_ws', {attribution: 'Carte & Connées © <a href="http://ign.fr/" target="_blank">IGN-F/Géoportail</a>'});
|
||||
// Base layers
|
||||
var baseLayers = {
|
||||
"OpenStreetMap": topo_maptiler,
|
||||
"IGN France": ign
|
||||
};
|
||||
|
||||
mymap = L.map('mapid', {
|
||||
zoomControl: false,
|
||||
layers: [topo_maptiler]
|
||||
}).setView([47, 3], 6);
|
||||
$("#map-credits").html(topo_maptiler.getAttribution());
|
||||
|
||||
L.control.scale({
|
||||
position: "bottomleft",
|
||||
imperial: false
|
||||
}).addTo(mymap);
|
||||
|
||||
L.control.fullscreen({
|
||||
position: "bottomleft"
|
||||
}).addTo(mymap);
|
||||
|
||||
L.control.zoom({
|
||||
zoomOutText: "<i class=\"fa fa-minus\" aria-hidden=\"true\"></i>",
|
||||
zoomInText: "<i class=\"fa fa-plus\" aria-hidden=\"true\"></i>",
|
||||
position: "bottomleft"
|
||||
}).addTo(mymap);
|
||||
|
||||
L.control.layers(baseLayers,null,{
|
||||
position: "bottomright"
|
||||
}).addTo(mymap);
|
||||
|
||||
mymap.removeControl(mymap.attributionControl);
|
||||
|
||||
mymap.on('baselayerchange', function(e) {
|
||||
$("#map-credits").html(e.layer.getAttribution());
|
||||
});
|
||||
|
||||
poi_layer = L.marker([47, 3], {draggable: true}).addTo(mymap);
|
||||
poi_layer.bindTooltip("Glissez moi au bon endroit.", {permanent: true, direction: 'auto'}).openTooltip();
|
||||
|
||||
mymap.on('click', function(e){
|
||||
poi_layer.setLatLng(e.latlng);
|
||||
})
|
||||
poi_layer.on('move', function(e){
|
||||
poi_layer.unbindTooltip();
|
||||
$("#lat").val(+e.latlng.lat.toFixed(6));
|
||||
$("#lon").val(+e.latlng.lng.toFixed(6));
|
||||
$("#elevation_icon").show();
|
||||
})
|
||||
$("#lat,#lon").change(function() { // If the user changes the lat/lon input values manualy
|
||||
if(isNaN($("#lat").val()) || isNaN($("#lon").val()) || $("#lat").val().length==0 || $("#lon").val()==null)
|
||||
$("#elevation_icon").hide();
|
||||
else {
|
||||
$("#elevation_icon").show();
|
||||
poi_layer.setLatLng([$("#lat").val(),$("#lon").val()]);
|
||||
}
|
||||
});
|
||||
|
||||
var poiicon = L.icon({
|
||||
iconSize: [24, 24],
|
||||
iconAnchor: [12, 12]
|
||||
});
|
||||
$("#type_selector label").click(function(e) {
|
||||
poi_layer.unbindTooltip();
|
||||
poiicon.options.iconUrl = e.currentTarget.firstChild.currentSrc;
|
||||
poi_layer.setIcon(poiicon);
|
||||
})
|
||||
$("#elevation_icon").click(function(e) {
|
||||
$(this).find($(".fas")).removeClass('fa-search-location').addClass('fa-spinner').addClass('fa-spin');
|
||||
$.get("./elevation_proxy", {location:$("#lat").val()+","+$("#lon").val()}, function(result){
|
||||
$("#ele").val(result.results[0].elevation);
|
||||
$("#elevation_icon").find($(".fas")).removeClass('fa-spinner').removeClass('fa-spin').addClass('fa-search-location');
|
||||
});
|
||||
})
|
||||
});
|
||||
2337
views/third/font-awesome-4.7.0/css/font-awesome.css
vendored
|
Before Width: | Height: | Size: 434 KiB |
3950
views/third/fontawesome-free-5.4.1-web/css/all.css
Executable file
5
views/third/fontawesome-free-5.4.1-web/css/all.min.css
vendored
Executable file
BIN
views/third/fontawesome-free-5.4.1-web/webfonts/fa-brands-400.eot
Executable file
1175
views/third/fontawesome-free-5.4.1-web/webfonts/fa-brands-400.svg
Executable file
|
After Width: | Height: | Size: 673 KiB |