当前位置: 首页>>代码示例>>PHP>>正文


PHP clladp::Ldap_add_mod方法代码示例

本文整理汇总了PHP中clladp::Ldap_add_mod方法的典型用法代码示例。如果您正苦于以下问题:PHP clladp::Ldap_add_mod方法的具体用法?PHP clladp::Ldap_add_mod怎么用?PHP clladp::Ldap_add_mod使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在clladp的用法示例。


在下文中一共展示了clladp::Ldap_add_mod方法的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));
}
开发者ID:brucewu16899,项目名称:artica,代码行数:26,代码来源:cmd.quarantine.php

示例2: AddPointerDc

function AddPointerDc()
{
    $dn = $_GET["AddAssociatedDomain"];
    $ldap = new clladp();
    $upd["associateddomain"] = $_GET["entry"];
    if (!$ldap->Ldap_add_mod($dn, $upd)) {
        echo $ldap->ldap_last_error;
    }
}
开发者ID:brucewu16899,项目名称:artica,代码行数:9,代码来源:pdns.php

示例3: AddDenyCountry

function AddDenyCountry()
{
    $ldap = new clladp();
    $country = $_GET["AddDenyCountry"];
    $ou = $_GET["ou"];
    $dn = "ou={$ou},dc=organizations,{$ldap->suffix}";
    $upd["CountryDeny"] = "{$country}:{$_GET["action"]}";
    if (!$ldap->Ldap_add_mod($dn, $upd)) {
        echo $ldap->ldap_last_error;
    } else {
        $tpl = new templates();
        echo $tpl->_ENGINE_parse_body('{success}');
    }
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:14,代码来源:global-countries-filters.ou.php

示例4: Add_surbl_server

function Add_surbl_server()
{
    $ldap = new clladp();
    $rbl = $_GET["surbl_server"];
    $ou = $_GET["ou"];
    $dn = "ou={$ou},dc=organizations,{$ldap->suffix}";
    $upd["SURBLServers"] = "{$rbl}:0";
    if (!$ldap->Ldap_add_mod($dn, $upd)) {
        echo $ldap->ldap_last_error;
    } else {
        $tpl = new templates();
        echo $tpl->_ENGINE_parse_body('{success}');
    }
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:14,代码来源:global-countries-surbl.ou.php

示例5: Loadtemplate

function Loadtemplate()
{
    $ou = $_GET["ou"];
    $template_name = $_GET["template"];
    writequeries();
    $ldap = new clladp();
    $dn = "cn=artica_quarantine_settings,ou={$ou},dc=organizations,{$ldap->suffix}";
    if (isset($_GET["ArticaMaxDayTemplate"])) {
        $template_data = "<SUBJECT>{$_GET["subject"]}</SUBJECT>\n\t\t<FROM>{$_GET["from"]}</FROM>\n\t\t<TEMPLATE>{$_GET["ArticaMaxDayTemplate"]}</TEMPLATE>";
        $upd[$template_name][0] = $template_data;
        if (!$ldap->Ldap_modify($dn, $upd)) {
            echo "<H2>{$ldap->ldap_last_error}</H2>";
            exit;
        }
    }
    if (!$ldap->ExistsDN($dn)) {
        $upd["cn"][] = "artica_quarantine_settings";
        $upd["objectClass"][] = 'top';
        $upd["objectClass"][] = 'ArticaQuarantineTemplates';
        $upd["{$template_name}"][] = "DEFAULT";
        $ldap->ldap_add($dn, $upd);
        $template_data = "DEFAULT";
    } else {
        $hash = $ldap->Ldap_read($dn, '(ObjectClass=ArticaQuarantineTemplates)', array(strtolower($template_name)));
        if (!is_array($hash[0][strtolower($template_name)])) {
            unset($upd);
            $upd[$template_name] = "DEFAULT";
            $ldap->Ldap_add_mod($dn, $upd);
            $hash = $ldap->Ldap_read($dn, '(ObjectClass=ArticaQuarantineTemplates)', array(strtolower($template_name)));
        }
        $template_data = $hash[0][strtolower($template_name)][0];
    }
    if ($template_data == "DEFAULT") {
        $template_data = file_get_contents("ressources/databases/{$template_name}.cf");
    }
    if (preg_match('#<SUBJECT>(.+?)</SUBJECT>\\s+<FROM>(.+?)</FROM>\\s+<TEMPLATE>(.+?)</TEMPLATE>#is', $template_data, $reg)) {
        $subject = $reg[1];
        $from = $reg[2];
        $template_d = $reg[3];
    }
    $tiny = TinyMce('ArticaMaxDayTemplate', $template_d);
    $html = "\n\t<html>\n\t<head>\n\t<link href='css/styles_main.css' rel=\"styleSheet\" type='text/css' />\n\t<link href='css/styles_header.css' rel=\"styleSheet\" type='text/css' />\n\t<link href='css/styles_middle.css' rel=\"styleSheet\" type='text/css' />\n\t<link href='css/styles_forms.css' rel=\"styleSheet\" type='text/css' />\n\t<link href='css/styles_tables.css' rel=\"styleSheet\" type='text/css' />\n\t<script type='text/javascript' language='JavaScript' src='mouse.js'></script>\n\t<script type='text/javascript' language='javascript' src='XHRConnection.js'></script>\n\t<script type='text/javascript' language='javascript' src='default.js'></script>\n\t<script type='text/javascript' language='javascript' src='js/quarantine.ou.js'></script>\t\n\t</head>\n\t<body width=100% style='background-color:white'> \n\t\t<H5>{" . "{$template_name}}</H5>\n\t<form name='FFM1'>\n\t<table style='width:100%;margin:10px'>\n\t<tr>\n\t<td align='right'><strong>{from}:</strong></td>\n\t<td><input type='text' name='from' value='{$from}'></td>\n\t</tr>\n\t<tr>\n\t<td align='right'><strong>{subject}:</strong></td>\n\t<td><input type='text' name='subject' value='{$subject}'></td>\n\t</tr>\t\n\t</table>\n\t<div style='width:450px'>{$tiny}</div>\n\t<p class=caption>{template_token}</p>\n\t<input type='hidden' name='ou' value='{$ou}'>\n\t<input type='hidden' name='template' value='{$template_name}'>\n\t</form>\n\t</body>\n\t</html>";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:brucewu16899,项目名称:artica,代码行数:45,代码来源:quarantine.ou.php

示例6: zarafaEnabled

function zarafaEnabled()
{
    $ldap = new clladp();
    $dn = "ou={$_GET["ou"]},dc=organizations,{$ldap->suffix}";
    $upd["objectClass"] = "zarafa-company";
    if ($_GET["zarafaEnabled"] == 1) {
        if (!$ldap->Ldap_add_mod("{$dn}", $upd)) {
            echo $ldap->ldap_last_error;
            return;
        }
    } else {
        if (!$ldap->Ldap_del_mod("{$dn}", $upd)) {
            echo $ldap->ldap_last_error;
            return;
        }
    }
    $sock = new sockets();
    $sock->getFrameWork("cmd.php?zarafa-admin=yes");
}
开发者ID:brucewu16899,项目名称:artica,代码行数:19,代码来源:domains.edit.zarafa.php

示例7: PostfixSaveRestrictionClass

function PostfixSaveRestrictionClass()
{
    $tpl = new templates();
    $ldap = new clladp();
    $restrictions = new smtpd_restrictions();
    $class_name = $_GET["PostfixSaveRestrictionClass"];
    $dn = "cn={$class_name},cn=restrictions_classes,cn=artica,{$ldap->suffix}";
    if (!$ldap->ExistsDN($dn)) {
        if ($restrictions->standard_classes_array[$class_name] = $class_name) {
            $obecjtClass = "PostFixRestrictionStandardClasses";
        } else {
            $obecjtClass = "PostFixRestrictionClasses";
        }
        $upd["cn"][0] = $class_name;
        $upd['objectClass'][0] = $obecjtClass;
        $upd['objectClass'][1] = 'top';
        $ldap->ldap_add($dn, $upd);
    }
    $value = "{$_GET["SelectRestrictionList"]}=\"{$_GET["datas"]}\"";
    $update_array["PostFixRestrictionClassList"][] = $value;
    $class_datas = $ldap->RestrictionClassData($_GET["PostfixSaveRestrictionClass"]);
    if ($class_datas["rules_source"][$value] == $value) {
        return null;
    }
    if (!$ldap->Ldap_add_mod($dn, $update_array)) {
        echo $ldap->ldap_last_error;
    } else {
        echo $tpl->_ENGINE_parse_body('{success}');
    }
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:30,代码来源:postfix.restrictions.classes.php

示例8: users_add_aliases

function users_add_aliases()
{
    $ldap = new clladp();
    $update_array["mailAlias"] = $_GET["aliases"];
    $res = $ldap->Ldap_add_mod($_GET["users_add_aliases"], $update_array);
    echo users_aliases($_GET["users_add_aliases"]);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:7,代码来源:users.edit.php

示例9: 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";}
	
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:29,代码来源:users.account.php

示例10: GroupUserAdd

function GroupUserAdd()
{
    $gid = $_GET["GroupUserAdd"];
    $ldap = new clladp();
    $hash = $ldap->GroupDatas($gid);
    $updtate_array["memberUid"] = $_GET["userid"];
    $ldap->Ldap_add_mod($hash["dn"], $updtate_array);
    if ($ldap->ldap_last_error == null) {
        $ldap->ldap_last_error = "{success}";
    }
    $tpl = new templates();
    echo "success";
    exit;
}
开发者ID:brucewu16899,项目名称:artica,代码行数:14,代码来源:group.edit.php

示例11: FORBIDDEN_ATTACHMENTS_ADDRULE

function FORBIDDEN_ATTACHMENTS_ADDRULE()
{
    $ldap = new clladp();
    $hash = $ldap->GroupDatas($_GET["group_add_attach_rule"]);
    $ou = $_GET["ou"];
    $rule = $hash["cn"] . "_attach";
    $dn = "cn=forbidden_attachments,ou={$ou},dc=organizations,{$ldap->suffix}";
    if (!$ldap->ExistsDN($dn)) {
        $upd["objectClass"][] = 'top';
        $upd["objectClass"][] = 'PostFixStructuralClass';
        $upd["cn"] = "forbidden_attachments";
        if (!$ldap->ldap_add($dn, $upd)) {
            echo $ldap->ldap_last_error;
            exit;
        }
        unset($upd);
    }
    for ($i = 1; $i < 100; $i++) {
        $dn = "cn={$rule}-{$i},cn=forbidden_attachments,ou={$ou},dc=organizations,{$ldap->suffix}";
        if (!$ldap->ExistsDN($dn)) {
            $upd["objectClass"][] = 'top';
            $upd["objectClass"][] = 'FilterExtensionsGroup';
            $upd["cn"] = "{$rule}-{$i}";
            $rule = "{$rule}-{$i}";
            if (!$ldap->ldap_add($dn, $upd)) {
                echo $ldap->ldap_last_error;
                exit;
            }
            unset($upd);
            break;
        }
    }
    if (!$ldap->ExistsDN($dn)) {
        $upd["objectClass"][] = 'top';
        $upd["objectClass"][] = 'FilterExtensionsGroup';
        $upd["cn"] = $rule;
        if (!$ldap->ldap_add($dn, $upd)) {
            echo $ldap->ldap_last_error;
            exit;
        }
        unset($upd);
    }
    $upd["FiltersExtensionsGroupName"] = $rule;
    if ($ldap->Ldap_add_mod($hash["dn"], $upd)) {
        echo $ldap->ldap_last_error;
    }
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:47,代码来源:domains.edit.group.php

示例12: create_user

function create_user($filename)
{
    $tpl = new templates();
    $unix = new unix();
    $nohup = null;
    $path = "/usr/share/artica-postfix/ressources/logs/web/create-users/{$filename}";
    echo "Path:{$path}\n";
    build_progress("Open {$filename}", 10);
    if (!is_file($path)) {
        echo "{$path} no such file...\n";
        return false;
    }
    $MAIN = unserialize(base64_decode(@file_get_contents($path)));
    build_progress("Create new member {$MAIN["login"]}", 15);
    $users = new user($MAIN["login"]);
    if ($users->password != null) {
        echo "User already exists {$MAIN["login"]}\n";
        build_progress("{account_already_exists}", 110);
        @unlink($path);
        return;
    }
    $ou = $MAIN["ou"];
    $password = url_decode_special_tool($MAIN["password"]);
    $MAIN["firstname"] = url_decode_special_tool($MAIN["firstname"]);
    $MAIN["lastname"] = url_decode_special_tool($MAIN["lastname"]);
    build_progress("{$MAIN["firstname"]} {$MAIN["lastname"]}", 20);
    if (trim($MAIN["internet_domain"]) == null) {
        $MAIN["internet_domain"] = "localhost.localdomain";
    }
    echo "Add new user {$MAIN["login"]} {$MAIN["ou"]} {$MAIN["gpid"]}\n";
    $users->ou = $MAIN["ou"];
    $users->password = url_decode_special_tool($MAIN["password"]);
    $users->mail = "{$MAIN["email"]}@{$MAIN["internet_domain"]}";
    $users->DisplayName = "{$MAIN["firstname"]} {$MAIN["lastname"]}";
    $users->givenName = $MAIN["firstname"];
    $users->sn = $MAIN["lastname"];
    $users->group_id = $MAIN["gpid"];
    $users->homeDirectory = "/home/{$MAIN["login"]}";
    if (is_numeric($MAIN["gpid"])) {
        $gp = new groups($MAIN["gpid"]);
        echo "privileges: {$MAIN["gpid"]} -> AsComplexPassword = \"{$gp->Privileges_array["AsComplexPassword"]}\"\n";
        if ($gp->Privileges_array["AsComplexPassword"] == "yes") {
            $ldap = new clladp();
            $hash = $ldap->OUDatas($ou);
            $privs = $ldap->_ParsePrivieleges($hash["ArticaGroupPrivileges"], array(), true);
            $policiespwd = unserialize(base64_decode($privs["PasswdPolicy"]));
            if (is_array($policiespwd)) {
                $priv = new privileges();
                if (!$priv->PolicyPassword($password, $policiespwd)) {
                    build_progress("Need complex password", 110);
                    echo "Need complex password";
                    @unlink($path);
                    return;
                }
            }
        }
    }
    build_progress("{$MAIN["firstname"]} {$MAIN["lastname"]} {save}", 25);
    if (!$users->add_user()) {
        echo $users->error . "\n" . $users->ldap_error;
        build_progress("{failed}", 110);
        @unlink($path);
        return;
    }
    @mkdir("{$users->homeDirectory}");
    @chown("{$users->homeDirectory}", $users->uid);
    if ($MAIN["ByZarafa"] == "yes") {
        $terminated = " >/dev/null";
        $zarafa_admin = $unix->find_program("zarafa-admin");
        if (!$GLOBALS["WAIT"]) {
            $nohup = $unix->find_program("nohup");
            $terminated = null;
        }
        if (isset($MAIN["ZARAFA_LANG"])) {
            $users->SaveZarafaMbxLang($MAIN["ZARAFA_LANG"]);
            $langcmd = " --lang {$MAIN["ZARAFA_LANG"]} ";
        }
        $ldap = new clladp();
        $dn = "ou={$MAIN["ou"]},dc=organizations,{$ldap->suffix}";
        $upd["objectClass"] = "zarafa-company";
        $upd["cn"] = $MAIN["ou"];
        if (!$ldap->Ldap_add_mod("{$dn}", $upd)) {
            echo $ldap->ldap_last_error;
            build_progress("{failed} OpenLDAP Error", 110);
            @unlink($path);
            return;
        }
        build_progress("{create_store} {language}: {$MAIN["ZARAFA_LANG"]}", 30);
        $cmd = "{$nohup} {$zarafa_admin} {$langcmd}--create-store {$MAIN["login"]} >/dev/null 2>&1 &";
        system(trim($cmd));
        if (!$GLOBALS["WAIT"]) {
            $sock = new sockets();
            $sock->getFrameWork("cmd.php?zarafa-hash=yes&rebuild=yes");
            return;
        }
        @unlink("/usr/share/artica-postfix/ressources/databases/ZARAFA_DB_STATUS.db");
        @unlink("/etc/artica-postfix/zarafa-export.db");
        $cmd = LOCATE_PHP5_BIN2() . " /usr/share/artica-postfix/exec.zarafa.build.stores.php --export-hash";
        build_progress("{export_stores_data}", 35);
        echo "{$cmd}\n";
//.........这里部分代码省略.........
开发者ID:articatech,项目名称:artica,代码行数:101,代码来源:exec.create-user.php

示例13: Tree_ou_Add_user

function Tree_ou_Add_user()
{
    $user = $_GET["Tree_ou_Add_user"];
    $user = replace_accents($user);
    $ldap = new clladp();
    $ou = $_GET["ou"];
    $uid = str_replace(' ', '.', $user);
    if (stripos($user, '@') > 0) {
        $mail = $user;
        $tbl = explode('@', $user);
        $domainName = $tbl[1];
        $user = $tbl[0];
        $uid = str_replace(' ', '.', $user);
        if (preg_match('#([a-z0-9]+)([\\.\\-_])([a-z0-9_\\-\\.]+)#', $user, $reg)) {
            $firstname = $reg[1];
            $lastname = $reg[3];
        } elseif (preg_match('#(.+)\\s+(.+)#', $user, $reg)) {
            $firstname = $reg[1];
            $lastname = $reg[2];
        } elseif (preg_match('#(.+)#', $user, $reg)) {
            $lastname = $reg[1];
            $firstname = $lastname;
        }
    } else {
        if (preg_match('#([a-z0-9_\\-]+)\\s+([a-z0-9_\\-]+)#', $user, $reg)) {
            $lastname = $reg[2];
            $firstname = $reg[1];
            $domainName = 'none';
        } else {
            $lastname = $user;
            $firstname = $user;
            $domainName = 'none';
        }
    }
    $dn = "cn={$user},ou=users,ou={$ou},dc=organizations,{$ldap->suffix}";
    $update_array["cn"][] = $user;
    $update_array["uid"][] = $uid;
    $update_array["sn"][] = $lastname;
    $update_array["domainName"][] = $domainName;
    $update_array["homeDirectory"][] = "/home/{$firstname}.{$lastname}";
    $update_array["accountGroup"][] = "0";
    $update_array["accountActive"][] = 'TRUE';
    $update_array["mailDir"] = 'cyrus';
    $update_array["objectClass"][] = "userAccount";
    $update_array["objectClass"][] = "top";
    $ldap->ldap_add($dn, $update_array);
    if ($ldap->ldap_last_error != null) {
        echo nl2br($ldap->ldap_last_error);
        exit;
    }
    $update_array = null;
    $update_array["givenName"][] = $firstname;
    $update_array["mail"][] = $mail;
    $update_array["DisplayName"][] = "{$firstname} " . $lastname;
    $update_array["MailBoxActive"][] = "FALSE";
    $update_array["objectclass"][] = "ArticaSettings";
    $ldap->Ldap_add_mod($dn, $update_array);
    $pages = new HtmlPages();
    echo $pages->PageOu("ou={$ou},dc=organizations,{$ldap->suffix}");
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:60,代码来源:domains.php

示例14: FilterByName_delete

function FilterByName_delete()
{
    $ldap = new clladp();
    if (preg_match('#kav:([0-9]+)#', $_GET["TreeKasSelect"], $reg)) {
        $gidNumber = $reg[1];
    }
    $HashGroup = $ldap->GroupDatas($gidNumber);
    $kav4mailservers = new kav4mailservers(1, $HashGroup["KasperkyAVScanningDatas"]);
    $hashKAV = $kav4mailservers->loadAvSettingsDomain($gidNumber);
    $tbl = explode(',', $hashKAV["FilterByName"]);
    $tbl[] = $ext;
    unset($tbl[$_GET["FilterByName_delete"]]);
    $hashKAV["FilterByName"] = implode(',', $tbl);
    while (list($num, $ligne) = each($hashKAV)) {
        $ini = $ini . "{$num}={$ligne}\n";
    }
    $ini = "[smtpscan.group:{$gidNumber}]\n{$ini}";
    $updatearray["KasperkyAVScanningDatas"][] = $ini;
    if (!is_array_key("KasperkyAVScanningDatas", $HashGroup)) {
        $ldap->Ldap_add_mod($HashGroup["dn"], $updatearray);
        if ($ldap->ldap_last_error != null) {
            echo $ldap->ldap_last_error;
            exit;
        }
    } else {
        $ldap->Ldap_modify($HashGroup["dn"], $updatearray);
        if ($ldap->ldap_last_error != null) {
            echo $ldap->ldap_last_error;
            exit;
        }
    }
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body('{deleted}');
}
开发者ID:brucewu16899,项目名称:artica,代码行数:34,代码来源:users.kav.php

示例15: MoveBranch

function MoveBranch()
{
    $dragged = $_POST["drag_id"];
    $dropped = $_POST["drop_id"];
    if (preg_match('#^user:(.+)#', $dragged, $reg)) {
        if (preg_match('#^group:([0-9]+)#', $dropped, $reg2)) {
            $ldap = new clladp();
            $hasgroup = $ldap->GroupDatas($reg2[1]);
            $update_array["memberUid"][] = $reg[1];
            $ldap->Ldap_add_mod($hasgroup["dn"], $update_array);
            if ($ldap->ldap_last_error != null) {
                echo $ldap->ldap_last_error;
                exit;
            }
            echo "ok";
            exit;
        }
    }
    echo "No allowed";
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:20,代码来源:tree.functions.php


注:本文中的clladp::Ldap_add_mod方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。