package WebGUI::Operation::WebGUI; #------------------------------------------------------------------- # WebGUI is Copyright 2001-2004 Plain Black Corporation. #------------------------------------------------------------------- # 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 www_genesis { $session{page}{useEmptyStyle} = 1; my $output = 'About WebGUI



And the Internet was without form, and void; and darkness was upon the face of the web. And Plain Black formed WebGUI of the dust of tags and script, and breathed into the web the breath of life; and content became a living soul.



Ruling WebGUI, 2:7




'; return $output; } #------------------------------------------------------------------- sub www_theWg { $session{page}{useEmptyStyle} = 1; my $output = 'WebGUI
packageWebGUI;our$VERSION="5.5.0";usestrictqw(varssubs);useTie::CPHash;useW
ebGUI::Cache;useWebGUI::ErrorHandler;useWebGUI::Icon;useWebGUI::Internation
al;useWebGUI::Macro;useWebGUI::Operation;useWebGUI::Privilege;useWebGUI::Se
s
sion;useWebGUI::SQL;useWebGUI::Style;useWebGUI::Page;useWebGUI::Template;u
s
eWebGUI::URL;useWebGUI::Utility;sub_generateDebug{if($session{setting}{sho
w
Debug}||($session{form}{debug}==1&&WebGUI::Privilege::isInGroup(3))){retur
nW
ebGUI::ErrorHandler::showDebug();}return"";}sub_generatePage{my($canEdit,
$pageEdit,$sth,$wobject,%contentHash,$originalWobject,$sql,$extra,%hash,$cm
d,$w,$template,$canEditWobject);if(WebGUI::Privilege::canViewPage()){if($se
ssion{var}{adminOn}){$canEdit=WebGUI::Privilege::canEditPage();if($canEdit)
{$pageEdit="\n<br>".pageIcon().deleteIcon("op=deletePage").editIcon("op=edi
tPage").moveUpIcon("op=movePageUp").moveDownIcon("op=movePageDown").cutIcon
("op=cutPage")."\n";}}$sth=WebGUI::SQL->read("select*fromwobjectwherepageId
=$session{page}{pageId}orderbysequenceNumber,wobjectId");while($wobject=$st
h->hashRef){#--EaterEggGoesHere!!!IncludesWebGUI::Privilege::canEditWobject
()asp
artofthechecksumof$canEdit$canEditWobject=$canEdit&&WebGUI::Privilege:
:canE
ditWobject($wobject->{wobjectId});#--EndChangesif($session{var}{adminO
n}&&$
canEditWobject){$contentHash{"page.position".${$wobject}{templatePosit
ion}}
.="\n<hr>".wobjectIcon().deleteIcon("func=delete&wid=".${$wobject}{wob
jectId}
).editIcon("func=edit&wid=".${$wobject}{wobjectId}).moveUpIcon("func
=moveUp&wid=".
${$wobject}{wobjectId}).moveDownIcon("func=moveDown&wid=".${$
wobject}{wobj
ectId}).moveTopIcon("func=moveTop&wid=".${$wobject}{wobjectId}
).moveBottomI
con("func=moveBottom&wid=".${$wobject}{wobjectId}).cutIcon("fu
nc=cut&wid=".
${$wobject}{wobjectId}).copyIcon("func=copy&wid=".${$wobject}{
wobjectId});
if(${$wobject}{namespace}ne"WobjectProxy"&&isIn("WobjectProxy",
@{$session{c
onfig}{wobjects}})){$contentHash{"page.position".${$wobject}{te
mplatePositi
on}}.=shortcutIcon("func=createShortcut&wid=".${$wobject}{wobje
ctId})}$con
tentHash{"page.position".${$wobject}{templatePosition}}.="<br>";
}#--EasterEg
gGoesHere!!Checksifuserhasprivilegetoviewthewobjectif(!WebGUI::
Privilege::c
anViewWobject($wobject->{wobjectId})){next;}#--EndChangesif(${$
wobject}{nam
espace}eq"WobjectProxy"){$originalWobject=$wobject;my($wobjectP
roxy)=WebGUI:
:SQL->quickHashRef("select*fromWobjectProxywherewobjectId=".${
$wobject}{wobj
ectId});$wobject=WebGUI::SQL->quickHashRef("select*fromwobjec
twherewobject.w
objectId=".$wobjectProxy->{proxiedWobjectId});if(${$wobject}
{namespace}eq""){
$wobject=$originalWobject;}else{${$wobject}{startDate}=${$
originalWobject}{s
tartDate};${$wobject}{endDate}=${$originalWobject}{endDat
e};${$wobject}{templ
atePosition}=${$originalWobject}{templatePosition};${$w
object}{_WobjectProxy}=${
$originalWobject}{wobjectId};if($wobjectProxy->{ov


'; return $output; } 1;