function popup_domains(){ $ldap=new clladp(); $page=CurrentPageName(); $domain=$ldap->hash_get_all_domains(); $domain[null]='{all}'; $time=time(); if(isset($_GET["popup-domain-white"])){$selected_type="white";}else{$selected_type="black";} $array["white"]='{white list}'; $array["black"]='{black list}'; $array[null]='{all}'; $field=Field_array_Hash($domain,'selected_domain',null,"SelectDomain()",null,0,"font-size:13px;padding:3px"); $tpl=new templates(); $whitelist_explain=$tpl->_ENGINE_parse_body("{whitelist_explain}"); $old_wbl="<td valign='top'> <table style='width:100%' class=table_form ". element_rollover("Loadjs('$page?wblopt=yes')")."> <tr> <td width=1% valign='top'>" . imgtootltip('32-settings-black.png',"{options}","Loadjs('$page?wblopt=yes')")."</td> <td valign='top'> <div style='font-size:13px;font-weight:bold'>{autolearning}</div> <p class=caption>{autolearning_text}</p> </td> </tr> </table> </td>"; $html=" <input type='hidden' id='selected_form' name='selected_form' value='$selected_type'> <input type='hidden' id='selected_form_$time' name='selected_form' value='$selected_type'> <div class=explain>$whitelist_explain</div> <div style='width:100%;text-align:right'> <table> <tr> <td class=legend style='font-size:13px'>{domains}:</td> <td>$field</td> </tr> </table> </div> <div id='wblarea_$time' style='width:100%;height:250px;overflow:auto'></div> <script> function SelectDomain(){ var selected_domain=document.getElementById('selected_domain').value; var selected_form=document.getElementById('selected_form_$time').value; LoadAjax('wblarea_$time','$page?SelectedDomain='+selected_domain+'&type=$selected_type&time=$time'); } var x_Addwl=function(obj){ var tempvalue=obj.responseText; if(tempvalue.length>0){alert(tempvalue);} LoadAjax('wblarea_$time','whitelists.admin.php?SelectedDomain='+mem_domain+'&type=$selected_type'); } function Addblwform(){ var XHR = new XHRConnection(); mem_domain=document.getElementById('selected_domain').value; XHR.appendData('RcptDomain',document.getElementById('selected_domain').value); XHR.appendData('whitelist',document.getElementById('wlfrom').value); XHR.appendData('recipient',document.getElementById('wlto').value); XHR.appendData('wbl',0); document.getElementById('wblarea_$time').innerHTML='<center style=\"width:100%\"><img src=img/wait_verybig.gif></center>'; XHR.sendAndLoad('$page', 'GET',x_Addwl); } function Addblwform_black(){ var XHR = new XHRConnection(); mem_domain=document.getElementById('selected_domain').value; XHR.appendData('RcptDomain',document.getElementById('selected_domain_black').value); XHR.appendData('whitelist',document.getElementById('wlfrom_black').value); XHR.appendData('recipient',document.getElementById('wlto_black').value); XHR.appendData('wbl',1); document.getElementById('wblarea_$time').innerHTML='<center style=\"width:100%\"><img src=img/wait_verybig.gif></center>'; XHR.sendAndLoad('$page', 'GET',x_Addwl); } function DeleteWhiteList(to,from){ var XHR = new XHRConnection(); wbl=0; mem_domain=document.getElementById('selected_domain').value; XHR.appendData('RcptDomain',document.getElementById('selected_domain').value); XHR.appendData('del_whitelist',from); XHR.appendData('recipient',to); XHR.appendData('wbl','0'); document.getElementById('wblarea_$time').innerHTML='<center style=\"width:100%\"><img src=img/wait_verybig.gif></center>'; XHR.sendAndLoad('$page', 'GET',x_Addwl); } function DeleteBlackList(to,from){ var XHR = new XHRConnection(); XHR.appendData('RcptDomain',document.getElementById('selected_domain').value); XHR.appendData('del_whitelist',from); wbl=1; XHR.appendData('recipient',to); XHR.appendData('wbl','1'); document.getElementById('wblarea_$time').innerHTML='<center style=\"width:100%\"><img src=img/wait_verybig.gif></center>'; XHR.sendAndLoad('$page', 'GET',x_Addwl); } function AddblwformCheck2(ztype,e){ if(checkEnter(e)){ Addblwform_black(ztype); } } SelectDomain(); </script> "; echo $tpl->_ENGINE_parse_body($html); }
function button_security(){ $img="48-bouclier.png"; $js="javascript:switchDiv('section_security');"; $element=element_rollover($js); $html=" <table style='width:200px;margin-top:4px;' $element> <tr> <td width=1% valign='top'>" . imgtootltip($img,'{security}',"$js",'section_security_text')."</td> <td><strong style='font-size:12px'>{security}</strong><br><a href=\"$js;\">{section_security_text}</a></td> </tr> </table>"; return $html; }
function popup() { $ldap = new clladp(); $page = CurrentPageName(); $domain = $ldap->hash_get_all_domains(); $domain[null] = '{all}'; $array["white"] = '{white list}'; $array["black"] = '{black list}'; $array[null] = '{all}'; $field = Field_array_Hash($domain, 'selected_domain', null, "SelectDomain()", null, 0, "font-size:13px;padding:3px"); $field2 = Field_array_Hash($array, 'selected_form', null, "SelectDomain()", null, 0, "font-size:13px;padding:3px"); $tpl = new templates(); $whitelist_explain = $tpl->_ENGINE_parse_body("{whitelist_explain}"); $whitelist_explain = "<p style='font-size:13px'>{$whitelist_explain}</p>"; $old_wbl = "<td valign='top'>\n\t\t\t<table style='width:100%' class=table_form " . element_rollover("Loadjs('{$page}?wblopt=yes')") . ">\n\t\t\t\t<tr>\n\t\t\t\t\t<td width=1% valign='top'>" . imgtootltip('32-settings-black.png', "{options}", "Loadjs('{$page}?wblopt=yes')") . "</td>\n\t\t\t\t\t<td valign='top'>\n\t\t\t\t\t\t<div style='font-size:13px;font-weight:bold'>{autolearning}</div>\n\t\t\t\t\t\t<p class=caption>{autolearning_text}</p>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</td>"; $html = "\n\t\n\t<table style='width:100%'>\n\t\n\t<tr>\t\n\t<td valign='top'>\n\t<table style='widh:100%'>\n\t<tr>\n\t\t\n\t\t<td valign='top'>\n\t\t\t<div style=''>{$whitelist_explain}</div>\n\t\t</td>\n\t</tr>\n\t</table>\n\t</td>\n\t<td valign='top'>\n\t\t<table style='width:100%;margin-right:0px' class=table_form>\n\t\t<td class=legend>{domain}:</td>\n\t\t<td>{$field}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td class=legend>{type}:</td>\n\t\t<td>{$field2}</td>\t\n\t\t</tr>\n\t\t</table>\n\t</td>\t\n\t</tr>\n\t</table><div id='wblarea' style='width:100%;height:250px;overflow:auto'></div>"; echo $tpl->_ENGINE_parse_body($html); }