WebGUI 2.5.0 release
473
docs/create.sql
|
|
@ -10,4 +10,7 @@ Perl.................................Larry Wall / O'Reilly
|
|||
Data::Config.........................Sébastien Aperghis-Tramoni
|
||||
IE Rich Edit.........................Brattli
|
||||
Spanish Translation..................Ricardo Markiewicz
|
||||
Portuguese Translation...............Jose Caneira
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,12 @@ versions. Be sure to heed the warnings contained herein as they will
|
|||
save you many hours of grief.
|
||||
|
||||
|
||||
2.5.0
|
||||
--------------------------------------------------------------------
|
||||
* Any third-party Widgets you have installed are likely not to work
|
||||
any longer unless they have been updated to work with
|
||||
the new templating features in WebGUI.
|
||||
|
||||
2.4.0
|
||||
--------------------------------------------------------------------
|
||||
* You must convert your old macros to the new format by version
|
||||
|
|
|
|||
1452
docs/upgrades/upgrade_2.4.0-2.5.0.sql
Normal file
|
|
@ -1,5 +1,5 @@
|
|||
package WebGUI;
|
||||
our $VERSION = "2.4.0";
|
||||
our $VERSION = "2.5.0";
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001 Plain Black Software.
|
||||
|
|
@ -21,6 +21,8 @@ use WebGUI::Privilege;
|
|||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
use WebGUI::Style;
|
||||
use WebGUI::Template::Default;
|
||||
use WebGUI::Utility;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub _displayAdminBar {
|
||||
|
|
@ -29,13 +31,15 @@ sub _displayAdminBar {
|
|||
tie %hash2, "Tie::IxHash";
|
||||
#--content adder
|
||||
@widgetArray = @_;
|
||||
$hash2{$session{page}{url}} = WebGUI::International::get(1);
|
||||
$hash2{$session{page}{url}.'?op=addPage'} = WebGUI::International::get(2);
|
||||
$hash{$session{page}{url}} = WebGUI::International::get(1);
|
||||
$hash{$session{page}{url}.'?op=addPage'} = WebGUI::International::get(2);
|
||||
foreach $widget (@widgetArray) {
|
||||
$widgetName = "WebGUI::Widget::".$widget."::widgetName";
|
||||
$hash2{$session{page}{url}.'?func=add&widget='.$widget} = &$widgetName;
|
||||
}
|
||||
$contentSelect = WebGUI::Form::selectList("contentSelect",\%hash2,"","","","goContent()");
|
||||
%hash2 = sortHash(%hash2);
|
||||
%hash = (%hash, %hash2);
|
||||
$contentSelect = WebGUI::Form::selectList("contentSelect",\%hash,"","","","goContent()");
|
||||
#--clipboard paster
|
||||
%hash2 = ();
|
||||
$hash2{$session{page}{url}} = WebGUI::International::get(3);
|
||||
|
|
@ -116,14 +120,12 @@ sub _loadWidgets {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub page {
|
||||
my ($preContent, $postContent, $widgetType, $function, $functionOutput, $widget, @availableWidgets, @widgetList, $sth, $httpHeader, $header, $footer, $content, $operationOutput, $operation, $adminBar);
|
||||
my (%contentHash, $cmd, $pageEdit, $widgetType, $functionOutput, @availableWidgets, @widgetList, $sth, $httpHeader, $header, $footer, $content, $operationOutput, $adminBar);
|
||||
WebGUI::Session::open($_[0]);
|
||||
$preContent = '<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td valign="top" class="content">';
|
||||
$postContent = '</td></tr></table>';
|
||||
@availableWidgets = _loadWidgets();
|
||||
if (exists $session{form}{op}) {
|
||||
$operation = "WebGUI::Operation::www_".$session{form}{op};
|
||||
$operationOutput = &$operation();
|
||||
$cmd = "WebGUI::Operation::www_".$session{form}{op};
|
||||
$operationOutput = &$cmd();
|
||||
}
|
||||
if (exists $session{form}{func}) {
|
||||
if (exists $session{form}{widget}) {
|
||||
|
|
@ -131,29 +133,36 @@ sub page {
|
|||
} else {
|
||||
($widgetType) = WebGUI::SQL->quickArray("select widgetType from widget where widgetId='$session{form}{wid}'",$session{dbh});
|
||||
}
|
||||
$function = "WebGUI::Widget::".$widgetType."::www_".$session{form}{func};
|
||||
$functionOutput = &$function();
|
||||
$cmd = "WebGUI::Widget::".$widgetType."::www_".$session{form}{func};
|
||||
$functionOutput = &$cmd();
|
||||
}
|
||||
if ($operationOutput ne "") {
|
||||
$content = $operationOutput;
|
||||
$contentHash{A} = $operationOutput;
|
||||
$content = WebGUI::Template::Default::generate(\%contentHash);
|
||||
} elsif ($functionOutput ne "") {
|
||||
$content = $functionOutput;
|
||||
$contentHash{A} = $functionOutput;
|
||||
$content = WebGUI::Template::Default::generate(\%contentHash);
|
||||
} else {
|
||||
if (WebGUI::Privilege::canViewPage()) {
|
||||
if ($session{var}{adminOn}) {
|
||||
$content .= '<a href="'.$session{page}{url}.'?op=editPage"><img src="'.$session{setting}{lib}.'/edit.gif" border=0></a><a href="'.$session{page}{url}.'?op=cutPage"><img src="'.$session{setting}{lib}.'/cut.gif" border=0></a><a href="'.$session{page}{url}.'?op=deletePage"><img src="'.$session{setting}{lib}.'/delete.gif" border=0></a><a href="'.$session{page}{url}.'?op=movePageUp"><img src="'.$session{setting}{lib}.'/leftArrow.gif" border=0></a><a href="'.$session{page}{url}.'?op=movePageDown"><img src="'.$session{setting}{lib}.'/rightArrow.gif" border=0></a>';
|
||||
$pageEdit = '<br><a href="'.$session{page}{url}.'?op=editPage"><img src="'.$session{setting}{lib}.'/edit.gif" border=0></a><a href="'.$session{page}{url}.'?op=cutPage"><img src="'.$session{setting}{lib}.'/cut.gif" border=0></a><a href="'.$session{page}{url}.'?op=deletePage"><img src="'.$session{setting}{lib}.'/delete.gif" border=0></a><a href="'.$session{page}{url}.'?op=movePageUp"><img src="'.$session{setting}{lib}.'/leftArrow.gif" border=0></a><a href="'.$session{page}{url}.'?op=movePageDown"><img src="'.$session{setting}{lib}.'/rightArrow.gif" border=0></a>';
|
||||
}
|
||||
$sth = WebGUI::SQL->read("select widgetId, widgetType from widget where pageId=".$session{page}{pageId}." order by sequenceNumber, widgetId",$session{dbh});
|
||||
$sth = WebGUI::SQL->read("select widgetId, widgetType, position from widget where pageId=".$session{page}{pageId}." order by sequenceNumber, widgetId",$session{dbh});
|
||||
while (@widgetList = $sth->array) {
|
||||
if ($session{var}{adminOn}) {
|
||||
$content .= '<hr><a href="'.$session{page}{url}.'?func=edit&wid='.$widgetList[0].'"><img src="'.$session{setting}{lib}.'/edit.gif" border=0></a><a href="'.$session{page}{url}.'?func=cut&wid='.$widgetList[0].'"><img src="'.$session{setting}{lib}.'/cut.gif" border=0></a><a href="'.$session{page}{url}.'?wid='.$widgetList[0].'&func=delete"><img src="'.$session{setting}{lib}.'/delete.gif" border=0></a><a href="'.$session{page}{url}.'?func=moveUp&wid='.$widgetList[0].'"><img src="'.$session{setting}{lib}.'/upArrow.gif" border=0></a><a href="'.$session{page}{url}.'?func=moveDown&wid='.$widgetList[0].'"><img src="'.$session{setting}{lib}.'/downArrow.gif" border=0></a><a href="'.$session{page}{url}.'?func=jumpUp&wid='.$widgetList[0].'"><img src="'.$session{setting}{lib}.'/jumpUp.gif" border=0></a><a href="'.$session{page}{url}.'?func=jumpDown&wid='.$widgetList[0].'"><img src="'.$session{setting}{lib}.'/jumpDown.gif" border=0></a><br>';
|
||||
$contentHash{$widgetList[2]} .= '<hr><a href="'.$session{page}{url}.'?func=edit&wid='.$widgetList[0].'"><img src="'.$session{setting}{lib}.'/edit.gif" border=0></a><a href="'.$session{page}{url}.'?func=cut&wid='.$widgetList[0].'"><img src="'.$session{setting}{lib}.'/cut.gif" border=0></a><a href="'.$session{page}{url}.'?wid='.$widgetList[0].'&func=delete"><img src="'.$session{setting}{lib}.'/delete.gif" border=0></a><a href="'.$session{page}{url}.'?func=moveUp&wid='.$widgetList[0].'"><img src="'.$session{setting}{lib}.'/upArrow.gif" border=0></a><a href="'.$session{page}{url}.'?func=moveDown&wid='.$widgetList[0].'"><img src="'.$session{setting}{lib}.'/downArrow.gif" border=0></a><a href="'.$session{page}{url}.'?func=jumpUp&wid='.$widgetList[0].'"><img src="'.$session{setting}{lib}.'/jumpUp.gif" border=0></a><a href="'.$session{page}{url}.'?func=jumpDown&wid='.$widgetList[0].'"><img src="'.$session{setting}{lib}.'/jumpDown.gif" border=0></a><br>';
|
||||
}
|
||||
$widget = "WebGUI::Widget::".$widgetList[1]."::www_view";
|
||||
$content .= &$widget($widgetList[0])."<p>";
|
||||
$cmd = "WebGUI::Widget::".$widgetList[1]."::www_view";
|
||||
$contentHash{$widgetList[2]} .= &$cmd($widgetList[0])."<p>";
|
||||
}
|
||||
$sth->finish;
|
||||
$cmd = "use WebGUI::Template::".$session{page}{template};
|
||||
eval($cmd);
|
||||
$cmd = "WebGUI::Template::".$session{page}{template}."::generate";
|
||||
$content = &$cmd(\%contentHash);
|
||||
} else {
|
||||
$content = WebGUI::Privilege::noAccess();
|
||||
$contentHash{A} = WebGUI::Privilege::noAccess();
|
||||
$content = WebGUI::Template::Default::generate(\%contentHash);
|
||||
}
|
||||
}
|
||||
if ($session{var}{adminOn}) {
|
||||
|
|
@ -162,7 +171,7 @@ sub page {
|
|||
$httpHeader = WebGUI::Session::httpHeader();
|
||||
($header, $footer) = WebGUI::Style::getStyle();
|
||||
WebGUI::Session::close();
|
||||
return $httpHeader.$adminBar.$header.$preContent.$content.$postContent.$footer;
|
||||
return $httpHeader.$adminBar.$header.$pageEdit.$content.$footer;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -54,6 +54,26 @@ sub _getWeekday {
|
|||
#-------------------------------------------------------------------
|
||||
sub epochToHuman {
|
||||
my ($hour12, $value, $output, @date, %weekday, %month);
|
||||
|
||||
# 0 1 2 3 4 5 6 7 8
|
||||
# $sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
|
||||
# localtime(time);
|
||||
#
|
||||
# All list elements are numeric, and come straight
|
||||
# out of the C `struct tm'. $sec, $min, and $hour
|
||||
# are the seconds, minutes, and hours of the
|
||||
# specified time. $mday is the day of the month,
|
||||
# and $mon is the month itself, in the range `0..11'
|
||||
# with 0 indicating January and 11 indicating
|
||||
# December. $year is the number of years since
|
||||
# 1900. That is, $year is `123' in year 2023.
|
||||
# $wday is the day of the week, with 0 indicating
|
||||
# Sunday and 3 indicating Wednesday. $yday is the
|
||||
# day of the year, in the range `1..365' (or
|
||||
# `1..366' in leap years.) $isdst is true if the
|
||||
# specified time occurs during daylight savings
|
||||
# time, false otherwise.
|
||||
|
||||
@date = localtime($_[0]);
|
||||
$date[4]++; # offset the months starting from 0
|
||||
$date[5] += 1900; # original value is Year-1900
|
||||
|
|
@ -82,7 +102,7 @@ sub epochToHuman {
|
|||
$output =~ s/\%w/$weekday{$date[6]}/g;
|
||||
}
|
||||
#---hour stuff
|
||||
$hour12 = $date[2]+1;
|
||||
$hour12 = $date[2];
|
||||
if ($hour12 > 12) {
|
||||
$hour12 = $hour12 - 12;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ use WebGUI::Session;
|
|||
sub getParams {
|
||||
my ($data, @param);
|
||||
$data = $_[0];
|
||||
$data = substr($data,1,length($data)-2);
|
||||
push(@param, $+) while $data =~ m {
|
||||
"([^\"\\]*(?:\\.[^\"\\]*)*)",?
|
||||
| ([^,]+),?
|
||||
|
|
|
|||
|
|
@ -17,9 +17,7 @@ use WebGUI::Session;
|
|||
sub process {
|
||||
my ($output);
|
||||
$output = $_[0];
|
||||
while ($output =~ /\^\@(.*?)\;/) {
|
||||
$output =~ s/\^\@(.*?)\;/$session{user}{username}/;
|
||||
}
|
||||
$output =~ s/\^\@\;/$session{user}{username}/g;
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^\@/) {
|
||||
$output =~ s/\^\@/$session{user}{username}/g;
|
||||
|
|
|
|||
|
|
@ -17,9 +17,7 @@ use WebGUI::Session;
|
|||
sub process {
|
||||
my ($output);
|
||||
$output = $_[0];
|
||||
while ($output =~ /\^\\(.*?)\;/) {
|
||||
$output =~ s/\^\\(.*?)\;/$session{page}{url}/;
|
||||
}
|
||||
$output =~ s/\^\\\;/$session{page}{url}/g;
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^\\/) {
|
||||
$output =~ s/\^\\/$session{page}{url}/g;
|
||||
|
|
|
|||
|
|
@ -31,14 +31,18 @@ sub _recurseCrumbTrail {
|
|||
return $output;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub _replacement {
|
||||
my (@param, $temp);
|
||||
$temp = '<span class="crumbTrail">'._recurseCrumbTrail($session{page}{parentId}).'<a href="'.$session{page}{url}.'">'.$session{page}{title}.'</a></span>';
|
||||
return $temp;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp);
|
||||
$output = $_[0];
|
||||
while ($output =~ /\^C(.*?)\;/) {
|
||||
$temp = '<span class="crumbTrail">'._recurseCrumbTrail($session{page}{parentId}).'<a href="'.$session{page}{url}.'">'.$session{page}{title}.'</a></span>';
|
||||
$output =~ s/\^C(.*?)\;/$temp/;
|
||||
}
|
||||
$output =~ s/\^C\;/_replacement()/ge;
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^C/) {
|
||||
$temp = '<span class="crumbTrail">'._recurseCrumbTrail($session{page}{parentId}).'<a href="'.$session{page}{url}.'">'.$session{page}{title}.'</a></span>';
|
||||
|
|
|
|||
|
|
@ -14,19 +14,24 @@ use strict;
|
|||
use WebGUI::DateTime;
|
||||
use WebGUI::Macro;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub _replacement {
|
||||
my (@param, $temp);
|
||||
@param = WebGUI::Macro::getParams($_[0]);
|
||||
if ($param[0] ne "") {
|
||||
$temp = epochToHuman(time(),$param[0]);
|
||||
} else {
|
||||
$temp = localtime(time());
|
||||
}
|
||||
return $temp;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp, @param);
|
||||
$output = $_[0];
|
||||
while ($output =~ /\^D(.*?)\;/) {
|
||||
@param = WebGUI::Macro::getParams($1);
|
||||
if ($param[0] ne "") {
|
||||
$temp = epochToHuman(time(),$param[0]);
|
||||
} else {
|
||||
$temp = localtime(time());
|
||||
}
|
||||
$output =~ s/\^D(.*?)\;/$temp/;
|
||||
}
|
||||
$output =~ s/\^D\((.*?)\)\;/_replacement($1)/ge;
|
||||
$output =~ s/\^D\;/_replacement()/ge;
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^D(.*)\^\/D/) {
|
||||
$temp = epochToHuman(time(),$1);
|
||||
|
|
|
|||
|
|
@ -15,21 +15,26 @@ use WebGUI::International;
|
|||
use WebGUI::Macro;
|
||||
use WebGUI::Session;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub _replacement {
|
||||
my (@param, $temp);
|
||||
@param = WebGUI::Macro::getParams($1);
|
||||
$temp = '<a class="homeLink" href="'.$session{env}{SCRIPT_NAME}.'/home">';
|
||||
if ($param[0] ne "") {
|
||||
$temp .= $param[0];
|
||||
} else {
|
||||
$temp .= WebGUI::International::get(47);
|
||||
}
|
||||
$temp .= '</a>';
|
||||
return $temp;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp, @param);
|
||||
$output = $_[0];
|
||||
while ($output =~ /\^H(.*?)\;/) {
|
||||
@param = WebGUI::Macro::getParams($1);
|
||||
$temp = '<a class="homeLink" href="'.$session{env}{SCRIPT_NAME}.'/home">';
|
||||
if ($param[0] ne "") {
|
||||
$temp .= $param[0];
|
||||
} else {
|
||||
$temp .= WebGUI::International::get(47);
|
||||
}
|
||||
$temp .= '</a>';
|
||||
$output =~ s/\^H(.*?)\;/$temp/;
|
||||
}
|
||||
$output =~ s/\^H\((.*?)\)\;/_replacement($1)/ge;
|
||||
$output =~ s/\^H\;/_replacement()/ge;
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^H(.*)\^\/H/) {
|
||||
$temp = '<a class="homeLink" href="'.$session{env}{SCRIPT_NAME}.'/home">'.$1.'</a>';
|
||||
|
|
|
|||
|
|
@ -17,9 +17,7 @@ use WebGUI::Session;
|
|||
sub process {
|
||||
my ($output);
|
||||
$output = $_[0];
|
||||
while ($output =~ /\^\#(.*?)\;/) {
|
||||
$output =~ s/\^\#(.*?)\;/$session{user}{userId}/;
|
||||
}
|
||||
$output =~ s/\^\#\;/$session{user}{userId}/g;
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^\#/) {
|
||||
$output =~ s/\^\#/$session{user}{userId}/g;
|
||||
|
|
|
|||
|
|
@ -16,33 +16,37 @@ use WebGUI::International;
|
|||
use WebGUI::Macro::Backslash_pageUrl;
|
||||
use WebGUI::Session;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub _replacement {
|
||||
my ($temp);
|
||||
$temp = '<div class="loginBox">';
|
||||
if ($session{var}{sessionId}) {
|
||||
$temp .= WebGUI::International::get(48);
|
||||
$temp .= ' <a href="'.$session{page}{url}.'?op=displayAccount">'.$session{user}{username}.'</a>.';
|
||||
$temp .= WebGUI::International::get(49);
|
||||
$temp = WebGUI::Macro::Backslash_pageUrl::process($temp);
|
||||
} else {
|
||||
$temp .= '<form method="post" action="'.$session{page}{url}.'"> ';
|
||||
$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(WebGUI::International::get(52));
|
||||
$temp .= '</form>';
|
||||
$temp .= '<a href="'.$session{page}{url}.'?op=createAccount">Click here to register.</a>';
|
||||
}
|
||||
$temp .= '</div>';
|
||||
return $temp;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp);
|
||||
$output = $_[0];
|
||||
while ($output =~ /\^L(.*?)\;/) {
|
||||
$temp = '<div class="loginBox">';
|
||||
if ($session{var}{sessionId}) {
|
||||
$temp .= WebGUI::International::get(48);
|
||||
$temp .= ' <a href="'.$session{page}{url}.'?op=displayAccount">'.$session{user}{username}.'</a>. ';
|
||||
$temp .= WebGUI::International::get(49);
|
||||
$temp = WebGUI::Macro::Backslash_pageUrl::process($temp);
|
||||
} else {
|
||||
$temp .= '<form method="post" action="'.$session{page}{url}.'"> ';
|
||||
$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(WebGUI::International::get(52));
|
||||
$temp .= '</form>';
|
||||
$temp .= '<a href="'.$session{page}{url}.'?op=createAccount">Click here to register.</a>';
|
||||
}
|
||||
$temp .= '</div>';
|
||||
$output =~ s/\^L(.*?)\;/$temp/;
|
||||
}
|
||||
$output =~ s/\^L\;/_replacement()/ge;
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^L/) {
|
||||
$temp = '<div class="loginBox">';
|
||||
|
|
|
|||
|
|
@ -15,21 +15,26 @@ use WebGUI::Macro;
|
|||
use WebGUI::Macro::Shared;
|
||||
use WebGUI::Session;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub _replacement {
|
||||
my ($output, $temp, @param);
|
||||
@param = WebGUI::Macro::getParams($_[0]);
|
||||
$temp = '<span class="verticalMenu">';
|
||||
if ($param[0] ne "") {
|
||||
$temp .= traversePageTree($session{page}{pageId},0,$param[0]);
|
||||
} else {
|
||||
$temp .= traversePageTree($session{page}{pageId},0,1);
|
||||
}
|
||||
$temp .= '</span>';
|
||||
return $temp;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp, @param);
|
||||
$output = $_[0];
|
||||
while ($output =~ /\^M(.*?)\;/) {
|
||||
@param = WebGUI::Macro::getParams($1);
|
||||
$temp = '<span class="verticalMenu">';
|
||||
if ($param[0] ne "") {
|
||||
$temp .= traversePageTree($session{page}{pageId},0,$param[0]);
|
||||
} else {
|
||||
$temp .= traversePageTree($session{page}{pageId},0,1);
|
||||
}
|
||||
$temp .= '</span>';
|
||||
$output =~ s/\^M(.*?)\;/$temp/;
|
||||
}
|
||||
$output =~ s/\^M\((.*?)\)\;/_replacement($1)/ge;
|
||||
$output =~ s/\^M\;/_replacement()/ge;
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^M(.*)\^\/M/) {
|
||||
$temp = '<span class="verticalMenu">';
|
||||
|
|
|
|||
|
|
@ -16,20 +16,25 @@ use WebGUI::Macro::Shared;
|
|||
use WebGUI::Session;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp, @param);
|
||||
$output = $_[0];
|
||||
while ($output =~ /\^P(.*?)\;/) {
|
||||
@param = WebGUI::Macro::getParams($1);
|
||||
$temp = '<span class="verticalMenu">';
|
||||
if ($param[0] ne "") {
|
||||
$temp .= traversePageTree($session{page}{parentId},0,$param[0]);
|
||||
} else {
|
||||
$temp .= traversePageTree($session{page}{parentId},0,1);
|
||||
}
|
||||
$temp .= '</span>';
|
||||
$output =~ s/\^P(.*?)\;/$temp/;
|
||||
sub _replacement {
|
||||
my ($temp, @param);
|
||||
@param = WebGUI::Macro::getParams($_[0]);
|
||||
$temp = '<span class="verticalMenu">';
|
||||
if ($param[0] ne "") {
|
||||
$temp .= traversePageTree($session{page}{parentId},0,$param[0]);
|
||||
} else {
|
||||
$temp .= traversePageTree($session{page}{parentId},0,1);
|
||||
}
|
||||
$temp .= '</span>';
|
||||
return $temp;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output,$temp);
|
||||
$output = $_[0];
|
||||
$output =~ s/\^P\((.*?)\)\;/_replacement($1)/ge;
|
||||
$output =~ s/\^P\;/_replacement()/ge;
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^P(.*)\^\/P/) {
|
||||
$temp = '<span class="verticalMenu">';
|
||||
|
|
|
|||
33
lib/WebGUI/Macro/Question_search.pm
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
package WebGUI::Macro::Question_search;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# 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::Form;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Session;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp);
|
||||
$output = $_[0];
|
||||
$temp = '<form class="searchBox" method="post" action="'.$session{page}{url}.'">';
|
||||
$temp .= WebGUI::Form::hidden("op","search");
|
||||
$temp .= WebGUI::Form::text("keywords",10,100,$session{form}{keywords});
|
||||
$temp .= WebGUI::Form::submit(WebGUI::International::get(364));
|
||||
$temp .= '</form>';
|
||||
$output =~ s/\^\?\;/$temp/g;
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
|
||||
1;
|
||||
|
|
@ -18,22 +18,27 @@ use WebGUI::Session;
|
|||
use WebGUI::SQL;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp, @param, @data);
|
||||
$output = $_[0];
|
||||
while ($output =~ /\^S(.*?)\;/) {
|
||||
@param = WebGUI::Macro::getParams($1);
|
||||
if ($param[1] eq "") {
|
||||
$param[1] = 0;
|
||||
}
|
||||
@data = WebGUI::SQL->quickArray("select pageId,title,urlizedTitle from page where urlizedTitle='$param[0]'",$session{dbh});
|
||||
$temp = '<span class="verticalMenu">';
|
||||
if (defined $data[0] && WebGUI::Privilege::canViewPage($data[0])) {
|
||||
$temp .= traversePageTree($data[0],1,$param[1]);
|
||||
}
|
||||
$temp .= '</span>';
|
||||
$output =~ s/\^S(.*?)\;/$temp/;
|
||||
sub _replacement {
|
||||
my ($temp, @param, @data);
|
||||
@param = WebGUI::Macro::getParams($_[0]);
|
||||
if ($param[1] eq "") {
|
||||
$param[1] = 0;
|
||||
}
|
||||
@data = WebGUI::SQL->quickArray("select pageId,title,urlizedTitle from page where urlizedTitle='$param[0]'",$session{dbh});
|
||||
$temp = '<span class="verticalMenu">';
|
||||
if (defined $data[0] && WebGUI::Privilege::canViewPage($data[0])) {
|
||||
$temp .= traversePageTree($data[0],1,$param[1]);
|
||||
}
|
||||
$temp .= '</span>';
|
||||
return $temp;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output,$temp, @param, @data);
|
||||
$output = $_[0];
|
||||
$output =~ s/\^S\((.*?)\)\;/_replacement($1)/ge;
|
||||
$output =~ s/\^S\;/_replacement()/ge;
|
||||
#---everything below this line will go away in a later rev.
|
||||
my ($pageTitle, $depth);
|
||||
if ($output =~ /\^S(.*)\^\/S/) {
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ sub traversePageTree {
|
|||
while (@data = $sth->array) {
|
||||
if (WebGUI::Privilege::canViewPage($data[2])) {
|
||||
$output .= $depth.'<a class="verticalMenu" href="'.$session{env}{SCRIPT_NAME}.'/'.$data[0].'">'.$data[1].'</a><br>';
|
||||
$output .= traversePageTree($data[2],$_[1]+1,$_[2]);
|
||||
$output .= traversePageTree($data[2],$_[1]+1,$toLevel);
|
||||
}
|
||||
}
|
||||
$sth->finish;
|
||||
|
|
|
|||
27
lib/WebGUI/Macro/Slash_gatewayUrl.pm
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
package WebGUI::Macro::Slash_gatewayUrl;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# 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::Session;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output);
|
||||
$output = $_[0];
|
||||
$output =~ s/\^\/\;/$session{ENV}{SCRIPT_NAME}/g;
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
|
||||
1;
|
||||
|
||||
|
|
@ -15,18 +15,23 @@ use WebGUI::Macro;
|
|||
use WebGUI::Utility;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp, @param);
|
||||
$output = $_[0];
|
||||
while ($output =~ /\^\*(.*?)\;/) {
|
||||
@param = WebGUI::Macro::getParams($1);
|
||||
if ($param[0] ne "") {
|
||||
$temp = round(rand()*$1);
|
||||
} else {
|
||||
$temp = round(rand()*1000000000);
|
||||
}
|
||||
$output =~ s/\^\*(.*?)\;/$temp/;
|
||||
sub _replacement {
|
||||
my ($temp, @param);
|
||||
@param = WebGUI::Macro::getParams($_[0]);
|
||||
if ($param[0] ne "") {
|
||||
$temp = round(rand()*$1);
|
||||
} else {
|
||||
$temp = round(rand()*1000000000);
|
||||
}
|
||||
return $temp;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output,$temp);
|
||||
$output = $_[0];
|
||||
$output =~ s/\^\*\((.*?)\)\;/_replacement($1)/ge;
|
||||
$output =~ s/\^\*\;/_replacement()/ge;
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^\*(.*)\^\/\*/) {
|
||||
$temp = round(rand()*$1);
|
||||
|
|
|
|||
|
|
@ -15,20 +15,25 @@ use WebGUI::Macro;
|
|||
use WebGUI::Macro::Shared;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp, @param);
|
||||
$output = $_[0];
|
||||
while ($output =~ /\^T(.*?)\;/) {
|
||||
@param = WebGUI::Macro::getParams($1);
|
||||
$temp = '<span class="verticalMenu">';
|
||||
if ($param[0] ne "") {
|
||||
$temp .= traversePageTree(1,0,$param[0]);
|
||||
} else {
|
||||
$temp .= traversePageTree(1,0,1);
|
||||
}
|
||||
$temp .= '</span>';
|
||||
$output =~ s/\^T(.*?)\;/$temp/;
|
||||
sub _replacement {
|
||||
my ($temp, @param);
|
||||
@param = WebGUI::Macro::getParams($_[0]);
|
||||
$temp = '<span class="verticalMenu">';
|
||||
if ($param[0] ne "") {
|
||||
$temp .= traversePageTree(1,0,$param[0]);
|
||||
} else {
|
||||
$temp .= traversePageTree(1,0,1);
|
||||
}
|
||||
$temp .= '</span>';
|
||||
return $temp;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output,$temp);
|
||||
$output = $_[0];
|
||||
$output =~ s/\^T\((.*?)\)\;/_replacement($1)/ge;
|
||||
$output =~ s/\^T\;/_replacement()/ge;
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^T(.*)\^\/T/) {
|
||||
$temp = '<span class="verticalMenu">';
|
||||
|
|
|
|||
|
|
@ -16,20 +16,25 @@ use WebGUI::Macro;
|
|||
use WebGUI::Session;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp, @param);
|
||||
$output = $_[0];
|
||||
while ($output =~ /\^a(.*?)\;/) {
|
||||
@param = WebGUI::Macro::getParams($1);
|
||||
$temp = '<a class="myAccountLink" href="'.$session{page}{url}.'?op=displayAccount">';
|
||||
if ($param[0] ne "") {
|
||||
$temp .= $param[0];
|
||||
} else {
|
||||
$temp .= WebGUI::International::get(46);
|
||||
}
|
||||
$temp .= '</a>';
|
||||
$output =~ s/\^a(.*?)\;/$temp/;
|
||||
sub _replacement {
|
||||
my (@param, $temp);
|
||||
@param = WebGUI::Macro::getParams($_[0]);
|
||||
$temp = '<a class="myAccountLink" href="'.$session{page}{url}.'?op=displayAccount">';
|
||||
if ($param[0] ne "") {
|
||||
$temp .= $param[0];
|
||||
} else {
|
||||
$temp .= WebGUI::International::get(46);
|
||||
}
|
||||
$temp .= '</a>';
|
||||
return $temp;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp);
|
||||
$output = $_[0];
|
||||
$output =~ s/\^a\((.*?)\)\;/_replacement($1)/ge;
|
||||
$output =~ s/\^a\;/_replacement()/ge;
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^a(.*)\^\/a/) {
|
||||
$temp = '<a class="myAccountLink" href="'.$session{page}{url}.'?op=displayAccount">'.$1.'</a>';
|
||||
|
|
@ -43,3 +48,4 @@ sub process {
|
|||
|
||||
1;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -17,9 +17,7 @@ use WebGUI::Session;
|
|||
sub process {
|
||||
my ($output);
|
||||
$output = $_[0];
|
||||
while ($output =~ /\^c(.*?)\;/) {
|
||||
$output =~ s/\^c(.*?)\;/$session{setting}{companyName}/;
|
||||
}
|
||||
$output =~ s/\^c\;/$session{setting}{companyName}/g;
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^c/) {
|
||||
$output =~ s/\^c/$session{setting}{companyName}/g;
|
||||
|
|
|
|||
|
|
@ -17,9 +17,7 @@ use WebGUI::Session;
|
|||
sub process {
|
||||
my ($output);
|
||||
$output = $_[0];
|
||||
while ($output =~ /\^e(.*?)\;/) {
|
||||
$output =~ s/\^e(.*?)\;/$session{setting}{companyEmail}/;
|
||||
}
|
||||
$output =~ s/\^e\;/$session{setting}{companyEmail}/g;
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^e/) {
|
||||
$output =~ s/\^e/$session{setting}{companyEmail}/g;
|
||||
|
|
|
|||
|
|
@ -15,28 +15,32 @@ use WebGUI::Privilege;
|
|||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub _replacement {
|
||||
my ($temp, @data, $sth, $first);
|
||||
$temp = '<span class="horizontalMenu">';
|
||||
$first = 1;
|
||||
$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])) {
|
||||
if ($first) {
|
||||
$first = 0;
|
||||
} else {
|
||||
$temp .= " · ";
|
||||
}
|
||||
$temp .= '<a class="horizontalMenu" href="'.$session{env}{SCRIPT_NAME}.'/'.$data[1].'">'.$data[0].'</a>';
|
||||
}
|
||||
}
|
||||
$sth->finish;
|
||||
$temp .= '</span>';
|
||||
return $temp;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp, @data, $sth, $first);
|
||||
$output = $_[0];
|
||||
while ($output =~ /\^m(.*?)\;/) {
|
||||
$temp = '<span class="horizontalMenu">';
|
||||
$first = 1;
|
||||
$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])) {
|
||||
if ($first) {
|
||||
$first = 0;
|
||||
} else {
|
||||
$temp .= " · ";
|
||||
}
|
||||
$temp .= '<a class="horizontalMenu" href="'.$session{env}{SCRIPT_NAME}.'/'.$data[1].'">'.$data[0].'</a>';
|
||||
}
|
||||
}
|
||||
$sth->finish;
|
||||
$temp .= '</span>';
|
||||
$output =~ s/\^m(.*?)\;/$temp/;
|
||||
}
|
||||
$output =~ s/\^m\;/_replacement()/ge;
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^m/) {
|
||||
$temp = '<span class="horizontalMenu">';
|
||||
|
|
|
|||
|
|
@ -16,28 +16,32 @@ use WebGUI::Privilege;
|
|||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub _replacement {
|
||||
my ($temp, @data, $sth, $first);
|
||||
$temp = '<span class="horizontalMenu">';
|
||||
$first = 1;
|
||||
$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])) {
|
||||
if ($first) {
|
||||
$first = 0;
|
||||
} else {
|
||||
$temp .= " · ";
|
||||
}
|
||||
$temp .= '<a class="horizontalMenu" href="'.$session{env}{SCRIPT_NAME}.'/'.$data[1].'">'.$data[0].'</a>';
|
||||
}
|
||||
}
|
||||
$sth->finish;
|
||||
$temp .= '</span>';
|
||||
return $temp;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp, @data, $sth, $first);
|
||||
$output = $_[0];
|
||||
while ($output =~ /\^p(.*?)\;/) {
|
||||
$temp = '<span class="horizontalMenu">';
|
||||
$first = 1;
|
||||
$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])) {
|
||||
if ($first) {
|
||||
$first = 0;
|
||||
} else {
|
||||
$temp .= " · ";
|
||||
}
|
||||
$temp .= '<a class="horizontalMenu" href="'.$session{env}{SCRIPT_NAME}.'/'.$data[1].'">'.$data[0].'</a>';
|
||||
}
|
||||
}
|
||||
$sth->finish;
|
||||
$temp .= '</span>';
|
||||
$output =~ s/\^p(.*?)\;/$temp/;
|
||||
}
|
||||
$output =~ s/\^p\;/_replacement()/ge;
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^p/) {
|
||||
$temp = '<span class="horizontalMenu">';
|
||||
|
|
|
|||
|
|
@ -17,21 +17,26 @@ use WebGUI::Session;
|
|||
use WebGUI::Utility;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp, @param);
|
||||
$output = $_[0];
|
||||
while ($output =~ /\^r(.*?)\;/) {
|
||||
@param = WebGUI::Macro::getParams($1);
|
||||
$temp = appendToUrl($session{env}{REQUEST_URI},'makePrintable=1');
|
||||
$temp = '<a class="makePrintableLink" href="'.$temp.'">';
|
||||
if ($param[0] ne "") {
|
||||
$temp .= $param[0];
|
||||
} else {
|
||||
$temp .= WebGUI::International::get(53);
|
||||
}
|
||||
$temp .= '</a>';
|
||||
$output =~ s/\^r(.*?)\;/$temp/;
|
||||
sub _replacement {
|
||||
my ($temp, @param);
|
||||
@param = WebGUI::Macro::getParams($_[0]);
|
||||
$temp = appendToUrl($session{env}{REQUEST_URI},'makePrintable=1');
|
||||
$temp = '<a class="makePrintableLink" href="'.$temp.'">';
|
||||
if ($param[0] ne "") {
|
||||
$temp .= $param[0];
|
||||
} else {
|
||||
$temp .= WebGUI::International::get(53);
|
||||
}
|
||||
$temp .= '</a>';
|
||||
return $temp;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp);
|
||||
$output = $_[0];
|
||||
$output =~ s/\^r\((.*?)\)\;/_replacement($1)/ge;
|
||||
$output =~ s/\^r\;/_replacement()/ge;
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^r(.*)\^\/r/) {
|
||||
$temp = appendToUrl($session{env}{REQUEST_URI},'makePrintable=1');
|
||||
|
|
|
|||
|
|
@ -17,29 +17,34 @@ use WebGUI::Session;
|
|||
use WebGUI::SQL;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp, @data, $pageTitle, $parentId, $sth, $first);
|
||||
$output = $_[0];
|
||||
while ($output =~ /\^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 .= " · ";
|
||||
}
|
||||
$temp .= '<a class="horizontalMenu" href="'.$session{env}{SCRIPT_NAME}.'/'.$data[1].'">'.$data[0].'</a>';
|
||||
sub _replacement {
|
||||
my ($temp, @data, $pageTitle, $parentId, $sth, $first);
|
||||
$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 .= " · ";
|
||||
}
|
||||
$temp .= '<a class="horizontalMenu" href="'.$session{env}{SCRIPT_NAME}.'/'.$data[1].'">'.$data[0].'</a>';
|
||||
}
|
||||
$sth->finish;
|
||||
$temp .= '</span>';
|
||||
$output =~ s/\^s(.*?)\;/$temp/;
|
||||
}
|
||||
$sth->finish;
|
||||
$temp .= '</span>';
|
||||
return $temp;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output,@data, $pageTitle, $parentId, $sth, $first, $temp);
|
||||
$output = $_[0];
|
||||
$output =~ s/\^s\((.*?)\)\;/_replacement($1)/ge;
|
||||
$output =~ s/\^s\;/_replacement()/ge;
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^s(.*)\^\/s/) {
|
||||
$pageTitle = $1;
|
||||
|
|
|
|||
|
|
@ -15,28 +15,32 @@ use WebGUI::Privilege;
|
|||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub _replacement {
|
||||
my ($temp, @data, $sth, $first);
|
||||
$temp = '<span class="horizontalMenu">';
|
||||
$first = 1;
|
||||
$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])) {
|
||||
if ($first) {
|
||||
$first = 0;
|
||||
} else {
|
||||
$temp .= " · ";
|
||||
}
|
||||
$temp .= '<a class="horizontalMenu" href="'.$session{env}{SCRIPT_NAME}.'/'.$data[1].'">'.$data[0].'</a>';
|
||||
}
|
||||
}
|
||||
$sth->finish;
|
||||
$temp .= '</span>';
|
||||
return $temp;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp, @data, $sth, $first);
|
||||
$output = $_[0];
|
||||
while ($output =~ /\^t(.*?)\;/) {
|
||||
$temp = '<span class="horizontalMenu">';
|
||||
$first = 1;
|
||||
$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])) {
|
||||
if ($first) {
|
||||
$first = 0;
|
||||
} else {
|
||||
$temp .= " · ";
|
||||
}
|
||||
$temp .= '<a class="horizontalMenu" href="'.$session{env}{SCRIPT_NAME}.'/'.$data[1].'">'.$data[0].'</a>';
|
||||
}
|
||||
}
|
||||
$sth->finish;
|
||||
$temp .= '</span>';
|
||||
$output =~ s/\^t(.*?)\;/$temp/;
|
||||
}
|
||||
$output =~ s/\^t\;/_replacement()/ge;
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^t/) {
|
||||
$temp = '<span class="horizontalMenu">';
|
||||
|
|
|
|||
|
|
@ -15,11 +15,9 @@ use WebGUI::Session;
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp, @data, $sth, $first);
|
||||
my ($output);
|
||||
$output = $_[0];
|
||||
while ($output =~ /\^u(.*?)\;/) {
|
||||
$output =~ s/\^u(.*?)\;/$session{setting}{companyURL}/;
|
||||
}
|
||||
$output =~ s/\^u\;/$session{setting}{companyURL}/g;
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^u/) {
|
||||
$output =~ s/\^u/$session{setting}{companyURL}/g;
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ use WebGUI::Operation::Admin;
|
|||
use WebGUI::Operation::Group;
|
||||
use WebGUI::Operation::Help;
|
||||
use WebGUI::Operation::Page;
|
||||
use WebGUI::Operation::Search;
|
||||
use WebGUI::Operation::Settings;
|
||||
use WebGUI::Operation::Statistics;
|
||||
use WebGUI::Operation::Style;
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ use WebGUI::International;
|
|||
use WebGUI::Privilege;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
use WebGUI::Template;
|
||||
use WebGUI::Utility;
|
||||
|
||||
our @ISA = qw(Exporter);
|
||||
|
|
@ -57,7 +58,8 @@ sub _reorderPages {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_addPage {
|
||||
my ($output);
|
||||
my ($output, @array, %hash);
|
||||
tie %hash, "Tie::IxHash";
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=1&namespace=WebGUI"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a>';
|
||||
$output .= '<h1>'.WebGUI::International::get(98).'</h1>';
|
||||
|
|
@ -65,6 +67,10 @@ sub www_addPage {
|
|||
$output .= WebGUI::Form::hidden("op","addPageSave");
|
||||
$output .= '<table>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(99).'</td><td>'.WebGUI::Form::text("title",20,128,$session{form}{title}).'</td></tr>';
|
||||
%hash = sortHash(WebGUI::Template::getList());
|
||||
$array[0] = "Default";
|
||||
$output .= '<script language="JavaScript"> function updateTemplateImage(template) { document.template.src = "'.$session{setting}{lib}.'/templates/"+template+".gif"; } </script>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(356).'</td><td>'.WebGUI::Form::selectList("template",\%hash, \@array, 1, 0, "updateTemplateImage(this.form.template.value)").'<br><img src="'.$session{setting}{lib}.'/templates/Default.gif" name="template"></td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(100).'</td><td>'.WebGUI::Form::textArea("metaTags",$session{form}{metaTags}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(307).'</td><td>'.WebGUI::Form::checkbox("defaultMetaTags",1,1).'</td></tr>';
|
||||
$output .= '<tr><td></td><td>'.WebGUI::Form::submit(WebGUI::International::get(62)).'</td></tr>';
|
||||
|
|
@ -84,7 +90,7 @@ sub www_addPageSave {
|
|||
while (($test) = WebGUI::SQL->quickArray("select urlizedTitle from page where urlizedTitle='$urlizedTitle'",$session{dbh})) {
|
||||
$urlizedTitle .= 2;
|
||||
}
|
||||
WebGUI::SQL->write("insert into page values (".getNextId("pageId").", $session{page}{pageId}, ".quote($session{form}{title}).", $session{page}{styleId}, $session{user}{userId}, $session{page}{ownerView}, $session{page}{ownerEdit}, $session{page}{groupId}, $session{page}{groupView}, $session{page}{groupEdit}, $session{page}{worldView}, $session{page}{worldEdit}, '$nextSeq', ".quote($session{form}{metaTags}).", '$urlizedTitle', '$session{form}{defaultMetaTags}')",$session{dbh});
|
||||
WebGUI::SQL->write("insert into page values (".getNextId("pageId").", $session{page}{pageId}, ".quote($session{form}{title}).", $session{page}{styleId}, $session{user}{userId}, $session{page}{ownerView}, $session{page}{ownerEdit}, $session{page}{groupId}, $session{page}{groupView}, $session{page}{groupEdit}, $session{page}{worldView}, $session{page}{worldEdit}, '$nextSeq', ".quote($session{form}{metaTags}).", '$urlizedTitle', '$session{form}{defaultMetaTags}', '$session{form}{template}')",$session{dbh});
|
||||
return "";
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
|
|
@ -150,6 +156,10 @@ sub www_editPage {
|
|||
$output .= '<tr><td colspan=2><b>'.WebGUI::International::get(103).'</b></td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(99).'</td><td>'.WebGUI::Form::text("title",20,128,$session{page}{title}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(104).'</td><td>'.WebGUI::Form::text("urlizedTitle",20,128,$session{page}{urlizedTitle}).'</td></tr>';
|
||||
%hash = sortHash(WebGUI::Template::getList());
|
||||
$array[0] = $session{page}{template};
|
||||
$output .= '<script language="JavaScript"> function updateTemplateImage(template) { document.template.src = "'.$session{setting}{lib}.'/templates/"+template+".gif"; } </script>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(356).'</td><td>'.WebGUI::Form::selectList("template",\%hash,\@array,1,0,"updateTemplateImage(this.form.template.value)").'<br><img src="'.$session{setting}{lib}.'/templates/'.$session{page}{template}.'.gif" name="template"></td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(100).'</td><td>'.WebGUI::Form::textArea("metaTags",$session{page}{metaTags}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(307).'</td><td>'.WebGUI::Form::checkbox("defaultMetaTags",1,$session{page}{defaultMetaTags}).'</td></tr>';
|
||||
$output .= '<tr><td colspan=2><hr size=1><b>'.WebGUI::International::get(105).'</b></td></tr>';
|
||||
|
|
@ -193,7 +203,7 @@ sub www_editPageSave {
|
|||
while (($test) = WebGUI::SQL->quickArray("select urlizedTitle from page where urlizedTitle='$urlizedTitle' and pageId<>$session{page}{pageId}",$session{dbh})) {
|
||||
$urlizedTitle .= 2;
|
||||
}
|
||||
WebGUI::SQL->write("update page set title=".quote($session{form}{title}).", styleId=$session{form}{styleId}, ownerId=$session{form}{ownerId}, ownerView=$session{form}{ownerView}, ownerEdit=$session{form}{ownerEdit}, groupId='$session{form}{groupId}', groupView=$session{form}{groupView}, groupEdit=$session{form}{groupEdit}, worldView=$session{form}{worldView}, worldEdit=$session{form}{worldEdit}, metaTags=".quote($session{form}{metaTags}).", urlizedTitle='$urlizedTitle', defaultMetaTags='$session{form}{defaultMetaTags}' where pageId=$session{page}{pageId}",$session{dbh});
|
||||
WebGUI::SQL->write("update page set title=".quote($session{form}{title}).", styleId=$session{form}{styleId}, ownerId=$session{form}{ownerId}, ownerView=$session{form}{ownerView}, ownerEdit=$session{form}{ownerEdit}, groupId='$session{form}{groupId}', groupView=$session{form}{groupView}, groupEdit=$session{form}{groupEdit}, worldView=$session{form}{worldView}, worldEdit=$session{form}{worldEdit}, metaTags=".quote($session{form}{metaTags}).", urlizedTitle='$urlizedTitle', defaultMetaTags='$session{form}{defaultMetaTags}', template='$session{form}{template}' where pageId=$session{page}{pageId}",$session{dbh});
|
||||
if ($session{form}{recurseStyle} eq "yes") {
|
||||
_recursivelyChangeStyle($session{page}{pageId});
|
||||
}
|
||||
|
|
|
|||
84
lib/WebGUI/Operation/Search.pm
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
package WebGUI::Operation::Search;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# 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 Exporter;
|
||||
use strict;
|
||||
use Tie::IxHash;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Privilege;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
use WebGUI::Utility;
|
||||
|
||||
our @ISA = qw(Exporter);
|
||||
our @EXPORT = qw(&www_search);
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_search {
|
||||
my ($dataRows, $prevNextBar, $output, %page, @keyword, $pageId, $term, %result, $sth, @data, @row, $i);
|
||||
tie %result,'Tie::IxHash';
|
||||
$output = '<form method="post" action="'.$session{page}{url}.'">';
|
||||
$output .= WebGUI::Form::hidden("op","search");
|
||||
$output .= WebGUI::Form::text("keywords",40,100,$session{form}{keywords});
|
||||
$output .= WebGUI::Form::submit(WebGUI::International::get(364));
|
||||
$output .= '</form>';
|
||||
if ($session{form}{keywords} ne "") {
|
||||
@keyword = split(" ",$session{form}{keywords});
|
||||
foreach $term (@keyword) {
|
||||
$sth = WebGUI::SQL->read("select pageId from page where title like '%".$term."%' and pageId > 25",$session{dbh});
|
||||
while (@data = $sth->array) {
|
||||
$result{$data[0]} += 5;
|
||||
}
|
||||
$sth->finish;
|
||||
$sth = WebGUI::SQL->read("select pageId from page where metaTags like '%".$term."%' and pageId > 25",$session{dbh});
|
||||
while (@data = $sth->array) {
|
||||
$result{$data[0]} += 1;
|
||||
}
|
||||
$sth->finish;
|
||||
$sth = WebGUI::SQL->read("select pageId from widget where title like '%".$term."%' and pageId > 25",$session{dbh});
|
||||
while (@data = $sth->array) {
|
||||
$result{$data[0]} += 5;
|
||||
}
|
||||
$sth->finish;
|
||||
$sth = WebGUI::SQL->read("select pageId from widget where description like '%".$term."%' and pageId > 25",$session{dbh});
|
||||
while (@data = $sth->array) {
|
||||
$result{$data[0]} += 2;
|
||||
}
|
||||
$sth->finish;
|
||||
$sth = WebGUI::SQL->read("select widget.pageId from Article,widget where Article.widgetId=widget.widgetId and Article.body like '%".$term."%'",$session{dbh});
|
||||
while (@data = $sth->array) {
|
||||
$result{$data[0]} += 2;
|
||||
}
|
||||
$sth->finish;
|
||||
%result = sortHashDescending(%result);
|
||||
foreach $pageId (keys %result) {
|
||||
%page = WebGUI::SQL->quickHash("select pageId, title, urlizedTitle from page where pageId=$pageId",$session{dbh});
|
||||
$row[$i] = '<li><a href="'.$session{ENV}{SCRIPT_NAME}.'/'.$page{urlizedTitle}.'">'.$page{title}.'</a>';
|
||||
$i++;
|
||||
}
|
||||
if ($row[0] ne "") {
|
||||
($dataRows, $prevNextBar) = paginate(20,$session{page}{url}.'?op=search',\@row);
|
||||
$output .= WebGUI::International::get(365).'<p><ul>';
|
||||
$output .= $dataRows;
|
||||
$output .= '</ul>'.$prevNextBar;
|
||||
} else {
|
||||
$output .= WebGUI::International::get(366);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
|
||||
1;
|
||||
|
||||
|
|
@ -98,7 +98,20 @@ sub quickHash {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub read {
|
||||
return WebGUI::SQL->new($_[1],$_[2]);
|
||||
return WebGUI::SQL->new($_[1],$_[2],$_[3]);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub rows {
|
||||
return $_[0]->{_sth}->rows;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub unconditionalRead {
|
||||
my ($sth);
|
||||
$sth = $_[2]->prepare($_[1]);
|
||||
$sth->execute;
|
||||
bless ({_sth => $sth}, $_[0]);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
68
lib/WebGUI/Template.pm
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
package WebGUI::Template;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# 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 qw(vars subs);
|
||||
use Tie::IxHash;
|
||||
use WebGUI::ErrorHandler;
|
||||
use WebGUI::Session;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub calculatePositions {
|
||||
my (%positions, $string);
|
||||
$string = "A";
|
||||
$positions{A} = "A";
|
||||
while ($string ne $_[0]) {
|
||||
$string = ++$string;
|
||||
$positions{$string} = $string;
|
||||
}
|
||||
return %positions;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getList {
|
||||
my (@files, $file, $namespace, $cmd, %list, $templateDir);
|
||||
if ($^O =~ /Win/i) {
|
||||
$templateDir = "\\lib\\WebGUI\\Template";
|
||||
} else {
|
||||
$templateDir = "/lib/WebGUI/Template";
|
||||
}
|
||||
opendir (DIR,$session{config}{webguiRoot}.$templateDir) or WebGUI::ErrorHandler::fatalError("Can't open template directory!");
|
||||
@files = readdir(DIR);
|
||||
foreach $file (@files) {
|
||||
if ($file ne "." && $file ne ".." && $file =~ /\.pm/) {
|
||||
$file =~ s/\.pm//;
|
||||
$cmd = "require WebGUI::Template::".$file;
|
||||
eval($cmd);
|
||||
$cmd = "WebGUI::Template::".$file."::namespace";
|
||||
$namespace = $$cmd;
|
||||
$cmd = "WebGUI::Template::".$file."::name";
|
||||
$list{$namespace} = &$cmd();
|
||||
}
|
||||
}
|
||||
closedir(DIR);
|
||||
return %list;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getPositions {
|
||||
my ($cmd, %hash);
|
||||
tie %hash, "Tie::IxHash";
|
||||
$cmd = "require WebGUI::Template::".$_[0];
|
||||
eval($cmd);
|
||||
$cmd = "WebGUI::Template::".$_[0]."::getPositions";
|
||||
%hash = &$cmd;
|
||||
return %hash;
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
||||
42
lib/WebGUI/Template/Default.pm
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
package WebGUI::Template::Default;
|
||||
|
||||
our $namespace = "Default";
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# 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::International;
|
||||
use WebGUI::Template;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub generate {
|
||||
my ($output, $content);
|
||||
$content = $_[0];
|
||||
$output = '<table cellpadding="0" cellspacing="0" border="0" width="100%">';
|
||||
$output .= '<tr><td valign="top" class="content">';
|
||||
$output .= ${$content}{A};
|
||||
$output .= '</td></tr></table>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub name {
|
||||
return WebGUI::International::get(355);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getPositions {
|
||||
return WebGUI::Template::calculatePositions('A');
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
44
lib/WebGUI/Template/LeftColumn.pm
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
package WebGUI::Template::LeftColumn;
|
||||
|
||||
our $namespace = "LeftColumn";
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# 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::International;
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub generate {
|
||||
my ($output, $content);
|
||||
$content = $_[0];
|
||||
$output = '<table cellpadding="3" cellspacing="0" border="0" width="100%">';
|
||||
$output .= '<tr><td valign="top" class="content" width="34%">';
|
||||
$output .= ${$content}{A};
|
||||
$output .= '</td><td valign="top" class="content" width="66%">';
|
||||
$output .= ${$content}{B};
|
||||
$output .= '</td></tr></table>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub name {
|
||||
return WebGUI::International::get(358);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getPositions {
|
||||
return WebGUI::Template::calculatePositions('B');
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
44
lib/WebGUI/Template/News.pm
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
package WebGUI::Template::News;
|
||||
|
||||
our $namespace = "News";
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# 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::International;
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub generate {
|
||||
my ($output, $content);
|
||||
$content = $_[0];
|
||||
$output = '<table cellpadding="3" cellspacing="0" border="0" width="100%"><tr>';
|
||||
$output .= '<td valign="top" class="content" colspan="2" width="100%">'.${$content}{A}.'</td></tr><tr>';
|
||||
$output .= '<td valign="top" class="content" width="50%">'.${$content}{B}.'</td>';
|
||||
$output .= '<td valign="top" class="content" width="50%">'.${$content}{C}.'</td>';
|
||||
$output .= '</tr><tr><td valign="top" class="content" colspan="2" width="100%">'.${$content}{D}.'</td></tr>';
|
||||
$output .= '</table>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub name {
|
||||
return WebGUI::International::get(357);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getPositions {
|
||||
return WebGUI::Template::calculatePositions('D');
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
46
lib/WebGUI/Template/OneOverThree.pm
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
package WebGUI::Template::OneOverThree;
|
||||
|
||||
our $namespace = "OneOverThree";
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# 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::International;
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub generate {
|
||||
my ($output, $content);
|
||||
$content = $_[0];
|
||||
$output = '<table cellpadding="3" cellspacing="0" border="0" width="100%">';
|
||||
$output .= '<tr><td valign="top" class="content" colspan="3">';
|
||||
$output .= ${$content}{A};
|
||||
$output .= '</td></tr><tr>';
|
||||
$output .= '<td valign="top" class="content" width="33%">'.${$content}{B}.'</td>';
|
||||
$output .= '<td valign="top" class="content" width="34%">'.${$content}{C}.'</td>';
|
||||
$output .= '<td valign="top" class="content" width="33%">'.${$content}{D}.'</td>';
|
||||
$output .= '</tr></table>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub name {
|
||||
return WebGUI::International::get(360);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getPositions {
|
||||
return WebGUI::Template::calculatePositions('D');
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
45
lib/WebGUI/Template/RightColumn.pm
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
package WebGUI::Template::RightColumn;
|
||||
|
||||
our $namespace = "RightColumn";
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# 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::International;
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub generate {
|
||||
my ($output, $content);
|
||||
$content = $_[0];
|
||||
$output = '<table cellpadding="3" cellspacing="0" border="0" width="100%">';
|
||||
$output .= '<tr><td valign="top" class="content" width="66%">';
|
||||
$output .= ${$content}{A};
|
||||
$output .= '</td><td valign="top" class="content" width="34%">';
|
||||
$output .= ${$content}{B};
|
||||
$output .= '</td></tr></table>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub name {
|
||||
return WebGUI::International::get(359);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getPositions {
|
||||
return WebGUI::Template::calculatePositions('B');
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
||||
44
lib/WebGUI/Template/SideBySide.pm
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
package WebGUI::Template::SideBySide;
|
||||
|
||||
our $namespace = "SideBySide";
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# 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::International;
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub generate {
|
||||
my ($output, $content);
|
||||
$content = $_[0];
|
||||
$output = '<table cellpadding="3" cellspacing="0" border="0" width="100%">';
|
||||
$output .= '<tr><td valign="top" class="content" width="50%">';
|
||||
$output .= ${$content}{A};
|
||||
$output .= '</td><td valign="top" class="content" width="50%">';
|
||||
$output .= ${$content}{B};
|
||||
$output .= '</td></tr></table>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub name {
|
||||
return WebGUI::International::get(362);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getPositions {
|
||||
return WebGUI::Template::calculatePositions('B');
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
44
lib/WebGUI/Template/ThreeOverOne.pm
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
package WebGUI::Template::ThreeOverOne;
|
||||
|
||||
our $namespace = "ThreeOverOne";
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# 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::International;
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub generate {
|
||||
my ($output, $content);
|
||||
$content = $_[0];
|
||||
$output = '<table cellpadding="3" cellspacing="0" border="0" width="100%"><tr>';
|
||||
$output .= '<td valign="top" class="content" width="33%">'.${$content}{A}.'</td>';
|
||||
$output .= '<td valign="top" class="content" width="34%">'.${$content}{B}.'</td>';
|
||||
$output .= '<td valign="top" class="content" width="33%">'.${$content}{C}.'</td>';
|
||||
$output .= '</tr><tr><td valign="top" class="content" colspan="3">'.${$content}{D}.'</td></tr>';
|
||||
$output .= '</table>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub name {
|
||||
return WebGUI::International::get(361);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getPositions {
|
||||
return WebGUI::Template::calculatePositions('D');
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
|
|
@ -14,12 +14,13 @@ use CGI;
|
|||
use Exporter;
|
||||
use FileHandle;
|
||||
use strict;
|
||||
use Tie::IxHash;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
|
||||
our @ISA = qw(Exporter);
|
||||
our @EXPORT = qw(&paginate &appendToUrl &randint &getNextId &saveAttachment &round &urlize "e);
|
||||
our @EXPORT = qw(&sortHashDescending &sortHash &paginate &appendToUrl &randint &getNextId &saveAttachment &round &urlize "e);
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub appendToUrl {
|
||||
|
|
@ -111,8 +112,8 @@ sub saveAttachment {
|
|||
mkdir ($path,0755);
|
||||
}
|
||||
$file = FileHandle->new(">".$path.$urlizedFilename);
|
||||
binmode $file;
|
||||
if (defined $file) {
|
||||
binmode $file;
|
||||
while ($bytesread=read($filename,$buffer,1024)) {
|
||||
print $file $buffer;
|
||||
}
|
||||
|
|
@ -126,6 +127,36 @@ sub saveAttachment {
|
|||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub sortHash {
|
||||
my (%hash, %reversedHash, %newHash, $key);
|
||||
tie %hash, "Tie::IxHash";
|
||||
tie %reversedHash, "Tie::IxHash";
|
||||
tie %newHash, "Tie::IxHash";
|
||||
%hash = @_;
|
||||
%reversedHash = reverse %hash;
|
||||
foreach $key (sort {$b cmp $a} keys %reversedHash) {
|
||||
$newHash{$key}=$reversedHash{$key};
|
||||
}
|
||||
%reversedHash = reverse %newHash;
|
||||
return %reversedHash;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub sortHashDescending {
|
||||
my (%hash, %reversedHash, %newHash, $key);
|
||||
tie %hash, "Tie::IxHash";
|
||||
tie %reversedHash, "Tie::IxHash";
|
||||
tie %newHash, "Tie::IxHash";
|
||||
%hash = @_;
|
||||
%reversedHash = reverse %hash;
|
||||
foreach $key (sort {$a cmp $b} keys %reversedHash) {
|
||||
$newHash{$key}=$reversedHash{$key};
|
||||
}
|
||||
%reversedHash = reverse %newHash;
|
||||
return %reversedHash;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub urlize {
|
||||
my ($title);
|
||||
|
|
|
|||
|
|
@ -13,10 +13,12 @@ package WebGUI::Widget;
|
|||
use CGI::Carp qw(fatalsToBrowser);
|
||||
use DBI;
|
||||
use Exporter;
|
||||
use strict;
|
||||
use strict qw(subs vars);
|
||||
use Tie::IxHash;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
use WebGUI::Template;
|
||||
use WebGUI::Utility;
|
||||
|
||||
our @ISA = qw(Exporter);
|
||||
|
|
@ -25,7 +27,7 @@ our @EXPORT = qw(&purgeWidget &www_jumpDown &www_jumpUp &update &www_moveUp &www
|
|||
#-------------------------------------------------------------------
|
||||
sub _reorderWidgets {
|
||||
my ($sth, $i, $wid);
|
||||
$sth = WebGUI::SQL->read("select widgetId from widget where pageId=$_[0] order by sequenceNumber",$session{dbh});
|
||||
$sth = WebGUI::SQL->read("select widgetId from widget where pageId=$_[0] order by position,sequenceNumber",$session{dbh});
|
||||
while (($wid) = $sth->array) {
|
||||
$i++;
|
||||
WebGUI::SQL->write("update widget set sequenceNumber='$i' where widgetId=$wid",$session{dbh});
|
||||
|
|
@ -38,13 +40,21 @@ sub create {
|
|||
my ($widgetId, $nextSeq);
|
||||
$widgetId = getNextId("widgetId");
|
||||
($nextSeq) = WebGUI::SQL->quickArray("select max(sequenceNumber)+1 from widget where pageId=$session{page}{pageId}",$session{dbh});
|
||||
WebGUI::SQL->write("insert into widget values ($widgetId, $session{page}{pageId}, '$session{form}{widget}', '$nextSeq', ".quote($session{form}{title}).", '$session{form}{displayTitle}', ".quote($session{form}{description}).", '$session{form}{processMacros}', ".time().", '$session{user}{userId}', 0, 0)",$session{dbh});
|
||||
WebGUI::SQL->write("insert into widget values ($widgetId, $session{page}{pageId}, '$session{form}{widget}', '$nextSeq', ".quote($session{form}{title}).", '$session{form}{displayTitle}', ".quote($session{form}{description}).", '$session{form}{processMacros}', ".time().", '$session{user}{userId}', 0, 0, '$session{form}{position}')",$session{dbh});
|
||||
return $widgetId;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getPositions {
|
||||
my (%hash);
|
||||
tie %hash, "Tie::IxHash";
|
||||
%hash = WebGUI::Template::getPositions($session{page}{template});
|
||||
return %hash;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub update {
|
||||
WebGUI::SQL->write("update widget set title=".quote($session{form}{title}).", displayTitle='$session{form}{displayTitle}', description=".quote($session{form}{description}).", processMacros='$session{form}{processMacros}', lastEdited=".time().", editedBy='$session{user}{userId}' where widgetId=$session{form}{wid}",$session{dbh});
|
||||
WebGUI::SQL->write("update widget set title=".quote($session{form}{title}).", displayTitle='$session{form}{displayTitle}', description=".quote($session{form}{description}).", processMacros='$session{form}{processMacros}', lastEdited=".time().", editedBy='$session{user}{userId}', position='$session{form}{position}' where widgetId=$session{form}{wid}",$session{dbh});
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -126,6 +136,7 @@ sub www_moveDown {
|
|||
if ($data[0] ne "") {
|
||||
WebGUI::SQL->write("update widget set sequenceNumber=sequenceNumber+1 where widgetId=$session{form}{wid}",$session{dbh});
|
||||
WebGUI::SQL->write("update widget set sequenceNumber=sequenceNumber-1 where widgetId=$data[0]",$session{dbh});
|
||||
_reorderWidgets($session{page}{pageId});
|
||||
}
|
||||
return "";
|
||||
} else {
|
||||
|
|
@ -142,6 +153,7 @@ sub www_moveUp {
|
|||
if ($data[0] ne "") {
|
||||
WebGUI::SQL->write("update widget set sequenceNumber=sequenceNumber-1 where widgetId=$session{form}{wid}",$session{dbh});
|
||||
WebGUI::SQL->write("update widget set sequenceNumber=sequenceNumber+1 where widgetId=$data[0]",$session{dbh});
|
||||
_reorderWidgets($session{page}{pageId});
|
||||
}
|
||||
return "";
|
||||
} else {
|
||||
|
|
@ -155,6 +167,7 @@ sub www_paste {
|
|||
if (WebGUI::Privilege::canEditPage()) {
|
||||
($nextSeq) = WebGUI::SQL->quickArray("select max(sequenceNumber)+1 from widget where pageId=$session{page}{pageId}",$session{dbh});
|
||||
WebGUI::SQL->write("update widget set pageId=$session{page}{pageId}, sequenceNumber='$nextSeq' where widgetId=$session{form}{wid}",$session{dbh});
|
||||
_reorderWidgets($session{page}{pageId});
|
||||
return "";
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
|
|
|
|||
|
|
@ -36,7 +36,8 @@ sub widgetName {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_add {
|
||||
my ($output);
|
||||
my ($output, %hash);
|
||||
tie %hash, "Tie::IxHash";
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=1&namespace='.$namespace.'"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a>';
|
||||
$output .= '<h1>'.WebGUI::International::get(173).'</h1>';
|
||||
|
|
@ -47,6 +48,8 @@ sub www_add {
|
|||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(99).'</td><td>'.WebGUI::Form::text("title",20,128,'Article').'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(174).'</td><td>'.WebGUI::Form::checkbox("displayTitle",1,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(175).'</td><td>'.WebGUI::Form::checkbox("processMacros",1,1).'</td></tr>';
|
||||
%hash = WebGUI::Widget::getPositions();
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(363).'</td><td>'.WebGUI::Form::selectList("position",\%hash).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(176).'</td><td>'.WebGUI::Form::text("startDate",20,30,epochToSet(time()),1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(177).'</td><td>'.WebGUI::Form::text("endDate",20,30,'01/01/2037',1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(178).'</td><td>'.WebGUI::Form::textArea("body",'',50,10,1).'</td></tr>';
|
||||
|
|
@ -100,7 +103,8 @@ sub www_deleteImage {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_edit {
|
||||
my ($output, %article);
|
||||
my ($output, %article, %hash, @array);
|
||||
tie %hash, 'Tie::IxHash';
|
||||
tie %article, 'Tie::CPHash';
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
%article = WebGUI::SQL->quickHash("select * from widget,Article where widget.widgetId=Article.widgetId and widget.widgetId=$session{form}{wid}",$session{dbh});
|
||||
|
|
@ -113,6 +117,9 @@ sub www_edit {
|
|||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(99).'</td><td>'.WebGUI::Form::text("title",20,128,$article{title}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(174).'</td><td>'.WebGUI::Form::checkbox("displayTitle","1",$article{displayTitle}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(175).'</td><td>'.WebGUI::Form::checkbox("processMacros","1",$article{processMacros}).'</td></tr>';
|
||||
%hash = WebGUI::Widget::getPositions();
|
||||
$array[0] = $article{position};
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(363).'</td><td>'.WebGUI::Form::selectList("position",\%hash,\@array).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(176).'</td><td>'.WebGUI::Form::text("startDate",20,30,epochToSet($article{startDate}),1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(177).'</td><td>'.WebGUI::Form::text("endDate",20,30,epochToSet($article{endDate}),1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(178).'</td><td>'.WebGUI::Form::textArea("body",$article{body},50,10,1).'</td></tr>';
|
||||
|
|
|
|||
|
|
@ -37,7 +37,8 @@ sub widgetName {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_add {
|
||||
my ($output);
|
||||
my ($output, %hash);
|
||||
tie %hash, "Tie::IxHash";
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=1&namespace='.$namespace.'"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a>';
|
||||
$output .= '<h1>'.WebGUI::International::get(188).'</h1>';
|
||||
|
|
@ -48,7 +49,9 @@ sub www_add {
|
|||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(99).'</td><td>'.WebGUI::Form::text("title",20,128,'Events Calendar').'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(174).'</td><td>'.WebGUI::Form::checkbox("displayTitle",1,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(175).'</td><td>'.WebGUI::Form::checkbox("processMacros",1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</td><td>'.WebGUI::Form::textArea("description").'</td></tr>';
|
||||
%hash = WebGUI::Widget::getPositions();
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(363).'</td><td>'.WebGUI::Form::selectList("position",\%hash).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</td><td>'.WebGUI::Form::textArea("description",'',50,5,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(1,$namespace).'</td><td>'.WebGUI::Form::checkbox("proceed",1,1).'</td></tr>';
|
||||
$output .= '<tr><td></td><td>'.WebGUI::Form::submit(WebGUI::International::get(62)).'</td></tr>';
|
||||
$output .= '</table></form>';
|
||||
|
|
@ -176,7 +179,8 @@ sub www_deleteEventConfirm {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_edit {
|
||||
my ($output, %data, @event, $sth);
|
||||
my ($output, %data, @event, $sth, %hash, @array);
|
||||
tie %hash, 'Tie::IxHash';
|
||||
tie %data, 'Tie::CPHash';
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
%data = WebGUI::SQL->quickHash("select * from widget where widget.widgetId=$session{form}{wid}",$session{dbh});
|
||||
|
|
@ -189,7 +193,10 @@ sub www_edit {
|
|||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(99).'</td><td>'.WebGUI::Form::text("title",20,128,$data{title}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(174).'</td><td>'.WebGUI::Form::checkbox("displayTitle",1,$data{displayTitle}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(175).'</td><td>'.WebGUI::Form::checkbox("processMacros",1,$data{processMacros}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</td><td>'.WebGUI::Form::textArea("description",$data{description}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</td><td>'.WebGUI::Form::textArea("description",$data{description},50,5,1).'</td></tr>';
|
||||
%hash = WebGUI::Widget::getPositions();
|
||||
$array[0] = $data{position};
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(363).'</td><td>'.WebGUI::Form::selectList("position",\%hash,\@array).'</td></tr>';
|
||||
$output .= '<tr><td></td><td>'.WebGUI::Form::submit(WebGUI::International::get(62)).'</td></tr>';
|
||||
$output .= '</table></form>';
|
||||
$output .= '<p><a href="'.$session{page}{url}.'?func=addEvent&wid='.$session{form}{wid}.'">Add New Event</a><p>';
|
||||
|
|
|
|||
|
|
@ -34,7 +34,8 @@ sub widgetName {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_add {
|
||||
my ($output);
|
||||
my ($output, %hash);
|
||||
tie %hash, 'Tie::IxHash';
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=1&namespace='.$namespace.'"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a>';
|
||||
$output .= '<h1>'.WebGUI::International::get(200).'</h1>';
|
||||
|
|
@ -43,6 +44,8 @@ sub www_add {
|
|||
$output .= WebGUI::Form::hidden("func","addSave");
|
||||
$output .= WebGUI::Form::hidden("title","column");
|
||||
$output .= '<table>';
|
||||
%hash = WebGUI::Widget::getPositions();
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(363).'</td><td>'.WebGUI::Form::selectList("position",\%hash).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(201).'</td><td>'.WebGUI::Form::text("spacer",20,3,10).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(202).'</td><td>'.WebGUI::Form::text("width",20,3,200).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(203).'</td><td>'.WebGUI::Form::text("class",20,50,"content").'</td></tr>';
|
||||
|
|
@ -69,10 +72,11 @@ sub www_addSave {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_edit {
|
||||
my ($output, %data);
|
||||
my ($output, %data, %hash, @array);
|
||||
tie %hash, 'Tie::IxHash';
|
||||
tie %data, 'Tie::CPHash';
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
%data = WebGUI::SQL->quickHash("select * from ExtraColumn where widgetId=$session{form}{wid}",$session{dbh});
|
||||
%data = WebGUI::SQL->quickHash("select * from widget,ExtraColumn where widget.widgetId=$session{form}{wid} and widget.widgetId=ExtraColumn.widgetId",$session{dbh});
|
||||
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=1&namespace='.$namespace.'"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a>';
|
||||
$output .= '<h1>'.WebGUI::International::get(204).'</h1>';
|
||||
$output .= '<form method="post" action="'.$session{page}{url}.'">';
|
||||
|
|
@ -80,6 +84,9 @@ sub www_edit {
|
|||
$output .= WebGUI::Form::hidden("func","editSave");
|
||||
$output .= WebGUI::Form::hidden("title","column");
|
||||
$output .= '<table>';
|
||||
%hash = WebGUI::Widget::getPositions();
|
||||
$array[0] = $data{position};
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(363).'</td><td>'.WebGUI::Form::selectList("position",\%hash,\@array).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(201).'</td><td>'.WebGUI::Form::text("spacer",20,3,$data{spacer}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(202).'</td><td>'.WebGUI::Form::text("width",20,3,$data{width}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(203).'</td><td>'.WebGUI::Form::text("class",20,50,$data{class}).'</td></tr>';
|
||||
|
|
|
|||
|
|
@ -47,10 +47,11 @@ sub widgetName {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_add {
|
||||
my ($output);
|
||||
my ($output, %hash);
|
||||
tie %hash, 'Tie::IxHash';
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=1&namespace='.$namespace.'"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a>';
|
||||
$output = '<h1>'.WebGUI::International::get(206).'</h1>';
|
||||
$output .= '<h1>'.WebGUI::International::get(206).'</h1>';
|
||||
$output .= '<form method="post" enctype="multipart/form-data" action="'.$session{page}{url}.'">';
|
||||
$output .= WebGUI::Form::hidden("widget",$namespace);
|
||||
$output .= WebGUI::Form::hidden("func","addSave");
|
||||
|
|
@ -58,6 +59,8 @@ sub www_add {
|
|||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(99).'</td><td>'.WebGUI::Form::text("title",20,128,'F.A.Q.').'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(174).'</td><td>'.WebGUI::Form::checkbox("displayTitle",1,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(175).'</td><td>'.WebGUI::Form::checkbox("processMacros",1).'</td></tr>';
|
||||
%hash = WebGUI::Widget::getPositions();
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(363).'</td><td>'.WebGUI::Form::selectList("position",\%hash).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</td><td>'.WebGUI::Form::textArea("description",'','','',1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(1,$namespace).'</td><td>'.WebGUI::Form::checkbox("proceed",1,1).'</td></tr>';
|
||||
$output .= '<tr><td></td><td>'.WebGUI::Form::submit(WebGUI::International::get(62)).'</td></tr>';
|
||||
|
|
@ -147,8 +150,9 @@ sub www_deleteQuestionConfirm {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_edit {
|
||||
my ($output, %data, @question, $sth);
|
||||
my ($output, %hash, @array, %data, @question, $sth);
|
||||
tie %data, 'Tie::CPHash';
|
||||
tie %hash, 'Tie::IxHash';
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
%data = WebGUI::SQL->quickHash("select * from widget where widget.widgetId=$session{form}{wid}",$session{dbh});
|
||||
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=1&namespace='.$namespace.'"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a>';
|
||||
|
|
@ -160,6 +164,9 @@ sub www_edit {
|
|||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(99).'</td><td>'.WebGUI::Form::text("title",20,128,$data{title}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(174).'</td><td>'.WebGUI::Form::checkbox("displayTitle","1",$data{displayTitle}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(175).'</td><td>'.WebGUI::Form::checkbox("processMacros","1",$data{processMacros}).'</td></tr>';
|
||||
%hash = WebGUI::Widget::getPositions();
|
||||
$array[0] = $data{position};
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(363).'</td><td>'.WebGUI::Form::selectList("position",\%hash,\@array).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</td><td>'.WebGUI::Form::textArea("description",$data{description},'','',1).'</td></tr>';
|
||||
$output .= '<tr><td></td><td>'.WebGUI::Form::submit(WebGUI::International::get(62)).'</td></tr>';
|
||||
$output .= '</table></form>';
|
||||
|
|
|
|||
|
|
@ -47,7 +47,8 @@ sub widgetName {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_add {
|
||||
my ($output);
|
||||
my ($output, %hash);
|
||||
tie %hash, 'Tie::IxHash';
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=1&namespace='.$namespace.'"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a>';
|
||||
$output .= '<h1>'.WebGUI::International::get(219).'</h1>';
|
||||
|
|
@ -58,7 +59,9 @@ sub www_add {
|
|||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(99).'</td><td>'.WebGUI::Form::text("title",20,128,'Link List').'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(174).'</td><td>'.WebGUI::Form::checkbox("displayTitle",1,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(175).'</td><td>'.WebGUI::Form::checkbox("processMacros",1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</td><td>'.WebGUI::Form::textArea("description").'</td></tr>';
|
||||
%hash = WebGUI::Widget::getPositions();
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(363).'</td><td>'.WebGUI::Form::selectList("position",\%hash).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</td><td>'.WebGUI::Form::textArea("description",'',50,5,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(1,$namespace).'</td><td>'.WebGUI::Form::text("indent",20,2,0).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(2,$namespace).'</td><td>'.WebGUI::Form::text("lineSpacing",20,1,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(4,$namespace).'</td><td>'.WebGUI::Form::text("bullet",20,255,'·').'</td></tr>';
|
||||
|
|
@ -152,8 +155,9 @@ sub www_deleteLinkConfirm {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_edit {
|
||||
my ($output, %data, @link, $sth);
|
||||
my ($output, %hash, @array, %data, @link, $sth);
|
||||
tie %data, 'Tie::CPHash';
|
||||
tie %hash, 'Tie::IxHash';
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
%data = WebGUI::SQL->quickHash("select * from widget,LinkList where widget.widgetId=$session{form}{wid} and widget.widgetId=LinkList.widgetId",$session{dbh});
|
||||
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=1&namespace='.$namespace.'"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a>';
|
||||
|
|
@ -165,7 +169,10 @@ sub www_edit {
|
|||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(99).'</td><td>'.WebGUI::Form::text("title",20,128,$data{title}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(174).'</td><td>'.WebGUI::Form::checkbox("displayTitle",1,$data{displayTitle}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(175).'</td><td>'.WebGUI::Form::checkbox("processMacros",1,$data{processMacros}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</td><td>'.WebGUI::Form::textArea("description",$data{description}).'</td></tr>';
|
||||
%hash = WebGUI::Widget::getPositions();
|
||||
$array[0] = $data{position};
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(363).'</td><td>'.WebGUI::Form::selectList("position",\%hash,\@array).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</td><td>'.WebGUI::Form::textArea("description",$data{description},50,5,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(1,$namespace).'</td><td>'.WebGUI::Form::text("indent",20,2,$data{indent}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(2,$namespace).'</td><td>'.WebGUI::Form::text("lineSpacing",20,1,$data{lineSpacing}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(4,$namespace).'</td><td>'.WebGUI::Form::text("bullet",20,255,$data{bullet}).'</td></tr>';
|
||||
|
|
|
|||
|
|
@ -58,7 +58,9 @@ sub www_add {
|
|||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(99).'</td><td>'.WebGUI::Form::text("title",20,128,'Message Board').'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(174).'</td><td>'.WebGUI::Form::checkbox("displayTitle",1,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(175).'</td><td>'.WebGUI::Form::checkbox("processMacros",1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</td><td>'.WebGUI::Form::textArea("description",'').'</td></tr>';
|
||||
%hash = WebGUI::Widget::getPositions();
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(363).'</td><td>'.WebGUI::Form::selectList("position",\%hash).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</td><td>'.WebGUI::Form::textArea("description",'',50,5,1).'</td></tr>';
|
||||
%hash = WebGUI::SQL->buildHash("select groupId,groupName from groups where groupName<>'Reserved' order by groupName",$session{dbh});
|
||||
$array[0] = 2;
|
||||
$output .= '<tr><td class="formDescription" valign="top">'.WebGUI::International::get(224).'</td><td>'.WebGUI::Form::selectList("groupToPost",\%hash,\@array).'</td></tr>';
|
||||
|
|
@ -101,7 +103,10 @@ sub www_edit {
|
|||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(99).'</td><td>'.WebGUI::Form::text("title",20,128,$board{title}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(174).'</td><td>'.WebGUI::Form::checkbox("displayTitle","1",$board{displayTitle}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(175).'</td><td>'.WebGUI::Form::checkbox("processMacros","1",$board{processMacros}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</td><td>'.WebGUI::Form::textArea("description",$board{description}).'</td></tr>';
|
||||
%hash = WebGUI::Widget::getPositions();
|
||||
$array[0] = $board{position};
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(363).'</td><td>'.WebGUI::Form::selectList("position",\%hash,\@array).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</td><td>'.WebGUI::Form::textArea("description",$board{description},50,5,1).'</td></tr>';
|
||||
%hash = WebGUI::SQL->buildHash("select groupId,groupName from groups where groupName<>'Reserved' order by groupName",$session{dbh});
|
||||
$array[0] = $board{groupToPost};
|
||||
$output .= '<tr><td class="formDescription" valign="top">'.WebGUI::International::get(224).'</td><td>'.WebGUI::Form::selectList("groupToPost",\%hash,\@array,1).'</td></tr>';
|
||||
|
|
|
|||
|
|
@ -106,7 +106,9 @@ sub www_add {
|
|||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(99).'</td><td>'.WebGUI::Form::text("title",20,128,'Poll').'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(174).'</td><td>'.WebGUI::Form::checkbox("displayTitle",1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(175).'</td><td>'.WebGUI::Form::checkbox("processMacros",1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</td><td>'.WebGUI::Form::textArea("description",'').'</td></tr>';
|
||||
%hash = WebGUI::Widget::getPositions();
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(363).'</td><td>'.WebGUI::Form::selectList("position",\%hash).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</td><td>'.WebGUI::Form::textArea("description",'',50,5,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(252).'</td><td>'.WebGUI::Form::checkbox("active",1,1).'</td></tr>';
|
||||
%hash = WebGUI::SQL->buildHash("select groupId,groupName from groups where groupName<>'Reserved' order by groupName",$session{dbh});
|
||||
$array[0] = 1;
|
||||
|
|
@ -152,7 +154,10 @@ sub www_edit {
|
|||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(99).'</td><td>'.WebGUI::Form::text("title",20,128,$data{title}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(174).'</td><td>'.WebGUI::Form::checkbox("displayTitle",1,$data{displayTitle}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(175).'</td><td>'.WebGUI::Form::checkbox("processMacros",1,$data{processMacros}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</td><td>'.WebGUI::Form::textArea("description",$data{description}).'</td></tr>';
|
||||
%hash = WebGUI::Widget::getPositions();
|
||||
$array[0] = $data{position};
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(363).'</td><td>'.WebGUI::Form::selectList("position",\%hash,\@array).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</td><td>'.WebGUI::Form::textArea("description",$data{description},50,5,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(252).'</td><td>'.WebGUI::Form::checkbox("active",1,$data{active}).'</td></tr>';
|
||||
%hash = WebGUI::SQL->buildHash("select groupId,groupName from groups where groupName<>'Reserved' order by groupName",$session{dbh});
|
||||
$array[0] = $data{voteGroup};
|
||||
|
|
|
|||
|
|
@ -35,7 +35,8 @@ sub widgetName {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_add {
|
||||
my ($output);
|
||||
my ($output, %hash);
|
||||
tie %hash, 'Tie::IxHash';
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=1&namespace='.$namespace.'"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a>';
|
||||
$output .= '<h1>'.WebGUI::International::get(260).'</h1>';
|
||||
|
|
@ -46,6 +47,8 @@ sub www_add {
|
|||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(99).'</td><td>'.WebGUI::Form::text("title",20,128,'SQL Report').'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(174).'</td><td>'.WebGUI::Form::checkbox("displayTitle",1,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(175).'</td><td>'.WebGUI::Form::checkbox("processMacros",1,1).'</td></tr>';
|
||||
%hash = WebGUI::Widget::getPositions();
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(363).'</td><td>'.WebGUI::Form::selectList("position",\%hash).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</td><td>'.WebGUI::Form::textArea("description",'','','',1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(261).'</td><td>'.WebGUI::Form::textArea("template",'','','',1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(262).'</td><td>'.WebGUI::Form::textArea("dbQuery",'').'</td></tr>';
|
||||
|
|
@ -76,8 +79,9 @@ sub www_addSave {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_edit {
|
||||
my ($output, %data);
|
||||
my ($output, %data, %hash, @array);
|
||||
tie %data, 'Tie::CPHash';
|
||||
tie %hash, 'Tie::IxHash';
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
%data = WebGUI::SQL->quickHash("select * from widget,SQLReport where widget.widgetId=$session{form}{wid} and widget.widgetId=SQLReport.widgetId",$session{dbh});
|
||||
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=1&namespace='.$namespace.'"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a>';
|
||||
|
|
@ -89,6 +93,9 @@ sub www_edit {
|
|||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(99).'</td><td>'.WebGUI::Form::text("title",20,128,$data{title}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(174).'</td><td>'.WebGUI::Form::checkbox("displayTitle","1",$data{displayTitle}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(175).'</td><td>'.WebGUI::Form::checkbox("processMacros","1",$data{processMacros}).'</td></tr>';
|
||||
%hash = WebGUI::Widget::getPositions();
|
||||
$array[0] = $data{position};
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(363).'</td><td>'.WebGUI::Form::selectList("position",\%hash,\@array).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</td><td>'.WebGUI::Form::textArea("description",$data{description},50,10,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(261).'</td><td>'.WebGUI::Form::textArea("template",$data{template},50,10,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Query</td><td>'.WebGUI::Form::textArea("dbQuery",$data{dbQuery},50,10,1).'</td></tr>';
|
||||
|
|
@ -118,7 +125,7 @@ sub www_editSave {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_view {
|
||||
my (%data, $output, $widgetId, $sth, $dbh, @result, @template, $temp);
|
||||
my ($ouch, %data, $output, $widgetId, $sth, $dbh, @result, @template, $temp);
|
||||
tie %data, 'Tie::CPHash';
|
||||
$widgetId = shift;
|
||||
%data = WebGUI::SQL->quickHash("select * from widget,SQLReport where widget.widgetId=$widgetId and widget.widgetId=SQLReport.widgetId",$session{dbh});
|
||||
|
|
@ -139,12 +146,12 @@ sub www_view {
|
|||
}
|
||||
if (defined $dbh) {
|
||||
if ($data{dbQuery} =~ /select/i) {
|
||||
$sth = WebGUI::SQL->read($data{dbQuery},$dbh);
|
||||
$sth = WebGUI::SQL->unconditionalRead($data{dbQuery},$dbh);
|
||||
} else {
|
||||
$output .= WebGUI::International::get(268).'<p>';
|
||||
WebGUI::ErrorHandler::warn("SQLReport [$widgetId] The SQL query is improperly formatted.");
|
||||
}
|
||||
if (defined $sth) {
|
||||
if ($sth->rows > 0) {
|
||||
while (@result = $sth->array) {
|
||||
$temp = $template[1];
|
||||
$temp =~ s/\^(\d)\;/$result[$1]/g;
|
||||
|
|
|
|||
|
|
@ -63,7 +63,8 @@ sub widgetName {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_add {
|
||||
my ($output);
|
||||
my ($output, %hash);
|
||||
tie %hash, 'Tie::IxHash';
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=1&namespace='.$namespace.'"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a>';
|
||||
$output .= '<h1>'.WebGUI::International::get(1,$namespace).'</h1>';
|
||||
|
|
@ -74,7 +75,9 @@ sub www_add {
|
|||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(99).'</td><td>'.WebGUI::Form::text("title",20,128,'Site Map').'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(174).'</td><td>'.WebGUI::Form::checkbox("displayTitle",1,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(175).'</td><td>'.WebGUI::Form::checkbox("processMacros",1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</td><td>'.WebGUI::Form::textArea("description",'').'</td></tr>';
|
||||
%hash = WebGUI::Widget::getPositions();
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(363).'</td><td>'.WebGUI::Form::selectList("position",\%hash).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</td><td>'.WebGUI::Form::textArea("description",'',50,5,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(3,$namespace).'</td><td>'.WebGUI::Form::checkbox("startAtThisLevel",1,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(4,$namespace).'</td><td>'.WebGUI::Form::text("depth",20,2,0).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(6,$namespace).'</td><td>'.WebGUI::Form::text("indent",20,2,5).'</td></tr>';
|
||||
|
|
@ -103,8 +106,9 @@ sub www_addSave {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_edit {
|
||||
my ($output, %data);
|
||||
my ($output, %data, %hash, @array);
|
||||
tie %data, 'Tie::CPHash';
|
||||
tie %hash, 'Tie::IxHash';
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
%data = WebGUI::SQL->quickHash("select * from widget,SiteMap where widget.widgetId=SiteMap.widgetId and widget.widgetId=$session{form}{wid}",$session{dbh});
|
||||
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=1&namespace='.$namespace.'"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a>';
|
||||
|
|
@ -116,7 +120,10 @@ sub www_edit {
|
|||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(99).'</td><td>'.WebGUI::Form::text("title",20,128,$data{title}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(174).'</td><td>'.WebGUI::Form::checkbox("displayTitle",1,$data{displayTitle}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(175).'</td><td>'.WebGUI::Form::checkbox("processMacros",1,$data{processMacros}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</td><td>'.WebGUI::Form::textArea("description",$data{description}).'</td></tr>';
|
||||
%hash = WebGUI::Widget::getPositions();
|
||||
$array[0] = $data{position};
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(363).'</td><td>'.WebGUI::Form::selectList("position",\%hash,\@array).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</td><td>'.WebGUI::Form::textArea("description",$data{description},50,5,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(3,$namespace).'</td><td>'.WebGUI::Form::checkbox("startAtThisLevel",1,$data{startAtThisLevel}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(4,$namespace).'</td><td>'.WebGUI::Form::text("depth",20,2,$data{depth}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(6,$namespace).'</td><td>'.WebGUI::Form::text("indent",20,2,$data{indent}).'</td></tr>';
|
||||
|
|
|
|||
|
|
@ -36,7 +36,8 @@ sub widgetName {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_add {
|
||||
my ($output);
|
||||
my ($output, %hash);
|
||||
tie %hash, 'Tie::IxHash';
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=1&namespace='.$namespace.'"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a>';
|
||||
$output .= '<h1>'.WebGUI::International::get(272).'</h1>';
|
||||
|
|
@ -47,6 +48,8 @@ sub www_add {
|
|||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(99).'</td><td>'.WebGUI::Form::text("title",20,128,'Syndicated Content').'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(174).'</td><td>'.WebGUI::Form::checkbox("displayTitle",1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(175).'</td><td>'.WebGUI::Form::checkbox("processMacros",1).'</td></tr>';
|
||||
%hash = WebGUI::Widget::getPositions();
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(363).'</td><td>'.WebGUI::Form::selectList("position",\%hash).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</td><td>'.WebGUI::Form::textArea("description",'','','',1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(273).'</td><td>'.WebGUI::Form::text("rssUrl",20,2048).'</td></tr>';
|
||||
$output .= '<tr><td></td><td>'.WebGUI::Form::submit(WebGUI::International::get(62)).'</td></tr>';
|
||||
|
|
@ -72,8 +75,9 @@ sub www_addSave {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_edit {
|
||||
my ($output, %data);
|
||||
my ($output, %data, %hash, @array);
|
||||
tie %data, 'Tie::CPHash';
|
||||
tie %hash, 'Tie::IxHash';
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
%data = WebGUI::SQL->quickHash("select * from widget,SyndicatedContent where widget.widgetId=$session{form}{wid}",$session{dbh});
|
||||
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=1&namespace='.$namespace.'"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a>';
|
||||
|
|
@ -85,6 +89,9 @@ sub www_edit {
|
|||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(99).'</td><td>'.WebGUI::Form::text("title",20,128,$data{title}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(174).'</td><td>'.WebGUI::Form::checkbox("displayTitle","1",$data{displayTitle}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(175).'</td><td>'.WebGUI::Form::checkbox("processMacros","1",$data{processMacros}).'</td></tr>';
|
||||
%hash = WebGUI::Widget::getPositions();
|
||||
$array[0] = $data{position};
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(363).'</td><td>'.WebGUI::Form::selectList("position",\%hash,\@array).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</td><td>'.WebGUI::Form::textArea("description",$data{description},50,10,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(273).'</td><td>'.WebGUI::Form::text("rssUrl",20,2048,$data{rssUrl}).'</td></tr>';
|
||||
$output .= '<tr><td></td><td>'.WebGUI::Form::submit("save").'</td></tr>';
|
||||
|
|
|
|||
|
|
@ -51,6 +51,8 @@ sub www_add {
|
|||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(99).'</td><td>'.WebGUI::Form::text("title",20,128,'User Submission System').'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(174).'</td><td>'.WebGUI::Form::checkbox("displayTitle",1,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(175).'</td><td>'.WebGUI::Form::checkbox("processMacros",1).'</td></tr>';
|
||||
%hash = WebGUI::Widget::getPositions();
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(363).'</td><td>'.WebGUI::Form::selectList("position",\%hash).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</td><td>'.WebGUI::Form::textArea("description",'',50,5,1).'</td></tr>';
|
||||
%hash = WebGUI::SQL->buildHash("select groupId,groupName from groups where groupName<>'Reserved' order by groupName",$session{dbh});
|
||||
$array[0] = 4;
|
||||
|
|
@ -233,6 +235,9 @@ sub www_edit {
|
|||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(99).'</td><td>'.WebGUI::Form::text("title",20,128,$data{title}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(174).'</td><td>'.WebGUI::Form::checkbox("displayTitle","1",$data{displayTitle}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(175).'</td><td>'.WebGUI::Form::checkbox("processMacros","1",$data{processMacros}).'</td></tr>';
|
||||
%hash = WebGUI::Widget::getPositions();
|
||||
$array[0] = $data{position};
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(363).'</td><td>'.WebGUI::Form::selectList("position",\%hash,\@array).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</td><td>'.WebGUI::Form::textArea("description",$data{description}).'</td></tr>';
|
||||
$array[0] = $data{groupToApprove};
|
||||
%hash = WebGUI::SQL->buildHash("select groupId,groupName from groups where groupName<>'Reserved' order by groupName",$session{dbh});
|
||||
|
|
|
|||
|
|
@ -180,8 +180,7 @@ if (eval { require Net::LDAP }) {
|
|||
|
||||
# this is here to insure they installed correctly.
|
||||
print "WebGUI modules:\t\t";
|
||||
#if (eval { require WebGUI } && eval { require WebGUI::SQL }) {
|
||||
if (eval { require WebGUI::SQL }) {
|
||||
if (eval { require WebGUI } && eval { require WebGUI::SQL }) {
|
||||
print "OK\n";
|
||||
} else {
|
||||
print "Please install.\n";
|
||||
|
|
|
|||
BIN
www/extras/templates/Default.gif
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
www/extras/templates/LeftColumn.gif
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
www/extras/templates/News.gif
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
www/extras/templates/OneOverThree.gif
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
www/extras/templates/RightColumn.gif
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
www/extras/templates/SideBySide.gif
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
www/extras/templates/ThreeOverOne.gif
Normal file
|
After Width: | Height: | Size: 1.4 KiB |