Commit "bourrin", beaucoup de choses.
- Nouvelle interface de mail, elle n'est pas terminée mais est bien avancée - Beaucoup de correction php (notice) - Premier jet de la gestion de tache planifiées (cron) - Ajout d'un mode de debug pour l'admin Reste en ToDo : - pas mal de fixme dans le code - corriger le schema de base pour les mails (Squidly a tout ce qu'il faut, il faut qu'il le commit) - configuration Dovecot et Postfix a commiter (pareil, Squidly à tout, plukacommiter) - suppression de mail - et beaucoup de debug... Maintenant que le gros est commité, attendez-vous à beaucoup de petit commit.
This commit is contained in:
parent
20103063b3
commit
ff6c9ff625
|
@ -85,12 +85,14 @@ bureau/admin/aide/inline/tiret.gif -text
|
|||
bureau/admin/alternc.jpg -text
|
||||
bureau/admin/alternc.png -text
|
||||
bureau/admin/alternc3.png -text
|
||||
bureau/admin/alternc_debugme.php -text
|
||||
bureau/admin/bro_editor.php -text
|
||||
bureau/admin/bro_main.php -text
|
||||
bureau/admin/bro_pref.php -text
|
||||
bureau/admin/bro_tgzdown.php -text
|
||||
bureau/admin/bro_view.php -text
|
||||
bureau/admin/browseforfolder.php -text
|
||||
bureau/admin/cron.php -text
|
||||
bureau/admin/direct.php -text
|
||||
bureau/admin/dom_add.php -text
|
||||
bureau/admin/dom_doadd.php -text
|
||||
|
@ -161,6 +163,8 @@ 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/check_no.png -text
|
||||
bureau/admin/images/check_ok.png -text
|
||||
bureau/admin/images/config.png -text
|
||||
bureau/admin/images/delete.png -text
|
||||
bureau/admin/images/dom.png -text
|
||||
|
@ -203,6 +207,9 @@ bureau/admin/images/password.png -text
|
|||
bureau/admin/images/passwordstrength.jpg -text
|
||||
bureau/admin/images/plus.png -text
|
||||
bureau/admin/images/quota.png -text
|
||||
bureau/admin/images/row-down.png -text
|
||||
bureau/admin/images/row-down.png2 -text
|
||||
bureau/admin/images/schedule.png -text
|
||||
bureau/admin/images/stat.png -text
|
||||
bureau/admin/index.php -text
|
||||
bureau/admin/ip_main.php -text
|
||||
|
@ -234,12 +241,17 @@ 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_alias_create.inc.php -text
|
||||
bureau/admin/mail_alias_doedit.php -text
|
||||
bureau/admin/mail_doadd.php -text
|
||||
bureau/admin/mail_dodel.php -text
|
||||
bureau/admin/mail_doedit.php -text
|
||||
bureau/admin/mail_edit.php -text
|
||||
bureau/admin/mail_edit.inc.php -text
|
||||
bureau/admin/mail_list.php -text
|
||||
bureau/admin/mail_localbox_doedit.php -text
|
||||
bureau/admin/mail_localbox_edit.inc.php -text
|
||||
bureau/admin/mail_properties.php -text
|
||||
bureau/admin/mail_redirection_doedit.php -text
|
||||
bureau/admin/mail_redirection_edit.inc.php -text
|
||||
bureau/admin/main.php -text
|
||||
bureau/admin/mem_admin.php -text
|
||||
bureau/admin/mem_chgmail.php -text
|
||||
|
@ -252,6 +264,7 @@ bureau/admin/menu.php -text
|
|||
bureau/admin/menu_adm.php -text
|
||||
bureau/admin/menu_aide.php -text
|
||||
bureau/admin/menu_brouteur.php -text
|
||||
bureau/admin/menu_cron.php -text
|
||||
bureau/admin/menu_dom.php -text
|
||||
bureau/admin/menu_ftp.php -text
|
||||
bureau/admin/menu_ip.php -text
|
||||
|
@ -314,6 +327,8 @@ bureau/class/local.php -text
|
|||
bureau/class/m_admin.php -text
|
||||
bureau/class/m_authip.php -text
|
||||
bureau/class/m_bro.php -text
|
||||
bureau/class/m_cron.php -text
|
||||
bureau/class/m_debug_alternc.php -text
|
||||
bureau/class/m_dom.php -text
|
||||
bureau/class/m_err.php -text
|
||||
bureau/class/m_export.php -text
|
||||
|
@ -321,6 +336,10 @@ bureau/class/m_ftp.php -text
|
|||
bureau/class/m_hooks.php -text
|
||||
bureau/class/m_hta.php -text
|
||||
bureau/class/m_mail.php -text
|
||||
bureau/class/m_mail_alias.php -text
|
||||
bureau/class/m_mail_jabber.php -text
|
||||
bureau/class/m_mail_localbox.php -text
|
||||
bureau/class/m_mail_redirection.php -text
|
||||
bureau/class/m_mem.php -text
|
||||
bureau/class/m_mysql.php -text
|
||||
bureau/class/m_quota.php -text
|
||||
|
|
|
@ -43,9 +43,9 @@ include_once("head.php");
|
|||
|
||||
<br />
|
||||
<?php
|
||||
if ($error) {
|
||||
echo "<p class=\"error\">$error</p>";
|
||||
}
|
||||
if (isset($error) && $error) {
|
||||
echo "<p class=\"error\">$error</p>";
|
||||
}
|
||||
|
||||
?>
|
||||
<p>
|
||||
|
|
|
@ -59,7 +59,7 @@ if (! $d=$dom->domains_type_get($name)) {
|
|||
<hr id="topbar"/>
|
||||
<br />
|
||||
<?php
|
||||
if ($error_edit) {
|
||||
if (isset($error_edit) && $error_edit) {
|
||||
echo "<p class=\"error\">$error_edit</p>";
|
||||
$error_edit="";
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ $r=$admin->get_list($show == 'all' ? 1 : 0, $creator);
|
|||
<hr id="topbar"/>
|
||||
<br />
|
||||
<?php
|
||||
if ($error) {
|
||||
if (isset($error) && $error ) {
|
||||
echo "<p class=\"error\">$error</p>";
|
||||
}
|
||||
?>
|
||||
|
@ -75,7 +75,7 @@ $r=$admin->get_list($show == 'all' ? 1 : 0, $creator);
|
|||
<?php __("Here is the list of hosted AlternC accounts"); ?> (<?php printf(_("%s accounts"),count($r)); ?>)
|
||||
|
||||
|
||||
<?php if($_REQUEST['show'] != 'all') {
|
||||
<?php if($show != 'all') {
|
||||
echo '<p><span class="ina"><a href="adm_list.php?show=all">' . _('List all AlternC accounts') . '</a></span>';
|
||||
if ($subadmin!=0 || $cuid==2000) {
|
||||
$list_creators = $admin->get_creator_list();
|
||||
|
|
|
@ -37,7 +37,7 @@ require_once("../class/config.php");
|
|||
|
||||
|
||||
// * with no parameter when the admin want to go back to his admin account.
|
||||
if (!$_REQUEST["id"] && $_COOKIE["oldid"]) {
|
||||
if ( ( !isset($_REQUEST["id"]) || !$_REQUEST["id"]) && $_COOKIE["oldid"]) {
|
||||
// We check the cookie's value :
|
||||
list($newuid,$passcheck)=explode("/",$_COOKIE["oldid"]);
|
||||
$newuid=intval($newuid);
|
||||
|
@ -119,4 +119,4 @@ if ($error) {
|
|||
|
||||
include_once("foot.php");
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
|
@ -41,11 +41,11 @@ include_once("head.php");
|
|||
<hr id="topbar"/>
|
||||
<br />
|
||||
<?php
|
||||
if ($error) {
|
||||
echo "<p class=\"error\">$error</p>";
|
||||
include_once("foot.php");
|
||||
exit;
|
||||
}
|
||||
if (isset($error) && $error) {
|
||||
echo "<p class=\"error\">$error</p>";
|
||||
include_once("foot.php");
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<ul id="adm_panel">
|
||||
<li class="lst1"><a href="adm_tld.php"><?php __("Manage allowed domains (TLD)"); ?></a></li>
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
require_once("../class/config.php");
|
||||
|
||||
$fields = array (
|
||||
"enable" => array("request","string","0")
|
||||
);
|
||||
|
||||
getFields($fields);
|
||||
|
||||
print_r($enable);
|
||||
if ($enable) {
|
||||
$debug_alternc->activate();
|
||||
} else {
|
||||
$debug_alternc->desactivate();
|
||||
}
|
||||
|
||||
header("Location: /main.php");
|
||||
|
||||
|
||||
?>
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
require_once("../class/config.php");
|
||||
include_once("head.php");
|
||||
|
||||
if (isset($_POST['cron']) && is_array($_POST['cron'])) {
|
||||
if (! $cron->update($_POST['cron'])) {
|
||||
$error=_("There was an error during the record.");
|
||||
} else {
|
||||
$error=_("Save done.");
|
||||
}
|
||||
}
|
||||
|
||||
$lst_cron = $cron->lst_cron();
|
||||
?>
|
||||
|
||||
<h3><?php __("Scheduled tasks"); ?></h3>
|
||||
<hr id="topbar"/>
|
||||
<br />
|
||||
|
||||
<?php if (isset($error) && $error) { ?>
|
||||
<p class="error"><?php echo $error ?></p>
|
||||
<?php } ?>
|
||||
|
||||
<form method="post" action="cron.php" id="main" name="cron" >
|
||||
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th><?php __("URL"); ?></th>
|
||||
<th><?php __("Schedule"); ?></th>
|
||||
<th><?php __("User"); ?></th>
|
||||
<th><?php __("Password"); ?></th>
|
||||
<th><?php __("Email report"); ?></th>
|
||||
</tr>
|
||||
<?php
|
||||
$max_cron = $quota->getquota("cron");
|
||||
$max_cron = $max_cron['t'];
|
||||
if ( sizeof($lst_cron) > $max_cron ) $max_cron=sizeof($lst_cron);
|
||||
|
||||
for ($i=0; $i < $max_cron ; $i++) {
|
||||
?>
|
||||
<tr>
|
||||
<?php if (isset($lst_cron[$i])) echo "<input type='hidden' name='cron[$i][id]' value='".$lst_cron[$i]['id']."' />"; ?>
|
||||
<td><input type="text" name="<?php echo "cron[$i][url]";?>" size="30" maxlength="255" value="<?php if (isset($lst_cron[$i]['url'])) { echo htmlentities($lst_cron[$i]['url']);} ?>"/></td>
|
||||
<td>
|
||||
<select name='cron[<?php echo $i; ?>][schedule]'>
|
||||
<?php
|
||||
foreach ($cron->schedule() as $cs) {
|
||||
echo "<option value='".$cs['unit']."'";
|
||||
if (isset($lst_cron[$i]['schedule']) && ($lst_cron[$i]['schedule'] == $cs['unit'])){
|
||||
echo " selected ";
|
||||
}
|
||||
echo " >".$cs['name'];
|
||||
echo "</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
<td><input type="text" name="<?php echo "cron[$i][user]";?>" size="10" maxlength="64" value="<?php if (isset($lst_cron[$i]['user'])) { echo htmlentities($lst_cron[$i]['user']);} ?>"/></td>
|
||||
<td><input type="text" name="<?php echo "cron[$i][password]";?>" size="10" maxlength="64" value="<?php if (isset($lst_cron[$i]['password'])) { echo htmlentities($lst_cron[$i]['password']);} ?>"/></td>
|
||||
<td><input type="text" name="<?php echo "cron[$i][email]";?>" size="10" maxlength="64" value="<?php if (isset($lst_cron[$i]['email'])) { echo htmlentities($lst_cron[$i]['email']);} ?>"/></td>
|
||||
</tr>
|
||||
<?php } //foreach ?>
|
||||
</table>
|
||||
|
||||
<input type="submit" name="submit" class="inb" value="<?php __("Save"); ?>" />
|
||||
</form>
|
||||
|
||||
|
||||
<?php include_once("foot.php"); ?>
|
|
@ -131,7 +131,7 @@ for($i=0;$i<$r["nsub"];$i++) {
|
|||
switch ($r['sub'][$i]['enable']) {
|
||||
case 'ENABLED':
|
||||
__("Enabled");
|
||||
echo "<br/><a href='dom_substatus.php?domain=".urlencode($r["name"])."&sub=".urlencode($r["sub"][$i]["name"])."&type=".urlencode($r["sub"][$i]["type"])."&value=".urlencode($r["sub"][$i]['dest'])."&status=disable'>";__("Disable");echo "</a>";
|
||||
echo "<br/><a href='dom_substatus.php?domain=".urlencode($r["name"])."&sub=".urlencode($r["sub"][$i]["name"])."&type=".urlencode($r["sub"][$i]["type"])."&value=".urlencode($r["sub"][$i]['dest'])."&status=disable'>";__("Disable");echo "</a>";
|
||||
break;
|
||||
case 'ENABLE':
|
||||
__("Activation pending");
|
||||
|
@ -208,7 +208,7 @@ if (!$r['noerase']) {
|
|||
<input type="submit" class="inb" name="submit" value="<?php __("Submit the changes"); ?>" />
|
||||
</form>
|
||||
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<hr />
|
||||
<h3><?php __("Domain removal"); ?></h3>
|
||||
|
||||
|
|
|
@ -58,8 +58,8 @@ if (!$noread) {
|
|||
echo "<h3>";
|
||||
__("Editing subdomain");
|
||||
echo " http://"; ecif($sub,$sub."."); echo $domain."</h3>";
|
||||
if ($error) {
|
||||
echo "<p class=\"error\">$error</p>";
|
||||
if (isset($error) && $error) {
|
||||
echo "<p class=\"error\">$error</p>";
|
||||
include_once("foot.php");
|
||||
exit();
|
||||
}
|
||||
|
|
|
@ -3,5 +3,10 @@
|
|||
</tr>
|
||||
</table>
|
||||
</div> <!-- div global -->
|
||||
<?php
|
||||
if ( $debug_alternc->status ) {
|
||||
$debug_alternc->dump();
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -47,11 +47,11 @@ if (!$id) {
|
|||
?>
|
||||
<h3><?php __("Editing an FTP account"); ?></h3>
|
||||
<?php
|
||||
if ($error) {
|
||||
echo "<p class=\"error\">$error</p>";
|
||||
include_once("foot.php");
|
||||
exit();
|
||||
}
|
||||
if (isset($error) && $error) {
|
||||
echo "<p class=\"error\">$error</p>";
|
||||
include_once("foot.php");
|
||||
exit();
|
||||
}
|
||||
?>
|
||||
<form method="post" action="ftp_doedit.php" name="main" id="main">
|
||||
<table border="1" cellspacing="0" cellpadding="4">
|
||||
|
|
|
@ -47,7 +47,7 @@ if (!$r=$ftp->get_list($domain)) {
|
|||
<br />
|
||||
|
||||
<?php
|
||||
if ($error && !$noftp) {
|
||||
if (isset($error) && $error && !$noftp) {
|
||||
?>
|
||||
<p class="error"><?php echo $error ?></p>
|
||||
<?php } ?>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 372 B |
Binary file not shown.
After Width: | Height: | Size: 618 B |
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
|
@ -62,11 +62,11 @@ if (!$charset) $charset="UTF-8";
|
|||
<p> </p>
|
||||
<?php if (isset($error) && $error) echo "<font color=red>$error</font>"; ?>
|
||||
<?php
|
||||
$authip_token=$_GET['authip_token'];
|
||||
if (isset($_GET['authip_token'])) $authip_token=$_GET['authip_token'];
|
||||
/*
|
||||
if (!$_SERVER[HTTPS]) {
|
||||
echo "<h4>ATTENTION : vous allez accéder à votre panel en mode *non sécurisé*<br/>
|
||||
<a href=\"https://".$_SERVER["HTTP_HOST"]."/admin/\">Cliquez ici pour passer en mode sécurisé</a></h4>";
|
||||
<a href=\"https://".$_SERVER["HTTP_HOST"]."/\">Cliquez ici pour passer en mode sécurisé</a></h4>";
|
||||
}
|
||||
*/
|
||||
?>
|
||||
|
|
|
@ -51,19 +51,23 @@ $lac = $authip->list_affected();
|
|||
<hr id="topbar"/>
|
||||
<br />
|
||||
|
||||
<?php if ($error) { ?>
|
||||
<?php if (isset($error) && $error) { ?>
|
||||
<p class="error"><?php echo $error ?></p>
|
||||
<?php } ?>
|
||||
|
||||
<table>
|
||||
<h3><?php __("Enabled rules"); ?></h3>
|
||||
|
||||
<table class="tlist">
|
||||
<tr>
|
||||
<th><?php __("Protocol");?></th>
|
||||
<th><?php __("Target");?></th>
|
||||
<th><?php __("IP address");?></th>
|
||||
</tr>
|
||||
<?php
|
||||
$col=1;
|
||||
foreach ($lac as $ll) {
|
||||
echo "<tr>";
|
||||
$col=3-$col;
|
||||
echo "<tr class='lst$col' >";
|
||||
echo "<td>".$ac[$ll['protocol']]['name']."</td>";
|
||||
echo "<td>".$ac[$ll['protocol']]['values'][$ll['parameters']]."</td>";
|
||||
echo "<td>".$list_ip[$ll['authorised_ip_id']]['infos']."<br/>".$list_ip[$ll['authorised_ip_id']]['ip_human']."</td>"; ?>
|
||||
|
@ -75,13 +79,14 @@ $lac = $authip->list_affected();
|
|||
</table>
|
||||
</p>
|
||||
|
||||
<fieldset><legend><?php __("Add a new rule"); ?></legend>
|
||||
<hr/>
|
||||
<h3><?php __("Add a new rule"); ?></h3>
|
||||
<form method="post" action="ip_main.php" name="main" id="main">
|
||||
<table>
|
||||
<table class="tlist">
|
||||
<thead>
|
||||
<th><?php __("Target"); ?></th>
|
||||
<th><?php __("IP address (or subnet)"); ?></th>
|
||||
<th/>
|
||||
<td/>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr valign="top">
|
||||
|
@ -121,18 +126,18 @@ $lac = $authip->list_affected();
|
|||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</fieldset>
|
||||
|
||||
<table>
|
||||
|
||||
<hr/>
|
||||
<h3><?php __("Know IP and networks");?></h3>
|
||||
<table class="tlist">
|
||||
<tr>
|
||||
<th colspan=2><?php __("IP address");?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<td valign=top width=40%>
|
||||
<table>
|
||||
<tr><th><?php __("Type"); ?></th><th><?php __("IP"); ?></th><th><?php __("Informations"); ?></th><th colspan=2/></tr>
|
||||
<?php foreach($list_ip as $i) {
|
||||
<?php
|
||||
$col=1;
|
||||
foreach($list_ip as $i) {
|
||||
$col=3-$col;
|
||||
if (checkip($i['ip'])) {
|
||||
if ($i['subnet']==32) {
|
||||
$txt="Address IPv4";
|
||||
|
@ -146,7 +151,7 @@ $lac = $authip->list_affected();
|
|||
$txt="Subnet IPv6";
|
||||
}
|
||||
}
|
||||
echo "<tr><td>$txt</td><td>{$i['ip_human']}</td><td>{$i['infos']}</td>";
|
||||
echo "<tr class='lst$col' ><td>$txt</td><td>{$i['ip_human']}</td><td>{$i['infos']}</td>";
|
||||
?>
|
||||
<td><div class="ina"><a href="javascript:edit_ip(<?php echo "'".htmlentities($i['id'])."','".htmlentities($i['ip_human'])."','".htmlentities($i['infos'])."'"; ?>);"><img src="images/edit.png" alt="<?php __("Edit"); ?>" /><?php __("Edit"); ?></a></div></td>
|
||||
<td><div class="ina"><a href="ip_main.php?delete_id=<?php echo urlencode($i["id"]) ?>"><img src="images/delete.png" alt="<?php __("Delete"); ?>" /><?php __("Delete"); ?></a></div></td>
|
||||
|
@ -155,7 +160,7 @@ $lac = $authip->list_affected();
|
|||
<?php } ?>
|
||||
</table>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<td valign=top width=40%>
|
||||
<fieldset>
|
||||
<legend><?php __("Add an IP");?> - <a href="javascript:edit_ip('','<?php echo htmlentities($_SERVER['REMOTE_ADDR'])."','Home IP'";?>);" ><?php echo __("Add my current IP"); ?></a></legend>
|
||||
<span id="form_add_ip">
|
||||
|
|
|
@ -10,6 +10,7 @@ menulist[4] = "menu-adm";
|
|||
|
||||
var menu_opened = "";
|
||||
|
||||
/*
|
||||
function deploy(menu)
|
||||
{
|
||||
for (var i = 0; i < menulist.length; i++)
|
||||
|
@ -20,7 +21,7 @@ function deploy(menu)
|
|||
var div_img = new getObj("img-" + menulist[i]);
|
||||
|
||||
div_content.style.display = "none";
|
||||
div_img.obj.src = "/admin/images/plus.png";
|
||||
div_img.obj.src = "/images/plus.png";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,13 +34,13 @@ function deploy(menu)
|
|||
if (menu_opened == menu)
|
||||
{
|
||||
div_content.style.display = "none";
|
||||
div_img.obj.src = "/admin/images/plus.png";
|
||||
div_img.obj.src = "/images/plus.png";
|
||||
menu_opened = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
div_content.style.display = "block";
|
||||
div_img.obj.src = "/admin/images/minus.png";
|
||||
div_img.obj.src = "/images/minus.png";
|
||||
menu_opened = menu;
|
||||
}
|
||||
}
|
||||
|
@ -82,6 +83,7 @@ function checkObj(name)
|
|||
}
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
function help(hid) {
|
||||
var top=100; /* (10-screen.height); */
|
||||
|
@ -154,3 +156,46 @@ function swap(s,shm) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function is_valid_mail(id_elem) {
|
||||
//var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
|
||||
//FIXME mail documentation doesn't expect a maximum length of the mail address : http://tools.ietf.org/html/rfc2822#section-3.4.1
|
||||
var reg = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i;
|
||||
var rgxp = /^[a-z0-9\!\#\$\%\&\'\*+/=?^_`{|}~-]{1,}((\.[a-z0-9\!\#\$\%\&\'\*+/=?^_`{|}~-]{1,13})?)+@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9\-]*[a-z0-9])?$/
|
||||
var mail = document.getElementById('rcp-'+id_elem).value;
|
||||
var src = "";
|
||||
var alt = "";
|
||||
|
||||
if (mail != "" ) {
|
||||
if(rgxp.test(mail) == false) {
|
||||
src = "images/check_no.png";
|
||||
alt = "KO";
|
||||
} else {
|
||||
src ="images/check_ok.png";
|
||||
alt ="OK";
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById('valid-rcp-'+id_elem).src = src;
|
||||
document.getElementById('valid-rcp-'+id_elem).alt = alt;
|
||||
}
|
||||
|
||||
|
||||
function is_valid_mail2() {
|
||||
var reg = /^[A-Z0-9._%+-]+$/i;
|
||||
var arg = document.getElementById('mail_arg').value;
|
||||
var rgxp = /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+((\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)?)+?$/
|
||||
if(rgxp.test(arg) == false) {
|
||||
alert(arg+" : incorect");
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function menu_toggle(id) {
|
||||
$("#"+id).toggle();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/*
|
||||
$Id: mail_add.php,v 1.6 2006/01/12 01:10:48 anarcat Exp $
|
||||
/**
|
||||
mail_add.php, author: squidly
|
||||
----------------------------------------------------------------------
|
||||
AlternC - Web Hosting System
|
||||
Copyright (C) 2002 by the AlternC Development Team.
|
||||
|
@ -23,78 +23,21 @@
|
|||
|
||||
To read the license please visit http://www.gnu.org/copyleft/gpl.html
|
||||
----------------------------------------------------------------------
|
||||
Original Author of file: Benjamin Sonntag, Franck Missoum
|
||||
Purpose of file: Ask for the values required to create a mail account
|
||||
or a mail alias
|
||||
Purpose of file: Create a new mail account
|
||||
----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
require_once("../class/config.php");
|
||||
include_once("head.php");
|
||||
|
||||
$fields = array (
|
||||
"domain" => array ("request", "string", ""),
|
||||
"dst_mail" => array ("request", "string", ""),
|
||||
"many" => array ("request", "integer", 0),
|
||||
"pop" => array ("request", "integer", 1),
|
||||
"domain_id" => array ("request", "integer", ""),
|
||||
"mail_arg" => array ("request", "string", ""),
|
||||
);
|
||||
getFields($fields);
|
||||
|
||||
?>
|
||||
<h3><?php printf(_("Add a mail to the domain %s"),$domain); ?> : </h3>
|
||||
|
||||
<h3><?php printf(_("Add %s mail to the domain %s"),$mail_arg,$domain_id); ?> : </h3>
|
||||
<?php
|
||||
if ($error) {
|
||||
echo "<p class=\"error\">$error</p>";
|
||||
}
|
||||
|
||||
// If a dst email is indicated, it's for an alias
|
||||
// So we desactivate pop by default
|
||||
if (!empty($dst_mail)) $pop=0;
|
||||
|
||||
?>
|
||||
<hr id="topbar"/>
|
||||
<br />
|
||||
<form action="mail_doadd.php" method="post" name="main" id="main">
|
||||
<input type="hidden" name="domain" value="<?php echo $domain; ?>" />
|
||||
<table class="tedit">
|
||||
<tr><td>
|
||||
<label for="email"><?php __("Email address"); ?></label></td><td><input class="int" type="text" name="email" id="email" value="<?php ehe($email); ?>" size="20" maxlength="32" /><span class="int" id="emaildom">@ <?php echo $domain ?></span>
|
||||
</td></tr>
|
||||
<tr><td><label for="pop"><?php __("Is it a POP/IMAP account?"); ?></label></td>
|
||||
<td>
|
||||
<p>
|
||||
<input type="radio" name="pop" id="pop0" class="inc" value="0"<?php cbox($pop==0); ?> onclick="hide('poptbl');"><label for="pop0"><?php __("No"); ?></label>
|
||||
<input type="radio" name="pop" id="pop1" class="inc" value="1"<?php cbox($pop==1); ?> onclick="show('poptbl');"><label for="pop1"><?php __("Yes"); ?></label>
|
||||
</p>
|
||||
<div id="poptbl">
|
||||
<table class="tedit" >
|
||||
<tr><td><label for="pass"><?php __("POP/IMAP password"); ?></label></td><td><input type="password" class="int" name="pass" id="pass" value="<?php ehe($pass); ?>" size="20" maxlength="32" /></td></tr>
|
||||
<tr><td><label for="passconf"><?php __("Confirm password"); ?></label></td><td><input type="password" class="int" name="passconf" id="passconf" value="<?php echo $pass; ?>" size="20" maxlength="32" /></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</td></tr>
|
||||
|
||||
<tr><td><label for="alias"><?php __("Redirections<br />Other recipients:"); ?></label></td><td>(<?php __("one email per line"); ?>)<br /><textarea class="int" cols="32" rows="5" name="alias" id="alias"><?php echo $alias; echo ((empty($alias) && !empty($dst_mail))?"":"\n").$dst_mail; ?></textarea></td></tr>
|
||||
|
||||
<!--
|
||||
<tr><td>
|
||||
<?php echo __("Is it a temporary mail account?"); ?><br/>
|
||||
</td><td>
|
||||
<?php include_once("trash_dateselect.php"); ?>
|
||||
</td></tr>
|
||||
-->
|
||||
<tr class="trbtn"><td colspan="2">
|
||||
<input type="hidden" name="many" value="<?php echo intval($many); ?>" />
|
||||
<input type="submit" class="inb" name="submit" value="<?php __("Create this email address"); ?>" />
|
||||
<input type="button" class="inb" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='mail_list.php?domain=<?php echo urlencode($domain); ?>'"/>
|
||||
</td></tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<p><small>
|
||||
<?php __("help_mail_add"); ?>
|
||||
</small></p>
|
||||
<script type="text/javascript">
|
||||
document.forms['main'].email.focus();
|
||||
document.forms['main'].setAttribute('autocomplete', 'off');
|
||||
</script>
|
||||
<?php include_once("foot.php");
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
<?php
|
||||
/*
|
||||
mail_alias_create.php,v 1.3 2006/01/12 01:10:48 anarcat 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: Create a new mail account
|
||||
----------------------------------------------------------------------
|
||||
*/
|
||||
require_once("../class/config.php");
|
||||
|
||||
if (!$details=$mail->mail_get_details($mail_id)) {
|
||||
$error=$err->errstr();
|
||||
echo $error;
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
|
||||
if (isset($error) && $error) {
|
||||
echo "<p class=\"error\">$error</p>";
|
||||
}
|
||||
|
||||
$dom_list = $mail->enum_domains;
|
||||
?>
|
||||
<form action="mail_alias_doedit.php" method="post" name="mail_create" id="main" onsubmit="return is_valid_mail2()">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="int" name="alias" id="mail_arg" value="" size="20" maxlength="255" />
|
||||
</td>
|
||||
<td>@<select name="dom_id" id="dom_id" ><?php foreach($dom_list as $key => $val){ ?><option value="<?php echo urlencode($val['id']) ?>"><?php echo $val["domaine"] ?> </option><?php } ?> </select><td>
|
||||
<td><input type="submit" class="inb" name="submit" value="<?php __("Create this alias"); ?>" /></td>
|
||||
</table>
|
||||
<input type="hidden" class="inb" name="mail_id" value="<?php echo $mail_id ; ?>" />
|
||||
<input type="hidden" class="inb" name="address_full" value="<?php echo $details["address_full"] ; ?>" />
|
||||
|
||||
|
||||
</form>
|
|
@ -0,0 +1,54 @@
|
|||
<?
|
||||
/*
|
||||
mail_alias_doedit.php, author: squidly
|
||||
----------------------------------------------------------------------
|
||||
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
|
||||
----------------------------------------------------------------------
|
||||
Purpose of file: Create a new mail account
|
||||
----------------------------------------------------------------------
|
||||
*/
|
||||
require_once("../class/config.php");
|
||||
$fields = array (
|
||||
"alias" => array ("request", "string",0),
|
||||
"mail_id" => array ("request", "integer",0),
|
||||
"domain" => array ("request", "string",0),
|
||||
"address_full" => array ("request", "string",0),
|
||||
"dom_id" => array ("request", "integer",0),
|
||||
"rcp" =>array("request", "array", "")
|
||||
);
|
||||
getFields($fields);
|
||||
|
||||
$alias_retour=array ();
|
||||
$alias_retour=$mail->create($dom_id,$alias);
|
||||
//setting up the alias.
|
||||
if(!$mail_alias->setalias($alias_retour["mail_id"],$address_full)){
|
||||
//if fails redirect to creation with error message.
|
||||
$error=sprintf(_("Alias: %s already created"), $alias);
|
||||
include("mail_alias_create.php");
|
||||
}else{
|
||||
//redirection to the properties list.
|
||||
header ("Location: mail_properties.php?mail_id=$mail_id");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,92 +0,0 @@
|
|||
<?php
|
||||
/*
|
||||
$Id: mail_dodel.php,v 1.2 2003/06/10 06:45:16 root Exp $
|
||||
----------------------------------------------------------------------
|
||||
AlternC - Web Hosting System
|
||||
Copyright (C) 2002 by the AlternC Development Team.
|
||||
http://alternc.org/
|
||||
----------------------------------------------------------------------
|
||||
Based on:
|
||||
Valentin Lacambre's web hosting softwares: http://altern.org/
|
||||
----------------------------------------------------------------------
|
||||
LICENSE
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License (GPL)
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
To read the license please visit http://www.gnu.org/copyleft/gpl.html
|
||||
----------------------------------------------------------------------
|
||||
Original Author of file: Benjamin Sonntag
|
||||
Purpose of file: Delete a mailbox
|
||||
----------------------------------------------------------------------
|
||||
*/
|
||||
require_once("../class/config.php");
|
||||
|
||||
|
||||
$fields = array (
|
||||
"d" => array ("request", "array", ""),
|
||||
"domain" => array ("request", "string", ""),
|
||||
);
|
||||
getFields($fields);
|
||||
|
||||
if (!is_array($d)) {
|
||||
$d[]=$d;
|
||||
}
|
||||
|
||||
reset($d);
|
||||
|
||||
include_once ("head.php");
|
||||
|
||||
if ($confirm=="y") {
|
||||
|
||||
while (list($key,$val)=each($d)) {
|
||||
if (!$mail->del_mail($val)) {
|
||||
$error.=sprintf(_("The email address <b>%s</b> does not exist!")."<br />",$val);
|
||||
} else {
|
||||
$error.=sprintf(_("The email address <b>%s</b> has been deleted!")."<br />",$val);
|
||||
}
|
||||
}
|
||||
include("mail_list.php");
|
||||
exit();
|
||||
}
|
||||
|
||||
?>
|
||||
</head>
|
||||
<body>
|
||||
<h3><?php __("Deleting mail accounts"); ?> : </h3>
|
||||
<hr id="topbar"/>
|
||||
<br />
|
||||
<p><?php __("Please confirm the deletion of the following mail accounts:"); ?></p>
|
||||
<form method="post" action="mail_del.php" id="main">
|
||||
<p>
|
||||
<input type="hidden" name="confirm" value="y" />
|
||||
<input type="hidden" name="domain" value="<?php echo $domain; ?>" />
|
||||
|
||||
<?php
|
||||
|
||||
while (list($key,$val)=each($d)) {
|
||||
echo "<input type=\"hidden\" name=\"d[]\" value=\"$val\" />";
|
||||
echo $val."<br />";
|
||||
}
|
||||
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" class="inb" name="submit" value="<?php __("Confirm the deletion"); ?>" /> - <input type="button" name="cancel" id="cancel" onclick="window.history.go(-1);" class="inb" value="<?php __("Don't delete anything and go back to the email list"); ?>"/>
|
||||
</p>
|
||||
|
||||
<p class="warningmsg">
|
||||
<?php __("Warning: Deleting an email address will destroy all the messages it contains! You will <b>NOT</b> be able to get it back!"); ?>
|
||||
</p>
|
||||
|
||||
</form>
|
||||
<?php include_once("foot.php"); ?>
|
||||
</body>
|
||||
</html>
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/*
|
||||
$Id: mail_doadd.php,v 1.3 2006/01/12 01:10:48 anarcat Exp $
|
||||
$Id: mail_doadd.php, author: squidly
|
||||
----------------------------------------------------------------------
|
||||
AlternC - Web Hosting System
|
||||
Copyright (C) 2002 by the AlternC Development Team.
|
||||
|
@ -23,43 +23,27 @@
|
|||
|
||||
To read the license please visit http://www.gnu.org/copyleft/gpl.html
|
||||
----------------------------------------------------------------------
|
||||
Original Author of file: Benjamin Sonntag
|
||||
Purpose of file: Create a new mail account
|
||||
----------------------------------------------------------------------
|
||||
*/
|
||||
require_once("../class/config.php");
|
||||
$trash->getfromform();
|
||||
|
||||
$fields = array (
|
||||
"mail_arg" => array ("request", "string", ""),
|
||||
"domain_id" => array ("request", "integer", ""),
|
||||
"domain" => array ("request", "string", ""),
|
||||
"email" => array ("request", "string", ""),
|
||||
"pop" => array ("request", "integer", 0),
|
||||
"pass" => array ("request", "string", ""),
|
||||
"passconf" => array ("request", "string", ""),
|
||||
"alias" => array ("request", "string", ""),
|
||||
);
|
||||
getFields($fields);
|
||||
|
||||
if ($pass != $passconf) {
|
||||
$error = _("Passwords do not match");
|
||||
include("mail_add.php");
|
||||
exit();
|
||||
}
|
||||
|
||||
if (!$mail->add_mail($domain,$email,$pop,$pass,$alias,$trash->expiration_date_db)) {
|
||||
$error=$err->errstr();
|
||||
$addok=0;
|
||||
include ("mail_add.php");
|
||||
} else {
|
||||
$addok=1;
|
||||
$error=sprintf (_("The email address <b>%s</b> has been successfully created"),"$email@$domain");
|
||||
if ($many) {
|
||||
unset($email,$pass,$alias);
|
||||
include("mail_add.php");
|
||||
} else {
|
||||
include("mail_list.php");
|
||||
}
|
||||
exit();
|
||||
}
|
||||
$res= array();
|
||||
//FIXME seems good but maybe can be done in a more fashion way.
|
||||
$res=$mail->create($domain_id,$mail_arg);
|
||||
|
||||
//once the mail created redirection to mail_properties.php, with the mail_id as parameters ( + domain_id )
|
||||
if($res["mail_id"]== null){
|
||||
header ("Location: /mail_list.php?domain=$domain&domain_id=$domain_id");
|
||||
}else{
|
||||
$test= 'mail_properties.php?mail_id='.$res["mail_id"]."&domain_id=$domain_id";
|
||||
header("Location: /$test");
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/*
|
||||
$Id: mail_doedit.php,v 1.5 2006/01/12 01:10:48 anarcat Exp $
|
||||
$Id: mail_doedit.php, author : squidly
|
||||
----------------------------------------------------------------------
|
||||
AlternC - Web Hosting System
|
||||
Copyright (C) 2002 by the AlternC Development Team.
|
||||
|
@ -23,46 +23,65 @@
|
|||
|
||||
To read the license please visit http://www.gnu.org/copyleft/gpl.html
|
||||
----------------------------------------------------------------------
|
||||
Original Author of file: Benjamin Sonntag, Franck Missoum
|
||||
Purpose of file: DO edit a mailbox, or alias
|
||||
Purpose of file: Create a new mail account
|
||||
----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
require_once("../class/config.php");
|
||||
|
||||
$error_edit="";
|
||||
$trash=new m_trash();
|
||||
$trash->getfromform();
|
||||
|
||||
|
||||
$fields = array (
|
||||
"domain" => array ("request", "string", ""),
|
||||
"email" => array ("request", "string", ""),
|
||||
"pop" => array ("request", "integer", 0),
|
||||
"pass" => array ("request", "string", ""),
|
||||
"passconf" => array ("request", "string", ""),
|
||||
"alias" => array ("request", "string", ""),
|
||||
"dom_id" =>array ("request","integer",""),
|
||||
"mail_id" => array ("request","integer",""),
|
||||
"pass" => array ("request","string",""),
|
||||
"passconf" => array("request","string",""),
|
||||
"is_enabled" => array("request","string",""),
|
||||
"enable" => array("request","string","")
|
||||
);
|
||||
|
||||
getFields($fields);
|
||||
|
||||
/*
|
||||
* checking the password
|
||||
*/
|
||||
|
||||
if ($pass != $passconf) {
|
||||
$error = _("Passwords do not match");
|
||||
include ("mail_edit.php");
|
||||
exit();
|
||||
}
|
||||
|
||||
if (!$mail->put_mail_details($email,$pop,$pass,$alias,$trash->expiration_date_db)) {
|
||||
$error_edit=$err->errstr();
|
||||
$addok=0;
|
||||
if(isset($pass) && $pass != ""){
|
||||
if($pass != $passconf){
|
||||
$error = _("Password do not match");
|
||||
include ("mail_edit.php");
|
||||
|
||||
} else {
|
||||
$ok=sprintf(_("The email address <b>%s</b> has been successfully changed"),$email)."<br />";
|
||||
$addok=1;
|
||||
$t=explode("@",$email);
|
||||
$email=$t[0];
|
||||
$error=$ok;
|
||||
include("mail_list.php");
|
||||
exit();
|
||||
exit();
|
||||
}else{
|
||||
//adding the password
|
||||
$mail->setpasswd($mail_id,$pass);
|
||||
header ("Location: /mail_properties.php?mail_id=$mail_id");
|
||||
}
|
||||
}
|
||||
?>
|
||||
/*
|
||||
* checking the activation state of the mail
|
||||
* redirecting according to it.
|
||||
*/
|
||||
if($is_enabled == 1){
|
||||
if(intval($enable)==0){
|
||||
//desactivation
|
||||
$mail->disable($mail_id);
|
||||
header ("Location: /mail_properties.php?mail_id=$mail_id");
|
||||
}else{
|
||||
$error = _("Already Activated");
|
||||
include ("mail_edit.php");
|
||||
exit();
|
||||
}
|
||||
}elseif($is_enabled == 0){
|
||||
if(intval($enable)==0){
|
||||
// c'est dja inactif
|
||||
$error = _("Already disabled ");
|
||||
include ("mail_edit.php");
|
||||
exit();
|
||||
}else{
|
||||
//Activation
|
||||
$mail->enable($mail_id);
|
||||
header ("Location: /mail_properties.php?mail_id=$mail_id");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,115 @@
|
|||
<?php
|
||||
/*
|
||||
$Id: mail_edit.php, author:squidly
|
||||
----------------------------------------------------------------------
|
||||
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
|
||||
----------------------------------------------------------------------
|
||||
Purpose of file: Edit a mailbox.
|
||||
----------------------------------------------------------------------
|
||||
*/
|
||||
require_once("../class/config.php");
|
||||
|
||||
if (!$mail_details=$mail->mail_get_details($mail_id)) {
|
||||
$error=$err->errstr();
|
||||
}
|
||||
if(isset($error) && $error){
|
||||
echo "<p class=\"error\">$error</p><p> </p>";
|
||||
}
|
||||
|
||||
?>
|
||||
<form action="mail_doedit.php" method="post" name="main" id="main">
|
||||
<fieldset>
|
||||
<legend><?php __("Status"); ?></legend>
|
||||
<p>
|
||||
<?php __("Is this mail enabled ?<br/><i>Having a mail disabled forbid consultation or reception, but do not remove the mailbox or his configuration.</i>"); ?>
|
||||
</p>
|
||||
<input type="radio" name="enable" id="enable0" class="inc" value="0"<?php cbox($mail_details['enabled']==0); ?> onclick="show('enabletbl');"><label for="enable0"><?php __("Disable"); ?></label>
|
||||
<input type="radio" name="enable" id="enable1" class="inc" value="1"<?php cbox($mail_details['enabled']!=0); ?> onclick="show('enabletbl');"><label for="enable1"><?php __("Enable"); ?></label>
|
||||
</fieldset>
|
||||
<br/>
|
||||
<fieldset><legend><?php __("Password"); ?></legend>
|
||||
<p>
|
||||
<?php __("You need to have a password for some application (example: local mailbox);"); ?>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
if($mail_details['password'] == ""){
|
||||
__("Set a passowrd:");?>
|
||||
<?php
|
||||
}else{
|
||||
__("Change your password:");
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
<table>
|
||||
<tr>
|
||||
<td><label for="pass"><?php __("Password"); ?></label></td>
|
||||
<td><input type="password" class="int" name="pass" id="pass" value="" size="20" maxlength="32" onKeyUp="javascript:checkpass();" /></td>
|
||||
<td rowspan=2><img src="" id="passimg" alt="" /><br/><label id="passtxt" /></td>
|
||||
</tr>
|
||||
<td><label for="passconf"><?php __("Confirm password"); ?></label></td>
|
||||
<td><input type="password" class="int" name="passconf" id="passconf" value="" size="20" maxlength="32" onKeyUp="javascript:checkpass();" /></td>
|
||||
<tr>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<br/>
|
||||
|
||||
<input type="hidden" class="inb" name="is_enabled" value="<?php echo $mail_details['enabled'] ; ?>" />
|
||||
<input type="hidden" class="inb" name="mail_id" value="<?php echo $mail_id ; ?>" />
|
||||
<input type="hidden" class="inb" name="domain" value="<?php echo $mail_details['domain'] ; ?>" />
|
||||
<input type="submit" class="inb" name="submit" value="<?php __("Change this email address"); ?>" />
|
||||
<input type="button" class="inb" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='mail_properties.php?mail_id=<?php echo urlencode($mail_id); ?>'"/>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function checkpass() {
|
||||
var pass = document.getElementById('pass').value;
|
||||
var passconf = document.getElementById('passconf').value;
|
||||
var src ="";
|
||||
var alt ="";
|
||||
var txt ="";
|
||||
|
||||
if (pass != passconf ) {
|
||||
src = "images/check_no.png";
|
||||
alt = "KO";
|
||||
txt = '<?php echo htmlentities(_("Password does not match")); ?>';
|
||||
} else {
|
||||
src ="images/check_ok.png";
|
||||
alt ="OK";
|
||||
txt = '<?php echo htmlentities(_("Password match")); ?>';
|
||||
}
|
||||
|
||||
document.getElementById('passimg').src = src;
|
||||
document.getElementById('passimg').alt = alt;
|
||||
document.getElementById('passtxt').innerHTML = txt;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,116 +0,0 @@
|
|||
<?php
|
||||
/*
|
||||
$Id: mail_edit.php,v 1.6 2006/01/12 01:10:48 anarcat 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: Edit a mailbox.
|
||||
----------------------------------------------------------------------
|
||||
*/
|
||||
require_once("../class/config.php");
|
||||
include_once("head.php");
|
||||
|
||||
$fields = array (
|
||||
"email" => array ("request", "string", ""),
|
||||
"domain" => array ("request", "string", ""),
|
||||
);
|
||||
getFields($fields);
|
||||
|
||||
if (!$res=$mail->get_mail_details($email))
|
||||
{
|
||||
$error=$err->errstr();
|
||||
echo $error;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
?>
|
||||
<h3><?php printf(_("Edit an email address of the domain %s"),$domain); ?> : </h3>
|
||||
<hr id="topbar"/>
|
||||
<br />
|
||||
<?php
|
||||
if ($error_edit) {
|
||||
echo "<p class=\"error\">$error_edit</p>";
|
||||
$error_edit="";
|
||||
|
||||
} else {
|
||||
$pop=$res["pop"];
|
||||
$pass=$res["password"];
|
||||
$alias=$res["alias"];
|
||||
} ?>
|
||||
|
||||
<form action="mail_doedit.php" method="post" name="main" id="main">
|
||||
<table class="tedit">
|
||||
<tr><th colspan="2"><input type="hidden" name="email" value="<?php echo $email; ?>" />
|
||||
<input type="hidden" name="domain" value="<?php echo $domain; ?>" />
|
||||
<?php printf(_("Edit the email address <b>%s</b>"),$email); ?></th></tr>
|
||||
<?php if (! is_null($res['trash_info']) && $res['trash_info']->is_trash ) { ?>
|
||||
<tr><th colspan="2"><span style="color: red"><?php __("This account is a temporary account.<br/>It will be delete on "); echo $res['trash_info']->human_display(); ?></span></th></tr>
|
||||
<?php } ?>
|
||||
<tr><td><label for="pop"><?php __("Is it a POP/IMAP account?"); ?></label></td>
|
||||
<td>
|
||||
<p>
|
||||
<input type="radio" name="pop" id="pop0" class="inc" value="0"<?php cbox($pop==0); ?> onclick="hide('poptbl');"><label for="pop0"><?php __("No"); ?></label>
|
||||
<input type="radio" name="pop" id="pop1" class="inc" value="1"<?php cbox($pop==1); ?> onclick="show('poptbl');"><label for="pop1"><?php __("Yes"); ?></label>
|
||||
</p>
|
||||
<div id="poptbl">
|
||||
<table class="tedit" >
|
||||
<tr><td><label for="pass"><?php __("POP/IMAP password"); ?></label></td><td><input type="password" class="int" name="pass" id="pass" value="<?php ehe($pass); ?>" size="20" maxlength="32" /></td></tr>
|
||||
<tr><td><label for="passconf"><?php __("Confirm password"); ?></label></td><td><input type="password" class="int" name="passconf" id="passconf" value="<?php echo $pass; ?>" size="20" maxlength="32" /></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
<br />
|
||||
<?php if ($pop==1) {
|
||||
echo "<div class=\"warningmsg\">"._("WARNING: turning POP/IMAP off will DELETE the stored messages in this email address. This email address will become a simple redirection.")."</div>";
|
||||
} ?>
|
||||
</td></tr>
|
||||
|
||||
<tr><td><label for="alias"><?php __("Redirections<br />Other recipients:"); ?></label></td><td>(<?php __("one email per line"); ?>)<br /><textarea class="int" cols="32" rows="5" name="alias" id="alias"><?php echo $alias; ?></textarea></td></tr>
|
||||
<!--
|
||||
<tr><td>
|
||||
<?php echo __("Is it a temporary mail account?"); ?><br/>
|
||||
</td><td>
|
||||
<?php include_once("trash_dateselect.php"); ?>
|
||||
</td></tr>
|
||||
-->
|
||||
<tr class="trbtn"><td colspan="2">
|
||||
<input type="submit" class="inb" name="submit" value="<?php __("Change this email address"); ?>" />
|
||||
<input type="button" class="inb" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='mail_list.php?domain=<?php echo urlencode($domain); ?>'"/>
|
||||
</td></tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<p><small>
|
||||
<?php __("help_mail_edit"); ?>
|
||||
</small></p>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
document.forms['main'].email.focus();
|
||||
<?php if ($pop==0) { ?>
|
||||
hide('poptbl');
|
||||
<?php } ?>
|
||||
document.forms['main'].setAttribute('autocomplete', 'off');
|
||||
</script>
|
||||
<?php include_once("foot.php"); ?>
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/*
|
||||
$Id: mail_list.php,v 1.8 2005/04/01 16:05:26 benjamin Exp $
|
||||
$Id: mail_list.php, author: squidly
|
||||
----------------------------------------------------------------------
|
||||
AlternC - Web Hosting System
|
||||
Copyright (C) 2002 by the AlternC Development Team.
|
||||
|
@ -23,121 +23,81 @@
|
|||
|
||||
To read the license please visit http://www.gnu.org/copyleft/gpl.html
|
||||
----------------------------------------------------------------------
|
||||
Original Author of file: Benjamin Sonntag, Franck Missoum
|
||||
Purpose of file: Show the mail account list on domain $dom
|
||||
Purpose of file: listing of mail accounts
|
||||
----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
require_once("../class/config.php");
|
||||
include_once("head.php");
|
||||
|
||||
$fields = array (
|
||||
"domain" => array ("request", "string", ""),
|
||||
|
||||
"letter" => array ("get", "string", ""),
|
||||
"domain_id" => array ("request", "integer", ""),
|
||||
);
|
||||
getFields($fields);
|
||||
|
||||
if(!$domain)
|
||||
$champs=getFields($fields);
|
||||
|
||||
if( !$domain && !$domain_id )
|
||||
{
|
||||
include("main.php");
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!$res=$mail->enum_doms_mails($domain,1,$letter)) {
|
||||
$error=$err->errstr();
|
||||
$domain_id=$champs["domain_id"];
|
||||
|
||||
if(!$mails_list = $mail->enum_domain_mails($domain_id)){
|
||||
$error=$err->errstr();
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if (isset($error)) {
|
||||
echo "<p class=\"error\">$error</p>";
|
||||
}
|
||||
|
||||
//Mail creation.
|
||||
if ($quota->cancreate("mail")) { ?>
|
||||
<h3><?php __("Create a new mail account");?></h3>
|
||||
<form method="post" action="mail_doadd.php" id="main" name="mail_create" onsubmit="return is_valid_mail2()">
|
||||
<input type="text" class="int" name="mail_arg" value="" size="20" id="mail_arg" maxlength="32" /><span id="emaildom" class="int" > <?php echo "@".$domain; ?></span>
|
||||
<input type="hidden" name="domain_id" value="<?php echo $domain_id;?>" />
|
||||
<input type="hidden" name="domain" value="<?php echo $domain;?>" />
|
||||
<input type="submit" name="submit" class="inb" value="<?php __("Create"); ?>" />
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
|
||||
if (empty($mails_list)){ // If there is no mail for this domain
|
||||
__("No mail for this domain");
|
||||
} else {
|
||||
?>
|
||||
|
||||
<h3><?php printf(_("Email addresses of the domain %s"),$domain); ?> : </h3>
|
||||
<?php
|
||||
if ($error) {
|
||||
echo "<p class=\"error\">$error</p>";
|
||||
}
|
||||
?>
|
||||
<hr id="topbar"/>
|
||||
<br />
|
||||
<p>
|
||||
<span class="inb"><a href="mail_add.php?domain=<?php echo $domain; ?>"><?php printf(_("Add a mailbox on <b>%s</b>"),$domain); ?></a></span>
|
||||
</p><p>
|
||||
<span class="inb"><a href="mail_add.php?many=1&domain=<?php echo $domain; ?>"><?php printf(_("Add many mailboxes on <b>%s</b>"),$domain); ?></a></span>
|
||||
</p>
|
||||
<?
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
?>
|
||||
<h3><?php printf(_("Email addresses of the domain %s"),$domain); ?> : </h3>
|
||||
<?php
|
||||
if (isset($error) && $error) {
|
||||
echo "<p class=\"error\">$error</p>";
|
||||
}
|
||||
?>
|
||||
<hr id="topbar"/>
|
||||
<br />
|
||||
<p>
|
||||
<span class="inb"><a href="mail_add.php?domain=<?php echo $domain; ?>"><?php printf(_("Add a mailbox on <b>%s</b>"),$domain); ?></a></span>
|
||||
</p><p>
|
||||
<span class="inb"><a href="mail_add.php?many=1&domain=<?php echo $domain; ?>"><?php printf(_("Add many mailboxes on <b>%s</b>"),$domain); ?></a></span>
|
||||
</p>
|
||||
<?php
|
||||
|
||||
if(!$letters=$mail->enum_doms_mails_letters($domain))
|
||||
$error=$err->errstr();
|
||||
else{
|
||||
echo "<p>";
|
||||
__("Show only mail starting by:");
|
||||
echo " ";
|
||||
for($i=0;$i<count($letters);$i++){
|
||||
$val=$letters[$i];
|
||||
echo " <a href=\"mail_list.php?domain=$domain&letter=$val\">$val </a>";
|
||||
}
|
||||
echo " <a href=\"mail_list.php?domain=$domain\">".sprintf(_("All"))."</a>";
|
||||
echo "</p>";
|
||||
}
|
||||
|
||||
if ($res["count"]) {
|
||||
?>
|
||||
<form method="post" action="mail_del.php" id="main">
|
||||
|
||||
<table class="tlist">
|
||||
|
||||
<tr><th colspan="2"><input type="hidden" name="domain" value="<?php echo $domain ?>"/> </th>
|
||||
<th><?php __("Email address"); ?></th><th><?php __("Size"); ?></th><th> </th></tr>
|
||||
<tr><th><?php __("Active");?></th><th align=center><?php __("Address"); ?></th><th><?php __("State"); ?></th></tr>
|
||||
<?php
|
||||
|
||||
$col=1;
|
||||
for($i=0;$i<$res["count"];$i++) {
|
||||
//listing of every mail of the current domain.
|
||||
while (list($key,$val)=each($mails_list)){
|
||||
$col=3-$col;
|
||||
$val=$res[$i];
|
||||
echo "<tr class=\"lst$col\">";
|
||||
echo "<td align=\"center\"><input class=\"inc\" type=\"checkbox\" id=\"del_$i\" name=\"d[]\" value=\"".$val["mail"]."\" /></td>";
|
||||
?>
|
||||
<td><div class="ina"><a href="mail_edit.php?email=<?php echo urlencode($val["mail"]); ?>&domain=<?php echo urlencode($domain); ?>"><img src="images/edit.png" alt="<?php __("Edit"); ?>" /><?php __("Edit"); ?></a></div></td>
|
||||
|
||||
<?php
|
||||
echo "<td><label for=\"del_$i\">".$val["mail"]."</label></td>";
|
||||
if ($val["pop"]) {
|
||||
echo "<td>".format_size($val["size"])."</td>";
|
||||
} else {
|
||||
echo "<td> </td>";
|
||||
}
|
||||
echo "<td>";
|
||||
if (! is_null($val['expiration_date'])) {
|
||||
// It's a temporary account
|
||||
$trash_info=new m_trash();
|
||||
$trash_info->set_from_db($val["expiration_date"]);
|
||||
echo __("This account will be deleted on"); echo "<br />".$trash_info->human_display();
|
||||
}
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
|
||||
?>
|
||||
<tr class="lst_clic<?php echo $col; ?>" onclick="javascript:window.location.href='mail_properties.php?mail_id=<?php echo $val["id"]; ?>'">
|
||||
<td><?php if ($val["enabled"] ) { ?>
|
||||
<img src="images/check_ok.png" alt="<?php __("Enabled"); ?>" />
|
||||
<?php } else { ?>
|
||||
<img src="images/check_no.png" alt="<?php __("Disabled"); ?>" />
|
||||
<?php } // if enabled ?>
|
||||
</td>
|
||||
<td align=right><?php echo $val["address"]."@".$domain ?></td>
|
||||
<td><div class="ina"><a href="mail_properties.php?mail_id=<?php echo $val["id"] ?>"><img src="images/edit.png" alt="<?php __("Edit"); ?>" /><?php __("Edit"); ?></a></div></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
} // end if no mail for this domain
|
||||
?>
|
||||
|
||||
</table>
|
||||
<br />
|
||||
<input type="submit" class="inb" name="submit" value="<?php __("Delete the checked email addresses"); ?>" />
|
||||
</form>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php include_once("foot.php"); ?>
|
||||
|
|
|
@ -0,0 +1,76 @@
|
|||
<?
|
||||
/*
|
||||
mail_localbox_doedit.php, author: squidly
|
||||
----------------------------------------------------------------------
|
||||
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
|
||||
----------------------------------------------------------------------
|
||||
Purpose of file: Create a new mail account
|
||||
----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
require_once("../class/config.php");
|
||||
|
||||
|
||||
$fields = array (
|
||||
"local" => array ("request", "integer",0),
|
||||
"mail_id" => array ("request", "integer",0),
|
||||
"is_local" => array ("request", "integer",0)
|
||||
);
|
||||
getFields($fields);
|
||||
/*si local vaut non =
|
||||
si boite pas deja locale : ne rien faire
|
||||
si boite locale: suprimmer entré dans mailbox
|
||||
niveau system virer le dossier.
|
||||
si local vaut oui =
|
||||
si boite pas deja local: ajout entré table mailbox
|
||||
si boite locale: dire a l'utilisateur que c'est deja le cas.
|
||||
*/
|
||||
print_r($is_local);
|
||||
//if we are already processing a localy hosted mail
|
||||
if(isset($is_local) && intval($is_local) == 1){
|
||||
//if user chose yes to localbox
|
||||
if($local == 1){
|
||||
$error = _("Already Activated");
|
||||
include ("mail_edit.php");
|
||||
exit();
|
||||
}else{
|
||||
$mail_localbox->unset_localbox($mail_id);
|
||||
header ("Location: /mail_properties.php?mail_id=$mail_id");
|
||||
}
|
||||
}elseif( intval($is_local) == 0 ){
|
||||
|
||||
if($local == 0){
|
||||
$error = _("Already Activated");
|
||||
include ("mail_edit.php");
|
||||
exit();
|
||||
}else{
|
||||
//echo "processing mail to localbox";
|
||||
$mail_localbox->set_localbox($mail_id);
|
||||
header ("Location: /mail_properties.php?mail_id=$mail_id");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
<?php
|
||||
/*
|
||||
mail_localbox_edit.php, author: squidly
|
||||
----------------------------------------------------------------------
|
||||
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
|
||||
----------------------------------------------------------------------
|
||||
Purpose of file: Create a new mail account
|
||||
----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
require_once("../class/config.php");
|
||||
if (! $mail_id ) {
|
||||
$error="Missing mail_id";
|
||||
}
|
||||
$mail_details = $mail->mail_get_details($mail_id);
|
||||
if (!$mail_details) die ("error on mail details");
|
||||
|
||||
if (isset($error) && $error) {
|
||||
echo "<p class=\"error\">$error</p><p> </p>";
|
||||
}
|
||||
|
||||
echo "<h3>";
|
||||
echo sprintf(_("Edition of <b>%s</b>")."<br />",$mail_details['address_full']);
|
||||
echo "</h3>";?>
|
||||
<form action="mail_localbox_doedit.php" method="post" name="main" id="main">
|
||||
|
||||
<table class="tedit">
|
||||
<tr>
|
||||
<td>
|
||||
<?php if ($mail_details['is_local']!=0) {
|
||||
echo "<div class=\"warningmsg\">"._("WARNING: turning POP/IMAP off will DELETE the stored messages in this email address. This email address will become a simple redirection.")."</div>";
|
||||
}else{
|
||||
echo "<div class=\"warningmsg\">"._("Activate the localbox, will allow you to store your mails on this server. \n It is a very conveniant way to check your mails while roaming,
|
||||
thince they can be accesed remotely by POP or IMAP. It consume space on the server so be sure to verify your quota attribution.")."</div>";
|
||||
}
|
||||
?>
|
||||
<p>
|
||||
<input type="radio" name="local" id="local0" class="inc" value="0"<?php cbox($mail_details['is_local']==0); ?> onclick="show('localtbl');"><label for="local0"><?php __("No"); ?></label>
|
||||
<input type="radio" name="local" id="local1" class="inc" value="1"<?php cbox($mail_details['is_local']!=0); ?> onclick="show('localtbl');"><label for="local1"><?php __("Yes"); ?></label>
|
||||
</p>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="trbtn">
|
||||
<td colspan="2">
|
||||
<input type="hidden" class="inb" name="mail_id" value="<?php echo $mail_id ; ?>" />
|
||||
<input type="hidden" class="inb" name="is_local" value="<?php if($mail_details['is_local']==0) echo "0"; else echo "1" ; ?>" />
|
||||
<input type="submit" class="inb" name="submit" value="<?php __("Change this email address"); ?>" />
|
||||
<input type="button" class="inb" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='mail_properties.php?mail_id=<?php echo urlencode($mail_id); ?>'"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</form>
|
|
@ -0,0 +1,160 @@
|
|||
<?php
|
||||
/*
|
||||
mail_properties.php, author: squidly
|
||||
----------------------------------------------------------------------
|
||||
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
|
||||
----------------------------------------------------------------------
|
||||
Purpose of file: Create a new mail account
|
||||
----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
require_once("../class/config.php");
|
||||
include_once("head.php");
|
||||
|
||||
$fields = array (
|
||||
"mail_id" => array ("request", "integer", ""),
|
||||
);
|
||||
getFields($fields);
|
||||
|
||||
if ( ! $mail_id ) die("Error on mail_id");
|
||||
|
||||
$details = $mail->mail_get_details($mail_id);
|
||||
if (!$details) die("Error on mail details");
|
||||
echo "<h3>";
|
||||
echo sprintf(_("Edition of <b>%s</b>")."<br />",$details['address_full']);
|
||||
echo "</h3>";?>
|
||||
|
||||
<hr/>
|
||||
<table class="tlist">
|
||||
<tr id='globalmail_title'><td colspan=2 class='advdom'><b><a href="javascript:toogle_properties('globalmail_');"><font id='globalmail_minus'>-</font><font id='globalmail_plus' style='display:none'>+</font> <?php __("Global options");?></a></b></td></tr>
|
||||
<tr id="globalmail_"><td>
|
||||
<?php $mail->form($mail_id); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td colspan=2><h3><?php __("Select your action");?></h3></td></tr>
|
||||
<?php
|
||||
$properties = $mail->list_properties($mail_id);
|
||||
$prev_desc="";
|
||||
$lst_toggle=Array();
|
||||
$lst_advanced=Array();
|
||||
$first_advanced=true;
|
||||
$col=1;
|
||||
foreach ($properties as $k => $v ) {
|
||||
$col=3-$col;
|
||||
|
||||
if (isset($v['advanced']) && $v['advanced']) {
|
||||
$lst_advanced[]=md5($v['short_desc']);
|
||||
if ($first_advanced) {
|
||||
$col=2;
|
||||
$first_advanced=false; ?>
|
||||
<tr><td colspan="2" class="advdom"><hr/></td></tr>
|
||||
<tr><td colspan="2" class="advdom"></td></tr>
|
||||
<tr id='mailproperties_show' style='display:none'><td colspan=2>
|
||||
<a href="javascript:toggle_mailadv();"><b>+ <?php __("Show advanced options"); ?></b></a></td>
|
||||
</tr>
|
||||
<tr id='mailproperties_hide'><td colspan=2>
|
||||
<a href="javascript:toggle_mailadv();"><b>- <?php __("Hide advanced options"); ?></b></a></td>
|
||||
</tr>
|
||||
<tr><td colspan="2" class="advdom"></td></tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
$ok = true;
|
||||
if ( $v['pass_required'] && ! $details['password'] ) {
|
||||
$ok = false;
|
||||
}
|
||||
|
||||
/*
|
||||
$url=$v['url'];
|
||||
$cl = ($ok)?"lst_clic$col":"lst_$col";
|
||||
|
||||
echo "<tr id='mp_$k' class=\"$cl\"";
|
||||
if ($ok) {
|
||||
echo 'onclick="javascript:window.location.href=\'';
|
||||
echo addslashes($url)."';\"";
|
||||
}
|
||||
echo " ><td>";
|
||||
echo "<b>".$v['short_desc']."</b><br/>";
|
||||
echo $v['human_desc'];
|
||||
*/
|
||||
if ($v['short_desc'] != "$prev_desc" ) {
|
||||
$prev_desc=$v['short_desc'];
|
||||
$lst_toggle[]=md5($prev_desc);
|
||||
echo "<tr id='".md5($prev_desc)."title'><td colspan=2 class='advdom'><b><a href=\"javascript:toogle_properties('".md5($prev_desc)."');\"><font id='".md5($prev_desc)."minus'>-</font><font id='".md5($prev_desc)."plus' style='display:none'>+</font> ".$v['short_desc']."</a></b></td></tr>";
|
||||
}
|
||||
|
||||
echo "<tr id=".md5($prev_desc)."><td>";
|
||||
if (!$ok) {
|
||||
echo "<br/><font color='red'>";
|
||||
__("Unavaible, you need to set a password before");
|
||||
echo "</font>";
|
||||
} else {
|
||||
$hooks->invoke('form', $v['form_param'], Array($v['class']));
|
||||
// $$v['class']->form($v['form_param']);
|
||||
}
|
||||
echo "<tr><td>";
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<!--
|
||||
<?php if ($ok) { ?>
|
||||
<div class="ina"><a href="<?php echo $url ?>"><img src="images/edit.png" alt="<?php __("Edit"); ?>" /><?php __("Edit"); ?></a></div>
|
||||
<?php } // if ok ?>
|
||||
-->
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
} // foreach
|
||||
|
||||
|
||||
?>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
|
||||
function toogle_properties(id) {
|
||||
$('#'+id).toggle();
|
||||
$('#'+id+'plus').toggle();
|
||||
$('#'+id+'minus').toggle();
|
||||
}
|
||||
|
||||
function toggle_mailadv(){
|
||||
$("#mailproperties_show").toggle();
|
||||
$("#mailproperties_hide").toggle();
|
||||
<?php foreach($lst_advanced as $o) { ?>
|
||||
// $("#<?php echo $o;?>").toggle();
|
||||
$("#<?php echo $o;?>title").toggle();
|
||||
<?php } ?>
|
||||
}
|
||||
|
||||
toogle_properties('globalmail_');
|
||||
<?php
|
||||
foreach ($lst_toggle as $t) { ?>
|
||||
toogle_properties('<?php echo $t ?>');
|
||||
<? } //foreach toggle ?>
|
||||
|
||||
toggle_mailadv();
|
||||
</script>
|
||||
<?php
|
||||
include_once("foot.php");
|
||||
?>
|
|
@ -0,0 +1,51 @@
|
|||
<?
|
||||
/*
|
||||
mail_redirection_doedit.php, author: squidly
|
||||
----------------------------------------------------------------------
|
||||
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
|
||||
----------------------------------------------------------------------
|
||||
Purpose of file: Create a new mail account
|
||||
----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
require_once("../class/config.php");
|
||||
$fields = array (
|
||||
"alias" => array ("request", "string",0),
|
||||
"mail_id" => array ("request", "integer",0),
|
||||
"domain" => array ("request", "string",0),
|
||||
"address_full" => array ("request", "string",0),
|
||||
"dom_id" => array ("request", "integer",0),
|
||||
"rcp" =>array("request", "array", "")
|
||||
);
|
||||
getFields($fields);
|
||||
//obon on crée les redirect..
|
||||
$tst=$mail_redirection->setredirection($mail_id, $rcp);
|
||||
if($tst==false){
|
||||
$error="One ore more redirection could not be added";
|
||||
}
|
||||
|
||||
|
||||
|
||||
//redirection si tout se passe bien.
|
||||
header ("Location: mail_properties.php?mail_id=$mail_id");
|
||||
|
||||
?>
|
|
@ -0,0 +1,93 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
mail_redirection_edit.php, author: squidly
|
||||
----------------------------------------------------------------------
|
||||
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
|
||||
----------------------------------------------------------------------
|
||||
Purpose of file: Create a new mail account
|
||||
----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
require_once("../class/config.php");
|
||||
?>
|
||||
|
||||
<form action="mail_redirection_doedit.php" method="post" name="main" id="main">
|
||||
<table>
|
||||
<?php
|
||||
if (!isset($mail_id) || is_null($mail_id)) { // if no mail_id
|
||||
die('missing mail id ERROR');
|
||||
}
|
||||
|
||||
$lst_rcp=$mail_redirection->recipients_get_array($mail_id) ;
|
||||
$nb_rcp=count($lst_rcp);
|
||||
for ($ii=0;$ii <= count($lst_rcp)+10; $ii++) {
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="int" name="rcp[<?php echo $ii?>]" id="rcp-<?php echo $ii?>" value="<?php
|
||||
if (isset($lst_rcp[$ii])){ ehe($lst_rcp[$ii]);} ?>" size="20" maxlength="255" onKeyUp="javascript:is_valid_mail(<?php echo $ii; ?>);" />
|
||||
</td>
|
||||
<td><img id="valid-rcp-<?php echo $ii?>" alt="" src="" ></td>
|
||||
<td><a href="#" onclick="javascript:delete_one_recipients(<?php echo $ii?>);" ><?php __("Delete");?></a></td>
|
||||
</tr>
|
||||
<?php
|
||||
} // foreach ?>
|
||||
<tr>
|
||||
<td colspan=3 align="right">
|
||||
<input type="button" class="inb" name="clear" value="<?php __("Clear all redirections"); ?>" onclick="javascript:delete_all_recipients();"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=3>
|
||||
<input type="hidden" class="inb" name="mail_id" value="<?php echo $mail_id ; ?>" />
|
||||
<input type="submit" class="inb" name="submit" value="<?php __("Change this email address"); ?>" />
|
||||
<input type="button" class="inb" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='mail_properties.php?mail_id=<?php echo urlencode($mail_id); ?>'"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
|
||||
function delete_one_recipients(idelem) {
|
||||
document.getElementById('rcp-'+idelem).value='';
|
||||
is_valid_mail(idelem);
|
||||
}
|
||||
|
||||
function delete_all_recipients() {
|
||||
var answer = confirm ("<?php __("Are you sure you want to clear all redirections?");?>");
|
||||
if (answer) {
|
||||
<?php for ($ii=0;$ii <= count($lst_rcp)+10; $ii++) { ?>
|
||||
delete_one_recipients(<?php echo $ii;?>);
|
||||
<?php } // for ?>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
<?php for ($ii=0;$ii <= count($lst_rcp)+10; $ii++) { ?>
|
||||
is_valid_mail(<?php echo $ii;?>);
|
||||
<?php } // for ?>
|
||||
|
||||
|
||||
</script>
|
||||
</form>
|
|
@ -35,14 +35,19 @@
|
|||
if ($mem->checkRight()) { ?>
|
||||
<div class="menu-box">
|
||||
<div class="menu-title">
|
||||
<img src="images/admin.png" alt="Administration" /> <span style="color: red;"><?php __("Administration"); ?></span></div>
|
||||
<a href="javascript:menu_toggle('menu-adm');">
|
||||
<img src="images/admin.png" alt="Administration" /> <span style="color: red;"><?php __("Administration"); ?></span>
|
||||
<img src="images/row-down.png" alt="" style="float:right;"/></a>
|
||||
</div>
|
||||
<div class="menu-content" id ="menu-adm">
|
||||
<ul>
|
||||
<li><a href="adm_list.php"><span style="color: red;"><?php __("Manage the Alternc accounts"); ?></span></a></li>
|
||||
<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="/alternc-sql/?server=2"><span style="color: red;"><?php __("General PhpMyAdmin"); ?></span></a></li>
|
||||
<?php if ($cuid == 2000) {
|
||||
$llzstr="Switch debug ".($debug_alternc->status?"Off":"On"); ?>
|
||||
<li><a href="adm_panel.php"><span style="color: red;"><?php __("Admin Control Panel"); ?></span></a></li>
|
||||
<li><a href="/alternc-sql/?server=2"><span style="color: red;"><?php __("General PhpMyAdmin"); ?></span></a></li>
|
||||
<li><a href="alternc_debugme.php?enable=<?php echo $debug_alternc->status?"0":"1"; ?>"><span style="color: red;"><?php __("$llzstr"); ?></span></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/*
|
||||
$Id: mail_dodel.php,v 1.2 2003/06/10 06:45:16 root Exp $
|
||||
$Id: menu_mail.php,v 1.3 2004/05/19 14:23:06 benjamin Exp $
|
||||
----------------------------------------------------------------------
|
||||
AlternC - Web Hosting System
|
||||
Copyright (C) 2002 by the AlternC Development Team.
|
||||
|
@ -23,29 +23,24 @@
|
|||
|
||||
To read the license please visit http://www.gnu.org/copyleft/gpl.html
|
||||
----------------------------------------------------------------------
|
||||
Original Author of file: Benjamin Sonntag
|
||||
Purpose of file: Delete a mailbox
|
||||
Original Author of file:
|
||||
Purpose of file:
|
||||
----------------------------------------------------------------------
|
||||
*/
|
||||
require_once("../class/config.php");
|
||||
|
||||
if (!is_array($d)) {
|
||||
$d[]=$d;
|
||||
}
|
||||
/* ############# CRON ############# */
|
||||
|
||||
$q = $quota->getquota("cron");
|
||||
if ($q['t'] > 0) {
|
||||
|
||||
reset($d);
|
||||
while (list($key,$val)=each($d)) {
|
||||
if (!$mail->del_mail($val)) {
|
||||
$error.=sprintf(_("The mailbox <b>%s</b> does not exist!")."<br />",$val);
|
||||
echo $error;
|
||||
} else {
|
||||
$error.=sprintf(_("The mailbox <b>%s</b> has been deleted!")."<br />",$val);
|
||||
echo $error;
|
||||
}
|
||||
include("mail_list.php");
|
||||
}
|
||||
|
||||
exit();
|
||||
|
||||
?>
|
||||
?>
|
||||
<div class="menu-box">
|
||||
<div class="menu-title">
|
||||
<a href="cron.php">
|
||||
<img src="images/schedule.png" alt="<?php __("Scheduled tasks"); ?>" width=16px height=16px/> <?php __("Scheduled tasks"); ?> (<?= $q["u"]; ?>/<?= $q["t"]; ?>)
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
} // fin du if pour les quotas
|
||||
?>
|
|
@ -37,7 +37,10 @@ if ($q["t"] > 0)
|
|||
?>
|
||||
<div class="menu-box">
|
||||
<div class="menu-title" id="test">
|
||||
<img src="images/dom.png" alt="<?php __("Domains"); ?>" /> <?php __("Domains"); ?> (<?= $q["u"]; ?>/<?= $q["t"]; ?>)</div>
|
||||
<a href="javascript:menu_toggle('menu-dom');">
|
||||
<img src="images/dom.png" alt="<?php __("Domains"); ?>" /> <?php __("Domains"); ?> (<?= $q["u"]; ?>/<?= $q["t"]; ?>)
|
||||
<img src="images/row-down.png" alt="" style="float:right;"/></a>
|
||||
</div>
|
||||
<div class="menu-content" id="menu-dom">
|
||||
<ul>
|
||||
<?php if ($quota->cancreate("dom")) { ?>
|
||||
|
@ -55,4 +58,4 @@ while (list($key, $val) = each($domlist))
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
|
|
@ -37,7 +37,10 @@ if ($q["t"] > 0) {
|
|||
?>
|
||||
<div class="menu-box">
|
||||
<div class="menu-title">
|
||||
<img src="images/ftp.png" alt="<?php __("FTP accounts"); ?>" /> <?php __("FTP accounts"); ?> <?php if (!$quota->cancreate("ftp")) { echo '<span class="full">'; } ?>(<?= $q["u"]; ?>/<?= $q["t"]; ?>)<?php if (!$quota->cancreate("ftp")) { echo '</span>'; } ?></div>
|
||||
<a href="javascript:menu_toggle('menu-ftp');">
|
||||
<img src="images/ftp.png" alt="<?php __("FTP accounts"); ?>" /> <?php __("FTP accounts"); ?> <?php if (!$quota->cancreate("ftp")) { echo '<span class="full">'; } ?>(<?= $q["u"]; ?>/<?= $q["t"]; ?>)<?php if (!$quota->cancreate("ftp")) { echo '</span>'; } ?>
|
||||
<img src="images/row-down.png" alt="" style="float:right;"/></a>
|
||||
</div>
|
||||
<div class="menu-content" id="menu-ftp">
|
||||
<ul>
|
||||
<?php if ($quota->cancreate("ftp")) { ?>
|
||||
|
@ -47,4 +50,4 @@ if ($q["t"] > 0) {
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
|
|
@ -32,6 +32,6 @@
|
|||
|
||||
?>
|
||||
<div class="menu-box">
|
||||
<div class="menu-title"><img src="images/ip.png" alt="<?php __("Access security"); ?>" width=16px height=16px/> <a href="ip_main.php"><?php __("Access security"); ?></a> </div>
|
||||
<div class="menu-title"><img src="images/ip.png" alt="<?php __("Access security"); ?>" width="16" height="16" /> <a href="ip_main.php"><?php __("Access security"); ?></a> </div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
<div class="menu-box">
|
||||
<div class="menu-title">
|
||||
<img src="/admin/images/lang.png" alt="<?php __("Langues"); ?>" /> <a href="javascript:menulang_toggle();"><?php __("Langues"); ?></a></div>
|
||||
<img src="/images/lang.png" alt="<?php __("Langues"); ?>" /> <a href="javascript:menu_toggle('menu-lang');"><?php __("Langues"); ?>
|
||||
<img src="/images/row-down.png" alt="" style="float:right;"/></a>
|
||||
</div>
|
||||
<div class="menu-content" id="menu-lang">
|
||||
<ul>
|
||||
<?php foreach($locales as $l) { ?>
|
||||
<li><a href="/admin/login.php?setlang=<?php echo $l; ?>" target="_top"><?php __($l); ?></a></li>
|
||||
<li><a href="/login.php?setlang=<?php echo $l; ?>" target="_top"><?php __($l); ?></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function menulang_toggle() {
|
||||
$("#menu-lang").toggle();
|
||||
}
|
||||
menulang_toggle();
|
||||
menu_toggle('menu-lang');
|
||||
</script>
|
||||
|
|
|
@ -37,21 +37,24 @@ if ($q["t"] > 0 && $r["u"] > 0) {
|
|||
?>
|
||||
<div class="menu-box">
|
||||
<div class="menu-title">
|
||||
<img src="images/mail.png" alt="<?php __("Email Addresses"); ?>" /> <?php __("Email Addresses"); ?> (<?= $q["u"]; ?>/<?= $q["t"]; ?>)</div>
|
||||
<a href="javascript:menu_toggle('menu-mail');">
|
||||
<img src="images/mail.png" alt="<?php __("Email Addresses"); ?>" /> <?php __("Email Addresses"); ?> (<?= $q["u"]; ?>/<?= $q["t"]; ?>)
|
||||
<img src="images/row-down.png" alt="" style="float:right;"/></a>
|
||||
</div>
|
||||
<div class="menu-content" id="menu-mail">
|
||||
<ul>
|
||||
<?php
|
||||
|
||||
/* Enumeration des domlistes en mail : */
|
||||
$domlist = $mail->enum_domains();
|
||||
reset($domlist);
|
||||
while (list($key, $val) = each($domlist)) {
|
||||
$res = $mail->enum_doms_mails($val, 1);
|
||||
|
||||
foreach($domlist as $l => $v){
|
||||
?>
|
||||
<li><a href="mail_list.php?domain=<?php echo urlencode($val) ?>"><?php echo $val ?> (<?= $res["count"]; ?>)</a></li>
|
||||
<?php } ?>
|
||||
<li><a href="mail_list.php?domain=<?php echo urlencode($v["domaine"]) ?>&domain_id=<?php echo urlencode($v["id"]) ?>"><?php echo $v["domaine"] ?> (<?php echo $v["nb_mail"]; ?>)</a></li>
|
||||
<?php
|
||||
}?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
} // fin du if pour les quotas
|
||||
?>
|
||||
|
|
|
@ -32,7 +32,10 @@ if ($q["t"]) {
|
|||
?>
|
||||
<div class="menu-box">
|
||||
<div class="menu-title">
|
||||
<img src="images/mysql.png" alt="MySQL" /> MySQL (<?= $q["u"]; ?>/<?= $q["t"]; ?>)</div>
|
||||
<a href="javascript:menu_toggle('menu-sql');">
|
||||
<img src="images/mysql.png" alt="MySQL" /> MySQL (<?= $q["u"]; ?>/<?= $q["t"]; ?>)
|
||||
<img src="/images/row-down.png" alt="" style="float:right;"/></a>
|
||||
</div>
|
||||
<div class="menu-content" id="menu-sql">
|
||||
<ul>
|
||||
<li><a href="sql_list.php"><?php __("Databases"); ?></a></li>
|
||||
|
|
|
@ -2,9 +2,12 @@
|
|||
|
||||
require_once("../class/config.php");
|
||||
|
||||
$mode=intval($_REQUEST["mode"]);
|
||||
$sd=intval($_REQUEST["sd"]);
|
||||
$usr=intval($_REQUEST["usr"]);
|
||||
$fields = array (
|
||||
"mode" => array ("get", "integer" ,0),
|
||||
"sd" => array ("get", "integer" ,0),
|
||||
"usr" => array ("get", "integer" ,0),
|
||||
);
|
||||
getFields($fields);
|
||||
|
||||
if (!$admin->enabled) {
|
||||
__("This page is restricted to authorized staff");
|
||||
|
@ -18,7 +21,7 @@ include_once ("head.php");
|
|||
<hr id="topbar"/>
|
||||
<br />
|
||||
<?php
|
||||
if ($error) {
|
||||
if (isset($error) && $error) {
|
||||
echo "<p class=\"error\">$error</p>";
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -38,9 +38,9 @@ $rdb=$mysql->get_dblist();
|
|||
<hr id="topbar"/>
|
||||
<br />
|
||||
<?php
|
||||
if ($error) {
|
||||
echo "<p class=\"error\">$error</p><p> </p>";
|
||||
}
|
||||
if (isset($error) && $error) {
|
||||
echo "<p class=\"error\">$error</p><p> </p>";
|
||||
}
|
||||
|
||||
if ($rdb) {
|
||||
if($r){
|
||||
|
|
|
@ -42,9 +42,9 @@ $r=$mysql->get_user_dblist($id);
|
|||
<hr id="topbar"/>
|
||||
<br />
|
||||
<?php
|
||||
if ($error) {
|
||||
echo "<p class=\"error\">$error</p><p> </p>";
|
||||
}
|
||||
if (isset($error) && $error) {
|
||||
echo "<p class=\"error\">$error</p><p> </p>";
|
||||
}
|
||||
|
||||
if ($r) {
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ Merci de revenir plus tard.";
|
|||
exit();
|
||||
}
|
||||
*/
|
||||
ini_set('display_errors', true);
|
||||
|
||||
// 1. Get a semaphore id for the alternc magic number (18577)
|
||||
$alternc_sem = sem_get ( 18577 );
|
||||
|
@ -168,4 +169,5 @@ for($i=0;$i<count($classes);$i++) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
|
|
@ -130,6 +130,8 @@ class DB_Sql {
|
|||
* @return the $Query_ID class variable (null if fails)
|
||||
*/
|
||||
function query($Query_String) {
|
||||
global $debug_alternc;
|
||||
|
||||
/* No empty queries, please, since PHP4 chokes on them. */
|
||||
if ($Query_String == "")
|
||||
/* The empty query string is passed on from the constructor,
|
||||
|
@ -151,7 +153,9 @@ class DB_Sql {
|
|||
if ($this->Debug)
|
||||
printf("Debug: query = %s<br />\n", $Query_String);
|
||||
|
||||
$debug_chrono_start = microtime(true);
|
||||
$this->Query_ID = @mysql_query($Query_String,$this->Link_ID);
|
||||
$debug_chrono_start = (microtime(true) - $debug_chrono_start)*1000;
|
||||
$this->Row = 0;
|
||||
$this->Errno = mysql_errno();
|
||||
$this->Error = mysql_error();
|
||||
|
@ -159,6 +163,10 @@ class DB_Sql {
|
|||
$this->halt("Invalid SQL: ".$Query_String);
|
||||
}
|
||||
|
||||
if (isset($debug_alternc)) {
|
||||
$debug_alternc->add("SQL Query : (".substr($debug_chrono_start,0,5)." ms)\t $Query_String");
|
||||
}
|
||||
|
||||
# Will return nada if it fails. That's fine.
|
||||
return $this->Query_ID;
|
||||
}
|
||||
|
|
|
@ -501,6 +501,12 @@ function printVar($array) {
|
|||
print_r($array);
|
||||
echo "</pre>\n";
|
||||
}
|
||||
function list_properties_order($a, $b) {
|
||||
if ( $a['label'] == $b['label']) {
|
||||
return 0;
|
||||
}
|
||||
return ($a['label']<$b['label'])?-1:1;
|
||||
} // end private function list_properties_order
|
||||
|
||||
|
||||
?>
|
||||
|
|
|
@ -44,3 +44,4 @@ while (FALSE !== ($line = fgets($config_file))) {
|
|||
}
|
||||
|
||||
fclose($config_file);
|
||||
?>
|
||||
|
|
|
@ -355,3 +355,5 @@ class m_authip {
|
|||
}
|
||||
|
||||
}; /* Classe m_authip */
|
||||
|
||||
?>
|
||||
|
|
|
@ -170,7 +170,7 @@ class m_bro {
|
|||
}
|
||||
closedir($dir);
|
||||
}
|
||||
if (is_array($c)) {
|
||||
if (isset ($c) && is_array($c)) {
|
||||
usort ($c, array("m_bro","_sort_filelist_name"));
|
||||
return $c;
|
||||
} else {
|
||||
|
@ -329,7 +329,7 @@ class m_bro {
|
|||
global $db,$cuid,$err;
|
||||
$file=ssla($file);
|
||||
$absolute=$this->convertabsolute($dir."/".$file,0);
|
||||
echo "$absolute";
|
||||
#echo "$absolute";
|
||||
if ($absolute && (!file_exists($absolute))) {
|
||||
if (!mkdir($absolute,00777)) {
|
||||
$err->raise("bro",4);
|
||||
|
@ -358,7 +358,6 @@ class m_bro {
|
|||
$err->raise("bro",1);
|
||||
return false;
|
||||
}
|
||||
print_r($absolute);
|
||||
if (!file_exists($absolute)) {
|
||||
if (!@touch($absolute)) {
|
||||
$err->raise("bro",3);
|
||||
|
@ -645,6 +644,7 @@ class m_bro {
|
|||
$a=explode("/",$path);
|
||||
if (!is_array($a)) $a=array($a);
|
||||
$c='';
|
||||
$R='';
|
||||
for($i=0;$i<count($a);$i++) {
|
||||
if ($a[$i]) {
|
||||
$R.=$a[$i]."/";
|
||||
|
|
|
@ -0,0 +1,147 @@
|
|||
<?php
|
||||
/*
|
||||
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: Camille Lafitte
|
||||
Purpose of file: Manage hook system.
|
||||
----------------------------------------------------------------------
|
||||
*/
|
||||
/**
|
||||
* This class manage cron.
|
||||
*
|
||||
* @copyright AlternC-Team 2002-2005 http://alternc.org/
|
||||
*/
|
||||
class m_cron {
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/** Constructor
|
||||
*/
|
||||
function m_cron() {
|
||||
}
|
||||
//FIXME rajouter contrainte NOT NULL sur uid dans la bdd
|
||||
|
||||
function schedule() {
|
||||
return Array(
|
||||
Array('unit'=>1440, 'name'=>_("Daily")),
|
||||
Array('unit'=>60, 'name'=>_("Hour")),
|
||||
Array('unit'=>30, 'name'=>_("Half Hour")),
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
function lst_cron() {
|
||||
global $cuid,$db,$err;
|
||||
$err->log("cron","lst_cron");
|
||||
$db->query("select * from cron where uid = $cuid order by url;");
|
||||
$r=Array();
|
||||
while ($db->next_record()) {
|
||||
$tmp=Array();
|
||||
$tmp['id']=$db->f('id');
|
||||
$tmp['url']=urldecode($db->f('url'));
|
||||
$tmp['user']=urldecode($db->f('user'));
|
||||
$tmp['password']=urldecode($db->f('password'));
|
||||
$tmp['schedule']=$db->f('schedule');
|
||||
$tmp['email']=urldecode($db->f('email'));
|
||||
$r[]=$tmp;
|
||||
}
|
||||
return $r;
|
||||
}
|
||||
|
||||
function update($arr) {
|
||||
$ok=true;
|
||||
foreach ($arr as $a) {
|
||||
if (! isset($a['id'])) $a['id']=null;
|
||||
if (empty($a['url']) && is_null($a['id'])) continue;
|
||||
if (! $this->update_one($a['url'], $a['user'], $a['password'], $a['email'], $a['schedule'], $a['id']) ) {
|
||||
$ok=false;
|
||||
}
|
||||
}
|
||||
return $ok;
|
||||
}
|
||||
|
||||
function delete_one($id) {
|
||||
global $db,$err,$cuid;
|
||||
$err->log("cron","delete_one");
|
||||
return $db->query("delete from cron where id=".intval($id)." and uid=$cuid limit 1;");
|
||||
}
|
||||
|
||||
function update_one($url, $user, $password, $email, $schedule, $id=null) {
|
||||
global $db,$err,$quota,$cuid;
|
||||
$err->log("cron","update_one");
|
||||
|
||||
if (empty($url) && !is_null($id)) {
|
||||
return $this->delete_one($id);
|
||||
}
|
||||
|
||||
// FIXME check que l'url est une vrai URL
|
||||
|
||||
$url=mysql_real_escape_string(urlencode($url));
|
||||
$user=mysql_real_escape_string(urlencode($user));
|
||||
if (empty($user)) $password='';
|
||||
$password=mysql_real_escape_string(urlencode($password));
|
||||
if (! checkmail($email) == 0 ) return false;
|
||||
$email=mysql_real_escape_string(urlencode($email));
|
||||
if (! $this->valid_schedule($schedule)) return false;
|
||||
|
||||
if (is_null($id)) { // if a new insert, quotacheck
|
||||
$q = $quota->getquota("cron");
|
||||
if ( $q["u"] >= $q["t"] ) {
|
||||
$err->log("cron","update_one","quota problem");
|
||||
return false;
|
||||
}
|
||||
} else { // if not a new insert, check the $cuid
|
||||
$db->query("select uid from cron where id = $id;");
|
||||
if (! $db->next_record()) { return "false"; } // return false if pb
|
||||
if ( $db->f('uid') != $cuid ) {
|
||||
$err->log("cron","update_one","bad uid");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$query = "INSERT INTO cron (id, uid, url, user, password, schedule, email) values ('$id', '$cuid', '$url', '$user', '$password', '$schedule', '$email') on duplicate key update url='$url', user='$user', password='$password', schedule='$schedule', email='$email', uid='$cuid';";
|
||||
return $db->query("$query");
|
||||
|
||||
}
|
||||
|
||||
function valid_schedule($s) {
|
||||
$s2 = intval($s);
|
||||
if ($s2 != $s) return false;
|
||||
$r=false;
|
||||
foreach ($this->schedule() as $cs ) {
|
||||
if ($cs['unit'] == $s) return true;
|
||||
}
|
||||
return $r;
|
||||
}
|
||||
|
||||
function alternc_quota_names() {
|
||||
return "cron";
|
||||
}
|
||||
|
||||
// return the used quota
|
||||
function alternc_get_quota() {
|
||||
global $cuid,$db,$err;
|
||||
$err->log("cron","alternc_get_quota");
|
||||
$db->query("select count(*) as cnt from cron where uid = $cuid;");
|
||||
|
||||
if ($db->next_record()) {
|
||||
return $db->f('cnt');
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
} /* Class cron */
|
||||
|
||||
?>
|
|
@ -0,0 +1,78 @@
|
|||
<?php
|
||||
/*
|
||||
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: Camille Lafitte
|
||||
Purpose of file: Manage hook system.
|
||||
----------------------------------------------------------------------
|
||||
*/
|
||||
/**
|
||||
* This class manage debug.
|
||||
*
|
||||
* @copyright AlternC-Team 2002-2005 http://alternc.org/
|
||||
*/
|
||||
class m_debug_alternc {
|
||||
var $infos="";
|
||||
var $status=false;
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/** Constructor
|
||||
*/
|
||||
function m_debug_alternc() {
|
||||
if ( isset($_COOKIE['alternc_debugme']) && $_COOKIE['alternc_debugme'] ) {
|
||||
$this->status=true;
|
||||
}
|
||||
}
|
||||
|
||||
function activate() {
|
||||
setcookie('alternc_debugme',true, time()+3600); // expire in 1 hour
|
||||
$this->status="";
|
||||
ini_set('display_errors', true);
|
||||
return true;
|
||||
}
|
||||
|
||||
function desactivate() {
|
||||
setcookie('alternc_debugme',false);
|
||||
$this->status=false;
|
||||
return true;
|
||||
}
|
||||
|
||||
function add($txt) {
|
||||
$this->infos .= "\n$txt";
|
||||
return true;
|
||||
}
|
||||
|
||||
function dump() {
|
||||
global $cuid;
|
||||
if ( $cuid!=2000 ) return false;
|
||||
if ( ! $this->status ) return false;
|
||||
|
||||
echo "<pre>";
|
||||
echo "+++ BEGIN Debug Mode+++\n\n";
|
||||
print_r($this->infos);
|
||||
echo "\n\n--- GET ---\n";
|
||||
print_r($_GET);
|
||||
echo "\n\n--- POST ---\n";
|
||||
print_r($_POST);
|
||||
echo "\n\n--- SERVER ---\n";
|
||||
print_r($_SERVER);
|
||||
echo "\n\n+++ END Debug Mode+++";
|
||||
echo "</pre>";
|
||||
return true;
|
||||
}
|
||||
|
||||
} /* Class debug_alternc */
|
||||
|
||||
?>
|
|
@ -677,7 +677,7 @@ class m_dom {
|
|||
$r["dns_action"]=$db->Record["dns_action"];
|
||||
$r["dns_result"]=$db->Record["dns_result"];
|
||||
$r["mail"]=$db->Record["gesmx"];
|
||||
$r["mx"]=$db->Record["mx"];
|
||||
// $r["mx"]=$db->Record["mx"]; // le champs mx n'existe plus dans domaines
|
||||
$r['noerase']=$db->Record['noerase'];
|
||||
$db->free();
|
||||
$db->query("select count(*) as cnt from sub_domaines where compte='$cuid' and domaine='$dom'");
|
||||
|
|
|
@ -152,3 +152,5 @@ class m_err {
|
|||
}
|
||||
|
||||
}; /* Classe m_err */
|
||||
|
||||
?>
|
||||
|
|
|
@ -28,11 +28,3 @@ Class m_export {
|
|||
|
||||
}// export Class end
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,150 @@
|
|||
<?php
|
||||
/*
|
||||
$Id: m_mail_alias.php author: squidly
|
||||
----------------------------------------------------------------------
|
||||
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, Franck Missoum
|
||||
Purpose of file: Manage Email accounts and aliases.
|
||||
----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* This class handle emails aliases
|
||||
*
|
||||
* Copyleft {@link http://alternc.net/ AlternC Team}
|
||||
*
|
||||
* @copyright AlternC-Team 2002-11-01 http://alternc.net/
|
||||
*
|
||||
*/
|
||||
|
||||
Class m_mail_alias{
|
||||
var $enabled;
|
||||
var $advanced;
|
||||
|
||||
/**
|
||||
* Function used to set the "visibility" of the property: meaning wheter the option is enabled (hence visible) and if it is part of the advanced options.
|
||||
*/
|
||||
function m_mail_alias(){
|
||||
$this->enabled=variable_get('mail_alias_enabled',null);
|
||||
if (is_null($this->enabled)) { // if not configuration var, setup one (with a default value)
|
||||
variable_set('mail_alias_enabled',true,'To enable or disable the alias module in the mail edit page');
|
||||
$this->enabled=true;
|
||||
}
|
||||
|
||||
$this->advanced=variable_get('mail_alias_advanced',null);
|
||||
if (is_null($this->advanced)) { // if not configuration var, setup one (with a default value)
|
||||
variable_set('mail_alias_advanced',true,'To place the alias option in the advanced area');
|
||||
$this->advanced=true;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* function used to list every aliases ( aka local redirections ) of a given mail address
|
||||
* param: mail address aliased.
|
||||
* return : an array containing every alias of a given mail on every domain related to the current user.
|
||||
*
|
||||
*/
|
||||
|
||||
function list_alias($mail_address) {
|
||||
global $db, $mail, $cuid,$err;
|
||||
$err->log("mail_alias","list_alias");
|
||||
$db->query("SELECT r.id as id, r.address_id from recipient r,address a, domaines d where r.recipients REGEXP '^[[:space:]]*".mysql_real_escape_string($mail_address)."[[:space:]]*$'and r.address_id=a.id and a.domain_id=d.id and d.compte = $cuid;");
|
||||
$rcp = Array();
|
||||
while ($db->next_record()) {
|
||||
$rcp[$db->f("id")] = $db->f("address_id");
|
||||
}
|
||||
foreach ($rcp as $k => $v) {
|
||||
$rcp[$k] = $mail->mail_get_details($v, false);
|
||||
}
|
||||
return $rcp;
|
||||
}
|
||||
|
||||
function form($mail_id, $edit_id) {
|
||||
global $mail,$err;
|
||||
if ($edit_id) {
|
||||
echo "<a href='mail_redirection_edit.php?mail_id=$edit_id'>";__("Edit");echo "</a>";
|
||||
} else {
|
||||
include('mail_alias_create.inc.php');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*hooks called to list a given mail properties
|
||||
*@param: the id of the mail in question
|
||||
*@return: an hashtable of every information usefull to edit the mail if it is part of the class
|
||||
*including a url to the edition page of the propertie in question ( here local hosting of a mail)
|
||||
*if the mail cannot be a localbox because of some of it's properties the return is NULL, thus not *displayed in the properties listing page.
|
||||
*/
|
||||
function hooks_mail_properties_list($mail_id){
|
||||
global $db, $mail, $err;
|
||||
$err->log("mail","mail_properties_list");
|
||||
$val = array (
|
||||
"label" => "alias",
|
||||
"short_desc" => _("Alias"),
|
||||
"human_desc" => _("To add an alias to this mail address.<br/><i>You must have the domain's alias setup in your AlternC account.</i>"),
|
||||
"url" => "mail_alias_create.php?mail_id=$mail_id",
|
||||
"class" => "mail_alias",
|
||||
"form_param" => Array($mail_id,false),
|
||||
"advanced" => $this->advanced,
|
||||
"pass_required" => false
|
||||
);
|
||||
|
||||
if (!$details = $mail->mail_get_details($mail_id, true)) return Array();
|
||||
$return=Array();
|
||||
$return[]=$val; // To be able to add a new alias
|
||||
foreach ($details['alias'] as $k => $v ) {
|
||||
$tmp = $val;
|
||||
$tmp['url'] = "mail_redirection_edit.php?mail_id=".$v['address_id'];
|
||||
$tmp["form_param"] = Array($mail_id,$v['address_id']);
|
||||
$tmp['short_desc'] = sprintf(_("Alias of %s"),$v['address_full']);
|
||||
$tmp['human_desc'] = sprintf(_("All the mails sent to %s will be received here."),$v['address_full']);
|
||||
$return[] = $tmp;
|
||||
}
|
||||
|
||||
|
||||
return $return;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Function inserting an alias in the recipient table
|
||||
* @param integer alias_id : unique id of the alias just inserted in address table.
|
||||
* @param string mail_arg : the mail being aliased.
|
||||
* @return true if the alias was inserted ,false if there is an error or if alias al* ready in the base
|
||||
*/
|
||||
function setalias($alias_id,$mail_arg){
|
||||
global $db, $err;
|
||||
$err->log("mail","setalias");
|
||||
|
||||
$compare=$this->list_alias($mail_arg);
|
||||
$db->query("select address from address where id=$alias_id;");
|
||||
$db->next_record();
|
||||
$mail_left=$db->f('address');
|
||||
foreach($compare as $k => $v){
|
||||
if($v['address'] === $mail_left)
|
||||
return false;
|
||||
}
|
||||
$db->query("INSERT INTO recipient (address_id, recipients) VALUES ($alias_id,'$mail_arg');");
|
||||
return true;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
|
@ -0,0 +1,86 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* Proof of concept of what a new feature look like with the new mail interface
|
||||
*
|
||||
**/
|
||||
|
||||
Class m_mail_jabber{
|
||||
var $advanced;
|
||||
var $enabled;
|
||||
|
||||
function m_mail_jabber(){
|
||||
// Get configuration var
|
||||
$this->enabled=variable_get('mail_jabber_enabled',null);
|
||||
$this->advanced=variable_get('mail_jabber_advanced',null);
|
||||
|
||||
// Setup the vars if there aren't any
|
||||
if (is_null($this->enabled)) {
|
||||
variable_set('mail_jabber_enabled',true,'To enable or disable the Jabber module in the mail edit page');
|
||||
$this->enabled=true;
|
||||
}
|
||||
|
||||
if (is_null($this->advanced)) {
|
||||
variable_set('mail_jabber_advanced',true,'To choose the category of Jabber in the mail edit page');
|
||||
$this->advanced=true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Hooks called by the mail class, it's
|
||||
* used to verify that a given mail is
|
||||
* allowed to be created by all the class friends of mail
|
||||
*
|
||||
* @param dom_id integer domain id of the target mail
|
||||
* @param mail_arg string left part of '@' of the target mail
|
||||
* @return array a hashtable contening the statei (boolean) and an error message
|
||||
*
|
||||
*/
|
||||
function hooks_mail_cancreate($dom_id, $mail_arg){
|
||||
global $db, $err, $cuid;
|
||||
$err->log("m_mail_jabber","hooks_mail_cancreate");
|
||||
$return = array (
|
||||
"state" => true, // Do we allow this creation ?
|
||||
"error" => ""); // Error message (txt)
|
||||
|
||||
// Return our informations
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hooks called to list a given mail properties
|
||||
* @param mail_id the id of the mail being processed
|
||||
* @return false, or an hashtable of the usefull information
|
||||
*
|
||||
**/
|
||||
function hooks_mail_properties_list($mail_id){
|
||||
global $db, $err;
|
||||
$err->log("mail_jabber","mail_properties_list");
|
||||
|
||||
// Return if this feature isn't enabled
|
||||
if (!$this->enabled) return false;
|
||||
|
||||
// Setup the object
|
||||
$return = array (
|
||||
"label" => "jabberdemo", // an internal label
|
||||
"short_desc" => _("Jabber Demo"), // A human short description
|
||||
"human_desc" => _("This is just a demo.<br/>Look at m_mail_jabber.php"), // A human long description
|
||||
"url" => "javascript:alert('Ici un renvoie vers le formulaire adequat de cette entrée.');", // The URL to go
|
||||
"pass_required" => true, // This feature require the mail to have a global password ?
|
||||
"advanced" => $this->advanced, // Is this an advanced feature ?
|
||||
);
|
||||
|
||||
/* We can return many array merged to have many
|
||||
* entry (with different informations, for example
|
||||
* different description or target URL), to list many
|
||||
* action directly in the page
|
||||
**/
|
||||
// To view an example, uncomment next line
|
||||
// $return=Array($return,$return,$return);
|
||||
return $return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
|
@ -0,0 +1,177 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
$Id: m_mail_localbox.php author: squidly
|
||||
----------------------------------------------------------------------
|
||||
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, Franck Missoum
|
||||
Purpose of file: Manage Email accounts and aliases.
|
||||
----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* This class handle emails local mailboxes
|
||||
*
|
||||
* Copyleft {@link http://alternc.net/ AlternC Team}
|
||||
*
|
||||
* @copyright AlternC-Team 2002-11-01 http://alternc.net/
|
||||
*
|
||||
*/
|
||||
|
||||
Class m_mail_localbox{
|
||||
var $enabled;
|
||||
var $advanced;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Function used to set the "visibility" of the property: meaning wheter the option is enabled (hence visible) and if it is part of the advanced options.
|
||||
*/
|
||||
function m_mail_localbox(){
|
||||
$this->enabled=variable_get('mail_localbox_enabled',null);
|
||||
if (is_null($this->enabled)) { // if not configuration var, setup one (with a default value)
|
||||
variable_set('mail_localbox_enabled',true,'To enable or disable the alias module in the mail edit page');
|
||||
$this->enabled=true;
|
||||
}
|
||||
|
||||
$this->advanced=variable_get('mail_localbox_advanced',null);
|
||||
if (is_null($this->advanced)) { // if not configuration var, setup one (with a default value)
|
||||
variable_set('mail_localbox_advanced',false,'To place the alias option in the advanced area');
|
||||
$this->advanced=false;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Set a localbox
|
||||
* @param integer $mail_id
|
||||
*/
|
||||
function set_localbox($mail_id){
|
||||
global $db, $err;
|
||||
$err->log("localbox","set_localbox");
|
||||
$path="mail/";
|
||||
//if(!$db->query("select distinct left(ad.address,1) as letter,d.domaine from address ad,where ad.id = $mail_id ;"));
|
||||
if(!$db->query("select distinct left(ad.address,1) as letter,ad.address ,d.domaine from address ad, domaines d where ad.domain_id = d.id and ad.id = $mail_id order by letter;"));
|
||||
|
||||
if(! $db->next_record()){
|
||||
return null;
|
||||
}
|
||||
$path="/var/alternc/mail/".$db->f('letter')."/".$db->f('address')."_".$db->f('domaine');
|
||||
//FIXME faire un touch de la maildir si dovecot ne sait pas le faire.
|
||||
if(!$db->query("INSERT into mailbox (address_id,path) values ($mail_id,'$path');"));
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Set a localbox
|
||||
* @param integer $mail_id
|
||||
*/
|
||||
function unset_localbox($mail_id){
|
||||
global $db, $err;
|
||||
$err->log("localbox","set_localbox");
|
||||
if(!$db->query("DELETE from mailbox where address_id=$mail_id;"));
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
hooks called by the mail class, it is used to verify that a given mail is not already in the adress table
|
||||
in wich case we can create it so the
|
||||
@param: dom_id=domain in use, mail_arg= mail address waiting to be created
|
||||
@result: an hashtable contening the state ( success /failure, un case of success) the id of the created mail, and an error message if something went wrong.
|
||||
*/
|
||||
function hooks_mail_cancreate($dom_id, $mail_arg){
|
||||
global $db, $err, $cuid;
|
||||
$err->log("m_mail_localbox","hooks_mail_cancreate");
|
||||
$return = array (
|
||||
"state" => true,
|
||||
"mail_id" => null,
|
||||
"error" => "");
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
function form($mail_id) {
|
||||
global $mail, $err;
|
||||
include('mail_localbox_edit.inc.php');
|
||||
}
|
||||
|
||||
/* hooks called to list a given mail properties
|
||||
* @param: the id of the mail being processed
|
||||
* @return: an hashtable of every information usefull to edit the mail if it is part of the class
|
||||
* including a url to the edition page of the propertie in question ( here local hosting of a mail)
|
||||
* if the mail cannot be a localbox because of some of it's properties the return is NULL, thus not displayed in the properties listing page.
|
||||
*/
|
||||
function hooks_mail_properties_list($mail_id){
|
||||
global $db, $err;
|
||||
$err->log("mail_localbox","mail_properties_list");
|
||||
$return = array (
|
||||
"label" => "localbox",
|
||||
"short_desc" => _("Local mailbox"),
|
||||
"human_desc" => _("Actually disabled.<br/>To have your mail stored on the server.<br/><i>You can access them remotely with the webmail, IMAP or POP</i>"),
|
||||
"url" => "mail_localbox_edit.php",
|
||||
"form_param" => Array($mail_id),
|
||||
"class" => 'mail_localbox',
|
||||
"pass_required" => true,
|
||||
"advanced" => $this->advanced
|
||||
);
|
||||
|
||||
|
||||
// on recherche si la boite est deja presente en tant que boite locale
|
||||
$db->query("select address_id from mailbox where address_id=$mail_id;");
|
||||
|
||||
// Si pas d'entrée dans mailbox, on retourne directement le Array
|
||||
if(! $db->next_record()){
|
||||
$return['url'] .= "?mail_id=$mail_id";
|
||||
return $return;
|
||||
}
|
||||
// Sinon, on le met à jour avant
|
||||
$return["is_local"]= true;
|
||||
$return["object_id"]= $db->f('address_id');
|
||||
$return["human_desc"] = _("Actually enabled.<br/>Your mails are stored on the server.<br/><i>You can access them remotely with the webmail, IMAP or POP</i>");
|
||||
|
||||
// On met à jour l'URL
|
||||
$return['url'] .= "?mail_id=$mail_id";
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
/* Function testing if a given mail id is hosted as a localbox on the domain or not
|
||||
* @param: mail_id
|
||||
* @return: an indexed array of localbox usefull informations
|
||||
*/
|
||||
function details($mail_id){
|
||||
global $db,$err;
|
||||
$err->log("mail_localbox","details");
|
||||
$mail_local = array (
|
||||
"path" => "",
|
||||
"quota" => null,
|
||||
"delivery" => "");
|
||||
|
||||
$db->query("select path, quota, delivery from mailbox where address_id=$mail_id;");
|
||||
if (! $db->next_record()) return false;
|
||||
|
||||
$mail_local["path"]=$db->f("path");
|
||||
$mail_local["quota"]=$db->f("quota");
|
||||
$mail_local["delivery"]=$db->f("delivery");
|
||||
return $mail_local;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
|
@ -0,0 +1,161 @@
|
|||
<?php
|
||||
/*
|
||||
$Id: m_mail_redirection.php author: squidly
|
||||
----------------------------------------------------------------------
|
||||
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, Franck Missoum
|
||||
Purpose of file: Manage Email accounts and aliases.
|
||||
----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* This class handle emails redirections
|
||||
*
|
||||
* Copyleft {@link http://alternc.net/ AlternC Team}
|
||||
*
|
||||
* @copyright AlternC-Team 2002-11-01 http://alternc.net/
|
||||
*
|
||||
*/
|
||||
|
||||
Class m_mail_redirection{
|
||||
|
||||
var $enabled;
|
||||
var $advanced;
|
||||
|
||||
/**
|
||||
* Function used to set the "visibility" of the property: meaning wheter the option is enabled (hence visible) and if it is part of the advanced options.
|
||||
*/
|
||||
function m_mail_redirection(){
|
||||
$this->enabled=variable_get('mail_redirection_enabled',null);
|
||||
if (is_null($this->enabled)) { // if not configuration var, setup one (with a default value)
|
||||
variable_set('mail_redirection_enabled',true,'To enable or disable the alias module in the mail edit page');
|
||||
$this->enabled=true;
|
||||
}
|
||||
|
||||
$this->advanced=variable_get('mail_redirection_advanced',null);
|
||||
if (is_null($this->advanced)) { // if not configuration var, setup one (with a default value)
|
||||
variable_set('mail_redirection_advanced',true,'To place the redirection option in the advanced area');
|
||||
$this->advanced=true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* function listing each redirections associated with a mail on th ecurrent domain
|
||||
* @param integer mail_id
|
||||
* @return ani indexed array of all the recipients of a mail address
|
||||
*/
|
||||
function list_recipients($mail_id) {
|
||||
global $db,$err;
|
||||
$err->log("mail_redirection","list_recipient");
|
||||
$db->query("SELECT r.id, r.recipients from recipient r where address_id = ".intval($mail_id)." order by r.recipients ;");
|
||||
$recipients = Array();
|
||||
while ($db->next_record()) {
|
||||
$recipients[$db->f("id")] = $db->f("recipients");
|
||||
}
|
||||
return $recipients;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fonction used to insert the redirections specified by te panel
|
||||
* @param integer $mail_id
|
||||
* @param array $recipients : an array contening each and every domain specific mail redirection for a given mail.
|
||||
* @return: true if everything went ok, false if one are more recipients could not be added
|
||||
*/
|
||||
function setredirection($mail_id, $recipients){
|
||||
global $db,$err;
|
||||
$err->log("mail_redirection","setredirection");
|
||||
|
||||
$all_correct=true;
|
||||
|
||||
$recipients=array_unique($recipients);
|
||||
foreach($recipients as $k => $v){
|
||||
if(checkmail($recipients[$k]) != 0){
|
||||
unset($recipients[$k]);
|
||||
$all_correct=false;
|
||||
}
|
||||
}
|
||||
|
||||
$recip_clean=array_values($recipients);
|
||||
|
||||
$rec_tmp=implode("\n",$recip_clean);
|
||||
$db->query("INSERT INTO recipient (address_id,recipients) values ($mail_id,'$rec_tmp') ON DUPLICATE KEY UPDATE recipients='$rec_tmp' ;");
|
||||
if($all_correct == false){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Function using list_recipient() to get the list of recipient of a mail and turning it into an array
|
||||
* @param integer $mail_id : mail unique identifier.
|
||||
* @return array
|
||||
*/
|
||||
function recipients_get_array($mail_id) {
|
||||
global $mail,$err;
|
||||
$err->log("mail_redirection","recipient_get_array");
|
||||
$r = $this->list_recipients($mail_id);
|
||||
|
||||
foreach ($r as $b) {$v = explode("\n", $b);} // Only one pass, this array is a 1 row array
|
||||
if (empty($v)) $v=Array();
|
||||
foreach ($v as $k => $f) { if (empty($f)) unset($v[$k]); } // clear empty entry
|
||||
sort($v);
|
||||
|
||||
return $v;
|
||||
}
|
||||
|
||||
function recipients_set_array($mail_id, $recipients){
|
||||
global $db,$err,$mail;
|
||||
}
|
||||
|
||||
|
||||
function form($mail_id) {
|
||||
global $mail, $err, $mail_redirection;
|
||||
include('mail_redirection_edit.inc.php');
|
||||
}
|
||||
|
||||
/*
|
||||
* hooks called to list a given mail properties
|
||||
* @param: the id of the mail in question
|
||||
* @return: an hashtable of every information usefull to edit the mail if it is part of the class
|
||||
* including a url to the edition page of the propertie in question ( here local hosting of a mail)
|
||||
* if the mail cannot be a localbox because of some of it's properties the return is NULL, thus not
|
||||
* displayed in the properties listing page.
|
||||
*/
|
||||
function hooks_mail_properties_list($mail_id){
|
||||
global $db, $mail, $err;
|
||||
$err->log("mail_redirection","mail_properties_list");
|
||||
$return = array (
|
||||
"label" => "redirection",
|
||||
"short_desc" => _("Redirection"),
|
||||
"human_desc" => _("Send a copy of incoming emails to another mail address"),
|
||||
"url" => "mail_redirection_edit.php?mail_id=$mail_id",
|
||||
"form_param" => Array($mail_id),
|
||||
"class" => "mail_redirection",
|
||||
"advanced" => $this->advanced,
|
||||
"pass_required" => false
|
||||
);
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
//FIXME fonction de suppresion.
|
||||
|
||||
}
|
||||
|
||||
?>
|
|
@ -144,7 +144,7 @@ class m_mem {
|
|||
*/
|
||||
function setid($id) {
|
||||
global $db,$err,$cuid;
|
||||
$err->log("mem","setid",$username);
|
||||
$err->log("mem","setid",$id);
|
||||
$db->query("select * from membres where uid='$id';");
|
||||
if ($db->num_rows()==0) {
|
||||
$err->raise("mem",1);
|
||||
|
@ -191,6 +191,7 @@ class m_mem {
|
|||
return false;
|
||||
}
|
||||
|
||||
/* Faut finir de l'implémenter :)
|
||||
function authip_class() {
|
||||
global $cuid;
|
||||
$c = Array();
|
||||
|
@ -200,6 +201,7 @@ class m_mem {
|
|||
|
||||
return $c;
|
||||
}
|
||||
*/
|
||||
|
||||
/* ----------------------------------------------------------------- */
|
||||
/** Vérifie que la session courante est correcte (cookie ok et ip valide).
|
||||
|
@ -213,10 +215,12 @@ class m_mem {
|
|||
*/
|
||||
function checkid() {
|
||||
global $db,$err,$cuid,$restrictip,$authip;
|
||||
if ($_REQUEST["username"] && $_REQUEST["password"]) {
|
||||
return $this->login($_REQUEST["username"],$_REQUEST["password"],$_REQUEST["restrictip"]);
|
||||
}
|
||||
$_COOKIE["session"]=addslashes($_COOKIE["session"]);
|
||||
if (isset($_REQUEST["username"])) {
|
||||
if ($_REQUEST["username"] && $_REQUEST["password"]) {
|
||||
return $this->login($_REQUEST["username"],$_REQUEST["password"],$_REQUEST["restrictip"]);
|
||||
}
|
||||
} // end isset
|
||||
$_COOKIE["session"]=isset($_COOKIE["session"])?addslashes($_COOKIE["session"]):"";
|
||||
if (strlen($_COOKIE["session"])!=32) {
|
||||
$err->raise("mem",3);
|
||||
return false;
|
||||
|
@ -318,7 +322,7 @@ class m_mem {
|
|||
# Invoker le logout dans toutes les autres classes
|
||||
foreach($classes as $c) {
|
||||
if (method_exists($GLOBALS[$c],"alternc_del_session")) {
|
||||
$GLOBALS[$c]->alternc_del_session($dom);
|
||||
$GLOBALS[$c]->alternc_del_session();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -140,6 +140,7 @@ class m_quota {
|
|||
}
|
||||
foreach ($ttmp as $tt) {
|
||||
$g=array("t"=>$tt["total"],"u"=>0);
|
||||
if (! isset( $this->clquota[$tt["name"]] )) continue;
|
||||
if (method_exists($GLOBALS[$this->clquota[$tt["name"]]],"alternc_get_quota")) {
|
||||
$g["u"]=$GLOBALS[$this->clquota[$tt["name"]]]->alternc_get_quota($tt["name"]);
|
||||
}
|
||||
|
@ -156,7 +157,11 @@ class m_quota {
|
|||
}
|
||||
|
||||
if ($ressource) {
|
||||
return $this->quotas[$ressource];
|
||||
if (isset($this->quotas[$ressource]) ) {
|
||||
return $this->quotas[$ressource];
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
return $this->quotas;
|
||||
}
|
||||
|
@ -180,7 +185,6 @@ class m_quota {
|
|||
// Now we check that the value has been written properly :
|
||||
exec("/usr/lib/alternc/quota_get ".$cuid,$a);
|
||||
echo "quota get :::::ciud: $cuid :::: size: $size :::: a?: $a ";
|
||||
print_r($a);
|
||||
if ($size!=$a[1]) {
|
||||
$err->raise("quota",1);
|
||||
return false;
|
||||
|
|
|
@ -95,3 +95,5 @@ class m_trash {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -99,18 +99,23 @@ function variable_get($name, $default = null) {
|
|||
* The value to set. This can be any PHP data type; these functions take care
|
||||
* of serialization as necessary.
|
||||
*/
|
||||
function variable_set($name, $value) {
|
||||
function variable_set($name, $value, $comment=null) {
|
||||
global $conf, $db;
|
||||
|
||||
$conf[$name] = $value;
|
||||
if (is_object($value) || is_array($value)) {
|
||||
$value = serialize($value);
|
||||
}
|
||||
@$db->query("INSERT IGNORE INTO `variable` (name, value) VALUES ('".$name."', '".$value."')");
|
||||
if ($db->affected_rows() < 1) {
|
||||
$db->query("UPDATE `variable` SET value = '".$value."' WHERE name = '".$name."'");
|
||||
|
||||
if ( is_null($comment) ) {
|
||||
$query = "INSERT INTO variable (name, value) values ('".$name."', '".$value."') on duplicate key update name='$name', value='$value';";
|
||||
} else {
|
||||
$comment=mysql_real_escape_string($comment);
|
||||
$query = "INSERT INTO variable (name, value, comment) values ('".$name."', '".$value."', '$comment') on duplicate key update name='$name', value='$value', comment='$comment';";
|
||||
}
|
||||
|
||||
$db->query("$query");
|
||||
|
||||
variable_init_maybe();
|
||||
}
|
||||
|
||||
|
|
|
@ -620,3 +620,20 @@ VALUES (
|
|||
'This variable set if you want to allow all IP address to access FTP by default. If the user start to define some IP or subnet in the allow list, only those he defined will be allowed. This variable can take two value : 0 or 1.'
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Structure de la table `cron`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `cron` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`uid` int(11) NOT NULL,
|
||||
`url` varchar(2100) NOT NULL,
|
||||
`user` varchar(64) NOT NULL,
|
||||
`password` varchar(64) NOT NULL,
|
||||
`schedule` int(11) NOT NULL,
|
||||
`email` varchar(255) NOT NULL,
|
||||
`next_execution` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `uid` (`uid`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
|
|
@ -92,7 +92,7 @@ CREATE TABLE `address` (
|
|||
`expire_date` datetime DEFAULT NULL, -- Expiration date, used for temporary addresses.
|
||||
`update_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- Update date, for technical usage only.
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `address` (`address`)
|
||||
UNIQUE KEY `domain_id` (`domain_id`,`address`)
|
||||
) COMMENT = 'This is the main address table. It represents an address as in RFC2822';
|
||||
|
||||
|
||||
|
@ -145,3 +145,18 @@ CREATE TABLE `mailman` (
|
|||
update sub_domaines set web_action = 'UPDATE';
|
||||
update domaines set dns_action = 'UPDATE';
|
||||
|
||||
--
|
||||
-- Scheduled tasks
|
||||
--
|
||||
CREATE TABLE IF NOT EXISTS `cron` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`uid` int(11) NOT NULL,
|
||||
`url` varchar(2100) NOT NULL,
|
||||
`user` varchar(64) NOT NULL,
|
||||
`password` varchar(64) NOT NULL,
|
||||
`schedule` int(11) NOT NULL,
|
||||
`email` varchar(255) NOT NULL,
|
||||
`next_execution` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `uid` (`uid`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
# ----------------------------------------------------------------------
|
||||
#
|
||||
SETUID=mail_add mail_del quota_edit quota_get mem_add mem_del
|
||||
SCRIPTS=sqlbackup.sh rawstat.daily quota_init quota_delete update_domains.sh slave_dns sendmail spoolsize.php fixperms.sh alternc-dboptimize export_account.php
|
||||
SCRIPTS=sqlbackup.sh rawstat.daily quota_init quota_delete update_domains.sh slave_dns sendmail spoolsize.php fixperms.sh alternc-dboptimize export_account.php cron_users_doit.sh cron_users.sh
|
||||
LIBS=functions.sh functions_hosting.sh functions_dns.sh
|
||||
BIN=$(DESTDIR)/usr/lib/alternc/
|
||||
|
||||
|
|
Loading…
Reference in New Issue