Add Privacy policy (#40)

* add contact fields

* added really simple privacy policy and install proccedure

* add link to policy in footer
This commit is contained in:
jhuesser 2018-08-02 11:48:10 +02:00 committed by Vojtěch Sajdl
parent 9e472db6f9
commit d923a9b88c
4 changed files with 65 additions and 1 deletions

View File

@ -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");

View File

@ -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))
<div class="col-sm-6"><label for="dbpassword"><?php echo _("Password");?>: </label><input type="password" name="dbpassword" value="<?php echo ((isset($_POST['dbpassword']))?htmlspecialchars($_POST['dbpassword'], ENT_QUOTES):'');?>" id="dbpassword" placeholder="<?php echo _("Password");?>" class="form-control" required></div>
</div>
</section>
<section class="install-section clearfix">
<h2><?php echo _("Privacy Policy");?></h2>
<summary><?php echo _("Since you are collection personal information, the GDPR forces you to have a privacy policy. Enter the details below.");?></summary>
<div class="form-group clearfix">
<div class="col-sm-6"><label for="policy_name"><?php echo _("Name");?>: </label><input type="text" name="policy_name" value="<?php echo ((isset($_POST['policy_name']))?htmlspecialchars($_POST['policy_name'], ENT_QUOTES):'');?>" id="policy_name" placeholder="<?php echo _("Company name");?>" class="form-control" required></div>
<div class="col-sm-6"><label for="address"><?php echo _("Address");?>: </label><input type="text" name="address" value="<?php echo ((isset($_POST['address']))?htmlspecialchars($_POST['address'], ENT_QUOTES):'');?>" id="address" placeholder="<?php echo _("Full address");?>" class="form-control" required></div>
</div>
<div class="form-group clearfix">
<div class="col-sm-6"><label for="policy_mail"><?php echo _("E-Mail");?>: </label><input type="text" name="policy_mail" value="<?php echo ((isset($_POST['policy_mail']))?htmlspecialchars($_POST['policy_mail'], ENT_QUOTES):'');?>" id="policy_mail" placeholder="<?php echo _("E-Mail");?>" class="form-control" required></div>
<div class="col-sm-6"><label for="policy_phone"><?php echo _("Phone");?>: </label><input type="text" name="policy_phone" value="<?php echo ((isset($_POST['policy_phone']))?htmlspecialchars($_POST['policy_phone'], ENT_QUOTES):'');?>" id="policy_phone" placeholder="<?php echo _("Phone number");?>" class="form-control"></div>
</div>
<div class="form-group clearfix">
<div class=""><label for="who_we_are"><?php echo _("Who we are");?>: </label><textarea class="form-control" id="who_we_are" rows="3" name="who_we_are" placeholder="<?php echo _("A small text about yourself");?>" value="<?php echo ((isset($_POST['who_we_are']))?htmlspecialchars($_POST['who_we_are'], ENT_QUOTES):'');?>"></textarea></div>
</div>
</section>
<section class="install-section clearfix">
<h2><?php echo _("User");?></h2>
<summary><?php echo _("And finally, we need info to create a new user. You don't have to provide it, but then... No status page admin...");?></summary>

37
policy.php Normal file
View File

@ -0,0 +1,37 @@
<?php
require_once("template.php");
require_once("config.php");
Template::render_header("Privacy Policy");
echo "<h1>" . _("Privcacy Policy") . "</h2>";
echo "<h2>" . _("Who we are") . "</h2>";
echo WHO_WE_ARE;
echo "<h2>" . _("Contact") . "</h2>";
echo POLICY_NAME . "<br>";
echo ADDRESS . "<br>";
echo POLICY_MAIL . "<br>";
if(defined('POLICY_PHONE') && POLICY_PHONE != ""){
echo POLICY_PHONE . "<br>";
}
echo '<h2>' . _("What personal data we collect and why") . '</h2>';
echo '<h3>' . _("Global") . "</h3>";
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.
") . "<br><br>";
echo "<h2>" . _("How we protect your data") . "</h2>";
echo _("In collaboration with our hosting provider we try our best to protect our
databases against access from third parties, losses, misuse or forgery.
") . "<br><br>";
echo "<h2>" . _("Third party that receive your personal data") . "</h2>";
echo "Our hosting provider can access the date we store on their server. We have a data processing agreement with them.";
echo "<h3>" . _("Cookies") . "</h3>";
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();

View File

@ -148,7 +148,7 @@ class Template{
</div>
</div>
</div>
<div class="col-md-4 text-right"><a href="https://github.com/Pryx/server-status/" target="_blank"><i class="fab fa-github" aria-hidden="true"></i></a></div>
<div class="col-md-4 text-right"><a href="policy.php">Imprint & Privacy Policy</a><a href="https://github.com/Pryx/server-status/" target="_blank"><i class="fab fa-github" aria-hidden="true"></i></a></div>
</div><!--/row -->
</div><!--/container -->
</div>