]> git.mxchange.org Git - mailer.git/commitdiff
Surfbar continued and some rewrites/fixes:
authorRoland Häder <roland@mxchange.org>
Thu, 27 Nov 2008 20:10:18 +0000 (20:10 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 27 Nov 2008 20:10:18 +0000 (20:10 +0000)
- Some rewrites in base (root) scripts
- Surfbar continued with with edit form (saving data not completed!)
- Minor improvements/fixes

33 files changed:
.gitattributes
admin.php
agb.php
beg.php
birthday_confirm.php
click.php
confirm.php
css.php
debug.php
doubler.php
img.php
inc/databases.php
inc/extensions/ext-surfbar.php
inc/libs/surfbar_functions.php
inc/modules/guest/what-wernis_portal.php
inc/modules/member/what-surfbar_book.php
index.php
install.php
js.php
lead-confirm.php
login.php
mailid.php
mailid_top.php
modules.php
ref.php
show_bonus.php
sponsor_confirm.php
sponsor_ref.php
surfbar.php
templates/de/html/member/member_surfbar_book_dynamic.tpl
templates/de/html/member/member_surfbar_book_static.tpl
templates/de/html/member/member_surfbar_edit_action_form.tpl [new file with mode: 0644]
view.php

index 853b4870b9a10e9cf2601cb35fc93f3351e350cf..4947c0a6e7fe1a5011e4f0820d9267dd2857fae8 100644 (file)
@@ -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
index 5c6f49d107b058e58c25e1eae78fcbffb31d2797..5a04fc8eb97b136e1424f1733c71cea8cc801d0a 100644 (file)
--- 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&amp;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 3302830217ec27d74238b7f82bf89443b005b406..7f020fcd608852c8f032b901ef4e9c05149e1eea 100644 (file)
--- 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 0f69f2a4bafa798b3127766077b2317b27e1be67..368d6db1dc5b8b3875d99ec1d86eb053141acb07 100644 (file)
--- 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")) {
index 22cd6bf61b76462d826c57cc3b958f29242a5581..daf118af8a5f7c90c1c2cc3ca97e013d3c5a5b22 100644 (file)
@@ -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")) {
index c10ff149c390d339ecba036cd6cca32a9ebda8db..515a958587ba3583e8e94c20978026c9cc85c834 100644 (file)
--- 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...
index 571941f329d8aa95de5401d6f45397d0ca91d271..b6542b63204c40575f2a38d54152f37a827b8e1a 100644 (file)
@@ -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 4092cda32106c76e80df98d8a3e3a5f0c01f0967..1917cee822bc65efbcd69cad64ce5cccd5c7ea20 100644 (file)
--- 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");
index 7fefdf8c6d7a2b701495273d1f3d5ac7941d30b6..dd213e44f9a2ea27a767913ade8eb233b2b36d88 100644 (file)
--- 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')) {
index b779650b0e462b5688a0131b43672f307d0a1738..4bbc6581b02d46f7d2319a8834136b641185606e 100644 (file)
@@ -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 c962aeca321935c06f7ea5ef5c8f1fb1dc2dd6ce..2e7d46fb9d1f1ca0e75859e5f315b5659db0c14e 100644 (file)
--- 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')) {
index 4d01b2b34d89490703f4b1cb335f945d37427f63..c6f35b9113821964ae0269bcf229357242e5b739 100644 (file)
@@ -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);
index e18f2e011ef2b0e6fc3bc7422d35cd24c9567084..723662b98fbf5664541ac71a7e75b5c906bdc3e9 100644 (file)
@@ -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
index 7bef4431ce29075100aa8b753775dce5469ed24e..fa03501c1d10ae45d0c5a356946bde011d793e94 100644 (file)
@@ -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",
index c7039a03a8cefabe1c30d9959a96ce5296cfee3c..dae458d7fbf0ea89d8f04d4b34dcbede7793abcd 100644 (file)
@@ -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__);
index 97bc955c30e4b6f093c80d9b141920e0f3e98739..977548668f7916a2faa3cd8086f24aed2d7fa67e 100644 (file)
@@ -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);
index 5a4e26340be790fbc6d16605fc6ad958683b6410..e0d16d72666fa569bbd400afacd600a94139bb13 100644 (file)
--- 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')) {
index 4cad098b71c09b65629769f92f1506c80ba44a19..51fb165eacc5238343035fbc54a520951c447516 100644 (file)
@@ -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 922b8768a516ae1648bde0a568fb20bf96927147..0ced4dccaf11e6bda308c25d8683d0c20a7b768a 100644 (file)
--- 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']))) {
index d9724b76969187bf92cc7e7ccc3dc63a71d19147..28672cccafef3d47b60e6dd44eae9434a3707df4 100644 (file)
@@ -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')) {
index e0e72b32ac94b32691e433821151b1643a83baeb..575533ed9264585cc29b805c72404e1bf24e788c 100644 (file)
--- 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&amp;what=login");
        // Redirection should be done here
-}
- else
-{
+} else {
        // You have to configure first!
        LOAD_URL("install.php");
 }
+
 // Really all done here... ;-)
 ?>
index a913ef06ff0a1b5e2472c21667ee0a04ee2ad802..fe2c59e7ab54ee16c4c52073eacb77fa80a43c6a 100644 (file)
@@ -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!
index 921effc2eef02796b4b23e833fd231049f5ded3d..cee39dbc3a0dbf89fad0831d1a33db2b218644b7 100644 (file)
@@ -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'))
 {
index 78bf8c7c3902a1cd5f24cae5cbea874d11ca9c7a..da08bc735fc55e67f139b873c7f193345796a599 100644 (file)
@@ -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 b8e7c2e03599351b35cd4ed47c4cb363512e9951..3d62586d555d0d82f972bfd92bb408f992c5a25c 100644 (file)
--- 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')) {
index 44bf06c84351922b8c84526d996828951a070437..0953786b2cc935e6d350ce58fba281a5ef1c9fc0 100644 (file)
@@ -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', "<FONT class=\"guest_failed\">".BONUS_SHOW_NO_DATA."</FONT>");
                        }
 
                        // Free memory
                        SQL_FREERESULT($result);
-               }
-                else
-               {
+               } else {
                        // Wrong type entered
                        define('__BONUS_MSG', "<FONT class=\"guest_failed\">".BONUS_SHOW_WRONG_TYPE."</FONT>");
                }
-       }
-        else
-       {
+       } else {
                // Wrong call!
                define('__BONUS_MSG', "<FONT class=\"guest_failed\">".BONUS_SHOW_WRONG_CALL."</FONT>");
        }
@@ -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... ;-)
 ?>
index c10f2cef31c8518f0b37f3f7a86d08db2e27e11f..e1c9c464389b694a5259bea28a8013ab785f795f 100644 (file)
@@ -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')) {
index 73ffd57b17f5a8fefb7faf27c15ce168f408e466..6b66586eab150f2f947a075412ea87733494d037 100644 (file)
@@ -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))) {
index bcedacfb55a12d4007802a8ae7eb1eff28973c60..4966280da18cfbf8b0bd7acdfc0ef804ec99ce67 100644 (file)
@@ -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')) {
index fef10a0188eb744cb2eff71ca0652e869cb1d8c5..cf36517664dea0cbc2d6332e032cc5eeb76e147b 100644 (file)
@@ -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;
 }
 
index 48e29ffed6a07c6e416a7f6f369b377079bbd989..ede041a8cf5cec84cd05fa40dc3b3b1151cb7f19 100644 (file)
@@ -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 (file)
index 0000000..9c53c92
--- /dev/null
@@ -0,0 +1,79 @@
+<form id="edit" action="{!URL!}/modules.php?module=login&amp;what=surfbar_list" method="post" onsubmit="return SubmitForm()" onreset="return ResetForm()">
+<div class="member_table dashed" style="width:600px;margin-top:10px">
+       <div class="member_title2 bottom2" style="padding-top:5px;padding-bottom:5px">
+               <strong>URL in Surfbar editieren:</strong>
+       </div>
+
+       <div class="member_input bottom2" style="padding-top:5px;padding-bottom:5px">
+               URL eingeben: <input class="member_normal" type="text" name="url" size="20" maxlength="255" value="$content[url]" />
+       </div>
+
+       <div class="member_input" style="padding-top:5px;padding-bottom:5px">
+               Soll die Anzahl Aufrufe begrenzt werden?<br />
+               <input type="radio" id="limited_no" onfocus="return FocusLimitedNo()" name="limited" value="N"$content[limited_no] /> {--NO--}
+               <input type="radio" id="limited_yes" onfocus="return FocusLimitedYes()" name="limited" value="Y"$content[limited_yes] /> {--YES--}
+       </div>
+
+       <div class="member_input bottom2" style="padding-top:5px;padding-bottom:5px">
+               Aufrufe begrenzen auf: <input class="member_normal" type="text" id="limit" name="limit" size="7" maxlength="20" value="$content[views_max]" />
+       </div>
+
+       <div class="member_title2 top2" style="padding-top:5px;padding-bottom:5px">
+               <input type="reset" class="member_reset" value="{--CLEAR_FORM--}" />
+               <input type="hidden" name="id" value="$content[id]" />
+               <input type="hidden" name="action" value="edit" />
+               <input type="hidden" name="execute" value="1" />
+               <input type="submit" class="member_submit" name="ok" value="{--MEMBER_SURFBAR_ACTION_EDIT_SUBMIT--}" />
+       </div>
+</div>
+
+<script language="JavaScript" type="text/javascript">
+<!--
+var limit = document.getElementById('limit');
+var span = document.getElementById('span_limit');
+var old_limit = $content[views_max];
+
+function FocusLimitedNo () {
+       if ((limit.value > 0) && (limit.value != '-')) {
+               old_limit = limit.value;
+       }
+       limit.disabled = true;
+       limit.setAttribute('class', 'disabled');
+       limit.style.textAlign = 'center';
+       limit.value = '-';
+}
+
+function FocusLimitedYes () {
+       limit.disabled = false;
+       limit.setAttribute('class', 'member_normal');
+       limit.style.textAlign = 'left';
+       if (old_limit > 0) {
+               limit.value = old_limit;
+       } else {
+               limit.value = '';
+       }
+       limit.focus();
+}
+
+function SubmitForm () {
+       if (limit.value == '-') {
+               limit.value = 0;
+       }
+       return true;
+}
+
+function ResetForm () {
+       old_limit = 0;
+       FocusLimitedNo();
+       return false;
+}
+
+if ($content[limited] == true) {
+       FocusLimitedYes();
+} else {
+       FocusLimitedNo();
+}
+
+//-->
+</script>
+</form>
index 8194fa6804745557e79ab903c64e2bbd45da8242..6993c8ba37ec5f075784e1b7149e259828c61ae1 100644 (file)
--- 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