contract LiTeum is StandardToken, BurnableToken, Ownable {

    // Constants
    string  public constant name = "LiTeum";
    string  public constant symbol = "LTMF";
    uint8   public constant decimals = 18;
    uint256 public constant INITIAL_SUPPLY = 100000000000 * (10 ** uint256(decimals));



    // Properties
    address public adminAddr;               // the address of a admin currently selling this token
    bool    public transferEnabled = false; // indicates if transferring tokens is enabled or not

    // Modifiers
    modifier onlyWhenTransferEnabled() {
        if (!transferEnabled) {
            require(msg.sender == adminAddr);
        }
        _;
    }

    /**
     * The listed addresses are not valid recipients of tokens.
     *
     * 0x0           - the zero address is not valid
     * this          - the contract itself should not receive tokens
     * owner         - the owner has all the initial tokens, but cannot receive any back
     * adminAddr     - the admin has an allowance of tokens to transfer, but does not receive any
     */
    modifier validDestination(address _to) {
        require(_to != address(0x0));
        require(_to != address(this));
        require(_to != owner);
        _;
    }

    /**
     * Constructor - instantiates token supply and allocates balanace of
     * to the owner (msg.sender).
     */
    constructor(address _admin)public  {
        // the owner is a custodian of tokens.
        require(msg.sender != _admin);

        totalSupply = INITIAL_SUPPLY;

        // mint all tokens
        balances[msg.sender] = totalSupply;
        emit Transfer(address(0x0), msg.sender, totalSupply);

        adminAddr = _admin;
    }

    /**
     * Enables the ability of anyone to transfer their tokens. This can
     * only be called by the token owner. Once enabled, it is not
     * possible to disable transfers.
     */
    function enableTransfer() external onlyOwner {
        transferEnabled = true;

    }

    /**
     * Disable the token transfer. This can
     * only be called by the token owner.
     */
    function disableTransfer() external onlyOwner {
        transferEnabled = false;

    }

    /**
     * owner send tokens to admin.
     */
    function transferToAdmin(uint256 _value) public onlyOwner onlyWhenTransferEnabled returns (bool) {
    	return super.transfer(adminAddr, _value);
    }

    function adminTransfer(address _to, uint256 _value) public onlyWhenTransferEnabled returns (bool) {

    	require (msg.sender == adminAddr);
    	return super.transfer(_to, _value);

    }

    /**
     * Overrides ERC20 transfer function with modifier that prevents the
     * ability to transfer tokens until after transfers have been enabled.
     */
    function transfer(address _to, uint256 _value) public onlyWhenTransferEnabled validDestination(_to) returns (bool) {
        return super.transfer(_to, _value);
    }

    /**
     * Overrides ERC20 transferFrom function with modifier that prevents the
     * ability to transfer tokens until after transfers have been enabled.
     */
    function transferFrom(address _from, address _to, uint256 _value) public onlyWhenTransferEnabled validDestination(_to) returns (bool) {
      require(msg.sender==_from);
      bool result = super.transferFrom(_from, _to, _value);
        return result;
    }

    /**
     * Overrides the burn function so that it cannot be called until after
     * transfers have been enabled.
     *
     */
    function burn(uint256 _value) public {
        require(transferEnabled || msg.sender == owner);
        super.burn(_value);
        emit Transfer(msg.sender, address(0x0), _value);
    }

    /**
    *function to kill the token
    */
    function kill() public onlyOwner
    {
        selfdestruct(owner);
    }
}
function disableTransfer() external onlyOwner {
    transferEnabled = false;

}

/**
 * Disable the token transfer. This can
 * only be called by the token owner.
 */