WebGUI 2.1.0 release
This commit is contained in:
parent
08a5f757da
commit
1cf655659f
66 changed files with 3136 additions and 1001 deletions
|
|
@ -1,4 +1,4 @@
|
|||
package WebGUI::Macro::P;
|
||||
package WebGUI::Macro::A_anyMenu;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001 Plain Black Software.
|
||||
|
|
@ -11,26 +11,29 @@ package WebGUI::Macro::P;
|
|||
#-------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
use WebGUI::Macro::Shared;
|
||||
use WebGUI::Privilege;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp, @data, $sth);
|
||||
my ($output, $temp, $pageTitle, $depth, @data);
|
||||
$output = $_[0];
|
||||
#---previous menu vertical---
|
||||
if ($output =~ /\^P/) {
|
||||
$temp = '<span class="verticalMenu">';
|
||||
$sth = WebGUI::SQL->read("select title,urlizedTitle,pageId from page where parentId=$session{page}{parentId} order by sequenceNumber",$session{dbh});
|
||||
while (@data = $sth->array) {
|
||||
if (WebGUI::Privilege::canViewPage($data[2])) {
|
||||
$temp .= '<a href="'.$session{env}{SCRIPT_NAME}.'/'.$data[1].'">'.$data[0].'</a><br>';
|
||||
}
|
||||
}
|
||||
$sth->finish;
|
||||
#---any page sub menu vertical---
|
||||
if ($output =~ /\^A(.*)\^\/A/) {
|
||||
($pageTitle,$depth) = split(/,/,$1);
|
||||
if ($depth eq "") {
|
||||
$depth = 1;
|
||||
}
|
||||
@data = WebGUI::SQL->quickArray("select pageId,title,urlizedTitle from page where urlizedTitle='$pageTitle'",$session{dbh});
|
||||
$temp = $pageTitle.'|'.$depth.'<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 .= traversePageTree($data[0],1,$depth);
|
||||
}
|
||||
$temp .= '</span>';
|
||||
$output =~ s/\^P/$temp/g;
|
||||
$output =~ s/\^A(.*)\^\/A/$temp/g;
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package WebGUI::Macro::At;
|
||||
package WebGUI::Macro::At_username;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001 Plain Black Software.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package WebGUI::Macro::Backslash;
|
||||
package WebGUI::Macro::Backslash_pageUrl;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001 Plain Black Software.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package WebGUI::Macro::C;
|
||||
package WebGUI::Macro::C_crumbTrail;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001 Plain Black Software.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package WebGUI::Macro::Carat;
|
||||
package WebGUI::Macro::Carat_carat;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001 Plain Black Software.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package WebGUI::Macro::D;
|
||||
package WebGUI::Macro::D_date;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001 Plain Black Software.
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
package WebGUI::Macro::F;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# 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;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp);
|
||||
$output = $_[0];
|
||||
#---2 level menu (vertical)---
|
||||
if ($output =~ /\^F/) {
|
||||
$temp = '<span class="verticalMenu">';
|
||||
$temp .= traversePageTree(1,0,2);
|
||||
$temp .= '</span>';
|
||||
$output =~ s/\^F/$temp/g;
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package WebGUI::Macro::H;
|
||||
package WebGUI::Macro::H_homeLink;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001 Plain Black Software.
|
||||
|
|
@ -11,6 +11,7 @@ package WebGUI::Macro::H;
|
|||
#-------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Session;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -22,7 +23,7 @@ sub process {
|
|||
$temp = '<a href="'.$session{env}{SCRIPT_NAME}.'/home">'.$1.'</a>';
|
||||
$output =~ s/\^H(.*)\^\/H/$temp/g;
|
||||
} elsif ($output =~ /\^H/) {
|
||||
$temp = '<a href="'.$session{env}{SCRIPT_NAME}.'/home">Home</a>';
|
||||
$temp = '<a href="'.$session{env}{SCRIPT_NAME}.'/home">'.WebGUI::International::get(47).'</a>';
|
||||
$output =~ s/\^H/$temp/g;
|
||||
}
|
||||
return $output;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package WebGUI::Macro::Hash;
|
||||
package WebGUI::Macro::Hash_userId;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001 Plain Black Software.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package WebGUI::Macro::L;
|
||||
package WebGUI::Macro::L_loginBox;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001 Plain Black Software.
|
||||
|
|
@ -12,6 +12,8 @@ package WebGUI::Macro::L;
|
|||
|
||||
use strict;
|
||||
use WebGUI::Form;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Macro::Backslash_pageUrl;
|
||||
use WebGUI::Session;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -22,13 +24,20 @@ sub process {
|
|||
if ($output =~ /\^L/) {
|
||||
$temp = '<div class="loginBox">';
|
||||
if ($session{var}{sessionId}) {
|
||||
$temp .= 'Hello '.$session{user}{username}.'. Click <a href="'.$session{page}{url}.'?op=logout">here</a> to log out.';
|
||||
$temp .= WebGUI::International::get(48);
|
||||
$temp .= ' '.$session{user}{username}.'. ';
|
||||
$temp .= WebGUI::International::get(49);
|
||||
$temp = WebGUI::Macro::Backslash::process($temp);
|
||||
} else {
|
||||
$temp .= '<form method="post" action="'.$session{page}{url}.'"> ';
|
||||
$temp .= WebGUI::Form::hidden("op","login").'<span class="formSubtext">Username:<br></span>';
|
||||
$temp .= WebGUI::Form::text("username",12,30).'<span class="formSubtext"><br>Password:<br></span>';
|
||||
$temp .= WebGUI::Form::hidden("op","login").'<span class="formSubtext">';
|
||||
$temp .= WebGUI::International::get(50);
|
||||
$temp .= '<br></span>';
|
||||
$temp .= WebGUI::Form::text("username",12,30).'<span class="formSubtext"><br>';
|
||||
$temp .= WebGUI::International::get(51);
|
||||
$temp .= '<br></span>';
|
||||
$temp .= WebGUI::Form::password("identifier",12,30).'<span class="formSubtext"><br></span>';
|
||||
$temp .= WebGUI::Form::submit("login");
|
||||
$temp .= WebGUI::Form::submit(WebGUI::International::get(52));
|
||||
$temp .= '</form>';
|
||||
}
|
||||
$temp .= '</div>';
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package WebGUI::Macro::j;
|
||||
package WebGUI::Macro::M_currentMenuVertical;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001 Plain Black Software.
|
||||
|
|
@ -18,12 +18,17 @@ use WebGUI::Session;
|
|||
sub process {
|
||||
my ($output, $temp);
|
||||
$output = $_[0];
|
||||
#---2 level current level menu (vertical)---
|
||||
if ($output =~ /\^j/) {
|
||||
#---current menu vertical---
|
||||
if ($output =~ /\^M(.*)\^\/M/) {
|
||||
$temp = '<span class="verticalMenu">';
|
||||
$temp .= traversePageTree($session{page}{pageId},0,2);
|
||||
$temp .= traversePageTree($session{page}{pageId},0,$1);
|
||||
$temp .= '</span>';
|
||||
$output =~ s/\^j/$temp/g;
|
||||
$output =~ s/\^M(.*)\^\/M/$temp/g;
|
||||
} elsif ($output =~ /\^M/) {
|
||||
$temp = '<span class="verticalMenu">';
|
||||
$temp .= traversePageTree($session{page}{pageId},0,1);
|
||||
$temp .= '</span>';
|
||||
$output =~ s/\^M/$temp/g;
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package WebGUI::Macro::h;
|
||||
package WebGUI::Macro::P_previousMenuVertical;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001 Plain Black Software.
|
||||
|
|
@ -12,17 +12,23 @@ package WebGUI::Macro::h;
|
|||
|
||||
use strict;
|
||||
use WebGUI::Macro::Shared;
|
||||
use WebGUI::Session;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp);
|
||||
$output = $_[0];
|
||||
#---3 level menu (vertical)---
|
||||
if ($output =~ /\^h/) {
|
||||
#---previous menu vertical---
|
||||
if ($output =~ /\^P(.*)\^\/P/) {
|
||||
$temp = '<span class="verticalMenu">';
|
||||
$temp .= traversePageTree(1,0,3);
|
||||
$temp .= '</span>';
|
||||
$output =~ s/\^h/$temp/g;
|
||||
$temp .= traversePageTree($session{page}{parentId},0,$1);
|
||||
$temp .= '</span>';
|
||||
$output =~ s/\^P(.*)\^\/P/$temp/g;
|
||||
} elsif ($output =~ /\^P/) {
|
||||
$temp = '<span class="verticalMenu">';
|
||||
$temp .= traversePageTree($session{page}{parentId},0,1);
|
||||
$temp .= '</span>';
|
||||
$output =~ s/\^P/$temp/g;
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package WebGUI::Macro::Splat;
|
||||
package WebGUI::Macro::Splat_random;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001 Plain Black Software.
|
||||
|
|
@ -11,14 +11,18 @@ package WebGUI::Macro::Splat;
|
|||
#-------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
use WebGUI::Utility;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp);
|
||||
$output = $_[0];
|
||||
#---random number---
|
||||
if ($output =~ /\^\*/) {
|
||||
$temp = rand()*1000000000;
|
||||
if ($output =~ /\^\*(.*)\^\/\*/) {
|
||||
$temp = round(rand()*$1);
|
||||
$output =~ s/\^\*(.*)\^\/\*/$temp/g;
|
||||
} elsif ($output =~ /\^\*/) {
|
||||
$temp = round(rand()*1000000000);
|
||||
$output =~ s/\^\*/$temp/g;
|
||||
}
|
||||
return $output;
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
package WebGUI::Macro::T;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# 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::Privilege;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp, @data, $sth);
|
||||
$output = $_[0];
|
||||
#---top menu vertical---
|
||||
if ($output =~ /\^T/) {
|
||||
$temp = '<span class="verticalMenu">';
|
||||
$sth = WebGUI::SQL->read("select title,urlizedTitle,pageId from page where parentId=1 order by sequenceNumber",$session{dbh});
|
||||
while (@data = $sth->array) {
|
||||
if (WebGUI::Privilege::canViewPage($data[2])) {
|
||||
$temp .= '<a href="'.$session{env}{SCRIPT_NAME}.'/'.$data[1].'">'.$data[0].'</a><br>';
|
||||
}
|
||||
}
|
||||
$sth->finish;
|
||||
$temp .= '</span>';
|
||||
$output =~ s/\^T/$temp/g;
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package WebGUI::Macro::J;
|
||||
package WebGUI::Macro::T_topMenuVertical;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001 Plain Black Software.
|
||||
|
|
@ -12,18 +12,22 @@ package WebGUI::Macro::J;
|
|||
|
||||
use strict;
|
||||
use WebGUI::Macro::Shared;
|
||||
use WebGUI::Session;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp, @data, $sth, $first);
|
||||
my ($output, $temp);
|
||||
$output = $_[0];
|
||||
#---3 level current level menu (vertical)---
|
||||
if ($output =~ /\^J/) {
|
||||
#---top menu vertical---
|
||||
if ($output =~ /\^T(.*)\^\/T/) {
|
||||
$temp = '<span class="verticalMenu">';
|
||||
$temp .= traversePageTree($session{page}{pageId},0,3);
|
||||
$temp .= traversePageTree(1,0,$1);
|
||||
$temp .= '</span>';
|
||||
$output =~ s/\^J/$temp/g;
|
||||
$output =~ s/\^T(.*)\^\/T/$temp/g;
|
||||
} elsif ($output =~ /\^T/) {
|
||||
$temp = '<span class="verticalMenu">';
|
||||
$temp .= traversePageTree(1,0,1);
|
||||
$temp .= '</span>';
|
||||
$output =~ s/\^T/$temp/g;
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package WebGUI::Macro::a;
|
||||
package WebGUI::Macro::a_account;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001 Plain Black Software.
|
||||
|
|
@ -11,6 +11,7 @@ package WebGUI::Macro::a;
|
|||
#-------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Session;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -22,7 +23,7 @@ sub process {
|
|||
$temp = '<a href="'.$session{page}{url}.'?op=displayAccount">'.$1.'</a>';
|
||||
$output =~ s/\^a(.*)\^\/a/$temp/g;
|
||||
} elsif ($output =~ /\^a/) {
|
||||
$temp = '<a href="'.$session{page}{url}.'?op=displayAccount">My Account</a>';
|
||||
$temp = '<a href="'.$session{page}{url}.'?op=displayAccount">'.WebGUI::International::get(46).'</a>';
|
||||
$output =~ s/\^a/$temp/g;
|
||||
}
|
||||
return $output;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package WebGUI::Macro::c;
|
||||
package WebGUI::Macro::c_companyName;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001 Plain Black Software.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package WebGUI::Macro::e;
|
||||
package WebGUI::Macro::e_companyEmail;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001 Plain Black Software.
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
package WebGUI::Macro::f;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# 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;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp);
|
||||
$output = $_[0];
|
||||
#---full menu (vertical)---
|
||||
if ($output =~ /\^f/) {
|
||||
$temp = '<span class="verticalMenu">';
|
||||
$temp .= traversePageTree(1,0);
|
||||
$temp .= '</span>';
|
||||
$output =~ s/\^f/$temp/g;
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
package WebGUI::Macro::m;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# 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::Privilege;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp, @data, $sth, $first);
|
||||
$output = $_[0];
|
||||
#---current menu vertical---
|
||||
if ($output =~ /\^M/) {
|
||||
$temp = '<span class="verticalMenu">';
|
||||
$sth = WebGUI::SQL->read("select title,urlizedTitle,pageId from page where parentId=$session{page}{pageId} order by sequenceNumber",$session{dbh});
|
||||
while (@data = $sth->array) {
|
||||
if (WebGUI::Privilege::canViewPage($data[2])) {
|
||||
$temp .= '<a href="'.$session{env}{SCRIPT_NAME}.'/'.$data[1].'">'.$data[0].'</a><br>';
|
||||
}
|
||||
}
|
||||
$sth->finish;
|
||||
$temp .= '</span>';
|
||||
$output =~ s/\^M/$temp/g;
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package WebGUI::Macro::M;
|
||||
package WebGUI::Macro::m_currentMenuHorizontal;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001 Plain Black Software.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package WebGUI::Macro::p;
|
||||
package WebGUI::Macro::p_previousMenuHorizontal;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001 Plain Black Software.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package WebGUI::Macro::r;
|
||||
package WebGUI::Macro::r_printable;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001 Plain Black Software.
|
||||
|
|
@ -11,6 +11,7 @@ package WebGUI::Macro::r;
|
|||
#-------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Session;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -34,7 +35,9 @@ sub process {
|
|||
} else {
|
||||
$temp .= '?makePrintable=1';
|
||||
}
|
||||
$temp = '<a href="'.$temp.'">Make Page Printable</a>';
|
||||
$temp = '<a href="'.$temp.'">';
|
||||
$temp .= WebGUI::International::get(53);
|
||||
$temp .= '</a>';
|
||||
$output =~ s/\^r/$temp/g;
|
||||
}
|
||||
return $output;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package WebGUI::Macro::t;
|
||||
package WebGUI::Macro::t_topMenuHorizontal;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001 Plain Black Software.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package WebGUI::Macro::u;
|
||||
package WebGUI::Macro::u_companyUrl;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001 Plain Black Software.
|
||||
Loading…
Add table
Add a link
Reference in a new issue