templates/de/html/admin/admin_edit_email.tpl -text
templates/de/html/admin/admin_edit_email_row.tpl -text
templates/de/html/admin/admin_edit_email_select.tpl -text
+templates/de/html/admin/admin_edit_network_types.tpl -text
+templates/de/html/admin/admin_edit_network_types_row.tpl -text
templates/de/html/admin/admin_edit_networks.tpl -text
templates/de/html/admin/admin_edit_networks_row.tpl -text
templates/de/html/admin/admin_edit_payments.tpl -text
'ADMIN_NETWORK_NOTHING_FOUND' => "Es wurden keine Daten zum Editieren oder Löschen gefunden.",
'ADMIN_NETWORK_NOTHING_CHANGED' => "Es wurden keine Änderungen an den allgemeinen Daten ausgeführt.",
'ADMIN_NETWORK_NOTHING_REMOVED' => "Es wurden keine allgemeinen Daten gelöscht.",
- 'ADMIN_NETWORK_TYPES_404' => "Es wurden keine Werbearten zum Werbenetzwerk <span class=\"data\">%s</span> gefunden.",
'ADMIN_NETWORK_ALREADY_ADDED' => "Ein Werbenetzwerk mit dem Kurznamen <span class=\"data\">%s</span> existiert bereits.",
- 'ADMIN_NETWORK_TYPE_HANDLE_ALREADY_ADDED' => "Ein Werbeart-Handler <span class=\"data\">%s</span> existiert bereits.",
'ADMIN_NETWORK_DATA_NOT_ADDED' => "Das Werbenetzwerk mit dem Kurznamen <span class=\"data\">%s</span> wurde nicht hinzugefügt.",
+ 'ADMIN_NETWORK_TYPES_404' => "Es wurden keine Werbearten zum Werbenetzwerk <span class=\"data\">%s</span> gefunden.",
+ 'ADMIN_NETWORK_TYPE_HANDLE_ALREADY_ADDED' => "Ein Werbeart-Handler <span class=\"data\">%s</span> existiert bereits.",
'ADMIN_NETWORK_TYPE_NOT_ADDED' => "Der Werbeart-Handler <span class=\"data\">%s</span> wurde nicht hinzugefügt.",
+ 'ADMIN_NETWORK_TYPE_NOTHING_FOUND' => "Es wurden keine Werbart-Handler zum Editieren oder Löschen gefunden.",
// - Form titles
'ADMIN_NETWORK_ADD_TITLE' => "Neues Werbenetzwerk hinzufügen - Allgemeine Daten",
'ADMIN_NETWORK_EDIT_TITLE' => "Werbenetzwerk editieren - Allgemeine Daten",
'ADMIN_NETWORK_DELETE_TITLE' => "Werbenetzwerk löschen - Allgemeine Daten",
'ADMIN_NETWORK_SELECT_TITLE' => "Werbenetzwerk auswählen",
'ADMIN_NETWORK_TYPE_ADD_TITLE' => "Werbenetzwerk verwalten - Neue Werbeart hinzufügen",
+ 'ADMIN_NETWORK_TYPE_EDIT_TITLE' => "Werbeart-Handler editieren",
// - Link titles
'ADMIN_NETWORK_LIST_TYPES_LINK_TITLE' => "Weiter zu den Werbearten",
'ADMIN_NETWORK_LIST_PARAMS_LINK_TITLE' => "Weiter zu den Abfrageparametern",
'ADMIN_NETWORK_TYPE_ADD' => "Werbeart hinzufügen",
'ADMIN_NETWORK_TYPE_EDIT' => "Editieren",
'ADMIN_NETWORK_TYPE_DELETE' => "Löschen",
+ 'ADMIN_NETWORK_TYPE_CHANGE' => "Handler ändern",
// - Success nots
'ADMIN_NETWORK_UPDATED' => "Es wurden <span class=\"data\">%s</span> Einträge in den allgemeinen Daten aktualisiert.",
'ADMIN_NETWORK_REMOVED' => "Es wurden <span class=\"data\">%s</span> Einträge aus den allgemeinen Dateen gelöscht.",
return $networkData;
}
+// "Getter" for a network type data by provided id number
+function getNetworkTypeDataById ($id) {
+ // Ids lower one are not accepted
+ if ($id < 1) {
+ // Not good, should be fixed
+ debug_report_bug('Network type id ' . $id . ' is smaller than 1.');
+ } // END - if
+
+ // By default we have no data
+ $networkTypeData = array();
+
+ // Query for the network data
+ $result = SQL_QUERY_ESC("SELECT
+ `network_type_id`, `network_id`, `network_type_handle`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`
+FROM
+ `{?_MYSQL_PREFIX?}_network_types`
+WHERE
+ `network_type_id`=%s
+LIMIT 1",
+ array(bigintval($id)), __FUNCTION__, __LINE__);
+
+ // Do we have an entry?
+ if (SQL_NUMROWS($result) == 1) {
+ // Then get it
+ $networkTypeData = SQL_FETCHARRAY($result);
+ } // END - if
+
+ // Free result
+ SQL_FREERESULT($result);
+
+ // Return result
+ return $networkTypeData;
+}
+
// Updates given network (id) with data from array
function doNetworkUpdateDataByArray ($id, $networkData) {
// Ids lower one are not accepted
} // END - if
}
+// Handle network type form
+function doAdminNetworkProcessHandlenetworktypeForm () {
+ // Do we have selections?
+ if (countPostSelection() > 0) {
+ // Load network data
+ $networkData = getNetworkDataById(getRequestElement('network'));
+
+ // Something has been selected, so start displaying one by one
+ $SW = 2; $OUT = '';
+ foreach (postRequestElement('sel') as $id => $sel) {
+ // Is this selected?
+ if ($sel == 1) {
+ // Load this network's data
+ $networkTypeData = getNetworkTypeDataById($id);
+
+ // Do we have found the network?
+ if (count($networkTypeData) > 0) {
+ // Add color
+ $networkTypeData['sw'] = $SW;
+
+ if (isPostRequestElementSet('edit')) {
+ // Add row template for deleting
+ $OUT .= loadTemplate('admin_edit_network_types_row', true, $networkTypeData);
+ } elseif (isPostRequestElementSet('del')) {
+ // Add row template for deleting
+ $OUT .= loadTemplate('admin_del_network_types_row', true, $networkTypeData);
+ } else {
+ // Problem!
+ debug_report_bug('Cannot detect edit/del.');
+ }
+
+ // Switch colors
+ $SW = 3 - $SW;
+ } // END - if
+ } // END - if
+ } // END - foreach
+
+ // If we have no rows, we don't need to display the edit form
+ if (!empty($OUT)) {
+ // Prepare content for template
+ $content = array(
+ 'rows' => $OUT,
+ 'network_data' => getNetworkDataById(getRequestElement('network'))
+ );
+
+ // Output main template
+ if (isPostRequestElementSet('edit')) {
+ loadTemplate('admin_edit_network_types', false, $content);
+ } elseif (isPostRequestElementSet('del')) {
+ loadTemplate('admin_del_network_types', false, $content);
+ } else {
+ // Problem!
+ debug_report_bug('Cannot detect edit/del.');
+ }
+
+ // Don't display the list/add new form
+ $GLOBALS['network_display'] = false;
+ } else {
+ // Nothing selected/found
+ loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NETWORK_TYPE_NOTHING_FOUND'));
+ }
+ } // END - if
+}
+
// Changes given networks
function doAdminNetworkProcessChangenetworkForm () {
// Do we have selections?
return;
} // END - if
+// By default we should display list/add new forms
+$GLOBALS['network_display'] = true;
+
// Handle form here
doNetworkHandleForm();
+// Display forms?
+if ($GLOBALS['network_display'] === false) {
+ // Abort here
+ return;
+} // END - if
+
// Do we have a network selected?
if (isGetRequestElementSet('network')) {
// Get its data for template
// Prepare data for template
$content = array(
'rows' => $OUT,
- 'network_id' => getRequestElement('network_id'),
+ 'network_id' => getRequestElement('network'),
'network_title' => $networkData['network_title'],
'network_reflink' => $networkData['network_reflink'],
);
return;
} // END - if
-// Handle form here
-doNetworkHandleForm();
-
// By default we should display list/add new forms
$GLOBALS['network_display'] = true;
+// Handle form here
+doNetworkHandleForm();
+
// Display forms?
if ($GLOBALS['network_display'] === false) {
// Abort here
--- /dev/null
+<div align="center">
+<form accept-charset="utf-8" action="{%url=modules.php?module=admin&what=list_networks&network=$content[network_data][network_id]&do=changenetworktype%}" method="post">
+<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed">
+ <tr>
+ <td align="center" class="admin_title bottom" height="25" colspan="2">
+ <div>
+ <strong>{--ADMIN_NETWORK_TYPE_EDIT_TITLE--}</strong>
+ </div>
+ <div class="tiny">
+ (<a href="$content[network_data][network_reflink]" title="$content[network_data][network_title]" target="_blank">$content[network_data][network_title]</a>)
+ </div>
+ </td>
+ </tr>
+ $content[rows]
+ <tr>
+ <td colspan="2" class="admin_footer">
+ <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" />
+ <input type="submit" name="change" class="admin_submit" value="{--ADMIN_NETWORK_TYPE_CHANGE--}" />
+ </td>
+ </tr>
+</table>
+</form>
+
+<div class="admin_note">
+ {--ADMIN_NETWORK_TYPE_LIST_NOTE--}
+</div>
+</div>
--- /dev/null
+<tr>
+ <td class="switch_sw$content[sw]" style="padding-left:5px">{--ADMIN_NETWORK_TYPE_HANDLE--}:</td>
+ <td class="switch_sw$content[sw]">
+ <input type="hidden" name="sel[$content[network_id]]" value="1" />
+ <input type="text" name="network_type_handle[$content[network_type_id]]" class="admin_normal" size="20" maxlength="255" value="$content[network_type_handle]" />
+ </td>
+</tr>
+<tr>
+ <td class="switch_sw$content[sw]" style="padding-left:5px">{--ADMIN_NETWORK_TYPE_API_URL--}:</td>
+ <td class="switch_sw$content[sw]">
+ <input type="text" name="network_type_api_url[$content[network_type_id]]" class="admin_normal" size="50" maxlength="255" value="$content[network_type_api_url]" />
+ </td>
+</tr>
+<tr>
+ <td class="switch_sw$content[sw]" style="padding-left:5px">{--ADMIN_NETWORK_TYPE_CLICK_URL--}:</td>
+ <td class="switch_sw$content[sw]">
+ <input type="text" name="network_type_click_url[$content[network_type_id]]" class="admin_normal" size="50" maxlength="255" value="$content[network_type_click_url]" />
+ </td>
+</tr>
+<tr>
+ <td class="switch_sw$content[sw] bottom" style="padding-left:5px">{--ADMIN_NETWORK_TYPE_BANNER_URL--}:</td>
+ <td class="switch_sw$content[sw] bottom">
+ <input type="text" name="network_type_banner_url[$content[network_type_id]]" class="admin_normal" size="50" maxlength="255" value="$content[network_type_banner_url]" />
+ </td>
+</tr>
<div align="center">
-<form accept-charset="utf-8" action="{%url=modules.php?module=admin&what=list_network_types&&network=$content[network_id]&do=handlenetworktype%}" method="post">
+<form accept-charset="utf-8" action="{%url=modules.php?module=admin&what=list_network_types&network=$content[network_id]&do=handlenetworktype%}" method="post">
<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed">
<tr>
<td colspan="5" align="center" class="admin_title bottom">