From: Roland Haeder Date: Thu, 28 May 2015 21:59:24 +0000 (+0200) Subject: Added new (missing) template for admin area + continued a bit with ext-surfbar X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=773ae2c427c857b023eb8ec8480095b45849a933;p=mailer.git Added new (missing) template for admin area + continued a bit with ext-surfbar Signed-off-by: Roland Häder --- diff --git a/inc/extensions/surfbar/mode-setup.php b/inc/extensions/surfbar/mode-setup.php index b252e7fdca..c15d4bca0f 100644 --- a/inc/extensions/surfbar/mode-setup.php +++ b/inc/extensions/surfbar/mode-setup.php @@ -58,7 +58,7 @@ PRIMARY KEY (`url_id`), UNIQUE INDEX `userid_url` (`url_userid`, `url`), INDEX `status_userid` (`url_status`, `url_userid`), INDEX (`url_package_id`)", - 'Visitor add-on URLs'); + 'Visitor add-on - URLs'); // Booking packages for members addDropTableSql('surfbar_packages'); @@ -70,7 +70,7 @@ INDEX (`url_package_id`)", `package_points_reward` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, PRIMARY KEY (`package_id`), UNIQUE INDEX `package` (`package_reload`, `package_waiting`)", - 'Booking packages'); + 'Vistor-addon - booking packages'); // Reload locks addDropTableSql('surfbar_locks'); @@ -82,7 +82,7 @@ UNIQUE INDEX `package` (`package_reload`, `package_waiting`)", PRIMARY KEY (`locks_id`), UNIQUE INDEX `userid_url` (`locks_userid`, `locks_url_id`), INDEX (`locks_url_id`)", - 'Vistor-addon reload locks'); + 'Vistor-addon - reload locks'); // Visitor add-on salts addDropTableSql('surfbar_salts'); @@ -94,7 +94,7 @@ INDEX (`locks_url_id`)", PRIMARY KEY (`salts_id`), UNIQUE INDEX `salts_userid_url` (`salts_userid`, `salts_url_id`), INDEX (`salts_url_id`)", - 'Visitor add-on last used salts'); + 'Visitor add-on - last used salts'); // Statistics addDropTableSql('surfbar_stats'); @@ -107,7 +107,7 @@ INDEX (`salts_url_id`)", PRIMARY KEY (`stats_id`), UNIQUE INDEX `userid_url` (`stats_userid`, `stats_url_id`), INDEX (`stats_url_id`)", - 'Visitor add-on Statistics'); + 'Visitor add-on - statistics'); // Member actions pending on status addDropTableSql('surfbar_actions'); @@ -118,7 +118,7 @@ INDEX (`stats_url_id`)", `actions_new_status` ENUM('PENDING', 'ACTIVE', 'LOCKED', 'STOPPED', 'REJECTED', 'DELETED', 'MIGRATED', 'DEPLETED') NULL DEFAULT NULL, PRIMARY KEY (`actions_id`), UNIQUE INDEX `status_action` (`actions_status`, `actions_action`)", - 'Visitor add-on Member Actions'); + 'Visitor add-on - Member Actions'); // Member actions addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`actions_status`, `actions_action`, `actions_new_status`) VALUES ('PENDING', 'RETREAT', 'DELETED')"); diff --git a/inc/language/surfbar_de.php b/inc/language/surfbar_de.php index 42767e029c..c89e7b966a 100644 --- a/inc/language/surfbar_de.php +++ b/inc/language/surfbar_de.php @@ -78,6 +78,7 @@ addMessages(array( 'ADMIN_ADD_SURFBAR_URL_TITLE' => "URL im Besuchertausch hinzufügen", 'ADMIN_LIST_SURFBAR_ACTIONS_TITLE' => "Mitglieder-Aktionen des Besuchertausches auflisten", 'ADMIN_EDIT_SURFBAR_ACTIONS_TITLE' => "Mitglieder-Aktionen ändern", + 'ADMIN_ADD_SURFBAR_PACKAGE_TITLE' => "Neues Buchungspaket hinzufügen", // Admin submit buttons 'ADMIN_SURFBAR_EDIT_URL_SUBMIT' => "URLs ändern", @@ -93,6 +94,7 @@ addMessages(array( 'ADMIN_SURFBAR_ADD_URL_SUBMIT' => "URL hinzufügen", 'ADMIN_EDIT_SURFBAR_ACTIONS_SUBMIT' => "Mitgliedsaktionen editieren", 'ADMIN_CHANGE_SURFBAR_ACTIONS_SUBMIT' => "Mitglieder-Aktionen ändern", + 'ADMIN_SURFBAR_ADD_PACKAGE_SUBMIT' => "Buchungspaket hinzufügen", // General admin text 'ADMIN_ENTER_SURFBAR_URL' => "URL eingeben:", @@ -133,6 +135,11 @@ addMessages(array( 'ADMIN_CHANGE_SURFBAR_ACTIONS_ACTION' => "Mitglieder-Aktion ändern:", 'ADMIN_CHANGE_SURFBAR_ACTIONS_NEW_STATUS' => "Neuen URL-Status ändern:", 'ADMIN_SURFBAR_ACTIONS_ID' => "Aktions-Id:", + 'ADMIN_SELECT_SURFBAR_PACKAGE_RELOAD' => "Reload-Sperre einstellen:", + 'ADMIN_SELECT_SURFBAR_PACKAGE_WAITING' => "Mindestverweildauer einstellen:", + 'ADMIN_ENTER_SURFBAR_PACKAGE_POINTS_COSTS' => "Kosten in {?POINTS?} pro Klick:", + 'ADMIN_ENTER_SURFBAR_PACKAGE_POINTS_REWARD' => "Vergütung in {?POINTS?} pro Klick:", + 'ADMIN_SURFBAR_PACKAGES_NO_SELECTIONS' => "Sie haben keine Auswahlen an Buchungspaketen gemacht.", // Admin - surfbar packages 'ADMIN_SURFBAR_PACKAGES_404' => "Sie haben noch keine Buchungspakete erstellt. Solange können Ihre Mitglieder keine URLs im Besuchertausch buchen.", diff --git a/inc/modules/admin/what-list_surfbar_packages.php b/inc/modules/admin/what-list_surfbar_packages.php index 8c56971eb3..67eb957546 100644 --- a/inc/modules/admin/what-list_surfbar_packages.php +++ b/inc/modules/admin/what-list_surfbar_packages.php @@ -47,7 +47,10 @@ addYouAreHereLink('admin', __FILE__); $show = TRUE; // Check for 'package_id' element -if ((countRequestPost() > 0) && (!ifPostContainsSelections('package_id'))) { +if (isFormSent('add')) { + // Add new entry + die('Unfinished!'); +} elseif ((countRequestPost() > 0) && (!ifPostContainsSelections('package_id'))) { // Not found so output message displayMessage('{--ADMIN_SURFBAR_PACKAGES_NO_SELECTIONS--}'); @@ -86,7 +89,10 @@ if ($show === FALSE) { doGenericXmlTemplateCallback('admin_list_surfbar_packages'); // Load 'add' template -loadTemplate('admin_add_surfbar_package'); +loadTemplate('admin_add_surfbar_package', FALSE, array( + 'surfbar_package_reload' => createTimeSelections(60, 'surfbar_package_reload', 'Dhms', 'center', FALSE, TRUE), + 'surfbar_package_waiting' => createTimeSelections(10, 'surfbar_package_reload', 'ms' , 'center', FALSE, TRUE), +)); // [EOF] ?> diff --git a/inc/template-functions.php b/inc/template-functions.php index d4bd6354fa..6844430ab5 100644 --- a/inc/template-functions.php +++ b/inc/template-functions.php @@ -780,7 +780,7 @@ function compileRawCode ($code, $full = TRUE, $compileCode = TRUE) { } // -function addSelectionBox ($type, $default, $prefix = '', $id = NULL, $class = 'form_select') { +function addSelectionBox ($type, $default, $prefix = '', $id = NULL, $class = 'form_select', $allSteps = FALSE) { $OUT = ''; if ($type == 'yn') { @@ -880,7 +880,16 @@ function addSelectionBox ($type, $default, $prefix = '', $id = NULL, $class = 'f case 'mi': // Minutes case 'se': // Seconds - for ($idx = 0; $idx <= 59; $idx+=5) { + // Default is 5 minutes/seconds step + $step = 5; + + // All steps? + if ($allSteps === TRUE) { + // Then all steps + $step = 1; + } // END - if + + for ($idx = 0; $idx <= 59; $idx += $step) { $padded = padLeftZero($idx, 2); $OUT .= '