<?php include "mlpsecure/config/classes.inc"; include "mlpsecure/config/config.inc"; $newnametotrack = trim($newnametotrack); $newurltotrack = trim($newurltotrack); $db = new MySQL_Access(); $db->Query("SELECT * FROM urlmanager WHERE userID='{$_SESSION['aauserID']}' ORDER BY urlID"); for ($i = 0; $i < $db->rows; $i++) { $urlnames = $db->FetchArray(); if ($urlnames['name'] == $newnametotrack) { $notValid = "ERROR: URL name already used."; $notValid = urlencode($notValid); header("Location: main.php?option=urltrackers¬Valid={$notValid}"); exit; } } if ($_SESSION['aastatus'] == "pro") { $urlsallowed = $numurltrackersPro; } else { if ($_SESSION['aastatus'] == "exe") { $urlsallowed = $numurltrackersExe; } else { if ($_SESSION['aastatus'] == "mem") { $urlsallowed = $numurltrackersMem; } } } if ($db->rows > $urlsallowed - 1) { $notValid = urlencode("ERROR: You are allowed only {$urlsallowed} url trackers."); header("Location: main.php?option=urltrackers¬Valid={$notValid}");