Code Duplication    Length = 10-10 lines in 2 locations

php/jodel-web.php 2 locations

@@ 81-90 (lines=10) @@
78
	{	
79
		$db = new DatabaseConnect();
80
		$result = $db->query("SELECT id FROM users WHERE user_token = '" . $_COOKIE['JodelVoterPassword'] . "'");
81
		if($result->num_rows == 0)
82
		{
83
			$db->close();
84
			return FALSE;
85
		}
86
		else
87
		{
88
			$db->close();
89
			return TRUE;
90
		}
91
	}
92
	else
93
	{
@@ 116-125 (lines=10) @@
113
    $db = new DatabaseConnect();  
114
    $result = $db->query("SELECT * FROM accounts WHERE device_uid='" . $deviceUid  . "'");
115
116
    if ($result->num_rows > 0)
117
    {
118
    	$db->close();
119
        return TRUE;
120
    }
121
    else
122
    {
123
    	$db->close();
124
        return FALSE;
125
    }
126
}
127
128
	//Check if it's a Spider or Google Bot