From d923a9b88cbd27ad075a6e987f53114e0f7d109f Mon Sep 17 00:00:00 2001 From: jhuesser Date: Thu, 2 Aug 2018 11:48:10 +0200 Subject: [PATCH] Add Privacy policy (#40) * add contact fields * added really simple privacy policy and install proccedure * add link to policy in footer --- config.php.template | 5 +++++ install.php | 22 ++++++++++++++++++++++ policy.php | 37 +++++++++++++++++++++++++++++++++++++ template.php | 2 +- 4 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 policy.php diff --git a/config.php.template b/config.php.template index 34ae910..ef59173 100644 --- a/config.php.template +++ b/config.php.template @@ -7,6 +7,11 @@ define("TITLE", "##title##"); define("WEB_URL", "##url##"); //Used for links define("MAILER_NAME", "##mailer##"); //Mailer name define("MAILER_ADDRESS", "##mailer_email##"); //Mailer address +define("POLICY_NAME", "##policy_name##"); //name for contact in policy +define("ADDRESS", "##address##"); +define("POLICY_MAIL", "##policy_mail##"); //contact email in policy +define("POLICY_PHONE", "##policy_phone##"); +define("WHO_WE_ARE","##who_we_are##"); define("INSTALL_OVERRIDE", false); define("DEFAULT_LANGUAGE", "en_GB"); diff --git a/install.php b/install.php index 5e17024..b56e6bf 100644 --- a/install.php +++ b/install.php @@ -121,7 +121,13 @@ if(isset($_POST['server']) && empty($message)) $config = str_replace("##user##", $_POST['dbuser'], $config); $config = str_replace("##password##", $_POST['dbpassword'], $config); $config = str_replace("##name##", $_POST['servername'], $config); + $config = str_replace("##policy_name##", $_POST['policy_name'], $config); + $config = str_replace("##address##", $_POST['address'], $config); + $config = str_replace("##policy_mail##", $_POST['policy_mail'], $config); + $config = str_replace("##policy_phone##", $_POST['policy_phone'],$config); + $config = str_replace("##who_we_are##", $_POST['who_we_are'], $config); file_put_contents("config.php", $config); + unlink("config.php.template"); unlink("install.sql"); @@ -176,6 +182,22 @@ if (!empty($message))
" class="form-control" required>
+
+

+ + +
+
" class="form-control" required>
+
" class="form-control" required>
+
+
+
" class="form-control" required>
+
" class="form-control">
+
+
+
+
+

diff --git a/policy.php b/policy.php new file mode 100644 index 0000000..1f0b300 --- /dev/null +++ b/policy.php @@ -0,0 +1,37 @@ +" . _("Privcacy Policy") . ""; + echo "

" . _("Who we are") . "

"; + echo WHO_WE_ARE; + echo "

" . _("Contact") . "

"; + echo POLICY_NAME . "
"; + echo ADDRESS . "
"; + echo POLICY_MAIL . "
"; + if(defined('POLICY_PHONE') && POLICY_PHONE != ""){ + echo POLICY_PHONE . "
"; + } + + echo '

' . _("What personal data we collect and why") . '

'; + echo '

' . _("Global") . "

"; + echo _("If you access our websites, the following information will be saved: IP-address, Date, Time, Browser queries, + General information about your browser, operating system and all search queries on the sites. + This user data will be used for anonym user statistics to recognize trends and improve our content. + ") . "

"; + echo "

" . _("How we protect your data") . "

"; + echo _("In collaboration with our hosting provider we try our best to protect our + databases against access from third parties, losses, misuse or forgery. + ") . "

"; + echo "

" . _("Third party that receive your personal data") . "

"; + echo "Our hosting provider can access the date we store on their server. We have a data processing agreement with them."; + echo "

" . _("Cookies") . "

"; + echo _("This site uses cookies – small text files that are placed on your machine to help the site provide a better user experience. + In general, cookies are used to retain user preferences, store information for things like shopping carts, + and provide anonymised tracking data to third party applications like Google Analytics. + As a rule, cookies will make your browsing experience better. However, you may prefer to disable cookies on this site and on others. + The most effective way to do this is to disable cookies in your browser. We suggest consulting the Help section of your browser + or taking a look at the About Cookies website which offers guidance for all modern browsers"); + + Template::render_footer(); diff --git a/template.php b/template.php index f3a7806..db45898 100644 --- a/template.php +++ b/template.php @@ -148,7 +148,7 @@ class Template{ -
+