Commit 0f03969b authored by Nahuel Angelinetti's avatar Nahuel Angelinetti

Merging blue desktop to trunk.

parent c13e4388
* text=auto !eol
/.svnignore -text
/COPYING -text
/README.en -text
/README.fr -text
......@@ -73,7 +74,9 @@ bureau/admin/aide/inline/docbook.css -text
bureau/admin/aide/inline/frameset.html -text
bureau/admin/aide/inline/plus.gif -text
bureau/admin/aide/inline/tiret.gif -text
bureau/admin/alternc.jpg -text
bureau/admin/alternc.png -text
bureau/admin/alternc3.png -text
bureau/admin/bro_editor.php -text
bureau/admin/bro_main.php -text
bureau/admin/bro_pref.php -text
......@@ -91,6 +94,7 @@ bureau/admin/dom_subdodel.php -text
bureau/admin/dom_subdoedit.php -text
bureau/admin/dom_subedit.php -text
bureau/admin/domlist.php -text
bureau/admin/foot.php -text
bureau/admin/ftp_add.php -text
bureau/admin/ftp_del.php -text
bureau/admin/ftp_doadd.php -text
......@@ -98,6 +102,8 @@ bureau/admin/ftp_doedit.php -text
bureau/admin/ftp_edit.php -text
bureau/admin/ftp_list.php -text
bureau/admin/head.php -text
bureau/admin/hippo_bleue.gif -text
bureau/admin/hoster.png -text
bureau/admin/hta_add.php -text
bureau/admin/hta_adduser.php -text
bureau/admin/hta_del.php -text
......@@ -142,10 +148,58 @@ bureau/admin/icon/wav.png -text
bureau/admin/icon/winresize.gif -text
bureau/admin/icon/xls.png -text
bureau/admin/icon/zip.png -text
bureau/admin/images/admin.png -text
bureau/admin/images/bgborder.gif -text
bureau/admin/images/blank.gif -text
bureau/admin/images/config.png -text
bureau/admin/images/delete.png -text
bureau/admin/images/dom.png -text
bureau/admin/images/edit.png -text
bureau/admin/images/exit.png -text
bureau/admin/images/folder.png -text
bureau/admin/images/folderhta.png -text
bureau/admin/images/ftp.png -text
bureau/admin/images/help.png -text
bureau/admin/images/home.png -text
bureau/admin/images/lang.png -text
bureau/admin/images/mail.png -text
bureau/admin/images/minus.png -text
bureau/admin/images/mysql.png -text
bureau/admin/images/new.png -text
bureau/admin/images/orig/admin.png -text
bureau/admin/images/orig/bgborder.gif -text
bureau/admin/images/orig/blank.gif -text
bureau/admin/images/orig/config.png -text
bureau/admin/images/orig/delete.png -text
bureau/admin/images/orig/dom.png -text
bureau/admin/images/orig/edit.png -text
bureau/admin/images/orig/exit.png -text
bureau/admin/images/orig/folder.png -text
bureau/admin/images/orig/folderhta.png -text
bureau/admin/images/orig/ftp.png -text
bureau/admin/images/orig/help.png -text
bureau/admin/images/orig/home.png -text
bureau/admin/images/orig/mail.png -text
bureau/admin/images/orig/mailman.png -text
bureau/admin/images/orig/minus.png -text
bureau/admin/images/orig/mysql.png -text
bureau/admin/images/orig/new.png -text
bureau/admin/images/orig/password.png -text
bureau/admin/images/orig/plus.png -text
bureau/admin/images/orig/quota.png -text
bureau/admin/images/orig/stat.png -text
bureau/admin/images/password.png -text
bureau/admin/images/plus.png -text
bureau/admin/images/quota.png -text
bureau/admin/images/stat.png -text
bureau/admin/index.php -text
bureau/admin/js/alternc.js -text
bureau/admin/js/prototype.js -text
bureau/admin/js/rico.js -text
bureau/admin/js/wz_dragdrop.js -text
bureau/admin/login.php -text
bureau/admin/logo.png -text
bureau/admin/logo2.png -text
bureau/admin/mail_add.php -text
bureau/admin/mail_del.php -text
bureau/admin/mail_doadd.php -text
......@@ -175,8 +229,11 @@ bureau/admin/menu_sql.php -text
bureau/admin/menu_sta2.php -text
bureau/admin/menu_web.php -text
bureau/admin/mxlist.php -text
bureau/admin/phpinfo.php -text
bureau/admin/powered2.jpg -text
bureau/admin/quota_show.php -text
bureau/admin/quota_show_all.php -text
bureau/admin/quotas_users.php -text
bureau/admin/sql_add.php -text
bureau/admin/sql_addmain.php -text
bureau/admin/sql_admin.php -text
......@@ -204,8 +261,10 @@ 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
bureau/admin/webmail/.htaccess -text
bureau/admin/webmail/index.php -text
bureau/class/config.php -text
bureau/class/config_nochk.php -text
......@@ -213,6 +272,7 @@ bureau/class/config_real.php -text
bureau/class/db_mysql.php -text
bureau/class/export_account.php -text
bureau/class/functions.php -text
bureau/class/functions2.php -text
bureau/class/lang_env.php -text
bureau/class/local.php -text
bureau/class/m_admin.php -text
......@@ -245,6 +305,7 @@ bureau/locales/fr_FR/LC_MESSAGES/messages.po -text
bureau/locales/manual.pot -text
bureau/locales/messages.pot -text
bureau/locales/pt_BR/LC_MESSAGES/messages.po -text
debian/.svnignore -text
debian/NEWS -text
debian/README.Debian -text
debian/alternc-slave.config -text
......@@ -337,6 +398,7 @@ install/upgrades/README -text
man/alternc-admintools.8 -text
man/alternc-admintools.fr.8 -text
man/alternc.install.8 -text
man/alternc.install.fr.8 -text
man/get_account_by_domain.8 -text
man/get_domains_by_account.8 -text
man/top_ftp_users.8 -text
......@@ -346,10 +408,13 @@ man/top_http_users.fr.8 -text
man/top_mysql_users.8 -text
man/top_mysql_users.fr.8 -text
po/alternc-admintools.pot -text
po/fr/LC_MESSAGES/.svnignore -text
po/fr/LC_MESSAGES/alternc-admintools.po -text
/quota_delete -text
/quota_init -text
src/Makefile -text
src/alternc-check -text
src/alternc-passwd -text
src/alternc_reload -text
src/basedir_prot.sh -text
src/du.pl -text
......
/build-stamp
debian/.svnignore
debian/alternc
debian/alternc-slave
debian/alternc-slave.debhelper.log
debian/alternc-slave.postrm.debhelper
debian/alternc-slave.substvars
debian/alternc.debhelper.log
debian/alternc.postrm.debhelper
debian/alternc.substvars
debian/files
po/fr/LC_MESSAGES/alternc-admintools.mo
build-stamp
\ No newline at end of file
......@@ -30,19 +30,19 @@
----------------------------------------------------------------------
*/
require_once("../class/config.php");
include_once("head.php");
if (!$admin->enabled) {
__("This page is restricted to authorized staff");
exit();
}
if (!isset($canpass)) $canpass=1;
include("head.php");
$fields = array (
"canpass" => array ("request", "integer", 1),
);
getFields($fields);
?>
</head>
<body>
<h3><?php __("New member"); ?></h3>
<?php
if ($error) {
......@@ -65,7 +65,7 @@ if ($error) {
<tr>
<th><label for="canpass"><?php __("Can he change its password"); ?></label></th>
<td><select class="inl" name="canpass" id="canpass">
<?php
<?php
for($i=0;$i<count($bro->l_icons);$i++) {
echo "<option";
if ($canpass==$i) echo " selected=\"selected\"";
......@@ -75,11 +75,11 @@ if ($error) {
</td>
</tr>
<tr>
<th><label for="notes"><?php __("Notes"); ?></label></th>
<td><textarea name="notes" id="notes" class="int" cols="32" rows="5"><?php echo $notes; ?></textarea></td>
<th><label for="notes"><?php __("Notes"); ?></label></th>
<td><textarea name="notes" id="notes" class="int" cols="32" rows="5"><?php echo $notes; ?></textarea></td>
</tr>
<tr>
<th><label for="nom"><?php echo _("Surname")."</label> / <label for=\"prenom\">"._("First Name"); ?></label></th>
<th><label for="nom"><?php echo _("Surname")."</label> / <label for=\"prenom\">"._("First Name"); ?></label></th>
<td><input class="int" type="text" id="nom" name="nom" value="<?php echo $nom; ?>" size="20" maxlength="128" />&nbsp;/&nbsp;<input type="text" name="prenom" id="prenom" value="<?php echo $prenom; ?>" class="int" size="20" maxlength="128" /></td>
</tr>
<tr>
......@@ -99,9 +99,8 @@ if ($error) {
echo ">$type</option>";
}
?></select>
</td>
</td>
</tr>
<?php if (variable_get('hosting_tld') || $dom->enum_domains()) { ?>
<tr>
<th colspan="2">
......@@ -109,23 +108,22 @@ if ($error) {
<label><?php printf(_("Create the domain <b>username.%s</b>"),""); ?></label>
<select name="create_dom_list">
<?php if (variable_get('hosting_tld')) { ?>
<option value="<?php echo variable_get('hosting_tld'); ?>" selected="selected"><?php echo variable_get('hosting_tld'); ?></option>
<?php }
<option value="<?php echo variable_get('hosting_tld'); ?>" selected="selected"><?php echo variable_get('hosting_tld'); ?></option>
<?php }
/* Enumeration des domaines : */
$domain=$dom->enum_domains();
reset($domain);
while (list($key,$val)=each($domain)) { ?>
<option value="<?php echo $val; ?>" > <?php echo $val?> </option>
<option value="<?php echo $val; ?>" > <?php echo $val?> </option>
<?php } ?>
</select>
</th>
</tr>
<?php } ?>
<?php } ?>
<tr>
<td colspan="2"><input type="submit" class="inb" name="submit" value="<?php __("Create a new member"); ?>" /></td>
</tr>
</table>
</form>
</body>
</html>
<?php include_once("foot.php"); ?>
......@@ -29,26 +29,23 @@
*/
require_once("../class/config.php");
include("head.php");
?>
</head>
<body>
<?php
include_once("head.php");
$uid = $_GET['uid'];
if (!$uid) {
__("Missing uid");
echo "</body></html>";
include_once("foot.php");
exit();
}
if (!$admin->enabled || !$admin->checkcreator($uid)) {
__("This page is restricted to authorized staff");
echo "</body></html>";
include_once("foot.php");
exit();
}
if (!$r=$admin->get($uid)) {
__("User does not exist");
echo "</body></html>";
include_once("foot.php");
exit();
}
......@@ -67,6 +64,7 @@ if (! ($confirmed = ($_GET['submit'] == _("Confirm")) ) ) {
} else {
if (!$_GET['redirect']) {
__("Missing redirect url.");
include_once("foot.php");
exit();
} else {
$redirect = $_GET['redirect'];
......@@ -138,7 +136,7 @@ if ($confirmed) {
}
$cuid = $old_cuid;
include_once("foot.php");
?>
</body>
</html>
......@@ -36,10 +36,9 @@ if (!$admin->enabled) {
exit();
}
include("head.php");
include_once ("head.php");
?>
</head>
<body>
<h3><?php __("Change the default quotas"); ?></h3>
<?php
if ($error) {
......@@ -47,14 +46,17 @@ include("head.php");
}
?>
<p><form method="post" action="adm_dodefquotas.php">
<input type="hidden" name="action" value="add">
<input type="text" name="type" class="int"></td>
<form method="post" action="adm_dodefquotas.php">
<p>
<input type="hidden" name="action" value="add" />
<input type="text" name="type" class="int" />
<input type="submit" class="inb" value="<?php __("Add account type"); ?>" />
</form></p>
</p>
</form>
<p><form method="post" action="adm_dodefquotas.php">
<input type="hidden" name="action" value="delete">
<form method="post" action="adm_dodefquotas.php">
<p>
<input type="hidden" name="action" value="delete" />
<select name="type" id="type" class="inl">
<?php
$db->query("SELECT distinct(type) FROM defquotas WHERE TYPE != 'default' ORDER by type");
......@@ -64,50 +66,45 @@ while($db->next_record()) {
}
?></select>
<input type="submit" class="inb" value="<?php __("Delete account type"); ?>" />
</form></p>
</p>
</form>
<p>
<?php __("Here is the list of the quotas on the server for the new accounts. If you want to change them, enter new values"); ?>
</p>
<form method="post" action="adm_dodefquotas.php">
<input type="hidden" name="action" value="modify">
<div>
<input type="hidden" name="action" value="modify" />
<?php
$col=1;
$qarray=$quota->qlist();
$qlist=$quota->getdefaults();
$aqlist = $quota->qlist();
reset($qlist);
foreach($qlist as $qname => $q)
{
foreach($qlist as $type => $q) {
?>
<h4><?php echo _("Accounts of type"). " \"" . $qname . "\"" ?></h4>
<div>
<h4><?php echo _("Accounts of type"). " \"$type\"" ?></h4>
<table border="0" cellpadding="4" cellspacing="0">
<tr><th><?php __("Quotas") ?></th><th><?php __("Default Value"); ?></th></tr>
<?php
foreach($aqlist as $aqtype => $aqname)
{
$key = $qname . ":" . $aqtype;
$col=3-$col;
foreach($q as $name => $value) {
$key = $type . ":" . $name;
$col=3-$col;
?>
<tr class="lst<?php echo $col; ?>">
<td><label for="<?php echo $key; ?>"><?php echo $aqname; ?></label></td>
<td><input type="text" class="int" size="16" maxlength="16" name="<?php echo $key; ?>" id="<?php echo $key; ?>" value="<?php echo $q[$aqtype]; ?>" /></td></tr>
<td><label for="<?php echo $key; ?>"><?php echo $qarray[$name]; ?></label></td>
<td><input type="text" class="int" size="16" maxlength="16" name="<?php echo $key; ?>" id="<?php echo $name; ?>" value="<?php echo $value; ?>" /></td></tr>
<?php
}
}
?>
</table>
</div>
<?php
}
?>
<input type="submit" class="inb" value="<?php __("Edit the default quotas"); ?>" />
</div>
</form>
</body>
</html>
<?php include_once("foot.php"); ?>
......@@ -51,22 +51,20 @@ if (!($u=$admin->add_mem($login, $pass, $nom, $prenom, $nmail, $canpass, $type,
$mem->su($u);
/*
* 0 = pas d'hbergement dns, en effet, pas besoin vu que les
* domaines *.koumbit.net sont bien sur le serveur
* 1 = hbergement dns, en effet, les
* domaines *.koumbit.net ne sont pas forcment sur le serveur
*
* 1 = noerase = empche l'utilisateur de modifier le dns ou de
* supprimer le domaine
*
* 1 = force = ne tient pas compte du whois ou des droits de tld
*/
if (($create_dom == 1) && !is_null($create_dom_list)) {
# make sure we don't have multiple dots there
$dom->lock();
$dom->add_domain($login.".".preg_replace("/^\.\.*/", "", $create_dom_list),1,1,1);
$dom->unlock();
// make sure we don't have multiple dots there
$dom->lock();
$dom->add_domain($login.".".preg_replace("/^\.\.*/", "", $create_dom_list),1,1,1);
$dom->unlock();
}
$ftp->add_ftp($login,"",$pass,"/");
$mem->unsu();
......
......@@ -34,9 +34,15 @@ if (!$admin->enabled) {
exit();
}
$fields = array (
"domain" => array ("request", "string", ""),
);
getFields($fields);
if (!$admin->dom_lock($domain)) {
$error=$err->errstr();
}
include("adm_doms.php");
exit;
......
......@@ -34,10 +34,9 @@ if (!$admin->enabled) {
exit();
}
include("head.php");
include_once ("head.php");
?>
</head>
<body>
<h3><?php __("Manage installed domains"); ?></h3>
<?php
if ($error) {
......@@ -51,8 +50,6 @@ $c=$admin->dom_list();
<?php __("Here is the list of the domains installed on this server. You can remove a domain if it does not exist or does not point to our server anymore. You can also set the 'Lock' flag on a domain so that the user will not be able to change any DNS parameter or delete this domain from his account."); ?>
</p>
<p><a href="<?php echo $_SERVER["SCRIPT_NAME"]; ?>"><?php __("Update this page"); ?></a></p>
<form method="post" action="adm_dodom.php">
<table border="0" cellpadding="4" cellspacing="0">
<tr><th><?php __("Action"); ?></th><th><?php __("Domain"); ?></th><th><?php __("Member"); ?></th><th>Lock</th></tr>
......@@ -63,11 +60,11 @@ for($i=0;$i<count($c);$i++) {
?>
<tr class="lst<?php echo $col; ?>">
<td><a href="adm_domlock.php?domain=<?php echo urlencode($c[$i][domaine]); ?>"><?php
if ($c[$i][noerase]) __("Unlock"); else __("Lock"); ?></a></td>
<td><a href="http://<?php echo $c[$i][domaine]; ?>" target="_blank"><?php echo $c[$i][domaine]; ?></a></td>
<td><?php echo $c[$i][login]; ?></td>
<td><?php if ($c[$i][noerase]) {
<td><a href="adm_domlock.php?domain=<?php echo urlencode($c[$i][domaine]); ?>"><?php
if ($c[$i]["noerase"]) __("Unlock"); else __("Lock"); ?></a></td>
<td><a href="http://<?php echo $c[$i][domaine]; ?>" target="_blank"><?php echo $c[$i]["domaine"]; ?></a></td>
<td><?php echo $c[$i]["login"]; ?></td>
<td><?php if ($c[$i]["noerase"]) {
echo "<img src=\"icon/encrypted.png\" width=\"16\" height=\"16\" alt=\""._("Locked Domain")."\" />";
} ?></td>
</tr>
......@@ -76,6 +73,4 @@ for($i=0;$i<count($c);$i++) {
?>
</table>
</form>
</body>
</html>
<?php include_once("foot.php"); ?>
......@@ -34,6 +34,11 @@ if (!$admin->enabled) {
exit();
}
$fields = array (
"uid" => array ("request", "integer", 0),
);
getFields($fields);
if (!$admin->su2normal($uid)) {
$error=$err->errstr();
}
......
......@@ -34,6 +34,11 @@ if (!$admin->enabled) {
exit();
}
$fields = array (
"uid" => array ("request", "integer", 0),
);
getFields($fields);
if (!$admin->normal2su($uid)) {
$error=$err->errstr();
}
......
......@@ -30,11 +30,18 @@
----------------------------------------------------------------------
*/
require_once("../class/config.php");
include_once("head.php");
if (!$admin->enabled) {
__("This page is restricted to authorized staff");
exit();
}
$fields = array (
"uid" => array ("request", "integer", 0),
);
getFields($fields);
if (!$admin->checkcreator($uid)) {
__("This page is restricted to authorized staff");
exit();
......@@ -44,17 +51,14 @@ if (!$r=$admin->get($uid)) {
$error=$err->errstr();
}
include("head.php");
?>
</head>
<body>
<h3><?php __("Member Edition"); ?></h3>
<?php
if ($error) {
echo "<p class=\"error\">$error</p>";
}
?>
<form method="post" action="adm_doedit.php">
<form method="post" action="adm_doedit.php" name="main" id="main">
<table border="1" cellspacing="0" cellpadding="4">
<tr>
<th><input type="hidden" name="uid" value="<?php echo $uid ?>" />
......@@ -85,7 +89,7 @@ include("head.php");
<tr>
<th><label for="canpass"><?php __("Can he change its password"); ?></label></th>
<td><select class="inl" name="canpass" id="canpass">
<?php
<?php
for($i=0;$i<count($bro->l_icons);$i++) {
echo "<option";
if ($r["canpass"]==$i) echo " selected=\"selected\"";
......@@ -94,7 +98,7 @@ include("head.php");
?></select>
</td>
</tr>
<tr>
<tr>
<th><label for="notes"><?php __("Notes"); ?></label></th>
<td><textarea name="notes" id="notes" class="int" cols="32" rows="5"><?php echo $r['notes']; ?></textarea></td>
</tr>
......@@ -118,7 +122,7 @@ include("head.php");
echo " selected";
echo ">$type</option>";
}
?></select><label for="reset_quotas"><?php __("Reset quotas to default ?") ?></label><input type="checkbox" name="reset_quotas" id="reset_quotas"></td>
?></select><label for="reset_quotas"><?php __("Reset quotas to default ?") ?></label><input type="checkbox" name="reset_quotas" id="reset_quotas" /></td>
</tr>
<tr>
<th><label for="duration"><?php __("Period"); ?></label></th>
......@@ -151,11 +155,11 @@ include("head.php");
<p>
<?php
if ($mem->user[uid]==2000) { // PATCHBEN only admin can change su/nosu :)
if ($mem->user[uid]==2000) { // PATCHBEN only admin can change su/nosu :)
if ($r["su"]) {
?>
<b><?php __("This account is a super-admin account"); ?></b><br />
<?php if ($admin->onesu()) {
<?php if ($admin->onesu()) {
__("There is only one administrator account, you cannot turn this account back to normal");
} else {
?>
......@@ -167,12 +171,14 @@ if ($r["su"]) {
</p>
<p><?php
<p><?php
}
$c=$admin->get($r["creator"]);
printf(_("Account created by %s"),$c["login"]);
printf(_("Account created by %s"),$c["login"]);
?>
</p>
<p><a href="adm_list.php"><?php __("Back to the account list"); ?></a></p>
</body>
</html>
<script type="text/javascript">
document.forms['main'].pass.focus();
</script>
<?php include_once("foot.php"); ?>
......@@ -31,20 +31,28 @@
----------------------------------------------------------------------
*/
require_once("../class/config.php");
include_once("head.php");
if (!$admin->enabled) {
__("This page is restricted to authorized staff");
exit();
}
$creator_id = intval($_REQUEST['creator']);
$fields = array (
"show" => array ("request", "string", ""),
"creator_id" => array("request", "integer", 2000),
);
getFields($fields);
$r=$admin->get_list($_REQUEST['show'] == 'all' ? 1 : 0, $creator_id);
if ($show && $cuid != 2000)
{
__("This page is restricted to authorized staff");
exit();
}
$r=$admin->get_list($show == 'all' ? 1 : 0, $creator_id);
include("head.php");
?>
</head>
<body>
<h3><?php __("Member list"); ?></h3>
<?php
if ($error) {
......@@ -53,9 +61,9 @@ include("head.php");
?>
<p>
<?php __("Here is the list of hosted members"); ?>
&nbsp;
<?php if($_REQUEST['show'] != 'all') {
echo '<br /><a href="adm_list.php?show=all">' . _('List all the accounts') . '</a>';
if ($cuid == 2000) {
$list_creators = $admin->get_creator_list();
$infos_creators = array();
......@@ -77,11 +85,11 @@ include("head.php");
<?php
if (!is_array($r)) {
echo "<p class=\"error\">"._("No account defined for now")."</p>";
} else {