From: Roland Häder Date: Sun, 12 Oct 2008 20:42:17 +0000 (+0000) Subject: Surfbar member actions now listable X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7e977ea8d28b05219b02727fcca35150d9c8fcbe;p=mailer.git Surfbar member actions now listable --- diff --git a/.gitattributes b/.gitattributes index 75e81371aa..c6a0974e4e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/inc/databases.php b/inc/databases.php index ff91f2db89..c0b063e836 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -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); diff --git a/inc/extensions/ext-surfbar.php b/inc/extensions/ext-surfbar.php index 3b10fc0f06..f289d5f079 100644 --- a/inc/extensions/ext-surfbar.php +++ b/inc/extensions/ext-surfbar.php @@ -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 ändern, wie Festvergütung, prozentuale Ref-Vergü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ä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"; diff --git a/inc/language/surfbar_de.php b/inc/language/surfbar_de.php index 54345ff872..d056fc3c0f 100644 --- a/inc/language/surfbar_de.php +++ b/inc/language/surfbar_de.php @@ -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ä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ür die Surfbar eingestellt.
\nBitte installieren Sie die Erweiterung surfbar neu."); define('ADMIN_SURFBAR_ADD_NEW_REFDEPTH', "Neue Referal-Ebene zur Surfbar hinzufügen"); @@ -93,15 +98,18 @@ define('ADMIN_SURFBAR_UNLOCK_FAILED', "Freischaltung fehlgeschlagen. Bitte nachs define('ADMIN_SURFBAR_URL_ADDED', "URL wurde der Surfbar hinzugefügt."); define('ADMIN_SURFBAR_URL_NOT_ADDED', "URL wurde wegen Fehler nicht hinzugefügt. Ist die URL bereits vorhanden?"); define('ADMIN_SURFBAR_ADD_URL', "URL hinzufü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', "Hinweise: Sie sollten zur Sicherheit Ihres {!MT_WORD2!} den neuen Status nie auf {--SURFBAR_URL_STATUS_ACTIVE--} z.B. bei der Mitgliedaktion {--MEMBER_SURFBAR_ACTION_UNPAUSE_SUBMIT--} einstellen."); // Admin titles define('ADMIN_SURFBAR_LIST_URLS_TITLE', "Surfbar - URLs aufisten"); @@ -175,6 +183,7 @@ define('SURFBAR_URL_STATUS_DEPLETED', "Views erschöpft"); define('SURFBAR_URL_STATUS_REJECTED', "Abgelehnt"); define('SURFBAR_URL_STATUS_DELETED', "Gelöscht"); define('SURFBAR_URL_STATUS_MIGRATED', "Migriert"); +define('SURFBAR_URL_STATUS_NONE', "Nicht geändert"); // Member actions - submit buttons define('MEMBER_SURFBAR_ACTION_RETREAT_SUBMIT', "Zurü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 index 0000000000..c3fb242a1f --- /dev/null +++ b/inc/modules/admin/what-list_surfbar_actions.php @@ -0,0 +1,85 @@ + 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); + +// +?> diff --git a/inc/modules/admin/what-surfbar_stats.php b/inc/modules/admin/what-surfbar_stats.php index 12f405332d..f9e34b061a 100644 --- a/inc/modules/admin/what-surfbar_stats.php +++ b/inc/modules/admin/what-surfbar_stats.php @@ -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 index 0000000000..35df65b0f0 --- /dev/null +++ b/templates/de/html/admin/admin_list_surfbar_actions.tpl @@ -0,0 +1,34 @@ +
+ + + + + + + + + + +$content + + + +
+ {--ADMIN_LIST_SURFBAR_ACTIONS_TITLE--} +
+ {--ID_SELECT--} + + {--ADMIN_SURFBAR_MEMBER_ACTION--} + + {--ADMIN_SURFBAR_CURRENT_STATUS--} + + {--ADMIN_SURFBAR_NEW_STATUS--} +
+
+ +
+ {--ADMIN_LIST_SURFBAR_ACTIONS_NOTE--} +
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 index 0000000000..08d8e58a80 --- /dev/null +++ b/templates/de/html/admin/admin_list_surfbar_actions_row.tpl @@ -0,0 +1,14 @@ + + + + + + $content[action] + + + $content[status] + + + $content[new_status] + + diff --git a/templates/de/html/admin/admin_surfbar_stats_row.tpl b/templates/de/html/admin/admin_surfbar_stats_row.tpl index 3bb5028a3b..51ccfed749 100644 --- a/templates/de/html/admin/admin_surfbar_stats_row.tpl +++ b/templates/de/html/admin/admin_surfbar_stats_row.tpl @@ -1,5 +1,5 @@ - [$content[userid]] - $content[visited_urls] - $content[total_visits] + [$content[userid]] + $content[visited_urls] + $content[total_visits] diff --git a/templates/de/html/admin/admin_surfbar_url_stats_row.tpl b/templates/de/html/admin/admin_surfbar_url_stats_row.tpl index 925ee649a5..b9e627cadb 100644 --- a/templates/de/html/admin/admin_surfbar_url_stats_row.tpl +++ b/templates/de/html/admin/admin_surfbar_url_stats_row.tpl @@ -1,5 +1,5 @@ - [$content[userid]] - $content[total_visits] - $content[last_online] + [$content[userid]] + $content[total_visits] + $content[last_online]