$text = ''; if (!isset($pref['ban_messages']) || !is_array($pref['ban_messages'])) { foreach ($ipAdministrator->getValidReasonList() as $bt) { $pref['ban_messages'][$bt] = ''; } } if (!isset($pref['ban_durations']) || !is_array($pref['ban_durations'])) { foreach ($ipAdministrator->getValidReasonList() as $bt) { $pref['ban_durations'][$bt] = 0; } } $text .= "\n\t\t\t<form method='post' action='" . e_SELF . '?' . e_QUERY . "' id='ban_options'>\n\t\t\t\t<fieldset id='core-banlist-times'>\n\t\t\t\t\t<legend class='e-hideme'>" . BANLAN_77 . "</legend>\n\t\t\t\t\t<table class='table adminlist'>\n\t\t\t\t\t\t<colgroup>\n\t\t\t\t\t\t\t<col style='width: 20%' />\n\t\t\t\t\t\t\t<col style='width: 65%' />\n\t\t\t\t\t\t\t<col style='width: 15%' />\n\t\t\t\t\t\t</colgroup>\n\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th>" . BANLAN_28 . "</th>\n\t\t\t\t\t\t\t\t<th>" . BANLAN_29 . "<br />" . BANLAN_31 . "</th>\n\t\t\t\t\t\t\t\t<th class='center last'>" . BANLAN_30 . "</th>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t<tbody>\n\t\t"; foreach ($ipAdministrator->getValidReasonList() as $bt) { $i = abs($bt) + 1; // Forces a single-digit positive number $text .= "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<strong>" . $ipAdministrator->getBanTypeString($bt, FALSE) . "</strong>\n\t\t\t\t\t\t\t<div class='field-help'>" . $ipAdministrator->getBanTypeString($bt, TRUE) . "</div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td class='center'>\n\t\t\t\t\t\t\t" . $frm->textarea('ban_text_' . $i, $pref['ban_messages'][$bt], 4, 15) . "\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td class='center'>" . ban_time_dropdown('', BANLAN_32, $pref['ban_durations'][$bt], 'ban_time_' . $i) . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t"; } $text .= "\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t</table>\n\t\t\t\t\t<div class='buttons-bar center'>\n\t\t\t\t\t\t" . $frm->admin_button('update_ban_prefs', LAN_UPDATE, 'update') . "\n\t\t\t\t\t\t<input type='hidden' name='e-token' value='" . e_TOKEN . "' />\n\t\t\t\t\t</div>\n\t\t\t\t</fieldset>\n\t\t\t</form>\n\t\t\t"; e107::getRender()->tablerender(BANLAN_77, $emessage->render() . $text); break; case 'edit': // Edit an existing ban // Edit an existing ban case 'add': // Add a new ban // Add a new ban case 'whedit': // Edit existing whitelist entry // Edit existing whitelist entry case 'whadd': // Add a new whitelist entry