From 61b77b466ed51b55406cce2671c6ad3991b350a9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 25 Sep 2008 20:02:22 +0000 Subject: [PATCH] - Notification mode added to surfbar (dummy!) - View-limitation completed in surfbar - Array $INC_POOL will now be deleted after it has been used - Check for updated/newly added extensions removed (obsolete!) --- inc/autopurge.php | 3 + inc/check-reset.php | 3 + inc/databases.php | 2 +- inc/extensions.php | 3 + inc/extensions/ext-surfbar.php | 2 + inc/language/surfbar_de.php | 5 + inc/libs/surfbar_functions.php | 73 +++- inc/load_cache.php | 3 + inc/load_extensions.php | 5 +- inc/modules/admin/what-add_surfbar_url.php | 2 +- inc/modules/admin/what-config_surfbar.php | 27 +- inc/modules/admin/what-extensions.php | 122 ------ .../de/emails/admin/admin_surfbar_url_reg.tpl | 2 + .../emails/admin/admin_surfbar_url_unlock.tpl | 2 + .../emails/member/member_surfbar_url_reg.tpl | 2 + .../member/member_surfbar_url_unlock.tpl | 2 + .../de/html/admin/admin_add_surfbar_url.tpl | 5 + .../de/html/admin/admin_config_surfbar.tpl | 404 ++++++++++-------- 18 files changed, 332 insertions(+), 335 deletions(-) diff --git a/inc/autopurge.php b/inc/autopurge.php index f3b1af8477..b312634738 100644 --- a/inc/autopurge.php +++ b/inc/autopurge.php @@ -46,6 +46,9 @@ foreach ($INC_POOL as $fqfn) { require_once($fqfn); } // END - foreach +// Remove array +unset($INC_POOL); + if (EXT_IS_ACTIVE("rallye")) { // Check expired rallyes (hard-coded 3 days limit for displaying expired rallyes!) require_once(PATH."inc/libs/rallye_functions.php"); diff --git a/inc/check-reset.php b/inc/check-reset.php index 1b348a97c7..ec19cb8952 100644 --- a/inc/check-reset.php +++ b/inc/check-reset.php @@ -59,6 +59,9 @@ if ((date("d", $_CONFIG['last_update']) != date("d", time())) && (!defined('mxch foreach ($INC_POOL as $incFile) { require_once($incFile); } // END - foreach + + // Remove array + unset($INC_POOL); } // END - if // diff --git a/inc/databases.php b/inc/databases.php index d2fd859d8c..2972c22995 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -113,7 +113,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // This current patch level -define('CURR_SVN_REVISION', "391"); +define('CURR_SVN_REVISION', "392"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/extensions.php b/inc/extensions.php index b480c0e5a4..0e2b92430e 100644 --- a/inc/extensions.php +++ b/inc/extensions.php @@ -186,6 +186,9 @@ function EXTENSION_REGISTER ($ext_name, $id, $dry_run=false) foreach ($INC_POOL as $inc) { require_once($inc); } // END - foreach + + // Remove array + unset($INC_POOL); } // END - if // Register extension diff --git a/inc/extensions/ext-surfbar.php b/inc/extensions/ext-surfbar.php index 80ff6e7e98..91a96b47ec 100644 --- a/inc/extensions/ext-surfbar.php +++ b/inc/extensions/ext-surfbar.php @@ -162,7 +162,9 @@ INDEX (`status`) $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_pause_url` VARCHAR(255) NOT NULL DEFAULT ''"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_notify_limits` ENUM('Y','N') NOT NULL DEFAULT 'Y'"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_warn_low_points` BIGINT(20) NOT NULL DEFAULT 100"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_low_interval` BIGINT(20) NOT NULL DEFAULT ".$_CONFIG['one_day'].""; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_migrate_order` ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_notification_mode` ENUM('INSTANT','RESET') NOT NULL DEFAULT 'INSTANT'"; // Extend user data $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD `surfbar_low_notified` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'"; diff --git a/inc/language/surfbar_de.php b/inc/language/surfbar_de.php index d76db8f08c..c9a6b65beb 100644 --- a/inc/language/surfbar_de.php +++ b/inc/language/surfbar_de.php @@ -61,6 +61,10 @@ define('ADMIN_CONFIG_SURFBAR_PAUSE_URL', "Externe Pausenseite (leer lassen, wenn define('ADMIN_CONFIG_SURFBAR_NOTIFY_LIMITS', "Soll das Mitglied per Mail benachrichtigt werden, wenn aufrufbegrenzte URLs abgelaufen und auf "pausierend" gesetzt sind?"); define('ADMIN_CONFIG_SURFBAR_WARN_LOW_POINTS', "Mitglied warnen, wenn {!POINTS!}-Guthaben unterschritten ist: (0=keine Warnung aussenden)"); define('ADMIN_CONFIG_SURFBAR_MIGRATE_ORDER', "Sollen URLs aus Mailfreischaltungen in die Surfbar migriert werden?"); +define('ADMIN_CONFIG_SURFBAR_LOW_INTERVAL', "Wiederholungsinterval für Nachrichten wegen niedrigem {!POINTS!}-Guthaben:"); +define('ADMIN_CONFIG_SURFBAR_NOTIFICATION_MODE', "Benachrichtigungen sofort oder beim täg;lichen Reset aussenden? ("Sofort" kann zu Verzögerungen und/oder Belastung des Servers führen!"); +define('ADMIN_CONFIG_SURFBAR_NOTIFICATION_MODE_INSTANT', "Sofort aussenden"); +define('ADMIN_CONFIG_SURFBAR_NOTIFICATION_MODE_RESET', "Beim täglichen Reset"); // General admin text define('ADMIN_SURFBAR_NO_REF_LEVELS_FOUND', "Zur Zeit sind keine Referal-Ebenen für die Surfbar eingestellt.
\nBitte installieren Sie die Erweiterung surfbar neu."); @@ -117,6 +121,7 @@ define('MEMBER_SURFBAR_TEST_URL', "URL anzeigen"); define('MEMBER_SURFBAR_LIST_NOTE', "Hinweise: Bitte beachten Sie, dass Editieren, erneutes Aktivieren von gestoppten URLs und nochmalige Anmeldung nach Ablehnung eine Freischaltung durch unsere Administratoren nötig ist. Migrierte URLs sind in der Surfbar nicht freigegeben und bedarfen einer Buchungsbestätigung ("Jetzt buchen" bitte dazu anklicken) Ihrerseits, da die Bewerbung Ihrer URL in der Surfbar zusätzliche {!POINTS!}-Kosten bedeuten. Die aktuellen Kosten entnehmen Sie bitte der Seite "Surfbar starten" oder "URL buchen" aus dem Surfbar-Mitgliedsmenü."); define('MEMBER_SURFBAR_ACTION_DONE', "Ausgewählte Aktion ausgeführt."); define('MEMBER_SURFBAR_ACTION_FAILED', "Ausgewählte Aktion konnte nicht vollständig ausgeführt werden!"); +define('MEMBER_SURFBAR_UNLIMITED_VIEWS', "Unbegrenzt"); // Subject lines for admins define('ADMIN_SURFBAR_NOTIFY_URL_UNLOCK_SUBJECT', "[Surfbar:] URL hinzugefügt durch Admin"); diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index bdc6cd749c..da1f944f50 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) { // Do some pre-checks if (!IS_ADMIN()) { // Not an admin @@ -56,10 +56,13 @@ function SURFBAR_ADMIN_ADD_URL ($url) { } elseif (!SURFBAR_IF_USER_BOOK_MORE_URLS()) { // No more allowed! return false; + } elseif ("".bigintval($limit)."" != "".$limit."") { + // 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", $limit); } // Admin unlocked an email so we can migrate the URL function SURFBAR_ADMIN_MIGRATE_URL ($url, $uid) { @@ -139,7 +142,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 +158,13 @@ function SURFBAR_MEMBER_ADD_URL ($url) { } elseif (!SURFBAR_IF_USER_BOOK_MORE_URLS($GLOBALS['userid'])) { // No more allowed! return false; + } elseif ("".bigintval($limit)."" != "".$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", $limit); } // Create list of actions depending on status for the user function SURFBAR_MEMBER_ACTIONS ($urlId, $status) { @@ -349,7 +355,7 @@ ORDER BY %s %s return $lastUrlData; } // Registers an URL with the surfbar. You should have called SURFBAR_LOOKUP_BY_URL() first! -function SURFBAR_REGISTER_URL ($url, $uid, $status="PENDING", $addMode="reg") { +function SURFBAR_REGISTER_URL ($url, $uid, $status="PENDING", $addMode="reg", $limit=0) { global $_CONFIG; // Make sure by the user registered URLs are always pending @@ -360,14 +366,22 @@ function SURFBAR_REGISTER_URL ($url, $uid, $status="PENDING", $addMode="reg") { 'url' => $url, 'frametester' => FRAMETESTER($url), 'uid' => $uid, - 'status' => $status + 'status' => $status, + 'limit' => $limit ); // Insert the URL into database $content['insert_id'] = SURFBAR_INSERT_URL_BY_ARRAY($content); - // Translate status, reward and costs + // Is this ID valid? + if ($content['insert_id'] == 0) { + // INSERT did not insert any data! + return false; + } // END - if + + // Translate status and limit $content['status'] = SURFBAR_TRANSLATE_STATUS($content['status']); + $content['limit'] = SURFBAR_TRANSLATE_LIMIT($content['limit']); // If in reg-mode we notify admin if (($addMode == "reg") || ($_CONFIG['surfbar_notify_admin_unlock'] == "Y")) { @@ -390,11 +404,13 @@ function SURFBAR_INSERT_URL_BY_ARRAY ($urlData) { if (empty($uid)) $uid = 0; // Just run the insert query for now - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_surfbar_urls (userid, url, status) VALUES(%s, '%s', '%s')", + SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_surfbar_urls (userid,url,status,views_max,views_allowed) VALUES(%s,'%s','%s','%s','%s')", array( $uid, $urlData['url'], - $urlData['status'] + $urlData['status'], + $urlData['limit'], + $urlData['limit'] ), __FILE__, __LINE__ ); @@ -443,6 +459,20 @@ function SURFBAR_NOTIFY_USER ($messageType, $content) { // Send the email return SEND_EMAIL($content['uid'], $subject, $mailText); } +// Translates the limit +function SURFBAR_TRANSLATE_LIMIT ($limit) { + // Is this zero? + if ($limit == 0) { + // Unlimited! + $return = MEMBER_SURFBAR_UNLIMITED_VIEWS; + } else { + // Translate comma + $return = TRANSLATE_COMMA($limit); + } + + // Return value + return $return; +} // Translate the URL status function SURFBAR_TRANSLATE_STATUS ($status) { // Create constant name @@ -737,8 +767,20 @@ function SURFBAR_PAY_POINTS ($urlId) { function SURFBAR_UPDATE_INSERT_STATS_RECORD () { global $_CONFIG; - // Update views_total - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_surfbar_urls SET views_total=views_total+1 WHERE id=%s LIMIT 1", + // Init add + $ADD = ""; + + // Get allowed views + $allowed = SURFBAR_GET_ALLOWED_VIEWS(); + + // Do we have a limit? + if ($allowed > 0) { + // Then count views_max down! + $ADD .= ",views_max=views_max-1"; + } // END - if + + // Update URL stats + SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_surfbar_urls SET views_total=views_total+1".$ADD." WHERE id=%s LIMIT 1", array(SURFBAR_GET_ID()), __FILE__, __LINE__); // Update the stats entry @@ -1200,7 +1242,7 @@ function SURFBAR_DETERMINE_NEXT_ID ($urlId = 0) { // And query the database //DEBUG_LOG(__FUNCTION__.":randNum={$randNum},maxRand={$maxRand},surfLock=".SURFBAR_GET_DATA('surf_lock').""); - $result = SQL_QUERY_ESC("SELECT sbu.id, sbu.userid, sbu.url, sbs.last_salt, sbu.reward, sbu.costs, sbu.views_total, UNIX_TIMESTAMP(l.last_surfed) AS last_surfed + $result = SQL_QUERY_ESC("SELECT sbu.id, sbu.userid, sbu.url, sbs.last_salt, sbu.reward, sbu.costs, sbu.views_total, sbu.views_max, sbu.views_allowed, UNIX_TIMESTAMP(l.last_surfed) AS last_surfed FROM "._MYSQL_PREFIX."_surfbar_urls AS sbu LEFT JOIN "._MYSQL_PREFIX."_surfbar_salts AS sbs ON sbu.id=sbs.url_id @@ -1214,7 +1256,7 @@ LIMIT %s,1", ); } else { // Get data from specified id number - $result = SQL_QUERY_ESC("SELECT sbu.id, sbu.userid, sbu.url, sbs.last_salt, sbu.reward, sbu.costs, sbu.views_total, UNIX_TIMESTAMP(l.last_surfed) AS last_surfed + $result = SQL_QUERY_ESC("SELECT sbu.id, sbu.userid, sbu.url, sbs.last_salt, sbu.reward, sbu.costs, sbu.views_total, sbu.views_max, sbu.views_allowed, UNIX_TIMESTAMP(l.last_surfed) AS last_surfed FROM "._MYSQL_PREFIX."_surfbar_urls AS sbu LEFT JOIN "._MYSQL_PREFIX."_surfbar_salts AS sbs ON sbu.id=sbs.url_id @@ -1342,5 +1384,10 @@ function SURFBAR_GET_RELOAD_TIME () { // Get data element and return its contents return SURFBAR_GET_DATA('time'); } +// Getter for allowed views +function SURFBAR_GET_ALLOWED_VIEWS () { + // Get data element and return its contents + return SURFBAR_GET_DATA('views_allowed'); +} // ?> diff --git a/inc/load_cache.php b/inc/load_cache.php index f97f04d471..fad1bdde22 100644 --- a/inc/load_cache.php +++ b/inc/load_cache.php @@ -46,5 +46,8 @@ foreach ($INC_POOL as $fqfn) { require_once($fqfn); } // END - foreach +// Remove array +unset($INC_POOL); + // ?> diff --git a/inc/load_extensions.php b/inc/load_extensions.php index 4a70153045..f804ae6baf 100644 --- a/inc/load_extensions.php +++ b/inc/load_extensions.php @@ -280,11 +280,14 @@ if ((SQL_NUMROWS($res_ext_crt) > 0) && (($cacheMode == "init") || ($cacheMode == SQL_FREERESULT($res_ext_crt); } -// Load include files +// Load include files if found if (!empty($INC_POOL[0])) { foreach ($INC_POOL as $inc) { require_once($inc); } // END - foreach + + // Remove array + unset($INC_POOL); } // END - if // Uninstall extensions that are no longer in our system diff --git a/inc/modules/admin/what-add_surfbar_url.php b/inc/modules/admin/what-add_surfbar_url.php index 93c63c81b3..b3f5bf3175 100644 --- a/inc/modules/admin/what-add_surfbar_url.php +++ b/inc/modules/admin/what-add_surfbar_url.php @@ -43,7 +43,7 @@ ADD_DESCR("admin", basename(__FILE__)); // Was an URL added? if ((isset($_POST['add'])) && (!empty($_POST['url']))) { // Then add this URL - if (SURFBAR_ADMIN_ADD_URL($_POST['url'])) { + if (SURFBAR_ADMIN_ADD_URL($_POST['url'], $_POST['limit'])) { // URL was added LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_SURFBAR_URL_ADDED); } else { diff --git a/inc/modules/admin/what-config_surfbar.php b/inc/modules/admin/what-config_surfbar.php index 0a3eb8bc07..f486767182 100644 --- a/inc/modules/admin/what-config_surfbar.php +++ b/inc/modules/admin/what-config_surfbar.php @@ -68,7 +68,9 @@ if (isset($_POST['ok'])) { // @TODO Rewrite this to tiny selection boxes 'surfbar_purge_migrated' => $_CONFIG['surfbar_purge_migrated'], 'surfbar_pause_url' => $_CONFIG['surfbar_pause_url'], - 'surfbar_warn_low_points' => $_CONFIG['surfbar_warn_low_points'] + 'surfbar_warn_low_points' => $_CONFIG['surfbar_warn_low_points'], + // @TODO Rewrite this to tiny selection boxes + 'surfbar_low_interval' => $_CONFIG['surfbar_low_interval'], ); // Prepare payment model for template @@ -85,33 +87,33 @@ if (isset($_POST['ok'])) { // Prepare auto-sart if ($_CONFIG['surfbar_autostart'] == "Y") { // Yes selected - define('__CONFIG_SURFBAR_AUTOSTART_Y' , " checked=\"checked\""); + define('__CONFIG_SURFBAR_AUTOSTART_Y', " checked=\"checked\""); define('__CONFIG_SURFBAR_AUTOSTART_N', ""); } else { // No selected - define('__CONFIG_SURFBAR_AUTOSTART_Y' , ""); + define('__CONFIG_SURFBAR_AUTOSTART_Y', ""); define('__CONFIG_SURFBAR_AUTOSTART_N', " checked=\"checked\""); } // Prepare notify limits if ($_CONFIG['surfbar_notify_limits'] == "Y") { // Yes selected - define('__CONFIG_SURFBAR_NOTIFY_LIMITS_Y' , " checked=\"checked\""); + define('__CONFIG_SURFBAR_NOTIFY_LIMITS_Y', " checked=\"checked\""); define('__CONFIG_SURFBAR_NOTIFY_LIMITS_N', ""); } else { // No selected - define('__CONFIG_SURFBAR_NOTIFY_LIMITS_Y' , ""); + define('__CONFIG_SURFBAR_NOTIFY_LIMITS_Y', ""); define('__CONFIG_SURFBAR_NOTIFY_LIMITS_N', " checked=\"checked\""); } // Prepare order migration if ($_CONFIG['surfbar_migrate_order'] == "Y") { // Yes selected - define('__CONFIG_SURFBAR_MIGRATE_ORDER_Y' , " checked=\"checked\""); + define('__CONFIG_SURFBAR_MIGRATE_ORDER_Y', " checked=\"checked\""); define('__CONFIG_SURFBAR_MIGRATE_ORDER_N', ""); } else { // No selected - define('__CONFIG_SURFBAR_MIGRATE_ORDER_Y' , ""); + define('__CONFIG_SURFBAR_MIGRATE_ORDER_Y', ""); define('__CONFIG_SURFBAR_MIGRATE_ORDER_N', " checked=\"checked\""); } @@ -126,6 +128,17 @@ if (isset($_POST['ok'])) { define('__CONFIG_SURFBAR_PAUSE_MODE_EXTERNAL', " checked=\"checked\""); } + // Notification mode + if ($_CONFIG['surfbar_notification_mode'] == "INSTANT") { + // Instant notification + define('__CONFIG_SURFBAR_NOTIFICATION_MODE_INSTANT', " selected=\"selected\""); + define('__CONFIG_SURFBAR_NOTIFICATION_MODE_RESET' , ""); + } else { + // Only daily reset + define('__CONFIG_SURFBAR_NOTIFICATION_MODE_INSTANT', ""); + define('__CONFIG_SURFBAR_NOTIFICATION_MODE_RESET' , " selected=\"selected\""); + } + // Load template LOAD_TEMPLATE("admin_config_surfbar", false, $content); } diff --git a/inc/modules/admin/what-extensions.php b/inc/modules/admin/what-extensions.php index a8181f2999..e81f62f249 100644 --- a/inc/modules/admin/what-extensions.php +++ b/inc/modules/admin/what-extensions.php @@ -276,8 +276,6 @@ case "overview": // List all registered extensions // No extensions are registered LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_NO_EXTENSION_REGISTERED.""); } - // Link for checking for new or updated extensions - OUTPUT_HTML("
".ADMIN_SEARCH_NEW_EXTENSIONS.""); break; case "register": // Register new extension @@ -335,126 +333,6 @@ case "register": // Register new extension } break; -case "search": // Search for new extensions on our server - // Get response from our server - $response = GET_URL("extensions.php"); - - // Are extensions found? - if (($response[sizeof($response) - 1] == "[EOF]") && ($response[0] != "[EOF]")) - { - // Ok, mark found and create the array - $EXT_SEARCH = array( - 'fname' => array(), // File names - 'fsize' => array(), // File size - 'fctime' => array(), // File creation timestamp - 'infos' => array(), // File informations (maybe loaded!) - 'ver' => array(), // Version number - 'cver' => array(), // Current version number - ); - - // Get count of extensions for validation - $count = trim($response[sizeof($response) - 2]); - foreach ($response as $id => $value) - { - $value = str_replace("\n", "", $value); $ver = ""; - // Leave loop when data is invalid or EOF? - if ((substr($value, 0, 4) == "ext-") && (substr($value, -4) == ".zip")) - { - $name = substr($value, 4, -4); - $file = sprintf("%sinc/extensions/ext-%s.php", PATH, $name); - $ver = trim(substr($response[$id + 3], 4)); - - // Load current extension's version - $cver = GET_EXT_VERSION($name); - if (empty($cver)) $cver = "-.-"; - - // Is the extension already installed or not? - if (!FILE_READABLE($file) || ($ver != $cver)) - { - // No, it isn't. So let's add this one! - $EXT_SEARCH['fname'][] = $name; - $EXT_SEARCH['fsize'][] = $response[$id + 1]; - $EXT_SEARCH['fctime'][] = $response[$id + 2]; - $EXT_SEARCH['ver'][] = $ver; - $EXT_SEARCH['cver'][] = $cver; - - $LANG_DUMMY = explode("[nl]", $response[$id + 4]); - $LANG = array(); - $INFO = ADMIN_EXT_NO_INFO_FOUND; - - // Trim every data line - foreach ($LANG_DUMMY as $k => $v) - { - $v = trim($v); - if (substr($v, 3) == "") $v = "---"; - $LANG_DUMMY[$k] = $v; - if ($v == "xx:xx") break; - $LANG[] = $v; - } - - // If language is found stop searching on matching line - foreach($LANG as $search) - { - if (substr($search, 0, 3) == (GET_LANGUAGE().":")) { $INFO = substr($search, 3); break; } - } - - // Add informations to array - $EXT_SEARCH['infos'][] = $INFO; - } - } - } - - // Ok, extensions are on our server but maybe you have already installed them? - if (sizeof($EXT_SEARCH['fname']) > 0) - { - // Sort array (I missed ver and cver here) - array_pk_sort($EXT_SEARCH, array("cver", "fname"), 0, 1); - - // Extensions where found which are not downloaded and installed - $SW = 2; $OUT = ""; $TSIZE = 0; - foreach ($EXT_SEARCH['fname'] as $id => $name) - { - // Generate download link - $LINK = SERVER_URL."/extensions/ext-".$name.".zip"; - - // Prepare data for the row template - $content = array( - 'sw' => $SW, - 'id' => ($id + 1), - 'name' => $name, - 'new_ver' => $EXT_SEARCH['ver'][$id], - 'old_ver' => $EXT_SEARCH['cver'][$id], - 'link' => $LINK, - 'last' => MAKE_DATETIME($EXT_SEARCH['fctime'][$id], "2"), - 'size' => TRANSLATE_COMMA(round($EXT_SEARCH['fsize'][$id] / 1.024) / 1000), - 'info' => $EXT_SEARCH['infos'][$id], - ); - - // Load row template add current size to total size and switch color - $OUT .= LOAD_TEMPLATE("admin_list_extensions_row", true, $content); - $TSIZE += $EXT_SEARCH['fsize'][$id]; - $SW = 3 - $SW; - } - define('__EXTENSIONS_ROWS', $OUT); - define('__TKBYTES_VALUE', TRANSLATE_COMMA(round($TSIZE / 1.024) / 1000)); - define('__TEXT_VALUE', sizeof($EXT_SEARCH['fname'])); - - // Load template - LOAD_TEMPLATE("admin_list_extensions"); - } - else - { - // All extensions are downloaded and installed - LOAD_TEMPLATE("admin_extensions_installed", false, $count); - } - } - else - { - // No extensions where found - LOAD_TEMPLATE("admin_extensions_404"); - } - break; - case "demo": LOAD_TEMPLATE("admin_settings_saved", false, SETTINGS_NOT_SAVED); break; diff --git a/templates/de/emails/admin/admin_surfbar_url_reg.tpl b/templates/de/emails/admin/admin_surfbar_url_reg.tpl index eb593b2173..779163baca 100644 --- a/templates/de/emails/admin/admin_surfbar_url_reg.tpl +++ b/templates/de/emails/admin/admin_surfbar_url_reg.tpl @@ -13,6 +13,8 @@ $content[frametester] ------------------------------------------ User-ID: $content[uid] ------------------------------------------ +Anzahl Aufrufe: $content[limit] +------------------------------------------ Status: $content[status] ------------------------------------------ ID in der Surfbar: $content[insert_id] diff --git a/templates/de/emails/admin/admin_surfbar_url_unlock.tpl b/templates/de/emails/admin/admin_surfbar_url_unlock.tpl index ed38b6744a..19617c2ae4 100644 --- a/templates/de/emails/admin/admin_surfbar_url_unlock.tpl +++ b/templates/de/emails/admin/admin_surfbar_url_unlock.tpl @@ -11,6 +11,8 @@ $content[frametester] ------------------------------------------ Status: $content[status] ------------------------------------------ +Anzahl Aufrufe: $content[limit] +------------------------------------------ ID in der Surfbar: $content[insert_id] ------------------------------------------ diff --git a/templates/de/emails/member/member_surfbar_url_reg.tpl b/templates/de/emails/member/member_surfbar_url_reg.tpl index 67f6457b48..8c44ccef22 100644 --- a/templates/de/emails/member/member_surfbar_url_reg.tpl +++ b/templates/de/emails/member/member_surfbar_url_reg.tpl @@ -8,6 +8,8 @@ Gebuchte URL: $content[url] ------------------------------------------ Ihre User-ID: $content[uid] ------------------------------------------ +Anzahl Aufrufe: $content[limit] +------------------------------------------ Status: $content[status] ------------------------------------------ ID in der Surfbar: $content[insert_id] diff --git a/templates/de/emails/member/member_surfbar_url_unlock.tpl b/templates/de/emails/member/member_surfbar_url_unlock.tpl index 320dfcd09f..9a16795c6c 100644 --- a/templates/de/emails/member/member_surfbar_url_unlock.tpl +++ b/templates/de/emails/member/member_surfbar_url_unlock.tpl @@ -10,6 +10,8 @@ Ihre User-ID: $content[uid] ------------------------------------------ Status: $content[status] ------------------------------------------ +Anzahl Aufrufe: $content[limit] +------------------------------------------ ID in der Surfbar: $content[insert_id] ------------------------------------------ diff --git a/templates/de/html/admin/admin_add_surfbar_url.tpl b/templates/de/html/admin/admin_add_surfbar_url.tpl index 16a26063f5..17155247a4 100644 --- a/templates/de/html/admin/admin_add_surfbar_url.tpl +++ b/templates/de/html/admin/admin_add_surfbar_url.tpl @@ -8,6 +8,11 @@ URL eingeben: +
+ Maximale Einblendung:
+ (0 = Unbegrenzt) +
+
 * diff --git a/templates/de/html/admin/admin_config_surfbar.tpl b/templates/de/html/admin/admin_config_surfbar.tpl index ced6bea0d5..3337b1fc3a 100644 --- a/templates/de/html/admin/admin_config_surfbar.tpl +++ b/templates/de/html/admin/admin_config_surfbar.tpl @@ -1,215 +1,239 @@ -
- - - + + + + + + + + + +
+ + + + - - - - + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - - + + + + + - - - - - - + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - + + + + + + + + + + - - - - - - - - - -
{--ADMIN_CONFIG_SURFBAR_TITLE--} -
 
+
 
{--ADMIN_CONFIG_SURFBAR_STATIC_REWARD--} - - {!POINTS!} -
 
+ + {!POINTS!} +
 
{--ADMIN_CONFIG_SURFBAR_STATIC_COSTS--} - - {!POINTS!} -
 
+ + {!POINTS!} +
 
{--ADMIN_CONFIG_SURFBAR_STATIC_TIME--} - - -
 
+ + +
 
{--ADMIN_CONFIG_SURFBAR_STATIC_LOCK--} - - -
 
+ + +
 
{--ADMIN_CONFIG_SURFBAR_DYNAMIC_PERCENT--} - - % -
 
+ + % +
 
{--ADMIN_CONFIG_SURFBAR_MAX_ORDER--} - - -
 
+ + +
 
{--ADMIN_CONFIG_SURFBAR_RESTART_TIME--} - - -
 
+ + +
 
{--ADMIN_CONFIG_SURFBAR_STATS_RELOAD--} - - -
 
+ + +
 
{--ADMIN_CONFIG_SURFBAR_PURGE_DELETED--} - - -
 
+ + +
 
{--ADMIN_CONFIG_SURFBAR_PURGE_MIGRATED--} - - -
 
+ +
 
 
+
 
{--ADMIN_CONFIG_SURFBAR_PAYMENT_MODEL_STATIC--} - - -
+ + +
{--ADMIN_CONFIG_SURFBAR_PAYMENT_MODEL_DYNAMIC--} - - -
 
+ +
 
 
+
 
{--ADMIN_CONFIG_SURFBAR_PAUSE_MODE_INTERNAL--} - - -
+ + +
{--ADMIN_CONFIG_SURFBAR_PAUSE_MODE_EXTERNAL--} - - -
 
+ + +
 
{--ADMIN_CONFIG_SURFBAR_PAUSE_URL--} - - -
 
 
+ +
 
 
+ +
 
 
 
-  {--YES--} -  {--NO--} -
 
 
 
+  {--YES--} +  {--NO--} +
 
 
 
-  {--YES--} -  {--NO--} -
 
 
+
 
+  {--YES--} +  {--NO--} +
 
 
{--ADMIN_CONFIG_SURFBAR_WARN_LOW_POINTS--} - - {!POINTS!} -
 
+ {!POINTS!} +
 
+ {--ADMIN_CONFIG_SURFBAR_LOW_INTERVAL--} + + +
 
 
-  {--YES--} -  {--NO--} -
 
- +
 
+  {--YES--} +  {--NO--} +
 
+
{--ADMIN_CONFIG_SURFBAR_NOTE--} -- 2.30.2