contract owned {
    address public owner;

    function owned() {
        owner = msg.sender;
    }

    modifier onlyOwner {
        if (msg.sender != owner) throw;
        _;
    }
        /* 管理者的权限可以转移 */
    function transferOwnership(address newOwner) onlyOwner {
        owner = newOwner;
    }
}
/* 建立一个新合约，类似于C++中的类，实现合约管理者的功能 */
function transferOwnership(address newOwner) onlyOwner {
    owner = newOwner;
}

/* 管理者的权限可以转移 */