templates/de/html/admin/admin_edit_bonus_email.tpl svneol=native#text/plain
templates/de/html/admin/admin_edit_cats.tpl svneol=native#text/plain
templates/de/html/admin/admin_edit_cats_row.tpl svneol=native#text/plain
+templates/de/html/admin/admin_edit_config_network_type_form.tpl svneol=native#text/plain
templates/de/html/admin/admin_edit_country_row.tpl svneol=native#text/plain
templates/de/html/admin/admin_edit_email.tpl svneol=native#text/plain
templates/de/html/admin/admin_edit_email_max_rec.tpl svneol=native#text/plain
templates/de/html/admin/admin_send_yoomedia.tpl svneol=native#text/plain
templates/de/html/admin/admin_settings_saved.tpl svneol=native#text/plain
templates/de/html/admin/admin_settings_unsaved.tpl svneol=native#text/plain
+templates/de/html/admin/admin_show_config_network_type.tpl svneol=native#text/plain
templates/de/html/admin/admin_sponsor_paytypes.tpl svneol=native#text/plain
templates/de/html/admin/admin_sub_points.tpl svneol=native#text/plain
templates/de/html/admin/admin_sub_points_all.tpl svneol=native#text/plain
./inc/functions.php:2199: // @TODO Rename column data_type to e.g. mail_status
./inc/gen_sql_patches.php:95:// @TODO Rewrite this to a filter
./inc/install-functions.php:57: // @TODO DEACTIVATED: changeDataInLocalConfigurationFile('OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestElement('omode'), 0);
-./inc/language/de.php:1074: // @TODO Rewrite these two constants
-./inc/language/de.php:1090: // @TODO Rewrite these three constants
+./inc/language/de.php:1075: // @TODO Rewrite these two constants
+./inc/language/de.php:1091: // @TODO Rewrite these three constants
./inc/language/de.php:758:// @TODO Are these constants longer used?
./inc/language-functions.php:255: // @TODO These are all valid languages, again hard-coded
./inc/language-functions.php:44:// @TODO Rewrite all language constants to this function.
`network_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`network_type_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`network_max_reload_time` BIGINT(20) UNSIGNED NULL DEFAULT NULL,
+`network_reload_time_unit` ENUM('s','m','h','D','W') NULL DEFAULT NULL,
`network_min_waiting_time` BIGINT(20) UNSIGNED NULL DEFAULT NULL,
`network_min_remain_clicks` BIGINT(20) UNSIGNED NULL DEFAULT NULL,
`network_min_payment` FLOAT(20,5) UNSIGNED NULL DEFAULT NULL,
foreach ($data as $k => $v) {
if ($v > 0) {
// Value is greater than 0 "eval" data to return string
- $ret .= ', ' . $v . ' {--_' . strtoupper($k) . '--}';
+ $ret .= ', ' . $v . ' {%pipe,translateTimeUnit=' . $k . '%}';
break;
} // END - if
} // END - foreach
$ret = substr($ret, 2);
} else {
// Zero seconds
- $ret = '0 {--_SECONDS--}';
+ $ret = '0 {--TIME_UNIT_SECOND--}';
}
// Return fancy time string
}
// Function taken from user comments on www.php.net / function isInStringIgnoreCase()
-function isUrlValid ($url, $compile=true) {
+function isUrlValid ($url, $compile = true) {
// Trim URL a little
$url = trim(urldecode($url));
//* DEBUG: */ debugOutput($url);
'ADMIN_TASK_NO_SQL_TITLE' => "Aufgabe ohne SQL-Anweisungen",
'MEMBER_UNCONFIRMED_LOCKED' => "Anzahl zu best. Mails für Willkommensgutschrift",
'MEMBER_CONFIRMED_MAILS' => "Bereits best. Mails",
- '_YEARS' => "Jahre",
- '_MONTHS' => "Monate",
- '_WEEKS' => "Wochen",
- '_DAYS' => "Tage",
- '_HOURS' => "Stunden",
- '_MINUTES' => "Minuten",
- '_SECONDS' => "Sekunden",
+ 'TIME_UNIT' => "Zeiteinheit",
+ 'TIME_UNIT_YEAR' => "Jahr(e)",
+ 'TIME_UNIT_MONTH' => "Monat(e)",
+ 'TIME_UNIT_WEEK' => "Woche(n)",
+ 'TIME_UNIT_DAY' => "Tag(e)",
+ 'TIME_UNIT_HOUR' => "Stunden",
+ 'TIME_UNIT_MINUTE' => "Minute(n)",
+ 'TIME_UNIT_SECOND' => "Sekunde(n)",
'SORT_ASCENDING' => "Aufsteigend",
'SORT_DESCENDING' => "Absteigend",
'INVALID_EMAIL_ENTERED' => "Ungütige EMail-Adresse eingegeben.",
'ADMIN_ADD_NETWORK_API_TRANSLATION_TITLE' => "Werbenetzwerk verwalten - Neues API-Arrayelement hinzufügen",
'ADMIN_LIST_NETWORK_API_TRANSLATION_TITLE' => "API-Arrayelemente auflisten und verwalten",
'ADMIN_ADD_CONFIG_NETWORK_TYPE_TITLE' => "Werbeart-Handler einrichten - {%%pipe,translateNetworkTypeHandler=%s%%}",
+ 'ADMIN_SHOW_CONFIG_NETWORK_TYPE_TITLE' => "Eingerichteter Werbeart-Handler - {%%pipe,translateNetworkTypeHandler=%s%%}",
'ADMIN_CONFIG_NETWORK_TYPES_TITLE' => "Werbeart-Handler einrichten",
+ 'ADMIN_EDIT_CONFIG_NETWORK_TYPE_TITLE' => "Werbeart-Handler ändern - {%%pipe,translateNetworkTypeHandler=%s%%}",
// - Link titles
'ADMIN_NETWORK_CONFIG_LINK_TITLE' => "Weiter zur API-Konfiguration",
'ADMIN_LIST_NETWORK_TYPES_LINK_TITLE' => "Weiter zu den Werbearten",
'ADMIN_ADD_NETWORK_API_TRANSLATION_SUBMIT' => "API-Arrayelement hinzufügen",
'ADMIN_ADD_CONFIG_NETWORK_TYPE_SUBMIT' => "Jetzt den Werbeart-Handler einrichten",
'ADMIN_ADD_CONFIG_NETWORK_TYPE_FORM_SUBMIT' => "Werbeart-Handlerdaten hinzufügen",
+ 'ADMIN_EDIT_CONFIG_NETWORK_TYPE_SUBMIT' => "Konfiguration ändern",
+ 'ADMIN_EDIT_CONFIG_NETWORK_TYPE_FORM_SUBMIT' => "Werbeart-Handler ändern",
// - Success titles
'ADMIN_NETWORK_ADDED_TITLE' => "Allgemeine Werbenetzwerkdaten hinzugefügt",
'ADMIN_NETWORK_TYPES_ADDED_TITLE' => "Werbeart-Handler hinzugefügt",
'ADMIN_LIST_NETWORK_API_TRANSLATION_NOTE' => "Seien Sie mit dem Editieren bzw. Löschen von Array-Elementen sehr vorsichtig, die API-Abfrage köntte unerwartete Ergebnisse bzw. Fehler zurückliefern.",
'ADMIN_NETWORK_REQUIRE_ID_CARD_NOTE' => "Unter <strong>{--ADMIN_NETWORK_REQUIRE_ID_CARD--}</strong> ist das durch den Webnetzwerkbetreiber Verlangen einerPersonalausweiskopie bzw. Gerwerbescheins zu verstehen. Mehr dazu erfahen Sie <a href=\"http://forum.mxchange.org/topic-499.html\" rel=\"external\" target=\"_blank\">im Forum</a>.",
'ADMIN_CONFIG_NETWORK_API_NOTE' => "Geben Sie unter <strong>{--ADMIN_CONFIG_NETWORK_API_ENTER_REFERRAL_BUTTON--}</strong> einen Button im Format 88x31 ein. Sollte das Werbenetzwerk keinen anbieten, lassen Sie dieses Feld einfach leer. Andere Formate als 88x31 werden auf 88x31 geschrumpft dargestellt. Bitte geben Sie nur die URLs und <strong>keinen</strong> HTML-Code ein.",
- 'ADMIN_CONFIG_NETWORK_TYPES_NOTE' => "Für jede Werbeart sind unterschiedliche Reloadsperren, Mindestauffenthalte und mehr einstellbar. Damit ist es möglich, dass Sie z.B. für Forced-Banner eine kürzere/längere Reloadsperre eingeben können als für Paidmails. An den angezeigten URLs (API-, Klick- und Banner-URL brauchen Sie meistens nichts ändern. Dies wird vom {?TITLE?}-Entwicklerteam aktuell gehalten.",
- 'ADMIN_ADD_CONFIG_NETWORK_TYPE_FORM_NOTE' => "Bitte beachten Sie, dass es sich beim Feld <strong>{--ADMIN_ADD_CONFIG_NETWORK_TYPE_ALLOW_EROTIC--}</strong> um ein frei eingebares Feld handelt. Den genauen Wert entnehmen Sie bitte derzeit aus Ihrem Affiliate-Bereich, da dieser nicht bei allen Werbenetzwerken einheitlich ist. Sollte das Werbenetzwerk Ihnen einen Wert nicht angeben, so lassen Sie das entsprechende Feld einfach leer. Stellen Sie unter <strong>{--ADMIN_ADD_CONFIG_NETWORK_TYPE_MAX_RELOAD_TIME--}</strong> nur Werte ein, die auch vom Werbenetzwerk unterstützt werden. Die meisten werden zwar Stunden anbieten, es sollen aber auch Werbenetzwerke mit anderen Reloadsperreinheiten als Stunden unsterstützt werden. Später bei der API-Abfrage wird der eingestellte Wert auf die größtmögliche Einheit aufgerundet.",
+ 'ADMIN_CONFIG_NETWORK_TYPES_NOTE' => "Für jede Werbeart sind unterschiedliche Reloadsperren, Mindestauffenthalte und mehr einstellbar. Damit ist es möglich, dass Sie z.B. für Forced-Banner eine kürzere/längere Reloadsperre eingeben können als für Paidmails.",
+ 'ADMIN_ADD_CONFIG_NETWORK_TYPE_FORM_NOTE' => "Bitte beachten Sie, dass es sich beim Feld <strong>{--ADMIN_CONFIG_NETWORK_TYPE_ALLOW_EROTIC--}</strong> um ein frei eingebares Feld handelt. Den genauen Wert entnehmen Sie bitte derzeit aus Ihrem Affiliate-Bereich, da dieser nicht bei allen Werbenetzwerken einheitlich ist. Sollte das Werbenetzwerk Ihnen einen Wert nicht angeben, so lassen Sie das entsprechende Feld einfach leer. Stellen Sie unter <strong>{--ADMIN_CONFIG_NETWORK_TYPE_MAX_RELOAD_TIME--}</strong> nur Werte ein, die auch vom Werbenetzwerk unterstützt werden. Die meisten werden zwar Stunden anbieten, es sollen aber auch Werbenetzwerke mit anderen Reloadsperreinheiten als Stunden unsterstützt werden. Später bei der API-Abfrage wird der eingestellte Wert auf die größtmögliche Einheit aufgerundet.",
+ 'ADMIN_EDIT_CONFIG_NETWORK_TYPE_FORM_NOTE' => "{--ADMIN_ADD_CONFIG_NETWORK_TYPE_FORM_NOTE--}",
// - Other messages
'ADMIN_NETWORK_REQUEST_PARAMETER_LIST_LIMITED_TO_TYPE' => "Es wurden nur die API-Parameter des ausgewählten Werbeart-Handlers angezeigt.",
'ADMIN_LIST_NETWORK_API_TRANSLATION_LIMITED_TO_TYPE' => "Es wurden nur die Array-Element-Übersetzungen des ausgewählten Werbeart-Handlers angezeigt.",
'ADMIN_CONFIG_NETWORK_TYPES_404' => "Es wurden keine Daten zur Werbenetzwerk-Id <span class=\"data\">%s</span> gefunden. Bitte benachrichtigen Sie das Entwickler-Team.",
'ADMIN_ADD_CONFIG_NETWORK_TYPE_404' => "Dieser Werbeart-Handler wurde noch nicht eingerichtet. {--ADMIN_ADD_CONFIG_NETWORK_TYPE_404_NOTE--} Bitte richten Sie diesen als nächstes ein und führen Sie danach eine Testabfrage aus.",
'ADMIN_ADD_CONFIG_NETWORK_TYPE_404_NOTE' => "Damit das Script auch das Interface des Werbenetzwerks ansprechen kann, muss ein Werbeart-Handler eingerichtet werden.",
- 'ADMIN_ADD_CONFIG_NETWORK_TYPE_MAX_RELOAD_TIME' => "Reloadsperre:",
- 'ADMIN_ADD_CONFIG_NETWORK_TYPE_MIN_WAITING_TIME' => "Mindestauffenthalt in Sekunden:",
- 'ADMIN_ADD_CONFIG_NETWORK_TYPE_MIN_REMAIN_CLICKS' => "Mindestanzahl noch übrige Klicks:",
- 'ADMIN_ADD_CONFIG_NETWORK_TYPE_MIN_PAYMENT' => "Mindestvergütung (maximal fünf Stellen hinterm Komma):",
- 'ADMIN_ADD_CONFIG_NETWORK_TYPE_ALLOW_EROTIC' => "Wert für das Zulassen von Erotikkampagnen:",
- 'ADMIN_NETWORK_TYPE_HANDLER_CONFIG_SAVED' => "Werbeart-Handler wurde gespeichert und ist sofort gültig.",
- 'ADMIN_NETWORK_TYPE_HANDLER_CONFIG_NOT_SAVED' => "Werbeart-Handler wurde NICHT gespeichert.",
+ 'ADMIN_CONFIG_NETWORK_TYPE_MAX_RELOAD_TIME' => "Reloadsperre:",
+ 'ADMIN_CONFIG_NETWORK_TYPE_RELOAD_TIME_UNIT' => "Zeieinheit für Reloadsperre:",
+ 'ADMIN_CONFIG_NETWORK_TYPE_MIN_WAITING_TIME' => "Mindestauffenthalt in Sekunden:",
+ 'ADMIN_CONFIG_NETWORK_TYPE_MIN_REMAIN_CLICKS' => "Mindestanzahl noch übrige Klicks:",
+ 'ADMIN_CONFIG_NETWORK_TYPE_MIN_PAYMENT' => "Mindestvergütung (maximal fünf Stellen hinterm Komma):",
+ 'ADMIN_CONFIG_NETWORK_TYPE_ALLOW_EROTIC' => "Wert für das Zulassen von Erotikkampagnen:",
+ 'ADMIN_CONFIG_NETWORK_TYPE_HANDLER_SAVED' => "Werbeart-Handler wurde gespeichert und ist sofort gültig.",
+ 'ADMIN_CONFIG_NETWORK_TYPE_HANDLER_NOT_SAVED' => "Werbeart-Handler wurde NICHT gespeichert.",
+ 'ADMIN_NETWORK_TYPE_HANDLER_NOT_CONFIGURED' => "Werart-Handler wurde noch nicht eingerichtet. Bitte verwenden Sie dazu das passende Formular.",
+ 'ADMIN_CONFIG_NETWORK_TYPE_HANDLER_NOT_CHANGED' => "Werbeart-Handler wurde NICHT geändert.",
// Error codes
'ADMIN_NETWORK_AFF_ID_PASS_WRONG_ERROR_CODE' => "Affiliate-Id oder -Passwort falsch",
'ADMIN_NETWORK_SITE_ID_NOT_ASSIGNED_ERROR_CODE' => "Seiten-Id nicht zugewiesen/ungültig",
// Output message
if (!SQL_HASZEROAFFECTED()) {
// Successfully added
- displayMessage('{--ADMIN_NETWORK_TYPE_HANDLER_CONFIG_SAVED--}');
+ displayMessage('{--ADMIN_CONFIG_NETWORK_TYPE_HANDLER_SAVED--}');
} else {
// Not added
- loadTemplate('admin_settings_unsaved', false, '{--ADMIN_NETWORK_TYPE_HANDLER_CONFIG_NOT_SAVED--}');
+ loadTemplate('admin_settings_unsaved', false, '{--ADMIN_CONFIG_NETWORK_TYPE_HANDLER_NOT_SAVED--}');
+ }
+}
+
+// Only changes network type configuration if not yet present
+function doAdminNetworkProcessEditNetworkTypesConfig () {
+ // Remove the 'ok' part
+ unsetPostRequestElement('ok');
+
+ // Add both ids
+ setPostRequestElement('network_id', bigintval(getRequestElement('network_id')));
+ setPostRequestElement('network_type_id', bigintval(getRequestElement('network_type_id')));
+
+ /*
+ * Some parameters are optional, at least one must be given so check a bunch
+ * of parameters.
+ */
+ foreach (array('network_min_waiting_time', 'network_min_remain_clicks', 'network_min_payment', 'network_allow_erotic') as $element) {
+ // Is this element empty?
+ if (postRequestElement($element) == '') {
+ // Then unset it to get a NULL for optional parameter
+ unsetPostRequestElement($element);
+ } // END - if
+ } // END - foreach
+
+ // Initialize variables
+ $content = array();
+ $id = 'network_max_reload_time_ye';
+ $skip = false;
+ $postData = postRequestArray();
+
+ // Convert "reload time selections"
+ convertSelectionsToEpocheTime($postData, $content, $id, $skip);
+
+ // Set the POST array back
+ setPostRequestArray($postData);
+
+ // Is there already an entry?
+ if (!isNetworkTypeHandlerConfigured(getRequestElement('network_id'), getRequestElement('network_type_id'))) {
+ // This network type handler is not configured
+ displayMessage('{--ADMIN_NETWORK_TYPE_HANDLER_NOT_CONFIGURED--}');
+ return;
+ } // END - if
+
+ // Get SQL query for new entry
+ $SQL = getUpdateSqlFromArray(postRequestArray(), 'network_types_config', 'network_data_id', postRequestElement('network_data_id'), array('network_data_id'));
+
+ // Run the query
+ SQL_QUERY($SQL, __FUNCTION__, __LINE__);
+
+ // Output message
+ if (!SQL_HASZEROAFFECTED()) {
+ // Successfully added
+ displayMessage('{--ADMIN_CONFIG_NETWORK_TYPE_HANDLER_SAVED--}');
+ } else {
+ // Not added
+ loadTemplate('admin_settings_unsaved', false, '{--ADMIN_CONFIG_NETWORK_TYPE_HANDLER_NOT_CHANGED--}');
}
}
`network_type_handle`,
NULL AS `network_data_id`,
NULL AS `network_max_reload_time`,
+ NULL AS `network_reload_time_unit`,
NULL AS `network_min_waiting_time`,
NULL AS `network_min_remain_clicks`,
NULL AS `network_min_payment`,
$result_config = SQL_QUERY_ESC('SELECT
`network_data_id`,
`network_max_reload_time`,
+ `network_reload_time_unit`,
`network_min_waiting_time`
`network_min_remain_clicks`,
`network_min_payment`,
bigintval($content['network_type_id'])
), __FUNCTION__, __LINE__);
+ // Use template for adding
+ $templateName = 'admin_add_config_network_type_form';
+
// Do we also have configuration?
if (SQL_NUMROWS($result_config) == 1) {
// Load as well and merge it
$content = merge_array($content, SQL_FETCHARRAY($result_config));
+
+ // Use template for editing
+ $templateName = 'admin_edit_config_network_type_form';
} // END - if
// Free result
SQL_FREERESULT($result_config);
// "Translate" some values
- $content['network_max_reload_time'] = createTimeSelections($content['network_max_reload_time'], 'network_max_reload_time', 'WDhms');
+ $content['network_max_reload_time'] = createTimeSelections($content['network_max_reload_time'], 'network_max_reload_time', 'WDhms');
+ $content['network_reload_time_unit'] = generateTimeUnitSelectionBox($content['network_reload_time_unit'], 'network_reload_time_unit', array('W', 'D', 'h', 'm', 's'));
// Load template
- loadTemplate('admin_add_config_network_type_form', false, $content);
+ loadTemplate($templateName, false, $content);
// Abort here
return;
$result_config = SQL_QUERY_ESC('SELECT
`network_data_id`,
`network_max_reload_time`,
+ `network_reload_time_unit`,
`network_min_waiting_time`,
`network_min_remain_clicks`,
`network_min_payment`,
// Do we have an entry?
if (SQL_NUMROWS($result_config) == 1) {
// Load this data as well
- $contentConfig = SQL_FETCHARRAY($result_config);
+ $contentConfig = merge_array($content, SQL_FETCHARRAY($result_config));
// Add it with extra template
$content['network_type_config_content'] = loadTemplate('admin_show_config_network_type', true, $contentConfig);
if ($asArray === true) {
// Just put all data in an array for later use
$OUT = array(
- 'YEARS' => $Y,
- 'MONTHS' => $M,
- 'WEEKS' => $W,
- 'DAYS' => $D,
- 'HOURS' => $h,
- 'MINUTES' => $m,
- 'SECONDS' => $s
+ 'Y' => $Y,
+ 'M' => $M,
+ 'W' => $W,
+ 'D' => $D,
+ 'h' => $h,
+ 'm' => $m,
+ 's' => $s
);
} else {
// Generate table
$OUT .= '<tr>';
if (isInString('Y', $display) || (empty($display))) {
- $OUT .= '<td align="center" class="timebox_column bottom"><div class="tiny">{--_YEARS--}</strong></td>';
+ $OUT .= '<td align="center" class="timebox_column bottom"><div class="tiny">{--TIME_UNIT_YEAR--}</strong></td>';
} // END - if
if (isInString('M', $display) || (empty($display))) {
- $OUT .= '<td align="center" class="timebox_column bottom"><div class="tiny">{--_MONTHS--}</strong></td>';
+ $OUT .= '<td align="center" class="timebox_column bottom"><div class="tiny">{--TIME_UNIT_MONTH--}</strong></td>';
} // END - if
if (isInString('W', $display) || (empty($display))) {
- $OUT .= '<td align="center" class="timebox_column bottom"><div class="tiny">{--_WEEKS--}</strong></td>';
+ $OUT .= '<td align="center" class="timebox_column bottom"><div class="tiny">{--TIME_UNIT_WEEK--}</strong></td>';
} // END - if
if (isInString('D', $display) || (empty($display))) {
- $OUT .= '<td align="center" class="timebox_column bottom"><div class="tiny">{--_DAYS--}</strong></td>';
+ $OUT .= '<td align="center" class="timebox_column bottom"><div class="tiny">{--TIME_UNIT_DAY--}</strong></td>';
} // END - if
if (isInString('h', $display) || (empty($display))) {
- $OUT .= '<td align="center" class="timebox_column bottom"><div class="tiny">{--_HOURS--}</strong></td>';
+ $OUT .= '<td align="center" class="timebox_column bottom"><div class="tiny">{--TIME_UNIT_HOUR--}</strong></td>';
} // END - if
if (isInString('m', $display) || (empty($display))) {
- $OUT .= '<td align="center" class="timebox_column bottom"><div class="tiny">{--_MINUTES--}</strong></td>';
+ $OUT .= '<td align="center" class="timebox_column bottom"><div class="tiny">{--TIME_UNIT_MINUTE--}</strong></td>';
} // END - if
if (isInString('s', $display) || (empty($display))) {
- $OUT .= '<td align="center" class="timebox_column bottom"><div class="tiny">{--_SECONDS--}</strong></td>';
+ $OUT .= '<td align="center" class="timebox_column bottom"><div class="tiny">{--TIME_UNIT_SECOND--}</strong></td>';
} // END - if
$OUT .= '</tr>';
return sprintf("{--POOL_TYPE_%s--}", strtoupper($type));
}
+// "Translates" given time unit
+function translateTimeUnit ($unit) {
+ // Default is unknown
+ $message = '{%message,TIME_UNIT_UNKNOWN=' . $unit . '%}';
+
+ // "Detect" it
+ switch ($unit) {
+ case 'Y': // Years
+ $message = '{--TIME_UNIT_YEAR--}';
+ break;
+
+ case 'M': // Months
+ $message = '{--TIME_UNIT_MONTH--}';
+ break;
+
+ case 'W': // Weeks
+ $message = '{--TIME_UNIT_WEEK--}';
+ break;
+
+ case 'D': // Days
+ $message = '{--TIME_UNIT_DAY--}';
+ break;
+
+ case 'h': // Hours
+ $message = '{--TIME_UNIT_HOUR--}';
+ break;
+
+ case 'm': // Minute
+ $message = '{--TIME_UNIT_MINUTE--}';
+ break;
+
+ case 's': // Seconds
+ $message = '{--TIME_UNIT_SECOND--}';
+ break;
+
+ default: // Unknown value detected
+ logDebugMessage(__FUNCTION__, __LINE__, 'Unknown time unit ' . $unit . ' detected.');
+ break;
+ } // END - switch
+
+ // Return message
+ return $message;
+}
+
// Displays given message in admin_settings_saved template
function displayMessage ($message, $return = false) {
// Load the template
// Start the HTML code
$out = '<select name="gender" size="1" class="form_select">';
- // Add the options
+ // Add options
$out .= generateOptionList('/ARRAY/', array('M', 'F', 'C'), array('{--GENDER_M--}', '{--GENDER_F--}', '{--GENDER_C--}'), $selectedGender);
// Finish HTML code
return $out;
}
+// Generates a selection box for given default value
+function generateTimeUnitSelectionBox ($defaultUnit, $fieldName, $unitArray) {
+ // Init variables
+ $messageIds = array();
+
+ // Generate message id array
+ foreach ($unitArray as $unit) {
+ // "Translate" it
+ $messageIds[] = translateTimeUnit($unit);
+ } // END - foreach
+
+ // Start the HTML code
+ $out = '<select name="' . $fieldName . '" size="1" class="form_select">';
+
+ // Add options
+ $out .= generateOptionList('/ARRAY/', $unitArray, $messageIds, $defaultUnit);
+
+ // Finish HTML code
+ $out .= '</select>';
+
+ // Return the code
+ return $out;
+}
+
// Function to add style tag (wether display:none/block)
function addStyleMenuContent ($menuMode, $mainAction, $action) {
// Do we have foo_menu_javascript enabled?
</div>
</div>
<div class="bottom" style="padding-top:3px;padding-bottom:3px">
- {--ADMIN_ADD_CONFIG_NETWORK_TYPE_MAX_RELOAD_TIME--}<br />
+ {--ADMIN_CONFIG_NETWORK_TYPE_MAX_RELOAD_TIME--}<br />
$content[network_max_reload_time]
</div>
<div class="bottom" style="padding-top:3px;padding-bottom:3px">
- {--ADMIN_ADD_CONFIG_NETWORK_TYPE_MIN_WAITING_TIME--}<br />
+ {--ADMIN_CONFIG_NETWORK_TYPE_RELOAD_TIME_UNIT--}<br />
+ $content[network_reload_time_unit]
+ </div>
+ <div class="bottom" style="padding-top:3px;padding-bottom:3px">
+ {--ADMIN_CONFIG_NETWORK_TYPE_MIN_WAITING_TIME--}<br />
<input type="text" class="form_normal" name="network_min_waiting_time" size="5" maxlength="20" value="$content[network_min_waiting_time]" />
</div>
<div class="bottom" style="padding-top:3px;padding-bottom:3px">
- {--ADMIN_ADD_CONFIG_NETWORK_TYPE_MIN_REMAIN_CLICKS--}<br />
+ {--ADMIN_CONFIG_NETWORK_TYPE_MIN_REMAIN_CLICKS--}<br />
<input type="text" class="form_normal" name="network_min_remain_clicks" size="5" maxlength="20" value="$content[network_min_remain_clicks]" />
</div>
<div class="bottom" style="padding-top:3px;padding-bottom:3px">
- {--ADMIN_ADD_CONFIG_NETWORK_TYPE_MIN_PAYMENT--}<br />
+ {--ADMIN_CONFIG_NETWORK_TYPE_MIN_PAYMENT--}<br />
<input type="text" class="form_normal" name="network_min_payment" size="5" maxlength="20" value="$content[network_min_payment]" />
</div>
<div class="bottom" style="padding-top:3px;padding-bottom:3px">
- {--ADMIN_ADD_CONFIG_NETWORK_TYPE_ALLOW_EROTIC--}<br />
+ {--ADMIN_CONFIG_NETWORK_TYPE_ALLOW_EROTIC--}<br />
<input type="text" class="form_normal" name="network_allow_erotic" size="5" maxlength="20" value="$content[network_allow_erotic]" />
</div>
<div class="table_footer">
<tr>
<td align="right">{--ADMIN_ENTER_PAYMENT_TIME--}:</td>
<td>
- <input type="text" class="form_field" name="t_wait" size="3" maxlength="3" /> {--_SECONDS--}
+ <input type="text" class="form_field" name="t_wait" size="3" maxlength="3" /> {--TIME_UNIT_SECOND--}
</td>
</tr>
<tr>
<option value="-1"$content[-1]>{--ADMIN_INDEX_NO_DELAY--}</option>
<option value="0"$content[0]>{--ADMIN_INDEX_MANUAL_FORWARD--}</option>
<!-- Fuehren Sie dies einfach so weiter, wenn Sie mehr Werte brauchen //-->
- <option value="1"$content[1]>1 {--_SECONDS--} (JavaScript+HTML)</option>
- <option value="2"$content[2]>2 {--_SECONDS--} (JavaScript+HTML)</option>
- <option value="3"$content[3]>3 {--_SECONDS--} (JavaScript+HTML)</option>
- <option value="4"$content[4]>4 {--_SECONDS--} (JavaScript+HTML)</option>
- <option value="5"$content[5]>5 {--_SECONDS--} (JavaScript+HTML)</option>
- <option value="10"$content[10]>10 {--_SECONDS--} (JavaScript+HTML)</option>
- <option value="15"$content[15]>15 {--_SECONDS--} (JavaScript+HTML)</option>
- <option value="30"$content[30]>30 {--_SECONDS--} (JavaScript+HTML)</option>
+ <option value="1"$content[1]>1 {--TIME_UNIT_SECOND--} (JavaScript+HTML)</option>
+ <option value="2"$content[2]>2 {--TIME_UNIT_SECOND--} (JavaScript+HTML)</option>
+ <option value="3"$content[3]>3 {--TIME_UNIT_SECOND--} (JavaScript+HTML)</option>
+ <option value="4"$content[4]>4 {--TIME_UNIT_SECOND--} (JavaScript+HTML)</option>
+ <option value="5"$content[5]>5 {--TIME_UNIT_SECOND--} (JavaScript+HTML)</option>
+ <option value="10"$content[10]>10 {--TIME_UNIT_SECOND--} (JavaScript+HTML)</option>
+ <option value="15"$content[15]>15 {--TIME_UNIT_SECOND--} (JavaScript+HTML)</option>
+ <option value="30"$content[30]>30 {--TIME_UNIT_SECOND--} (JavaScript+HTML)</option>
<!-- Laenger sollte es aber nun nicht dauern! //-->
</select>
</td>
<tr>
- <td class="{%template,ColorSwitch%} bottom right" align="center">
+ <td class="{%template,ColorSwitch%} bottom right" align="center" width="7%">
{--ID_SELECT--}<br />
<strong>$content[network_type_id]</strong>
</td>
- <td class="{%template,ColorSwitch%} bottom" align="center">
+ <td class="{%template,ColorSwitch%} bottom" align="center" width="93%">
{--ADMIN_NETWORK_TYPES_HANDLE--}<br />
<strong>{%pipe,translateNetworkTypeHandler=$content[network_type_handle]%}</strong>
</td>
</tr>
<tr>
<td align="center" class="{%template,ColorSwitch%} bottom">
- $content[time] {--_SECONDS--} ($content[mail_title])
+ $content[time] {--TIME_UNIT_SECOND--} ($content[mail_title])
<input type="hidden" name="id[$content[id]]" value="1" />
</td>
</tr>
--- /dev/null
+<div align="center">
+<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&what=config_network_types&network_id=$content[network_id]&network_type_id=$content[network_type_id]&do=edit_network_types_config%}" method="post">
+<div class="table dashed">
+ <div class="table_header bottom">
+ <div>
+ <strong>{%message,ADMIN_EDIT_CONFIG_NETWORK_TYPE_TITLE=$content[network_type_handle]%}</strong>
+ </div>
+ <div class="tiny">
+ (<a href="{%network,getNetworkDataById,network_reflink=%network_id%%}" target="_blank" title="{%network,getNetworkDataById,network_title=%network_id%%}">{%network,getNetworkDataById,network_title=%network_id%%}</a>)
+ </div>
+ </div>
+ <div class="bottom" style="padding-top:3px;padding-bottom:3px">
+ {--ADMIN_CONFIG_NETWORK_TYPE_MAX_RELOAD_TIME--}<br />
+ $content[network_max_reload_time]
+ </div>
+ <div class="bottom" style="padding-top:3px;padding-bottom:3px">
+ {--ADMIN_CONFIG_NETWORK_TYPE_RELOAD_TIME_UNIT--}<br />
+ $content[network_reload_time_unit]
+ </div>
+ <div class="bottom" style="padding-top:3px;padding-bottom:3px">
+ {--ADMIN_CONFIG_NETWORK_TYPE_MIN_WAITING_TIME--}<br />
+ <input type="text" class="form_normal" name="network_min_waiting_time" size="5" maxlength="20" value="$content[network_min_waiting_time]" />
+ </div>
+ <div class="bottom" style="padding-top:3px;padding-bottom:3px">
+ {--ADMIN_CONFIG_NETWORK_TYPE_MIN_REMAIN_CLICKS--}<br />
+ <input type="text" class="form_normal" name="network_min_remain_clicks" size="5" maxlength="20" value="$content[network_min_remain_clicks]" />
+ </div>
+ <div class="bottom" style="padding-top:3px;padding-bottom:3px">
+ {--ADMIN_CONFIG_NETWORK_TYPE_MIN_PAYMENT--}<br />
+ <input type="text" class="form_normal" name="network_min_payment" size="5" maxlength="20" value="$content[network_min_payment]" />
+ </div>
+ <div class="bottom" style="padding-top:3px;padding-bottom:3px">
+ {--ADMIN_CONFIG_NETWORK_TYPE_ALLOW_EROTIC--}<br />
+ <input type="text" class="form_normal" name="network_allow_erotic" size="5" maxlength="20" value="$content[network_allow_erotic]" />
+ </div>
+ <div class="table_footer">
+ <input type="hidden" name="network_data_id" value="$content[network_data_id]" />
+ <input type="submit" class="form_submit" name="ok" value="{--ADMIN_EDIT_CONFIG_NETWORK_TYPE_FORM_SUBMIT--}" />
+ </div>
+</form>
+</div>
+
+<div class="notice">
+ {--ADMIN_EDIT_CONFIG_NETWORK_TYPE_FORM_NOTE--}
+</div>
<tr>
<td class="{%template,ColorSwitch%}" align="right">{--ADMIN_PAYMENT_TIME--}:</td>
<td class="{%template,ColorSwitch%}">
- <input type="text" class="form_field" name="time[$content[id]]" value="$content[time]" size="3" maxlength="5" />{--_SECONDS--}
+ <input type="text" class="form_field" name="time[$content[id]]" value="$content[time]" size="3" maxlength="5" />{--TIME_UNIT_SECOND--}
</td>
</tr>
<tr>
<input type="checkbox" class="form_field" title="{--ID_SELECT--} $content[id]" name="sel[$content[id]]" value="1" />
</td>
<td align="center" class="bottom right {%template,ColorSwitch%}">
- $content[time] {--_SECONDS--}
+ $content[time] {--TIME_UNIT_SECOND--}
</td>
<td align="center" class="bottom right {%template,ColorSwitch%}">
{%pipe,translateComma=$content[payment]%}
<tr>
<td class="{%template,ColorSwitch%} bottom right" align="center">$content[id]</td>
<td class="{%template,ColorSwitch%} bottom right">$content[name]</td>
- <td class="{%template,ColorSwitch%} bottom right" align="center">$content[reload] {--_HOURS--}</td>
- <td class="{%template,ColorSwitch%} bottom right" align="center">$content[wait] {--_SECONDS--}</td>
+ <td class="{%template,ColorSwitch%} bottom right" align="center">$content[reload] {--TIME_UNIT_HOUR--}</td>
+ <td class="{%template,ColorSwitch%} bottom right" align="center">$content[wait] {--TIME_UNIT_SECOND--}</td>
<td class="{%template,ColorSwitch%} bottom right" align="center">{%pipe,translateComma=$content[remain]%}</td>
<td class="{%template,ColorSwitch%} bottom right" align="center">$content[pay] €</td>
<td class="{%template,ColorSwitch%} bottom">
<tr>
<td class="{%template,ColorSwitch%} bottom right" align="center">$content[id]</td>
<td class="{%template,ColorSwitch%} bottom right">$content[name]</td>
- <td class="{%template,ColorSwitch%} bottom right" align="center">$content[reload] {--_HOURS--}</td>
- <td class="{%template,ColorSwitch%} bottom right" align="center">$content[wait] {--_SECONDS--}</td>
+ <td class="{%template,ColorSwitch%} bottom right" align="center">$content[reload] {--TIME_UNIT_HOUR--}</td>
+ <td class="{%template,ColorSwitch%} bottom right" align="center">$content[wait] {--TIME_UNIT_SECOND--}</td>
<td class="{%template,ColorSwitch%} bottom right" align="center">{%pipe,translateComma=$content[remain]%}</td>
<td class="{%template,ColorSwitch%} bottom right" align="center">$content[pay] €</td>
<td class="{%template,ColorSwitch%} bottom" align="center" style="padding-left:1px;padding-right:1px;padding-top:2px;padding-bottom:2px">
<tr>
<td align="right" style="padding-right:5px">{--ENTER_SECONDS--}:</td>
<td>
- <input type="text" class="form_field" name="seconds" size="4" maxlength="5" value="$content[wait]" /> {--_SECONDS--}
+ <input type="text" class="form_field" name="seconds" size="4" maxlength="5" value="$content[wait]" /> {--TIME_UNIT_SECOND--}
</td>
</tr>
<tr>
--- /dev/null
+<div align="center">
+<form accept-charset="UTF-8" action="{%url=modules.php%}" method="get">
+<div class="dashed">
+ <div class="table_header bottom">
+ <strong>{%message,ADMIN_SHOW_CONFIG_NETWORK_TYPE_TITLE=$content[network_type_handle]%}</strong>
+ </div>
+ <div>
+ {--ADMIN_CONFIG_NETWORK_TYPE_MAX_RELOAD_TIME--} ({--TIME_UNIT--})<br />
+ <strong>{%pipe,createFancyTime=$content[network_max_reload_time]%} ({%pipe,translateTimeUnit=$content[network_reload_time_unit]%})</strong>
+ </div>
+ <div>
+ {--ADMIN_CONFIG_NETWORK_TYPE_MIN_WAITING_TIME--}<br />
+ <strong>{%pipe,translateComma=$content[network_min_waiting_time]%}</strong>
+ </div>
+ <div>
+ {--ADMIN_CONFIG_NETWORK_TYPE_MIN_REMAIN_CLICKS--}<br />
+ <strong>{%pipe,translateComma=$content[network_min_remain_clicks]%}</strong>
+ </div>
+ <div>
+ {--ADMIN_CONFIG_NETWORK_TYPE_MIN_PAYMENT--}<br />
+ <strong>{%pipe,translateComma=$content[network_min_payment]%}</strong>
+ </div>
+ <div class="bottom">
+ {--ADMIN_CONFIG_NETWORK_TYPE_ALLOW_EROTIC--}<br />
+ <strong>{%pipe,fixEmptyContentToDashes=$content[network_allow_erotic]%}</strong>
+ </div>
+ <div class="table_footer">
+ <input type="hidden" name="module" value="admin" />
+ <input type="hidden" name="what" value="config_network_types" />
+ <input type="hidden" name="network_id" value="$content[network_id]" />
+ <input type="hidden" name="network_type_id" value="$content[network_type_id]" />
+ <input type="submit" class="form_submit" value="{--ADMIN_EDIT_CONFIG_NETWORK_TYPE_SUBMIT--}" />
+ </div>
+</form>
+</div>
</div>
<div>
{--CONFIG_URL_TIME_LOCK--}
- $content[hours] {--_HOURS--},
- $content[minutes] {--_MINUTES--} {--_AND--}
- $content[seconds] {--_SECONDS--}
+ $content[hours] {--TIME_UNIT_HOUR--},
+ $content[minutes] {--TIME_UNIT_MINUTE--} {--_AND--}
+ $content[seconds] {--TIME_UNIT_SECOND--}
</div>
<div>
{--MEMBER_LAST_TIME_LOCK--}: $content[timestamp]