$persistent_cookie_data = array(); $persistent_cookie_data[] = $query['id']; $persistent_cookie_data[] = $ipbound ? '1' : '0'; $persistent_cookie_data[] = _md5HMAC($query['password'] . '$' . $query['email'], $ipbound ? _userip : _sessionprefix); setcookie(_sessionprefix . "persistent_key", implode('$', $persistent_cookie_data), time() + 2592000, "/"); } // ulozeni dat pro session $_SESSION[_sessionprefix . "user"] = $query['id']; $_SESSION[_sessionprefix . "password"] = $query['password']; $_SESSION[_sessionprefix . "ip"] = _userip; $_SESSION[_sessionprefix . "ipbound"] = $ipbound; $result = 1; } else { _iplogUpdate(1); } } else { $result = 2; } } } else { $result = 5; } } else { $result = 6; } } /* --- presmerovani --- */ if ($result != 1) { $_GET['_return'] = _addFdGetToLink(_addGetToLink($_POST['form_url'], '_mlr=' . $result, false), array('username' => $username)); } _returnHeader();
} } } } else { $return = 0; } } else { $return = 3; } } else { $return = 2; } } else { $return = 4; } } else { $return = 0; } /* --- presmerovani --- */ if ($posttype != 4) { if (!isset($_POST['subject'])) { $_POST['subject'] = ""; } if ($return != 1) { $returnurl = _addFdGetToLink(_addGetToLink($_GET['_return'], "replyto=" . $xhome, false), array("guest" => $guest, "subject" => $_POST['subject'], "text" => $_POST['text'])) . "&addpost"; } else { $returnurl = $_GET['_return']; } $_GET['_return'] = _addGetToLink($returnurl, "r=" . $return . ($posttype == 5 ? '&autolast' : '') . ($posttype != 4 && isset($insert_id) ? "#post-" . $insert_id : ''), false); } _returnHeader();