version 1.29, 2005/10/13 17:18:14
|
version 1.33, 2006/04/10 21:40:09
|
Line 63 sub handler {
|
Line 63 sub handler {
|
sub print_request_form { |
sub print_request_form { |
my ($r,$origurl,$function) = @_; |
my ($r,$origurl,$function) = @_; |
my ($os,$browser,$bversion,$uhost,$uname,$udom,$uhome,$urole,$usec,$email,$cid,$cdom,$cnum,$ctitle,$ccode,$sectionlist,$lastname,$firstname,$server,$formname); |
my ($os,$browser,$bversion,$uhost,$uname,$udom,$uhome,$urole,$usec,$email,$cid,$cdom,$cnum,$ctitle,$ccode,$sectionlist,$lastname,$firstname,$server,$formname); |
my $bodytag = &Apache::loncommon::bodytag('',$function,'topmargin="0" marginheight="0" onLoad="initialize_codes()"',1); |
|
my $tablecolor = &Apache::loncommon::designparm($function.'.tabbg'); |
my $tablecolor = &Apache::loncommon::designparm($function.'.tabbg'); |
if (($tablecolor eq '') || ($tablecolor eq '#FFFFFF')) { |
if (($tablecolor eq '') || ($tablecolor eq '#FFFFFF')) { |
$tablecolor = '#EEEE99'; |
$tablecolor = '#EEEE99'; |
Line 98 function validmail(field) {
|
Line 97 function validmail(field) {
|
var str = field.value; |
var str = field.value; |
if (window.RegExp) { |
if (window.RegExp) { |
var reg1str = "(@.*@)|(\\.\\.)|(@\\.)|(\\.@)|(^\\.)"; |
var reg1str = "(@.*@)|(\\.\\.)|(@\\.)|(\\.@)|(^\\.)"; |
var reg2str = "^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$"; |
var reg2str = "^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$"; //" |
var reg1 = new RegExp(reg1str); |
var reg1 = new RegExp(reg1str); |
var reg2 = new RegExp(reg2str); |
var reg2 = new RegExp(reg2str); |
if (!reg1.test(str) && reg2.test(str)) { |
if (!reg1.test(str) && reg2.test(str)) { |
Line 115 function validmail(field) {
|
Line 114 function validmail(field) {
|
} |
} |
} |
} |
END |
END |
#" stupid emacs |
|
if ($cid =~ m/_/) { |
if ($cid =~ m/_/) { |
($cdom,$cnum) = split/_/,$cid; |
($cdom,$cnum) = split/_/,$cid; |
} |
} |
Line 195 function initialize_codes() {
|
Line 194 function initialize_codes() {
|
} |
} |
} |
} |
} |
} |
my $html=&Apache::lonxml::xmlbegin(); |
|
$r->print(<<ENDHEAD); |
my $js = '<script type"text/javascript">'."\n$scripttag\n$jscript\n". |
$html |
'</script>'; |
<head> |
my %add_entries = (topmargin => "0", |
<title>LON-CAPA support request</title> |
marginheight => "0", |
<script type"text/javascript"> |
onLoad =>"initialize_codes()",); |
$scripttag |
|
$jscript |
my $start_page = |
</script> |
&Apache::loncommon::start_page('Support Request',$js, |
</head> |
{ 'function' => $function, |
$bodytag |
'add_entries' => \%add_entries, |
ENDHEAD |
'only_body' => 1,}); |
|
$r->print($start_page); |
|
|
if ($r->uri eq '/adm/helpdesk') { |
if ($r->uri eq '/adm/helpdesk') { |
&print_header($r,$origurl); |
&print_header($r,$origurl); |
} |
} |
Line 595 END
|
Line 596 END
|
</tr> |
</tr> |
END |
END |
} |
} |
|
|
$r->print(<<END); |
$r->print(<<END); |
<tr> |
<tr> |
<td width="140" bgcolor="$tablecolor"> |
<td width="140" bgcolor="$tablecolor"> |
Line 631 END
|
Line 633 END
|
</tr> |
</tr> |
</table> |
</table> |
</form> |
</form> |
</body> |
|
</html> |
|
END |
END |
|
$r->print(&Apache::loncommon::end_page()); |
return; |
return; |
} |
} |
|
|
Line 644 sub print_request_receipt {
|
Line 645 sub print_request_receipt {
|
my @loncvars = ('user.name','user.domain','request.course.sec','request.course.id'); |
my @loncvars = ('user.name','user.domain','request.course.sec','request.course.id'); |
my @cookievars = ('lonID'); |
my @cookievars = ('lonID'); |
|
|
my $bodytag = &Apache::loncommon::bodytag('',$function,'topmargin="0" marginheight="0"',1); |
|
my $admin = $Apache::lonnet::perlvar{'lonAdminMail'}; |
my $admin = $Apache::lonnet::perlvar{'lonAdminMail'}; |
my $to = $Apache::lonnet::perlvar{'lonSupportEMail'}; |
my $to = $Apache::lonnet::perlvar{'lonSupportEMail'}; |
my $from = $admin; |
my $from = $admin; |
Line 695 Date/Time: $reporttime
|
Line 695 Date/Time: $reporttime
|
<font color="$fontcolor">URL: </font><font color="$vlinkcolor">$env{'form.sourceurl'}</font><br /> |
<font color="$fontcolor">URL: </font><font color="$vlinkcolor">$env{'form.sourceurl'}</font><br /> |
<font color="$fontcolor">Date/Time: </font><font color="$vlinkcolor">$reporttime</font><br /> |
<font color="$fontcolor">Date/Time: </font><font color="$vlinkcolor">$reporttime</font><br /> |
|; |
|; |
my $html=&Apache::lonxml::xmlbegin(); |
|
|
my $start_page = |
|
&Apache::loncommon::start_page('Support request recorded',undef, |
|
{'function' => $function, |
|
'add_entries' => { |
|
topmargin => "0", |
|
marginheight => "0", |
|
}, |
|
'only_body' => 1,}); |
|
|
$r->print(<<"END"); |
$r->print(<<"END"); |
$html |
$start_page |
<head> |
|
<title>LON-CAPA support request recorded</title> |
|
</head> |
|
$bodytag |
|
<form name="logproblem"> |
<form name="logproblem"> |
<input type="hidden" name="action" value="result" /> |
<input type="hidden" name="action" value="result" /> |
</form> |
</form> |
Line 891 END
|
Line 896 END
|
</td> |
</td> |
</tr> |
</tr> |
</table> |
</table> |
</body> |
|
</html> |
|
"); |
"); |
|
$r->print(&Apache::loncommon::end_page()); |
} |
} |
|
|
sub print_header { |
sub print_header { |