From d798a412acb8c1263933bd7f7a0fd9aa251495a7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 27 Nov 2008 20:10:18 +0000 Subject: [PATCH] Surfbar continued and some rewrites/fixes: - Some rewrites in base (root) scripts - Surfbar continued with with edit form (saving data not completed!) - Minor improvements/fixes --- .gitattributes | 1 + admin.php | 9 +-- agb.php | 2 +- beg.php | 2 +- birthday_confirm.php | 2 +- click.php | 2 +- confirm.php | 2 +- css.php | 2 +- debug.php | 2 +- doubler.php | 2 +- img.php | 2 +- inc/databases.php | 2 +- inc/extensions/ext-surfbar.php | 2 - inc/libs/surfbar_functions.php | 32 ++++++-- inc/modules/guest/what-wernis_portal.php | 2 +- inc/modules/member/what-surfbar_book.php | 10 +-- index.php | 2 +- install.php | 10 +-- js.php | 2 +- lead-confirm.php | 2 +- login.php | 10 +-- mailid.php | 5 +- mailid_top.php | 2 +- modules.php | 4 +- ref.php | 2 +- show_bonus.php | 33 +++----- sponsor_confirm.php | 2 +- sponsor_ref.php | 2 +- surfbar.php | 2 +- .../member/member_surfbar_book_dynamic.tpl | 6 +- .../member/member_surfbar_book_static.tpl | 6 +- .../member_surfbar_edit_action_form.tpl | 79 +++++++++++++++++++ view.php | 2 +- 33 files changed, 168 insertions(+), 79 deletions(-) create mode 100644 templates/de/html/member/member_surfbar_edit_action_form.tpl diff --git a/.gitattributes b/.gitattributes index 853b4870b9..4947c0a6e7 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1390,6 +1390,7 @@ templates/de/html/member/member_support_form.tpl -text templates/de/html/member/member_surfbar_book_dynamic.tpl -text templates/de/html/member/member_surfbar_book_static.tp -text templates/de/html/member/member_surfbar_book_static.tpl -text +templates/de/html/member/member_surfbar_edit_action_form.tpl -text templates/de/html/member/member_surfbar_link.tpl -text templates/de/html/member/member_surfbar_list.tpl -text templates/de/html/member/member_surfbar_list_row.tpl -text diff --git a/admin.php b/admin.php index 5c6f49d107..5a04fc8eb9 100644 --- a/admin.php +++ b/admin.php @@ -42,17 +42,14 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = ""; $GLOBALS['module'] = "admin"; $CSS = -1; // Load the required file(s) -require ("inc/config.php"); +require("inc/config.php"); // Is the script installed? -if (isBooleanConstantAndTrue('mxchange_installed')) -{ +if (isBooleanConstantAndTrue('mxchange_installed')) { // Simply redirect... :-) LOAD_URL("modules.php?module=admin&action=login"); // Redirection should be done here -} - else -{ +} else { // You have to configure first! LOAD_URL("install.php"); } diff --git a/agb.php b/agb.php index 3302830217..7f020fcd60 100644 --- a/agb.php +++ b/agb.php @@ -42,7 +42,7 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = ""; $GLOBALS['module'] = "agb"; $CSS = -1; // Load the required file(s) -require ("inc/config.php"); +require("inc/config.php"); // Is the script installed? if (isBooleanConstantAndTrue('mxchange_installed')) diff --git a/beg.php b/beg.php index 0f69f2a4ba..368d6db1dc 100644 --- a/beg.php +++ b/beg.php @@ -46,7 +46,7 @@ $CSS = -1; $msg = null; // Load the required file(s) -require ("inc/config.php"); +require("inc/config.php"); // Is the "beg" extension active? if (!EXT_IS_ACTIVE("beg")) { diff --git a/birthday_confirm.php b/birthday_confirm.php index 22cd6bf61b..daf118af8a 100644 --- a/birthday_confirm.php +++ b/birthday_confirm.php @@ -42,7 +42,7 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = ""; $GLOBALS['module'] = "birthday_confirm"; $CSS = -1; // Load the required file(s) -require ("inc/config.php"); +require("inc/config.php"); // Is the "birthday" extension active? if (!EXT_IS_ACTIVE("birthday")) { diff --git a/click.php b/click.php index c10ff149c3..515a958587 100644 --- a/click.php +++ b/click.php @@ -42,7 +42,7 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = ""; $GLOBALS['module'] = "click"; $CSS = -1; // Load the required file(s) -require ("inc/config.php"); +require("inc/config.php"); if (((!empty($_GET['user'])) || (!empty($_GET['reseller']))) && (!empty($_GET['banner']))) { // Update clicks counter... diff --git a/confirm.php b/confirm.php index 571941f329..b6542b6320 100644 --- a/confirm.php +++ b/confirm.php @@ -42,7 +42,7 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = ""; $GLOBALS['module'] = "confirm"; $CSS = -1; // Load the required file(s) -require ("inc/config.php"); +require("inc/config.php"); // Is the script installed? if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_installed')) && (isBooleanConstantAndTrue('admin_registered'))) diff --git a/css.php b/css.php index 4092cda321..1917cee822 100644 --- a/css.php +++ b/css.php @@ -45,7 +45,7 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = ""; $CSS = "1"; $GLOBALS['module'] = "css"; // Load the required file(s) -require ("inc/config.php"); +require("inc/config.php"); // Set header @header("Content-type: text/css"); diff --git a/debug.php b/debug.php index 7fefdf8c6d..dd213e44f9 100644 --- a/debug.php +++ b/debug.php @@ -42,7 +42,7 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = ""; $GLOBALS['module'] = "debug"; $CSS = -1; // Load the required file(s) -require ("inc/config.php"); +require("inc/config.php"); // Redirect only to registration page when this script is installed if (isBooleanConstantAndTrue('mxchange_installed')) { diff --git a/doubler.php b/doubler.php index b779650b0e..4bbc6581b0 100644 --- a/doubler.php +++ b/doubler.php @@ -46,7 +46,7 @@ $GLOBALS['refid'] = 0; $CSS = 0; // Load the required file(s) -require ("inc/config.php"); +require("inc/config.php"); // Is the "doubler" extension active? if (!EXT_IS_ACTIVE("doubler")) { diff --git a/img.php b/img.php index c962aeca32..2e7d46fb9d 100644 --- a/img.php +++ b/img.php @@ -42,7 +42,7 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = ""; $GLOBALS['module'] = "img"; $CSS = -1; // Load the required file(s) -require ("inc/config.php"); +require("inc/config.php"); // Script installed? if (isBooleanConstantAndTrue('mxchange_installed')) { diff --git a/inc/databases.php b/inc/databases.php index 4d01b2b34d..c6f35b9113 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -114,7 +114,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // This current patch level -define('CURR_SVN_REVISION', "563"); +define('CURR_SVN_REVISION', "564"); // 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/ext-surfbar.php b/inc/extensions/ext-surfbar.php index e18f2e011e..723662b98f 100644 --- a/inc/extensions/ext-surfbar.php +++ b/inc/extensions/ext-surfbar.php @@ -55,7 +55,6 @@ case "register": // Do stuff when installation is running (modules.php?module=ad `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', `url` VARCHAR(255) NOT NULL DEFAULT '', -`payment_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `last_salt` VARCHAR(255) NOT NULL DEFAULT '', `views_total` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', `views_max` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', @@ -68,7 +67,6 @@ case "register": // Do stuff when installation is running (modules.php?module=ad PRIMARY KEY(`id`), UNIQUE KEY `userid_url` (`userid`,`url`), INDEX `status_userid` (`status`,`userid`), -INDEX (`payment_id`) ) TYPE=MyISAM COMMENT='Surfbar URLs'"; // Reload locks diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index 7bef4431ce..fa03501c1d 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -320,8 +320,30 @@ function SURFBAR_MEMBER_DELETE_ACTION ($urlData) { // Display selected "action form" function SURFBAR_MEMBER_DISPLAY_ACTION_FORM ($action, $urlData) { // Translate some data - $urlData['registered'] = MAKE_DATETIME($urlData['registered'], "2"); - $urlData['views_total'] = TRANSLATE_COMMA($urlData['views_total']); + $urlData['registered'] = MAKE_DATETIME($urlData['registered'], "2"); + $urlData['views_total'] = TRANSLATE_COMMA($urlData['views_total']); + $urlData['views_max'] = TRANSLATE_COMMA($urlData['views_max']); + $urlData['views_allowed'] = TRANSLATE_COMMA($urlData['views_allowed']); + $urlData['last_locked'] = MAKE_DATETIME($urlData['last_locked'], "2"); + + // Is the lock reason empty? + if (empty($urlData['lock_reason'])) { + // Fix it to three dashes + $urlData['lock_reason'] = "---"; + } // END - if + + // Default is not limited + $urlData['limited_yes'] = ""; + $urlData['limited_no'] = " checked=\"checked\""; + $urlData['limited'] = "false"; + + // Is this URL limited? + if ($urlData['views_max'] > 0) { + // Then rewrite form data + $urlData['limited_yes'] = " checked=\"checked\""; + $urlData['limited_no'] = ""; + $urlData['limited'] = "true"; + } // END - if // Load the form and display it LOAD_TEMPLATE(sprintf("member_surfbar_%s_action_form", $action), false, $urlData); @@ -424,7 +446,7 @@ function SURFBAR_GET_URL_DATA ($searchTerm, $column="id", $order="id", $sort="AS } // END - if // Look up the record - $result = SQL_QUERY_ESC("SELECT id, userid, url, views_total, status, registered, last_locked, lock_reason, views_max, views_allowed + $result = SQL_QUERY_ESC("SELECT id, userid, url, views_total, views_max, views_allowed, status, registered, last_locked, lock_reason, views_max, views_allowed FROM "._MYSQL_PREFIX."_surfbar_urls WHERE %s='%s'".$add." ORDER BY %s %s @@ -502,7 +524,7 @@ 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,views_max,views_allowed) VALUES (%s,'%s','%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'], @@ -1255,7 +1277,7 @@ function SURFBAR_GET_USER_URLS () { $URLs = array(); // Begin the query - $result = SQL_QUERY_ESC("SELECT u.id, u.userid, u.url, u.views_total, u.status, UNIX_TIMESTAMP(u.registered) AS registered, UNIX_TIMESTAMP(u.last_locked) AS last_locked, u.lock_reason AS lock_reason + $result = SQL_QUERY_ESC("SELECT u.id, u.userid, u.url, u.views_total, u.views_max, u.views_allowed, u.status, UNIX_TIMESTAMP(u.registered) AS registered, UNIX_TIMESTAMP(u.last_locked) AS last_locked, u.lock_reason AS lock_reason FROM "._MYSQL_PREFIX."_surfbar_urls AS u WHERE u.userid=%s AND u.status != 'DELETED' ORDER BY u.id ASC", diff --git a/inc/modules/guest/what-wernis_portal.php b/inc/modules/guest/what-wernis_portal.php index c7039a03a8..dae458d7fb 100644 --- a/inc/modules/guest/what-wernis_portal.php +++ b/inc/modules/guest/what-wernis_portal.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } // Special file -require_once (PATH."inc/rdf.class.php"); +require_once(PATH."inc/rdf.class.php"); // Add description as navigation point ADD_DESCR("guest", __FILE__); diff --git a/inc/modules/member/what-surfbar_book.php b/inc/modules/member/what-surfbar_book.php index 97bc955c30..977548668f 100644 --- a/inc/modules/member/what-surfbar_book.php +++ b/inc/modules/member/what-surfbar_book.php @@ -51,7 +51,7 @@ ADD_DESCR("member", __FILE__); if (!SURFBAR_IF_USER_BOOK_MORE_URLS()) { // No more URLs allowed to book! LOAD_TEMPLATE("admin_settings_saved", false, MEMBER_SURFBAR_NO_MORE_ALLOWED); -} elseif (isset($_POST['ok'])) { +} elseif ((isset($_POST['ok'])) && (isset($_POST['limited']))) { // Is limitation "no" and "limit" is > 0? if (($_POST['limited'] == "N") && ((isset($_POST['limit'])) && ($_POST['limit'] > 0)) || (!isset($_POST['limit']))) { // Set it to unlimited @@ -61,14 +61,14 @@ if (!SURFBAR_IF_USER_BOOK_MORE_URLS()) { // Register the new URL $insertId = SURFBAR_MEMBER_ADD_URL($_POST['url'], $_POST['limit']); + // By default something went wrong + $msg = MEMBER_SURFBAR_URL_NOT_ADDED; + // Was this fine? if ($insertId > 0) { // URL added and waiting for unlock $msg = MEMBER_SURFBAR_URL_ADDED; - } else { - // Something went wrong! - $msg = MEMBER_SURFBAR_URL_NOT_ADDED; - } + } // END - if // Load message template LOAD_TEMPLATE("admin_settings_saved", false, $msg); diff --git a/index.php b/index.php index 5a4e26340b..e0d16d7266 100644 --- a/index.php +++ b/index.php @@ -43,7 +43,7 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = ""; $GLOBALS['module'] = "index"; // Load config.php -require ("inc/config.php"); +require("inc/config.php"); // Is the script installed? if (isBooleanConstantAndTrue('mxchange_installed')) { diff --git a/install.php b/install.php index 4cad098b71..51fb165eac 100644 --- a/install.php +++ b/install.php @@ -45,7 +45,7 @@ define('mxchange_installing', true); // Load security system -require ("inc/libs/security_functions.php"); +require("inc/libs/security_functions.php"); // Init "action" and "what" global $what, $action; @@ -56,10 +56,10 @@ $GLOBALS['action'] = ""; $GLOBALS['module'] = "install"; // Load config file -require ("inc/config.php"); +require("inc/config.php"); // Header -require (PATH."inc/header.php"); +require(PATH."inc/header.php"); // Reload page to page=welcome when it is not specified if (!isset($_GET['page'])) { @@ -78,14 +78,14 @@ if ((sizeof($FATAL == 0)) && (empty($FATAL[0]))) { LOAD_TEMPLATE("install_header"); // Here start's our installtion stuff - require_once (PATH."inc/install-inc.php"); + require_once(PATH."inc/install-inc.php"); // Close main installation table LOAD_TEMPLATE("install_footer"); } // Footer -require (PATH."inc/footer.php"); +require(PATH."inc/footer.php"); // ?> diff --git a/js.php b/js.php index 922b8768a5..0ced4dccaf 100644 --- a/js.php +++ b/js.php @@ -51,7 +51,7 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = ""; $CSS = "1"; $GLOBALS['module'] = "js"; // Load the required file(s) -require ("inc/config.php"); +require("inc/config.php"); // Is this script installed and a JavaScript tag is provied? if ((isBooleanConstantAndTrue('mxchange_installed')) && (isset($_GET['tag']))) { diff --git a/lead-confirm.php b/lead-confirm.php index d9724b7696..28672cccaf 100644 --- a/lead-confirm.php +++ b/lead-confirm.php @@ -43,7 +43,7 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = ""; $GLOBALS['module'] = "lead-confirm"; // Load config.php -require ("inc/config.php"); +require("inc/config.php"); // Is the script installed? if (isBooleanConstantAndTrue('mxchange_installed')) { diff --git a/login.php b/login.php index e0e72b32ac..575533ed92 100644 --- a/login.php +++ b/login.php @@ -42,19 +42,17 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = ""; $GLOBALS['module'] = "login"; // Load the required file(s) -require ("inc/config.php"); +require("inc/config.php"); // Is the script installed? -if (isBooleanConstantAndTrue('mxchange_installed')) -{ +if (isBooleanConstantAndTrue('mxchange_installed')) { // Simply redirect... :-) LOAD_URL("modules.php?module=index&what=login"); // Redirection should be done here -} - else -{ +} else { // You have to configure first! LOAD_URL("install.php"); } + // Really all done here... ;-) ?> diff --git a/mailid.php b/mailid.php index a913ef06ff..fe2c59e7ab 100644 --- a/mailid.php +++ b/mailid.php @@ -42,10 +42,9 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = ""; $GLOBALS['module'] = "mailid"; $CSS = -1; // Load the required file(s) -require ("inc/config.php"); +require("inc/config.php"); -if (isBooleanConstantAndTrue('mxchange_installed')) -{ +if (isBooleanConstantAndTrue('mxchange_installed')) { // Is the extension active if (!EXT_IS_ACTIVE("mailid", true)) { // Is not activated/installed yet! diff --git a/mailid_top.php b/mailid_top.php index 921effc2ee..cee39dbc3a 100644 --- a/mailid_top.php +++ b/mailid_top.php @@ -42,7 +42,7 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = ""; $GLOBALS['module'] = "mailid"; $CSS = 0; // Load the required file(s) -require ("inc/config.php"); +require("inc/config.php"); if (isBooleanConstantAndTrue('mxchange_installed')) { diff --git a/modules.php b/modules.php index 78bf8c7c39..da08bc735f 100644 --- a/modules.php +++ b/modules.php @@ -35,7 +35,7 @@ //xdebug_start_trace(); // Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) ) -require_once ("inc/libs/security_functions.php"); +require_once("inc/libs/security_functions.php"); // Init "action" and "what" global $what, $action, $startTime; @@ -55,7 +55,7 @@ if (!empty($_GET['what'])) $GLOBALS['what'] = secureString($_GET['what']); $GLOBALS['module'] = secureString($_GET['module']); // Needed include files -require ("inc/config.php"); +require("inc/config.php"); // Check if logged in if (IS_MEMBER()) { diff --git a/ref.php b/ref.php index b8e7c2e035..3d62586d55 100644 --- a/ref.php +++ b/ref.php @@ -42,7 +42,7 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = ""; $GLOBALS['module'] = "ref"; $CSS = -1; // Load the required file(s) -require ("inc/config.php"); +require("inc/config.php"); // Redirect only to registration page when this script is installed if (isBooleanConstantAndTrue('mxchange_installed')) { diff --git a/show_bonus.php b/show_bonus.php index 44bf06c843..0953786b2c 100644 --- a/show_bonus.php +++ b/show_bonus.php @@ -43,7 +43,7 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = ""; $GLOBALS['module'] = "show_bonus"; $CSS = 0; // Load the required file(s) -require ("inc/config.php"); +require("inc/config.php"); // Is the "bonus" extension active? if (!EXT_IS_ACTIVE("bonus")) { @@ -52,13 +52,11 @@ if (!EXT_IS_ACTIVE("bonus")) { } // END - if // List only rankings when script is installed -if (isBooleanConstantAndTrue('mxchange_installed')) -{ +if (isBooleanConstantAndTrue('mxchange_installed')) { // Include header include(PATH."inc/header.php"); - if (($_GET['uid'] > 0) && ($_GET['d'] > 0) && (!empty($_GET['t']))) - { + if (($_GET['uid'] > 0) && ($_GET['d'] > 0) && (!empty($_GET['t']))) { // Set row name $t = ""; switch ($_GET['t']) @@ -71,8 +69,9 @@ if (isBooleanConstantAndTrue('mxchange_installed')) $t = "mail_id"; break; } - if (!empty($t)) - { + + // Valid type? + if (!empty($t)) { // Check for data $result = SQL_QUERY_ESC("SELECT DISTINCT d.gender, d.surname, d.family, b.level, b.points FROM "._MYSQL_PREFIX."_user_data AS d @@ -80,8 +79,7 @@ RIGHT JOIN "._MYSQL_PREFIX."_bonus_turbo AS b ON d.userid=b.userid WHERE d.status='CONFIRMED' AND d.userid=%s AND b.".$t."='%s' LIMIT 1", array(bigintval($_GET['uid']), bigintval($_GET['d'])), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 1) - { + if (SQL_NUMROWS($result) == 1) { // Load data list($gender, $sname, $fname, $level, $points) = SQL_FETCHROW($result); @@ -99,24 +97,18 @@ WHERE d.status='CONFIRMED' AND d.userid=%s AND b.".$t."='%s' LIMIT 1", // Load pre-template define('__BONUS_MSG', LOAD_TEMPLATE("show_bonus_msg", true)); - } - else - { + } else { // No data found define('__BONUS_MSG', "".BONUS_SHOW_NO_DATA.""); } // Free memory SQL_FREERESULT($result); - } - else - { + } else { // Wrong type entered define('__BONUS_MSG', "".BONUS_SHOW_WRONG_TYPE.""); } - } - else - { + } else { // Wrong call! define('__BONUS_MSG', "".BONUS_SHOW_WRONG_CALL.""); } @@ -135,11 +127,10 @@ WHERE d.status='CONFIRMED' AND d.userid=%s AND b.".$t."='%s' LIMIT 1", // Include footer include(PATH."inc/footer.php"); -} - else -{ +} else { // You have to configure first! LOAD_URL("install.php"); } + // Really all done here... ;-) ?> diff --git a/sponsor_confirm.php b/sponsor_confirm.php index c10f2cef31..e1c9c46438 100644 --- a/sponsor_confirm.php +++ b/sponsor_confirm.php @@ -34,7 +34,7 @@ require_once("inc/libs/security_functions.php"); // Load the required file(s) -require ("inc/config.php"); +require("inc/config.php"); // Is the script installed? if (isBooleanConstantAndTrue('mxchange_installed')) { diff --git a/sponsor_ref.php b/sponsor_ref.php index 73ffd57b17..6b66586eab 100644 --- a/sponsor_ref.php +++ b/sponsor_ref.php @@ -34,7 +34,7 @@ require_once("inc/libs/security_functions.php"); // Load the required file(s) -require ("inc/config.php"); +require("inc/config.php"); // Redirect only to registration page when this script is installed if (defined('mxchange_installed') && (isBooleanConstantAndTrue(mxchange_installed))) { diff --git a/surfbar.php b/surfbar.php index bcedacfb55..4966280da1 100644 --- a/surfbar.php +++ b/surfbar.php @@ -47,7 +47,7 @@ $CSS = 0; $msg = null; // Load the required file(s) -require ("inc/config.php"); +require("inc/config.php"); // Is the script installed? if (isBooleanConstantAndTrue('mxchange_installed')) { diff --git a/templates/de/html/member/member_surfbar_book_dynamic.tpl b/templates/de/html/member/member_surfbar_book_dynamic.tpl index fef10a0188..cf36517664 100644 --- a/templates/de/html/member/member_surfbar_book_dynamic.tpl +++ b/templates/de/html/member/member_surfbar_book_dynamic.tpl @@ -41,7 +41,9 @@ var span = document.getElementById('span_limit'); var old_limit = 0; function FocusLimitedNo () { - old_limit = limit.value; + if ((limit.value > 0) && (limit.value != '-')) { + old_limit = limit.value; + } limit.disabled = true; limit.setAttribute('class', 'disabled'); limit.style.textAlign = 'center'; @@ -68,8 +70,8 @@ function SubmitForm () { } function ResetForm () { - FocusLimitedNo(); old_limit = 0; + FocusLimitedNo(); return true; } diff --git a/templates/de/html/member/member_surfbar_book_static.tpl b/templates/de/html/member/member_surfbar_book_static.tpl index 48e29ffed6..ede041a8cf 100644 --- a/templates/de/html/member/member_surfbar_book_static.tpl +++ b/templates/de/html/member/member_surfbar_book_static.tpl @@ -41,7 +41,9 @@ var span = document.getElementById('span_limit'); var old_limit = 0; function FocusLimitedNo () { - old_limit = limit.value; + if ((limit.value > 0) && (limit.value != '-')) { + old_limit = limit.value; + } limit.disabled = true; limit.setAttribute('class', 'disabled'); limit.style.textAlign = 'center'; @@ -68,8 +70,8 @@ function SubmitForm () { } function ResetForm () { - FocusLimitedNo(); old_limit = 0; + FocusLimitedNo(); return true; } diff --git a/templates/de/html/member/member_surfbar_edit_action_form.tpl b/templates/de/html/member/member_surfbar_edit_action_form.tpl new file mode 100644 index 0000000000..9c53c92d79 --- /dev/null +++ b/templates/de/html/member/member_surfbar_edit_action_form.tpl @@ -0,0 +1,79 @@ +
+
+
+ URL in Surfbar editieren: +
+ +
+ URL eingeben: +
+ +
+ Soll die Anzahl Aufrufe begrenzt werden?
+ {--NO--} + {--YES--} +
+ +
+ Aufrufe begrenzen auf: +
+ +
+ + + + + +
+
+ + +
diff --git a/view.php b/view.php index 8194fa6804..6993c8ba37 100644 --- a/view.php +++ b/view.php @@ -42,7 +42,7 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = ""; $GLOBALS['module'] = "view"; $CSS = -1; // Load the required file(s) -require ("inc/config.php"); +require("inc/config.php"); if (((!empty($_GET['user'])) || (!empty($_GET['reseller']))) && (!empty($_GET['banner']))) { // Count banner view... we currently don't need the user's id but maybe -- 2.39.5