// Generate XHTML code for the CAPTCHA
function generateCaptchaCode ($code, $type, $urlId, $userid) {
- return '<img border="0" alt="Code ' . $code . '" src="{%url=mailid_top.php?userid=' . $userid . '&' . $type . '=' . $urlId . '&do=img&code=' . $code . '%}" />';
+ return '<img border="0" alt="Code ' . $code . '" src="{%url=mailid.php?userid=' . $userid . '&' . $type . '=' . $urlId . '&do=img&code=' . $code . '%}" />';
}
// Compiles the given HTML/mail code
} // END - for
break;
+ case 'mn': // Months, numeric
+ for ($idx = 0; $idx <= 12; $idx++) {
+ $OUT .= '<option value="' . $idx . '"';
+ if ($default == $idx) $OUT .= ' selected="selected"';
+ $OUT .= '>{%pipe,padLeftZero=' . $idx . '%}</option>';
+ } // END - for
+ break;
+
case 'we': // Weeks
for ($idx = 0; $idx <= 4; $idx++) {
$OUT .= ' <option value="' . $idx . '"';
break;
case 'da': // Days
- for ($idx = 0; $idx < 32; $idx++) {
+ for ($idx = 0; $idx <= 31; $idx++) {
$OUT .= '<option value="' . $idx . '"';
if ($default == $idx) $OUT .= ' selected="selected"';
- $OUT .= '>' .padLeftZero($idx) . '</option>';
+ $OUT .= '>{%pipe,padLeftZero=' . $idx . '%}</option>';
} // END - for
break;
case 'ho': // Hours
- for ($idx = 0; $idx < 24; $idx++) {
+ for ($idx = 0; $idx <= 23; $idx++) {
if (strlen($idx) == 1) $idx = 0 . $idx;
$OUT .= '<option value="' . $idx . '"';
if ($default == $idx) $OUT .= ' selected="selected"';
case 'mi': // Minutes
case 'se': // Seconds
- for ($idx = 0; $idx < 60; $idx+=5) {
+ for ($idx = 0; $idx <= 59; $idx+=5) {
if (strlen($idx) == 1) $idx = 0 . $idx;
$OUT .= '<option value="' . $idx . '"';
if ($default == $idx) $OUT .= ' selected="selected"';
// Time unit -> field name
'unit_field' => array(
'Y' => 'ye',
- 'M' => 'mo',
+ 'M' => 'mn',
'W' => 'we',
'D' => 'da',
'h' => 'ho',
return loadTemplate('admin_settings_saved', $return, $message);
}
+// Displays given error message in admin_settings_saved template
+function displayErrorMessage ($message, $return = FALSE) {
+ // Load the template
+ return loadTemplate('admin_settings_unsaved', $return, $message);
+}
+
// Generates a selection box for (maybe) given gender
function generateGenderSelectionBox ($selectedGender = '', $fieldName = 'gender') {
// Start the HTML code
// Helper function to create bonus mail admin links
function doTemplateAdminBonusMailLinks ($templateName, $clear, $bonusId) {
// Call the inner function
- return generateAdminMailLinks('bid', $bonusId);
+ return generateAdminMailLinks('bonus', $bonusId);
}
// Helper function to create member mail admin links
function doTemplateAdminMemberMailLinks ($templateName, $clear, $mailId) {
// Call the inner function
- return generateAdminMailLinks('mid', $mailId);
+ return generateAdminMailLinks('normal', $mailId);
}
// Helper function to create a selection box for YES/NO configuration entries
if (isAdmin()) {
// Is admin, has always priority
$data = '[<a href="{%pipe,generateFrametesterUrl=' . $data . '%}" target="_blank">{--ADMIN_TEST_URL--}</a>]';
- } elseif (isUrlBlacklisted($data)) {
+ } elseif ((isExtensionActive('blacklist')) && (isUrlBlacklisted($data))) {
// Yes, so replace it with text
$data = '<em>{--URL_IS_BLACKLISTED--}</em>';
} else {