Code Duplication    Length = 9-9 lines in 2 locations

manager/processors/login.processor.php 1 location

@@ 85-93 (lines=9) @@
82
if($failedlogins >= $failed_allowed && $blockeduntildate > time()) {
83
	@session_destroy();
84
	session_unset();
85
	if($cip = getenv("HTTP_CLIENT_IP")) {
86
		$ip = $cip;
87
	} elseif($cip = getenv("HTTP_X_FORWARDED_FOR")) {
88
		$ip = $cip;
89
	} elseif($cip = getenv("REMOTE_ADDR")) {
90
		$ip = $cip;
91
	} else {
92
		$ip = "UNKNOWN";
93
	}
94
	$log = new logHandler;
95
	$log->initAndWriteLog("Login Fail (Temporary Block)", $internalKey, $username, "119", $internalKey, "IP: " . $ip);
96
	jsAlert($_lang['login_processor_many_failed_logins']);

manager/includes/document.parser.class.inc.php 1 location

@@ 3453-3461 (lines=9) @@
3450
        $userId = $this->getLoginUserType() == 'manager' ? $this->getLoginUserID() : -$this->getLoginUserID();
3451
3452
        // Get user IP
3453
        if ($cip = getenv("HTTP_CLIENT_IP")) {
3454
            $ip = $cip;
3455
        } elseif ($cip = getenv("HTTP_X_FORWARDED_FOR")) {
3456
            $ip = $cip;
3457
        } elseif ($cip = getenv("REMOTE_ADDR")) {
3458
            $ip = $cip;
3459
        } else {
3460
            $ip = "UNKNOWN";
3461
        }
3462
        $_SESSION['ip'] = $ip;
3463
3464
        $sql = sprintf('REPLACE INTO %s (internalKey, lasthit, ip, sid)