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

@@ 3433-3441 (lines=9) @@
3430
        $userId = $this->getLoginUserType() == 'manager' ? $this->getLoginUserID() : -$this->getLoginUserID();
3431
3432
        // Get user IP
3433
        if ($cip = getenv("HTTP_CLIENT_IP")) {
3434
            $ip = $cip;
3435
        } elseif ($cip = getenv("HTTP_X_FORWARDED_FOR")) {
3436
            $ip = $cip;
3437
        } elseif ($cip = getenv("REMOTE_ADDR")) {
3438
            $ip = $cip;
3439
        } else {
3440
            $ip = "UNKNOWN";
3441
        }
3442
        $_SESSION['ip'] = $ip;
3443
3444
        $sql = sprintf('REPLACE INTO %s (internalKey, lasthit, ip, sid)