WebGUI 2.1.0 release

This commit is contained in:
JT Smith 2001-10-13 18:01:00 +00:00
parent 08a5f757da
commit 1cf655659f
66 changed files with 3136 additions and 1001 deletions

View file

@ -13,6 +13,7 @@ package WebGUI::Operation::Help;
use Exporter;
use strict;
use Tie::CPHash;
use WebGUI::International;
use WebGUI::Session;
use WebGUI::SQL;
use WebGUI::Utility;
@ -25,29 +26,29 @@ sub www_viewHelp {
my ($output, %help, @data, $sth);
tie %help, 'Tie::CPHash';
%help = WebGUI::SQL->quickHash("select * from help where helpId=$session{form}{hid}",$session{dbh});
$output = '<h1>Help: '.$help{action}.' '.$help{object}.'</h1>';
$output = '<h1>'.WebGUI::International::get(93).': '.$help{action}.' '.$help{object}.'</h1>';
$help{body} =~ s/\n/\<br\>/g;
$output .= $help{body};
$output .= '<p><b>See Also:';
$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});
while (@data = $sth->array) {
$output .= ' <a href="'.$session{page}{url}.'?op=viewHelp&hid='.$data[0].'">'.$data[1].' '.$data[2].'</a> &middot;';
$output .= ' <a href="'.$session{page}{url}.'?op=viewHelp&hid='.$data[0].'">'.$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});
while (@data = $sth->array) {
$output .= ' <a href="'.$session{page}{url}.'?op=viewHelp&hid='.$data[0].'">'.$data[1].' '.$data[2].'</a> &middot;';
$output .= ' <a href="'.$session{page}{url}.'?op=viewHelp&hid='.$data[0].'">'.$data[1].' '.$data[2].'</a>,';
}
$sth->finish;
$output .= ' <a href="'.$session{page}{url}.'?op=viewHelpIndex">Help Index</a>';
$output .= ' <a href="'.$session{page}{url}.'?op=viewHelpIndex">'.WebGUI::International::get(95).'</a>';
return $output;
}
#-------------------------------------------------------------------
sub www_viewHelpIndex {
my ($sth, @data, $output, $previous);
$output = '<h1>Help Index</h1>';
$output .= '<table width="100%"><tr><td valign="top"><b>Sorted By Action</b><p>';
$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});
while (@data = $sth->array) {
if ($data[1] ne $previous) {
@ -57,7 +58,7 @@ sub www_viewHelpIndex {
$output .= '<li><a href="'.$session{page}{url}.'?op=viewHelp&hid='.$data[0].'">'.$data[2].'</a><br>';
}
$sth->finish;
$output .= '</td><td valign="top"><b>Sorted By Object</b><p>';
$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});
while (@data = $sth->array) {
if ($data[1] ne $previous) {