366 |
{ |
{ |
367 |
my($state, $text, $type); |
my($state, $text, $type); |
368 |
my $raw_reply = <SOCK>; |
my $raw_reply = <SOCK>; |
369 |
print "<tt>server_reply: $raw_reply</tt><br>\n" if defined($reply_debug); |
print "<tt>server_reply: $raw_reply</tt><br />\n" if defined($reply_debug); |
370 |
if($raw_reply =~ /(\d+)([- ]?)(.*$)/) |
if($raw_reply =~ /(\d+)([- ]?)(.*$)/) |
371 |
{ |
{ |
372 |
$state = $1; |
$state = $1; |
398 |
|
|
399 |
while(<SOCK>) |
while(<SOCK>) |
400 |
{ |
{ |
401 |
print "<tt>read_server: $_</tt><br>\n" if defined($reply_debug); |
print "<tt>read_server: $_</tt><br />\n" if defined($reply_debug); |
402 |
if(/^\.\r/) |
if(/^\.\r/) |
403 |
{ |
{ |
404 |
return @text; |
return @text; |
712 |
my $debug = 0; |
my $debug = 0; |
713 |
print SOCK "$cmd\n"; |
print SOCK "$cmd\n"; |
714 |
warn "client_cmd: $cmd" if $debug; |
warn "client_cmd: $cmd" if $debug; |
715 |
print "<br><tt>client_cmd: <pre>$cmd</pre></tt><br>\n" |
print "<br /><tt>client_cmd: <pre>$cmd</pre></tt><br />\n" |
716 |
if defined($client_cmd_debug); |
if defined($client_cmd_debug); |
717 |
return get_reply(); |
return get_reply(); |
718 |
} |
} |
899 |
|
|
900 |
# Add file upload button for adding new attachment. |
# Add file upload button for adding new attachment. |
901 |
if ($mode eq 'sendpr' || $mode eq 'edit') { |
if ($mode eq 'sendpr' || $mode eq 'edit') { |
902 |
print "Add a file attachment:<br>", |
print "Add a file attachment:<br />", |
903 |
$q->filefield(-name=>'attached_file', |
$q->filefield(-name=>'attached_file', |
904 |
-size=>50); |
-size=>50); |
905 |
# that's all we need to do if this is the sendpr page |
# that's all we need to do if this is the sendpr page |
1016 |
" or ", |
" or ", |
1017 |
$q->reset(-name=>'reset')), |
$q->reset(-name=>'reset')), |
1018 |
$q->hidden(-name=>'return_url'), |
$q->hidden(-name=>'return_url'), |
1019 |
"<hr>\n", |
"<hr />\n", |
1020 |
"<table>"; |
"<table>"; |
1021 |
my $def_email = $global_prefs{'email'} || ''; |
my $def_email = $global_prefs{'email'} || ''; |
1022 |
print "<tr>\n<td width=\"20%\"><b>Reporter's email:</b></td>\n<td>", |
print "<tr>\n<td width=\"20%\"><b>Reporter's email:</b></td>\n<td>", |
1053 |
# at the top of a given field. |
# at the top of a given field. |
1054 |
my $intro = cb("sendpr_intro_$lc_fieldname", $field_number) || ''; |
my $intro = cb("sendpr_intro_$lc_fieldname", $field_number) || ''; |
1055 |
|
|
1056 |
print "<tr><td valign=\"top\" width=\"20%\"><b>$_:</b><br><small>\n", |
print "<tr><td valign=\"top\" width=\"20%\"><b>$_:</b><br /><small>\n", |
1057 |
fieldinfo($_, 'desc'), |
fieldinfo($_, 'desc'), |
1058 |
"</small></td><td>\n", $intro, "\n"; |
"</small></td><td>\n", $intro, "\n"; |
1059 |
|
|
1225 |
page_start_html($page); |
page_start_html($page); |
1226 |
print "<h3>debugging -- PR NOT SENT</h3>", |
print "<h3>debugging -- PR NOT SENT</h3>", |
1227 |
$q->pre($q->escapeHTML($text)), |
$q->pre($q->escapeHTML($text)), |
1228 |
"<hr>"; |
"<hr />"; |
1229 |
page_end_html($page); |
page_end_html($page); |
1230 |
return; |
return; |
1231 |
} |
} |
1420 |
} |
} |
1421 |
|
|
1422 |
if ($description_in_view) { |
if ($description_in_view) { |
1423 |
print "<tr><td width=\"20%\"$valign><b>$_:</b><br><font size=\"-1\" color=\"#999999\">\n", |
print "<tr><td width=\"20%\"$valign><b>$_:</b><br /><font size=\"-1\" color=\"#999999\">\n", |
1424 |
fieldinfo($_, 'desc'), |
fieldinfo($_, 'desc'), |
1425 |
"</font></td>\n<td>"; |
"</font></td>\n<td>"; |
1426 |
} else { |
} else { |
1536 |
# The "intro" provides a way for the site callback to print something |
# The "intro" provides a way for the site callback to print something |
1537 |
# at the top of a given field. |
# at the top of a given field. |
1538 |
my $intro = cb("edit_intro_$lc_fieldname", $field_number) || ''; |
my $intro = cb("edit_intro_$lc_fieldname", $field_number) || ''; |
1539 |
print "<tr><td valign=\"top\" width=\"20%\"><b>$_:</b><br><small>\n", |
print "<tr><td valign=\"top\" width=\"20%\"><b>$_:</b><br /><small>\n", |
1540 |
fieldinfo($_, 'desc'), |
fieldinfo($_, 'desc'), |
1541 |
"</small><td>\n", $intro, "\n"; |
"</small><td>\n", $intro, "\n"; |
1542 |
|
|
1987 |
# one can simply say "not closed". |
# one can simply say "not closed". |
1988 |
if ($_ eq $STATE_FIELD) |
if ($_ eq $STATE_FIELD) |
1989 |
{ |
{ |
1990 |
print "<br>", |
print "<br />", |
1991 |
$q->checkbox_group(-name=>'ignoreclosed', |
$q->checkbox_group(-name=>'ignoreclosed', |
1992 |
-values=>['Ignore Closed'], |
-values=>['Ignore Closed'], |
1993 |
-defaults=>['Ignore Closed']), |
-defaults=>['Ignore Closed']), |
3340 |
# it might be better to allow "create-only" access for users |
# it might be better to allow "create-only" access for users |
3341 |
# with 'submit' access. |
# with 'submit' access. |
3342 |
if ($LEVEL_TO_CODE{$access_level} < $LEVEL_TO_CODE{'view'}) { |
if ($LEVEL_TO_CODE{$access_level} < $LEVEL_TO_CODE{'view'}) { |
3343 |
login_page(undef, "You do not have access to database: $global_prefs{'database'}.<br>\nPlease log in to another database<br><br>\n"); |
login_page(undef, "You do not have access to database: $global_prefs{'database'}.<br />\nPlease log in to another database<br /><br />\n"); |
3344 |
undef($suppress_client_exit); |
undef($suppress_client_exit); |
3345 |
client_exit(); |
client_exit(); |
3346 |
} |
} |
3763 |
print_header(-Refresh => "0; URL=$url", |
print_header(-Refresh => "0; URL=$url", |
3764 |
-cookie => [$global_cookie]), |
-cookie => [$global_cookie]), |
3765 |
$q->start_html(); |
$q->start_html(); |
3766 |
print $q->h3("Hold on... Redirecting...<br>". |
print $q->h3("Hold on... Redirecting...<br />". |
3767 |
"In case it does not work automatically, please follow ". |
"In case it does not work automatically, please follow ". |
3768 |
"<a href=\"$url\">this link</a>."), |
"<a href=\"$url\">this link</a>."), |
3769 |
$q->end_html(); |
$q->end_html(); |
3786 |
print_header(-Refresh => "0; URL=$url", |
print_header(-Refresh => "0; URL=$url", |
3787 |
-cookie => [$db_cookie]), |
-cookie => [$db_cookie]), |
3788 |
$q->start_html(); |
$q->start_html(); |
3789 |
print $q->h3("Hold on... Redirecting...<br>". |
print $q->h3("Hold on... Redirecting...<br />". |
3790 |
"In case it does not work automatically, please follow ". |
"In case it does not work automatically, please follow ". |
3791 |
"<a href=\"$url\">this link</a>."), |
"<a href=\"$url\">this link</a>."), |
3792 |
$q->end_html(); |
$q->end_html(); |
3855 |
} |
} |
3856 |
# Add a link to the new URL. In case the refresh/redirect above did not |
# Add a link to the new URL. In case the refresh/redirect above did not |
3857 |
# work, at least the user can select the link manually. |
# work, at least the user can select the link manually. |
3858 |
print $q->h3("Hold on... Redirecting...<br>". |
print $q->h3("Hold on... Redirecting...<br />". |
3859 |
"In case it does not work automatically, please follow ". |
"In case it does not work automatically, please follow ". |
3860 |
"<a href=\"$url\">this link</a>."), |
"<a href=\"$url\">this link</a>."), |
3861 |
$q->end_html(); |
$q->end_html(); |