X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Flibs%2Fsurfbar_functions.php;h=d928ad7df4cda025a3a27a0d0aa90ba4df3a826f;hp=da4aba5a0c4e9a97f916fc22642469a5e71c213f;hb=c47144dd555bbab4acdf9085e4623900dedb0e7c;hpb=143e78d4231adddd9e706cbf55ec5dd8c1651890 diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index da4aba5a0c..d928ad7df4 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -42,7 +42,7 @@ if (!defined('__SECURITY')) { // ----------------------------------------------------------------------------- // // Admin has added an URL with given user id and so on -function SURFBAR_ADMIN_ADD_URL ($url) { +function SURFBAR_ADMIN_ADD_URL ($url, $limit, $reload) { // Do some pre-checks if (!IS_ADMIN()) { // Not an admin @@ -56,10 +56,16 @@ function SURFBAR_ADMIN_ADD_URL ($url) { } elseif (!SURFBAR_IF_USER_BOOK_MORE_URLS()) { // No more allowed! return false; + } elseif ("".($limit + 0)."" != "".$limit."") { + // Invalid amount entered + return false; + } elseif ("".($reload + 0)."" != "".$reload."") { + // Invalid amount entered + return false; } // Register the new URL - return SURFBAR_REGISTER_URL($url, "0", "ACTIVE", "unlock"); + return SURFBAR_REGISTER_URL($url, "0", "ACTIVE", "unlock", array('limit' => $limit, 'reload' => $reload)); } // Admin unlocked an email so we can migrate the URL function SURFBAR_ADMIN_MIGRATE_URL ($url, $uid) { @@ -139,7 +145,7 @@ function SURFBAR_ADMIN_REJECT_URL_IDS ($IDs) { // ----------------------------------------------------------------------------- // // Member has added an URL -function SURFBAR_MEMBER_ADD_URL ($url) { +function SURFBAR_MEMBER_ADD_URL ($url, $limit) { global $_CONFIG; // Do some pre-checks @@ -155,10 +161,13 @@ function SURFBAR_MEMBER_ADD_URL ($url) { } elseif (!SURFBAR_IF_USER_BOOK_MORE_URLS($GLOBALS['userid'])) { // No more allowed! return false; + } elseif ("".($limit + 0)."" != "".$limit."") { + // Invalid amount entered + return false; } // Register the new URL - return SURFBAR_REGISTER_URL($url, $GLOBALS['userid']); + return SURFBAR_REGISTER_URL($url, $GLOBALS['userid'], "PENDING", "reg", array('limit' => $limit)); } // Create list of actions depending on status for the user function SURFBAR_MEMBER_ACTIONS ($urlId, $status) { @@ -176,7 +185,7 @@ function SURFBAR_MEMBER_ACTIONS ($urlId, $status) { foreach ($actionArray as $actionId=>$action) { // Add form for this action $OUT .= sprintf("