define('SMOPT_TYPE_HIDDEN', 6);
define('SMOPT_TYPE_COMMENT', 7);
define('SMOPT_TYPE_NUMLIST', 8);
-define('SMOPT_TYPE_TITLE', 128);
-
-/* Define constants for the options refresh levels. */
-define('SMOPT_REFRESH_NONE', 0);
-define('SMOPT_REFRESH_FOLDERLIST', 1);
-define('SMOPT_REFRESH_ALL', 2);
-
-/* Define constants for the options size. */
-define('SMOPT_SIZE_TINY', 0);
-define('SMOPT_SIZE_SMALL', 1);
-define('SMOPT_SIZE_MEDIUM', 2);
-define('SMOPT_SIZE_LARGE', 3);
-define('SMOPT_SIZE_HUGE', 4);
-
-define('SMOPT_SAVE_DEFAULT', 'save_option');
-define('SMOPT_SAVE_NOOP', 'save_option_noop');
+define('SMOPT_TYPE_TITLE', 9);
+define('SMOPT_TYPE_THEME', 10);
+define('SMOPT_TYPE_PLUGINS', 11);
global $languages;
'other' => _("Not one of the above servers") ) ),
'$optional_delimiter' => array( 'name' => _("IMAP Folder Delimiter"),
'type' => SMOPT_TYPE_STRING,
+ 'comment' => _("Use \"detect\" to auto-detect."),
'size' => 10 ),
'$useSendmail' => array( 'name' => _("Use Sendmail"),
'type' => SMOPT_TYPE_BOOLEAN ),
'Group4' => array( 'name' => _("General Options"),
'type' => SMOPT_TYPE_TITLE ),
'$default_charset' => array( 'name' => _("Default Charset"),
- 'type' => SMOPT_TYPE_STRING,
- 'size' => 10 ),
+ 'type' => SMOPT_TYPE_STRLIST,
+ 'posvals' => array( 'iso_8859_1' => 'iso_8859_1',
+ 'iso_8859_2' => 'iso_8859_2',
+ 'iso_8859_7' => 'iso_8859_7',
+ 'iso_8859_15' => 'iso_8859_15',
+ 'iso_8859_15' => 'iso_8859_15',
+ 'ns_4551_1' => 'ns_4551_1',
+ 'koi8-r' => 'koi8-r',
+ 'euc-KR' => 'euc-KR',
+ 'windows-1251' => 'windows-1251' ) ),
'$data_dir' => array( 'name' => _("Data Directory"),
'type' => SMOPT_TYPE_STRING,
'size' => 40 ),
2 => _("Moderate"),
3 => _("Medium"),
4 => _("High") ) ),
- '$default_left_size' => array( 'name' => _("Hash Level"),
+ '$default_left_size' => array( 'name' => _("Default Left Size"),
'type' => SMOPT_TYPE_NUMLIST,
'posvals' => $left_size_values ),
'$force_username_lowercase' => array( 'name' => _("Usernames in Lowercase"),
'$hide_sm_attributions' => array( 'name' => _("Hide SM attributions"),
'type' => SMOPT_TYPE_BOOLEAN ),
/* --------------------------------------------------------*/
- 'Group5' => array( 'name' => _("Themes"),
- 'type' => SMOPT_TYPE_TITLE )
- );
-
+ 'Group5' => array( 'name' => _("Message of the Day"),
+ 'type' => SMOPT_TYPE_TITLE ),
+ '$motd' => array( 'name' => _("Message of the Day"),
+ 'type' => SMOPT_TYPE_TEXTAREA,
+ 'size' => 40 ),
+ /* --------------------------------------------------------*/
+ 'Group6' => array( 'name' => _("Themes"),
+ 'type' => SMOPT_TYPE_TITLE ),
+ '$theme_css' => array( 'name' => _("Style Sheet URL (css)"),
+ 'type' => SMOPT_TYPE_STRING,
+ 'size' => 40 ),
+ /* --------------------------------------------------------*/
+ '$config_use_color' => array( 'type' => SMOPT_TYPE_HIDDEN )
-$defcfg['$motd'] = array( 'name' => _("Message of the Day"),
- 'type' => SMOPT_TYPE_STRING,
- 'size' => 40 );
+ );
?>
$type = SMOPT_TYPE_STRING;
}
+ if ( substr( $k, 0, 7 ) == '$theme[' ) {
+ $type = SMOPT_TYPE_THEME;
+ } else if ( substr( $k, 0, 9 ) == '$plugins[' ) {
+ $type = SMOPT_TYPE_PLUGINS;
+ }
+
switch ( $type ) {
+ case SMOPT_TYPE_PLUGINS:
+ case SMOPT_TYPE_THEME:
+ case SMOPT_TYPE_HIDDEN:
+ break;
case SMOPT_TYPE_TITLE:
echo "<tr bgcolor=\"$color[0]\"><th colspan=2>$name</th></tr>";
break;
echo '</select>';
break;
+ case SMOPT_TYPE_TEXTAREA:
+ if ( isset( $HTTP_POST_VARS[$e] ) ) {
+ $v = '"' . $HTTP_POST_VARS[$e] . '"';
+ $newcfg[$k] = str_replace( "\n", '', $v );
+ }
+ echo "<tr><td valign=top>$name</td><td>".
+ "<textarea cols=\"$size\" name=\"adm_$n\">" . substr( $v, 1, strlen( $v ) - 2 ) . "</textarea>";
+ break;
case SMOPT_TYPE_STRING:
if ( isset( $HTTP_POST_VARS[$e] ) ) {
$v = '"' . $HTTP_POST_VARS[$e] . '"';
echo "<tr><td>$name</td><td>" .
"<b><i>$v</i></b>";
}
+ if ( isset( $defcfg[$k]['comment'] ) ) {
+ echo ' ' . $defcfg[$k]['comment'];
+ }
echo "</td></tr>\n";
}
echo "<tr bgcolor=\"$color[5]\"><th colspan=2><input value=\"" .
" * Created using the Administrator Plugin\n".
" */\n\n" );
+/*
fwrite( $fp, 'GLOBAL ' );
$not_first = FALSE;
foreach ( $newcfg as $k => $v ) {
} else {
if( $not_first ) {
fwrite( $fp, ', ' );
- }
+ }
fwrite( $fp, $k );
}
$not_first = TRUE;
}
}
fwrite( $fp, ";\n" );
+*/
foreach ( $newcfg as $k => $v ) {
if ( $k{0} == '$' ) {
if ( substr( $k, 1, 11 ) == 'ldap_server' ) {