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

@ -1,4 +1,4 @@
package WebGUI::Macro::A_anyMenu;
package WebGUI::Macro::S_specificMenuVertical;
#-------------------------------------------------------------------
# WebGUI is Copyright 2001 Plain Black Software.
@ -21,19 +21,19 @@ sub process {
my ($output, $temp, $pageTitle, $depth, @data);
$output = $_[0];
#---any page sub menu vertical---
if ($output =~ /\^A(.*)\^\/A/) {
if ($output =~ /\^S(.*)\^\/S/) {
($pageTitle,$depth) = split(/,/,$1);
if ($depth eq "") {
$depth = 1;
$depth = 0;
}
@data = WebGUI::SQL->quickArray("select pageId,title,urlizedTitle from page where urlizedTitle='$pageTitle'",$session{dbh});
$temp = $pageTitle.'|'.$depth.'<span class="verticalMenu">';
$temp = '<span class="verticalMenu">';
if (defined $data[0] && WebGUI::Privilege::canViewPage($data[0])) {
$temp .= '<a href="'.$session{env}{SCRIPT_URL}.'/'.$data[2].'">'.$data[1].'</a><br>';
#$temp .= '<a href="'.$session{env}{SCRIPT_URL}.'/'.$data[2].'">'.$data[1].'</a><br>';
$temp .= traversePageTree($data[0],1,$depth);
}
$temp .= '</span>';
$output =~ s/\^A(.*)\^\/A/$temp/g;
$output =~ s/\^S(.*)\^\/S/$temp/g;
}
return $output;
}

View file

@ -0,0 +1,48 @@
package WebGUI::Macro::s_specificMenuHorizontal;
#-------------------------------------------------------------------
# WebGUI is Copyright 2001 Plain Black Software.
#-------------------------------------------------------------------
# Please read the legal notices (docs/legal.txt) and the license
# (docs/license.txt) that came with this distribution before using
# this software.
#-------------------------------------------------------------------
# http://www.plainblack.com info@plainblack.com
#-------------------------------------------------------------------
use strict;
use WebGUI::Macro::Shared;
use WebGUI::Privilege;
use WebGUI::Session;
use WebGUI::SQL;
#-------------------------------------------------------------------
sub process {
my ($output, $temp, @data, $pageTitle, $parentId, $sth, $first);
$output = $_[0];
#---any page sub menu vertical---
if ($output =~ /\^s(.*)\^\/s/) {
$pageTitle = $1;
$temp = '<span class="horizontalMenu">';
$first = 1;
($parentId) = WebGUI::SQL->quickArray("select pageId from page where urlizedTitle='$pageTitle'",$session{dbh});
$sth = WebGUI::SQL->read("select title,urlizedTitle,pageId from page where parentId='$parentId' order by sequenceNumber",$session{dbh});
while (@data = $sth->array) {
if (WebGUI::Privilege::canViewPage($data[2])) {
if ($first) {
$first = 0;
} else {
$temp .= " &middot; ";
}
$temp .= '<a class="horizontalMenu" href="'.$session{env}{SCRIPT_NAME}.'/'.$data[1].'">'.$data[0].'</a>';
}
}
$sth->finish;
$temp .= '</span>';
$output =~ s/\^s(.*)\^\/s/$temp/g;
}
return $output;
}
1;