Alternc  3.2
Alternc logiel libre pour l'hébergement
 All Data Structures Namespaces Files Functions Variables Pages
piwik_site_dodel.php
Go to the documentation of this file.
1 <?php
2 /*
3  $Id: piwik_site_dodel.php,v 1.2 2003/06/10 06:45:16 root Exp $
4  ----------------------------------------------------------------------
5  AlternC - Web Hosting System
6  Copyright (C) 2002 by the AlternC Development Team.
7  http://alternc.org/
8  ----------------------------------------------------------------------
9  Based on:
10  Valentin Lacambre's web hosting softwares: http://altern.org/
11  ----------------------------------------------------------------------
12  LICENSE
13 
14  This program is free software; you can redistribute it and/or
15  modify it under the terms of the GNU General Public License (GPL)
16  as published by the Free Software Foundation; either version 2
17  of the License, or (at your option) any later version.
18 
19  This program is distributed in the hope that it will be useful,
20  but WITHOUT ANY WARRANTY; without even the implied warranty of
21  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  GNU General Public License for more details.
23 
24  To read the license please visit http://www.gnu.org/copyleft/gpl.html
25  ----------------------------------------------------------------------
26  Original Author of file: François Serman
27  Purpose of file: Delete piwik websites
28  ----------------------------------------------------------------------
29 */
30 require_once("../class/config.php");
31 
32 $fields = array (
33  "confirm_del" => array ("post", "string", ""),
34  "siteid" => array ("request", "integer", -1),
35 );
37 
38 if ($siteid === -1) {
39  $error=_("Missing site parameters");
40  include('piwik_sitelist.php');
41  exit;
42 }
43 
44 if(!empty($confirm_del) ) {
45 
46  if (! $piwik->site_delete($siteid) ) {
47  $error=$err->errstr();
48  } else {
49  include_once('head.php');
50  __("Site successfully deleted");
51  }
52 
53  include('piwik_sitelist.php');
54  exit;
55 
56 }
57 
58 include_once('head.php');
59 
60 ?>
61 <h3><?php __("Piwik site deletion confirm"); ?></h3>
62 <hr id="topbar"/>
63 <br />
64  <?php __("Do you really want to delete this Piwik website ?");?>
65 <br />
66 <br />
67 
68  <form method="post" action="piwik_site_dodel.php" name="main" id="main">
69  <input type="hidden" name="siteid" value="<?php echo $siteid;?>" />
70  <input type="submit" class="inb" name="confirm_del" value="<?php __("Delete")?>" />
71  <input type="button" class="inb" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='piwik_sitelist.php'" />
72  </form>
73 
74 <?php
75  include_once('foot.php');
76  exit();
77 ?>