templates/de/html/runtime_fatal_row.tpl svneol=native#text/plain
templates/de/html/runtime_fatal_table.tpl svneol=native#text/plain
templates/de/html/select/.htaccess svneol=native#text/plain
+templates/de/html/select/select_admins_box.tpl svneol=native#text/plain
+templates/de/html/select/select_admins_option.tpl svneol=native#text/plain
templates/de/html/select/select_forced_ads_type_box.tpl svneol=native#text/plain
templates/de/html/select/select_forced_ads_type_option.tpl svneol=native#text/plain
templates/de/html/select/select_network_box.tpl svneol=native#text/plain
./inc/functions.php:2236: // @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:1071: // @TODO Rewrite these two constants
-./inc/language/de.php:1087: // @TODO Rewrite these three constants
-./inc/language/de.php:757:// @TODO Are these constants longer used?
+./inc/language/de.php:1072: // @TODO Rewrite these two constants
+./inc/language/de.php:1088: // @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.
./inc/language/newsletter_de.php:13: * @TODO This language file is completely out-dated, please do no *
./inc/language/rallye_de.php:13: * @TODO Naming convention not applied for language strings *
./inc/language/refback_de.php:53: // @TODO Rewrite these constants to one
./inc/language/sponsor_de.php:117:// @TODO Rewrite these four constants to one and use sprintf()
-./inc/libs/admins_functions.php:505: // @TODO This can be, somehow, rewritten
+./inc/libs/admins_functions.php:508: // @TODO This can be, somehow, rewritten
./inc/libs/bonus_functions.php:194: // @TODO Move this HTML to a template
./inc/libs/doubler_functions.php:44:// @TODO Lame description
./inc/libs/doubler_functions.php:93: // @TODO Can't this be moved into EL?
./inc/mails/doubler_mails.php:53:// @TODO Can this be rewritten to a filter?
./inc/module-functions.php:267: // @TODO Nothing helped???
./inc/module-functions.php:308: // @TODO Rewrite this to a filter
-./inc/modules/admin/admin-inc.php:1379: // @TODO If we can rewrite the EL sub-system to support more than one parameter, this call_user_func_array() can be avoided
+./inc/modules/admin/admin-inc.php:1420: // @TODO If we can rewrite the EL sub-system to support more than one parameter, this call_user_func_array() can be avoided
./inc/modules/admin/admin-inc.php:171: // @TODO This and the next getCurrentAdminId() call might be moved into the templates?
./inc/modules/admin/admin-inc.php:242: // @TODO This can be rewritten into a filter
./inc/modules/admin/admin-inc.php:274: // @TODO Rewrite this to $content = SQL_FETCHARRAY()
./inc/modules/admin/admin-inc.php:340: // @TODO Rewrite this to $content = SQL_FETCHARRAY()
-./inc/modules/admin/admin-inc.php:444:// @TODO Try to rewrite this to adminAddMenuSelectionBox()
+./inc/modules/admin/admin-inc.php:485:// @TODO Try to rewrite this to adminAddMenuSelectionBox()
./inc/modules/admin/overview-inc.php:162: // @TODO Rewrite this to a filter
./inc/modules/admin/overview-inc.php:275: // @TODO Rewrite this to something with include files and/or filter
./inc/modules/admin/overview-inc.php:309: // @TODO This may also be rewritten to include files
./inc/modules/guest/what-login.php:125: // @TODO Move this HTML code into a template
./inc/modules/guest/what-mediadata.php:182:// @TODO Rewrite all these if-blocks to filters
./inc/modules/guest/what-mediadata.php:67: // @TODO Find a better formular than this one
-./inc/modules/guest/what-rallyes.php:89: // @TODO Reactivate this: $content['admin'] = '<a href="{%url=modules.php?module=index&what=impressum&admin=' . $adminId . '%}">' . $login . '</a>';
+./inc/modules/guest/what-rallyes.php:89: // @TODO Reactivate this: $content['admin'] = '<a href="{%url=modules.php?module=index&what=impressum&id=' . $adminId . '%}">' . $login . '</a>';
./inc/modules/guest/what-sponsor_reg.php:289: // @TODO Maybe a default referal id?
./inc/modules/guest/what-stats.php:108: // @TODO This can be somehow rewritten
./inc/modules/guest/what-stats.php:82:// @TODO This can be rewritten in a dynamic include
./inc/modules/member/what-order.php:82: // @TODO Rewrite this to SQL_FETCHARRAY()
./inc/modules/member/what-payout.php:194: // @TODO Rewrite this to a filter
./inc/modules/member/what-points.php:55:// @TODO Should we rewrite this to a filter?
-./inc/modules/member/what-rallyes.php:89: // @TODO Reactivate this: $content['admin'] = '<a href="{%url=modules.php?module=index&what=impressum&admin=' . $content['admin_id'] . '%}">' . $content['login'] . '</a>';
+./inc/modules/member/what-rallyes.php:89: // @TODO Reactivate this: $content['admin'] = '<a href="{%url=modules.php?module=index&what=impressum&id=' . $content['admin_id'] . '%}">' . $content['login'] . '</a>';
./inc/modules/member/what-reflinks.php:52:// @TODO Move this into a filter
./inc/modules/member/what-transfer.php:128: // @TODO Rewrite this to a filter
./inc/modules/member/what-unconfirmed.php:162: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
./inc/mysql-manager.php:44:// @TODO Can we cache this?
./inc/purge/purge-inact.php:55: // @TODO Rewrite these if() blocks to a filter
./inc/revision-functions.php:169:// @TODO This function does also set and get in 'cache_array'
-./inc/template-functions.php:1068: // @TODO Deprecate this thing
-./inc/template-functions.php:1079: // @TODO Deprecate this thing
-./inc/template-functions.php:1169: // @TODO This can be easily moved out after the merge from EL branch to this is complete
-./inc/template-functions.php:1202: // @TODO Add a little more infos here
-./inc/template-functions.php:1531:// @TODO Lame description for this function
-./inc/template-functions.php:1553: // @TODO Move this in a filter
+./inc/template-functions.php:1070: // @TODO Deprecate this thing
+./inc/template-functions.php:1081: // @TODO Deprecate this thing
+./inc/template-functions.php:1171: // @TODO This can be easily moved out after the merge from EL branch to this is complete
+./inc/template-functions.php:1204: // @TODO Add a little more infos here
+./inc/template-functions.php:1533:// @TODO Lame description for this function
+./inc/template-functions.php:1555: // @TODO Move this in a filter
./inc/template-functions.php:184: * @TODO On some pages this is buggy
./inc/template-functions.php:273: // @TODO Remove this sanity-check if all is fine
-./inc/template-functions.php:596:// @TODO $simple/$constants are deprecated
+./inc/template-functions.php:598:// @TODO $simple/$constants are deprecated
./inc/wrapper-functions.php:512:// @TODO Do some more sanity check here
./inc/xml-functions.php:189: // @TODO Handle characters
./mailid.php:139: // @TODO Rewrite this to a filter
./network-check.php:54:// @TODO Add processing of request here
./view.php:68: // @TODO No banner found, output some default banner
./templates/de/html/admin/admin_add_country.tpl:23: <!-- @TODO Rewrite this selection box to our generic functions //-->
-./templates/de/html/admin/admin_admins_contct_form.tpl:4: <!-- @TODO Shouldn't we add a title here? //-->
./templates/de/html/admin/admin_config_other.tpl:79: <!-- @TODO Rewrite this selection to one of our functions //-->
./templates/de/html/admin/admin_config_rewrite.tpl:4: <!-- @TODO No title here? //-->
./templates/de/html/admin/admin_edit_admin_menu.tpl:4:<!-- @TODO Shouldn't we add a title here? //-->
./inc/loader/load_cache-revision.php:2:// @DEPRECATED
./inc/loader/load_cache-them.php:2:// @DEPRECATED
./inc/loader/load-extensions.php:2:// @DEPRECATED
-./inc/modules/admin/admin-inc.php:445:// @DEPRECATED
+./inc/modules/admin/admin-inc.php:486:// @DEPRECATED
./inc/modules/admin/what-chk_regs.php:2:// @DEPRECATED
./inc/modules/admin/what-config_admins.php:2:// @DEPRECATED
./inc/modules/admin/what-config_email.php:2:// @DEPRECATED
'ADMIN_ADMINS_CANNOT_DELETE_LAST' => "Das letzte Admin-Account kann nicht gelöscht werden.",
'ADMIN_ADMINS_SELECT_ADMIN' => "Bitte wählen Sie einen Administrator aus dem Menüpunkt <em>Admin-Account ändern</em> aus.",
'ADMIN_ADMINS_ADMIN_ID' => "Admin-Id",
+ 'ADMIN_CONTACT_ADMINS_TITLE' => "Administrator <span class=\"data\">%s</span> kontaktieren:",
'ADMIN_ADMINS_CONTACT_SUBMIT' => "Admin kontaktieren",
- 'ADMIN_ADMINS_ENTER_CONTACT_TEXT' => "Kontaktgrund eingeben",
+ 'ADMIN_ADMINS_ENTER_CONTACT_TEXT' => "Nachricht an Administrator eingeben:",
'ADMIN_ADMINS_SELECT_CONTACT_TYPE' => "Nachricht übertragen als",
'ADMIN_ADMINS_CONTACT_TYPE_MAIL' => "Mail",
'ADMIN_ADMINS_CONTACT_TYPE_MSG' => "Nachricht",
'ADMIN_ADMINS_ADD_MORE_ADMINS' => "Weiteren Admin hinzufügen",
'ADMIN_ACCOUNT_SAVED' => "Admin-Account gespeichert.",
'ADMIN_ADMINS_ERROR_PASS_MISMATCH' => "Die beiden Passwörter stimmen nicht überein.",
+ 'ADMIN_ADMINS_SELECTION_BOX_TITLE' => "Administrator-Account auswählen:",
-// Logical area constants
+ // Logical area constants
'ADMIN_ADMINS_LA_MODE_GLOBAL' => "Globale Einst.",
'ADMIN_ADMINS_LA_MODE_OLD' => "Altes Menü",
'ADMIN_ADMINS_LA_MODE_NEW' => "Neues Menü",
'ADMIN_NO_ADDITIONAL_SQLS' => "Keine weiteren SQL-Anweisungen zum Ausführen.",
'ADMIN_SQLS_EXECUTED_ON_UPDATE' => "Beim Aktualisieren ausgeführte SQL-Anweisungen",
'ADMIN_SQLS_EXECUTED_ON_REGISTER' => "SQL-Anweisungen, die beim Installieren/Updaten ausgeführt werden",
+ 'ADMIN_SELECT_ADMIN' => "Administrator auswählen:",
// @TODO Are these constants longer used?
'ADMIN_UNKNOWN_FIELD_TYPE_1' => "Unbekannter Datentyp <strong>",
'ADMIN_UNKNOWN_FIELD_TYPE_2' => "</strong> erkannt.",
// Load userid
list($adminId) = SQL_FETCHROW($result);
- // Rewrite email address to contact link
- $email = '{%url=modules.php?module=' . $mod . '&what=admins_contct&admin=' . bigintval($adminId) . '%}';
+ // Call this function again
+ $email = generateAdminEmailLink($adminId, $mod);
} // END - if
// Free memory
SQL_FREERESULT($result);
- } elseif ((is_int($email)) && ($email > 0)) {
+ } elseif (isValidUserId($email)) {
// Direct id given
- $email = '{%url=modules.php?module=' . $mod . '&what=admins_contct&admin=' . bigintval($email) . '%}';
+ $email = '{%url=modules.php?module=' . $mod . '&what=admins_contct&id=' . bigintval($email) . '%}';
+ } else {
+ // This is strange and needs fixing
+ debug_report_bug(__FUNCTION__, __LINE__, 'email[' . gettype($email) . ']=' . $email . ',mod=' . $mod . ' - This should not happen.');
}
// Return rewritten (?) email address
// Free memory
SQL_FREERESULT($result_main);
$OUT .= '</ul>';
- }
+ } // END - if
// Is there a cache instance again?
// Return or output content?
}
}
-// Create an admin selection box
-function generateAdminSelectionBox ($adminId = NULL) {
- // Return content
- return $OUT;
+// Create an admin selection box form
+function addAdminSelectionBox ($adminId = NULL, $special = '') {
+ // Default is email as "special column"
+ $ADD = ',`email` AS `special`';
+
+ // Is a special column given?
+ if (!empty($special)) {
+ // Additional column for SQL query
+ $ADD = ',`' . $special . '` AS `special`';
+ } // END - if
+
+ // Query all entries
+ $result = SQL_QUERY('SELECT
+ `id`,`login`' . $ADD . '
+FROM
+ `{?_MYSQL_PREFIX?}_admins`
+ORDER BY
+ `login` ASC', __FUNCTION__, __LINE__);
+
+ // Init output
+ $OUT = '';
+
+ // Load all entries
+ while ($content = SQL_FETCHARRAY($result)) {
+ // Add the entry
+ $OUT .= loadTemplate('select_admins_option', true, $content);
+ } // END - if
+
+ // Free memory
+ SQL_FREERESULT($result);
+
+ // Add form to content
+ $content['form_selection'] = $OUT;
+
+ // Output form
+ loadTemplate('select_admins_box', false, $content);
}
// Create a member selection box
function addMemberSelectionBox ($userid = NULL, $add_all = false, $return = false, $none = false, $field = 'userid') {
// Output selection form with all confirmed user accounts listed
- $result = SQL_QUERY('SELECT `userid`,`surname`,`family` FROM `{?_MYSQL_PREFIX?}_user_data` ORDER BY `userid` ASC', __FUNCTION__, __LINE__);
+ $result = SQL_QUERY('SELECT
+ `userid`,`surname`,`family`
+FROM
+ `{?_MYSQL_PREFIX?}_user_data`
+ORDER BY
+ `userid` ASC', __FUNCTION__, __LINE__);
// Default output
$OUT = '';
// USe this only for adding points (e.g. adding refs really makes no sence ;-) )
- if ($add_all === true) $OUT = ' <option value="all">{--ALL_MEMBERS--}</option>';
- elseif ($none === true) $OUT = ' <option value="0">{--SELECT_NONE--}</option>';
+ if ($add_all === true) {
+ $OUT = ' <option value="all">{--ALL_MEMBERS--}</option>';
+ } elseif ($none === true) {
+ $OUT = ' <option value="0">{--SELECT_NONE--}</option>';
+ }
+ // Load all entries
while ($content = SQL_FETCHARRAY($result)) {
$OUT .= '<option value="' . bigintval($content['userid']) . '"';
if ($userid == $content['userid']) $OUT .= ' selected="selected"';
// Add description as navigation point
addYouAreHereLink('admin', __FILE__);
-if ((isFormSent()) && (isGetRequestElementSet('admin'))) {
+if ((isFormSent()) && (isGetRequestElementSet('id'))) {
// Send mail or message
// Load admin's email address
- $email = getAdminEmail(bigintval(getRequestElement('admin')));
+ $email = getAdminEmail(bigintval(getRequestElement('id')));
// Load email template and send the mail to the admin
$message = loadEmailTemplate('admins_mail_contct_admin', postRequestElement('text'), 0);
// Mail / message dropped
displayMessage('{--ADMIN_ADMINS_ADMIN_CONTACTED--}');
-} elseif (isGetRequestElementSet('admin')) {
+} elseif (isGetRequestElementSet('id')) {
// Load contact form template
- $content['admin'] = getRequestElement('admin');
+ $content['id'] = getRequestElement('id');
// Load main form
loadTemplate('admin_admins_contct_form', false, $content);
} else {
// Please select an admin!
- displayMessage('{--ADMIN_ADMINS_SELECT_ADMIN--}');
+ addAdminSelectionBox();
}
// [EOF]
}
// Set admin line (currently set to impressum, later to contact form)
- // @TODO Reactivate this: $content['admin'] = '<a href="{%url=modules.php?module=index&what=impressum&admin=' . $adminId . '%}">' . $login . '</a>';
+ // @TODO Reactivate this: $content['admin'] = '<a href="{%url=modules.php?module=index&what=impressum&id=' . $adminId . '%}">' . $login . '</a>';
// Set title
$content['title'] = $title;
}
// Set admin line (currently set to impressum, later to contact form)
- // @TODO Reactivate this: $content['admin'] = '<a href="{%url=modules.php?module=index&what=impressum&admin=' . $content['admin_id'] . '%}">' . $content['login'] . '</a>';
+ // @TODO Reactivate this: $content['admin'] = '<a href="{%url=modules.php?module=index&what=impressum&id=' . $content['admin_id'] . '%}">' . $content['login'] . '</a>';
// Handle description...
if ((empty($content['descr'])) && (!empty($content['template']))) {
$content = explode('|', $data);
// Non-existent index 2 will happen in menu blocks
- if (!isset($content[2])) $content[2] = '';
+ if (!isset($content[2])) {
+ $content[2] = '';
+ } // END - if
// Re-construct the array: 0=visible,1=locked,2=prefix
$content['visible'] = $content[0];
<tr>
<td colspan="3" align="center" class="table_header bottom" height="28">
- {--ADMIN_ADMINS_CONTACT_DEFAULT_MAIL--} <input type="hidden" name="type"
- value="mail"></td>
+ {--ADMIN_ADMINS_CONTACT_DEFAULT_MAIL--}
+ <input type="hidden" name="type" value="mail" />
+ </td>
</tr>
<div align="center">
-<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&what=admins_contct&admin=$content[admin]%}" method="post">
-<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
- <!-- @TODO Shouldn't we add a title here? //-->
- <tr>
- <td class="header_column bottom" align="right" height="28"><strong>{--ADMIN_ADMINS_ADMIN_ID--}:</strong></td>
- <td class="header_column bottom" align="left"><strong>$content[admin]</strong></td>
- </tr>
- <tr>
- <td class="bottom" colspan="2" align="center">
- {--ADMIN_ADMINS_ENTER_CONTACT_TEXT--}:<br />
- <textarea class="form_field" name="text" rows="5" cols="40"></textarea>
- </td>
- </tr>
- $content[message_selection]
- <tr>
- <td class="table_footer" align="center" colspan="2">
- <input type="reset" class="form_reset" value="{--CLEAR_FORM--}" />
- <input type="submit" class="form_submit" name="ok" value="{--ADMIN_ADMINS_CONTACT_SUBMIT--}" />
- </td>
- </tr>
-</table>
+<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&what=admins_contct&id=$content[id]%}" method="post">
+<div class="table dashed">
+ <div class="table_header bottom">
+ <strong>{%message,ADMIN_CONTACT_ADMINS_TITLE=$content[id]%}</strong>
+ </div>
+ <div class="bottom" align="center">
+ {--ADMIN_ADMINS_ENTER_CONTACT_TEXT--}<br />
+ <textarea class="form_field" name="text" rows="5" cols="40"></textarea>
+ </div>
+ <div class="table_footer" align="center" colspan="2">
+ <input type="reset" class="form_reset" value="{--CLEAR_FORM--}" />
+ <input type="submit" class="form_submit" name="ok" value="{--ADMIN_ADMINS_CONTACT_SUBMIT--}" />
+ </div>
+</div>
</form>
</div>
--- /dev/null
+<div align="center">
+<form accept-charset="UTF-8" action="{?URL?}/modules.php" method="get">
+<input type="hidden" name="module" value="admin" />
+<input type="hidden" name="what" value="{%pipe,getWhat%}" />
+<div class="table dashed">
+ <div class="table_header bottom">
+ <strong>{--ADMIN_ADMINS_SELECTION_BOX_TITLE--}</strong>
+ </div>
+ <div align="center" class="bottom">
+ {--ADMIN_SELECT_ADMIN--}
+ <select name="id" size="1" class="form_select">
+ $content[form_selection]
+ </select>
+ </div>
+ <div align="center" class="table_footer">
+ <input type="reset" class="form_reset" value="{--CLEAR_FORM--}" />
+ <input type="submit" class="form_submit" value="{--ADMIN_DO_ACTION--}" />
+ </div>
+</div>
+</form>
+</div>
--- /dev/null
+<option value="$content[id]">
+ $content[login] ($content[special])
+</option>