Alternc  3.2
Alternc logiel libre pour l'hébergement
 All Data Structures Namespaces Files Functions Variables Pages
piwik_userlist.php
Go to the documentation of this file.
1 <?php
2 /*
3  $Id: piwik_userlist.php, author: squidly
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  Purpose of file: listing of mail accounts
27  ----------------------------------------------------------------------
28 */
29 
30 require_once("../class/config.php");
31 include_once("head.php");
32 
33 if (isset($error) && $error) {
34  echo "<p class=\"alert alert-danger\">$error</p>";
35 }
36 
37 //Mail creation.
38 if ($quota->cancreate("piwik")) {
39  $quotapiwik=$quota->getquota('piwik');
40 ?>
41 <h3><?php __("Create a new piwik account");?></h3>
42 <form method="post" action="piwik_addaccount.php" id="main" name="addaccount" >
43  <input type="text" class="int" name="account_name" size="20" id="account_name" maxlength="32" value="<?php if ($quotapiwik['u']==0) {echo $mem->user["login"];}?>"/>
44  <input type="submit" name="submit" class="inb" value="<?php __("Create"); ?>" />
45 </form>
46 
47 <br/>
48 <hr/>
49 <?php
50 
51 if ($quotapiwik['u']>0) {
52 ?>
53 <h3><?php __("Add a new website");?></h3>
54 <form method="post" action="piwik_addsites.php" id="main" name="addsites" >
55  <input type="text" class="int" name="site_urls" size="50" id="site_name" maxlength="255" value="" placeholder="<?php __("URL of the website")?>"/>
56  <input type="submit" name="submit" class="inb" value="<?php __("Create"); ?>" />
57 </form>
58 
59 <br/>
60 <hr/>
61 <?php
62 } // quota > 0
63 } // cancreate piwik
64 ?>
65 
66 <h3><?php __("Existing Piwik accounts"); ?></h3>
67 <?php
68 
69 $userslist = $piwik->users_list();
70 
71 // printVar($piwik->dev());
72 
73 if (empty($userslist)){
74  __("No existing Piwik users");
75 } else {
76 ?>
77 
78 <table class="tlist">
79  <tr><th/><th><?php __("Username");?></th><th align=center><?php __("Connect"); ?></th></tr>
80 <?php
81 
82 $col=1;
83 foreach ($userslist as $user ){
84  $col=3-$col;
85  ?>
86  <tr class="lst_clic<?php echo $col; ?>">
87  <td><div class="ina"><a href="piwik_user_dodel.php?login=<?php echo urlencode($user->login); ?>"><img src="images/delete.png" alt="<?php __("Delete"); ?>" /><?php __("Delete"); ?></a></div></td>
88  <td align=right><?php echo $user->login ?></td>
89  <td><div class="ina"><a href="<?php printf('%s?module=Login&action=logme&login=%s&password=%s', $piwik->url(), $user->login, $user->password); ?>" target="_blank"><?php __('Connect'); ?></a></td>
90  </tr>
91  <?php
92 } // foreach userlist
93 } // empty userlist
94 ?>
95 
96 </table>
97 <?php include_once("foot.php"); ?>