2 # Show the SSH 2 applet
4 BEGIN { push(@INC, ".."); };
9 $theme_no_table = 1 if ($config{'sizemode'} == 1);
10 &ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1);
12 if ($config{'no_test'}) {
13 # Just assume that the telnet server is running
17 # Check if the telnet server is running
18 $addr = $config{'host'} ? $config{'host'} :
19 $ENV{'SERVER_NAME'} ? $ENV{'SERVER_NAME'} :
20 &to_ipaddress(&get_system_hostname());
21 $ip = &to_ipaddress($addr) || &to_ip6address($addr);
22 $port = $config{'port'} ? $config{'port'} : 22;
24 $SIG{ALRM} = "connect_timeout";
26 &open_socket($ip, $port, STEST, \$err);
33 print "<p>",&text('index_esocket2', $addr, $port),"<p>\n";
36 print "<p>",&text('index_elookup', $addr),"<p>\n";
41 if ($config{'detach'}) {
44 elsif ($config{'sizemode'} == 2 &&
45 $config{'size'} =~ /^(\d+)\s*x\s*(\d+)$/) {
48 elsif ($config{'sizemode'} == 1) {
49 $w = "100%"; $h = "80%";
54 print "<applet archive=\"mindterm.jar\" code=com.mindbright.application.MindTerm.class ",
55 "width=$w height=$h>\n";
56 if ($config{'port'}) {
57 print "<param name=port value=$config{'port'}>\n";
59 if ($config{'sizemode'}) {
60 print "<param name=Terminal.resize value='screen'>\n";
62 if ($config{'fontsize'}) {
63 print "<param name=Terminal.fontSize value='$config{'fontsize'}'>\n";
65 if ($config{'detach'}) {
66 print "<param name=sepframe value='true'>\n";
68 if ($config{'foreground'}) {
69 print "<param name=fg-color ",
70 "value='$config{'foreground'}'>\n";
72 if ($config{'background'}) {
73 print "<param name=bg-color ",
74 "value='$config{'background'}'>\n";
76 if ($config{'term'}) {
77 print "<param name=term-type value='$config{'term'}'>\n";
79 if ($config{'encoding'}) {
80 print "<param name=encoding ",
81 "value='$config{'encoding'}'>\n";
83 print "$text{'index_nojava'} <p>\n";
84 print "</applet><br>\n";
86 print &text('index_credits',
87 "http://www.appgate.com/products/80_MindTerm/"),"<br>\n";
91 &ui_print_footer("/", $text{'index'});