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

Merging blue desktop to trunk.

parent c13e4388
* text=auto !eol * text=auto !eol
/.svnignore -text
/COPYING -text /COPYING -text
/README.en -text /README.en -text
/README.fr -text /README.fr -text
...@@ -73,7 +74,9 @@ bureau/admin/aide/inline/docbook.css -text ...@@ -73,7 +74,9 @@ bureau/admin/aide/inline/docbook.css -text
bureau/admin/aide/inline/frameset.html -text bureau/admin/aide/inline/frameset.html -text
bureau/admin/aide/inline/plus.gif -text bureau/admin/aide/inline/plus.gif -text
bureau/admin/aide/inline/tiret.gif -text bureau/admin/aide/inline/tiret.gif -text
bureau/admin/alternc.jpg -text
bureau/admin/alternc.png -text bureau/admin/alternc.png -text
bureau/admin/alternc3.png -text
bureau/admin/bro_editor.php -text bureau/admin/bro_editor.php -text
bureau/admin/bro_main.php -text bureau/admin/bro_main.php -text
bureau/admin/bro_pref.php -text bureau/admin/bro_pref.php -text
...@@ -91,6 +94,7 @@ bureau/admin/dom_subdodel.php -text ...@@ -91,6 +94,7 @@ bureau/admin/dom_subdodel.php -text
bureau/admin/dom_subdoedit.php -text bureau/admin/dom_subdoedit.php -text
bureau/admin/dom_subedit.php -text bureau/admin/dom_subedit.php -text
bureau/admin/domlist.php -text bureau/admin/domlist.php -text
bureau/admin/foot.php -text
bureau/admin/ftp_add.php -text bureau/admin/ftp_add.php -text
bureau/admin/ftp_del.php -text bureau/admin/ftp_del.php -text
bureau/admin/ftp_doadd.php -text bureau/admin/ftp_doadd.php -text
...@@ -98,6 +102,8 @@ bureau/admin/ftp_doedit.php -text ...@@ -98,6 +102,8 @@ bureau/admin/ftp_doedit.php -text
bureau/admin/ftp_edit.php -text bureau/admin/ftp_edit.php -text
bureau/admin/ftp_list.php -text bureau/admin/ftp_list.php -text
bureau/admin/head.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_add.php -text
bureau/admin/hta_adduser.php -text bureau/admin/hta_adduser.php -text
bureau/admin/hta_del.php -text bureau/admin/hta_del.php -text
...@@ -142,10 +148,58 @@ bureau/admin/icon/wav.png -text ...@@ -142,10 +148,58 @@ bureau/admin/icon/wav.png -text
bureau/admin/icon/winresize.gif -text bureau/admin/icon/winresize.gif -text
bureau/admin/icon/xls.png -text bureau/admin/icon/xls.png -text
bureau/admin/icon/zip.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/index.php -text
bureau/admin/js/alternc.js -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/js/wz_dragdrop.js -text
bureau/admin/login.php -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_add.php -text
bureau/admin/mail_del.php -text bureau/admin/mail_del.php -text
bureau/admin/mail_doadd.php -text bureau/admin/mail_doadd.php -text
...@@ -175,8 +229,11 @@ bureau/admin/menu_sql.php -text ...@@ -175,8 +229,11 @@ bureau/admin/menu_sql.php -text
bureau/admin/menu_sta2.php -text bureau/admin/menu_sta2.php -text
bureau/admin/menu_web.php -text bureau/admin/menu_web.php -text
bureau/admin/mxlist.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.php -text
bureau/admin/quota_show_all.php -text bureau/admin/quota_show_all.php -text
bureau/admin/quotas_users.php -text
bureau/admin/sql_add.php -text bureau/admin/sql_add.php -text
bureau/admin/sql_addmain.php -text bureau/admin/sql_addmain.php -text
bureau/admin/sql_admin.php -text bureau/admin/sql_admin.php -text
...@@ -204,8 +261,10 @@ bureau/admin/sta2_edit_raw.php -text ...@@ -204,8 +261,10 @@ bureau/admin/sta2_edit_raw.php -text
bureau/admin/sta2_list.php -text bureau/admin/sta2_list.php -text
bureau/admin/stats_members.php -text bureau/admin/stats_members.php -text
bureau/admin/styles/base.css -text bureau/admin/styles/base.css -text
bureau/admin/styles/style.css -text
bureau/admin/template.php -text bureau/admin/template.php -text
bureau/admin/web_list.php -text bureau/admin/web_list.php -text
bureau/admin/webmail/.htaccess -text
bureau/admin/webmail/index.php -text bureau/admin/webmail/index.php -text
bureau/class/config.php -text bureau/class/config.php -text
bureau/class/config_nochk.php -text bureau/class/config_nochk.php -text
...@@ -213,6 +272,7 @@ bureau/class/config_real.php -text ...@@ -213,6 +272,7 @@ bureau/class/config_real.php -text
bureau/class/db_mysql.php -text bureau/class/db_mysql.php -text
bureau/class/export_account.php -text bureau/class/export_account.php -text
bureau/class/functions.php -text bureau/class/functions.php -text
bureau/class/functions2.php -text
bureau/class/lang_env.php -text bureau/class/lang_env.php -text
bureau/class/local.php -text bureau/class/local.php -text
bureau/class/m_admin.php -text bureau/class/m_admin.php -text
...@@ -245,6 +305,7 @@ bureau/locales/fr_FR/LC_MESSAGES/messages.po -text ...@@ -245,6 +305,7 @@ bureau/locales/fr_FR/LC_MESSAGES/messages.po -text
bureau/locales/manual.pot -text bureau/locales/manual.pot -text
bureau/locales/messages.pot -text bureau/locales/messages.pot -text
bureau/locales/pt_BR/LC_MESSAGES/messages.po -text bureau/locales/pt_BR/LC_MESSAGES/messages.po -text
debian/.svnignore -text
debian/NEWS -text debian/NEWS -text
debian/README.Debian -text debian/README.Debian -text
debian/alternc-slave.config -text debian/alternc-slave.config -text
...@@ -337,6 +398,7 @@ install/upgrades/README -text ...@@ -337,6 +398,7 @@ install/upgrades/README -text
man/alternc-admintools.8 -text man/alternc-admintools.8 -text
man/alternc-admintools.fr.8 -text man/alternc-admintools.fr.8 -text
man/alternc.install.8 -text man/alternc.install.8 -text
man/alternc.install.fr.8 -text
man/get_account_by_domain.8 -text man/get_account_by_domain.8 -text
man/get_domains_by_account.8 -text man/get_domains_by_account.8 -text
man/top_ftp_users.8 -text man/top_ftp_users.8 -text
...@@ -346,10 +408,13 @@ man/top_http_users.fr.8 -text ...@@ -346,10 +408,13 @@ man/top_http_users.fr.8 -text
man/top_mysql_users.8 -text man/top_mysql_users.8 -text
man/top_mysql_users.fr.8 -text man/top_mysql_users.fr.8 -text
po/alternc-admintools.pot -text po/alternc-admintools.pot -text
po/fr/LC_MESSAGES/.svnignore -text
po/fr/LC_MESSAGES/alternc-admintools.po -text po/fr/LC_MESSAGES/alternc-admintools.po -text
/quota_delete -text /quota_delete -text
/quota_init -text /quota_init -text
src/Makefile -text src/Makefile -text
src/alternc-check -text
src/alternc-passwd -text
src/alternc_reload -text src/alternc_reload -text
src/basedir_prot.sh -text src/basedir_prot.sh -text
src/du.pl -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 @@ ...@@ -30,19 +30,19 @@
---------------------------------------------------------------------- ----------------------------------------------------------------------
*/ */
require_once("../class/config.php"); require_once("../class/config.php");
include_once("head.php");
if (!$admin->enabled) { if (!$admin->enabled) {
__("This page is restricted to authorized staff"); __("This page is restricted to authorized staff");
exit(); exit();
} }
if (!isset($canpass)) $canpass=1; $fields = array (
"canpass" => array ("request", "integer", 1),
include("head.php"); );
getFields($fields);
?> ?>
</head>
<body>
<h3><?php __("New member"); ?></h3> <h3><?php __("New member"); ?></h3>
<?php <?php
if ($error) { if ($error) {
...@@ -65,7 +65,7 @@ if ($error) { ...@@ -65,7 +65,7 @@ if ($error) {
<tr> <tr>
<th><label for="canpass"><?php __("Can he change its password"); ?></label></th> <th><label for="canpass"><?php __("Can he change its password"); ?></label></th>
<td><select class="inl" name="canpass" id="canpass"> <td><select class="inl" name="canpass" id="canpass">
<?php <?php
for($i=0;$i<count($bro->l_icons);$i++) { for($i=0;$i<count($bro->l_icons);$i++) {
echo "<option"; echo "<option";
if ($canpass==$i) echo " selected=\"selected\""; if ($canpass==$i) echo " selected=\"selected\"";
...@@ -75,11 +75,11 @@ if ($error) { ...@@ -75,11 +75,11 @@ if ($error) {
</td> </td>
</tr> </tr>
<tr> <tr>
<th><label for="notes"><?php __("Notes"); ?></label></th> <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> <td><textarea name="notes" id="notes" class="int" cols="32" rows="5"><?php echo $notes; ?></textarea></td>
</tr> </tr>
<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> <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>
<tr> <tr>
...@@ -99,9 +99,8 @@ if ($error) { ...@@ -99,9 +99,8 @@ if ($error) {
echo ">$type</option>"; echo ">$type</option>";
} }
?></select> ?></select>
</td> </td>
</tr> </tr>
<?php if (variable_get('hosting_tld') || $dom->enum_domains()) { ?> <?php if (variable_get('hosting_tld') || $dom->enum_domains()) { ?>
<tr> <tr>
<th colspan="2"> <th colspan="2">
...@@ -109,23 +108,22 @@ if ($error) { ...@@ -109,23 +108,22 @@ if ($error) {
<label><?php printf(_("Create the domain <b>username.%s</b>"),""); ?></label> <label><?php printf(_("Create the domain <b>username.%s</b>"),""); ?></label>
<select name="create_dom_list"> <select name="create_dom_list">
<?php if (variable_get('hosting_tld')) { ?> <?php if (variable_get('hosting_tld')) { ?>
<option value="<?php echo variable_get('hosting_tld'); ?>" selected="selected"><?php echo variable_get('hosting_tld'); ?></option> <option value="<?php echo variable_get('hosting_tld'); ?>" selected="selected"><?php echo variable_get('hosting_tld'); ?></option>
<?php } <?php }
/* Enumeration des domaines : */ /* Enumeration des domaines : */
$domain=$dom->enum_domains(); $domain=$dom->enum_domains();
reset($domain); reset($domain);
while (list($key,$val)=each($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 } ?> <?php } ?>
</select> </select>
</th> </th>
</tr> </tr>
<?php } ?> <?php } ?>
<tr> <tr>
<td colspan="2"><input type="submit" class="inb" name="submit" value="<?php __("Create a new member"); ?>" /></td> <td colspan="2"><input type="submit" class="inb" name="submit" value="<?php __("Create a new member"); ?>" /></td>
</tr> </tr>
</table> </table>
</form> </form>
</body> <?php include_once("foot.php"); ?>
</html>
...@@ -29,26 +29,23 @@ ...@@ -29,26 +29,23 @@
*/ */
require_once("../class/config.php"); require_once("../class/config.php");
include("head.php"); include_once("head.php");
?>
</head>
<body>
<?php
$uid = $_GET['uid']; $uid = $_GET['uid'];
if (!$uid) { if (!$uid) {
__("Missing uid"); __("Missing uid");
echo "</body></html>"; include_once("foot.php");
exit(); exit();
} }
if (!$admin->enabled || !$admin->checkcreator($uid)) { if (!$admin->enabled || !$admin->checkcreator($uid)) {
__("This page is restricted to authorized staff"); __("This page is restricted to authorized staff");
echo "</body></html>"; include_once("foot.php");
exit(); exit();
} }
if (!$r=$admin->get($uid)) { if (!$r=$admin->get($uid)) {
__("User does not exist"); __("User does not exist");
echo "</body></html>"; include_once("foot.php");
exit(); exit();
} }
...@@ -67,6 +64,7 @@ if (! ($confirmed = ($_GET['submit'] == _("Confirm")) ) ) { ...@@ -67,6 +64,7 @@ if (! ($confirmed = ($_GET['submit'] == _("Confirm")) ) ) {
} else { } else {
if (!$_GET['redirect']) { if (!$_GET['redirect']) {
__("Missing redirect url."); __("Missing redirect url.");
include_once("foot.php");
exit(); exit();
} else { } else {
$redirect = $_GET['redirect']; $redirect = $_GET['redirect'];
...@@ -138,7 +136,7 @@ if ($confirmed) { ...@@ -138,7 +136,7 @@ if ($confirmed) {
} }
$cuid = $old_cuid; $cuid = $old_cuid;
include_once("foot.php");
?> ?>
</body>
</html>
...@@ -36,10 +36,9 @@ if (!$admin->enabled) { ...@@ -36,10 +36,9 @@ if (!$admin->enabled) {
exit(); exit();
} }
include("head.php"); include_once ("head.php");
?> ?>
</head>
<body>
<h3><?php __("Change the default quotas"); ?></h3> <h3><?php __("Change the default quotas"); ?></h3>
<?php <?php
if ($error) { if ($error) {
...@@ -47,14 +46,17 @@ include("head.php"); ...@@ -47,14 +46,17 @@ include("head.php");
} }
?> ?>
<p><form method="post" action="adm_dodefquotas.php"> <form method="post" action="adm_dodefquotas.php">
<input type="hidden" name="action" value="add"> <p>
<input type="text" name="type" class="int"></td> <input type="hidden" name="action" value="add" />
<input type="text" name="type" class="int" />
<input type="submit" class="inb" value="<?php __("Add account type"); ?>" /> <input type="submit" class="inb" value="<?php __("Add account type"); ?>" />
</form></p> </p>
</form>
<p><form method="post" action="adm_dodefquotas.php"> <form method="post" action="adm_dodefquotas.php">
<input type="hidden" name="action" value="delete"> <p>
<input type="hidden" name="action" value="delete" />
<select name="type" id="type" class="inl"> <select name="type" id="type" class="inl">
<?php <?php
$db->query("SELECT distinct(type) FROM defquotas WHERE TYPE != 'default' ORDER by type"); $db->query("SELECT distinct(type) FROM defquotas WHERE TYPE != 'default' ORDER by type");
...@@ -64,50 +66,45 @@ while($db->next_record()) { ...@@ -64,50 +66,45 @@ while($db->next_record()) {
} }
?></select> ?></select>
<input type="submit" class="inb" value="<?php __("Delete account type"); ?>" /> <input type="submit" class="inb" value="<?php __("Delete account type"); ?>" />
</form></p> </p>
</form>
<p> <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"); ?> <?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> </p>
<form method="post" action="adm_dodefquotas.php"> <form method="post" action="adm_dodefquotas.php">
<input type="hidden" name="action" value="modify"> <div>
<input type="hidden" name="action" value="modify" />
<?php <?php
$col=1; $col=1;
$qarray=$quota->qlist();
$qlist=$quota->getdefaults(); $qlist=$quota->getdefaults();
$aqlist = $quota->qlist();
reset($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"> <table border="0" cellpadding="4" cellspacing="0">
<tr><th><?php __("Quotas") ?></th><th><?php __("Default Value"); ?></th></tr> <tr><th><?php __("Quotas") ?></th><th><?php __("Default Value"); ?></th></tr>
<?php <?php
foreach($q as $name => $value) {
foreach($aqlist as $aqtype => $aqname) $key = $type . ":" . $name;
{ $col=3-$col;
$key = $qname . ":" . $aqtype;
$col=3-$col;
?> ?>
<tr class="lst<?php echo $col; ?>"> <tr class="lst<?php echo $col; ?>">
<td><label for="<?php echo $key; ?>"><?php echo $aqname; ?></label></td> <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 $key; ?>" value="<?php echo $q[$aqtype]; ?>" /></td></tr> <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 <?php
}
}
?> ?>
</table> </table>
</div>
<?php <?php
} }
?> ?>
<input type="submit" class="inb" value="<?php __("Edit the default quotas"); ?>" /> <input type="submit" class="inb" value="<?php __("Edit the default quotas"); ?>" />
</div>
</form> </form>
<?php include_once("foot.php"); ?>
</body>
</html>
...@@ -51,22 +51,20 @@ if (!($u=$admin->add_mem($login, $pass, $nom, $prenom, $nmail, $canpass, $type, ...@@ -51,22 +51,20 @@ if (!($u=$admin->add_mem($login, $pass, $nom, $prenom, $nmail, $canpass, $type,
$mem->su($u); $mem->su($u);
/* /*
* 0 = pas d'hbergement dns, en effet, pas besoin vu que les * 1 = hbergement dns, en effet, les
* domaines *.koumbit.net sont bien sur le serveur * domaines *.koumbit.net ne sont pas forcment sur le serveur
* *
* 1 = noerase = empche l'utilisateur de modifier le dns ou de * 1 = noerase = empche l'utilisateur de modifier le dns ou de
* supprimer le domaine * supprimer le domaine
* *
* 1 = force = ne tient pas compte du whois ou des droits de tld * 1 = force = ne tient pas compte du whois ou des droits de tld
*/ */
if (($create_dom == 1) && !is_null($create_dom_list)) { if (($create_dom == 1) && !is_null($create_dom_list)) {
# make sure we don't have multiple dots there // make sure we don't have multiple dots there
$dom->lock(); $dom->lock();
$dom->add_domain($login.".".preg_replace("/^\.\.*/", "", $create_dom_list),1,1,1); $dom->add_domain($login.".".preg_replace("/^\.\.*/", "", $create_dom_list),1,1,1);
$dom->unlock(); $dom->unlock();
} }
$ftp->add_ftp($login,"",$pass,"/"); $ftp->add_ftp($login,"",$pass,"/");
$mem->unsu(); $mem->unsu();
......
...@@ -34,9 +34,15 @@ if (!$admin->enabled) { ...@@ -34,9 +34,15 @@ if (!$admin->enabled) {
exit(); exit();
} }
$fields = array (
"domain" => array ("request", "string", ""),
);
getFields($fields);
if (!$admin->dom_lock($domain)) { if (!$admin->dom_lock($domain)) {
$error=$err->errstr(); $error=$err->errstr();
} }
include("adm_doms.php"); include("adm_doms.php");
exit; exit;
......
...@@ -34,10 +34,9 @@ if (!$admin->enabled) { ...@@ -34,10 +34,9 @@ if (!$admin->enabled) {
exit(); exit();
}