]> git.mxchange.org Git - mailer.git/commitdiff
Surfbar member actions now listable
authorRoland Häder <roland@mxchange.org>
Sun, 12 Oct 2008 20:42:17 +0000 (20:42 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 12 Oct 2008 20:42:17 +0000 (20:42 +0000)
.gitattributes
inc/databases.php
inc/extensions/ext-surfbar.php
inc/language/surfbar_de.php
inc/modules/admin/what-list_surfbar_actions.php [new file with mode: 0644]
inc/modules/admin/what-surfbar_stats.php
templates/de/html/admin/admin_list_surfbar_actions.tpl [new file with mode: 0644]
templates/de/html/admin/admin_list_surfbar_actions_row.tpl [new file with mode: 0644]
templates/de/html/admin/admin_surfbar_stats_row.tpl
templates/de/html/admin/admin_surfbar_url_stats_row.tpl

index 75e81371aab8658d45b46af6d6873e63e9b7cff8..c6a0974e4e57b00d9a40bece7d1175d0a6b2b27b 100644 (file)
@@ -371,6 +371,7 @@ inc/modules/admin/what-list_refs.php -text
 inc/modules/admin/what-list_sponsor.php -text
 inc/modules/admin/what-list_sponsor_pay.php -text
 inc/modules/admin/what-list_sponsor_pays.php -text
+inc/modules/admin/what-list_surfbar_actions.php -text
 inc/modules/admin/what-list_surfbar_urls.php -text
 inc/modules/admin/what-list_task.php -text
 inc/modules/admin/what-list_transfer.php -text
@@ -996,6 +997,8 @@ templates/de/html/admin/admin_list_sponsor_pay_edit.tpl -text
 templates/de/html/admin/admin_list_sponsor_pay_edit_row.tpl -text
 templates/de/html/admin/admin_list_sponsor_pay_row.tpl -text
 templates/de/html/admin/admin_list_sponsor_row.tpl -text
+templates/de/html/admin/admin_list_surfbar_actions.tpl -text
+templates/de/html/admin/admin_list_surfbar_actions_row.tpl -text
 templates/de/html/admin/admin_list_surfbar_urls.tpl -text
 templates/de/html/admin/admin_list_surfbar_urls_row.tpl -text
 templates/de/html/admin/admin_list_task_rows.tpl -text
index ff91f2db89000099f00bac393fbc110aa01fd844..c0b063e836457c7d9aa0e3001a668387dd21bd36 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', "511");
+define('CURR_SVN_REVISION', "512");
 
 // Take a prime number which is long (if you know a longer one please try it out!)
 define('_PRIME', 591623);
index 3b10fc0f06d975c78e6d8f740078f461bd91fea9..f289d5f079dde4b7901d022d860529593acb62d2 100644 (file)
@@ -186,7 +186,7 @@ INDEX (`status`)
        $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','unlock_surfbar_urls','Wartende URLs freigeben','Geben Sie hier nur direkt in der Surfbar gebuchte URLs frei.',3)";
        $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','config_surfbar','Einstellungen','Einstellungen an der Surfbar &auml;ndern, wie Festverg&uuml;tung, prozentuale Ref-Verg&uuml;tung und vieles mehr.',4)";
        $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','surfbar_stats','Statistiken','Detailierte Statistiken zu einer ausgew&auml;hlten URL anzeigen.',5)";
-       $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','surfbar_actions','Mitgliederaktionen','Listet alle Mitgliederaktionen auf.',6)";
+       $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','list_surfbar_actions','Mitgliederaktionen','Listet alle Mitgliederaktionen auf.',6)";
 
        // Load CSS?
        $EXT_CSS = "Y";
index 54345ff8728f0e2aa7498b9576a05768f59820d4..d056fc3c0fa921d3362b913ee136d7efe9572c9b 100644 (file)
@@ -66,6 +66,11 @@ define('ADMIN_CONFIG_SURFBAR_NOTIFICATION_MODE', "Benachrichtigungen sofort oder
 define('ADMIN_CONFIG_SURFBAR_NOTIFICATION_MODE_INSTANT', "Sofort aussenden");
 define('ADMIN_CONFIG_SURFBAR_NOTIFICATION_MODE_RESET', "Beim t&auml;glichen Reset");
 
+// Admin non-config titles
+define('ADMIN_SURFBAR_STATS_TITLE', "Mitglieder-Statistik der Surfbar");
+define('ADMIN_SURFBAR_URL_STATS_TITLE', "URL-bezogene Statistik der Surfbar");
+define('ADMIN_LIST_SURFBAR_ACTIONS_TITLE', "Mitglieder-Aktionen der Surfbar auflisten");
+
 // General admin text
 define('ADMIN_SURFBAR_NO_REF_LEVELS_FOUND', "Zur Zeit sind keine Referal-Ebenen f&uuml;r die Surfbar eingestellt.<br />\nBitte installieren Sie die Erweiterung <strong>surfbar</strong> neu.");
 define('ADMIN_SURFBAR_ADD_NEW_REFDEPTH', "Neue Referal-Ebene zur Surfbar hinzuf&uuml;gen");
@@ -93,15 +98,18 @@ define('ADMIN_SURFBAR_UNLOCK_FAILED', "Freischaltung fehlgeschlagen. Bitte nachs
 define('ADMIN_SURFBAR_URL_ADDED', "URL wurde der Surfbar hinzugef&uuml;gt.");
 define('ADMIN_SURFBAR_URL_NOT_ADDED', "URL wurde wegen Fehler nicht hinzugef&uuml;gt. Ist die URL bereits vorhanden?");
 define('ADMIN_SURFBAR_ADD_URL', "URL hinzuf&uuml;gen");
-define('ADMIN_BUILD_STATUS_HANDLER', "Status-Handler");
 define('ADMIN_SURFBAR_NO_STATS', "Keine Surfbar-Statistiken vorhanden!");
-define('ADMIN_SURFBAR_STATS_TITLE', "Mitglieder-Statistik der Surfbar");
 define('ADMIN_SURFBAR_VISITED_URLS', "Aufgerufene URLs");
 define('ADMIN_SURFBAR_TOTAL_VISITS', "Gesamtbesuche");
 define('ADMIN_SURFBAR_TOTALS', "Zusammenfassung");
 define('ADMIN_SURFBAR_LAST_ONLINE', "Letzter Aufruf der URL");
-define('ADMIN_SURFBAR_URL_STATS_TITLE', "URL-bezogene Statistik der Surfbar");
 define('ADMIN_SURFBAR_NO_URL_STATS', "Keine URL-bezogene Statistik gefunden");
+define('ADMIN_SURFBAR_NO_ACTIONS', "Keine Mitgliederaktionen gefunden. Bitte installieren Sie die Surfbar neu.");
+define('ADMIN_SURFBAR_MEMBER_ACTION', "Mitgliedaktion");
+define('ADMIN_SURFBAR_CURRENT_STATUS', "Aktueller Status");
+define('ADMIN_SURFBAR_NEW_STATUS', "Neuer Status");
+define('ADMIN_SURFBAR_EDIT_ACTIONS', "Mitgliedsaktionen editieren");
+define('ADMIN_LIST_SURFBAR_ACTIONS_NOTE', "<strong>Hinweise:</strong> Sie sollten zur Sicherheit Ihres {!MT_WORD2!} den neuen Status nie auf <u>{--SURFBAR_URL_STATUS_ACTIVE--}</u> z.B. bei der Mitgliedaktion <u>{--MEMBER_SURFBAR_ACTION_UNPAUSE_SUBMIT--}</u> einstellen.");
 
 // Admin titles
 define('ADMIN_SURFBAR_LIST_URLS_TITLE', "Surfbar - URLs aufisten");
@@ -175,6 +183,7 @@ define('SURFBAR_URL_STATUS_DEPLETED', "Views ersch&ouml;pft");
 define('SURFBAR_URL_STATUS_REJECTED', "Abgelehnt");
 define('SURFBAR_URL_STATUS_DELETED', "Gel&ouml;scht");
 define('SURFBAR_URL_STATUS_MIGRATED', "Migriert");
+define('SURFBAR_URL_STATUS_NONE', "Nicht ge&auml;ndert");
 
 // Member actions - submit buttons
 define('MEMBER_SURFBAR_ACTION_RETREAT_SUBMIT', "Zur&uuml;cknehmen");
diff --git a/inc/modules/admin/what-list_surfbar_actions.php b/inc/modules/admin/what-list_surfbar_actions.php
new file mode 100644 (file)
index 0000000..c3fb242
--- /dev/null
@@ -0,0 +1,85 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 10/12/2008 *
+ * ================                             Last change: 10/12/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : what-list_surfbar_actions.php                    *
+ * -------------------------------------------------------------------- *
+ * Short description : List surfbar member actions                      *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Auflistung von Mitgliederaktionen der Surfbar    *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if ((!defined('__SECURITY')) || (!is_admin())) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// Add description as navigation point
+ADD_DESCR("admin", __FILE__);
+
+// Load all actions
+$result = SQL_QUERY("SELECT  id, status, action, new_status FROM "._MYSQL_PREFIX."_surfbar_actions ORDER BY id ASC", __FILE__, __LINE__);
+
+// Entries found?
+if (SQL_NUMROWS($result) > 0) {
+       // List all entries
+       $OUT = ""; $SW = 2;
+       while ($content = SQL_FETCHARRAY($result)) {
+               // "Translate" some data
+               $content['status']     = constant(sprintf("SURFBAR_URL_STATUS_%s", $content['status']));
+               $content['action']     = constant(sprintf("MEMBER_SURFBAR_ACTION_%s_SUBMIT", $content['action']));
+
+               // New status set?
+               if (!is_null($content['new_status'])) {
+                       // Translate it
+                       $content['new_status'] = constant(sprintf("SURFBAR_URL_STATUS_%s", $content['new_status']));
+               } else {
+                       // "Do nothing" status
+                       $content['new_status'] = SURFBAR_URL_STATUS_NONE;
+               }
+
+               // Add color
+               $content['sw'] = $SW;
+
+               // Load row template
+               $OUT .= LOAD_TEMPLATE("admin_list_surfbar_actions_row", true, $content);
+
+               // Switch color
+               $SW = 3 - $SW;
+       } // END - while
+
+       // Load main template
+       LOAD_TEMPLATE("admin_list_surfbar_actions", false, $OUT);
+} else {
+       // No entries found, very bad!
+       LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_SURFBAR_NO_ACTIONS);
+}
+
+// Free result
+SQL_FREERESULT($result);
+
+//
+?>
index 12f405332d3059cf8fb8dd6f9c7e5a66fd941f09..f9e34b061ad4656faed06d1ebf0585f10e99e710 100644 (file)
@@ -61,10 +61,11 @@ ORDER BY `userid` ASC",
                        $content['userid']       = ADMIN_USER_PROFILE_LINK($content['userid']);
                        $content['total_visits'] = TRANSLATE_COMMA($content['total_visits']);
                        $content['last_online']  = MAKE_DATETIME($content['last_online'], "2");
+                       $content['sw']           = $SW;
 
                        // Load row template
                        $OUT .= LOAD_TEMPLATE("admin_surfbar_url_stats_row", true, $content);
-                       $cnt++;
+                       $cnt++; $SW = 3 - $SW;
                } // END - while
 
                // Prepare content
@@ -101,9 +102,11 @@ ORDER BY `userid` ASC", __FILE__, __LINE__);
                        $content['userid']       = ADMIN_USER_PROFILE_LINK($content['userid']);
                        $content['visited_urls'] = TRANSLATE_COMMA($content['visited_urls']);
                        $content['total_visits'] = TRANSLATE_COMMA($content['total_visits']);
+                       $content['sw']           = $SW;
 
                        // Load row template
                        $OUT .= LOAD_TEMPLATE("admin_surfbar_stats_row", true, $content);
+                       $SW = 3 - $SW;
                } // END - while
 
                // Prepare content
diff --git a/templates/de/html/admin/admin_list_surfbar_actions.tpl b/templates/de/html/admin/admin_list_surfbar_actions.tpl
new file mode 100644 (file)
index 0000000..35df65b
--- /dev/null
@@ -0,0 +1,34 @@
+<form action="{!URL!}/modules.php?module=admin&amp;what=list_surfbar_actions" method="post">
+<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="600">
+<tr>
+       <td colspan="4" class="admin_header bottom2" height="30" align="center">
+               <strong>{--ADMIN_LIST_SURFBAR_ACTIONS_TITLE--}</strong>
+       </td>
+</tr>
+<tr>
+       <td align="center" class="admin_header bottom2 right2 switch_sw$content[sw]">
+               <strong>{--ID_SELECT--}</strong>
+       </td>
+       <td align="center" class="admin_header bottom2 right2 switch_sw$content[sw]">
+               <strong>{--ADMIN_SURFBAR_MEMBER_ACTION--}</strong>
+       </td>
+       <td align="center" class="admin_header bottom2 right2 switch_sw$content[sw]">
+               <strong>{--ADMIN_SURFBAR_CURRENT_STATUS--}</strong>
+       </td>
+       <td align="center" class="admin_header bottom2 switch_sw$content[sw]">
+               <strong>{--ADMIN_SURFBAR_NEW_STATUS--}</strong>
+       </td>
+</tr>
+$content
+<tr>
+       <td colspan="4" class="admin_footer" height="30" align="center">
+               <input type="reset" class="admin_reset" value="{--ADMIN_UNSELECT_ALL--}" />
+               <input type="submit" name="edit" class="admin_submit" value="{--ADMIN_SURFBAR_EDIT_ACTIONS--}" />
+       </td>
+</tr>
+</table>
+</form>
+
+<div class="admin_note">
+       {--ADMIN_LIST_SURFBAR_ACTIONS_NOTE--}
+</div>
diff --git a/templates/de/html/admin/admin_list_surfbar_actions_row.tpl b/templates/de/html/admin/admin_list_surfbar_actions_row.tpl
new file mode 100644 (file)
index 0000000..08d8e58
--- /dev/null
@@ -0,0 +1,14 @@
+<tr>
+       <td align="center" class="bottom2 right2 switch_sw$content[sw]">
+               <input type="checkbox" name="id[$content[id]]" value="1" class="admin_normal" />
+       </td>
+       <td align="center" class="bottom2 right2 switch_sw$content[sw]">
+               $content[action]
+       </td>
+       <td align="center" class="bottom2 right2 switch_sw$content[sw]">
+               $content[status]
+       </td>
+       <td align="center" class="bottom2 switch_sw$content[sw]">
+               $content[new_status]
+       </td>
+</tr>
index 3bb5028a3b6fdf2834cbd915ace10a26b8fbb806..51ccfed74951e932f3d4556cc2af550b021a81dc 100644 (file)
@@ -1,5 +1,5 @@
 <tr>
-       <td align="center" class="bottom2 right2">[<strong>$content[userid]</strong>]</td>
-       <td align="center" class="bottom2 right2">$content[visited_urls]</td>
-       <td align="center" class="bottom2">$content[total_visits]</td>
+       <td align="center" class="switch_$content[sw] bottom2 right2">[<strong>$content[userid]</strong>]</td>
+       <td align="center" class="switch_$content[sw] bottom2 right2">$content[visited_urls]</td>
+       <td align="center" class="switch_$content[sw] bottom2">$content[total_visits]</td>
 </tr>
index 925ee649a5735043c57986afca53c34b7d2a5368..b9e627cadbef944fc3a524baab92e7098f41f6f4 100644 (file)
@@ -1,5 +1,5 @@
 <tr>
-       <td align="center" class="bottom2 right2">[<strong>$content[userid]</strong>]</td>
-       <td align="center" class="bottom2 right2">$content[total_visits]</td>
-       <td align="center" class="bottom2">$content[last_online]</td>
+       <td align="center" class="switch_$content[sw] bottom2 right2">[<strong>$content[userid]</strong>]</td>
+       <td align="center" class="switch_$content[sw] bottom2 right2">$content[total_visits]</td>
+       <td align="center" class="switch_$content[sw] bottom2">$content[last_online]</td>
 </tr>