* -------------------------------------------------------------------- *
* File : what-list_network_array_translation.php *
* -------------------------------------------------------------------- *
- * Short description : List/manage network API query parameters *
+ * Short description : List/manage network array index translations *
* -------------------------------------------------------------------- *
* Kurzbeschreibung : Verwaltet API-Abfrageparameter *
* -------------------------------------------------------------------- *
- * $Revision:: 1794 $ *
- * $Date:: 2010-05-28 19:55:19 +0200 (Fri, 28 May 2010) $ *
+ * $Revision:: $ *
+ * $Date:: $ *
* $Tag:: 0.2.1-FINAL $ *
- * $Author:: quix0r $ *
+ * $Author:: $ *
* Needs to be in all Files and every File needs "svn propset *
* svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
bigintval(getRequestParameter('network_type'))
), __FILE__, __LINE__);
+ // Remember the rows
+ $rows = SQL_NUMROWS($result);
+
// Do we have entries?
- if (SQL_NUMROWS($result) > 0) {
+ if ($rows > 0) {
// List all entries
- $OUT = ''; $SW = 2;
+ $OUT = '';
while ($row = SQL_FETCHARRAY($result)) {
- // Add/translate some data
- $row['sw'] = $SW;
-
// Add it to network if the type matches selected
if ($row['network_type_id'] == getRequestParameter('network_type_id')) {
// Matches, then add it for disabling this entry
// Add row template and switch color
$OUT .= loadTemplate('admin_list_network_array_translation_row', true, $row);
- $SW = 3 - $SW;
} // END - while
// Prepare data for template
$content = array(
- 'rows' => $OUT,
- 'network_id' => bigintval(getRequestParameter('network')),
- 'network_title' => $networkData['network_title'],
- 'network_reflink' => $networkData['network_reflink'],
+ 'rows' => $OUT,
+ 'network_id' => bigintval(getRequestParameter('network')),
+ 'network_title' => $networkData['network_title'],
+ 'network_reflink' => $networkData['network_reflink'],
);
// Load main template
SQL_FREERESULT($result);
// Add options list for network type
- $networkData['type_options'] = generateNetworkTypeOptions(getRequestParameter('network_type_id'));
+ $networkData['translation_index'] = ($rows + 1);
+ $networkData['type_options'] = generateNetworkTypeOptions(getRequestParameter('network_type_id'));
// Add form for adding new array_translation pair
loadTemplate('admin_add_network_array_translation', false, $networkData);