print "\n";
} elsif ( $menu == 1 ) {
print $WHT. "Organization Preferences\n" . $NRM;
- print "1. Organization Name : $WHT$org_name$NRM\n";
- print "2. Organization Logo : $WHT$org_logo$NRM\n";
- print "3. Organization Title : $WHT$org_title$NRM\n";
- print "4. Signout Page : $WHT$signout_page$NRM\n";
- print "5. Default Language : $WHT$squirrelmail_default_language$NRM\n";
- print "6. Top Frame : $WHT$frame_top$NRM\n";
+ print "1. Organization Name : $WHT$org_name$NRM\n";
+ print "2. Organization Logo : $WHT$org_logo$NRM\n";
+ print "3. Org. Logo Width/Height : $WHT($org_logo_width/$org_logo_height)$NRM\n";
+ print "4. Organization Title : $WHT$org_title$NRM\n";
+ print "5. Signout Page : $WHT$signout_page$NRM\n";
+ print "6. Default Language : $WHT$squirrelmail_default_language$NRM\n";
+ print "7. Top Frame : $WHT$frame_top$NRM\n";
print "\n";
print "R Return to Main Menu\n";
} elsif ( $menu == 2 ) {
} elsif ( $menu == 1 ) {
if ( $command == 1 ) { $org_name = command1(); }
elsif ( $command == 2 ) { $org_logo = command2(); }
- elsif ( $command == 3 ) { $org_title = command3(); }
- elsif ( $command == 4 ) { $signout_page = command4(); }
- elsif ( $command == 5 ) { $squirrelmail_default_language = command5(); }
- elsif ( $command == 6 ) { $frame_top = command6(); }
+ elsif ( $command == 3 ) { ($org_logo_width,$org_logo_height) = command2a(); }
+ elsif ( $command == 4 ) { $org_title = command3(); }
+ elsif ( $command == 5 ) { $signout_page = command4(); }
+ elsif ( $command == 6 ) { $squirrelmail_default_language = command5(); }
+ elsif ( $command == 7 ) { $frame_top = command6(); }
} elsif ( $menu == 2 ) {
if ( $command == 1 ) { $domain = command11(); }
elsif ( $command == 2 ) { $imapServerAddress = command12(); }
return $new_org_logo;
}
+# org_logo_width
+sub command2a {
+ print "Your organization's logo is an image that will be displayed at\n";
+ print "different times throughout SquirrelMail. Width\n";
+ print "and Height of your logo image. Use '0' to disable.\n";
+ print "\n";
+ print "Width: [$WHT$org_logo_width$NRM]: $WHT";
+ $new_org_logo_width = <STDIN>;
+ $new_org_logo_width =~ tr/0-9//cd; # only want digits!
+ if ( $new_org_logo_width eq '' ) {
+ $new_org_logo_width = $org_logo_width;
+ }
+ print "Height: [$WHT$org_logo_height$NRM]: $WHT";
+ $new_org_logo_height = <STDIN>;
+ $new_org_logo_height =~ tr/0-9//cd; # only want digits!
+ unless ( $new_org_logo_height > 0 ) {
+ $new_org_logo_height = $org_logo_height;
+ }
+ return ($new_org_logo_width, $new_org_logo_height);
+}
+
# org_title
sub command3 {
print "A title is what is displayed at the top of the browser window in\n";
print CF "\$org_name = \"$org_name\";\n";
print CF "\$org_logo = '$org_logo';\n";
+ $org_logo_width |= 0;
+ $org_logo_height |= 0;
+ print CF "\$org_logo_width = $org_logo_width;\n";
+ print CF "\$org_logo_height = $org_logo_height;\n";
+ print CF "\$org_logo = '$org_logo';\n";
print CF "\$org_title = \"$org_title\";\n";
print CF "\$signout_page = '$signout_page';\n";
print CF "\$frame_top = '$frame_top';\n";
$loginname_value = (isset($loginname) ? htmlspecialchars($loginname) : '');
+/* Display width and height like good little people */
+$width_and_height = "";
+if (isset($org_logo_width) && is_int($org_logo_width) && $org_logo_width>0) {
+ $width_and_height = " WIDTH=\"$org_logo_width\"";
+}
+if (isset($org_logo_height) && is_int($org_logo_height) && $org_logo_height>0) {
+ $width_and_height .= " HEIGHT=\"$org_logo_height\"";
+}
+
echo "<CENTER>".
- " <IMG SRC=\"$org_logo\"><BR>\n".
+ " <IMG SRC=\"$org_logo\" ALT=\"" . sprintf(_("%s Logo"), $org_name) .
+ "\"$width_and_height><BR>\n".
( $hide_sm_attributions ? '' :
'<SMALL>' . sprintf (_("SquirrelMail version %s"), $version) . "<BR>\n".
' ' . _("By the SquirrelMail Development Team") . "<BR></SMALL>\n" ) .