Alternc  latest
Alternc logiel libre pour l'hébergement
piwik_site_dodel.php
Go to the documentation of this file.
1 <?php
2 /*
3  ----------------------------------------------------------------------
4  LICENSE
5 
6  This program is free software; you can redistribute it and/or
7  modify it under the terms of the GNU General Public License (GPL)
8  as published by the Free Software Foundation; either version 2
9  of the License, or (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  To read the license please visit http://www.gnu.org/copyleft/gpl.html
17  ----------------------------------------------------------------------
18 */
19 
20 /**
21  * Delete piwik websites
22  *
23  * @copyright AlternC-Team 2000-2017 https://alternc.com/
24  */
25 
26 require_once("../class/config.php");
27 
28 $fields = array (
29  "confirm_del" => array ("post", "string", ""),
30  "siteid" => array ("request", "integer", -1),
31 );
33 
34 if ($siteid === -1) {
35  $msg->raise("ERROR", "piwik", _("Missing site parameters"));
36  include('piwik_sitelist.php');
37  exit;
38 }
39 
40 if(!empty($confirm_del) ) {
41 
42  if ($piwik->site_delete($siteid) ) {
43  $msg->raise("INFO", "piwik", _("Site successfully deleted"));
44  }
45 
46  include('piwik_sitelist.php');
47  exit;
48 
49 }
50 
51 include_once('head.php');
52 
53 ?>
54 <h3><?php __("Piwik site deletion confirm"); ?></h3>
55 <hr id="topbar"/>
56 <br />
57  <?php __("Do you really want to delete this Piwik website ?");?>
58 <br />
59 <br />
60 
61  <form method="post" action="piwik_site_dodel.php" name="main" id="main">
62  <?php csrf_get(); ?>
63  <input type="hidden" name="siteid" value="<?php ehe($siteid);?>" />
64  <input type="submit" class="inb" name="confirm_del" value="<?php __("Delete")?>" />
65  <input type="button" class="inb" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='piwik_sitelist.php'" />
66  </form>
67 
68 <?php
69  include_once('foot.php');
70  exit();
71 ?>
exit
Definition: adm_doadd.php:70
$msg
Definition: bootstrap.php:75
__($str)
Definition: functions.php:404
getFields($fields, $requestOnly=false)
Get the Fields of the posted form from $_REQUEST or POST or GET and check their type.
Definition: functions.php:688
csrf_get($return=false)
Give a new CSRF uniq token for a form the session must be up since the CSRF is linked to the session ...
Definition: functions.php:1159
$fields
Delete piwik websites.