本文整理汇总了PHP中clladp::UserDatas方法的典型用法代码示例。如果您正苦于以下问题:PHP clladp::UserDatas方法的具体用法?PHP clladp::UserDatas怎么用?PHP clladp::UserDatas使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类clladp
的用法示例。
在下文中一共展示了clladp::UserDatas方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: WhiteListSender
function WhiteListSender()
{
$sql = "SELECT mail_from,mail_to from messages WHERE zMD5=\"{$_GET["id"]}\"";
$result = QUERY_SQL($sql);
$ligne = @sqlite3_fetch_array(QUERY_SQL($sql));
$mail_from = $ligne["mail_from"];
if ($mail_from == null) {
SinglePage(ParseLogs("ERROR\n"));
exit;
}
$ldap = new clladp();
$upd["KasperkyASDatasAllow"] = $mail_from;
$uid = $ldap->uid_from_email($ligne["mail_to"]);
if ($uid == null) {
SinglePage(ParseLogs("ERROR\n"));
exit;
}
$hash = $ldap->UserDatas($uid);
$dn = $hash["dn"];
if (!$ldap->Ldap_add_mod($dn, $upd)) {
$error = $ldap->ldap_last_error . "\n";
}
$sock = new sockets();
$error = $error . $sock->getfile('releaseallmailfrommd5:' . $_GET["id"]);
SinglePage(ParseLogs($error));
}
示例2: search_user
function search_user()
{
header("Pragma: no-cache");
header("Expires: 0");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-cache, must-revalidate");
$stringtofind = $_GET["search_user"];
$tpl = new templates();
$usermenu = new usersMenus();
$ldap = new clladp();
if ($usermenu->AsAnAdministratorGeneric == true) {
$hash_full = $ldap->UserSearch(null, $stringtofind);
} else {
$us = $ldap->UserDatas($_SESSION["uid"]);
$hash_full = $ldap->UserSearch($us["ou"], $stringtofind);
}
$html = "<table style='width:100%'>";
for ($i = 0; $i < $hash_full[0]["count"]; $i++) {
$displayname = $hash_full[0][$i]["displayname"][0];
$mail = $hash_full[0][$i]["mail"][0];
if (strlen($mail) > 27) {
$mail = substr($mail, 0, 24) . '...';
}
$uid = $hash_full[0][$i]["uid"][0];
$js = "RestoreMbxSelectedUser('{$uid}');";
$html = $html . "<tr " . CellRollOver($js) . ">\n\t\t\t<td width=1%><img src='img/fw_bold.gif'></td>\n\t\t\t<td><code nowrap>{$displayname}</code></td>\n\t\t\t<td><code>{$mail}</code></td>\n\t\t</tr>\n\t\t\t\n\t\t";
}
$html = $html . "</table>";
echo $html;
}
示例3: INDEX
function INDEX()
{
$ldap = new clladp();
$hash = $ldap->UserDatas($_SESSION["uid"]);
$mail = $hash["mail"];
$Graph = InsertChart('js/charts.swf', "js/charts_library", "listener.graphs.php?weekMessagesPerDay={$mail}", 250, 250, "FFFFFF", true, $usermenus->ChartLicence);
$html = $Graph;
$JS["JS"][] = "js/user.quarantine.js";
$tpl = new template_users('{messages_performance}', $html, 0, 0, 0, 0, $JS);
echo $tpl->web_page;
}
示例4: UserEmptyQuarantine
function UserEmptyQuarantine()
{
$ldap = new clladp();
include_once 'ressources/class.mysql.inc';
$hash = $ldap->UserDatas($_SESSION["uid"]);
$mail = $hash["mail"];
$sql = "UPDATE `messages` SET `Deleted` = '1' WHERE mail_to LIKE '%{$mail}%' AND `filter_action`='quarantine' AND Deleted='0'";
QUERY_SQL($sql);
include_once 'ressources/class.sockets.inc';
$sock = new sockets();
$sock->getfile('quarantine_delete_all:' . $_SESSION["uid"]);
}
示例5: checkprivs
function checkprivs()
{
$_POST["userid"] = trim($_POST["userid"]);
include "ressources/settings.inc";
$socks = new sockets();
if (strtolower($_POST["userid"]) == strtolower($_GLOBAL["ldap_admin"])) {
if ($_POST["password"] != $_GLOBAL["ldap_password"]) {
die("bad password");
}
$dans = new dansguardian_rules(null, 1);
$dans->Add_exceptionsitelist(1, $_POST["uri"]);
AddEvents("Manager", $_POST["uri"]);
$sock = new sockets();
$sock->getFrameWork("reload-dansguardian");
die("SUCCESS");
}
$ldap = new clladp();
writelogs('This is not Global admin, so test user...', __FUNCTION__, __FILE__);
$hash = $ldap->UserDatas($_POST["userid"]);
$userPassword = $hash["userPassword"];
if (trim($hash["uid"]) == null) {
writelogs('Unable to get user infos abort', __FUNCTION__, __FILE__);
die("Unknown user");
}
if (trim($_POST["password"]) == trim($userPassword)) {
$users = new usersMenus($ldap->_Get_privileges_userid($_POST["userid"]));
$priv_array = $users->_ParsePrivieleges($ldap->_Get_privileges_userid($_POST["userid"]));
$users->_TranslateRights($priv_array);
if ($users->AllowDansGuardianBanned) {
$dans = new dansguardian_rules(null, 1);
$dans->Add_exceptionsitelist(1, $_POST["uri"]);
$sock = new sockets();
AddEvents($_POST["userid"], $_POST["uri"]);
$sock->getFrameWork("cmd.php?reload-dansguardian");
die("SUCCESS");
}
} else {
die("BAD PASSWORD");
}
die("No privileges");
}
示例6: aliase_delete
function aliase_delete()
{
$ldap = new clladp();
$hash = $ldap->UserDatas($_SESSION["uid"]);
$updatearray["mailAlias"] = $_GET["delete-alias-delete"];
if (!$ldap->Ldap_del_mod($hash["dn"], $updatearray)) {
echo $ldap->ldap_last_error;
}
}
示例7: Save_Fetchmail
function Save_Fetchmail(){
$add=true;
$mny=new usersMenus();
if($mny->AllowFetchMails==false){return null;}
if(isset($_GET["array_num"])){
$array_num=$_GET["array_num"];
unset($_GET["array_num"]);
$add=false;
}
if($_GET["pool"]==null){return null;}
while (list ($num, $ligne) = each ($_GET) ){
$line=$line."[$num]=\"$ligne\"\n";
}
$ldap=new clladp();
$hash=$ldap->UserDatas($_SESSION["uid"]);
if($add==true){
$update_array["FetchMailsRules"][]=$line;
$ldap->Ldap_add_mod($hash["dn"],$update_array);
}else{
$update_array["FetchMailsRules"]=$hash["FetchMailsRulesSources"];
$update_array["FetchMailsRules"][$array_num]=$line;
$ldap->Ldap_modify($hash["dn"],$update_array);
}
if($ldap->ldap_last_error<>null){echo $ldap->ldap_last_error;}else{echo "ok";}
}
示例8: finduser
function finduser()
{
header("Pragma: no-cache");
header("Expires: 0");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-cache, must-revalidate");
$stringtofind = $_GET["finduser"];
writelogs("Want to search {$stringtofind}", __FUNCTION__, __FILE__);
$tpl = new templates();
$usermenu = new usersMenus();
$ldap = new clladp();
if ($usermenu->AsAnAdministratorGeneric == true) {
writelogs("It is an administrator search in the entire tree", __FUNCTION__, __FILE__);
$hash_full = $ldap->UserSearch(null, $stringtofind);
} else {
$us = $ldap->UserDatas($_SESSION["uid"]);
writelogs("It is an user search in the {$us["ou"]} tree", __FUNCTION__, __FILE__);
$hash_full = $ldap->UserSearch($us["ou"], $stringtofind);
}
$hash1 = $hash_full[0];
$hash2 = $hash_full[1];
writelogs("Search results " . count($hash1) . " users and " . count($hash2) . " contacts", __FUNCTION__, __FILE__);
$count = 0;
if (is_array($hash1)) {
while (list($num, $ligne) = each($hash1)) {
if ($ligne["uid"][0] == null && $ligne["employeenumber"][0] == null) {
continue;
}
$hash[$count]["displayname"][0] = $ligne["displayname"][0];
$hash[$count]["givenname"][0] = $ligne["givenname"][0];
$hash[$count]["uid"][0] = $ligne["uid"][0];
$hash[$count]["employeenumber"][0] = $ligne["employeenumber"][0];
$hash[$count]["title"][0] = $ligne["title"][0];
$hash[$count]["uri"][0] = $ligne["uri"][0];
$hash[$count]["mail"][0] = $ligne["mail"][0];
$hash[$count]["phone"][0] = $ligne["telephonenumber"][0];
$hash[$count]["sn"][0] = $ligne["sn"][0];
$count = $count + 1;
}
}
if (is_array($hash2)) {
while (list($num, $ligne) = each($hash2)) {
if ($ligne["uid"][0] == null && $ligne["employeenumber"][0] == null) {
continue;
}
$hash[$count]["displayname"][0] = $ligne["displayname"][0];
$hash[$count]["givenname"][0] = $ligne["givenname"][0];
$hash[$count]["uid"][0] = $ligne["uid"][0];
$hash[$count]["employeenumber"][0] = $ligne["employeenumber"][0];
$hash[$count]["title"][0] = $ligne["title"][0];
$hash[$count]["uri"][0] = $ligne["uri"][0];
$hash[$count]["mail"][0] = $ligne["mail"][0];
$hash[$count]["phone"][0] = $ligne["telephonenumber"][0];
$hash[$count]["sn"][0] = $ligne["sn"][0];
$count = $count + 1;
}
}
$count = count($hash);
writelogs("Search results {$count} items", __FUNCTION__, __FILE__);
if (is_array($hash)) {
while (list($num, $ligne) = each($hash)) {
if ($ligne["uid"][0] == null && $ligne["employeenumber"][0] == null) {
continue;
}
if ($ligne["uid"][0] == "squidinternalauth") {
$count = $count - 1;
continue;
}
$edit_config_user = MEMBER_JS($ligne["uid"][0], 1);
if ($usermenu->AllowAddUsers == true) {
$uri = $edit_config_user;
} else {
$uri = null;
}
if ($usermenu->AsOrgAdmin == true) {
$uri = $edit_config_user;
} else {
$uri = null;
}
if ($usermenu->AsArticaAdministrator == true) {
$uri = $edit_config_user;
} else {
$uri = null;
}
$displayname = $ligne["displayname"][0];
$givenname = $ligne["givenname"][0];
$mail = $ligne["mail"][0];
if ($displayname == null) {
$displayname = $ligne["uid"][0];
}
if ($givenname == null) {
$givenname = '{unknown}';
}
if ($mail == null) {
$mail = '{unknown}';
}
if ($ligne["employeenumber"][0] != null) {
$user = new contacts($_SESSION["uid"], $ligne["employeenumber"][0]);
$array["title"] = $user->displayName;
$uri = "javascript:Loadjs('contact.php?employeeNumber={$ligne["employeenumber"][0]}')";
//.........这里部分代码省略.........
示例9: DeleteMailsFrom
function DeleteMailsFrom()
{
$ldap = new clladp();
$sender = $_GET["DeleteMailsFrom"];
$hash = $ldap->UserDatas($_SESSION["uid"]);
$mail = $hash["mail"];
$sql = "SELECT file_path FROM `quarantine` WHERE `mailto`='{$mail}' AND `mailfrom`='{$sender}'";
$resultats = QUERY_SQL($sql);
while ($ligne = mysql_fetch_array($resultats, MYSQL_ASSOC)) {
$lines = $lines . $ligne["file_path"] . "\n";
}
$tempfile = dirname(__FILE__) . "/ressources/conf/" . md5($mail);
$fp = fopen($tempfile, "w", 0);
fputs($fp, $lines);
fclose($fp);
$sock = new sockets();
$res = trim($sock->getfile("QuarantineDeletePattern:{$tempfile}"));
if ($res == "OK") {
$sql = "DELETE FROM `quarantine` WHERE `mailto`='{$mail}' AND `mailfrom`='{$sender}'";
QUERY_SQL($sql);
echo "OK";
}
}
示例10: DeleteMember
function DeleteMember()
{
$usermenu = new usersMenus();
$tpl = new templates();
if ($usermenu->AllowAddUsers == false) {
echo $tpl->_ENGINE_parse_body('{no_privileges}');
exit;
}
$ldap = new clladp();
$Userdatas = $ldap->UserDatas($_GET["DeleteMember"]);
$dn = $Userdatas["dn"];
$ldap->ldap_delete($dn, false);
if ($ldap->ldap_last_error != null) {
echo $ldap->ldap_last_error;
exit;
}
}
示例11: page
function page($usersmenus){
if(GET_CACHED(__FILE__,__FUNCTION__,__FUNCTION__)){return null;}
$ldap=new clladp();
$page=CurrentPageName();
error_log(basename(__FILE__)." ".__FUNCTION__.'() line '. __LINE__);
$hash=$ldap->UserDatas($_SESSION["uid"]);
error_log(basename(__FILE__)." ".__FUNCTION__.'() line '. __LINE__);
if($hash["displayName"]==null){$hash["displayName"]="{Administrator}";}
$sock=new sockets();
$ou=$hash["ou"];
$users=new usersMenus();
error_log(basename(__FILE__)." ".__FUNCTION__.'() line '. __LINE__);
if($users->KASPERSKY_SMTP_APPLIANCE){
if($sock->GET_INFO("KasperskyMailApplianceWizardFinish")<>1){
$wizard_kaspersky_mail_appliance="Loadjs('wizard.kaspersky.appliance.php');";
}
}
if($users->KASPERSKY_WEB_APPLIANCE){
$GLOBALS["CHANGE_TEMPLATE"]="squid.kav.html";
$GLOBALS["JQUERY_UI"]="kavweb";
}
$html="
<script language=\"JavaScript\">
var timerID = null;
var timerID1 = null;
var tant=0;
var fire=0;
var loop=0;
var loop2=0;
var reste=0;
var mem_ossys=0;
function Loop(){
loop = loop+1;
loop2 = loop2+1;
if(loop2>10){
if(!IfWindowsOpen()){if(RunJgrowlCheck()){Loadjs('jGrowl.php');}}
loop2=0;
}
fire=10-fire;
if(loop<25){
setTimeout(\"Loop()\",5000);
}else{
loop=0;
Loop();
}
}
function RunJgrowlCheck(){
if(!document.getElementById('navigation')){return false;}
if($('#jGrowl').size()==0){return true;}
if($('#jGrowl').size()==1){return true;}
return false;
}
function sysevents_query(){
if(document.getElementById('q_daemons')){
var q_daemons=document.getElementById('q_daemons').value;
var q_lines=document.getElementById('q_lines').value;
var q_search=document.getElementById('q_search').value;
LoadAjax('events','$page?main=logs&q_daemons='+ q_daemons +'&q_lines=' + q_lines + '&q_search='+q_search+'&hostname={$_GET["hostname"]}');
}
}
function LoadCadencee(){
Loadjs('jGrowl.php');
setTimeout(\"Loop()\",2000);
}
var x_{$idmd}ChargeLogs= function (obj) {
var tempvalue=obj.responseText;
document.getElementById('progression_js_left').innerHTML=tempvalue;
}
function LoadMemDump(){
YahooWin(500,'$page?mem-dump=yes');
}
function CheckDaemon(){
var XHR = new XHRConnection();
XHR.appendData('CheckDaemon','yes');
XHR.sendAndLoad('$page', 'GET');
}
</script>
//.........这里部分代码省略.........
示例12: ViewScript
function ViewScript()
{
$uid = $_SESSION["uid"];
$ldap = new clladp();
$u = $ldap->UserDatas($uid);
$script = $u["FetchMailsRulesSources"][$_GET["ViewScript"]];
$tbl = explode("\n", $script);
while (list($num, $ligne) = each($tbl)) {
if ($ligne != null) {
$arr[] = $ligne;
}
}
$script = implode("\n", $tbl);
$script = htmlspecialchars($script);
$script = "<table style='width:100%'><tr><td valign='top' width=1%>" . imgtootltip('42-redo-left.png', '{back}', "LoadAjax('{$_GET["id"]}','{$page}?ViewRule={$_GET["ViewScript"]}&id={$_GET["id"]}');") . "</td><td valign='top'><code>{$script}</code></td></tr></table>";
$script = nl2br($script);
$script = str_replace("\t", " ", $script);
echo $script;
}
示例13: page
function page($usersmenus)
{
$left_menus = null;
if (isset($_GET["admin-ajax"])) {
echo "<script>LoadAjax('middle','quicklinks.php');</script>";
return;
} else {
if (GET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__)) {
return null;
}
}
$ldap = new clladp();
$page = CurrentPageName();
error_log(basename(__FILE__) . " " . __FUNCTION__ . "() [{$_SESSION["uid"]}] line " . __LINE__);
$hash = $ldap->UserDatas($_SESSION["uid"]);
error_log(basename(__FILE__) . " " . __FUNCTION__ . "() [{$_SESSION["uid"]}] line " . __LINE__);
if ($hash["displayName"] == null) {
$hash["displayName"] = "{Administrator}";
}
$sock = new sockets();
$ou = $hash["ou"];
$users = new usersMenus();
error_log(basename(__FILE__) . " " . __FUNCTION__ . "() [{$_SESSION["uid"]}] line " . __LINE__);
if (isset($_COOKIE["artica-template"])) {
if (is_file("ressources/templates/{$_COOKIE["artica-template"]}/JQUERY_UI")) {
$GLOBALS["JQUERY_UI"] = trim(@file_get_contents("ressources/templates/{$_COOKIE["artica-template"]}/JQUERY_UI"));
}
}
if ($users->KASPERSKY_SMTP_APPLIANCE) {
if ($sock->GET_INFO("KasperskyMailApplianceWizardFinish") != 1) {
$wizard_kaspersky_mail_appliance = "Loadjs('wizard.kaspersky.appliance.php',true);";
}
}
if ($users->KASPERSKY_WEB_APPLIANCE) {
//$GLOBALS["CHANGE_TEMPLATE"]="squid.kav.html";
//$GLOBALS["JQUERY_UI"]="kavweb";
}
if (isset($_GET["admin-ajax"])) {
$left_menus = "LoadAjax('TEMPLATE_LEFT_MENUS','/admin.tabs.php?left-menus=yes',true);";
}
$html = "\n<script>\n\tLoadAjax('middle','quicklinks.php');\n\tChangeHTMLTitle();\n</script>\n\n\n";
$tpl = new template_users($title, $html, $_SESSION, 0, 0, 0, $cfg);
error_log(basename(__FILE__) . " " . __FUNCTION__ . "() [{$_SESSION["uid"]}] line " . __LINE__);
$html = $tpl->web_page;
SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $html);
echo $html;
return;
}
示例14: finduser_list
function finduser_list()
{
$keycached = "{$_GET["finduser"]}";
header("Pragma: no-cache");
header("Expires: 0");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-cache, must-revalidate");
$GLOBALS["OUTPUT_DEBUG"] = false;
$stringtofind = trim($_GET["finduser"]);
if ($_POST["query"] != null) {
$stringtofind = $_POST["query"];
}
if (!isset($_POST["rp"])) {
$_POST["rp"] = 15;
}
$users = new usersMenus();
$sock = new sockets();
$EnableManageUsersTroughActiveDirectory = $sock->GET_INFO("EnableManageUsersTroughActiveDirectory");
if (!is_numeric($EnableManageUsersTroughActiveDirectory)) {
$EnableManageUsersTroughActiveDirectory = 0;
}
if (preg_match("#debug:(.+)#", $stringtofind, $re)) {
$GLOBALS["OUTPUT_DEBUG"] = true;
$stringtofind = trim($re[1]);
}
if ($GLOBALS["OUTPUT_DEBUG"]) {
echo "Want to search {$stringtofind}<br>";
}
$tpl = new templates();
$usermenu = new usersMenus();
$ldap = new clladp();
if (!$ldap->IsKerbAuth()) {
if ($usermenu->AsAnAdministratorGeneric == true) {
if ($GLOBALS["OUTPUT_DEBUG"]) {
echo "It is an administrator search in the entire tree<br>";
}
$hash_full = $ldap->UserSearch(null, $stringtofind, $_POST["rp"]);
} else {
$us = $ldap->UserDatas($_SESSION["uid"]);
if ($GLOBALS["OUTPUT_DEBUG"]) {
echo "It is an user search in the {$us["ou"]} tree<br>";
}
$hash_full = $ldap->UserSearch($us["ou"], $stringtofind, $_POST["rp"]);
}
$hash1 = $hash_full[0];
$hash2 = $hash_full[1];
if ($GLOBALS["OUTPUT_DEBUG"]) {
echo "Search results " . count($hash1) . " users and " . count($hash2) . " contacts<br>";
}
} else {
include_once dirname(__FILE__) . "/ressources/class.external.ad.inc";
$ad = new external_ad_search();
$hash_full = $ad->UserSearch(null, $stringtofind, $_POST["rp"]);
$hash1 = $hash_full[0];
$hash2 = $hash_full[1];
if ($GLOBALS["OUTPUT_DEBUG"]) {
echo "Search results " . count($hash1) . " users and " . count($hash2) . " contacts<br>";
}
}
$hash = array();
$count = 0;
$data = array();
$data['page'] = 1;
$data['total'] = 0;
$data['rows'] = array();
if (is_array($hash1)) {
if ($GLOBALS["OUTPUT_DEBUG"]) {
echo "<strong>Search results ->HASH1</strong><br>\n";
}
while (list($num, $ligne) = each($hash1)) {
if (isset($ligne["samaccountname"][0])) {
$ligne["uid"][0] = $ligne["samaccountname"][0];
}
if ($ligne["uid"][0] == null) {
if (preg_match("#^CN=(.+?),#i", $ligne["dn"], $re)) {
$ligne["uid"][0] = $re[1];
$hash[$count]["displayname"][0] = $re[1];
}
}
if ($EnableManageUsersTroughActiveDirectory == 0) {
if ($ligne["uid"][0] == null && $ligne["employeenumber"][0] == null) {
continue;
}
}
if (strpos($ligne["dn"], "dc=pureftpd,dc=organizations") > 0) {
continue;
}
$hash[$count]["displayname"][0] = trim($ligne["displayname"][0]);
$hash[$count]["givenname"][0] = $ligne["givenname"][0];
if ($EnableManageUsersTroughActiveDirectory == 1) {
$hash[$count]["uid"][0] = $ligne["samaccountname"][0];
} else {
$hash[$count]["uid"][0] = $ligne["uid"][0];
}
if (substr($hash[$count]["uid"][0], strlen($hash[$count]["uid"][0]) - 1, 1) == '$') {
continue;
}
$hash[$count]["employeenumber"][0] = $ligne["employeenumber"][0];
$hash[$count]["title"][0] = $ligne["title"][0];
$hash[$count]["uri"][0] = $ligne["uri"][0];
//.........这里部分代码省略.........
示例15: USER_SENDER_PARAM
function USER_SENDER_PARAM($userid){
$us=new user($userid);
$SenderParams=$us->SenderCanonicalSMTPRelay();
$page=CurrentPageName();
writelogs("USER_ACCOUNT::$userid",__FUNCTION__,__FILE__);
$ldap=new clladp();
$userarr=$ldap->UserDatas($userid);
$hash=$ldap->ReadDNInfos($userarr["dn"]);
$hash["ou"]=$userarr["ou"];
$ou=$hash["ou"];
if(preg_match('#(.+?)@(.+)#',$hash["mail"],$reg)){
$domain=$reg[2];
$email=$reg[1];
}
$priv=new usersMenus();
$button="<input type='button' value='{submit} »' OnClick=\"javascript:ParseForm('userLdapform2','$page',true);\">";
$buttonSenderCanonical="<input type='button' OnClick=\"EditSenderCanonical('{$_GET["userid"]}')\" value='{edit} {sender_canonical} »'>";
if($priv->AllowAddUsers==false){$button=null;$delete=null;$buttonSenderCanonical=null;}
$styleTDLeft="style='padding:5px;font-size:11px'";
$main=new main_cf();
if($main->main_array["smtp_sender_dependent_authentication"]=="yes"){
$sasl=new smtp_sasl_password_maps();
preg_match('#(.+?):(.+)#',$sasl->smtp_sasl_password_hash[$hash["sendercanonical"]],$ath);
$sasl="
<tr>
<td colspan=2 style='font-size:12px;padding:4px;font-weight:bold;border-bottom:1px solid #CCCCCC'>{smtp_sender_dependent_authentication}</td>
</tr>
<tr>
<td align='right' nowrap class=legend $styleTDRight>{username}:</strong>
<td $styleTDLeft>" . Field_text('smtp_sender_dependent_authentication_username',$ath[1])."</td>
</tr>
<tr>
<td align='right' nowrap class=legend $styleTDRight>{password}:</strong>
<td $styleTDLeft>" . Field_password('smtp_sender_dependent_authentication_password',$ath[2])."</td>
</tr>
";
}
$enable_internet="
<form name='userLdapform3'>
<input type='hidden' name='ou' value='$ou'>
<input type='hidden' name='SaveAllowedSMTP' value='yes'>
<input type='hidden' name='dn' value='{$hash["dn"]}'>
<input type='hidden' name='mail' value='$email'>
<input type='hidden' name='user_domain' value='$domain'>
<input type='hidden' name='uid' value='$userid'>
<table style='width:100%'>
<tr>
<td colspan=2 style='font-size:12px;padding:4px;font-weight:bold;border-bottom:1px solid #CCCCCC'>{AllowedSMTPTroughtInternet}<p class=caption>{AllowedSMTPTroughtInternet_text}</p></td>
</tr>
<tr>
<td align='right' nowrap class=legend $styleTDRight>{AllowedSMTPTroughtInternet}:</strong>
<td $styleTDLeft>" . Field_numeric_checkbox_img('AllowedSMTPTroughtInternet',$us->AllowedSMTPTroughtInternet,'{AllowedSMTPTroughtInternet_text}')."</td>
</tr>
<tr>
<td colspan=2 align='right'>
<input type='button' value='{edit} »' OnClick=\"javascript:ParseForm('userLdapform3','$page',true);\">
</td>
</tr>
</table>
</form>
";
if($priv->AllowAddUsers==false){$enable_internet=null;}
$html="
<form name='userLdapform2'>
<input type='hidden' name='ou' value='$ou'>
<input type='hidden' name='SaveLdapUser' value='yes'>
<input type='hidden' name='dn' value='{$hash["dn"]}'>
<input type='hidden' name='mail' value='$email'>
<input type='hidden' name='user_domain' value='$domain'>
<input type='hidden' name='uid' value='$userid'>
<table style='width:100%'>
<tr>
<td colspan=2 style='font-size:12px;padding:4px;font-weight:bold;border-bottom:1px solid #CCCCCC'>{sender_canonical}</td>
</tr>
<tr>
<td align='right' nowrap class=legend $styleTDRight>{sender_canonical}:</strong>
<td $styleTDLeft>" . Field_text('SaveSenderCanonical',$hash["sendercanonical"],'width:70%')." ".imgtootltip('ed_delete.gif','{delete}',"DeleteSenderCanonical('{$_GET["userid"]}');")."</td>
</tr>
<tr>
<td colspan=2 align='right'>$buttonSenderCanonical</td>
//.........这里部分代码省略.........