...
 
Commits (131)
* text=auto !eol
/.svnignore -text
.tx/config -text
/COPYING -text
/README.en -text
/README.fr -text
......@@ -225,8 +226,6 @@ 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/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
......@@ -427,6 +426,9 @@ 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
......@@ -453,6 +455,7 @@ po/fr/LC_MESSAGES/alternc-admintools.po -text
/quota_init -text
src/Makefile -text
src/alternc-check -text
src/alternc-dboptimize -text
src/alternc-passwd -text
src/alternc_reload -text
src/du.pl -text
......
[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
......@@ -40,27 +40,37 @@ if ($cancel) {
exit();
}
if ($saveret) {
$bro->Save($editfile,$R,$texte);
$error=sprintf(_("Your file %s has been saved"),$editfile)." (".format_date('%3$d-%2$d-%1$d %4$d:%5$d',date("Y-m-d H:i:s")).")";
include("bro_main.php");
exit();
if ($bro->Save($editfile,$R,$texte)) {
$error=sprintf(_("Your file %s has been saved"),$editfile)." (".format_date('%3$d-%2$d-%1$d %4$d:%5$d',date("Y-m-d H:i:s")).")";
} else {
$error=$err->errstr();
}
include("bro_main.php");
exit();
}
if ($save) {
$bro->Save($editfile,$R,$texte);
$error=sprintf(_("Your file %s has been saved"),$editfile)." (".format_date('%3$d-%2$d-%1$d %4$d:%5$d',date("Y-m-d H:i:s")).")";
if ($bro->Save($editfile,$R,$texte)) {
$error=sprintf(_("Your file %s has been saved"),$editfile)." (".format_date('%3$d-%2$d-%1$d %4$d:%5$d',date("Y-m-d H:i:s")).")";
} else {
$error=$err->errstr();
}
}
include_once("head.php");
?>
<p>
<?php if ($error) echo "<font color=\"red\">$error</font><br />"; ?>
<?php if ($error) echo "<p class=\"error\">$error</p>"; ?>
<?php echo _("File editing")." <code>$R/<b>$editfile</b></code><br />"; ?>
</p>
<form action="bro_editor.php" method="post"><br />
<div id="resizer" style="left: 0px; top: 0px; z-index: 54; width: <?php echo $p["editsizex"]*8; ?>px; height: <?php echo $p["editsizey"]*8; ?>px; cursor: auto;"><textarea class="int" style="font-family: <?php echo $p["editor_font"]; ?>; font-size: <?php echo $p["editor_size"]; ?>; width: 90%; height: 90%;" name="texte"><?php
$bro->content($R,$editfile);
?></textarea><img src="/admin/icon/winresize.gif" alt="<?php __("ctrl+click or shift+click and drag to resize the editing zone"); ?>" title="<?php __("ctrl+click or shift+click and drag to resize the editing zone"); ?>" height="20" width="20" /></div><br />
$failed=false;
if (!$bro->content($R,$editfile)) {
$failed=true;
}
?></textarea>
<?php if ($failed) echo "<p class=\"error\">".$err->errstr()."</p>"; ?>
<input type="hidden" name="editfile" value="<?php echo str_replace("\"","&quot;",$editfile); ?>" />
<input type="hidden" name="R" value="<?php echo str_replace("\"","&quot;",$R); ?>" />
......@@ -68,10 +78,5 @@ $bro->content($R,$editfile);
<input type="submit" class="inb" value="<?php __("Save &amp; Quit"); ?>" name="saveret" />
<input type="submit" class="inb" value="<?php __("Quit"); ?>" name="cancel" />
<br />
<script type="text/javascript">
<!--
SET_DHTML("resizer"+RESIZABLE);
//-->
</script>
</form>
<?php include_once("foot.php"); ?>
\ No newline at end of file
......@@ -71,7 +71,7 @@ if ($q["u"]>0) {
<input type="radio" id="newisslave1" name="newisslave" value="1"<?php cbox($newisslave==1); ?>/><label for="newisslave1"><?php __("Yes, redirect this new domain to this one:"); ?> </label> <select name="slavedom" id="slavedom" class="inl">
<option value=""><?php __("-- Choose a domain --"); ?></option>
<?php
$dl=$dom->get_domain_list($cuid);
$dl=$dom->get_domain_list($cuid, false);
$ddl=array();
foreach($dl as $d) {
$ddl[$d]=$d;
......
......@@ -97,16 +97,23 @@ if ($r['dns_action']=='UPDATE') {?>
<tr><th colspan="2"> </th><th><?php __("Subdomain"); ?></th><th><?php __("Type");?></th><th><?php __("Status")?></th></tr>
<?php
$col=1;
$dt=$dom->domains_type_lst();
for($i=0;$i<$r["nsub"];$i++) {
$col=3-$col;
?>
<tr class="lst<?php echo $col; ?>">
<?php if ( $r['sub'][$i]['web_action'] =='DELETE') { echo "<td colspan=2 />"; } else { ?>
<td class="center">
<?php if (!(!$isinvited && $dt[strtolower($r["sub"][$i]["type"])]["enable"] != "ALL" )) { ?>
<div class="ina"><a href="dom_subedit.php?domain=<?php echo urlencode($r["name"]) ?>&amp;sub=<?php echo urlencode($r["sub"][$i]["name"]) ?>&amp;type=<?php echo urlencode($r["sub"][$i]["type"]) ?>&amp;value=<?php echo urlencode($r["sub"][$i]['dest'])?>"><img src="images/edit.png" alt="<?php __("Edit"); ?>" /><?php __("Edit"); ?></a></div>
<?php } ?>
</td><td class="center">
<?php if (!(!$isinvited && $dt[strtolower($r["sub"][$i]["type"])]["enable"] != "ALL" )) { ?>
<div class="ina"><a href="dom_subdel.php?domain=<?php echo urlencode($r["name"]) ?>&amp;sub=<?php echo urlencode($r["sub"][$i]["name"]) ?>&amp;type=<?php echo urlencode($r["sub"][$i]["type"]) ?>&amp;value=<?php echo urlencode($r["sub"][$i]['dest'])?>"><img src="images/delete.png" alt="<?php __("Delete"); ?>" /><?php __("Delete"); ?></a></div>
<?php } ?>
</td>
<?php } // end IF ==DELETE ?>
<td><a href="http://<?php ecif($r["sub"][$i]["name"],$r["sub"][$i]["name"]."."); echo $r["name"] ?>" target="_blank"><?php ecif($r["sub"][$i]["name"],$r["sub"][$i]["name"]."."); echo $r["name"] ?></a></td>
......@@ -119,23 +126,25 @@ for($i=0;$i<$r["nsub"];$i++) {
}
?></td>
<td><?php
if ( $r['sub'][$i]['web_action'] !='DELETE') {
switch ($r['sub'][$i]['enable']) {
case 'ENABLED':
__("Enabled");
echo "<br/><a href='dom_substatus.php?domain=".urlencode($r["name"])."&amp;sub=".urlencode($r["sub"][$i]["name"])."&amp;type=".urlencode($r["sub"][$i]["type"])."&amp;value=".urlencode($r["sub"][$i]['dest'])."&status=disable'>";__("Disable");echo "</a>";
break;
case 'ENABLE':
__("Activation pending");
break;
case 'DISABLED':
__("Disabled");
echo "<br/><a href='dom_substatus.php?domain=".urlencode($r["name"])."&amp;sub=".urlencode($r["sub"][$i]["name"])."&amp;type=".urlencode($r["sub"][$i]["type"])."&amp;value=".urlencode($r["sub"][$i]['dest'])."&status=enable'>";__("Enable");echo "</a>";
break;
case 'DISABLE':
__("Desactivation pending");
break;
}
if (!(!$isinvited && $dt[strtolower($r["sub"][$i]["type"])]["enable"] != "ALL" )) {
if ( $r['sub'][$i]['web_action'] !='DELETE') {
switch ($r['sub'][$i]['enable']) {
case 'ENABLED':
__("Enabled");
echo "<br/><a href='dom_substatus.php?domain=".urlencode($r["name"])."&amp;sub=".urlencode($r["sub"][$i]["name"])."&amp;type=".urlencode($r["sub"][$i]["type"])."&amp;value=".urlencode($r["sub"][$i]['dest'])."&status=disable'>";__("Disable");echo "</a>";
break;
case 'ENABLE':
__("Activation pending");
break;
case 'DISABLED':
__("Disabled");
echo "<br/><a href='dom_substatus.php?domain=".urlencode($r["name"])."&amp;sub=".urlencode($r["sub"][$i]["name"])."&amp;type=".urlencode($r["sub"][$i]["type"])."&amp;value=".urlencode($r["sub"][$i]['dest'])."&status=enable'>";__("Enable");echo "</a>";
break;
case 'DISABLE':
__("Desactivation pending");
break;
}
}
}?></td>
<td><?php
switch ($r['sub'][$i]['web_action']) {
......@@ -163,7 +172,6 @@ sub_domains_edit($domain);
<br />
<?php $mem->show_help("edit_domain"); ?>
<p>&nbsp;</p>
<p>&nbsp;</p>
<!-- *****************************************
modification des parametres dns
-->
......@@ -172,41 +180,38 @@ if (!$r['noerase']) {
?>
<hr />
<h3><?php __("DNS parameters"); ?></h3>
<h3><?php __("DNS & Email parameters"); ?></h3>
<form action="dom_editdns.php?domain=<?php echo urlencode($r["name"]) ?>" method="post" id="fdns" name="fdns">
<table border="1" cellpadding="6" cellspacing="0">
<tr><td colspan="2"><?php __("Manage the DNS on the server ?"); ?></td></tr>
<table class="tlist">
<tr>
<td align="center" width="65%"><input type="radio" id="yesdns" class="inc" name="dns" value="1"<?php cbox($r["dns"]); ?> onclick="dnson();" />&nbsp;<label for="yesdns"><?php __("Yes"); ?></label></td>
<td align="center" width="35%"><input type="radio" id="nodns" class="inc" name="dns" value="0"<?php cbox(!$r["dns"]); ?> onclick="dnsoff();" />&nbsp;<label for="nodns"><?php __("No"); ?></label></td>
<td><?php __("Manage the DNS on the server ?"); ?></td>
<td>
<input type="radio" id="yesdns" class="inc" name="dns" value="1"<?php cbox($r["dns"]); ?> />&nbsp;<label for="yesdns"><?php __("Yes"); ?></label>
</td><td><input type="radio" id="nodns" class="inc" name="dns" value="0"<?php cbox(!$r["dns"]); ?> />&nbsp;<label for="nodns"><?php __("No"); ?></label>
</td>
</tr>
<tr>
<td width="65%" valign="top">
<p>
<?php printf(_("help_dns_mx %s %s"),$L_MX,$L_HOSTING); ?>
</p>
<label for="mx"><?php __("MX Field"); ?> : </label><input type="text" class="int" name="mx" id="mx" value="<?php if ($r["dns"]) echo $r["mx"]; else echo $L_MX; ?>" <?php if (!$r["dns"]) echo "disabled=\"disabled\""; ?> />
</td>
<td width="35%" valign="top">
<p>
<?php __("help_dns_mail"); ?></p>
<p>
<input type="radio" id="emailon" class="inc" name="email" id="emailon" value="1"<?php cbox($r["mail"]); ?> <?php if ($r["dns"]) echo "disabled=\"disabled\""; ?>/><label for="emailon"><?php __("Yes"); ?></label>
<br />
<input type="radio" id="emailoff" class="inc" name="email" id="emailoff" value="0"<?php cbox(!$r["mail"]); ?> <?php if ($r["dns"]) echo "disabled=\"disabled\""; ?>/><label for="emailoff"><?php __("No"); ?></label>
</p>
<p> <?php __("Warning: If you set this to 'no', all your email accounts and aliases on this domain will be immediately deleted."); ?>
</p>
</td>
</table>
</tr>
<tr class="trbtn"><td colspan="2"><input type="submit" class="inb" name="submit" value="<?php __("Submit the changes"); ?>" /></td></tr>
<table class="tlist">
<tr>
<td>
<?php __("Manage the Emails Addresses of this domain on the server?"); ?>
</td>
<td>
<input type="radio" id="yesemail" class="inc" name="email" value="1"<?php cbox($r["mail"]); ?> />&nbsp;<label for="yesemail"><?php __("Yes"); ?></label>
</td><td><input type="radio" id="noemail" class="inc" name="email" value="0"<?php cbox(!$r["mail"]); ?> />&nbsp;<label for="noemail"><?php __("No"); ?></label>
</td>
</table>
<div style="padding-left: 30px; padding-bottom: 20px" class="error"> <?php __("Warning: If you set this to 'no', all your email accounts and aliases on this domain will be immediately deleted."); ?></div>
<input type="submit" class="inb" name="submit" value="<?php __("Submit the changes"); ?>" />
</form>
<!-- *****************************************
destruction du domaine
-->
<p>&nbsp</p>
<hr />
<h3><?php __("Domain removal"); ?></h3>
<br />
<?php printf(_("help_domain_del %s"),$domain); ?><br />
<form action="dom_dodel.php?domain=<?php echo urlencode($domain) ?>" method="post">
......@@ -214,6 +219,8 @@ if (!$r['noerase']) {
<input type="submit" class="inb" name="detruire" value="<?php printf(_("Delete %s from this server"),$domain); ?>" />
</p>
</form>
<br />
<hr />
<?php } // noerase ?>
<script type="text/javascript">
......
......@@ -33,22 +33,13 @@ include_once("head.php");
$fields = array (
"domain" => array ("request", "string", ""),
"dns" => array ("request", "integer", 1),
"mx" => array ("request", "string", ""),
"email" => array ("request", "integer", 0),
"email" => array ("request", "integer", 1),
);
getFields($fields);
$dom->lock();
if ($dns!="1") {
// On fixe mx :
if ($email=="1") {
$mx=$L_MX;
} else {
$mx="";
}
}
if (!$dom->edit_domain($domain,$dns,$mx)) {
if (!$dom->edit_domain($domain,$dns,$email)) {
$error=$err->errstr();
include("dom_edit.php");
$dom->unlock();
......
......@@ -38,12 +38,21 @@ $fields = array (
);
getFields($fields);
$dt=$dom->domains_type_lst();
if (!$isinvited && $dt[strtolower($type)]["enable"] != "ALL" ) {
__("This page is restricted to authorized staff");
exit();
}
$dom->lock();
if (!$r=$dom->get_sub_domain_all($domain,$sub,$type)) {
$error=$err->errstr();
}
$dom->unlock();
?>
<h3><?php printf(_("Deleting subdomain %s"),"http://".ife($sub,$sub.".").$domain); ?> : </h3>
<?php
......
......@@ -38,6 +38,13 @@ $fields = array (
);
getFields($fields);
$dt=$dom->domains_type_lst();
if (!$isinvited && $dt[strtolower($type)]["enable"] != "ALL" ) {
__("This page is restricted to authorized staff");
exit();
}
$dom->lock();
if (!$dom->del_sub_domain($domain,$sub,$type,$value)) {
......
......@@ -50,6 +50,14 @@ $value=$$dynamicvar;
$dom->lock();
$dt=$dom->domains_type_lst();
if (!$isinvited && $dt[strtolower($type)]["enable"] != "ALL" ) {
__("This page is restricted to authorized staff");
exit();
}
$r=$dom->set_sub_domain($domain,$sub,$type,$value, $type_old, $sub_old, $value_old);
$dom->unlock();
......
......@@ -41,6 +41,14 @@ getFields($fields);
$dom->lock();
$domroot=$dom->get_domain_all($domain);
$dt=$dom->domains_type_lst();
if (!$isinvited && $dt[strtolower($type)]["enable"] != "ALL" ) {
__("This page is restricted to authorized staff");
exit();
}
if (!$noread) {
if (!$r=$dom->get_sub_domain_all($domain,$sub,$type,$value)) {
$error=$err->errstr();
......
......@@ -27,7 +27,7 @@
Purpose of file: Main header of all html files
----------------------------------------------------------------------
*/
if (!$charset) $charset="iso-8859-1";
if (!$charset) $charset="UTF-8";
@header("Content-Type: text/html; charset=$charset");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
......@@ -37,7 +37,6 @@ if (!$charset) $charset="iso-8859-1";
<link rel="stylesheet" href="styles/style.css" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset; ?>" />
<script type="text/javascript" src="js/alternc.js"></script>
<script type="text/javascript" src="js/wz_dragdrop.js"></script>
<script src="js/jquery.min.js" type="text/javascript"></script>
<script src="js/jquery_ui/js/jquery-ui-1.8.10.custom.min.js" type="text/javascript"></script>
<?php
......@@ -50,7 +49,12 @@ if (file_exists($lang_date_picker))
<body>
<?
$oldid=intval(isset($_COOKIE['oldid'])?$_COOKIE['oldid']:'');
$isinvited=false;
if ($admin->enabled) $isinvited=true;
if ($oldid && $oldid!=$cuid) {
$isinvited=true;
echo "<div align=center><p class='error'>";
__("Administrator session. you may <a href='adm_login.php'>return to your account</a> or <a href='adm_cancel.php'>cancel this feature</a>");
echo "</p></div>";
......
......@@ -47,7 +47,7 @@ else {
}
if (!is_array($r)) {
echo "<p><span class=\"ina\"<a href=\"hta_add.php\">"._("Protect a folder")."</a></span><br />";
echo "<p><span class=\"ina\"><a href=\"hta_add.php\">"._("Protect a folder")."</a></span><br />";
$mem->show_help("hta_list");
echo "</p>";
include_once("foot.php");
......
......@@ -41,6 +41,9 @@ $H=getenv("HTTP_HOST");
if (!isset($restrictip)) {
$restrictip=1;
}
if (!$charset) $charset="UTF-8";
@header("Content-Type: text/html; charset=$charset");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
......@@ -48,7 +51,7 @@ if (!isset($restrictip)) {
<title>AlternC Desktop</title>
<link rel="stylesheet" href="styles/style.css" type="text/css" />
<script type="text/javascript" src="js/alternc.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset; ?>" />
</head>
<body>
......@@ -72,7 +75,7 @@ if (!$_SERVER[HTTPS]) {
</td><td>
<form action="login.php" method="post" target="_top">
<table border="0" style="border: 1px solid #202020;" cellspacing="0" cellpadding="3" width="300px" >
<tr><th colspan="2" align="center">Accs AlternC</th></tr>
<tr><th colspan="2" align="center"><?php __("AlternC access"); ?></th></tr>
<tr><th align="right"><label for="username"><?php echo _("Username"); ?></label></th><td><input type="text" class="int" name="username" id="username" value="" maxlength="128" size="15" /></td></tr>
<tr><th align="right"><label for="password"><?php echo _("Password"); ?></label></th><td><input type="password" class="int" name="password" id="password" value="" maxlength="128" size="15" /></td></tr>
<tr><td colspan="2" align="center"><input type="submit" class="inb" name="submit" value="<?php __("Enter"); ?>" /><input type="hidden" id="restrictip" name="restrictip" value="1" /></td></tr>
......
This diff is collapsed.
This diff is collapsed.
......@@ -58,13 +58,10 @@ if ($inc && $rss_url) {
$rss = fetch_rss($rss_url);
if ($rss) {
echo "<h2>" . _("Latest news") . "</h2>";
foreach ($rss->items as $item) {
$href = $item['link'];
$title = $item['title'];
$title = $item['title'];
echo "<h3><a href=$href>$title</a></h3>";
echo '<span class="date">'.$item['pubdate'] .'</span> - ';
echo '<span class="author">'.$item['dc']['creator'].'</span>';
echo $item['summary'];
}
}
......
......@@ -31,13 +31,16 @@ require_once("../class/config.php");
$mem->del_session();
if (!$charset) $charset="UTF-8";
@header("Content-Type: text/html; charset=$charset");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<title><?php __("Disconnected"); ?></title>
<link rel="stylesheet" href="styles/style.css" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset; ?>" />
</head>
<body style="margin: 20px;">
<h3 style="text-align: center"><?php __("Disconnected"); ?></h3>
......
......@@ -34,6 +34,14 @@ require_once("../class/config.php");
<div class="menu-box">
<div class="menu-title"><img src="images/home.png" alt="<?php __("Home / Information"); ?>" />&nbsp;<a href="main.php"><?php __("Home / Information"); ?></a></div>
<div class="menu-content">
<ul>
<li class="link"><a href="/transat/profile#account">Profil</a></li>
<li><a href="quota_show.php"><?php __("Show my quotas"); ?></a></li>
<li><a href="http://www.aide-alternc.org/" target="help"><?php __("Online help"); ?></a></li>
</ul>
</div>
</div>
<?php
......
......@@ -42,8 +42,10 @@ if ($mem->checkRight()) { ?>
<li><a href="quotas_users.php?mode=4"><span style="color: red;"><?php __("User Quotas"); ?></span></a></li>
<?php if ($cuid == 2000) { ?>
<li><a href="adm_panel.php"><span style="color: red;"><?php __("Admin Control Panel"); ?></span></a></li>
<li><a href="/admin/sql/?server=2"><span style="color: red;"><?php __("General PhpMyAdmin"); ?></span></a></li>
<li><a href="/alternc-sql/?server=2"><span style="color: red;"><?php __("General PhpMyAdmin"); ?></span></a></li>
<?php } ?>
<li><a href="../transat/accounts/list/">Membres</a></li>
<li><a href="../transat/accounts/adherents/">Adh&eacute;rents</a></li>
</ul>
</div>
</div>
......
......@@ -31,5 +31,11 @@
/* ############# BROUTEUR ############# */
?>
<div class="menu-box">
<div class="menu-title"><img src="images/folder.png" alt="<?php __("File browser"); ?>" />&nbsp;<a href="bro_main.php"><?php __("File browser"); ?></a></div>
</div>
\ No newline at end of file
<div class="menu-title"><img src="images/folder.png" alt="<?php __("File browser"); ?>" />&nbsp;Fichiers</a></div>
<div class=menu-content">
<ul>
<li><a href="bro_main.php"><?php __("File browser"); ?></a></li>
<li><a href="ftp_list.php"><?php __("FTP accounts"); ?></a></li>
<li><a href="hta_list.php"><?php __("Protected folders"); ?></a></li>
</ul>
</div>
<div class="menu-box">
<div class="menu-title">
<img src="/admin/images/lang.png" alt="<?php __("Langues"); ?>" />&nbsp;<a href="javascript:menulang_show();"><?php __("Langues"); ?></a></div>
<img src="/admin/images/lang.png" alt="<?php __("Langues"); ?>" />&nbsp;<a href="javascript:menulang_toggle();"><?php __("Langues"); ?></a></div>
<div class="menu-content" id="menu-lang">
<ul>
<?php foreach($locales as $l) { ?>
......@@ -10,8 +10,8 @@
</div>
</div>
<script type="text/javascript">
$("#menu-lang").hide();
function menulang_show() {
$("#menu-lang").show();
function menulang_toggle() {
$("#menu-lang").toggle();
}
menulang_toggle();
</script>
......@@ -50,8 +50,9 @@ $res = $mail->enum_doms_mails($val, 1);
?>
<li><a href="mail_list.php?domain=<?php echo urlencode($val) ?>"><?php echo $val ?> (<?= $res["count"]; ?>)</a></li>
<li><a href="/transat/domains/invite/">Invitation</a></li>
<?php } ?>
</ul>
</div>
</div>
<?php } ?>
\ No newline at end of file
<?php } ?>
......@@ -32,7 +32,7 @@ if ($q["t"]) {
?>
<div class="menu-box">
<div class="menu-title">
<img src="images/mysql.png" alt="MySQL" />&nbsp;MySQL (<?= $q["u"]; ?>/<?= $q["t"]; ?>)</div>
<img src="images/mysql.png" alt="MySQL" />&nbsp;Bases de donn&eacute;es (<?= $q["u"]; ?>/<?= $q["t"]; ?>)</div>
<div class="menu-content" id="menu-sql">
<ul>
<li><a href="sql_list.php"><?php __("Databases"); ?></a></li>
......
<?php
/* taken from menu_sta2.php */
$q=$quota->getquota("stats");
$r=$quota->getquota("dom");
if ($q["t"]>0 && $r["u"]>0) {
?>
<dt id="webalizer">Statistiques</dt>
<dd><a href="webalizer_list.php"><?php __("Web Statistics"); ?></a></dd>
<?php } ?>
<?php
/* taken from menu_sta2.php */
$q=$quota->getquota("sta2");
$r=$quota->getquota("dom");
if ($q["t"]>0 && $r["u"]>0) {
?>
<!-- <dd><a href="sta2_list.php"><?php __("Raw web statistics"); ?></a></dd> -->
<?php } ?>
<dd><a href="../transat/webstats/">Webstats</a></dd>
<dd><a href="../transat/profile#logviewer">Visualiseur de logs</a></dd>
......@@ -37,7 +37,7 @@ if (!$r=$mysql->get_dblist()) {
setcookie("REMOTE_PASSWORD",$r[0]["pass"],0,"/");
if ($lang) $l="&lang=".substr($lang,0,2);
// TODO : make it an absolute url ! (even in httpS :))
header("Location: /admin/sql/index.php?server=1");
header("Location: /alternc-sql/index.php?server=1");
exit();
}
......
This diff is collapsed.
......@@ -281,6 +281,7 @@ img {
padding-left: 2px;
text-decoration: none;
border: 1px solid #F1F8FD;
line-height: 0.75em;
}
.menu-box li a img {
......
<?php
header ("Location: /webmail/") ;
header ("Location: /roundcube/");
?>
......@@ -70,7 +70,7 @@ if (isset($http_auth) && $http_auth) {
header('HTTP/1.0 401 Unauthorized');
exit();
}
}
}
if (!empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW'])) {
// Gruiiik
$_REQUEST["username"]=$_SERVER['PHP_AUTH_USER'];
......@@ -80,24 +80,18 @@ if (!empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW'])) {
$help_baseurl="http://www.aide-alternc.org/";
/* PHPLIB inclusions : */
$root="/var/alternc/bureau/";
/* Server Domain Name */
$host=getenv("HTTP_HOST");
/* Global variables (AlternC configuration) */
require_once($root."class/local.php");
require_once(dirname(__FILE__)."/local.php");
/* PHPLIB inclusions : */
$root=$L_ALTERNC_LOC."/bureau/";
require_once($root."class/db_mysql.php");
require_once($root."class/functions.php");
require_once($root."class/variables.php");
// Redirection si appel https://(!fqdn)/
if (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"]=="on" && $host!=$L_FQDN) {
header("Location: https://$L_FQDN/");
}
// Classe hrite de la classe db de la phplib.
/**
* Class for MySQL management in the bureau
......@@ -131,7 +125,7 @@ $classes=array();
/* CLASSES PHP : automatic include : */
$c=opendir($root."class/");
while ($di=readdir($c)) {
if (ereg("^m_(.*)\\.php$",$di,$match)) { // $
if (preg_match("#^m_(.*)\\.php$#",$di,$match)) { // $
$name1="m_".$match[1];
$name2=$match[1];
$classes[]=$name2;
......
......@@ -84,7 +84,7 @@ $classes=array();
/* CLASSES PHP : automatic include : */
$c=opendir($root."class/");
while ($di=readdir($c)) {
if (ereg("^m_(.*)\\.php$",$di,$match)) { // $
if (preg_match("#^m_(.*)\\.php$#",$di,$match)) { // $
$name1="m_".$match[1];
$name2=$match[1];
$classes[]=$name2;
......@@ -157,4 +157,4 @@ for($i=0;$i<count($classes);$i++) {
}
?>
\ No newline at end of file
?>
......@@ -190,7 +190,7 @@ function checkfqdn($fqdn) {
// Note: a.foo.net is a valid domain
// Note: RFC1035 tells us that a domain should not start by a digit, but every registrar allows such a domain to be created ... too bad.
if (!eregi("^[a-z0-9]([a-z0-9-]*[a-z0-9])?$",$val)) {
if (!preg_match("#^[a-z0-9]([a-z0-9-]*[a-z0-9])?$#i",$val)) {
return 3;
}
}
......
......@@ -9,6 +9,9 @@ function update_locale($langpath) {
$locales[$mat[1]]=$mat[1];
}
}
if (!count($locales)) {
$locales=array("en_US"=>"en_US");
}
return $locales;
}
......@@ -23,6 +26,11 @@ $langpath = bindtextdomain("alternc", "/var/alternc/bureau/locales");
// Create or update a locale.php file if it is outdated.
$locales = update_locale($langpath);
// Default to en_US :
if (!isset($_SERVER["HTTP_ACCEPT_LANGUAGE"])) {
$_SERVER["HTTP_ACCEPT_LANGUAGE"]="en_US";
}
if (!(isset($lang))) { // Use the browser first preferred language
$lang=strtolower(substr(trim($_SERVER["HTTP_ACCEPT_LANGUAGE"]),0,5));
}
......@@ -39,7 +47,7 @@ if (! isset($locales[$lang])) { // Requested language not found in locales
}
}
if (!isset($locales[$lang])) $lang=$locales[0];
if (!isset($locales[$lang])) list($lang)=each($locales);
if (isset($setlang) && isset($lang)) {
setcookie("lang",$lang);
......@@ -61,5 +69,7 @@ textdomain("alternc");
if (_("") && preg_match("#charset=([A-Za-z0-9\.-]*)#",_(""),$mat)) {
$charset=$mat[1];
}
if (!$charset) $charset="UTF-8";
bind_textdomain_codeset("alternc","$charset");
?>
<?php
/* Read global variables (AlternC configuration) */
$L_VERSION="v. 1.0~rc2";
$L_VERSION="v. 1.0";
/* To ease the transition, we define a lookup table for old names */
$compat = array('DEFAULT_MX' => 'MX',
......
......@@ -261,6 +261,14 @@ class m_admin {
global $err,$mem,$db,$cuid;
// Check that the current user is editing one of it's own account !
// but ADMIN (always uid 2000) is almighty
// FRED, 2010-04-08, en fait modifi pour que tous les admins soient
// considrs comme crateurs des comptes, comme a chacun/e peut
// assurer l'administration de ceux-ci.
if ($this->enabled == 1)
return true;
return false;
if ($cuid==2000) {
return true;
}
......@@ -328,7 +336,7 @@ class m_admin {
}
// Vrification de la conformit du login
$login=strtolower($login);
if (!ereg("^[a-z0-9]*$",$login)) { //$
if (!preg_match("#^[a-z0-9]*$#",$login)) { //$
$err->raise("admin", "Login can only contains characters a-z and 0-9");
return false;
}
......@@ -852,7 +860,7 @@ EOF;
file_put_contents($cachefile,serialize($checked));
}
}
$db->query("SELECT m.login,d.domaine,d.gesdns,d.gesmx,d.noerase FROM domaines d LEFT JOIN membres m ON m.uid=d.compte ORDER BY domaine;");
$db->query("SELECT m.uid,m.login,d.domaine,d.gesdns,d.gesmx,d.noerase FROM domaines d LEFT JOIN membres m ON m.uid=d.compte ORDER BY domaine;");
while ($db->next_record()) {
$tmp=$db->Record;
if ($alsocheck) {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -204,8 +204,8 @@ class m_ftp {
return false; // The error has been raised by checkPolicy()
}
}
$db->query("UPDATE ftpusers SET name='".$prefixe.$login."', password='', encrypted_password=ENCRYPT('$pass'), homedir='/var/alternc/html/$l/$lo/$dir', uid='$cuid' WHERE id='$id';");
$encrypted_password = crypt($pass,strrev(microtime(true)));
$db->query("UPDATE ftpusers SET name='".$prefixe.$login."', password='', encrypted_password='$encrypted_password', homedir='/var/alternc/html/$l/$lo/$dir', uid='$cuid' WHERE id='$id';");
} else {
$db->query("UPDATE ftpusers SET name='".$prefixe.$login."', homedir='/var/alternc/html/$l/$lo/$dir', uid='$cuid' WHERE id='$id';");
}
......@@ -281,7 +281,8 @@ class m_ftp {
}
if ($quota->cancreate("ftp")) {
$db->query("INSERT INTO ftpusers (name,password, encrypted_password,homedir,uid) VALUES ('".$prefixe.$login."', '', ENCRYPT('$pass'), '/var/alternc/html/$l/$lo/$dir', '$cuid')");
$encrypted_password = crypt($pass,strrev(microtime(true)));
$db->query("INSERT INTO ftpusers (name,password, encrypted_password,homedir,uid) VALUES ('".$prefixe.$login."', '', '$encrypted_password', '/var/alternc/html/$l/$lo/$dir', '$cuid')");
return true;
} else {
$err->raise("ftp",5);
......
This diff is collapsed.
......@@ -595,6 +595,9 @@ class m_mail {
$db->query("INSERT INTO mail_users (uid,alias,path,password) VALUES ('$cuid','".$mail."@".$dom."','/var/alternc/mail/".$m."/".$mail."_".$dom."','"._md5cr($pass)."');");
$db->query("INSERT INTO mail_alias (mail,alias) VALUES ('".$mail."_".$dom."','/var/alternc/mail/".$m."/".$mail."_".$dom."/Maildir/');");
exec("/usr/lib/alternc/mail_add ".$mail."_".$dom." ".$cuid);
return true;
// Webmail data (squirrelmail default preferences)
$f=fopen("/var/lib/squirrelmail/data/".$mail."_".$dom.".pref","wb");
$g=0; $g=@fopen("/etc/squirrelmail/default_pref","rb");
......
......@@ -414,7 +414,7 @@ Quelqu'un (peut-etre vous) a demand
Afin de confirmer que cet email est valide, merci de vous rendre l'adresse
ci-dessous :
https://$L_FQDN/admin/mem_cm.php?usr=$cuid&cookie=$COOKIE
https://bureau.domainepublic.net/admin/mem_cm.php?usr=$cuid&cookie=$COOKIE
(attention : si cette adresse est coupe sur 2 lignes, ne pas oublier de
reconstituer sur une seule ligne). Le bureau vous demandera la cl qui vous
......@@ -492,8 +492,8 @@ Cordialement.
if ($this->user["show_help"] || $force) {
$hlp=_("hlp_$file");
if ($hlp!="hlp_$file") {
$hlp=ereg_replace(
"HELPID_([0-9]*)",
$hlp=preg_replace(
"#HELPID_([0-9]*)#",
"<a href=\"javascript:help(\\1);\"><img src=\"/admin/aide/help.png\" width=\"17\" height=\"17\" style=\"vertical-align: middle;\" alt=\""._("Help")."\" /></a>",$hlp);
echo "<p class=\"hlp\">".$hlp."</p>";
return true;
......
This diff is collapsed.
......@@ -173,7 +173,7 @@ class m_quota {
global $err,$db,$cuid;
$err->log("quota","setquota",$ressource."/".$size);
if (floatval($size)==0) $size="0";
if ($this->disk[$ressource]) {
if (isset($this->disk[$ressource])) {
// It's a disk resource, update it with shell command
exec("/usr/lib/alternc/quota_edit $cuid $size");
// Now we check that the value has been written properly :
......
......@@ -46,7 +46,7 @@ function variable_init($conf = array()) {
while ($db->next_record($result)) {
/* maybe the data is *not* serialized, in that case, take it verbatim */
$variable = $db->Record;
if (($variables[$variable['name']] = unserialize($variable['value'])) === FALSE) {
if (($variables[$variable['name']] = @unserialize($variable['value'])) === FALSE) {
$variables[$variable['name']] = $variable['value'];
}
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
etc/*
usr/bin/*
usr/lib/alternc/*
usr/sbin/*
usr/share/lintian/overrides/*
usr/share/alternc/install/*
usr/share/doc/alternc/*
......
......@@ -100,6 +100,12 @@ if [ -z "$RET" ]
db_set alternc/default_mx "$DEFAULT_MX"
fi
db_get alternc/default_mx2
if [ -z "$RET" ]
then
db_set alternc/default_mx2 "$DEFAULT_SECONDARY_MX"
fi
db_get alternc/mysql/host
if [ -z "$RET" ]
then
......@@ -156,6 +162,7 @@ db_input medium alternc/default_mx || true
db_input medium alternc/ns1 || true
db_input medium alternc/ns2 || true
db_input low alternc/alternc_location || true
db_input low alternc/default_mx2 || true
db_input low alternc/mysql/host || true
db_input low alternc/mysql/db || true
db_input low alternc/mysql/user || true
......
This diff is collapsed.
......@@ -123,6 +123,7 @@ EOF
update_var alternc/ns1 NS1_HOSTNAME
update_var alternc/ns2 NS2_HOSTNAME
update_var alternc/default_mx DEFAULT_MX
update_var alternc/default_mx2 DEFAULT_SECONDARY_MX
update_var alternc/mysql/client MYSQL_CLIENT
update_var alternc/sql/backup_type SQLBACKUP_TYPE
update_var alternc/sql/backup_overwrite SQLBACKUP_OVERWRITE
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.