package WebGUI::Operation::Root; #------------------------------------------------------------------- # WebGUI is Copyright 2001-2002 Plain Black LLC. #------------------------------------------------------------------- # 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::CPHash; use WebGUI::Icon; use WebGUI::International; use WebGUI::Paginator; use WebGUI::Privilege; use WebGUI::Session; use WebGUI::SQL; use WebGUI::URL; our @ISA = qw(Exporter); our @EXPORT = qw(&www_listRoots); #------------------------------------------------------------------- sub www_listRoots { my ($output, $p, $sth, %data, @row, $i); if (WebGUI::Privilege::isInGroup(3)) { $output = helpIcon(28); $output .= '

'.WebGUI::International::get(408).'

'; $output .= '
'.WebGUI::International::get(409).'
'; $output .= ''; $sth = WebGUI::SQL->read("select * from page where title<>'Reserved' and parentId=0 order by title"); while (%data = $sth->hash) { $row[$i] = ''; $row[$i] .= ''; $row[$i] .= ''; $i++; } $sth->finish; $p = WebGUI::Paginator->new(WebGUI::URL::page('op=listRoots'),\@row); $output .= '
'. ''. ''. ''. ''. ''. ''. ''. ''. ''.$data{title}.''.$data{urlizedTitle}.'
'; $output .= $p->getPage($session{form}{pn}); $output .= '
'; $output .= $p->getBarTraditional($session{form}{pn}); return $output; } else { return WebGUI::Privilege::adminOnly(); } } 1;