]> git.mxchange.org Git - mailer.git/commitdiff
Surfbar now has start/stop button
authorRoland Häder <roland@mxchange.org>
Wed, 17 Sep 2008 13:07:55 +0000 (13:07 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 17 Sep 2008 13:07:55 +0000 (13:07 +0000)
inc/databases.php
inc/extensions.php
inc/extensions/ext-safe.php
inc/modules/admin/overview-inc.php
templates/de/html/surfbar/surfbar_frame_top.tpl

index aaa158a63b122757753274bcba915c9f11e21822..516745515ba6d1134c8cf436a8fda292f7c7da08 100644 (file)
@@ -113,7 +113,7 @@ define('USAGE_BASE', "usage");
 define('SERVER_URL', "http://www.mxchange.org");
 
 // This current patch level
-define('CURR_SVN_REVISION', "350");
+define('CURR_SVN_REVISION', "351");
 
 // Take a prime number which is long (if you know a longer one please try it out!)
 define('_PRIME', 591623);
index 168a3ae9cc5708bbd3feb9c34e30d91b3e655747..50820f59487c26cde3fe1cd6b96fba6b129bcdbe 100644 (file)
@@ -595,5 +595,17 @@ function GET_EXT_ID($name) {
        // Return value
        return $ret;
 }
+// Activate given extension
+function ACTIVATE_EXTENSION($ext_name) {
+       // Activate the extension
+       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_extensions SET ext_active='Y' WHERE ext_name='%s' LIMIT 1",
+               array($ext_name), __FILE__, __LINE__);
+
+       // Extension has been activated?
+       if (SQL_AFFECTEDROWS() == 1) {
+               // Then run all queries
+               EXTENSION_RUN_SQLS(GET_EXT_ID($ext_name), "activate");
+       } // END - if
+}
 //
 ?>
index 4a02e0f4e87d5981c5cfb63f9ef64621b56168e4..378bb109cdd97cb760183b0d22431e45915145c1 100644 (file)
@@ -9,7 +9,7 @@
  * Short description : A safe for storing points on a "safe" place      *
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Ein Tresor zum Ablegen der Punkte an einem       *
- *                     sicheren Ort                                     *
+ *                     "sicheren Ort"                                   *
  * -------------------------------------------------------------------- *
  *                                                                      *
  * -------------------------------------------------------------------- *
index 57d77aa258da85f4a968e68bec8cbfd5971a6e8e..0cc18dbc7b6d25c8e61f63650bffd3f5f5c9b422 100644 (file)
@@ -72,9 +72,6 @@ function OUTPUT_STANDARD_OVERVIEW(&$result_tasks)
                                        // Extension is not installed so no version number was found
                                        $ext_ver = "";
                                }
-
-                               // Disable load from database
-                               $result = false;
                        } elseif (!EXT_IS_ACTIVE("cache")) {
                                // Load data from database
                                $result = SQL_QUERY_ESC("SELECT id, ext_version FROM "._MYSQL_PREFIX."_extensions WHERE ext_name='%s' LIMIT 1",
@@ -105,19 +102,12 @@ function OUTPUT_STANDARD_OVERVIEW(&$result_tasks)
                                        // Maybe we want to keept the current extension active?
                                        if (($cacheArray['active_extensions'][$ext] == "Y") && (!EXT_IS_ACTIVE($ext))) {
                                                // Reactivate this extension!
-                                               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_extensions SET ext_active='Y' WHERE ext_name='%s' LIMIT 1",
-                                                array($ext), __FILE__, __LINE__);
-
-                                               // Extension has been activated?
-                                               if (SQL_AFFECTEDROWS() == 1) {
-                                                       // Then run all queries
-                                                       EXTENSION_RUN_SQLS(GET_EXT_ID($ext), "activate");
-                                               } // END - if
+                                               ACTIVATE_EXTENSION($ext);
                                        } // END - if
-                               }
+                               } // END - if
                        }
-               }
-       }
+               } // END - if
+       } // END - while
 
        // Close directory handle
        closedir($handle);
index 7c6f3abbc3ccbbae151cfa35d0ce8dba770a6744..13377cde2efa2941ef67a86a25d13967784975b1 100644 (file)
@@ -9,6 +9,7 @@
 
                &raquo;<a href="$content[url]" target="_blank">Aktuelle Seite in neuem
                Fenster &ouml;ffnen</a>&laquo;&nbsp;<span class="surfbar_navi">[<a
+                href="#" onclick="return StartStopCounter();" id="start">Anhalten</a>|<a
                 target="_parent" href="{!URL!}/login.php">Loginbereich</a>|<a
                 target="_parent" href="{!URL!}/modules.php?module=login&amp;what=logout">Ausloggen</a>|<a
                 href="javascript:window.close()">Schliessen</a>]</span><br />
@@ -24,6 +25,19 @@ var maxCounter = "$content[reload]";
 var counter = document.getElementById("surfbar_counter");
 var countDown = null;
 
+function StartStopCounter () {
+       if (countDown == null) {
+               // Start counter
+               document.getElementById("start").innerHTML = "Anhalten";
+               countDown = window.setInterval("StartCounter()", 1000);
+       } else {
+               document.getElementById("start").innerHTML = "Weiter";
+               window.clearInterval(countDown);
+               countDown = null;
+       }
+       return false;
+}
+
 function Init() {
        countDown = window.setInterval("StartCounter()", 1000);
        window.setTimeout("InitCounter()", 500);