removing old styles + integrating mailman lists size spooling
This commit is contained in:
parent
012f612964
commit
51abae4051
|
@ -260,7 +260,6 @@ bureau/admin/sta2_doedit_raw.php -text
|
|||
bureau/admin/sta2_edit_raw.php -text
|
||||
bureau/admin/sta2_list.php -text
|
||||
bureau/admin/stats_members.php -text
|
||||
bureau/admin/styles/base.css -text
|
||||
bureau/admin/styles/style.css -text
|
||||
bureau/admin/template.php -text
|
||||
bureau/admin/web_list.php -text
|
||||
|
@ -288,7 +287,6 @@ bureau/class/m_sta2.php -text
|
|||
bureau/class/mime.php -text
|
||||
bureau/class/reset_stats_conf.php -text
|
||||
bureau/class/variables.php -text
|
||||
bureau/head.php -text
|
||||
bureau/index.php -text
|
||||
bureau/locales/Makefile -text
|
||||
bureau/locales/README -text
|
||||
|
|
|
@ -39,24 +39,4 @@ if (!$mem->checkid())
|
|||
include("main.php");
|
||||
exit;
|
||||
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title><?php __("AlternC Desktop"); ?></title>
|
||||
<link rel="stylesheet" href="styles/style.css" type="text/css" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
</head>
|
||||
<frameset cols="225px,*">
|
||||
<frame src="menu.php" name="left" />
|
||||
<frame src="main.php" name="right" />
|
||||
<noframes>
|
||||
<body>
|
||||
<p>
|
||||
Votre navigateur doit supporter les cadres.<br />
|
||||
Your browser must support frames
|
||||
</p>
|
||||
</body>
|
||||
</noframes>
|
||||
</frameset>
|
||||
</html>
|
||||
?>
|
|
@ -1,339 +0,0 @@
|
|||
body {
|
||||
font-family: sans-serif;
|
||||
font-size: 85%;
|
||||
}
|
||||
|
||||
.hlp {
|
||||
color: #202020;
|
||||
}
|
||||
|
||||
td {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
th {
|
||||
/* color: #007799;*/
|
||||
}
|
||||
|
||||
h3 {
|
||||
color: #CB781A;
|
||||
}
|
||||
|
||||
h4 {
|
||||
color: #007777;
|
||||
}
|
||||
|
||||
hr {
|
||||
border: none;
|
||||
border-top: 1px solid #000;
|
||||
}
|
||||
|
||||
.inp {
|
||||
/* Should not be use anymore !!! */
|
||||
border-color: blue;
|
||||
border-width: 5px;
|
||||
background-color: #500000;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.inc, .inl {
|
||||
border-style: none;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.inb {
|
||||
border: 1px solid #aaa;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.int {
|
||||
border: 1px solid #aaa;
|
||||
color: black;
|
||||
|
||||
}
|
||||
|
||||
.lst1 {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
.lst2 {
|
||||
background-color: #EEEEEE;
|
||||
}
|
||||
|
||||
.dlogin {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.login {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
img {
|
||||
border: 0px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.error {
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Over quota class */
|
||||
.over {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.code {
|
||||
font-size: 16px;
|
||||
font-family: Courier New, Fixed;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
a {
|
||||
color:#333;
|
||||
}
|
||||
a:hover {
|
||||
color:#CB781A;
|
||||
}
|
||||
a:visited {
|
||||
color:#985B16;
|
||||
}
|
||||
|
||||
body#menu {
|
||||
border-right:1px solid #000;
|
||||
font-size: .9em;
|
||||
padding-bottom: 2em;
|
||||
margin:0;
|
||||
}
|
||||
body#menu img {
|
||||
padding: 5px;
|
||||
}
|
||||
body#menu h3 {
|
||||
padding-left: 5px;
|
||||
margin: .5em 0;
|
||||
}
|
||||
#menu-list a {
|
||||
display:block;
|
||||
padding: 2px;
|
||||
margin:0;
|
||||
}
|
||||
#menu-list a:hover {
|
||||
color: #000;
|
||||
background-color: #EBE0D0;
|
||||
}
|
||||
#menu dl {
|
||||
margin: .5em 0;
|
||||
}
|
||||
#menu-list dt {
|
||||
font-weight:bold;
|
||||
color:#777;
|
||||
font-size:.8em;
|
||||
/*margin: 4px 0 2px 0;*/
|
||||
padding: 1px .1em 0 5px;
|
||||
/*background-color: #ccc;*/
|
||||
/*border-bottom: 2px solid #ccc;*/
|
||||
background-color:#bbb;
|
||||
color:white;
|
||||
}
|
||||
#menu-list dd {
|
||||
padding:0;
|
||||
margin:0;
|
||||
font-size: .9em;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
#alternc-logo {
|
||||
padding: .5em ;
|
||||
text-align: center;
|
||||
background-color: #CB781A;
|
||||
}
|
||||
#alternc-logo a {
|
||||
color: #fff;
|
||||
font-weight:bold;
|
||||
}
|
||||
#menu-list dd a {
|
||||
padding: 0 0 0 15px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**** Login ****/
|
||||
|
||||
body.login {
|
||||
text-align:center;
|
||||
margin: 2em 10em;
|
||||
}
|
||||
#wrapper {
|
||||
margin: 0 auto;
|
||||
}
|
||||
body.login form {
|
||||
|
||||
}
|
||||
.login img {
|
||||
padding: 3em 1em 1em;;
|
||||
}
|
||||
.login form table {
|
||||
width: 100%;
|
||||
border: 1px solid #CB781A;
|
||||
border-collapse:collapse;
|
||||
}
|
||||
.login form table thead {
|
||||
font-weight: bold;
|
||||
font-size: 1.5em;
|
||||
padding: 1em;
|
||||
background-color:#CB781A;
|
||||
}
|
||||
.login form table thead td{
|
||||
color: white;
|
||||
}
|
||||
.login form table td.forminfo {
|
||||
padding: 1em;
|
||||
border-top: 1px solid #CB781A;
|
||||
border-bottom: 1px solid #CB781A;
|
||||
font-size: 110%;
|
||||
}
|
||||
|
||||
td.username,
|
||||
td.pass {
|
||||
text-align: right;
|
||||
padding: 0 0 0 .5em;
|
||||
width: 50%;
|
||||
font-weight: bold;
|
||||
font-size: 1.2em;
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
td.input_username,
|
||||
td.input_pass {
|
||||
text-align: left;
|
||||
width: 50%;
|
||||
padding: 0 1em;
|
||||
}
|
||||
td.input_username input,
|
||||
td.input_pass input {
|
||||
/* width: 100%;*/
|
||||
border-color:#CB781A;
|
||||
font-family: Courrier New, fixed;
|
||||
padding: 2px;
|
||||
font-size: 110%;
|
||||
}
|
||||
td.input_username input:hover,
|
||||
td.input_pass input:hover {
|
||||
background-color:yellow;
|
||||
}
|
||||
td.username,
|
||||
td.input_username {
|
||||
padding-top: 1em;
|
||||
}
|
||||
td.pass,
|
||||
td.input_pass {
|
||||
padding-bottom: 1em;
|
||||
}
|
||||
.cookie_ack {
|
||||
font-size: 85%;
|
||||
padding-bottom: 1em;
|
||||
font-weight: bold;
|
||||
}
|
||||
.login form table tfoot {
|
||||
background-color:#F4D9B9;
|
||||
border-top: 1px solid #CB781A;
|
||||
margin-top: 2em;
|
||||
font-size: 85%;
|
||||
}
|
||||
.login form table tfoot p {
|
||||
margin: .3em;
|
||||
}
|
||||
|
||||
input.inb {
|
||||
font-weight: bold;
|
||||
font-size: 100%;
|
||||
padding: 1px .1em;
|
||||
background-color:#fff;
|
||||
}
|
||||
input.inb:hover {
|
||||
background-color:yellow;
|
||||
}
|
||||
input.inb:active {
|
||||
background-color:red;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/** menu param (intend to be the style of all the tables) **/
|
||||
|
||||
#mem_param table {
|
||||
width: 70%;
|
||||
border-collapse:collapse;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
#mem_param table thead {
|
||||
background-color:#CB781A;
|
||||
}
|
||||
#mem_param table thead td {
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
}
|
||||
#mem_param table th {
|
||||
width: 50%;
|
||||
text-align: right;
|
||||
}
|
||||
#mem_param table input {
|
||||
}
|
||||
#mem_param table input.inb {
|
||||
float: right;
|
||||
}
|
||||
#mem_param input.inb {
|
||||
font-size: .8em
|
||||
}
|
||||
|
||||
/** ftp accounts list **/
|
||||
body#ftp-account-list input .inc {
|
||||
clear:both;
|
||||
}
|
||||
body#ftp-account-list div.delete {
|
||||
clear: both;
|
||||
margin: 1em 0;
|
||||
}
|
||||
body#ftp-account-list label {
|
||||
font-weight: bold;
|
||||
color: #CB781A;
|
||||
font-size: 120%;
|
||||
}
|
||||
body#ftp-account-list dt {
|
||||
border-bottom: 1px solid #ddd;
|
||||
padding: .2em 0 .3em;
|
||||
margin: 0 0 .3em
|
||||
}
|
||||
body#ftp-account-list dd {
|
||||
margin-left: .3em;
|
||||
font-size: 120%;
|
||||
float: left;
|
||||
}
|
||||
body#ftp-account-list dd code {
|
||||
margin-left: .3em;
|
||||
color: #CB781A;
|
||||
}
|
||||
dl.ftp-account {
|
||||
border: 1px solid #eee;
|
||||
display: block;
|
||||
float: left;
|
||||
margin: 0 1em 1em 0;
|
||||
padding: .4em;
|
||||
background-color: #fdfcfc;
|
||||
width: 45%;
|
||||
}
|
||||
body#ftp-account-list .edit {
|
||||
border: 1px solid #aaa;
|
||||
color: black;
|
||||
font-weight: bold;
|
||||
font-size: 100%;
|
||||
padding: 0 .2em;
|
||||
background-color:#fff;
|
||||
float: right;
|
||||
}
|
||||
body#ftp-account-list .edit:hover {
|
||||
background-color:yellow;
|
||||
}
|
||||
body#ftp-account-list .edit:active {
|
||||
background-color:red;
|
||||
color: #fff;
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
<?php
|
||||
/*
|
||||
$Id: head.php,v 1.2 2003/06/10 05:52:07 root Exp $
|
||||
----------------------------------------------------------------------
|
||||
AlternC - Web Hosting System
|
||||
Copyright (C) 2002 by the AlternC Development Team.
|
||||
http://alternc.org/
|
||||
----------------------------------------------------------------------
|
||||
Based on:
|
||||
Valentin Lacambre's web hosting softwares: http://altern.org/
|
||||
----------------------------------------------------------------------
|
||||
LICENSE
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License (GPL)
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
To read the license please visit http://www.gnu.org/copyleft/gpl.html
|
||||
----------------------------------------------------------------------
|
||||
Original Author of file:
|
||||
Purpose of file:
|
||||
----------------------------------------------------------------------
|
||||
*/
|
||||
if (!$charset) $charset="iso-8859-1";
|
||||
@header("Content-Type: text/html; charset=$charset");
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>AlternC</title>
|
||||
<meta name="author" content="AlternC" />
|
||||
<meta name="description" content="AlternC is an opensource software project. Its aim is to develop a hosting service for everybody, easy to install and easy to manage. This project is born thanks to Altern.org and Lautre.net (France)" />
|
||||
<meta name="keywords" content="Hosting, GPL, software development" />
|
||||
|
||||
<meta name="description" content="AlternC est un projet de logiciel libre sous licence GPL d'hébergement
|
||||
sur serveurs mutualisés, né d'Altern.org et de Lautre Net" />
|
||||
<meta name="keywords" content="Hébergement, Logiciel d'hébergement, Altern, Lautre Net, GPL, Développement" />
|
||||
|
||||
<link rel="stylesheet" href="/admin/styles/base.css" type="text/css" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset; ?>" />
|
|
@ -464,3 +464,22 @@ CREATE TABLE IF NOT EXISTS `size_web` (
|
|||
KEY `ts` (`ts`)
|
||||
) TYPE=MyISAM COMMENT='Web space used by accounts.';
|
||||
|
||||
-- --------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `size_db` (
|
||||
`db` varchar(255) NOT NULL default '',
|
||||
`size` int(10) unsigned NOT NULL default '0',
|
||||
`ts` timestamp(14) NOT NULL,
|
||||
PRIMARY KEY (`db`),
|
||||
KEY `ts` (`ts`)
|
||||
) TYPE=MyISAM COMMENT='MySQL Database used space';
|
||||
|
||||
-- --------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `size_mailman` (
|
||||
`list` varchar(255) NOT NULL default '',
|
||||
`uid` int(11) NOT NULL default '0',
|
||||
`size` int(10) unsigned NOT NULL default '0',
|
||||
`ts` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`list`),
|
||||
KEY `ts` (`ts`),
|
||||
KEY `uid` (`uid`)
|
||||
) ENGINE=MyISAM COMMENT='Mailman Lists used space';
|
||||
|
|
|
@ -16,3 +16,25 @@ VALUES (
|
|||
'This variable set the way the account list works for accounts other than "admin" (2000). 0 (default) = admin other than admin/2000 can see their own account, but not the other one 1 = admin other than admin/2000 can see any account by clicking the ''show all accounts'' link. '
|
||||
);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
-- TABLES de mémorisation de la taille des dossiers db/listes
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `size_db` (
|
||||
`db` varchar(255) NOT NULL default '',
|
||||
`size` int(10) unsigned NOT NULL default '0',
|
||||
`ts` timestamp(14) NOT NULL,
|
||||
PRIMARY KEY (`db`),
|
||||
KEY `ts` (`ts`)
|
||||
) TYPE=MyISAM COMMENT='MySQL Database used space';
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `size_mailman` (
|
||||
`list` varchar(255) NOT NULL default '',
|
||||
`uid` int(11) NOT NULL default '0',
|
||||
`size` int(10) unsigned NOT NULL default '0',
|
||||
`ts` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`list`),
|
||||
KEY `ts` (`ts`),
|
||||
KEY `uid` (`uid`)
|
||||
) ENGINE=MyISAM COMMENT='Mailman Lists used space';
|
||||
|
||||
|
|
|
@ -31,3 +31,9 @@ if ($A=~/^\/var\/alternc\/db\//) {
|
|||
$B=~/^([0-9]+).*/;
|
||||
printf "$1\n";
|
||||
}
|
||||
if ($A=~/^\/var\/lib\/mailman\//) {
|
||||
open(SI,"/usr/bin/du -s '$A'|");
|
||||
$B=<SI>;
|
||||
$B=~/^([0-9]+).*/;
|
||||
printf "$1\n";
|
||||
}
|
||||
|
|
|
@ -5,9 +5,6 @@ require_once("/var/alternc/bureau/class/config_nochk.php");
|
|||
// On déverrouile le bureau AlternC :)
|
||||
@alternc_shutdown();
|
||||
|
||||
mysql_query("TRUNCATE TABLE size_mail;");
|
||||
mysql_query("TRUNCATE TABLE size_web;");
|
||||
|
||||
echo "---------------------------\n Generating size-cache for mail accounts\n\n";
|
||||
$r=mysql_query("SELECT * FROM mail_users WHERE alias NOT LIKE '%@%' AND alias LIKE '%\_%';");
|
||||
while ($c=mysql_fetch_array($r)) {
|
||||
|
@ -26,7 +23,35 @@ while ($c=mysql_fetch_array($r)) {
|
|||
echo " done ($size KB) \n"; flush();
|
||||
}
|
||||
|
||||
echo "---------------------------\n Generating size-cache for MySQL databases\n\n";
|
||||
$r=mysql_query("SELECT uid,db FROM db;");
|
||||
while ($c=mysql_fetch_array($r)) {
|
||||
echo $c["uid"]."/".$c["db"]; flush();
|
||||
$s=mysql_query('SHOW TABLE STATUS FROM `'.$c["db"].'`');
|
||||
$size=0;
|
||||
while ($d=mysql_fetch_array($s)) {
|
||||
$size+=$d["Data_length"]+$d["Index_length"];
|
||||
}
|
||||
// $size/=1024;
|
||||
mysql_query("REPLACE INTO size_db SET db='".$c["db"]."',size='$size';");
|
||||
echo " done ($size B) \n"; flush();
|
||||
}
|
||||
|
||||
echo "---------------------------\n Generating size-cache for web accounts\n\n";
|
||||
$r=@mysql_query("SELECT uid, name FROM mailman;");
|
||||
if ($r) {
|
||||
while ($c=mysql_fetch_array($r)) {
|
||||
echo $c["uid"]."/".$c["name"]; flush();
|
||||
$size1=exec("/usr/lib/alternc/du.pl /var/lib/mailman/lists/".$c["name"]);
|
||||
$size2=exec("/usr/lib/alternc/du.pl /var/lib/mailman/archives/private/".$c["name"]);
|
||||
$size3=exec("/usr/lib/alternc/du.pl /var/lib/mailman/archives/private/".$c["name"].".mbox");
|
||||
$size=(intval($size1)+intval($size2)+intval($size3));
|
||||
mysql_query("REPLACE INTO size_mailman SET uid='".$c["uid"]."',list='".$c["name"]."', size='$size';");
|
||||
echo " done ($size KB) \n"; flush();
|
||||
}
|
||||
}
|
||||
|
||||
// On relocke le bureau pour éviter un msg d'erreur.
|
||||
sem_acquire( $alternc_sem );
|
||||
@sem_acquire( $alternc_sem );
|
||||
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue