Esempio n. 1
0
function transport_map($domain, $ou, $nodelete = 0)
{
    $ldap = new clladp();
    $mailbox = new MailBoxes();
    $transport = $ldap->GetTransportTable($domain);
    $hash = $mailbox->transport_maps_explode($transport);
    $service = array("smtp" => "smtp", "relay" => "relay", "lmtp" => "lmtp");
    $field_service = Field_array_Hash($service, 'transport_maps_service', $hash[0]);
    $delete = "<a href='#' OnClick=\"javascript:delete_transport('{$domain}','{$ou}');\"><img src='img/x.gif'  onMouseOver=\"javascript:AffBulle('{transport_text_delete}');\" OnMouseOut=\"javascript:HideBulle();\"></a>";
    if ($nodelete == 1) {
        $delete = null;
    }
    $html = "\n\t<p></p>\t\n\t<center>\n\t\t<input type='hidden' id='ERROR_DELETE_TRANSPORT' value='{ERROR_DELETE_TRANSPORT}'>\n\t\t<table style='width:90%'>\n\t\t<tr class='rowT'>\n\t\t\t\n\t\t\t<td  width=99% colspan=2>{no_mailbox_cause_transport}</td>\n\t\t</tr>\t\n\t\t<tr class='rowA'>\n\t\t\t<td nowrap width=1% align='right'>{transport_domain}:</td>\n\t\t\t<td nowrap width=99%>{$domain} {transport_will_translate_to}</td>\n\t\t</tr>\t\t\n\t\t\t\n\t\t<tr class='rowA'>\n\t\t\t<td nowrap width=1% align='right'>{transport_type}:</td>\n\t\t\t<td nowrap width=99%>{$field_service}</td>\n\t\t</tr>\n\t\t\t<td nowrap width=1% align='right'>{transport_ip}:</td>\t\t\t\n\t\t\t<td nowrap width=99%><input type='text' id='transport_maps' value='{$hash[1]}'></td>\n\t\t<tr class='rowB'>\n\t\t\t<td nowrap width=1% align='right'>{transport_port}:</td>\n\t\t\t<td nowrap width=99%><input type='text' id='transport_maps_port' value='{$hash[2]}'></td>\n\t\t</tr>\n\t\t<tr class='rowA'>\n\t\t\t<td nowrap width=1% align='right'><center>{$delete}</center></td>\n\t\t\t<td nowrap width=1% align='right'><input type='button' OnClick=\"javascript:edit_transport('{$domain}','{$ou}');\" value='{submit}&nbsp;&raquo;'></td>\n\t\t\t\n\t\t</tr>\t\t\n\t\t\t\n\t\t</table>";
    $tpl = new templates();
    return $tpl->_parse_body($html);
}