Commit 3c61c6f2 authored by fred's avatar fred
Browse files

Merge branch 'stable-1.0' into wip/domainepublic-1.0

Conflicts:
	bureau/admin/main.php
	bureau/admin/menu.php
	bureau/admin/menu_adm.php
	bureau/admin/menu_aide.php
	bureau/admin/menu_brouteur.php
	bureau/admin/menu_mail.php
	bureau/admin/menu_sql.php
	bureau/admin/styles/base.css
	bureau/admin/webmail/index.php
	bureau/class/config.php
	bureau/class/config_real.php
	bureau/class/functions.php
	bureau/class/local.php
	bureau/class/m_admin.php
	bureau/class/m_dom.php
	bureau/class/m_mail.php
	debian/po/fr.po
	debian/po/templates.pot
	src/mail_add
	src/rawstat.daily
parents daf5ffbf f663cc8e
* text=auto !eol
/.svnignore -text
.tx/config -text
/COPYING -text
/README.en -text
/README.fr -text
......@@ -12,15 +14,21 @@ aide/sommaire.sgml -text
aide/stats.sgml -text
aide/test.sgml -text
bureau/admin/adm_add.php -text
bureau/admin/adm_cancel.php -text
bureau/admin/adm_deactivate.php -text
bureau/admin/adm_defquotas.php -text
bureau/admin/adm_del.php -text
bureau/admin/adm_dnsweberror.php -text
bureau/admin/adm_doadd.php -text
bureau/admin/adm_dodefquotas.php -text
bureau/admin/adm_dodel.php -text
bureau/admin/adm_doedit.php -text
bureau/admin/adm_domlock.php -text
bureau/admin/adm_doms.php -text
bureau/admin/adm_domstype.php -text
bureau/admin/adm_domstypedoedit.php -text
bureau/admin/adm_domstypeedit.php -text
bureau/admin/adm_domstyperegenerate.php -text
bureau/admin/adm_donosu.php -text
bureau/admin/adm_dorenew.php -text
bureau/admin/adm_dosu.php -text
......@@ -29,6 +37,7 @@ bureau/admin/adm_list.php -text
bureau/admin/adm_login.php -text
bureau/admin/adm_mxaccount.php -text
bureau/admin/adm_panel.php -text
bureau/admin/adm_passpolicy.php -text
bureau/admin/adm_quotadoedit.php -text
bureau/admin/adm_quotaedit.php -text
bureau/admin/adm_slaveaccount.php -text
......@@ -73,7 +82,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
......@@ -84,13 +95,16 @@ bureau/admin/direct.php -text
bureau/admin/dom_add.php -text
bureau/admin/dom_doadd.php -text
bureau/admin/dom_dodel.php -text
bureau/admin/dom_edit.inc.php -text
bureau/admin/dom_edit.php -text
bureau/admin/dom_editdns.php -text
bureau/admin/dom_subdel.php -text
bureau/admin/dom_subdodel.php -text
bureau/admin/dom_subdoedit.php -text
bureau/admin/dom_subedit.php -text
bureau/admin/dom_substatus.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 +112,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 +158,77 @@ 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/wz_dragdrop.js -text
bureau/admin/js/jquery.min.js -text
bureau/admin/js/jquery_ui/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png -text
bureau/admin/js/jquery_ui/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png -text
bureau/admin/js/jquery_ui/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png -text
bureau/admin/js/jquery_ui/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png -text
bureau/admin/js/jquery_ui/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png -text
bureau/admin/js/jquery_ui/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png -text
bureau/admin/js/jquery_ui/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png -text
bureau/admin/js/jquery_ui/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png -text
bureau/admin/js/jquery_ui/css/smoothness/images/ui-icons_222222_256x240.png -text
bureau/admin/js/jquery_ui/css/smoothness/images/ui-icons_2e83ff_256x240.png -text
bureau/admin/js/jquery_ui/css/smoothness/images/ui-icons_454545_256x240.png -text
bureau/admin/js/jquery_ui/css/smoothness/images/ui-icons_888888_256x240.png -text
bureau/admin/js/jquery_ui/css/smoothness/images/ui-icons_cd0a0a_256x240.png -text
bureau/admin/js/jquery_ui/css/smoothness/jquery-ui-1.8.10.custom.css -text
bureau/admin/js/jquery_ui/index.html -text
bureau/admin/js/jquery_ui/js/jquery-1.4.4.min.js -text
bureau/admin/js/jquery_ui/js/jquery-ui-1.8.10.custom.min.js -text
bureau/admin/js/jquery_ui/js/jquery.ui.datepicker-de.js -text
bureau/admin/js/jquery_ui/js/jquery.ui.datepicker-es.js -text
bureau/admin/js/jquery_ui/js/jquery.ui.datepicker-fr.js -text
bureau/admin/js/prototype.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 +258,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_oneuser.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
......@@ -193,8 +279,10 @@ bureau/admin/sql_restore.php -text
bureau/admin/sql_users_add.php -text
bureau/admin/sql_users_del.php -text
bureau/admin/sql_users_doadd.php -text
bureau/admin/sql_users_dopassword.php -text
bureau/admin/sql_users_dorights.php -text
bureau/admin/sql_users_list.php -text
bureau/admin/sql_users_password.php -text
bureau/admin/sql_users_rights.php -text
bureau/admin/sta2_add_raw.php -text
bureau/admin/sta2_del_raw.php -text
......@@ -203,9 +291,11 @@ 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/trash_dateselect.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 +303,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/hooks.php -text
bureau/class/lang_env.php -text
bureau/class/local.php -text
bureau/class/m_admin.php -text
......@@ -226,10 +317,10 @@ bureau/class/m_mem.php -text
bureau/class/m_mysql.php -text
bureau/class/m_quota.php -text
bureau/class/m_sta2.php -text
bureau/class/m_trash.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
......@@ -238,13 +329,12 @@ bureau/locales/en_US/LC_MESSAGES/manual.po -text
bureau/locales/en_US/LC_MESSAGES/messages.po -text
bureau/locales/es_ES/LC_MESSAGES/manual.po -text
bureau/locales/es_ES/LC_MESSAGES/messages.po -text
bureau/locales/es_VE/LC_MESSAGES/manual.po -text
bureau/locales/es_VE/LC_MESSAGES/messages.po -text
bureau/locales/fr_FR/LC_MESSAGES/manual.po -text
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
......@@ -277,16 +367,20 @@ debian/po/fr.po -text
debian/po/templates.pot -text
debian/rules -text
debian/templates -text
etc/alternc/apache-ssl.conf -text
etc/alternc/apache.conf -text
etc/alternc/alternc.ini -text
etc/alternc/apache2-ssl.conf -text
etc/alternc/apache2.conf -text
etc/alternc/functions_hosting/hosting_massvhost.sh -text
etc/alternc/menulist.txt -text
etc/alternc/phpmyadmin.inc.php -text
etc/alternc/postfix-slave.cf -text
etc/alternc/postfix.cf -text
etc/alternc/templates/alternc/bureau.conf -text
etc/alternc/templates/apache2/panel.conf -text
etc/alternc/templates/apache2/url.conf -text
etc/alternc/templates/apache2/vhost.conf -text
etc/alternc/templates/apache2/webmail.conf -text
etc/alternc/templates/bind/automatic.conf -text
etc/alternc/templates/bind/named.conf -text
etc/alternc/templates/bind/named.conf.options -text
etc/alternc/templates/bind/slaveip.conf -text
etc/alternc/templates/bind/templates/mx.template -text
......@@ -296,10 +390,13 @@ etc/alternc/templates/bind/templates/zone.template -text
etc/alternc/templates/courier/authdaemonrc -text
etc/alternc/templates/courier/authmysqlrc -text
etc/alternc/templates/default/saslauthd -text
etc/alternc/templates/dovecot/dovecot-sql.conf -text
etc/alternc/templates/dovecot/dovecot.conf -text
etc/alternc/templates/postfix/ca.der -text
etc/alternc/templates/postfix/myalias.cf -text
etc/alternc/templates/postfix/mydomain.cf -text
etc/alternc/templates/postfix/mygid.cf -text
etc/alternc/templates/postfix/myrelay.cf -text
etc/alternc/templates/postfix/myvirtual.cf -text
etc/alternc/templates/postfix/sasl/smtpd.conf -text
etc/alternc/templates/proftpd/modules.conf -text
......@@ -316,8 +413,8 @@ install/mysql.sql -text
install/newone.php -text
install/reset_root.php -text
install/upgrade_check.sh -text
install/upgrades/0.9.1.sh -text
install/upgrades/0.9.1.sql -text
install/upgrades/0.9.10.sql -text
install/upgrades/0.9.1_migrationldap.php -text
install/upgrades/0.9.2.php -text
install/upgrades/0.9.2.sql -text
......@@ -329,10 +426,15 @@ install/upgrades/0.9.5.sql -text
install/upgrades/0.9.6.sql -text
install/upgrades/0.9.7.sql -text
install/upgrades/0.9.9.sql -text
install/upgrades/1.0.1.php -text
install/upgrades/1.0.1.sql -text
install/upgrades/1.0.3.sql -text
install/upgrades/1.0.sql -text
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
......@@ -341,15 +443,26 @@ man/top_http_users.8 -text
man/top_http_users.fr.8 -text
man/top_mysql_users.8 -text
man/top_mysql_users.fr.8 -text
nightlybuild/HEADER.html -text
nightlybuild/README.html -text
nightlybuild/READMEFIRST -text
nightlybuild/build.sh -text
nightlybuild/nightly.key -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/basedir_prot.sh -text
src/alternc-check -text
src/alternc-dboptimize -text
src/alternc-passwd -text
src/alternc_reload -text
src/du.pl -text
src/fixperms.sh -text
src/functions.sh -text
src/functions_dns.sh -text
src/functions_hosting.sh -text
src/mail_add -text
src/mail_del -text
src/mem_add -text
......@@ -369,6 +482,7 @@ src/update_domains.sh -text
tests/mechdump.pm -text
tests/test_demo.pl -text
tests/whois_test.php -text
tools/alternc_get_path -text
tools/get_account_by_domain -text
tools/get_domains_by_account -text
tools/top_ftp_users -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
[main]
host = https://www.transifex.net
[alternc.messages]
source_file = bureau/locales/messages.pot
source_lang = en
trans.fr_FR = bureau/locales/fr_FR/LC_MESSAGES/messages.po
trans.es_ES = bureau/locales/es_ES/LC_MESSAGES/messages.po
trans.pt_BR = bureau/locales/pt_BR/LC_MESSAGES/messages.po
trans.en_US = bureau/locales/en_US/LC_MESSAGES/messages.po
trans.de_DE = bureau/locales/de_DE/LC_MESSAGES/messages.po
[alternc.manual]
source_file = bureau/locales/manual.pot
source_lang = en
trans.fr_FR = bureau/locales/fr_FR/LC_MESSAGES/manual.po
trans.es_ES = bureau/locales/es_ES/LC_MESSAGES/manual.po
trans.pt_BR = bureau/locales/pt_BR/LC_MESSAGES/manual.po
trans.en_US = bureau/locales/en_US/LC_MESSAGES/manual.po
trans.de_DE = bureau/locales/de_DE/LC_MESSAGES/manual.po
[alternc.alterncadmintools]
source_file = po/alternc-admintools.pot
source_lang = en
trans.fr_FR = po/fr/LC_MESSAGES/alternc-admintools.po
[alternc.debian]
source_file = debian/po/templates.pot
source_lang = en
trans.fr_FR = debian/po/fr.po
......@@ -43,4 +43,4 @@ then apt-get install alternc
You may download and install additionnal plugins after installing AlternC.
Let's go to the developper page for more information.
https://dev.alternc.org/trac/alternc/
https://alternc.org/
......@@ -49,5 +49,5 @@ Note: vous pouvez aussi installer les modules additionnels d'AlternC par
la suite. Pour plus d'information, rendez-vous sur le serveur de
développement à l'adresse :
https://dev.alternc.org/trac/alternc/
https://alternc.org/
......@@ -30,57 +30,58 @@
----------------------------------------------------------------------
*/
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>
<h3><?php __("New AlternC account"); ?></h3>
<hr id="topbar"/>
<br />
<?php
if ($error) {
echo "<p class=\"error\">$error</p>";
}
?>
<form method="post" action="adm_doadd.php">
<table border="1" cellspacing="0" cellpadding="4">
<form method="post" action="adm_doadd.php" id="main" name="main">
<table class="tedit">
<tr><th><label for="login"><?php __("Username"); ?></label></th><td>
<input type="text" class="int" name="login" id="login" value="<?php echo $login; ?>" size="20" maxlength="64" />
<input type="text" class="int" name="login" id="login" value="<?php ehe($login); ?>" size="20" maxlength="16" />
</td></tr>
<tr>
<th><label for="pass"><?php __("Initial password"); ?></label></th>
<td><input type="password" id="pass" name="pass" class="int" value="<?php echo $pass; ?>" size="20" maxlength="64" /></td>
<td><input type="password" id="pass" name="pass" class="int" value="<?php ehe($pass); ?>" size="20" maxlength="64" /></td>
</tr>
<tr>
<th><label for="passconf"><?php __("Confirm password"); ?></label></th>
<td><input type="password" id="passconf" name="passconf" class="int" value="<?php echo $passconf; ?>" size="20" maxlength="64" /></td>
<td><input type="password" id="passconf" name="passconf" class="int" value="<?php ehe($passconf); ?>" size="20" maxlength="64" /></td>
</tr>
<tr>
<th><label for="canpass"><?php __("Can he change its password"); ?></label></th>
<td><select class="inl" name="canpass" id="canpass">
<?php
for($i=0;$i<count($bro->l_icons);$i++) {
echo "<option";
if ($canpass==$i) echo " selected=\"selected\"";
echo " value=\"$i\">"._($bro->l_icons[$i])."</option>";
}
?></select>
<td>
<input type="radio" class="inc" id="canpass0" name="canpass" value="0"<?php cbox($canpass==0); ?>><label for="canpass0"><?php __("No"); ?></label><br />
<input type="radio" class="inc" id="canpass1" name="canpass" value="1"<?php cbox($canpass==1); ?>><label for="canpass1"><?php __("Yes"); ?></label><br />
</td>
</tr>
<tr>
<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>
<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>
<td><input class="int" type="text" id="nom" name="nom" value="<?php ehe($nom); ?>" size="20" maxlength="128" />&nbsp;/&nbsp;<input type="text" name="prenom" id="prenom" value="<?php ehe($prenom); ?>" class="int" size="20" maxlength="128" /></td>
</tr>
<tr>
<th><label for="nmail"><?php __("Email address"); ?></label></th>
<td><input type="text" name="nmail" id="nmail" class="int" value="<?php echo $nmail; ?>" size="30" maxlength="128" /></td>
<td><input type="text" name="nmail" id="nmail" class="int" value="<?php ehe($nmail); ?>" size="30" maxlength="128" /></td>
</tr>
<tr>
<th><label for="type"><?php __("Account type"); ?></label></th>
......@@ -95,31 +96,36 @@ if ($error) {
echo ">$type</option>";
}
?></select>
</td>
</td>
</tr>
<?php if (variable_get('hosting_tld') || $dom->enum_domains()) { ?>
<tr>
<th colspan="2">
<input type="checkbox" name="create_dom" value="1" />
<label><?php printf(_("Create the domain <b>username.%s</b>"),""); ?></label>
<select name="create_dom_list">
<input type="checkbox" name="create_dom" value="1" class="inc" id="create_dom" <?php cbox($create_dom==1); ?>/>
<label for="create_dom"><?php printf(_("Install the domain"),""); ?></label>
<span class="int" id="create_dom_list_pfx">login.</span><select name="create_dom_list" class="int" id="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>
<tr>
<td colspan="2"><input type="submit" class="inb" name="submit" value="<?php __("Create a new member"); ?>" /></td>
</tr>
<?php } ?>
<tr class="trbtn"><td colspan="2">
<input type="submit" class="inb" name="submit" value="<?php __("Create this AlternC account"); ?>" />
<input type="button" class="inb" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='adm_list.php'" />
</td></tr>
</table>
</form>
<script type="text/javascript">
document.forms['main'].login.focus();
document.forms['main'].setAttribute('autocomplete', 'off');
</script>
</body>
</html>
<?php include_once("foot.php"); ?>
<?php
/*
$Id: adm_login.php,v 1.4 2005/04/01 17:13:10 benjamin 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: Benjamin Sonntag
Purpose of file: Connect a super-user to another account
----------------------------------------------------------------------
*/
require_once("../class/config.php");
setcookie('oldid','',0,'/');
unset($_COOKIE['oldid']);
require_once("main.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();
}
......@@ -59,14 +56,16 @@ if (! ($confirmed = ($_GET['submit'] == _("Confirm")) ) ) {
?>
<form action="<?=$PHP_SELF?>" method="GET">
<input type="hidden" name="uid" value="<?=$uid?>" />
<? __("Redirection URL:") ?> <input type="text" name="redirect" value="http://example.com/" />
<input type="submit" name="submit" value="<?=_("Confirm")?>" />
<? __("Redirection URL:") ?> <input type="text" name="redirect" class="int" value="http://example.com/" />
<input type="submit" name="submit" class="inb" value="<?=_("Confirm")?>" />
<input type="button" class="inb" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='adm_list.php'"/>
</form><?php
print "<h3>" . _("Domains of user: ") . $r["login"] . "</h3>";
} else {
if (!$_GET['redirect']) {
__("Missing redirect url.");
include_once("foot.php");
exit();
} else {
$redirect = $_GET['redirect'];
......@@ -98,32 +97,32 @@ foreach ($domains as $key => $domain) {
}
$dom->unlock();
# 2. for each subdomain
foreach ($r['sub'] as $k => $sub) {
# shortcuts
$type = $sub['type'];
$dest = $sub['dest'];
$sub = $sub['name'];
# if it's a real website
if ($type == $dom->type_local) {
if (!$confirmed) {
print "<li>";
if ($sub) {
print $sub . '.';
}
print "$domain -> $dest</li>";
} else {
# 2.1 keep a copy of where it was, in an SQL request
$backup .= "UPDATE `sub_domaines` SET `type`='$type', valeur='$dest' WHERE `domaine`='$domain' AND sub='$sub';\n";
$backup .= "DELETE FROM `sub_domaines_standby` WHERE domaine='$domain' and sub='$sub';\n";
$backup .= "INSERT INTO sub_domaines_standby (compte,domaine,sub,valeur,type,action) values ('$cuid','$domain','$sub','$dest','$type',1);\n"; // UPDATE
# 2.2 change the subdomain to redirect to http://spam.koumbit.org/
$dom->lock();
if (!$dom->set_sub_domain($domain, $sub, $dom->type_url, "edit", $redirect)) {
print "-- error in $sub.$domain: " . $err->errstr() . "\n";
if (is_array($r['sub'])) {
foreach ($r['sub'] as $k => $sub) {
# shortcuts
$type = $sub['type'];
$dest = $sub['dest'];
$sub = $sub['name'];