Task extension now shows surfbar URLs in admin overview
[mailer.git] / inc / libs / task_functions.php
index ce4b5f6039b8fb7df39af7fd59e47cda03ff856c..bd2f71179f5d403bbf6807c28c0b0981313c7b96 100644 (file)
@@ -63,12 +63,12 @@ function OUTPUT_ADVANCED_OVERVIEW (&$result_main)
                SQL_FREERESULT($result);
 
                if ($value > 0) {
-                       define ('__TASK_UPDATE_VALUE', "<A href=\"".URL."/modules.php?module=admin&amp;what=list_task&amp;type=updates\">".$value."</A>");
+                       define('__TASK_UPDATE_VALUE', "<A href=\"".URL."/modules.php?module=admin&amp;what=list_task&amp;type=updates\">".$value."</A>");
                } else {
-                       define ('__TASK_UPDATE_VALUE', "0");
+                       define('__TASK_UPDATE_VALUE', "0");
                }
        } else {
-               define ('__TASK_UPDATE_VALUE', "0");
+               define('__TASK_UPDATE_VALUE', "0");
        }
 
        //
@@ -298,8 +298,8 @@ ORDER BY d.userid";
        if (GET_EXT_VERSION("sql_patches") >= "0.3.4") {
                // Check for accounts without referral
                $SQLs[]   = "SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE refid='0' ORDER BY userid";
-               $DESCRs[] = TAKS_ADMIN_LIST_ACCOUNT_NOREF;
-               $TITLEs[] = TAKS_ADMIN_LIST_ACCOUNT_NOREF_TITLE;
+               $DESCRs[] = TASK_ADMIN_LIST_ACCOUNT_NOREF;
+               $TITLEs[] = TASK_ADMIN_LIST_ACCOUNT_NOREF_TITLE;
                $WHATs[]  = "list_norefs";
        }
 
@@ -336,11 +336,11 @@ ORDER BY d.userid";
                if (GET_EXT_VERSION("bonus") >= "0.6.9") {
                        // Add more bonus points here
                        $USE = "(0";
-                       if ($_CONFIG['bonus_click_yn'] == 'Y') $USE .= " + turbo_bonus";
-                       if ($_CONFIG['bonus_login_yn'] == 'Y') $USE .= " + login_bonus";
-                       if ($_CONFIG['bonus_order_yn'] == 'Y') $USE .= " + bonus_order";
-                       if ($_CONFIG['bonus_stats_yn'] == 'Y') $USE .= " + bonus_stats";
-                       if ($_CONFIG['bonus_ref_yn']   == 'Y') $USE .= " + bonus_ref";
+                       if ($_CONFIG['bonus_click_yn'] == "Y") $USE .= " + turbo_bonus";
+                       if ($_CONFIG['bonus_login_yn'] == "Y") $USE .= " + login_bonus";
+                       if ($_CONFIG['bonus_order_yn'] == "Y") $USE .= " + bonus_order";
+                       if ($_CONFIG['bonus_stats_yn'] == "Y") $USE .= " + bonus_stats";
+                       if ($_CONFIG['bonus_ref_yn']   == "Y") $USE .= " + bonus_ref";
                        $USE .= ")";
                } else {
                        // Old version ???
@@ -349,7 +349,7 @@ ORDER BY d.userid";
 
                // Autopurge installed?
                $LAST = ""; $ONLINE = "";
-               if ((EXT_IS_ACTIVE("autopurge")) && ($_CONFIG['ap_inactive'] == 'Y') && ($_CONFIG['ap_in_since'] > 0)) {
+               if ((EXT_IS_ACTIVE("autopurge")) && ($_CONFIG['ap_inactive'] == "Y") && ($_CONFIG['ap_in_since'] > 0)) {
                        // Use last online timestamp to keep inactive members away from here
                        $LAST   = " AND last_online >= ";
                        $ONLINE = bigintval(time() - $_CONFIG['ap_in_since']);
@@ -368,7 +368,7 @@ ORDER BY active_bonus DESC, userid";
 
                // Autopurge installed?
                $LAST = ""; $ONLINE = "";
-               if ((EXT_IS_ACTIVE("autopurge")) && ($_CONFIG['ap_inactive'] == 'Y') && ($_CONFIG['ap_in_since'] > 0)) {
+               if ((EXT_IS_ACTIVE("autopurge")) && ($_CONFIG['ap_inactive'] == "Y") && ($_CONFIG['ap_in_since'] > 0)) {
                        // Use last online timestamp to keep inactive members away from here
                        $LAST   = " AND last_online >= ";
                        $ONLINE = bigintval(time() - $_CONFIG['ap_in_since']);
@@ -516,6 +516,20 @@ ORDER BY beg_points DESC, userid";
                $TITLEs[] = TASK_ADMIN_LIST_ADMINS_ALL_TITLE;
        }
 
+       if (EXT_IS_ACTIVE("surfbar")) {
+               // List all URLs in surfbar
+               $SQLs[]   = "SELECT id FROM "._MYSQL_PREFIX."_surfbar_urls ORDER BY id";
+               $WHATs[]  = "list_surfbar_urls";
+               $DESCRs[] = TASK_ADMIN_LIST_SURFBAR_URLS_ALL;
+               $TITLEs[] = TASK_ADMIN_LIST_SURFBAR_URLS_ALL_TITLE;
+
+               // List all pending URLs in surfbar
+               $SQLs[]   = "SELECT id FROM "._MYSQL_PREFIX."_surfbar_urls WHERE status='PENDING' ORDER BY id";
+               $WHATs[]  = "unlock_surfbar_urls";
+               $DESCRs[] = TASK_ADMIN_LIST_SURFBAR_URLS_PENDING;
+               $TITLEs[] = TASK_ADMIN_LIST_SURFBAR_URLS_PENDING_TITLE;
+       }
+
        // Generate extra overview rows
        $EXTRAS .= TASK_CREATE_EXTRA_ROWS($SQLs, $WHATs, $DESCRs, $TITLEs);