WebGUI 2.3.0 release

This commit is contained in:
JT Smith 2001-10-29 00:12:00 +00:00
parent 794b4a319c
commit d2a9e59fab
36 changed files with 2715 additions and 1425 deletions

View file

@ -23,21 +23,22 @@ our @EXPORT = qw(&www_viewHelp &www_viewHelpIndex);
#-------------------------------------------------------------------
sub www_viewHelp {
my ($output, %help, @data, $sth);
my ($output, %help, @data, $sth, %seeAlso);
tie %help, 'Tie::CPHash';
%help = WebGUI::SQL->quickHash("select * from help where helpId=$session{form}{hid}",$session{dbh});
%help = WebGUI::SQL->quickHash("select * from help where helpId=$session{form}{hid} and namespace='$session{form}{namespace}' and language='$session{user}{language}'",$session{dbh});
$output = '<h1>'.WebGUI::International::get(93).': '.$help{action}.' '.$help{object}.'</h1>';
$help{body} =~ s/\n/\<br\>/g;
$output .= $help{body};
$output .= '<p><b>'.WebGUI::International::get(94).':';
$sth = WebGUI::SQL->read("select helpId, action, object from help where object='$help{object}' and action<>'$help{action}' order by action",$session{dbh});
$sth = WebGUI::SQL->read("select helpId, action, object, namespace from help where object='$help{object}' and action<>'$help{action}' and language='$session{user}{language}' order by action",$session{dbh});
while (@data = $sth->array) {
$output .= ' <a href="'.$session{page}{url}.'?op=viewHelp&hid='.$data[0].'">'.$data[1].' '.$data[2].'</a>,';
$output .= ' <a href="'.$session{page}{url}.'?op=viewHelp&hid='.$data[0].'&namespace='.$data[3].'">'.$data[1].' '.$data[2].'</a>,';
}
$sth->finish;
$sth = WebGUI::SQL->read("select helpId, action, object from help where helpId in ($help{seeAlso}) order by action",$session{dbh});
$sth = WebGUI::SQL->read("select helpId, namespace from helpSeeAlso where seeAlsoId in ($help{seeAlso})",$session{dbh});
while (@data = $sth->array) {
$output .= ' <a href="'.$session{page}{url}.'?op=viewHelp&hid='.$data[0].'">'.$data[1].' '.$data[2].'</a>,';
%seeAlso = WebGUI::SQL->quickHash("select helpId,namespace,action,object from help where helpId='$data[0]' and namespace='$data[1]' and language='$session{user}{language}'",$session{dbh});
$output .= ' <a href="'.$session{page}{url}.'?op=viewHelp&hid='.$seeAlso{helpId}.'&namespace='.$seeAlso{namespace}.'">'.$seeAlso{action}.' '.$seeAlso{object}.'</a>,';
}
$sth->finish;
$output .= ' <a href="'.$session{page}{url}.'?op=viewHelpIndex">'.WebGUI::International::get(95).'</a>';
@ -49,23 +50,23 @@ sub www_viewHelpIndex {
my ($sth, @data, $output, $previous);
$output = '<h1>'.WebGUI::International::get(95).'</h1>';
$output .= '<table width="100%"><tr><td valign="top"><b>'.WebGUI::International::get(96).'</b><p>';
$sth = WebGUI::SQL->read("select helpId, action, object from help order by action,object",$session{dbh});
$sth = WebGUI::SQL->read("select helpId, action, object, namespace from help where language='$session{user}{language}' order by action,object",$session{dbh});
while (@data = $sth->array) {
if ($data[1] ne $previous) {
$output .= '<p><b>'.$data[1].'</b><br>';
$previous = $data[1];
}
$output .= '<li><a href="'.$session{page}{url}.'?op=viewHelp&hid='.$data[0].'">'.$data[2].'</a><br>';
$output .= '<li><a href="'.$session{page}{url}.'?op=viewHelp&hid='.$data[0].'&namespace='.$data[3].'">'.$data[2].'</a><br>';
}
$sth->finish;
$output .= '</td><td valign="top"><b>'.WebGUI::International::get(97).'</b><p>';
$sth = WebGUI::SQL->read("select helpId, object, action from help order by object,action",$session{dbh});
$sth = WebGUI::SQL->read("select helpId, object, action, namespace from help where language='$session{user}{language}' order by object,action",$session{dbh});
while (@data = $sth->array) {
if ($data[1] ne $previous) {
$output .= '<p><b>'.$data[1].'</b><br>';
$previous = $data[1];
}
$output .= '<li><a href="'.$session{page}{url}.'?op=viewHelp&hid='.$data[0].'">'.$data[2].'</a><br>';
$output .= '<li><a href="'.$session{page}{url}.'?op=viewHelp&hid='.$data[0].'&namespace='.$data[3].'">'.$data[2].'</a><br>';
}
$sth->finish;
$output .= '</td></tr></table>';
@ -73,3 +74,4 @@ sub www_viewHelpIndex {
}
1;