# Get the parameters passed to the script.
read (STDIN, $post_data, $ENV{CONTENT_LENGTH});
-@call = split (/=/, $post_data) ;
-# Print the page header.
+$callstart = index($post_data, "=") + 1 ;
+$callend = index($post_data, "&") ;
+
+$call = substr($post_data, $callstart, $callend - $callstart),
+$password = substr($post_data, index($post_data, "=", $callend) + 1, length($post_data)) ;
+# Print the page header.
+#print("Callsign : $call") ;
+#print("Password : $password") ;
print <<'EOF';
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
if($ENV{CONTENT_LENGTH} > 0)
{
# Callsign is set - print the whole <APPLET> stuff....
- # print("Callsign is $call[1]<BR>\n") ;
+ # print("Callsign is $call<BR>\n") ;
print("<CENTER>\n") ;
print(" <APPLET CODE=\"spiderclient.class\" CODEBASE=\"/client/\" width=800 height=130>\n") ;
- print(" <PARAM NAME=\"CALL\" VALUE=\"$call[1]\">\n") ;
+ print(" <PARAM NAME=\"CALL\" VALUE=\"$call\">\n") ;
+ print(" <PARAM NAME=\"PASSWORD\" VALUE=\"$password\">\n") ;
print(" <PARAM NAME=\"HOSTNAME\" VALUE=\"$HOSTNAME\">\n") ;
print(" <PARAM NAME=\"PORT\" VALUE=\"$PORT\">\n") ;
print(" </APPLET>\n") ;
<FORM METHOD=POST>
<STRONG>Please enter your callsign: </STRONG><BR>
<INPUT name="call" size=10><BR>
+ <STRONG>Please enter your password: </STRONG><BR>
+ <INPUT name="password" size=10 TYPE=PASSWORD><BR>
<INPUT type=submit value="Click here to Login">
</FORM>
</CENTER>
p = getParameter("CALL");
if (p != null) cf.setCall(p);
+ p = getParameter("PASSWORD");
+ if (p != null) cf.setPassword(p);
+
p = getParameter("FULLNAME");
if (p != null) cf.setFullname(p);
listener = new StreamListener(cf, in);
out.println(cf.getCall());
- out.println(cf.getFullname());
+
+ if(cf.getPassword().length() > 0) {
+ out.println(cf.getPassword());
+ }
+
+ // out.println(cf.getFullname());
}
catch (IOException e) {
InfoDialog id = new InfoDialog(cf, "Error", e.toString());
Call = s;
}
+ public void setPassword(String s) {
+ Password = s ;
+ }
+
public void setPrefix(String s) {
Prefix = s;
}
return Call;
}
+ public String getPassword() {
+ return Password;
+ }
+
public String setPrefix(){
return Prefix;
}
private Font InFont = new Font("Courier", Font.BOLD, 13);
private String Call = new String("NOCALL");
+ private String Password = new String();
private String Fullname = new String("NOBODY");
private String Hostname = new String("localhost");
private String Port = new String("3600");