Browse the code
| Differences between 131 and 132 on /. | |||||||
|---|---|---|---|---|---|---|---|
| Number of edited files: | 6 (0 added, 0 deleted and 6 modified) | ||||||
| Author: | zenjo | ||||||
| Log message: | Affichage du transport et correction affichage des MX d'un domaine | ||||||
| Date: | 2009-12-30 12:49:34 | ||||||
|
|||||||
| Old | New | Code |
|---|---|---|
| 3 | 3 |
<entry |
| 4 | 4 |
kind="dir" |
| 5 | 5 |
path="." |
| 6 |
revision="130"> | |
| 6 |
revision="131"> | |
| 7 | 7 |
<url>http://svn.codingteam.net/code/bechamail</url> |
| 8 | 8 |
<repository> |
| 9 | 9 |
<root>http://svn.codingteam.net/code/bechamail</root> |
| 13 | 13 |
<schedule>normal</schedule> |
| 14 | 14 |
</wc-info> |
| 15 | 15 |
<commit |
| 16 |
revision="130"> | |
| 16 |
revision="131"> | |
| 17 | 17 |
<author>zenjo</author> |
| 18 |
<date>2009-12-26T12:46:52.122968Z</date> | |
| 18 |
<date>2009-12-30T11:40:56.218484Z</date>
| |
| 19 | 19 |
</commit> |
| 20 | 20 |
</entry> |
| 21 | 21 |
</info> |
| 22 | 22 |
| Old | New | Code |
|---|---|---|
| 143 | 143 | |
| 144 | 144 |
} // function insere_menu ($type) |
| 145 | 145 | |
| 146 |
//Transport et mx du domaine courant | |
| 147 |
$transport_mx = ""; | |
| 148 |
if ($_SESSION["S_niveau"] == 1) {
| |
| 149 |
$transport_mx .= " [Transport: ".retourne_transport($_SESSION['S_domaines_courant']); | |
| 150 |
$transport_mx .= " - MX: ".retourne_mx($_SESSION['S_domaines_courant'])."]"; | |
| 151 |
} | |
| 146 | 152 | |
| 147 | 153 |
/* Autres template var de tete.html */ |
| 148 | 154 |
// formulaire déconnexion |
| 149 | 155 |
$template_tete->replace_var("t_script_name", $conf_script_name);
|
| 150 | 156 | |
| 151 | 157 |
$template_tete->replace_var("t_f_domaine", $_SESSION['S_domaines_courant']);
|
| 158 |
$template_tete->replace_var("t_f_transport_mx", $transport_mx);
| |
| 152 | 159 |
// Prob d'unification gestion du domaine courant |
| 153 | 160 |
// (get > mailbox, alias | session > statistiques) |
| 154 | 161 |
// $template_tete->replace_var("t_f_domaine", $domaine_select);
|
| 155 | 162 |
| Old | New | Code |
|---|---|---|
| 9 | 9 |
<!-- overLib Section end --> |
| 10 | 10 | |
| 11 | 11 |
<div class="nonante"> |
| 12 |
<h2>Bechamail <span class="note">[<a href="~!t_conf_url_site~">~!t_conf_nom_site~</a> ~!t_titre_demo~]<br>Domaine courant: ~!t_f_domaine~ | Administrateur système: <a href="mailto:~!t_conf_email_mailmaster~?subject=[From ~!t_conf_nom_site~]">~!t_conf_email_mailmaster~</a></span></h2> | |
| 12 |
<h2>Bechamail <span class="note">[<a href="~!t_conf_url_site~">~!t_conf_nom_site~</a> ~!t_titre_demo~]<br>Domaine courant: ~!t_f_domaine~~!t_f_transport_mx~ | Administrateur système: <a href="mailto:~!t_conf_email_mailmaster~?subject=[From ~!t_conf_nom_site~]">~!t_conf_email_mailmaster~</a></span></h2>
| |
| 13 | 13 | |
| 14 | 14 |
|
| 15 | 15 |
<form action="~!t_script_name~" enctype="multipart/form-data" method="POST" name="f_delog"> |
| 16 | 16 |
| Old | New | Code |
|---|---|---|
| 314 | 314 | |
| 315 | 315 |
// Domaines |
| 316 | 316 |
$template_tete->replace_var("t_f_domaine", $domaine_select);
|
| 317 |
if ($_SESSION["S_niveau"] == 1) | |
| 318 |
{$template->replace_var("t_f_domaine", $domaine_select." [MX: ".retourne_mx($domaine_select)."]");}
| |
| 319 |
else {$template->replace_var("t_f_domaine", $domaine_select);}
| |
| 317 |
$template->replace_var("t_f_domaine", $domaine_select);
| |
| 320 | 318 |
$template->replace_var("t_nb_domaines", $_SESSION["S_nb_domaines"]);
|
| 321 | 319 |
$template->replace_loop_vars("loop_f_domaine", $domaine_formulaire);
|
| 322 | 320 | |
| 323 | 321 |
| Old | New | Code |
|---|---|---|
| 316 | 316 |
// Domaines |
| 317 | 317 |
$template_tete->replace_var("t_f_domaine", $domaine_select);
|
| 318 | 318 |
|
| 319 |
if ($_SESSION["S_niveau"] == 1) | |
| 320 |
{$template->replace_var("t_f_domaine", $domaine_select." [MX: ".retourne_mx($domaine_select)."]");}
| |
| 321 |
else {$template->replace_var("t_f_domaine", $domaine_select);}
| |
| 319 |
$template->replace_var("t_f_domaine", $domaine_select);
| |
| 322 | 320 |
$template->replace_var("t_nb_domaines", $_SESSION["S_nb_domaines"]);
|
| 323 | 321 |
$template->replace_loop_vars("loop_f_domaine", $domaine_formulaire);
|
| 324 | 322 | |
| 325 | 323 |
| Old | New | Code |
|---|---|---|
| 276 | 276 | |
| 277 | 277 |
// Retourne les MX d'un domaine. |
| 278 | 278 |
function retourne_mx ($hostname) {
|
| 279 |
GLOBAL $conf_demo; | |
| 280 |
if ($conf_demo) {return "Fonction désactivée dans la démo";}
| |
| 279 | 281 |
$mxhosts=array();$weight=array();$chainemx=""; |
| 280 | 282 |
if (getmxrr($hostname, $mxhosts, $weight)) {
|
| 281 | 283 |
foreach($mxhosts as $wkey => $mxval) {
|
| 288 | 290 | |
| 289 | 291 |
} |
| 290 | 292 | |
| 293 |
// Retourne le transport d'un domaine. | |
| 294 |
function retourne_transport ($domaine) {
| |
| 295 |
GLOBAL $conf_demo, $hm_, $um_, $pm_, $nm_, $conf_champ_transport, $conf_table_transport, $conf_champ_domaine; | |
| 296 |
if ($conf_demo) {return "Fonction désactivée dans la démo";}
| |
| 297 |
$transport_dom_dourant = new ReqSql($hm_, $um_, $pm_, $nm_); | |
| 298 |
$sel = $conf_champ_transport; | |
| 299 |
$from = $conf_table_transport; | |
| 300 |
$whe = $conf_champ_domaine." like '".$domaine."'"; | |
| 301 |
//echo "SELECT ".$sel." FROM ".$from." WHERE ". $whe; | |
| 302 |
$transport_dom_dourant->RS_select($sel, $from, $whe); | |
| 303 |
mysql_free_result($transport_dom_dourant->RS_res); | |
| 304 |
return $transport_dom_dourant->RS_ligne[0][0]; | |
| 305 |
} | |
| 306 | ||
| 307 | ||
| 291 | 308 |
// for the fun ;-) |
| 292 | 309 |
function exclamation() {
|
| 293 | 310 |
GLOBAL $conf_exclamation_erreur; |
| 294 | 311 |

Bechamail