diff --git a/process/subscription.php b/process/subscription.php index ba11c14..edfe6d1 100644 --- a/process/subscription.php +++ b/process/subscription.php @@ -27,10 +27,13 @@ echo Helper::jsonResponse(FALSE, "error", $LOCAL["msg"]["error"]["empty_termsconditions"]); exit(); } + if (!empty($_POST["offset"])) { + $offset = intval($_POST["offset"]); + } $keyHandler = new KeyHandler(); $subscription = new Subscription($_SESSION["user"]["uID"]); $keys = explode("\n", $_POST["keys"]); - $count = 0; + $count = !empty($offset) ? $offset : 0; foreach ($keys as $key) { $key = trim($key); if (!empty($key)) { @@ -59,7 +62,7 @@ break; case "setpass": - $passExpression = "/^[".$CONF["pass_filter"]."]+$/"; + $passExpression = "/^[" . $CONF["pass_filter"] . "]+$/"; if (empty($_POST["target"]) || !is_numeric($_POST["target"])) { echo Helper::jsonResponse(FALSE, "error", $LOCAL["msg"]["error"]["no_subscription_id"]); exit();