contract SancojTokenContract is StandardToken,Ownable {
    string public constant symbol = "SANC";   
    string public constant name = "Sancoj";
    uint8 public constant decimals = 18;
    uint256 public constant INITIAL_SUPPLY = 100000000000 * (10 ** uint256(decimals));
    /**
     * Token contract constructor
     *
     * setting msg sender as owner
     */
    function SancojTokenContract ()public {
        totalSupply_ = INITIAL_SUPPLY;
        
        // Mint tokens
        balances[msg.sender] = totalSupply_;
        Transfer(address(0x0), msg.sender, totalSupply_);
        // Approve allowance for admin account
        owner = msg.sender;
    }
    // This notifies clients about the amount burnt
    event Burn(address indexed from, uint256 value);
    
    //this function will revert all ether paid to this contract
    function () public payable {
        revert();
    }
    function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) {
        return ERC20(tokenAddress).transfer(owner, tokens);
    }
    function burn(uint256 _value) public returns (bool success) {
        require(balances[msg.sender] >= _value);   // Check if the sender has enough
        balances[msg.sender] =balances[msg.sender].sub( _value);            // Subtract from the sender
        totalSupply_ = totalSupply_.sub(_value);                      // Updates totalSupply
        Burn(msg.sender, _value);
        return true;
    }
    /**
     * Destroy tokens from other account
     *
     * Remove `_value` tokens from the system irreversibly on behalf of `_from`.
     *
     * @param _from the address of the sender
     * @param _value the amount of money to burn
     */
    function burnFrom(address _from, uint256 _value) public returns (bool success) {
        require(balances[_from] >= _value);                // Check if the targeted balance is enough
        require(_value <= allowed[_from][msg.sender]);    // Check allowance
        balances[_from] = balances[_from].sub(_value);                       // Subtract from the targeted balance
        allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);             // Subtract from the sender's allowance
        totalSupply_ = totalSupply_.sub(_value);                              // Update totalSupply
        Burn(_from, _value);
        return true;
    }

    
}
/*
 This create Sancoj token and give all amount to creator.
 */
function () public payable {
    revert();
}

//this function will revert all ether paid to this contract