Initial revision

This commit is contained in:
JT Smith 2002-05-02 15:54:48 +00:00
parent bb66c11a6a
commit 01e11d7871
41 changed files with 5420 additions and 3155 deletions

File diff suppressed because one or more lines are too long

View file

@ -2952,7 +2952,7 @@ INSERT INTO widget VALUES (-1,4,'SiteMap',0,'Page Not Found',1,'The page you wer
insert into international values (438,'WebGUI','English','Your Name');
insert into webguiVersion values ('3.6.4','intitial install',unix_timestamp());
insert into webguiVersion values ('3.6.5','intitial install',unix_timestamp());
INSERT INTO help VALUES (1,'WebGUI','English','Add/Edit','Page','Think of pages as containers for content. For instance, if you want to write a letter to the editor of your favorite magazine you\'d get out a notepad (or open a word processor) and start filling it with your thoughts. The same is true with WebGUI. Create a page, then add your content to the page.\r\n<p>\r\n<b>Title</b><br>\r\nThe title of the page is what your users will use to navigate through the site. Titles should be descriptive, but not very long.\r\n<p>\r\n<b>Menu Title</b><br>\r\nA shorter or altered title to appear in navigation. If left blank this will default to <i>Title</i>.\r\n<p>\r\n<b>Page URL</b><br>\r\nWhen you create a page a URL for the page is generated based on the page title. If you are unhappy with the URL that was chosen, you can change it here.\r\n<p>\r\n<b>Template</b><br>\r\nBy default, WebGUI has one big content area to place widgets. However, by specifying a template other than the default you can sub-divide the content area into several sections.\r\n<p>\r\n<b>Synopsis</b><br>\r\nA short description of a page. It is used to populate default descriptive meta tags as well as to provide descriptions on Site Maps.\r\n<p>\r\n<b>Meta Tags</b><br>\r\nMeta tags are used by some search engines to associate key words to a particular page. There is a great site called <a href=\"http://www.metatagbuilder.com/\">Meta Tag Builder</a> that will help you build meta tags if you\'ve never done it before.\r\n<p>\r\n<i>Advanced Users:</i> If you have other things (like JavaScript) you usually put in the &lt;head&gt; area of your pages, you may put them here as well.\r\n<p>\r\n<b>Use default meta tags?</b><br>\r\nIf you don\'t wish to specify meta tags yourself, WebGUI can generate meta tags based on the page title and your company\'s name. Check this box to enable the WebGUI-generated meta tags.\r\n<p>\r\n<b>Style</b><br>\r\nBy default, when you create a page, it inherits a few traits from its parent. One of those traits is style. Choose from the list of styles if you would like to change the appearance of this page. See <i>Add Style</i> for more details.\r\n<p>\r\nIf you check the box below the style pull-down menu, all of the pages below this page will take on the style you\'ve chosen for this page.\r\n<p>\r\n<b>Owner</b><br>\r\nThe owner of a page is usually the person who created the page.\r\n<p>\r\n<b>Owner can view?</b><br>\r\nCan the owner view the page or not?\r\n<p>\r\n<b>Owner can edit?</b><br>\r\nCan the owner edit the page or not? Be careful, if you decide that the owner cannot edit the page and you do not belong to the page group, then you\'ll lose the ability to edit this page.\r\n<p>\r\n<b>Group</b><br>\r\nA group is assigned to every page for additional privilege control. Pick a group from the pull-down menu.\r\n<p>\r\n<b>Group can view?</b><br>\r\nCan members of this group view this page?\r\n<p>\r\n<b>Group can edit?</b><br>\r\nCan members of this group edit this page?\r\n<p>\r\n<b>Anybody can view?</b><br>\r\nCan any visitor or member regardless of the group and owner view this page?\r\n<p>\r\n<b>Anybody can edit?</b><br>\r\nCan any visitor or member regardless of the group and owner edit this page?\r\n<p>\r\nYou can optionally give these privileges to all pages under this page.\r\n','0');
INSERT INTO help VALUES (3,'WebGUI','English','Delete','Page','Deleting a page can create a big mess if you are uncertain about what you are doing. When you delete a page you are also deleting the content it contains, all sub-pages connected to this page, and all the content they contain. Be certain that you have already moved all the content you wish to keep before you delete a page.\r\n<p>\r\nAs with any delete operation, you are prompted to be sure you wish to proceed with the delete. If you answer yes, the delete will proceed and there is no recovery possible. If you answer no you\'ll be returned to the prior screen.','0');

View file

@ -0,0 +1,151 @@
#!/usr/bin/perl
#-------------------------------------------------------------------
# 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
#-------------------------------------------------------------------
BEGIN {
unshift (@INC, "../lib");
}
use Data::Config;
use DBI;
use strict;
use WebGUI::DateTime;
use WebGUI::SQL;
my ($dbh, $config, $sth, @data);
if ($ARGV[0] ne "--GO") {
print <<EOF;
Due to the large number of database changes in this release, we
decided it best to write a program to migrate your data rather than
simply giving you the standard upgrade_xxx-xxx.sql script that we
usually produce. This is a one time change to accomodate data
structures that better fit with databases that are not MySQL.
If you're ready to begin the upgrade type:
perl upgrade_1.1.0-1.2.0.pl --GO
Thanks for your support and patience.
-- Plain Black Software
EOF
exit;
}
print "\nWebGUI is upgrading your database tables...\n\n";
print "Reading config:\t\t";
if (eval{$config = new Data::Config '../etc/WebGUI.conf'}) {
print "OK\n";
print "Connecting to DB:\t";
if (eval{$dbh = DBI->connect($config->param('dsn'), $config->param('dbuser'), $config->param('dbpass'))}) {
print "OK\n";
print "Renaming tables:\t";
WebGUI::SQL->write("alter table user rename users",$dbh);
print "Done\n";
print "Creating new columns:\t";
WebGUI::SQL->write("alter table Article add column startDate_upgrade int after startDate",$dbh);
WebGUI::SQL->write("alter table Article add column endDate_upgrade int after endDate",$dbh);
WebGUI::SQL->write("alter table SyndicatedContent add column lastFetched_upgrade int after lastFetched",$dbh);
WebGUI::SQL->write("alter table event add column startDate_upgrade int after startDate",$dbh);
WebGUI::SQL->write("alter table event add column endDate_upgrade int after endDate",$dbh);
WebGUI::SQL->write("alter table message add column dateOfPost_upgrade int after dateOfPost",$dbh);
WebGUI::SQL->write("alter table session add column expires_upgrade int after expires",$dbh);
WebGUI::SQL->write("alter table session add column lastPageView_upgrade int after lastPageView",$dbh);
WebGUI::SQL->write("alter table submission add column dateSubmitted_upgrade int after dateSubmitted",$dbh);
WebGUI::SQL->write("alter table widget add column dateAdded_upgrade int after dateAdded",$dbh);
WebGUI::SQL->write("alter table widget add column lastEdited_upgrade int after lastEdited",$dbh);
print "Done\n";
print "Migrating data:\t\t";
WebGUI::SQL->write("update Article set endDate='2037-01-01 00:00:00' where endDate='2100-01-01 00:00:00'",$dbh);
$sth = WebGUI::SQL->read("select widgetId, unix_timestamp(startDate), unix_timestamp(endDate) from Article",$dbh);
while (@data = $sth->array) {
WebGUI::SQL->write("update Article set startDate_upgrade='$data[1]', endDate_upgrade='$data[2]' where widgetId=$data[0]",$dbh);
}
$sth->finish;
$sth = WebGUI::SQL->read("select widgetId, unix_timestamp(lastFetched) from SyndicatedContent",$dbh);
while (@data = $sth->array) {
WebGUI::SQL->write("update SyndicatedContent set lastFetched_upgrade='$data[1]' where widgetId=$data[0]",$dbh);
}
$sth->finish;
$sth = WebGUI::SQL->read("select eventId, unix_timestamp(startDate), unix_timestamp(endDate) from event",$dbh);
while (@data = $sth->array) {
WebGUI::SQL->write("update event set startDate_upgrade='$data[1]', endDate_upgrade='$data[2]' where eventId=$data[0]",$dbh);
}
$sth->finish;
$sth = WebGUI::SQL->read("select messageId, unix_timestamp(dateOfPost) from message",$dbh);
while (@data = $sth->array) {
WebGUI::SQL->write("update message set dateOfPost_upgrade='$data[1]' where messageId=$data[0]",$dbh);
}
$sth->finish;
$sth = WebGUI::SQL->read("select sessionId, unix_timestamp(expires), unix_timestamp(lastPageView) from session",$dbh);
while (@data = $sth->array) {
WebGUI::SQL->write("update session set expires_upgrade='$data[1]', lastPageView_upgrade='$data[2]' where sessionId=".$dbh->quote($data[0])."",$dbh);
}
$sth->finish;
$sth = WebGUI::SQL->read("select submissionId, unix_timestamp(dateSubmitted) from submission",$dbh);
while (@data = $sth->array) {
WebGUI::SQL->write("update submission set dateSubmitted_upgrade='$data[1]' where widgetId=$data[0]",$dbh);
}
$sth->finish;
$sth = WebGUI::SQL->read("select widgetId, unix_timestamp(dateAdded), unix_timestamp(lastEdited) from widget",$dbh);
while (@data = $sth->array) {
WebGUI::SQL->write("update widget set dateAdded_upgrade='$data[1]', lastEdited='$data[2]' where widgetId=$data[0]",$dbh);
}
$sth->finish;
print "Done\n";
print "Discarding old columns:\t";
WebGUI::SQL->write("alter table Article drop column startDate",$dbh);
WebGUI::SQL->write("alter table Article drop column endDate",$dbh);
WebGUI::SQL->write("alter table SyndicatedContent drop column lastFetched",$dbh);
WebGUI::SQL->write("alter table event drop column startDate",$dbh);
WebGUI::SQL->write("alter table event drop column endDate",$dbh);
WebGUI::SQL->write("alter table message drop column dateOfPost",$dbh);
WebGUI::SQL->write("alter table session drop column expires",$dbh);
WebGUI::SQL->write("alter table session drop column lastPageView",$dbh);
WebGUI::SQL->write("alter table submission drop column dateSubmitted",$dbh);
WebGUI::SQL->write("alter table widget drop column dateAdded",$dbh);
WebGUI::SQL->write("alter table widget drop column lastEdited",$dbh);
print "Done\n";
print "Renaming columns:\t";
WebGUI::SQL->write("alter table Article change column startDate_upgrade startDate int",$dbh);
WebGUI::SQL->write("alter table Article change column endDate_upgrade endDate int",$dbh);
WebGUI::SQL->write("alter table SyndicatedContent change column lastFetched_upgrade lastFetched int",$dbh);
WebGUI::SQL->write("alter table event change column startDate_upgrade startDate int",$dbh);
WebGUI::SQL->write("alter table event change column endDate_upgrade endDate int",$dbh);
WebGUI::SQL->write("alter table message change column dateOfPost_upgrade dateOfPost int",$dbh);
WebGUI::SQL->write("alter table session change column expires_upgrade expires int",$dbh);
WebGUI::SQL->write("alter table session change column lastPageView_upgrade lastPageView int",$dbh);
WebGUI::SQL->write("alter table submission change column dateSubmitted_upgrade dateSubmitted int",$dbh);
WebGUI::SQL->write("alter table widget change column dateAdded_upgrade dateAdded int",$dbh);
WebGUI::SQL->write("alter table widget change column lastEdited_upgrade lastEdited int",$dbh);
print "Done\n";
print "Cleaning up:\t\t";
$dbh->disconnect();
print "Done\n";
print "\nUpgrade complete!\n";
} else {
print "Can't connect with info provided.\n";
}
} else {
print "Ouch...something went wrong!";
}

View file

View file

@ -0,0 +1,197 @@
insert into webguiVersion values ('3.7.0','upgrade',unix_timestamp());
update settings set value=1 where value='yes';
update settings set value=0 where value='no';
INSERT INTO settings VALUES ('textAreaRows','5');
INSERT INTO settings VALUES ('textAreaCols','50');
INSERT INTO settings VALUES ('textBoxSize','30');
delete from users where username='Reserved';
delete from groups where groupName='Reserved';
delete from page where title='Reserved';
delete from style where name='Reserved';
INSERT INTO incrementer VALUES ('profileCategoryId',1000);
CREATE TABLE userProfileData (
userId int(11) NOT NULL default '0',
fieldName varchar(128) NOT NULL default '',
fieldData text,
PRIMARY KEY (userId,fieldName)
) TYPE=MyISAM;
insert into userProfileData select userId,'email',email from users;
insert into userProfileData select userId,'firstName',firstName from users;
insert into userProfileData select userId,'middleName',middleName from users;
insert into userProfileData select userId,'lastName',lastName from users;
insert into userProfileData select userId,'icq',icq from users;
insert into userProfileData select userId,'aim',aim from users;
insert into userProfileData select userId,'msnIM',msnIM from users;
insert into userProfileData select userId,'yahooIM',yahooIM from users;
insert into userProfileData select userId,'cellPhone',cellPhone from users;
insert into userProfileData select userId,'pager',pager from users;
insert into userProfileData select userId,'language',language from users;
insert into userProfileData select userId,'homeAddress',homeAddress from users;
insert into userProfileData select userId,'homeCity',homeCity from users;
insert into userProfileData select userId,'homeState',homeState from users;
insert into userProfileData select userId,'homeZip',homeZip from users;
insert into userProfileData select userId,'homeCountry',homeCountry from users;
insert into userProfileData select userId,'homePhone',homePhone from users;
insert into userProfileData select userId,'workAddress',workAddress from users;
insert into userProfileData select userId,'workCity',workCity from users;
insert into userProfileData select userId,'workState',workState from users;
insert into userProfileData select userId,'workZip',workZip from users;
insert into userProfileData select userId,'workCountry',workCountry from users;
insert into userProfileData select userId,'workPhone',workPhone from users;
insert into userProfileData select userId,'gender',gender from users;
insert into userProfileData select userId,'birthdate',birthdate from users;
insert into userProfileData select userId,'homeURL',homepage from users;
alter table users drop column email;
alter table users drop column language;
alter table users drop column firstName;
alter table users drop column middleName;
alter table users drop column lastName;
alter table users drop column icq;
alter table users drop column aim;
alter table users drop column msnIM;
alter table users drop column yahooIM;
alter table users drop column homeAddress;
alter table users drop column homeCity;
alter table users drop column homeState;
alter table users drop column homeZip;
alter table users drop column homeCountry;
alter table users drop column homePhone;
alter table users drop column workAddress;
alter table users drop column workCity;
alter table users drop column workState;
alter table users drop column workZip;
alter table users drop column workCountry;
alter table users drop column workPhone;
alter table users drop column cellPhone;
alter table users drop column pager;
alter table users drop column gender;
alter table users drop column birthdate;
alter table users drop column homepage;
alter table users add column dateCreated int not null default '1019867418';
alter table users add column lastUpdated int not null default '1019867418';
INSERT INTO international VALUES (439,'WebGUI','English','Personal Information');
INSERT INTO international VALUES (440,'WebGUI','English','Contact Information');
INSERT INTO international VALUES (441,'WebGUI','English','Email To Pager Gateway');
INSERT INTO international VALUES (442,'WebGUI','English','Work Information');
INSERT INTO international VALUES (443,'WebGUI','English','Home Information');
INSERT INTO international VALUES (444,'WebGUI','English','Demographic Information');
INSERT INTO international VALUES (445,'WebGUI','English','Preferences');
INSERT INTO international VALUES (446,'WebGUI','English','Work Web Site');
INSERT INTO international VALUES (447,'WebGUI','English','Manage page tree.');
INSERT INTO international VALUES (448,'WebGUI','English','Page Tree');
INSERT INTO international VALUES (449,'WebGUI','English','Miscellaneous Information');
INSERT INTO international VALUES (450,'WebGUI','English','Work Name (Company Name)');
INSERT INTO international VALUES (451,'WebGUI','English','is required.');
INSERT INTO international VALUES (452,'WebGUI','English','Please wait...');
INSERT INTO international VALUES (453,'WebGUI','English','Date Created');
INSERT INTO international VALUES (454,'WebGUI','English','Last Updated');
INSERT INTO international VALUES (455,'WebGUI','English','Edit User\'s Profile');
INSERT INTO international VALUES (456,'WebGUI','English','Back to user list.');
INSERT INTO international VALUES (457,'WebGUI','English','Edit this user\'s account.');
INSERT INTO international VALUES (458,'WebGUI','English','Edit this user\'s groups.');
INSERT INTO international VALUES (459,'WebGUI','English','Edit this user\'s profile.');
INSERT INTO international VALUES (460,'WebGUI','English','Time Offset');
INSERT INTO international VALUES (461,'WebGUI','English','Date Format');
INSERT INTO international VALUES (462,'WebGUI','English','Time Format');
INSERT INTO international VALUES (463,'WebGUI','English','Text Area Rows');
INSERT INTO international VALUES (464,'WebGUI','English','Text Area Columns');
INSERT INTO international VALUES (465,'WebGUI','English','Text Box Size');
INSERT INTO international VALUES (466,'WebGUI','English','Are you certain you wish to delete this category and move all of its fields to the Miscellaneous category?');
INSERT INTO international VALUES (467,'WebGUI','English','Are you certain you wish to delete this field and all user data attached to it?');
INSERT INTO international VALUES (468,'WebGUI','English','Add/Edit User Profile Category');
INSERT INTO international VALUES (469,'WebGUI','English','Id');
INSERT INTO international VALUES (470,'WebGUI','English','Name');
INSERT INTO international VALUES (471,'WebGUI','English','Add/Edit User Profile Field');
INSERT INTO international VALUES (472,'WebGUI','English','Label');
INSERT INTO international VALUES (473,'WebGUI','English','Visible?');
INSERT INTO international VALUES (474,'WebGUI','English','Required?');
INSERT INTO international VALUES (475,'WebGUI','English','Text');
INSERT INTO international VALUES (476,'WebGUI','English','Text Area');
INSERT INTO international VALUES (477,'WebGUI','English','HTML Area');
INSERT INTO international VALUES (478,'WebGUI','English','URL');
INSERT INTO international VALUES (479,'WebGUI','English','Date');
INSERT INTO international VALUES (480,'WebGUI','English','Email Address');
INSERT INTO international VALUES (481,'WebGUI','English','Telephone Number');
INSERT INTO international VALUES (482,'WebGUI','English','Number (Integer)');
INSERT INTO international VALUES (483,'WebGUI','English','Yes or No');
INSERT INTO international VALUES (484,'WebGUI','English','Select List');
INSERT INTO international VALUES (485,'WebGUI','English','Boolean (Checkbox)');
INSERT INTO international VALUES (486,'WebGUI','English','Data Type');
INSERT INTO international VALUES (487,'WebGUI','English','Possible Values');
INSERT INTO international VALUES (488,'WebGUI','English','Default Value(s)');
INSERT INTO international VALUES (489,'WebGUI','English','Profile Category');
INSERT INTO international VALUES (490,'WebGUI','English','Add a profile category.');
INSERT INTO international VALUES (491,'WebGUI','English','Add a profile field.');
INSERT INTO international VALUES (492,'WebGUI','English','Profile fields list.');
INSERT INTO international VALUES (493,'WebGUI','English','Back to site.');
CREATE TABLE userProfileCategory (
profileCategoryId int(11) NOT NULL default '0',
categoryName varchar(255) default NULL,
sequenceNumber int(11) NOT NULL default '1',
PRIMARY KEY (profileCategoryId)
) TYPE=MyISAM;
INSERT INTO userProfileCategory VALUES (1,'WebGUI::International::get(449,\"WebGUI\");',6);
INSERT INTO userProfileCategory VALUES (2,'WebGUI::International::get(440,\"WebGUI\");',2);
INSERT INTO userProfileCategory VALUES (3,'WebGUI::International::get(439,\"WebGUI\");',1);
INSERT INTO userProfileCategory VALUES (4,'WebGUI::International::get(445,\"WebGUI\");',7);
INSERT INTO userProfileCategory VALUES (5,'WebGUI::International::get(443,\"WebGUI\");',3);
INSERT INTO userProfileCategory VALUES (6,'WebGUI::International::get(442,\"WebGUI\");',4);
INSERT INTO userProfileCategory VALUES (7,'WebGUI::International::get(444,\"WebGUI\");',5);
CREATE TABLE userProfileField (
fieldName varchar(128) NOT NULL default '',
fieldLabel varchar(255) default NULL,
visible int(11) NOT NULL default '0',
required int(11) NOT NULL default '0',
dataType varchar(128) NOT NULL default 'text',
dataValues text,
dataDefault text,
sequenceNumber int(11) NOT NULL default '1',
profileCategoryId int(11) NOT NULL default '1',
protected int(11) NOT NULL default '0',
PRIMARY KEY (fieldName)
) TYPE=MyISAM;
INSERT INTO userProfileField VALUES ('email','WebGUI::International::get(56,\"WebGUI\");',1,1,'email',NULL,NULL,1,2,1);
INSERT INTO userProfileField VALUES ('firstName','WebGUI::International::get(314,\"WebGUI\");',1,0,'text',NULL,NULL,1,3,1);
INSERT INTO userProfileField VALUES ('middleName','WebGUI::International::get(315,\"WebGUI\");',1,0,'text',NULL,NULL,2,3,1);
INSERT INTO userProfileField VALUES ('lastName','WebGUI::International::get(316,\"WebGUI\");',1,0,'text',NULL,NULL,3,3,1);
INSERT INTO userProfileField VALUES ('icq','WebGUI::International::get(317,\"WebGUI\");',1,0,'text',NULL,NULL,2,2,1);
INSERT INTO userProfileField VALUES ('aim','WebGUI::International::get(318,\"WebGUI\");',1,0,'text',NULL,NULL,3,2,1);
INSERT INTO userProfileField VALUES ('msnIM','WebGUI::International::get(319,\"WebGUI\");',1,0,'text',NULL,NULL,4,2,1);
INSERT INTO userProfileField VALUES ('yahooIM','WebGUI::International::get(320,\"WebGUI\");',1,0,'text',NULL,NULL,5,2,1);
INSERT INTO userProfileField VALUES ('cellPhone','WebGUI::International::get(321,\"WebGUI\");',1,0,'phone',NULL,NULL,6,2,1);
INSERT INTO userProfileField VALUES ('pager','WebGUI::International::get(322,\"WebGUI\");',1,0,'phone',NULL,NULL,7,2,1);
INSERT INTO userProfileField VALUES ('emailToPager','WebGUI::International::get(441,\"WebGUI\");',1,0,'email',NULL,NULL,8,2,1);
INSERT INTO userProfileField VALUES ('language','WebGUI::International::get(304,\"WebGUI\");',1,0,'select','WebGUI::International::getLanguages()','[\'English\']',1,4,1);
INSERT INTO userProfileField VALUES ('homeAddress','WebGUI::International::get(323,\"WebGUI\");',1,0,'text',NULL,NULL,1,5,1);
INSERT INTO userProfileField VALUES ('homeCity','WebGUI::International::get(324,\"WebGUI\");',1,0,'text',NULL,NULL,2,5,1);
INSERT INTO userProfileField VALUES ('homeState','WebGUI::International::get(325,\"WebGUI\");',1,0,'text',NULL,NULL,3,5,1);
INSERT INTO userProfileField VALUES ('homeZip','WebGUI::International::get(326,\"WebGUI\");',1,0,'zipcode',NULL,NULL,4,5,1);
INSERT INTO userProfileField VALUES ('homeCountry','WebGUI::International::get(327,\"WebGUI\");',1,0,'text',NULL,NULL,5,5,1);
INSERT INTO userProfileField VALUES ('homePhone','WebGUI::International::get(328,\"WebGUI\");',1,0,'phone',NULL,NULL,6,5,1);
INSERT INTO userProfileField VALUES ('workAddress','WebGUI::International::get(329,\"WebGUI\");',1,0,'text',NULL,NULL,2,6,1);
INSERT INTO userProfileField VALUES ('workCity','WebGUI::International::get(330,\"WebGUI\");',1,0,'text',NULL,NULL,3,6,1);
INSERT INTO userProfileField VALUES ('workState','WebGUI::International::get(331,\"WebGUI\");',1,0,'text',NULL,NULL,4,6,1);
INSERT INTO userProfileField VALUES ('workZip','WebGUI::International::get(332,\"WebGUI\");',1,0,'zipcode',NULL,NULL,5,6,1);
INSERT INTO userProfileField VALUES ('workCountry','WebGUI::International::get(333,\"WebGUI\");',1,0,'text',NULL,NULL,6,6,1);
INSERT INTO userProfileField VALUES ('workPhone','WebGUI::International::get(334,\"WebGUI\");',1,0,'phone',NULL,NULL,7,6,1);
INSERT INTO userProfileField VALUES ('gender','WebGUI::International::get(335,\"WebGUI\");',1,0,'select','{\r\n \'neuter\'=>WebGUI::International::get(403),\r\n \'male\'=>WebGUI::International::get(339),\r\n \'female\'=>WebGUI::International::get(340)\r\n}','[\'neuter\']',1,7,1);
INSERT INTO userProfileField VALUES ('birthdate','WebGUI::International::get(336,\"WebGUI\");',1,0,'text',NULL,NULL,2,7,1);
INSERT INTO userProfileField VALUES ('homeURL','WebGUI::International::get(337,\"WebGUI\");',1,0,'url',NULL,NULL,7,5,1);
INSERT INTO userProfileField VALUES ('workURL','WebGUI::International::get(446,\"WebGUI\");',1,0,'url',NULL,NULL,8,6,1);
INSERT INTO userProfileField VALUES ('workName','WebGUI::International::get(450,\"WebGUI\");',1,0,'text',NULL,NULL,1,6,1);
INSERT INTO userProfileField VALUES ('timeOffset','WebGUI::International::get(460,\"WebGUI\");',1,0,'text',NULL,'\'0\'',2,4,1);
INSERT INTO userProfileField VALUES ('dateFormat','WebGUI::International::get(461,\"WebGUI\");',1,0,'select','{\r\n \'%M/%D/%y\'=>WebGUI::DateTime::epochToHuman(\"\",\"%M/%D/%y\"),\r\n \'%y-%m-%d\'=>WebGUI::DateTime::epochToHuman(\"\",\"%y-%m-%d\"),\r\n \'%D-%c-%y\'=>WebGUI::DateTime::epochToHuman(\"\",\"%D-%c-%y\"),\r\n \'%c %D, %y\'=>WebGUI::DateTime::epochToHuman(\"\",\"%c %D, %y\")\r\n}\r\n','[\'%M/%D/%y\']',3,4,1);
INSERT INTO userProfileField VALUES ('timeFormat','WebGUI::International::get(462,\"WebGUI\");',1,0,'select','{\r\n \'%H:%n %p\'=>WebGUI::DateTime::epochToHuman(\"\",\"%H:%n %p\"),\r\n \'%H:%n:%s %p\'=>WebGUI::DateTime::epochToHuman(\"\",\"%H:%n:%s %p\"),\r\n \'%j:%n\'=>WebGUI::DateTime::epochToHuman(\"\",\"%j:%n\"),\r\n \'%j:%n:%s\'=>WebGUI::DateTime::epochToHuman(\"\",\"%j:%n:%s\")\r\n}\r\n','[\'%H:%n %p\']',4,4,1);

View file

@ -4,7 +4,7 @@ use warnings;
use base qw(HTML::Parser);
use vars qw($VERSION);
$VERSION = '0.07'; # $Date: 2001/10/25 $
$VERSION = '0.07'; # $Date$
=head1 NAME

View file

@ -1,5 +1,5 @@
package WebGUI;
our $VERSION = "3.6.5";
our $VERSION = "3.7.0";
#-------------------------------------------------------------------
# WebGUI is Copyright 2001-2002 Plain Black Software.
@ -73,6 +73,7 @@ sub _displayAdminBar {
'http://validator.w3.org/check?uri=http%3A%2F%2F'.$session{env}{SERVER_NAME}.
WebGUI::URL::page()=>WebGUI::International::get(399),
WebGUI::URL::page('op=listImages')=>WebGUI::International::get(394),
WebGUI::URL::page('op=viewPageTree')=>WebGUI::International::get(447),
%hash
);
}
@ -145,12 +146,27 @@ sub _loadWidgets {
#-------------------------------------------------------------------
sub page {
my (%contentHash, $cmd, $pageEdit, $widgetPage, $widgetType, $functionOutput, @availableWidgets, @widgetList, $sth, $httpHeader, $header, $footer, $content, $operationOutput, $adminBar);
my ($debug, %contentHash, $cmd, $pageEdit, $widgetPage, $widgetType, $functionOutput, @availableWidgets, @widgetList, $sth, $httpHeader, $header, $footer, $content, $operationOutput, $adminBar);
WebGUI::Session::open($_[0],$_[1]);
# For some reason we have to pre-cache the templates when running under mod_perl
# so that's what we're doing with this next command.
WebGUI::Template::loadTemplates();
@availableWidgets = _loadWidgets();
if ($session{form}{debug}==1 && WebGUI::Privilege::isInGroup(3)) {
$debug = '<table bgcolor="#ffffff" style="color: #000000; font-size: 10pt; font-family: helvetica;">';
while (my ($section, $hash) = each %session) {
while (my ($key, $value) = each %$hash) {
if (ref $value eq 'ARRAY') {
$value = '['.join(', ',@$value).']';
} elsif (ref $value eq 'HASH') {
$value = '{'.join(', ',map {"$_ => $value->{$_}"} keys %$value).'}';
}
$debug .= '<tr><td align="right"><b>'.$section.'.'.$key.':</b></td><td>'.$value.'</td>';
}
$debug .= '<tr height=10><td>&nbsp;</td><td>&nbsp</td></tr>';
}
$debug .='</table>';
}
if (exists $session{form}{op}) {
$cmd = "WebGUI::Operation::www_".$session{form}{op};
$operationOutput = &$cmd();
@ -213,7 +229,7 @@ sub page {
$httpHeader = WebGUI::Session::httpHeader();
($header, $footer) = WebGUI::Style::getStyle();
WebGUI::Session::close();
return $httpHeader.$adminBar.$header.$pageEdit.$content.$footer;
return $httpHeader.$adminBar.$header.$pageEdit.$content.$footer.$debug;
}
}

View file

@ -176,6 +176,10 @@ sub getIcon {
$icon .= "exe.gif";
} elsif (isIn($extension, qw(sit hqx))) {
$icon .= "sit.gif";
} elsif (isIn($extension, qw(dwg dwf))) {
$icon .= "dwg.gif";
} elsif (isIn($extension, qw(indd p65))) {
$icon .= "indd.gif";
} elsif (isIn($extension, qw(tgz gz tar Z))) {
$icon .= "gz.gif";
} elsif ($extension eq "rar") {

View file

@ -15,6 +15,7 @@ use Exporter;
use strict;
use Time::Local;
use WebGUI::International;
use WebGUI::Session;
our @ISA = qw(Exporter);
our @EXPORT = qw(&addToTime &addToDate &epochToHuman &epochToSet &humanToEpoch &setToEpoch &monthStartEnd);
@ -72,7 +73,7 @@ sub addToTime {
#-------------------------------------------------------------------
sub epochToHuman {
my ($hour12, $value, $output, @date, %weekday, %month);
my ($offset, $temp, $hour12, $value, $output, @date, %weekday, %month);
# 0 1 2 3 4 5 6 7 8
# $sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
@ -92,14 +93,23 @@ sub epochToHuman {
# `1..366' in leap years.) $isdst is true if the
# specified time occurs during daylight savings
# time, false otherwise.
@date = localtime($_[0]);
$offset = $session{user}{timeOffset} || 0;
$offset = $offset*3600;
$temp = $_[0] || time();
$temp = $temp+$offset;
@date = localtime($temp);
$date[4]++; # offset the months starting from 0
$date[5] += 1900; # original value is Year-1900
$date[6]++; # offset for weekdays starting from 0
$output = $_[1];
#---dealing with percent symbol
$output =~ s/\%\%/\%/g;
#---date format preference
$temp = $session{user}{dateFormat} || '%M/%D/%y';
$output =~ s/\%z/$temp/g;
#---time format preference
$temp = $session{user}{timeFormat} || '%H:%n %p';
$output =~ s/\%Z/$temp/g;
#---year stuff
$output =~ s/\%y/$date[5]/g;
$value = substr($date[5],2,2);
@ -124,6 +134,9 @@ sub epochToHuman {
$hour12 = $date[2];
if ($hour12 > 12) {
$hour12 = $hour12 - 12;
if ($hour12 == 0) {
$hour12 = 12;
}
}
$value = sprintf("%02d",$hour12);
$output =~ s/\%h/$value/g;

1246
lib/WebGUI/HTMLForm.pm Normal file

File diff suppressed because it is too large Load diff

302
lib/WebGUI/Icon.pm Normal file
View file

@ -0,0 +1,302 @@
package WebGUI::Icon;
=head1 LEGAL
-------------------------------------------------------------------
WebGUI is Copyright 2001-2002 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
-------------------------------------------------------------------
=cut
use Exporter;
use strict;
use WebGUI::Session;
use WebGUI::URL;
our @ISA = qw(Exporter);
our @EXPORT = qw(&helpIcon &becomeIcon &cutIcon &copyIcon &deleteIcon &editIcon &moveUpIcon &moveDownIcon
&moveTopIcon &moveBottomIcon &viewIcon);
=head1 NAME
Package WebGUI::Icon
=head1 SYNOPSIS
use WebGUI::Icon;
$html = becomeIcon('op=something');
$html = copyIcon('op=something');
$html = cutIcon('op=something');
$html = deleteIcon('op=something');
$html = editIcon('op=something');
$html = helpIcon(1,"MyNamespace");
$html = moveBottomIcon('op=something');
$html = moveDownIcon('op=something');
$html = moveTopIcon('op=something');
$html = moveUpIcon('op=something');
$html = pageIcon();
$html = viewIcon('op=something');
=head1 DESCRIPTION
A package for generating user interface buttons. The subroutines
found herein do nothing other than to create a short way of doing
much longer repetitive tasks. They simply make the programmer's life
easier through fewer keystrokes and less cluttered code.
=head1 METHODS
These subroutines are available from this package:
=cut
#-------------------------------------------------------------------
=head2 becomeIcon ( urlParameters )
Generates a button with the word "Become" printed on it.
=item urlParameters
Any URL parameters that need to be tacked on to the current URL
to accomplish whatever function this button represents.
=cut
sub becomeIcon {
my ($output);
$output = '<a href="'.WebGUI::URL::page($_[0]).'">';
$output .= '<img src="'.$session{setting}{lib}.'/become.gif" align="middle" border="0" alt="Become"></a>';
return $output;
}
#-------------------------------------------------------------------
=head2 copyIcon ( urlParameters )
Generates a button with the word "Copy" printed on it.
=item urlParameters
Any URL parameters that need to be tacked on to the current URL
to accomplish whatever function this button represents.
=cut
sub copyIcon {
my ($output);
$output = '<a href="'.WebGUI::URL::page($_[0]).'">';
$output .= '<img src="'.$session{setting}{lib}.'/copy.gif" align="middle" border="0" alt="Copy"></a>';
return $output;
}
#-------------------------------------------------------------------
=head2 cutIcon ( urlParameters )
Generates a button with the word "Cut" printed on it.
=item urlParameters
Any URL parameters that need to be tacked on to the current URL
to accomplish whatever function this button represents.
=cut
sub cutIcon {
my ($output);
$output = '<a href="'.WebGUI::URL::page($_[0]).'">';
$output .= '<img src="'.$session{setting}{lib}.'/cut.gif" align="middle" border="0" alt="Cut"></a>';
return $output;
}
#-------------------------------------------------------------------
=head2 deleteIcon ( urlParameters )
Generates a button with an "X" printed on it.
=item urlParameters
Any URL parameters that need to be tacked on to the current URL
to accomplish whatever function this button represents.
=cut
sub deleteIcon {
my ($output);
$output = '<a href="'.WebGUI::URL::page($_[0]).'">';
$output .= '<img src="'.$session{setting}{lib}.'/delete.gif" align="middle" border="0" alt="Delete"></a>';
return $output;
}
#-------------------------------------------------------------------
=head2 editIcon ( urlParameters )
Generates a button with the word "Edit" printed on it.
=item urlParameters
Any URL parameters that need to be tacked on to the current URL
to accomplish whatever function this button represents.
=cut
sub editIcon {
my ($output);
$output = '<a href="'.WebGUI::URL::page($_[0]).'">';
$output .= '<img src="'.$session{setting}{lib}.'/edit.gif" align="middle" border="0" alt="Edit"></a>';
return $output;
}
#-------------------------------------------------------------------
=head2 becomeIcon ( helpId [, namespace ] )
Generates a button with the word "Help" printed on it.
=item helpId
The id in the help table that relates to the help documentation
for your function.
=item namespace
If your help documentation is not in the WebGUI namespace, then
you must specify the namespace for this help.
=cut
sub helpIcon {
my ($output, $namespace);
$namespace = $_[1] || "WebGUI";
$output = '<a href="'.WebGUI::URL::page('op=viewHelp&hid='.$_[0].'&namespace='.$namespace).
'" target="_blank"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a>';
return $output;
}
#-------------------------------------------------------------------
=head2 moveBottomIcon ( urlParameters )
Generates a button with a double down arrow printed on it.
=item urlParameters
Any URL parameters that need to be tacked on to the current URL
to accomplish whatever function this button represents.
=cut
sub moveBottomIcon {
my ($output);
$output = '<a href="'.WebGUI::URL::page($_[0]).'">';
$output .= '<img src="'.$session{setting}{lib}.'/jumpDown.gif" align="middle" border="0" alt="Move To Bottom"></a>';
return $output;
}
#-------------------------------------------------------------------
=head2 moveDownIcon ( urlParameters )
Generates a button with a down arrow printed on it.
=item urlParameters
Any URL parameters that need to be tacked on to the current URL
to accomplish whatever function this button represents.
=cut
sub moveDownIcon {
my ($output);
$output = '<a href="'.WebGUI::URL::page($_[0]).'">';
$output .= '<img src="'.$session{setting}{lib}.'/downArrow.gif" align="middle" border="0" alt="Move Down"></a>';
return $output;
}
#-------------------------------------------------------------------
=head2 moveTopIcon ( urlParameters )
Generates a button with a double up arrow printed on it.
=item urlParameters
Any URL parameters that need to be tacked on to the current URL
to accomplish whatever function this button represents.
=cut
sub moveTopIcon {
my ($output);
$output = '<a href="'.WebGUI::URL::page($_[0]).'">';
$output .= '<img src="'.$session{setting}{lib}.'/jumpUp.gif" align="middle" border="0" alt="Move To Top"></a>';
return $output;
}
#-------------------------------------------------------------------
=head2 moveUpIcon ( urlParameters )
Generates a button with an up arrow printed on it.
=item urlParameters
Any URL parameters that need to be tacked on to the current URL
to accomplish whatever function this button represents.
=cut
sub moveUpIcon {
my ($output);
$output = '<a href="'.WebGUI::URL::page($_[0]).'">';
$output .= '<img src="'.$session{setting}{lib}.'/upArrow.gif" align="middle" border="0" alt="Move Up"></a>';
return $output;
}
#-------------------------------------------------------------------
=head2 pageIcon ( )
Generates an icon that looks like a page. It's purpose is to
represent whether you're looking at page properties or Wobject
properties.
=cut
sub pageIcon {
return '<img src="'.$session{setting}{lib}.'/page.gif" align="middle" border="0" alt="Page Settings">';
}
#-------------------------------------------------------------------
=head2 viewIcon ( urlParameters )
Generates a button with the word "View" printed on it.
=item urlParameters
Any URL parameters that need to be tacked on to the current URL
to accomplish whatever function this button represents.
=cut
sub viewIcon {
my ($output);
$output = '<a href="'.WebGUI::URL::page($_[0]).'">';
$output .= '<img src="'.$session{setting}{lib}.'/view.gif" align="middle" border="0" alt="View"></a>';
return $output;
}
1;

View file

@ -42,5 +42,17 @@ sub get {
return $output;
}
#-------------------------------------------------------------------
sub getLanguages {
my ($sth, %hash, @data);
tie %hash, "Tie::IxHash";
$sth = WebGUI::SQL->read("select distinct(language) from international");
while (@data = $sth->array) {
$hash{$data[0]} = $data[0];
}
$sth->finish;
return \%hash;
}
1;

View file

@ -16,22 +16,22 @@ use WebGUI::Macro;
#-------------------------------------------------------------------
sub _replacement {
my (@param, $temp, $file);
my (@param, $temp, $file);
@param = WebGUI::Macro::getParams($_[0]);
if ($param[0] =~ /passwd/ || $param[0] =~ /shadow/ || $param[0] =~ /WebGUI.conf/) {
$temp = "SECURITY VIOLATION";
} else {
$file = FileHandle->new($param[0],"r");
if ($file) {
while (<$file>) {
$temp .= $_;
}
$file->close;
} else {
$temp = "INCLUDED FILE DOES NOT EXIST";
}
}
return $temp;
$file = FileHandle->new($param[0],"r");
if ($file) {
while (<$file>) {
$temp .= $_;
}
$file->close;
} else {
$temp = "INCLUDED FILE DOES NOT EXIST";
}
}
return $temp;
}
#-------------------------------------------------------------------

View file

@ -0,0 +1,42 @@
package WebGUI::Macro::RootTitle;
#-------------------------------------------------------------------
# WebGUI is Copyright 2001-2002 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 Tie::CPHash;
use WebGUI::Macro;
use WebGUI::Session;
use WebGUI::SQL;
use WebGUI::URL;
#-------------------------------------------------------------------
sub _recurse {
my ($sth, %data, $output);
tie %data, 'Tie::CPHash';
%data = WebGUI::SQL->quickHash("select pageId,parentId,title,urlizedTitle from page where pageId=$_[0]");
if ($data{parentId} == 0) {
$output = $data{title} || $session{page}{title};
} else {
$output = _recurse($data{parentId},$_[1]);
}
return $output;
}
#-------------------------------------------------------------------
sub process {
my ($output);
$output = $_[0];
$output =~ s/\^RootTitle\;/_recurse($session{page}{parentId})/ge;
return $output;
}
1;

View file

@ -18,6 +18,7 @@ use WebGUI::Operation::Help;
use WebGUI::Operation::Image;
use WebGUI::Operation::Package;
use WebGUI::Operation::Page;
use WebGUI::Operation::ProfileSettings;
use WebGUI::Operation::Root;
use WebGUI::Operation::Search;
use WebGUI::Operation::Settings;

View file

@ -17,7 +17,6 @@ use strict;
use URI;
use WebGUI::DateTime;
use WebGUI::ErrorHandler;
use WebGUI::Form;
use WebGUI::International;
use WebGUI::Mail;
use WebGUI::Paginator;
@ -26,11 +25,26 @@ use WebGUI::Session;
use WebGUI::Shortcut;
use WebGUI::SQL;
use WebGUI::URL;
use WebGUI::User;
use WebGUI::Utility;
our @ISA = qw(Exporter);
our @EXPORT = qw(&www_viewMessageLog &www_viewProfile &www_editProfile &www_editProfileSave &www_createAccount &www_deactivateAccount &www_deactivateAccountConfirm &www_displayAccount &www_displayLogin &www_login &www_logout &www_recoverPassword &www_recoverPasswordFinish &www_createAccountSave &www_updateAccount);
our %ldapStatusCode = ( 0=>'success (0)', 1=>'Operations Error (1)', 2=>'Protocol Error (2)', 3=>'Time Limit Exceeded (3)', 4=>'Size Limit Exceeded (4)', 5=>'Compare False (5)', 6=>'Compare True (6)', 7=>'Auth Method Not Supported (7)', 8=>'Strong Auth Required (8)', 9=>'Referral (10)', 11=>'Admin Limit Exceeded (11)', 12=>'Unavailable Critical Extension (12)', 13=>'Confidentiality Required (13)', 14=>'Sasl Bind In Progress (14)', 15=>'No Such Attribute (16)', 17=>'Undefined Attribute Type (17)', 18=>'Inappropriate Matching (18)', 19=>'Constraint Violation (19)', 20=>'Attribute Or Value Exists (20)', 21=>'Invalid Attribute Syntax (21)', 32=>'No Such Object (32)', 33=>'Alias Problem (33)', 34=>'Invalid DN Syntax (34)', 36=>'Alias Dereferencing Problem (36)', 48=>'Inappropriate Authentication (48)', 49=>'Invalid Credentials (49)', 50=>'Insufficient Access Rights (50)', 51=>'Busy (51)', 52=>'Unavailable (52)', 53=>'Unwilling To Perform (53)', 54=>'Loop Detect (54)', 64=>'Naming Violation (64)', 65=>'Object Class Violation (65)', 66=>'Not Allowed On Non Leaf (66)', 67=>'Not Allowed On RDN (67)', 68=>'Entry Already Exists (68)', 69=>'Object Class Mods Prohibited (69)', 71=>'Affects Multiple DSAs (71)', 80=>'other (80)');
our %ldapStatusCode = ( 0=>'success (0)', 1=>'Operations Error (1)', 2=>'Protocol Error (2)',
3=>'Time Limit Exceeded (3)', 4=>'Size Limit Exceeded (4)', 5=>'Compare False (5)',
6=>'Compare True (6)', 7=>'Auth Method Not Supported (7)', 8=>'Strong Auth Required (8)',
9=>'Referral (10)', 11=>'Admin Limit Exceeded (11)', 12=>'Unavailable Critical Extension (12)',
13=>'Confidentiality Required (13)', 14=>'Sasl Bind In Progress (14)',
15=>'No Such Attribute (16)', 17=>'Undefined Attribute Type (17)',
18=>'Inappropriate Matching (18)', 19=>'Constraint Violation (19)',
20=>'Attribute Or Value Exists (20)', 21=>'Invalid Attribute Syntax (21)', 32=>'No Such Object (32)',
33=>'Alias Problem (33)', 34=>'Invalid DN Syntax (34)', 36=>'Alias Dereferencing Problem (36)',
48=>'Inappropriate Authentication (48)', 49=>'Invalid Credentials (49)',
50=>'Insufficient Access Rights (50)', 51=>'Busy (51)', 52=>'Unavailable (52)',
53=>'Unwilling To Perform (53)', 54=>'Loop Detect (54)', 64=>'Naming Violation (64)',
65=>'Object Class Violation (65)', 66=>'Not Allowed On Non Leaf (66)', 67=>'Not Allowed On RDN (67)',
68=>'Entry Already Exists (68)', 69=>'Object Class Mods Prohibited (69)',
71=>'Affects Multiple DSAs (71)', 80=>'other (80)');
#-------------------------------------------------------------------
sub _accountOptions {
@ -82,43 +96,86 @@ sub _logLogin {
quote($session{env}{REMOTE_ADDR}).",".quote($session{env}{HTTP_USER_AGENT}).")");
}
#-------------------------------------------------------------------
sub _validateProfileData {
my (%data, $error, $a, %field);
tie %field, 'Tie::CPHash';
$a = WebGUI::SQL->read("select * from userProfileField");
while (%field = $a->hash) {
if ($field{fieldType} eq "date") {
$session{form}{$field{fieldName}} = setToEpoch($session{form}{$field{fieldName}});
}
$data{$field{fieldName}} = $session{form}{$field{fieldName}} if (exists $session{form}{$field{fieldName}});
if ($field{required} && $session{form}{$field{fieldName}} eq "") {
$error .= '<li>';
$error .= eval $field{fieldLabel};
$error .= ' '.WebGUI::International::get(451);
}
}
$a->finish;
return (\%data, $error);
}
#-------------------------------------------------------------------
sub www_createAccount {
my ($output, %language, @array);
my ($output, %language, @array,
$previousCategory, $category, $f, $a, %data, $default, $label, $values, $method);
tie %data, 'Tie::CPHash';
if ($session{user}{userId} != 1) {
$output .= www_displayAccount();
} elsif ($session{setting}{anonymousRegistration} eq "no") {
} elsif (!$session{setting}{anonymousRegistration}) {
$output .= www_displayLogin();
} else {
$output .= '<h1>'.WebGUI::International::get(54).'</h1>';
$output .= formHeader();
$output .= WebGUI::Form::hidden("op","createAccountSave");
$output .= '<table>';
unless ($session{setting}{authMethod} eq "LDAP" && $session{setting}{usernameBinding} eq "yes") {
$output .= tableFormRow(WebGUI::International::get(50),WebGUI::Form::text("username",20,35));
$f = WebGUI::HTMLForm->new();
$f->hidden("op","createAccountSave");
unless ($session{setting}{authMethod} eq "LDAP" && $session{setting}{usernameBinding}) {
$f->text("username",WebGUI::International::get(50),$session{form}{username});
}
if ($session{setting}{authMethod} eq "LDAP") {
$output .= WebGUI::Form::hidden("identifier1","ldap-password");
$output .= WebGUI::Form::hidden("identifier2","ldap-password");
$output .= tableFormRow($session{setting}{ldapIdName},WebGUI::Form::text("ldapId",20,100));
$output .= tableFormRow($session{setting}{ldapPasswordName},
WebGUI::Form::password("ldapPassword",20,100));
$f->hidden("identifier1","ldap-password");
$f->hidden("identifier2","ldap-password");
$f->text("ldapId",$session{setting}{ldapIdName});
$f->password("ldapPassword",$session{setting}{ldapPasswordName});
} else {
$output .= tableFormRow(WebGUI::International::get(51),
WebGUI::Form::password("identifier1",20,35));
$output .= tableFormRow(WebGUI::International::get(55),
WebGUI::Form::password("identifier2",20,35));
$f->password("identifier1",WebGUI::International::get(51));
$f->password("identifier2",WebGUI::International::get(55));
}
$output .= tableFormRow(WebGUI::International::get(56),
WebGUI::Form::text("email",20,255).'<span class="formSubtext"><br>'.
WebGUI::International::get(57).'</span>');
%language = WebGUI::SQL->buildHash("select distinct(language) from international");
$array[0] = "English";
$output .= tableFormRow(WebGUI::International::get(304),
WebGUI::Form::selectList("language",\%language,\@array));
$output .= formSave();
$output .= '</table>';
$output .= '</form> ';
$a = WebGUI::SQL->read("select * from userProfileField,userProfileCategory
where userProfileField.profileCategoryId=userProfileCategory.profileCategoryId
order by userProfileCategory.sequenceNumber,userProfileField.sequenceNumber");
while(%data = $a->hash) {
if ($data{required}) {
$category = eval $data{categoryName};
if ($category ne $previousCategory) {
#$f->raw('<tr><td colspan="2" class="tableHeader">'.$category.'</td></tr>');
}
$values = eval $data{dataValues};
$method = $data{dataType};
$label = eval $data{fieldLabel};
if ($method eq "select") {
# note: this big if statement doesn't look elegant, but doing regular
# ORs caused problems with the array reference.
if ($session{form}{$data{fieldName}}) {
$default = [$session{form}{$data{fieldName}}];
} elsif ($session{user}{$data{fieldName}}) {
$default = [$session{user}{$data{fieldName}}];
} else {
$default = eval $data{dataDefault};
}
$f->select($data{fieldName},$values,$label,$default);
} else {
$default = $session{form}{$data{fieldName}}
|| $session{user}{$data{fieldName}}
|| eval $data{dataDefault};
$f->$method($data{fieldName},$label,$default);
}
$previousCategory = $category;
}
}
$a->finish;
$f->submit;
$output .= $f->print;
$output .= '<div class="accountOptions"><ul>';
$output .= '<li><a href="'.WebGUI::URL::page('op=displayLogin').'">'.
WebGUI::International::get(58).'</a>';
@ -133,21 +190,22 @@ sub www_createAccount {
#-------------------------------------------------------------------
sub www_createAccountSave {
my ($username, $uri, $ldap, $port, %args, $search, $connectDN, $auth, $output, $error, $uid, $registeredUserExpire, $encryptedPassword);
if ($session{setting}{authMethod} eq "LDAP" && $session{setting}{usernameBinding} eq "yes") {
my ($profile, $u, $username, $uri, $temp, $ldap, $port, %args, $search,
$connectDN, $auth, $output, $error, $uid,
$encryptedPassword, $fieldName);
if ($session{setting}{authMethod} eq "LDAP" && $session{setting}{usernameBinding}) {
$username = $session{form}{ldapId};
} else {
$username = $session{form}{username};
}
if (_hasBadUsername($username)) {
$error = WebGUI::International::get(77);
$error = '<li>'.WebGUI::International::get(77);
$error .= ' "'.$username.'too", ';
$error .= '"'.$username.'2", ';
$error .= '"'.$username.'_'.WebGUI::DateTime::epochToHuman(time(),"%y").'"';
$error .= '<p>';
}
if (_hasBadPassword($session{form}{identifier1},$session{form}{identifier2})) {
$error .= WebGUI::International::get(78);
$error .= '<li>'.WebGUI::International::get(78);
}
if ($session{setting}{authMethod} eq "LDAP") {
$uri = URI->new($session{setting}{ldapURL});
@ -166,26 +224,34 @@ sub www_createAccountSave {
$ldap = Net::LDAP->new($uri->host, %args) or $error .= WebGUI::International::get(79);
$auth = $ldap->bind(dn=>$connectDN, password=>$session{form}{ldapPassword});
if ($auth->code == 48 || $auth->code == 49) {
$error .= WebGUI::International::get(68);
$error .= '<li>'.WebGUI::International::get(68);
WebGUI::ErrorHandler::warn("Invalid LDAP information for registration of LDAP ID: ".$session{form}{ldapId});
} elsif ($auth->code > 0) {
$error .= 'LDAP error "'.$ldapStatusCode{$auth->code}.'" occured. '.WebGUI::International::get(69);
$error .= '<li>LDAP error "'.$ldapStatusCode{$auth->code}.'" occured. '.WebGUI::International::get(69);
WebGUI::ErrorHandler::warn("LDAP error: ".$ldapStatusCode{$auth->code});
}
$ldap->unbind;
} else {
$error .= WebGUI::International::get(68);
$error .= '<li>'.WebGUI::International::get(68);
WebGUI::ErrorHandler::warn("Invalid LDAP information for registration of LDAP ID: ".$session{form}{ldapId});
}
}
($profile, $temp) = _validateProfileData();
$error .= $temp;
if ($error eq "") {
$encryptedPassword = Digest::MD5::md5_base64($session{form}{identifier1});
$uid = getNextId("userId");
WebGUI::SQL->write("insert into users (userId,username,identifier,email,authMethod,ldapURL,connectDN,language) values ($uid, ".quote($username).", ".quote($encryptedPassword).", ".quote($session{form}{email}).", ".quote($session{setting}{authMethod}).", ".quote($session{setting}{ldapURL}).", ".quote($connectDN).", ".quote($session{form}{language}).")");
($registeredUserExpire) = WebGUI::SQL->quickArray("select expireAfter from groups where groupId=2");
WebGUI::SQL->write("insert into groupings values (2,$uid,".(time()+$registeredUserExpire).")");
WebGUI::Session::start($uid);
_logLogin($uid,"success");
$u = WebGUI::User->new("new");
$u->username($username);
$u->identifier($encryptedPassword);
$u->authMethod($session{setting}{authMethod});
$u->ldapURL($session{setting}{ldapURL});
$u->connectDN($connectDN);
foreach $fieldName (keys %{$profile}) {
$u->profileField($fieldName,${$profile}{$fieldName});
}
$u->addToGroups([2]);
WebGUI::Session::start($u->userId);
_logLogin($u->userId,"success");
} else {
$output = "<h1>".WebGUI::International::get(70)."</h1>".$error.www_createAccount();
}
@ -209,9 +275,10 @@ sub www_deactivateAccount {
#-------------------------------------------------------------------
sub www_deactivateAccountConfirm {
my ($u);
if ($session{user}{userId} != 1) {
WebGUI::SQL->write("delete from users where userId=$session{user}{userId}");
WebGUI::SQL->write("delete from groupings where userId=$session{user}{userId}");
$u = WebGUI::User->new($session{user}{userId});
$u->delete;
WebGUI::Session::end($session{var}{sessionId});
}
return www_displayLogin();
@ -219,38 +286,26 @@ sub www_deactivateAccountConfirm {
#-------------------------------------------------------------------
sub www_displayAccount {
my ($output, %hash, @array);
my ($output, %hash, @array, $f);
if ($session{user}{userId} != 1) {
$output .= '<h1>'.WebGUI::International::get(61).'</h1>';
$output .= formHeader();
$output .= WebGUI::Form::hidden("op","updateAccount");
$output .= '<table>';
if ($session{user}{authMethod} eq "LDAP" && $session{setting}{usernameBinding} eq "yes") {
$output .= WebGUI::Form::hidden("username",$session{user}{username});
$output .= tableFormRow(WebGUI::International::get(50),$session{user}{username});
$f = WebGUI::HTMLForm->new;
$f->hidden("op","updateAccount");
if ($session{user}{authMethod} eq "LDAP" && $session{setting}{usernameBinding}) {
$f->hidden("username",$session{user}{username});
$f->readOnly($session{user}{username},WebGUI::International::get(50));
} else {
$output .= tableFormRow(WebGUI::International::get(50),
WebGUI::Form::text("username",20,35,$session{user}{username}));
$f->text("username",WebGUI::International::get(50),$session{user}{username});
}
if ($session{user}{authMethod} eq "LDAP") {
$output .= WebGUI::Form::hidden("identifier1","password");
$output .= WebGUI::Form::hidden("identifier2","password");
$f->hidden("identifier1","password");
$f->hidden("identifier2","password");
} else {
$output .= tableFormRow(WebGUI::International::get(51),
WebGUI::Form::password("identifier1",20,35,"password"));
$output .= tableFormRow(WebGUI::International::get(55),
WebGUI::Form::password("identifier2",20,35,"password"));
$f->password("identifier1",WebGUI::International::get(51),"password");
$f->password("identifier2",WebGUI::International::get(55),"password");
}
$output .= tableFormRow(WebGUI::International::get(56),
WebGUI::Form::text("email",20,255,$session{user}{email}).
'<span class="formSubtext"><br>'.WebGUI::International::get(57).'</span>');
%hash = WebGUI::SQL->buildHash("select distinct(language) from international");
$array[0] = $session{user}{language};
$output .= tableFormRow(WebGUI::International::get(304),
WebGUI::Form::selectList("language",\%hash,\@array));
$output .= formSave();
$output .= '</table>';
$output .= '</form> ';
$f->submit;
$output .= $f->print;
$output .= _accountOptions();
} else {
$output .= www_displayLogin();
@ -260,23 +315,19 @@ sub www_displayAccount {
#-------------------------------------------------------------------
sub www_displayLogin {
my ($output);
my ($output, $f);
if ($session{var}{sessionId}) {
$output .= www_displayAccount();
} else {
$output .= '<h1>'.WebGUI::International::get(66).'</h1>';
$output .= formHeader();
$output .= WebGUI::Form::hidden("op","login");
$output .= '<table>';
$output .= tableFormRow(WebGUI::International::get(50),
WebGUI::Form::text("username",20,35));
$output .= tableFormRow(WebGUI::International::get(51),
WebGUI::Form::password("identifier",20,35));
$output .= '<tr><td></td><td>'.WebGUI::Form::submit(WebGUI::International::get(52)).'</td></tr>';
$output .= '</table>';
$output .= '</form>';
$f = WebGUI::HTMLForm->new;
$f->hidden("op","login");
$f->text("username",WebGUI::International::get(50));
$f->password("identifier",WebGUI::International::get(51));
$f->submit(WebGUI::International::get(52));
$output .= $f->print;
$output .= '<div class="accountOptions"><ul>';
if ($session{setting}{anonymousRegistration} eq "yes") {
if ($session{setting}{anonymousRegistration}) {
$output .= '<li><a href="'.WebGUI::URL::page('op=createAccount').'">'.
WebGUI::International::get(67).'</a>';
}
@ -291,76 +342,52 @@ sub www_displayLogin {
#-------------------------------------------------------------------
sub www_editProfile {
my ($output, %gender, @array);
%gender = ('neuter'=>WebGUI::International::get(403),'male'=>WebGUI::International::get(339),'female'=>WebGUI::International::get(340));
my ($output, $f, $a, %data, $method, $values, $category, $label, $default, $previousCategory, $subtext);
if ($session{user}{userId} != 1) {
$output .= '<h1>'.WebGUI::International::get(338).'</h1>';
$output .= formHeader();
$output .= WebGUI::Form::hidden("op","editProfileSave");
$output .= WebGUI::Form::hidden("uid",$session{user}{userId});
$output .= '<table>';
if ($session{setting}{profileName}) {
$output .= tableFormRow(WebGUI::International::get(314),
WebGUI::Form::text("firstName",20,50,$session{user}{firstName}));
$output .= tableFormRow(WebGUI::International::get(315),
WebGUI::Form::text("middleName",20,50,$session{user}{middleName}));
$output .= tableFormRow(WebGUI::International::get(316),
WebGUI::Form::text("lastName",20,50,$session{user}{lastName}));
}
if ($session{setting}{profileExtraContact}) {
$output .= tableFormRow(WebGUI::International::get(317),
WebGUI::Form::text("icq",20,30,$session{user}{icq}));
$output .= tableFormRow(WebGUI::International::get(318),
WebGUI::Form::text("aim",20,30,$session{user}{aim}));
$output .= tableFormRow(WebGUI::International::get(319),
WebGUI::Form::text("msnIM",20,30,$session{user}{msnIM}));
$output .= tableFormRow(WebGUI::International::get(320),
WebGUI::Form::text("yahooIM",20,30,$session{user}{yahooIM}));
$output .= tableFormRow(WebGUI::International::get(321),
WebGUI::Form::text("cellPhone",20,30,$session{user}{cellPhone}));
$output .= tableFormRow(WebGUI::International::get(322),
WebGUI::Form::text("pager",20,30,$session{user}{pager}));
}
if ($session{setting}{profileHome}) {
$output .= tableFormRow(WebGUI::International::get(323),
WebGUI::Form::text("homeAddress",20,128,$session{user}{homeAddress}));
$output .= tableFormRow(WebGUI::International::get(324),
WebGUI::Form::text("homeCity",20,30,$session{user}{homeCity}));
$output .= tableFormRow(WebGUI::International::get(325),
WebGUI::Form::text("homeState",20,30,$session{user}{homeState}));
$output .= tableFormRow(WebGUI::International::get(326),
WebGUI::Form::text("homeZip",20,15,$session{user}{homeZip}));
$output .= tableFormRow(WebGUI::International::get(327),
WebGUI::Form::text("homeCountry",20,30,$session{user}{homeCountry}));
$output .= tableFormRow(WebGUI::International::get(328),
WebGUI::Form::text("homePhone",20,30,$session{user}{homePhone}));
}
if ($session{setting}{profileWork}) {
$output .= tableFormRow(WebGUI::International::get(329),
WebGUI::Form::text("workAddress",20,128,$session{user}{workAddress}));
$output .= tableFormRow(WebGUI::International::get(330),
WebGUI::Form::text("workCity",20,30,$session{user}{workCity}));
$output .= tableFormRow(WebGUI::International::get(331),
WebGUI::Form::text("workState",20,30,$session{user}{workState}));
$output .= tableFormRow(WebGUI::International::get(332),
WebGUI::Form::text("workZip",20,15,$session{user}{workZip}));
$output .= tableFormRow(WebGUI::International::get(333),
WebGUI::Form::text("workCountry",20,30,$session{user}{workCountry}));
$output .= tableFormRow(WebGUI::International::get(334),
WebGUI::Form::text("workPhone",20,30,$session{user}{workPhone}));
}
if ($session{setting}{profileMisc}) {
$array[0] = $session{user}{gender};
$output .= tableFormRow(WebGUI::International::get(335),
WebGUI::Form::selectList("gender",\%gender,\@array));
$output .= tableFormRow(WebGUI::International::get(336),
WebGUI::Form::text("birthdate",20,30,$session{user}{birthdate}));
$output .= tableFormRow(WebGUI::International::get(337),
WebGUI::Form::text("homepage",20,2048,$session{user}{homepage}));
}
$output .= formSave();
$output .= '</table>';
$output .= '</form>';
$f = WebGUI::HTMLForm->new;
$f->hidden("op","editProfileSave");
$f->hidden("uid",$session{user}{userId});
$a = WebGUI::SQL->read("select * from userProfileField,userProfileCategory
where userProfileField.profileCategoryId=userProfileCategory.profileCategoryId
order by userProfileCategory.sequenceNumber,userProfileField.sequenceNumber");
while(%data = $a->hash) {
if ($data{visible}) {
$category = eval $data{categoryName};
if ($category ne $previousCategory) {
$f->raw('<tr><td colspan="2" class="tableHeader">'.$category.'</td></tr>');
}
$values = eval $data{dataValues};
$method = $data{dataType};
$label = eval $data{fieldLabel};
if ($data{required}) {
$subtext = "*";
} else {
$subtext = "";
}
if ($method eq "select") {
# note: this big if statement doesn't look elegant, but doing regular
# ORs caused problems with the array reference.
if ($session{form}{$data{fieldName}}) {
$default = [$session{form}{$data{fieldName}}];
} elsif ($session{user}{$data{fieldName}}) {
$default = [$session{user}{$data{fieldName}}];
} else {
$default = eval $data{dataDefault};
}
$f->select($data{fieldName},$values,$label,$default,'','','',$subtext);
} else {
$default = $session{form}{$data{fieldName}}
|| $session{user}{$data{fieldName}}
|| eval $data{dataDefault};
$f->$method($data{fieldName},$label,$default,'','',$subtext);
}
$previousCategory = $category;
}
}
$a->finish;
$f->submit;
$output .= $f->print;
$output .= _accountOptions();
} else {
$output .= www_displayLogin();
@ -370,9 +397,18 @@ sub www_editProfile {
#-------------------------------------------------------------------
sub www_editProfileSave {
my ($profile, $fieldName, $error, $u);
if ($session{user}{userId} != 1) {
WebGUI::SQL->write("update users set firstName=".quote($session{form}{firstName}).", middleName=".quote($session{form}{middleName}).", lastName=".quote($session{form}{lastName}).", icq=".quote($session{form}{icq}).", aim=".quote($session{form}{aim}).", msnIM=".quote($session{form}{msnIM}).", yahooIM=".quote($session{form}{yahooIM}).", homeAddress=".quote($session{form}{homeAddress}).", homeCity=".quote($session{form}{homeCity}).", homeState=".quote($session{form}{homeState}).", homeZip=".quote($session{form}{homeZip}).", homeCountry=".quote($session{form}{homeCountry}).", homePhone=".quote($session{form}{homePhone}).", workAddress=".quote($session{form}{workAddress}).", workCity=".quote($session{form}{workCity}).", workState=".quote($session{form}{workState}).", workZip=".quote($session{form}{workZip}).", workCountry=".quote($session{form}{workCountry}).", workPhone=".quote($session{form}{workPhone}).", cellPhone=".quote($session{form}{cellPhone}).", pager=".quote($session{form}{pager}).", gender=".quote($session{form}{gender}).", birthdate=".quote($session{form}{birthdate}).", homepage=".quote($session{form}{homepage})." where userId=".$session{form}{uid});
return www_displayAccount();
($profile, $error) = _validateProfileData();
if ($error eq "") {
$u = WebGUI::User->new($session{user}{userId});
foreach $fieldName (keys %{$profile}) {
$u->profileField($fieldName,${$profile}{$fieldName});
}
return www_displayAccount();
} else {
return '<ul>'.$error.'</ul>'.www_editProfile();
}
} else {
return www_displayLogin();
}
@ -380,10 +416,11 @@ sub www_editProfileSave {
#-------------------------------------------------------------------
sub www_login {
my ($uri, $port, $ldap, %args, $auth, $error, $uid,$pass,$authMethod, $ldapURL, $connectDN, $success);
($uid,$pass,$authMethod, $ldapURL, $connectDN) = WebGUI::SQL->quickArray("select userId,identifier,authMethod,ldapURL,connectDN from users where username=".quote($session{form}{username}));
if ($authMethod eq "LDAP") {
$uri = URI->new($ldapURL);
my ($uri, $port, $ldap, %args, $auth, $error, $uid, $success, $u);
($uid) = WebGUI::SQL->quickArray("select userId from users where username=".quote($session{form}{username}));
$u = WebGUI::User->new($uid);
if ($u->authMethod eq "LDAP") {
$uri = URI->new($u->ldapURL);
if ($uri->port < 1) {
$port = 389;
} else {
@ -391,7 +428,7 @@ sub www_login {
}
%args = (port => $port);
$ldap = Net::LDAP->new($uri->host, %args) or $error = WebGUI::International::get(79);
$auth = $ldap->bind(dn=>$connectDN, password=>$session{form}{identifier});
$auth = $ldap->bind(dn=>$u->connectDN, password=>$session{form}{identifier});
if ($auth->code == 48 || $auth->code == 49) {
$error = WebGUI::International::get(68);
WebGUI::ErrorHandler::warn("Invalid login for user account: ".$session{form}{username});
@ -406,7 +443,7 @@ sub www_login {
}
$ldap->unbind;
} else {
if (Digest::MD5::md5_base64($session{form}{identifier}) eq $pass && $session{form}{identifier} ne "") {
if (Digest::MD5::md5_base64($session{form}{identifier}) eq $u->identifier && $session{form}{identifier} ne "") {
$success = 1;
} else {
$error = WebGUI::International::get(68);
@ -431,20 +468,18 @@ sub www_logout {
#-------------------------------------------------------------------
sub www_recoverPassword {
my ($output);
my ($output, $f);
if ($session{var}{sessionId}) {
$output .= www_displayAccount();
} else {
$output .= '<h1>'.WebGUI::International::get(71).'</h1>';
$output .= formHeader();
$output .= WebGUI::Form::hidden("op","recoverPasswordFinish");
$output .= '<table>';
$output .= tableFormRow(WebGUI::International::get(56),WebGUI::Form::text("email",20,255));
$output .= '<tr><td></td><td>'.WebGUI::Form::submit(WebGUI::International::get(72)).'</td></tr>';
$output .= '</table>';
$output .= '</form>';
$f = WebGUI::HTMLForm->new;
$f->hidden("op","recoverPasswordFinish");
$f->email("email",WebGUI::International::get(56));
$f->submit(WebGUI::International::get(72));
$output .= $f->print;
$output .= '<div class="accountOptions"><ul>';
if ($session{setting}{anonymousRegistration} eq "yes") {
if ($session{setting}{anonymousRegistration}) {
$output .= '<li><a href="'.WebGUI::URL::page('op=createAccount').'">'.
WebGUI::International::get(67).'</a>';
}
@ -458,7 +493,9 @@ sub www_recoverPassword {
#-------------------------------------------------------------------
sub www_recoverPasswordFinish {
my ($sth, $username, $encryptedPassword, $userId, $password, $flag, $message, $output);
$sth = WebGUI::SQL->read("select username, userId from users where email=".quote($session{form}{email}));
$sth = WebGUI::SQL->read("select users.username, users.userId from users, userProfileData
where users.userId=userProfileData.userId and userProfileData.fieldName='email'
and fieldData=".quote($session{form}{email}));
while (($username,$userId) = $sth->array) {
foreach (0,1,2,3,4,5) {
$password .= chr(ord('A') + randint(32));
@ -484,7 +521,7 @@ sub www_recoverPasswordFinish {
#-------------------------------------------------------------------
sub www_updateAccount {
my ($output, $error, $encryptedPassword, $passwordStatement);
my ($output, $error, $encryptedPassword, $passwordStatement, $u);
if ($session{var}{sessionId}) {
if (_hasBadUsername($session{form}{username})) {
$error = WebGUI::International::get(77);
@ -502,14 +539,15 @@ sub www_updateAccount {
}
}
if ($error eq "") {
$u = WebGUI::User->new($session{user}{userId});
$encryptedPassword = Digest::MD5::md5_base64($session{form}{identifier1});
WebGUI::SQL->write("update users set username=".quote($session{form}{username}).$passwordStatement.", email=".quote($session{form}{email}).", language=".quote($session{form}{language})." where userId=".$session{user}{userId});
$u->identifier($encryptedPassword);
$u->username($session{form}{username});
$output .= WebGUI::International::get(81).'<p>';
$output .= www_displayAccount();
} else {
$output = $error;
$output .= www_createAccount();
}
$output .= www_displayAccount();
} else {
$output .= www_displayLogin();
}
@ -555,69 +593,35 @@ sub www_viewMessageLog {
#-------------------------------------------------------------------
sub www_viewProfile {
my ($output, %user, %gender);
my ($a, %data, $category, $label, $value, $previousCategory, $output, $u, %gender);
%gender = ('neuter'=>WebGUI::International::get(403),'male'=>WebGUI::International::get(339),'female'=>WebGUI::International::get(340));
%user = WebGUI::SQL->quickHash("select * from users where userId='$session{form}{uid}'");
if ($user{username} eq "") {
$u = WebGUI::User->new($session{form}{uid});
if ($u->username eq "") {
WebGUI::Privilege::notMember();
} elsif ($session{user}{userId} != 1) {
$output .= '<h1>'.WebGUI::International::get(347).' '.$user{username}.'</h1>';
$output .= '<h1>'.WebGUI::International::get(347).' '.$u->username.'</h1>';
$output .= '<table>';
if ($user{email} ne "") {
$output .= '<tr><td class="tableHeader" valign="top">'.WebGUI::International::get(56).'</td><td class="tableData"><a href="mailto:'.$user{email}.'">'.$user{email}.'</a></td></tr>';
}
if ($session{setting}{profileName}) {
if ($user{firstName} ne "") {
$output .= '<tr><td class="tableHeader" valign="top">'.WebGUI::International::get(348).'</td><td class="tableData">'.$user{firstName}.' '.$user{middleName}.' '.$user{lastName}.'</td></tr>';
}
}
if ($session{setting}{profileExtraContact}) {
if ($user{icq} ne "") {
$output .= '<tr><td class="tableHeader" valign="top">'.WebGUI::International::get(317).'</td><td class="tableData">'.$user{icq}.'</td></tr>';
}
if ($user{aim} ne "") {
$output .= '<tr><td class="tableHeader" valign="top">'.WebGUI::International::get(318).'</td><td class="tableData">'.$user{aim}.'</td></tr>';
}
if ($user{msnIM} ne "") {
$output .= '<tr><td class="tableHeader" valign="top">'.WebGUI::International::get(319).'</td><td class="tableData">'.$user{msnIM}.'</td></tr>';
}
if ($user{yahooIM} ne "") {
$output .= '<tr><td class="tableHeader" valign="top">'.WebGUI::International::get(320).'</td><td class="tableData">'.$user{yahooIM}.'</td></tr>';
}
if ($user{cellPhone} ne "") {
$output .= '<tr><td class="tableHeader" valign="top">'.WebGUI::International::get(321).'</td><td class="tableData">'.$user{cellPhone}.'</td></tr>';
}
if ($user{pager} ne "") {
$output .= '<tr><td class="tableHeader" valign="top">'.WebGUI::International::get(322).'</td><td class="tableData">'.$user{pager}.'</td></tr>';
}
}
if ($session{setting}{profileHome}) {
if ($user{homeAddress} ne "") {
$output .= '<tr><td class="tableHeader" valign="top">'.WebGUI::International::get(323).'</td><td class="tableData">'.$user{homeAddress}.'<br>'.$user{homeCity}.', '.$user{homeState}.' '.$user{homeZip}.' '.$user{homeCountry}.'</td></tr>';
}
if ($user{homePhone} ne "") {
$output .= '<tr><td class="tableHeader" valign="top">'.WebGUI::International::get(328).'</td><td class="tableData">'.$user{homePhone}.'</td></tr>';
}
}
if ($session{setting}{profileWork}) {
if ($user{workAddress} ne "") {
$output .= '<tr><td class="tableHeader" valign="top">'.WebGUI::International::get(329).'</td><td class="tableData">'.$user{workAddress}.'<br>'.$user{workCity}.', '.$user{workState}.' '.$user{workZip}.' '.$user{workCountry}.'</td></tr>';
}
if ($user{workPhone} ne "") {
$output .= '<tr><td class="tableHeader" valign="top">'.WebGUI::International::get(334).'</td><td class="tableData">'.$user{workPhone}.'</td></tr>';
}
}
if ($session{setting}{profileMisc}) {
if ($user{gender} ne "") {
$output .= '<tr><td class="tableHeader" valign="top">'.WebGUI::International::get(335).'</td><td class="tableData">'.$gender{$user{gender}}.'</td></tr>';
}
if ($user{birthdate} ne "") {
$output .= '<tr><td class="tableHeader" valign="top">'.WebGUI::International::get(336).'</td><td class="tableData">'.$user{birthdate}.'</td></tr>';
}
if ($user{homepage} ne "") {
$output .= '<tr><td class="tableHeader" valign="top">'.WebGUI::International::get(337).'</td><td class="tableData"><a href="'.$user{homepage}.'">'.$user{homepage}.'</a></td></tr>';
$a = WebGUI::SQL->read("select * from userProfileField,userProfileCategory
where userProfileField.profileCategoryId=userProfileCategory.profileCategoryId
and userProfileCategory.profileCategoryId<>4
and userProfileField.visible=1
order by userProfileCategory.sequenceNumber,userProfileField.sequenceNumber");
while (%data = $a->hash) {
$category = eval $data{categoryName};
if ($category ne $previousCategory) {
$output .= '<tr><td colspan="2" class="tableHeader">'.$category.'</td></tr>';
}
$label = eval $data{fieldLabel};
if ($data{dataValues}) {
$value = eval $data{dataValues};
$value = ${$value}{$u->profileField($data{fieldName})};
} else {
$value = $u->profileField($data{fieldName});
}
$output .= '<tr><td class="tableHeader">'.$label.'</td><td class="tableData">'.$value.'</td></tr>';
$previousCategory = $category;
}
$a->finish;
$output .= '</table>';
if ($session{user}{userId} == $session{form}{uid}) {
$output .= _accountOptions();

View file

@ -23,7 +23,7 @@ use WebGUI::URL;
use WebGUI::Utility;
our @ISA = qw(Exporter);
our @EXPORT = qw(&www_movePageUp &www_movePageDown &www_addPage &www_addPageSave &www_cutPage &www_deletePage &www_deletePageConfirm &www_editPage &www_editPageSave &www_pastePage);
our @EXPORT = qw(&www_viewPageTree &www_movePageUp &www_movePageDown &www_addPage &www_addPageSave &www_cutPage &www_deletePage &www_deletePageConfirm &www_editPage &www_editPageSave &www_pastePage);
#-------------------------------------------------------------------
sub _recursivelyChangePrivileges {
@ -52,12 +52,38 @@ sub _reorderPages {
my ($sth, $i, $pid);
$sth = WebGUI::SQL->read("select pageId from page where parentId=$_[0] order by sequenceNumber");
while (($pid) = $sth->array) {
WebGUI::SQL->write("update page set sequenceNumber='$i' where pageId=$pid");
$i++;
WebGUI::SQL->write("update page set sequenceNumber='$i' where pageId=$pid");
}
$sth->finish;
}
#-------------------------------------------------------------------
sub _traversePageTree {
my ($a, $b, %page, %widget, $output, $depth, $i, $spacer);
tie %page, 'Tie::CPHash';
tie %widget, 'Tie::CPHash';
$spacer = '<img src="'.$session{setting}{lib}.'/spacer.gif" width=12>';
for ($i=1;$i<=$_[1];$i++) {
$depth .= $spacer;
}
$a = WebGUI::SQL->read("select * from page where (pageId<2 or pageId>25) and parentId='$_[0]' order by sequenceNumber");
while (%page = $a->hash) {
$output .= $depth.'<img src="'.$session{setting}{lib}.'/page.gif" align="middle">'.
' <a href="'.WebGUI::URL::gateway($page{urlizedTitle}).'">'.$page{title}.'</a><br>';
$b = WebGUI::SQL->read("select * from widget where pageId=$page{pageId}");
while (%widget = $b->hash) {
$output .= $depth.$spacer.
'<img src="'.$session{setting}{lib}.'/widget.gif"> '.
$widget{title}.'<br>';
}
$b->finish;
$output .= _traversePageTree($page{pageId},$_[1]+1);
}
$a->finish;
return $output;
}
#-------------------------------------------------------------------
sub www_addPage {
my ($output, @array, %hash);
@ -111,7 +137,7 @@ sub www_addPageSave {
} else {
$menuTitle = $session{form}{menuTitle};
}
$urlizedTitle = WebGUI::URL::makeUnique(WebGUI::URL::urlize($session{form}{title}));
$urlizedTitle = WebGUI::URL::makeUnique(WebGUI::URL::urlize($menuTitle));
WebGUI::SQL->write("insert into page values (".getNextId("pageId").", $parentId, ".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}', ".quote($menuTitle).", ".quote($session{form}{synopsis}).")");
return "";
} else {
@ -244,9 +270,9 @@ sub www_editPageSave {
$session{form}{title} = "no title";
}
$urlizedTitle = WebGUI::URL::makeUnique(
WebGUI::URL::urlize($session{form}{urlizedTitle}),
$session{page}{pageId}
);
WebGUI::URL::urlize($session{form}{urlizedTitle}),
$session{page}{pageId}
);
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}', menuTitle=".quote($session{form}{menuTitle}).", synopsis=".quote($session{form}{synopsis})." where pageId=$session{page}{pageId}");
if ($session{form}{recurseStyle} eq "yes") {
_recursivelyChangeStyle($session{page}{pageId});
@ -296,8 +322,8 @@ sub www_movePageUp {
#-------------------------------------------------------------------
sub www_pastePage {
my ($output, $nextSeq);
($nextSeq) = WebGUI::SQL->quickArray("select max(sequenceNumber) from page where parentId=$session{page}{pageId}");
$nextSeq += 1;
($nextSeq) = WebGUI::SQL->quickArray("select max(sequenceNumber) from page where parentId=$session{page}{pageId}");
$nextSeq += 1;
if (WebGUI::Privilege::canEditPage()) {
WebGUI::SQL->write("update page set parentId=$session{page}{pageId}, sequenceNumber='$nextSeq' where pageId=$session{form}{pageId}");
_reorderPages($session{page}{pageId});
@ -307,6 +333,13 @@ sub www_pastePage {
}
}
#-------------------------------------------------------------------
sub www_viewPageTree {
my ($output);
$output = '<h1>'.WebGUI::International::get(448).'</h1>';
$output .= _traversePageTree(0,0);
return $output;
}
1;

View file

@ -0,0 +1,363 @@
package WebGUI::Operation::ProfileSettings;
#-------------------------------------------------------------------
# WebGUI is Copyright 2001-2002 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::CPHash;
use Tie::IxHash;
use WebGUI::HTMLForm;
use WebGUI::Icon;
use WebGUI::International;
use WebGUI::Privilege;
use WebGUI::Session;
use WebGUI::SQL;
our @ISA = qw(Exporter);
our @EXPORT = qw(&www_deleteProfileCategoryConfirm &www_deleteProfileFieldConfirm &www_editProfileCategorySave &www_editProfileFieldSave &www_deleteProfileCategory &www_deleteProfileField &www_editProfileCategory &www_editProfileField &www_moveProfileCategoryDown &www_moveProfileCategoryUp &www_moveProfileFieldDown &www_moveProfileFieldUp &www_editProfileSettings);
#-------------------------------------------------------------------
sub _reorderCategories {
my ($sth, $i, $id);
$sth = WebGUI::SQL->read("select profileCategoryId from userProfileCategory order by sequenceNumber");
while (($id) = $sth->array) {
$i++;
WebGUI::SQL->write("update userProfileCategory set sequenceNumber='$i' where profileCategoryId=$id");
}
$sth->finish;
}
#-------------------------------------------------------------------
sub _reorderFields {
my ($sth, $i, $id);
$sth = WebGUI::SQL->read("select fieldName from userProfileField where profileCategoryId=".quote($_[0])." order by sequenceNumber");
while (($id) = $sth->array) {
$i++;
WebGUI::SQL->write("update userProfileField set sequenceNumber='$i' where fieldName=".quote($id));
}
$sth->finish;
}
#-------------------------------------------------------------------
sub _subMenu {
my ($output);
$output = '<table width="100%"><tr><td class="tableData" valign="top">';
$output .= $_[0];
$output .= '</td><td class="tableMenu" valign="top">';
$output .= '<li><a href="'.WebGUI::URL::page("op=editProfileCategory").'">'.WebGUI::International::get(490).'</a>';
$output .= '<li><a href="'.WebGUI::URL::page("op=editProfileField").'">'.WebGUI::International::get(491).'</a>';
$output .= '<li><a href="'.WebGUI::URL::page("op=editProfileSettings").'">'.WebGUI::International::get(492).'</a>';
$output .= '<li><a href="'.WebGUI::URL::page().'">'.WebGUI::International::get(493).'</a>';
$output .= '</td></tr></table>';
return $output;
}
#-------------------------------------------------------------------
sub www_deleteProfileCategory {
my ($output);
if ($session{form}{cid} < 100) {
return WebGUI::Privilege::vitalComponent();
} elsif (WebGUI::Privilege::isInGroup(3)) {
$output = '<h1>'.WebGUI::International::get(42).'</h1>';
$output .= WebGUI::International::get(466).'<p>';
$output .= '<div align="center"><a href="'.
WebGUI::URL::page('op=deleteProfileCategoryConfirm&cid='.$session{form}{cid}).
'">'.WebGUI::International::get(44).'</a>';
$output .= '&nbsp;&nbsp;&nbsp;&nbsp;<a href="'.WebGUI::URL::page('op=editProfileSettings').'">'.
WebGUI::International::get(45).'</a></div>';
return _subMenu($output);
} else {
return WebGUI::Privilege::adminOnly();
}
}
#-------------------------------------------------------------------
sub www_deleteProfileCategoryConfirm {
if ($session{form}{cid} < 100) {
return WebGUI::Privilege::vitalComponent();
} elsif (WebGUI::Privilege::isInGroup(3)) {
WebGUI::SQL->write("delete from userProfileCategory where profileCategoryId=$session{form}{cid}");
WebGUI::SQL->write("update userProfileField set profileCategoryId=1 where profileCategoryId=$session{form}{cid}");
return www_editProfileSettings();
} else {
return WebGUI::Privilege::adminOnly();
}
}
#-------------------------------------------------------------------
sub www_deleteProfileField {
my ($output,$protected);
($protected) = WebGUI::SQL->quickArray("select protected from userProfileField where fieldname=".quote($session{form}{fid}));
if ($protected) {
return WebGUI::Privilege::vitalComponent();
} elsif (WebGUI::Privilege::isInGroup(3)) {
$output = '<h1>'.WebGUI::International::get(42).'</h1>';
$output .= WebGUI::International::get(467).'<p>';
$output .= '<div align="center"><a href="'.
WebGUI::URL::page('op=deleteProfileFieldConfirm&fid='.$session{form}{fid}).
'">'.WebGUI::International::get(44).'</a>';
$output .= '&nbsp;&nbsp;&nbsp;&nbsp;<a href="'.WebGUI::URL::page('op=editProfileSettings').'">'.
WebGUI::International::get(45).'</a></div>';
return _subMenu($output);
} else {
return WebGUI::Privilege::adminOnly();
}
}
#-------------------------------------------------------------------
sub www_deleteProfileFieldConfirm {
my ($protected);
($protected) = WebGUI::SQL->quickArray("select protected from userProfileField where fieldname=".quote($session{form}{fid}));
if ($protected) {
return WebGUI::Privilege::vitalComponent();
} elsif (WebGUI::Privilege::isInGroup(3)) {
WebGUI::SQL->write("delete from userProfileField where fieldName=".quote($session{form}{fid}));
WebGUI::SQL->write("delete from userProfileData where fieldName=".quote($session{form}{fid}));
return www_editProfileSettings();
} else {
return WebGUI::Privilege::adminOnly();
}
}
#-------------------------------------------------------------------
sub www_editProfileCategory {
my ($output, $f, %data);
tie %data, 'Tie::CPHash';
if (WebGUI::Privilege::isInGroup(3)) {
$output = '<h1>'.WebGUI::International::get(468).'</h1>';
$f = WebGUI::HTMLForm->new;
$f->hidden("op","editProfileCategorySave");
if ($session{form}{cid}) {
$f->hidden("cid",$session{form}{cid});
$f->readOnly($session{form}{cid},WebGUI::International::get(469));
%data = WebGUI::SQL->quickHash("select * from userProfileCategory where profileCategoryId=$session{form}{cid}");
} else {
$f->hidden("cid","new");
}
$f->text("categoryName",WebGUI::International::get(470),$data{categoryName});
$f->submit;
$output .= $f->print;
return _subMenu($output);
} else {
return WebGUI::Privilege::adminOnly();
}
}
#-------------------------------------------------------------------
sub www_editProfileCategorySave {
my ($categoryId, $sequenceNumber);
if (WebGUI::Privilege::isInGroup(3)) {
if ($session{form}{cid} eq "new") {
$categoryId = getNextId("profileCategoryId");
($sequenceNumber) = WebGUI::SQL->quickArray("select max(sequenceNumber) from userProfileCategory");
WebGUI::SQL->write("insert into userProfileCategory values ($categoryId, ".quote($session{form}{categoryName}).",
".($sequenceNumber+1).")");
} else {
WebGUI::SQL->write("update userProfileCategory set categoryName=".quote($session{form}{categoryName})." where
profileCategoryId=$session{form}{cid}");
}
return www_editProfileSettings();
} else {
return WebGUI::Privilege::adminOnly();
}
}
#-------------------------------------------------------------------
sub www_editProfileField {
my ($output, $f, %data, %hash, $key);
tie %data, 'Tie::CPHash';
if (WebGUI::Privilege::isInGroup(3)) {
$output = '<h1>'.WebGUI::International::get(471).'</h1>';
$f = WebGUI::HTMLForm->new;
$f->hidden("op","editProfileFieldSave");
if ($session{form}{fid}) {
$f->hidden("fid",$session{form}{fid});
$f->readOnly($session{form}{fid},WebGUI::International::get(470));
%data = WebGUI::SQL->quickHash("select * from userProfileField where fieldName=".quote($session{form}{fid}));
} else {
$f->hidden("new",1);
$f->text("fid",WebGUI::International::get(470));
}
$f->text("fieldLabel",WebGUI::International::get(472),$data{fieldLabel});
$f->checkbox("visible",WebGUI::International::get(473),$data{visible});
$f->checkbox("required",WebGUI::International::get(474),$data{required});
tie %hash, 'Tie::IxHash';
%hash = ( 'text'=>WebGUI::International::get(475),
'textarea'=>WebGUI::International::get(476),
'HTMLArea'=>WebGUI::International::get(477),
'url'=>WebGUI::International::get(478),
'date'=>WebGUI::International::get(479),
'email'=>WebGUI::International::get(480),
'phone'=>WebGUI::International::get(481),
'integer'=>WebGUI::International::get(482),
'yesNo'=>WebGUI::International::get(483),
'select'=>WebGUI::International::get(484),
'checkbox'=>WebGUI::International::get(485)
);
$f->select("dataType",\%hash,WebGUI::International::get(486),[$data{dataType}]);
$f->textarea("dataValues",WebGUI::International::get(487),$data{dataValues});
$f->textarea("dataDefault",WebGUI::International::get(488),$data{dataDefault});
tie %hash, 'Tie::CPHash';
%hash = WebGUI::SQL->buildHash("select profileCategoryId,categoryName from userProfileCategory order by categoryName");
foreach $key (keys %hash) {
$hash{$key} = eval $hash{$key};
}
$f->select("profileCategoryId",\%hash,WebGUI::International::get(489),[$data{profileCategoryId}]);
$f->submit;
$output .= $f->print;
return _subMenu($output);
} else {
return WebGUI::Privilege::adminOnly();
}
}
#-------------------------------------------------------------------
sub www_editProfileFieldSave {
my ($sequenceNumber, $fieldName);
if (WebGUI::Privilege::isInGroup(3)) {
if ($session{form}{new}) {
($fieldName) = WebGUI::SQL->quickArray("select count(*) from userProfileField
where fieldName=".quote($session{form}{fid}));
if ($fieldName) {
$session{form}{fid} .= '2';
}
($sequenceNumber) = WebGUI::SQL->quickArray("select max(sequenceNumber)
from userProfileField where profileCategoryId=$session{form}{profileCategoryId}");
WebGUI::SQL->write("insert into userProfileField (fieldName, sequenceNumber, protected)
values (".quote($session{form}{fid}).", ".($sequenceNumber+1).", 0)");
}
WebGUI::SQL->write("update userProfileField set
fieldLabel=".quote($session{form}{fieldLabel}).",
visible='$session{form}{visible}',
required='$session{form}{required}',
dataType=".quote($session{form}{dataType}).",
dataValues=".quote($session{form}{dataValues}).",
dataDefault=".quote($session{form}{dataDefault}).",
profileCategoryId=".quote($session{form}{profileCategoryId})."
where fieldName=".quote($session{form}{fid}));
return www_editProfileSettings();
} else {
return WebGUI::Privilege::adminOnly();
}
}
#-------------------------------------------------------------------
sub www_editProfileSettings {
my ($output, $a, %category, %field, $b);
tie %category, 'Tie::CPHash';
tie %field, 'Tie::CPHash';
if (WebGUI::Privilege::isInGroup(3)) {
$output = helpIcon(22);
$output .= '<h1>'.WebGUI::International::get(308).'</h1>';
$a = WebGUI::SQL->read("select * from userProfileCategory order by sequenceNumber");
while (%category = $a->hash) {
$output .= deleteIcon('op=deleteProfileCategory&cid='.$category{profileCategoryId});
$output .= editIcon('op=editProfileCategory&cid='.$category{profileCategoryId});
$output .= moveUpIcon('op=moveProfileCategoryUp&cid='.$category{profileCategoryId});
$output .= moveDownIcon('op=moveProfileCategoryDown&cid='.$category{profileCategoryId});
$output .= ' <b>';
$output .= eval $category{categoryName};
$output .= '</b><br>';
$b = WebGUI::SQL->read("select * from userProfileField where
profileCategoryId=$category{profileCategoryId} order by sequenceNumber");
while (%field = $b->hash) {
$output .= '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
$output .= deleteIcon('op=deleteProfileField&fid='.$field{fieldName});
$output .= editIcon('op=editProfileField&fid='.$field{fieldName});
$output .= moveUpIcon('op=moveProfileFieldUp&fid='.$field{fieldName});
$output .= moveDownIcon('op=moveProfileFieldDown&fid='.$field{fieldName});
$output .= ' ';
$output .= eval $field{fieldLabel};
$output .= '<br>';
}
$b->finish;
}
$a->finish;
return _subMenu($output);
} else {
return WebGUI::Privilege::adminOnly();
}
}
#-------------------------------------------------------------------
sub www_moveProfileCategoryDown {
my ($id, $thisSeq);
if (WebGUI::Privilege::isInGroup(3)) {
($thisSeq) = WebGUI::SQL->quickArray("select sequenceNumber from userProfileCategory where profileCategoryId=$session{form}{cid}");
($id) = WebGUI::SQL->quickArray("select profileCategoryId from userProfileCategory where sequenceNumber=$thisSeq+1");
if ($id ne "") {
WebGUI::SQL->write("update userProfileCategory set sequenceNumber=sequenceNumber+1 where profileCategoryId=$session{form}{cid}");
WebGUI::SQL->write("update userProfileCategory set sequenceNumber=sequenceNumber-1 where profileCategoryId=$id");
_reorderCategories();
}
return www_editProfileSettings();
} else {
return WebGUI::Privilege::adminOnly();
}
}
#-------------------------------------------------------------------
sub www_moveProfileCategoryUp {
my ($id, $thisSeq);
if (WebGUI::Privilege::isInGroup(3)) {
($thisSeq) = WebGUI::SQL->quickArray("select sequenceNumber from userProfileCategory where profileCategoryId=$session{form}{cid}");
($id) = WebGUI::SQL->quickArray("select profileCategoryId from userProfileCategory where sequenceNumber=$thisSeq-1");
if ($id ne "") {
WebGUI::SQL->write("update userProfileCategory set sequenceNumber=sequenceNumber-1 where profileCategoryId=$session{form}{cid}");
WebGUI::SQL->write("update userProfileCategory set sequenceNumber=sequenceNumber+1 where profileCategoryId=$id");
_reorderCategories();
}
return www_editProfileSettings();
} else {
return WebGUI::Privilege::adminOnly();
}
}
#-------------------------------------------------------------------
sub www_moveProfileFieldDown {
my ($id, $thisSeq, $profileCategoryId);
if (WebGUI::Privilege::isInGroup(3)) {
($thisSeq,$profileCategoryId) = WebGUI::SQL->quickArray("select sequenceNumber,profileCategoryId from userProfileField where fieldName=".quote($session{form}{fid}));
($id) = WebGUI::SQL->quickArray("select fieldName from userProfileField where profileCategoryId=$profileCategoryId and sequenceNumber=$thisSeq+1");
if ($id ne "") {
WebGUI::SQL->write("update userProfileField set sequenceNumber=sequenceNumber+1 where fieldName=".quote($session{form}{fid}));
WebGUI::SQL->write("update userProfileField set sequenceNumber=sequenceNumber-1 where fieldName=".quote($id));
_reorderFields($profileCategoryId);
}
return www_editProfileSettings();
} else {
return WebGUI::Privilege::adminOnly();
}
}
#-------------------------------------------------------------------
sub www_moveProfileFieldUp {
my ($id, $thisSeq, $profileCategoryId);
if (WebGUI::Privilege::isInGroup(3)) {
($thisSeq,$profileCategoryId) = WebGUI::SQL->quickArray("select sequenceNumber,profileCategoryId from userProfileField where fieldName=".quote($session{form}{fid}));
($id) = WebGUI::SQL->quickArray("select fieldName from userProfileField where profileCategoryId=$profileCategoryId and sequenceNumber=$thisSeq-1");
if ($id ne "") {
WebGUI::SQL->write("update userProfileField set sequenceNumber=sequenceNumber-1 where fieldName=".quote($session{form}{fid}));
WebGUI::SQL->write("update userProfileField set sequenceNumber=sequenceNumber+1 where fieldName=".quote($id));
_reorderFields($profileCategoryId);
}
return www_editProfileSettings();
} else {
return WebGUI::Privilege::adminOnly();
}
}
1;

View file

@ -12,41 +12,40 @@ package WebGUI::Operation::Settings;
use Exporter;
use strict;
use WebGUI::Form;
use WebGUI::HTMLForm;
use WebGUI::Icon;
use WebGUI::International;
use WebGUI::Privilege;
use WebGUI::Session;
use WebGUI::Shortcut;
use WebGUI::SQL;
use WebGUI::URL;
our @ISA = qw(Exporter);
our @EXPORT = qw(&www_editProfileSettings &www_editProfileSettingsSave &www_editAuthenticationSettings &www_editAuthenticationSettingsSave &www_editCompanyInformation &www_editCompanyInformationSave &www_editFileSettings &www_editFileSettingsSave &www_editMailSettings &www_editMailSettingsSave &www_editMiscSettings &www_editMiscSettingsSave &www_manageSettings);
our @EXPORT = qw(&www_editAuthenticationSettings &www_editAuthenticationSettingsSave &www_editCompanyInformation &www_editCompanyInformationSave &www_editFileSettings &www_editFileSettingsSave &www_editMailSettings &www_editMailSettingsSave &www_editMiscSettings &www_editMiscSettingsSave &www_manageSettings);
#-------------------------------------------------------------------
sub _saveSetting {
WebGUI::SQL->write("update settings set value=".quote($session{form}{$_[0]})." where name='$_[0]'");
}
#-------------------------------------------------------------------
sub www_editAuthenticationSettings {
my ($output, %authMethod, @array, %yesNo);
my ($output, %authMethod, $f);
%authMethod = ('WebGUI'=>'WebGUI', 'LDAP'=>'LDAP');
%yesNo = ('yes'=>WebGUI::International::get(138), 'no'=>WebGUI::International::get(139));
if (WebGUI::Privilege::isInGroup(3)) {
$output .= helpLink(2);
$output .= helpIcon(2);
$output .= '<h1>'.WebGUI::International::get(117).'</h1>';
$output .= formHeader();
$output .= WebGUI::Form::hidden("op","editAuthenticationSettingsSave");
$output .= '<table>';
$array[0] = $session{setting}{anonymousRegistration};
$output .= tableFormRow(WebGUI::International::get(118),WebGUI::Form::selectList("anonymousRegistration",\%yesNo, \@array));
$array[0] = $session{setting}{authMethod};
$output .= tableFormRow(WebGUI::International::get(119),WebGUI::Form::selectList("authMethod",\%authMethod, \@array));
$array[0] = $session{setting}{usernameBinding};
$output .= tableFormRow(WebGUI::International::get(306),WebGUI::Form::selectList("usernameBinding",\%yesNo, \@array));
$output .= tableFormRow(WebGUI::International::get(120),WebGUI::Form::text("ldapURL",30,2048,$session{setting}{ldapURL}));
$output .= tableFormRow(WebGUI::International::get(121),WebGUI::Form::text("ldapId",30,100,$session{setting}{ldapId}));
$output .= tableFormRow(WebGUI::International::get(122),WebGUI::Form::text("ldapIdName",30,100,$session{setting}{ldapIdName}));
$output .= tableFormRow(WebGUI::International::get(123),WebGUI::Form::text("ldapPasswordName",30,100,$session{setting}{ldapPasswordName}));
$output .= formSave();
$output .= '</table>';
$output .= '</form> ';
$f = WebGUI::HTMLForm->new;
$f->hidden("op","editAuthenticationSettingsSave");
$f->select("anonymousRegistration",WebGUI::International::get(118),$session{setting}{anonymousRegistration});
$f->select("authMethod",\%authMethod,WebGUI::International::get(119),[$session{setting}{authMethod}]);
$f->yesNo("usernameBinding",WebGUI::International::get(306),$session{setting}{usernameBinding});
$f->url("ldapURL",WebGUI::International::get(120),$session{setting}{ldapURL});
$f->text("ldapId",WebGUI::International::get(121),$session{setting}{ldapId});
$f->text("ldapIdName",WebGUI::International::get(122),$session{setting}{ldapIdName});
$f->text("ldapPasswordName",WebGUI::International::get(123),$session{setting}{ldapPasswordName});
$f->submit;
$output .= $f->print;
} else {
$output = WebGUI::Privilege::adminOnly();
}
@ -56,13 +55,13 @@ sub www_editAuthenticationSettings {
#-------------------------------------------------------------------
sub www_editAuthenticationSettingsSave {
if (WebGUI::Privilege::isInGroup(3)) {
WebGUI::SQL->write("update settings set value=".quote($session{form}{authMethod})." where name='authMethod'");
WebGUI::SQL->write("update settings set value=".quote($session{form}{ldapURL})." where name='ldapURL'");
WebGUI::SQL->write("update settings set value=".quote($session{form}{ldapId})." where name='ldapId'");
WebGUI::SQL->write("update settings set value=".quote($session{form}{ldapIdName})." where name='ldapIdName'");
WebGUI::SQL->write("update settings set value=".quote($session{form}{ldapPasswordName})." where name='ldapPasswordName'");
WebGUI::SQL->write("update settings set value=".quote($session{form}{anonymousRegistration})." where name='anonymousRegistration'");
WebGUI::SQL->write("update settings set value=".quote($session{form}{usernameBinding})." where name='usernameBinding'");
_saveSetting("authMethod");
_saveSetting("ldapURL");
_saveSetting("ldapId");
_saveSetting("ldapIdName");
_saveSetting("ldapPasswordName");
_saveSetting("anonymousRegistration");
_saveSetting("usernameBinding");
return www_manageSettings();
} else {
return WebGUI::Privilege::adminOnly();
@ -71,19 +70,17 @@ sub www_editAuthenticationSettingsSave {
#-------------------------------------------------------------------
sub www_editCompanyInformation {
my ($output);
my ($output, $f);
if (WebGUI::Privilege::isInGroup(3)) {
$output .= helpLink(6);
$output .= helpIcon(6);
$output .= '<h1>'.WebGUI::International::get(124).'</h1>';
$output .= formHeader();
$output .= WebGUI::Form::hidden("op","editCompanyInformationSave");
$output .= '<table>';
$output .= tableFormRow(WebGUI::International::get(125),WebGUI::Form::text("companyName",30,255,$session{setting}{companyName}));
$output .= tableFormRow(WebGUI::International::get(126),WebGUI::Form::text("companyEmail",30,255,$session{setting}{companyEmail}));
$output .= tableFormRow(WebGUI::International::get(127),WebGUI::Form::text("companyURL",30,2048,$session{setting}{companyURL}));
$output .= formSave();
$output .= '</table>';
$output .= '</form> ';
$f = WebGUI::HTMLForm->new;
$f->hidden("op","editCompanyInformationSave");
$f->text("companyName",WebGUI::International::get(125),$session{setting}{companyName});
$f->email("companyEmail",WebGUI::International::get(126),$session{setting}{companyEmail});
$f->url("companyURL",WebGUI::International::get(127),$session{setting}{companyURL});
$f->submit;
$output .= $f->print;
} else {
$output = WebGUI::Privilege::adminOnly();
}
@ -93,9 +90,9 @@ sub www_editCompanyInformation {
#-------------------------------------------------------------------
sub www_editCompanyInformationSave {
if (WebGUI::Privilege::isInGroup(3)) {
WebGUI::SQL->write("update settings set value=".quote($session{form}{companyName})." where name='companyName'");
WebGUI::SQL->write("update settings set value=".quote($session{form}{companyEmail})." where name='companyEmail'");
WebGUI::SQL->write("update settings set value=".quote($session{form}{companyURL})." where name='companyURL'");
_saveSetting("companyName");
_saveSetting("companyEmail");
_saveSetting("companyURL");
return www_manageSettings();
} else {
return WebGUI::Privilege::adminOnly();
@ -104,26 +101,19 @@ sub www_editCompanyInformationSave {
#-------------------------------------------------------------------
sub www_editFileSettings {
my ($output);
my ($output, $f);
if (WebGUI::Privilege::isInGroup(3)) {
$output .= helpLink(11);
$output .= helpIcon(11);
$output .= '<h1>'.WebGUI::International::get(128).'</h1>';
$output .= formHeader();
$output .= WebGUI::Form::hidden("op","editFileSettingsSave");
$output .= '<table>';
$output .= tableFormRow(WebGUI::International::get(129),
WebGUI::Form::text("lib",30,255,$session{setting}{lib}));
$output .= tableFormRow(WebGUI::International::get(130),
WebGUI::Form::text("maxAttachmentSize",30,11,$session{setting}{maxAttachmentSize}));
$output .= tableFormRow(WebGUI::International::get(406),
WebGUI::Form::text("thumbnailSize",30,3,$session{setting}{thumbnailSize}));
$output .= tableFormRow(WebGUI::International::get(131),
WebGUI::Form::text("attachmentDirectoryWeb",30,255,$session{setting}{attachmentDirectoryWeb}));
$output .= tableFormRow(WebGUI::International::get(132),
WebGUI::Form::text("attachmentDirectoryLocal",30,255,$session{setting}{attachmentDirectoryLocal}));
$output .= formSave();
$output .= '</table>';
$output .= '</form> ';
$f = WebGUI::HTMLForm->new;
$f->hidden("op","editFileSettingsSave");
$f->text("lib",WebGUI::International::get(129),$session{setting}{lib});
$f->integer("maxAttachmentSize",WebGUI::International::get(130),$session{setting}{maxAttachmentSize});
$f->integer("thumbnailSize",WebGUI::International::get(406),$session{setting}{thumbnailSize});
$f->text("attachmentDirectoryWeb",WebGUI::International::get(131),$session{setting}{attachmentDirectoryWeb});
$f->text("attachmentDirectoryLocal",WebGUI::International::get(132),$session{setting}{attachmentDirectoryLocal});
$f->submit;
$output .= $f->print;
} else {
$output = WebGUI::Privilege::adminOnly();
}
@ -133,15 +123,11 @@ sub www_editFileSettings {
#-------------------------------------------------------------------
sub www_editFileSettingsSave {
if (WebGUI::Privilege::isInGroup(3)) {
WebGUI::SQL->write("update settings set value=".quote($session{form}{lib})." where name='lib'");
WebGUI::SQL->write("update settings set value=".
quote($session{form}{maxAttachmentSize})." where name='maxAttachmentSize'");
WebGUI::SQL->write("update settings set value=".
quote($session{form}{thumbnailSize})." where name='thumbnailSize'");
WebGUI::SQL->write("update settings set value=".
quote($session{form}{attachmentDirectoryWeb})." where name='attachmentDirectoryWeb'");
WebGUI::SQL->write("update settings set value=".
quote($session{form}{attachmentDirectoryLocal})." where name='attachmentDirectoryLocal'");
_saveSetting("lib");
_saveSetting("maxAttachmentSize");
_saveSetting("thumbnailSize");
_saveSetting("attachementDirectoryWeb");
_saveSetting("attachmentDirectoryLocal");
return www_manageSettings();
} else {
return WebGUI::Privilege::adminOnly();
@ -150,18 +136,16 @@ sub www_editFileSettingsSave {
#-------------------------------------------------------------------
sub www_editMailSettings {
my ($output);
my ($output, $f);
if (WebGUI::Privilege::isInGroup(3)) {
$output .= helpLink(13);
$output .= helpIcon(13);
$output .= '<h1>'.WebGUI::International::get(133).'</h1>';
$output .= formHeader();
$output .= WebGUI::Form::hidden("op","editMailSettingsSave");
$output .= '<table>';
$output .= tableFormRow(WebGUI::International::get(134),WebGUI::Form::textArea("recoverPasswordEmail",$session{setting}{recoverPasswordEmail}));
$output .= tableFormRow(WebGUI::International::get(135),WebGUI::Form::text("smtpServer",30,255,$session{setting}{smtpServer}));
$output .= formSave();
$output .= '</table>';
$output .= '</form> ';
$f = WebGUI::HTMLForm->new;
$f->hidden("op","editMailSettingsSave");
$f->textarea("recoverPasswordEmail",WebGUI::International::get(134),$session{setting}{recoverPasswordEmail});
$f->text("smtpServer",WebGUI::International::get(135),$session{setting}{smtpServer});
$f->submit;
$output .= $f->print;
} else {
$output = WebGUI::Privilege::adminOnly();
}
@ -171,8 +155,8 @@ sub www_editMailSettings {
#-------------------------------------------------------------------
sub www_editMailSettingsSave {
if (WebGUI::Privilege::isInGroup(3)) {
WebGUI::SQL->write("update settings set value=".quote($session{form}{recoverPasswordEmail})." where name='recoverPasswordEmail'");
WebGUI::SQL->write("update settings set value=".quote($session{form}{smtpServer})." where name='smtpServer'");
_saveSetting("recoverPasswordEmail");
_saveSetting("smtpServer");
return www_manageSettings();
} else {
return WebGUI::Privilege::adminOnly();
@ -181,37 +165,26 @@ sub www_editMailSettingsSave {
#-------------------------------------------------------------------
sub www_editMiscSettings {
my ($output, @array, %notFoundPage, %yesNo, %criticalError, %htmlFilter);
%htmlFilter = ('none'=>WebGUI::International::get(420), 'most'=>WebGUI::International::get(421),
'all'=>WebGUI::International::get(419));
my ($output, %notFoundPage, %criticalError, %htmlFilter, $f);
%htmlFilter = ('none'=>WebGUI::International::get(420), 'most'=>WebGUI::International::get(421), 'all'=>WebGUI::International::get(419));
%criticalError = ('debug'=>WebGUI::International::get(414), 'friendly'=>WebGUI::International::get(415));
%notFoundPage = (1=>WebGUI::International::get(136), 4=>WebGUI::International::get(137));
%yesNo = ('1'=>WebGUI::International::get(138), '0'=>WebGUI::International::get(139));
if (WebGUI::Privilege::isInGroup(3)) {
$output .= helpLink(24);
$output .= helpIcon(24);
$output .= '<h1>'.WebGUI::International::get(140).'</h1>';
$output .= formHeader();
$output .= WebGUI::Form::hidden("op","editMiscSettingsSave");
$output .= '<table>';
$array[0] = $session{setting}{notFoundPage};
$output .= tableFormRow(WebGUI::International::get(141),
WebGUI::Form::selectList("notFoundPage",\%notFoundPage,\@array));
$output .= tableFormRow(WebGUI::International::get(142),
WebGUI::Form::text("sessionTimeout",30,11,$session{setting}{sessionTimeout}));
$output .= tableFormRow(WebGUI::International::get(398),
WebGUI::Form::text("docTypeDec", 70, 255, $session{setting}{docTypeDec}));
$array[0] = $session{setting}{preventProxyCache};
$output .= tableFormRow(WebGUI::International::get(400),
WebGUI::Form::selectList("preventProxyCache",\%yesNo,\@array));
$array[0] = $session{setting}{onCriticalError};
$output .= tableFormRow(WebGUI::International::get(413),
WebGUI::Form::selectList("onCriticalError",\%criticalError,\@array));
$array[0] = $session{setting}{filterContributedHTML};
$output .= tableFormRow(WebGUI::International::get(418),
WebGUI::Form::selectList("filterContributedHTML",\%htmlFilter,\@array));
$output .= formSave();
$output .= '</table>';
$output .= '</form> ';
$f = WebGUI::HTMLForm->new;
$f->hidden("op","editMiscSettingsSave");
$f->select("notFoundPage",\%notFoundPage,WebGUI::International::get(141),[$session{setting}{notFoundPage}]);
$f->integer("sessionTimeout",WebGUI::International::get(142),$session{setting}{sessionTimeout});
$f->text("docTypeDec",WebGUI::International::get(398),$session{setting}{docTypeDec});
$f->yesNo("preventProxyCache",WebGUI::International::get(400),$session{setting}{preventProxyCache});
$f->select("onCriticalError",\%criticalError,WebGUI::International::get(413),[$session{setting}{onCriticalError}]);
$f->select("filterContributedHTML",\%htmlFilter,WebGUI::International::get(418),[$session{setting}{filterContributedHTML}]);
$f->integer("textAreaRows",WebGUI::International::get(463),$session{setting}{textAreaRows});
$f->integer("textAreaCols",WebGUI::International::get(464),$session{setting}{textAreaCols});
$f->integer("textBoxSize",WebGUI::International::get(465),$session{setting}{textBoxSize});
$f->submit;
$output .= $f->print;
} else {
$output = WebGUI::Privilege::adminOnly();
}
@ -221,72 +194,26 @@ sub www_editMiscSettings {
#-------------------------------------------------------------------
sub www_editMiscSettingsSave {
if (WebGUI::Privilege::isInGroup(3)) {
WebGUI::SQL->write("update settings set value=".quote($session{form}{sessionTimeout}).
" where name='sessionTimeout'");
WebGUI::SQL->write("update settings set value=".quote($session{form}{notFoundPage}).
" where name='notFoundPage'");
WebGUI::SQL->write("update settings set value=".quote($session{form}{docTypeDec}).
" where name='docTypeDec'");
WebGUI::SQL->write("update settings set value=".quote($session{form}{preventProxyCache}).
" where name='preventProxyCache'");
WebGUI::SQL->write("update settings set value=".quote($session{form}{onCriticalError}).
" where name='onCriticalError'");
WebGUI::SQL->write("update settings set value=".quote($session{form}{filterContributedHTML}).
" where name='filterContributedHTML'");
_saveSetting("sessionTimeout");
_saveSetting("notFoundPage");
_saveSetting("docTypeDec");
_saveSetting("preventProxyCache");
_saveSetting("onCriticalError");
_saveSetting("filterContributedHTML");
_saveSetting("textAreaRows");
_saveSetting("textAreaCols");
_saveSetting("textBoxSize");
return www_manageSettings();
} else {
return WebGUI::Privilege::adminOnly();
}
}
#-------------------------------------------------------------------
sub www_editProfileSettings {
my ($output, @array, %yesNo);
%yesNo = ('1'=>WebGUI::International::get(138), '0'=>WebGUI::International::get(139));
if (WebGUI::Privilege::isInGroup(3)) {
$output .= helpLink(22);
$output .= '<h1>'.WebGUI::International::get(308).'</h1>';
$output .= formHeader();
$output .= WebGUI::Form::hidden("op","editProfileSettingsSave");
$output .= '<table>';
$array[0] = $session{setting}{profileName};
$output .= tableFormRow(WebGUI::International::get(309),WebGUI::Form::selectList("profileName",\%yesNo,\@array));
$array[0] = $session{setting}{profileExtraContact};
$output .= tableFormRow(WebGUI::International::get(310),WebGUI::Form::selectList("profileExtraContact",\%yesNo,\@array));
$array[0] = $session{setting}{profileHome};
$output .= tableFormRow(WebGUI::International::get(311),WebGUI::Form::selectList("profileHome",\%yesNo,\@array));
$array[0] = $session{setting}{profileWork};
$output .= tableFormRow(WebGUI::International::get(312),WebGUI::Form::selectList("profileWork",\%yesNo,\@array));
$array[0] = $session{setting}{profileMisc};
$output .= tableFormRow(WebGUI::International::get(313),WebGUI::Form::selectList("profileMisc",\%yesNo,\@array));
$output .= formSave();
$output .= '</table>';
$output .= '</form> ';
} else {
$output = WebGUI::Privilege::adminOnly();
}
return $output;
}
#-------------------------------------------------------------------
sub www_editProfileSettingsSave {
if (WebGUI::Privilege::isInGroup(3)) {
WebGUI::SQL->write("update settings set value=".quote($session{form}{profileName})." where name='profileName'");
WebGUI::SQL->write("update settings set value=".quote($session{form}{profileExtraContact})." where name='profileExtraContact'");
WebGUI::SQL->write("update settings set value=".quote($session{form}{profileHome})." where name='profileHome'");
WebGUI::SQL->write("update settings set value=".quote($session{form}{profileWork})." where name='profileWork'");
WebGUI::SQL->write("update settings set value=".quote($session{form}{profileMisc})." where name='profileMisc'");
return www_manageSettings();
} else {
return WebGUI::Privilege::adminOnly();
}
}
#-------------------------------------------------------------------
sub www_manageSettings {
my ($output);
if (WebGUI::Privilege::isInGroup(3)) {
$output .= helpLink(12);
$output .= helpIcon(12);
$output .= '<h1>'.WebGUI::International::get(143).'</h1>';
$output .= '<ul>';
$output .= '<li><a href="'.WebGUI::URL::page('op=editAuthenticationSettings').

View file

@ -125,10 +125,10 @@ sub www_viewStatistics {
($data) = WebGUI::SQL->quickArray("select count(*) from userSession");
$output .= '<tr><td class="tableHeader">'.WebGUI::International::get(146).'</td><td class="tableData">'.$data.' (<a href="'.WebGUI::URL::page("op=viewActiveSessions").'">'.WebGUI::International::get(423).'</a> / <a href="'.WebGUI::URL::page("op=viewLoginHistory").'">'.WebGUI::International::get(424).'</a>)</td></tr>';
($data) = WebGUI::SQL->quickArray("select count(*) from page where parentId>25");
$data += 1;
$data++;
$output .= '<tr><td class="tableHeader">'.WebGUI::International::get(147).'</td><td class="tableData">'.$data.'</td></tr>';
($data) = WebGUI::SQL->quickArray("select count(*) from widget");
$data -= 1;
$data--;
$output .= '<tr><td class="tableHeader">'.WebGUI::International::get(148).'</td><td class="tableData">'.$data.'</td></tr>';
($data) = WebGUI::SQL->quickArray("select count(*) from style where styleId>25");
$output .= '<tr><td class="tableHeader">'.WebGUI::International::get(427).'</td><td class="tableData">'.$data.'</td></tr>';

View file

@ -15,7 +15,7 @@ use Exporter;
use strict;
use Tie::CPHash;
use WebGUI::DateTime;
use WebGUI::Form;
use WebGUI::HTMLForm;
use WebGUI::International;
use WebGUI::Paginator;
use WebGUI::Privilege;
@ -23,41 +23,48 @@ use WebGUI::Session;
use WebGUI::Shortcut;
use WebGUI::SQL;
use WebGUI::URL;
use WebGUI::User;
use WebGUI::Utility;
our @ISA = qw(Exporter);
our @EXPORT = qw(&www_editUserGroupSave &www_deleteGrouping &www_editGrouping &www_editGroupingSave &www_becomeUser &www_addUser &www_addUserSave &www_deleteUser &www_deleteUserConfirm &www_editUser &www_editUserSave &www_listUsers);
our @EXPORT = qw(&www_editUserGroup &www_editUserProfile &www_editUserProfileSave &www_editUserGroupSave &www_deleteGrouping &www_editGrouping &www_editGroupingSave &www_becomeUser &www_addUser &www_addUserSave &www_deleteUser &www_deleteUserConfirm &www_editUser &www_editUserSave &www_listUsers);
#-------------------------------------------------------------------
sub _subMenu {
my ($output);
$output = '<table width="100%"><tr><td class="tableData" valign="top">';
$output .= $_[0];
$output .= '</td><td class="tableMenu" valign="top">';
$output .= '<li><a href="'.WebGUI::URL::page("op=addUser").'">'.WebGUI::International::get(169).'</a>';
$output .= '<li><a href="'.WebGUI::URL::page("op=editUser&uid=".$session{form}{uid}).'">'.WebGUI::International::get(457).'</a>';
$output .= '<li><a href="'.WebGUI::URL::page("op=editUserGroup&uid=".$session{form}{uid}).'">'.WebGUI::International::get(458).'</a>';
$output .= '<li><a href="'.WebGUI::URL::page("op=editUserProfile&uid=".$session{form}{uid}).'">'.WebGUI::International::get(459).'</a>';
$output .= '<li><a href="'.WebGUI::URL::page("op=listUsers").'">'.WebGUI::International::get(456).'</a>';
$output .= '</td></tr></table>';
return $output;
}
#-------------------------------------------------------------------
sub www_addUser {
my ($output, %hash, @array);
my ($output, %hash, $f);
tie %hash, 'Tie::IxHash';
if (WebGUI::Privilege::isInGroup(3)) {
$output .= helpLink(5);
$output .= '<h1>'.WebGUI::International::get(163).'</h1>';
$f = WebGUI::HTMLForm->new;
if ($session{form}{op} eq "addUserSave") {
$output .= '<ul><li>'.WebGUI::International::get(77).' '.$session{form}{username}.'Too or '.$session{form}{username}.'02</ul>';
}
$output .= formHeader();
$output .= WebGUI::Form::hidden("op","addUserSave");
$output .= '<table>';
$output .= tableFormRow(WebGUI::International::get(50),WebGUI::Form::text("username",20,35,$session{form}{username}));
$output .= tableFormRow(WebGUI::International::get(51),WebGUI::Form::password("identifier",20,35,$session{form}{username}));
$f->hidden("op","addUserSave");
$f->text("username",WebGUI::International::get(50),$session{form}{username});
$f->password("identifier",WebGUI::International::get(51));
%hash = ('WebGUI'=>'WebGUI', 'LDAP'=>'LDAP');
$array[0] = $session{setting}{authMethod};
$output .= tableFormRow(WebGUI::International::get(164),WebGUI::Form::selectList("authMethod",\%hash, \@array));
$output .= tableFormRow(WebGUI::International::get(165),WebGUI::Form::text("ldapURL",20,2048,$session{setting}{ldapURL}));
$output .= tableFormRow(WebGUI::International::get(166),WebGUI::Form::text("connectDN",20,255,$session{form}{connectDN}));
$output .= tableFormRow(WebGUI::International::get(56),WebGUI::Form::text("email",20,255,$session{form}{email}));
%hash = WebGUI::SQL->buildHash("select groupId,groupName from groups where groupName<>'Reserved' order by groupName");
$array[0] = 2;
$output .= tableFormRow(WebGUI::International::get(89),WebGUI::Form::selectList("groups",\%hash,\@array,5,1));
%hash = WebGUI::SQL->buildHash("select distinct(language) from international");
$array[0] = "English";
$output .= tableFormRow(WebGUI::International::get(304),WebGUI::Form::selectList("language",\%hash,\@array));
$output .= formSave();
$output .= '</table>';
$output .= '</form> ';
$f->select("authMethod",\%hash,WebGUI::International::get(164),[$session{setting}{authMethod}]);
$f->url("ldapURL",WebGUI::International::get(165),$session{setting}{ldapURL});
$f->text("connectDN",WebGUI::International::get(166),$session{form}{connectDN});
$f->group("groups",WebGUI::International::get(89),[2],5,1);
$f->submit;
$output .= $f->print;
} else {
$output = WebGUI::Privilege::adminOnly();
}
@ -66,20 +73,22 @@ sub www_addUser {
#-------------------------------------------------------------------
sub www_addUserSave {
my ($output, @groups, $uid, $gid, $encryptedPassword, $expireAfter);
my ($output, @groups, $uid, $u, $gid, $encryptedPassword, $expireAfter);
if (WebGUI::Privilege::isInGroup(3)) {
($uid) = WebGUI::SQL->quickArray("select userId from users where username=".
quote($session{form}{username}));
unless ($uid) {
$encryptedPassword = Digest::MD5::md5_base64($session{form}{identifier});
$uid = getNextId("userId");
WebGUI::SQL->write("insert into users (userId,username,identifier,email,authMethod,ldapURL,connectDN,language) values ($uid, ".quote($session{form}{username}).", ".quote($encryptedPassword).", ".quote($session{form}{email}).", ".quote($session{form}{authMethod}).", ".quote($session{form}{ldapURL}).", ".quote($session{form}{connectDN}).", ".quote($session{form}{language}).")");
$u = WebGUI::User->new("new");
$u->username($session{form}{username});
$u->identifier($encryptedPassword);
$u->connectDN($session{form}{connectDN});
$u->ldapURL($session{form}{ldapURL});
$u->authMethod($session{form}{authMethod});
@groups = $session{cgi}->param('groups');
foreach $gid (@groups) {
($expireAfter) = WebGUI::SQL->quickArray("select expireAfter from groups where groupId=$gid");
WebGUI::SQL->write("insert into groupings values ($gid, $uid, ".(time()+$expireAfter).")");
}
$output = www_listUsers();
$u->addToGroups(\@groups);
$session{form}{uid}=$u->userId;
$output = www_editUser();
} else {
$output = www_addUser();
}
@ -104,8 +113,10 @@ sub www_becomeUser {
#-------------------------------------------------------------------
sub www_deleteGrouping {
my ($u);
if (WebGUI::Privilege::isInGroup(3)) {
WebGUI::SQL->write("delete from groupings where groupId=$session{form}{gid} and userId=$session{form}{uid}");
$u = WebGUI::User->new($session{form}{uid});
$u->deleteFromGroups([$session{form}{gid}]);
return www_editUser();
} else {
return WebGUI::Privilege::adminOnly();
@ -134,11 +145,12 @@ sub www_deleteUser {
#-------------------------------------------------------------------
sub www_deleteUserConfirm {
my ($u);
if ($session{form}{uid} < 26) {
return WebGUI::Privilege::vitalComponent();
} elsif (WebGUI::Privilege::isInGroup(3)) {
WebGUI::SQL->write("delete from users where userId=$session{form}{uid}");
WebGUI::SQL->write("delete from groupings where userId=$session{form}{uid}");
$u = WebGUI::User->new($session{form}{uid});
$u->delete;
return www_listUsers();
} else {
return WebGUI::Privilege::adminOnly();
@ -147,23 +159,22 @@ sub www_deleteUserConfirm {
#-------------------------------------------------------------------
sub www_editGrouping {
my ($output, $username, $group, $expireDate);
my ($output, $username, $group, $expireDate, $f);
if (WebGUI::Privilege::isInGroup(3)) {
$output .= '<h1>'.WebGUI::International::get(370).'</h1>';
$output .= formHeader();
$output .= WebGUI::Form::hidden("op","editGroupingSave");
$output .= WebGUI::Form::hidden("uid",$session{form}{uid});
$output .= WebGUI::Form::hidden("gid",$session{form}{gid});
$f = WebGUI::HTMLForm->new;
$f->hidden("op","editGroupingSave");
$f->hidden("uid",$session{form}{uid});
$f->hidden("gid",$session{form}{gid});
($username) = WebGUI::SQL->quickArray("select username from users where userId=$session{form}{uid}");
($group) = WebGUI::SQL->quickArray("select groupName from groups where groupId=$session{form}{gid}");
($expireDate) = WebGUI::SQL->quickArray("select expireDate from groupings where groupId=$session{form}{gid} and userId=$session{form}{uid}");
$output .= '<table>';
$output .= tableFormRow(WebGUI::International::get(50),$username);
$output .= tableFormRow(WebGUI::International::get(84),$group);
$output .= tableFormRow(WebGUI::International::get(369),WebGUI::Form::text("expireDate",20,30,epochToSet($expireDate),1));
$output .= formSave();
$output .= '</table></form>';
return $output;
$f->readOnly($username,WebGUI::International::get(50));
$f->readOnly($group,WebGUI::International::get(84));
$f->date("expireDate",WebGUI::International::get(369),$expireDate);
$f->submit;
$output .= $f->print;
return _subMenu($output);
} else {
return WebGUI::Privilege::adminOnly();
}
@ -173,7 +184,7 @@ sub www_editGrouping {
sub www_editGroupingSave {
if (WebGUI::Privilege::isInGroup(3)) {
WebGUI::SQL->write("update groupings set expireDate=".setToEpoch($session{form}{expireDate})." where groupId=$session{form}{gid} and userId=$session{form}{uid}");
return www_editUser();
return www_editUserGroup();
} else {
return WebGUI::Privilege::adminOnly();
}
@ -181,89 +192,30 @@ sub www_editGroupingSave {
#-------------------------------------------------------------------
sub www_editUser {
my ($output, %user, %hash, @array, %gender, $sth, %data);
tie %user, 'Tie::CPHash';
tie %hash, 'Tie::CPHash';
my ($output, $f, $u, %data);
tie %data, 'Tie::IxHash';
if (WebGUI::Privilege::isInGroup(3)) {
%gender = ('neuter'=>WebGUI::International::get(403),'male'=>WebGUI::International::get(339),'female'=>WebGUI::International::get(340));
%user = WebGUI::SQL->quickHash("select * from users where userId=$session{form}{uid}");
$output .= '<table><tr><td valign="top">';
$u = WebGUI::User->new($session{form}{uid});
$output .= helpLink(5);
$output .= '<h1>'.WebGUI::International::get(168).'</h1>';
if ($session{form}{op} eq "editUserSave") {
$output .= '<ul><li>'.WebGUI::International::get(77).' '.$session{form}{username}.'Too or '.$session{form}{username}.'02</ul>';
}
$output .= formHeader();
$output .= WebGUI::Form::hidden("op","editUserSave");
$output .= WebGUI::Form::hidden("uid",$session{form}{uid});
$output .= '<table>';
$output .= tableFormRow(WebGUI::International::get(378),$session{form}{uid});
$output .= tableFormRow(WebGUI::International::get(50),WebGUI::Form::text("username",20,35,$user{username}));
$output .= tableFormRow(WebGUI::International::get(51),WebGUI::Form::password("identifier",20,35,"password"));
$f = WebGUI::HTMLForm->new;
$f->hidden("op","editUserSave");
$f->hidden("uid",$session{form}{uid});
$f->readOnly($session{form}{uid},WebGUI::International::get(378));
$f->readOnly(epochToHuman($u->dateCreated,"%z"),WebGUI::International::get(453));
$f->readOnly(epochToHuman($u->lastUpdated,"%z"),WebGUI::International::get(454));
$f->text("username",WebGUI::International::get(50),$u->username);
$f->password("identifier",WebGUI::International::get(51),"password");
%data = ('WebGUI'=>'WebGUI', 'LDAP'=>'LDAP');
$array[0] = $user{authMethod};
$output .= tableFormRow(WebGUI::International::get(164),WebGUI::Form::selectList("authMethod",\%data,\@array));
$output .= tableFormRow(WebGUI::International::get(165),WebGUI::Form::text("ldapURL",20,2048,$user{ldapURL}));
$output .= tableFormRow(WebGUI::International::get(166),WebGUI::Form::text("connectDN",20,255,$user{connectDN}));
$output .= tableFormRow(WebGUI::International::get(56),WebGUI::Form::text("email",20,255,$user{email}));
%data = WebGUI::SQL->buildHash("select distinct(language) from international");
@array = [];
$array[0] = $user{language};
$output .= tableFormRow(WebGUI::International::get(304),WebGUI::Form::selectList("language",\%data,\@array));
$output .= tableFormRow(WebGUI::International::get(314),WebGUI::Form::text("firstName",20,50,$user{firstName}));
$output .= tableFormRow(WebGUI::International::get(315),WebGUI::Form::text("middleName",20,50,$user{middleName}));
$output .= tableFormRow(WebGUI::International::get(316),WebGUI::Form::text("lastName",20,50,$user{lastName}));
$output .= tableFormRow(WebGUI::International::get(317),WebGUI::Form::text("icq",20,30,$user{icq}));
$output .= tableFormRow(WebGUI::International::get(318),WebGUI::Form::text("aim",20,30,$user{aim}));
$output .= tableFormRow(WebGUI::International::get(319),WebGUI::Form::text("msnIM",20,30,$user{msnIM}));
$output .= tableFormRow(WebGUI::International::get(320),WebGUI::Form::text("yahooIM",20,30,$user{yahooIM}));
$output .= tableFormRow(WebGUI::International::get(321),WebGUI::Form::text("cellPhone",20,30,$user{cellPhone}));
$output .= tableFormRow(WebGUI::International::get(322),WebGUI::Form::text("pager",20,30,$user{pager}));
$output .= tableFormRow(WebGUI::International::get(323),WebGUI::Form::text("homeAddress",20,128,$user{homeAddress}));
$output .= tableFormRow(WebGUI::International::get(324),WebGUI::Form::text("homeCity",20,30,$user{homeCity}));
$output .= tableFormRow(WebGUI::International::get(325),WebGUI::Form::text("homeState",20,30,$user{homeState}));
$output .= tableFormRow(WebGUI::International::get(326),WebGUI::Form::text("homeZip",20,15,$user{homeZip}));
$output .= tableFormRow(WebGUI::International::get(327),WebGUI::Form::text("homeCountry",20,30,$user{homeCountry}));
$output .= tableFormRow(WebGUI::International::get(328),WebGUI::Form::text("homePhone",20,30,$user{homePhone}));
$output .= tableFormRow(WebGUI::International::get(329),WebGUI::Form::text("workAddress",20,128,$user{workAddress}));
$output .= tableFormRow(WebGUI::International::get(330),WebGUI::Form::text("workCity",20,30,$user{workCity}));
$output .= tableFormRow(WebGUI::International::get(331),WebGUI::Form::text("workState",20,30,$user{workState}));
$output .= tableFormRow(WebGUI::International::get(332),WebGUI::Form::text("workZip",20,15,$user{workZip}));
$output .= tableFormRow(WebGUI::International::get(333),WebGUI::Form::text("workCountry",20,30,$user{workCountry}));
$output .= tableFormRow(WebGUI::International::get(334),WebGUI::Form::text("workPhone",20,30,$user{workPhone}));
@array = ($user{gender});
$output .= tableFormRow(WebGUI::International::get(335),WebGUI::Form::selectList("gender",\%gender,\@array));
$output .= tableFormRow(WebGUI::International::get(336),WebGUI::Form::text("birthdate",20,30,$user{birthdate}));
$output .= tableFormRow(WebGUI::International::get(337),WebGUI::Form::text("homepage",20,2048,$user{homepage}));
$output .= formSave();
$output .= '</table>';
$output .= '</form>';
$output .= '</td><td>&nbsp;</td><td class="formDescription" valign="top">';
$output .= '<h1>'.WebGUI::International::get(372).'</h1>';
$output .= formHeader();
$output .= WebGUI::Form::hidden("op","editUserGroupSave");
$output .= WebGUI::Form::hidden("uid",$session{form}{uid});
%data = WebGUI::SQL->buildHash("select groupId,groupName from groups where groupName<>'Reserved' order by groupName");
@array = WebGUI::SQL->buildArray("select groupId from groupings where userId=$session{form}{uid}");
$output .= WebGUI::Form::selectList("groups",\%data,\@array,5,1);
$output .= '<br>'.WebGUI::Form::submit(WebGUI::International::get(62));
$output .= '<p>'.WebGUI::International::get(373).'<p></form>';
$output .= '<table><tr><td class="tableHeader">'.WebGUI::International::get(89).'</td><td class="tableHeader">'.WebGUI::International::get(84).'</td><td class="tableHeader">'.WebGUI::International::get(369).'</td></tr>';
$sth = WebGUI::SQL->read("select groups.groupId,groups.groupName,groupings.expireDate from groupings,groups where groupings.groupId=groups.groupId and groupings.userId=$session{form}{uid} order by groups.groupName");
while (%hash = $sth->hash) {
$output .= '<tr><td><a href="'.WebGUI::URL::page('op=deleteGrouping&uid='.
$session{form}{uid}.'&gid='.$hash{groupId}).'"><img src="'.
$session{setting}{lib}.'/delete.gif" border=0></a><a href="'.
WebGUI::URL::page('op=editGrouping&uid='.$session{form}{uid}.
'&gid='.$hash{groupId}).'"><img src="'.$session{setting}{lib}.
'/edit.gif" border=0></a></td>';
$output .= '<td class="tableData">'.$hash{groupName}.'</td>';
$output .= '<td class="tableData">'.epochToHuman($hash{expireDate},"%M/%D/%y").'</td></tr>';
}
$sth->finish;
$output .= '</table>';
$output .= '</td></tr></table>';
$f->select("authMethod",\%data,WebGUI::International::get(164),[$u->authMethod]);
$f->url("ldapURL",WebGUI::International::get(165),$u->ldapURL);
$f->text("connectDN",WebGUI::International::get(166),$u->connectDN);
$f->submit;
$output .= $f->print;
$output = _subMenu($output);
} else {
$output = WebGUI::Privilege::adminOnly();
}
@ -272,7 +224,7 @@ sub www_editUser {
#-------------------------------------------------------------------
sub www_editUserSave {
my ($error, $uid, $encryptedPassword, $passwordStatement);
my ($error, $uid, $u, $encryptedPassword, $passwordStatement);
if (WebGUI::Privilege::isInGroup(3)) {
($uid) = WebGUI::SQL->quickArray("select userId from users where username=".
quote($session{form}{username}));
@ -282,7 +234,12 @@ sub www_editUserSave {
$passwordStatement = ', identifier='.quote($encryptedPassword);
}
$encryptedPassword = Digest::MD5::md5_base64($session{form}{identifier1});
WebGUI::SQL->write("update users set username=".quote($session{form}{username}).$passwordStatement.", authMethod=".quote($session{form}{authMethod}).", ldapURL=".quote($session{form}{ldapURL}).", connectDN=".quote($session{form}{connectDN}).", email=".quote($session{form}{email}).", language=".quote($session{form}{language}).", firstName=".quote($session{form}{firstName}).", middleName=".quote($session{form}{middleName}).", lastName=".quote($session{form}{lastName}).", icq=".quote($session{form}{icq}).", aim=".quote($session{form}{aim}).", msnIM=".quote($session{form}{msnIM}).", yahooIM=".quote($session{form}{yahooIM}).", homeAddress=".quote($session{form}{homeAddress}).", homeCity=".quote($session{form}{homeCity}).", homeState=".quote($session{form}{homeState}).", homeZip=".quote($session{form}{homeZip}).", homeCountry=".quote($session{form}{homeCountry}).", homePhone=".quote($session{form}{homePhone}).", workAddress=".quote($session{form}{workAddress}).", workCity=".quote($session{form}{workCity}).", workState=".quote($session{form}{workState}).", workZip=".quote($session{form}{workZip}).", workCountry=".quote($session{form}{workCountry}).", workPhone=".quote($session{form}{workPhone}).", cellPhone=".quote($session{form}{cellPhone}).", pager=".quote($session{form}{pager}).", gender=".quote($session{form}{gender}).", birthdate=".quote($session{form}{birthdate}).", homepage=".quote($session{form}{homepage})." where userId=".$session{form}{uid});
$u = WebGUI::User->new($session{form}{uid});
$u->username($session{form}{username});
$u->identifier($encryptedPassword);
$u->authMethod($session{form}{authMethod});
$u->connectDN($session{form}{connectDN});
$u->ldapURL($session{form}{ldapURL});
return www_listUsers();
} else {
return www_editUser();
@ -292,6 +249,45 @@ sub www_editUserSave {
}
}
#-------------------------------------------------------------------
sub www_editUserGroup {
my ($output, $f, @array, $sth, %hash);
tie %hash, 'Tie::CPHash';
if (WebGUI::Privilege::isInGroup(3)) {
$output .= '<h1>'.WebGUI::International::get(372).'</h1>';
$f = WebGUI::HTMLForm->new;
$f->hidden("op","editUserGroupSave");
$f->hidden("uid",$session{form}{uid});
@array = WebGUI::SQL->buildArray("select groupId from groupings where userId=$session{form}{uid}");
$f->group("groups",WebGUI::International::get(89),\@array,8,1);
$f->submit;
$f->readOnly(WebGUI::International::get(373));
$output .= $f->print;
$output .= '<table><tr><td class="tableHeader">'.WebGUI::International::get(89).
'</td><td class="tableHeader">'.WebGUI::International::get(84).
'</td><td class="tableHeader">'.WebGUI::International::get(369).'</td></tr>';
$sth = WebGUI::SQL->read("select groups.groupId,groups.groupName,groupings.expireDate
from groupings,groups where groupings.groupId=groups.groupId and
groupings.userId=$session{form}{uid} order by groups.groupName");
while (%hash = $sth->hash) {
$output .= '<tr><td><a href="'.WebGUI::URL::page('op=deleteGrouping&uid='.
$session{form}{uid}.'&gid='.$hash{groupId}).'"><img src="'.
$session{setting}{lib}.'/delete.gif" border=0></a><a href="'.
WebGUI::URL::page('op=editGrouping&uid='.$session{form}{uid}.
'&gid='.$hash{groupId}).'"><img src="'.$session{setting}{lib}.
'/edit.gif" border=0></a></td>';
$output .= '<td class="tableData">'.$hash{groupName}.'</td>';
$output .= '<td class="tableData">'.epochToHuman($hash{expireDate},"%z").'</td></tr>';
}
$sth->finish;
$output .= '</table>';
$output = _subMenu($output);
} else {
return WebGUI::Privilege::adminOnly();
}
return $output;
}
#-------------------------------------------------------------------
sub www_editUserGroupSave {
my (@groups, $gid, $expireAfter);
@ -302,7 +298,75 @@ sub www_editUserGroupSave {
($expireAfter) = WebGUI::SQL->quickArray("select expireAfter from groups where groupId=$gid");
WebGUI::SQL->write("insert into groupings values ($gid, $session{form}{uid}, ".(time()+$expireAfter).")");
}
return www_editUser();
return www_editUserGroup();
} else {
return WebGUI::Privilege::adminOnly();
}
}
#-------------------------------------------------------------------
sub www_editUserProfile {
my ($output, $f, $a, %data, $method, $values, $category, $label, $default, $previousCategory);
if (WebGUI::Privilege::isInGroup(3)) {
$output .= '<h1>'.WebGUI::International::get(455).'</h1>';
$f = WebGUI::HTMLForm->new;
$f->hidden("op","editUserProfileSave");
$f->hidden("uid",$session{form}{uid});
$a = WebGUI::SQL->read("select * from userProfileField,userProfileCategory
where userProfileField.profileCategoryId=userProfileCategory.profileCategoryId
order by userProfileCategory.sequenceNumber,userProfileField.sequenceNumber");
while(%data = $a->hash) {
$category = eval $data{categoryName};
if ($category ne $previousCategory) {
$f->raw('<tr><td colspan="2" class="tableHeader">'.$category.'</td></tr>');
}
$values = eval $data{dataValues};
$method = $data{dataType};
$label = eval $data{fieldLabel};
if ($method eq "select") {
# note: this big if statement doesn't look elegant, but doing regular
# ORs caused problems with the array reference.
if ($session{form}{$data{fieldName}}) {
$default = [$session{form}{$data{fieldName}}];
} elsif ($session{user}{$data{fieldName}}) {
$default = [$session{user}{$data{fieldName}}];
} else {
$default = eval $data{dataDefault};
}
$f->select($data{fieldName},$values,$label,$default);
} else {
$default = $session{form}{$data{fieldName}}
|| $session{user}{$data{fieldName}}
|| eval $data{dataDefault};
$f->$method($data{fieldName},$label,$default);
}
$previousCategory = $category;
}
$a->finish;
$f->submit;
$output .= $f->print;
$output = _subMenu($output);
} else {
$output .= WebGUI::Privilege::adminOnly();
}
return $output;
}
#-------------------------------------------------------------------
sub www_editUserProfileSave {
my ($a, %field, $u);
if (WebGUI::Privilege::isInGroup(3)) {
tie %field, 'Tie::CPHash';
$u = WebGUI::User->new($session{form}{uid});
$a = WebGUI::SQL->read("select * from userProfileField");
while (%field = $a->hash) {
if ($field{fieldType} eq "date") {
$session{form}{$field{fieldName}} = setToEpoch($session{form}{$field{fieldName}});
}
$u->profileField($field{fieldName},$session{form}{$field{fieldName}}) if (exists $session{form}{$field{fieldName}});
}
$a->finish;
return www_editUserProfile();
} else {
return WebGUI::Privilege::adminOnly();
}
@ -310,7 +374,8 @@ sub www_editUserGroupSave {
#-------------------------------------------------------------------
sub www_listUsers {
my ($output, $sth, @data, @row, $p, $i, $search);
my ($output, $sth, %data, @row, $p, $i, $search);
tie %data, 'Tie::CPHash';
if (WebGUI::Privilege::isInGroup(3)) {
$output = helpLink(8);
$output .= '<h1>'.WebGUI::International::get(149).'</h1>';
@ -322,27 +387,32 @@ sub www_listUsers {
$output .= WebGUI::Form::submit(WebGUI::International::get(170));
$output .= '</td></form></tr></table><p>';
if ($session{form}{keyword} ne "") {
$search = " and (username like '%".$session{form}{keyword}."%' or email like '%".$session{form}{keyword}."%') ";
$search = " where (users.username like '%".$session{form}{keyword}."%') ";
}
$sth = WebGUI::SQL->read("select userId,username,email from users where username<>'Reserved' $search order by username");
while (@data = $sth->array) {
$sth = WebGUI::SQL->read("select * from users $search order by users.username");
while (%data = $sth->hash) {
$row[$i] = '<tr class="tableData"><td>';
$row[$i] .= '<a href="'.WebGUI::URL::page('op=deleteUser&uid='.$data[0]).
$row[$i] .= '<a href="'.WebGUI::URL::page('op=deleteUser&uid='.$data{userId}).
'"><img src="'.$session{setting}{lib}.'/delete.gif" border=0></a>';
$row[$i] .= '<a href="'.WebGUI::URL::page('op=editUser&uid='.$data[0]).
$row[$i] .= '<a href="'.WebGUI::URL::page('op=editUser&uid='.$data{userId}).
'"><img src="'.$session{setting}{lib}.'/edit.gif" border=0></a>';
$row[$i] .= '<a href="'.WebGUI::URL::page('op=becomeUser&uid='.$data[0]).
$row[$i] .= '<a href="'.WebGUI::URL::page('op=becomeUser&uid='.$data{userId}).
'"><img src="'.$session{setting}{lib}.'/become.gif" border=0></a>';
$row[$i] .= '</td>';
$row[$i] .= '<td><a href="'.WebGUI::URL::page('op=viewProfile&uid='.$data[0])
.'">'.$data[1].'</a></td>';
#$row[$i] .= '<td>'.$data[1].'</td>';
$row[$i] .= '<td><a href="mailto:'.$data[2].'">'.$data[2].'</a></td></tr>';
$row[$i] .= '<td><a href="'.WebGUI::URL::page('op=viewProfile&uid='.$data{userId})
.'">'.$data{username}.'</a></td>';
$row[$i] .= '<td class="tableData">'.epochToHuman($data{dateCreated},"%z").'</td>';
$row[$i] .= '<td class="tableData">'.epochToHuman($data{lastUpdated},"%z").'</td>';
$row[$i] .= '</tr>';
$i++;
}
$sth->finish;
$p = WebGUI::Paginator->new(WebGUI::URL::page('op=listUsers'),\@row);
$output .= '<table border=1 cellpadding=5 cellspacing=0 align="center">';
$output .= '<tr><td class="tableHeader"></td>
<td class="tableHeader">'.WebGUI::International::get(50).'</td>
<td class="tableHeader">'.WebGUI::International::get(453).'</td>
<td class="tableHeader">'.WebGUI::International::get(454).'</td></tr>';
$output .= $p->getPage($session{form}{pn});
$output .= '</table>';
$output .= $p->getBarTraditional($session{form}{pn});

View file

@ -19,6 +19,7 @@ use WebGUI::SQL;
#-------------------------------------------------------------------
sub adminOnly {
$session{header}{status} = 403;
my ($output, $sth, @data);
$output = '<h1>'.WebGUI::International::get(35).'</h1>';
$output .= WebGUI::International::get(36);
@ -73,6 +74,7 @@ sub canViewPage {
#-------------------------------------------------------------------
sub insufficient {
$session{header}{status} = 403;
my ($output);
$output = '<h1>'.WebGUI::International::get(37).'</h1>';
$output .= WebGUI::International::get(38);
@ -100,6 +102,7 @@ sub isInGroup {
#-------------------------------------------------------------------
sub noAccess {
$session{header}{status} = 403;
my ($output);
if ($session{user}{userId} <= 1) {
$output = WebGUI::Operation::Account::www_displayAccount();
@ -113,6 +116,7 @@ sub noAccess {
#-------------------------------------------------------------------
sub notMember {
$session{header}{status} = 403;
my ($output);
$output = '<h1>'.WebGUI::International::get(345).'</h1>';
$output .= WebGUI::International::get(346);

105
lib/WebGUI/Profile.pm Normal file
View file

@ -0,0 +1,105 @@
package WebGUI::Profile;
=head1 LEGAL
-------------------------------------------------------------------
WebGUI is Copyright 2001-2002 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
-------------------------------------------------------------------
=cut
use strict;
use WebGUI::International;
use WebGUI::SQL;
use WebGUI::URL;
=head1 NAME
Package WebGUI::Profile
=head1 SYNOPSIS
use WebGUI::Profile;
$p = WebGUI::Profile->new(39);
=head1 DESCRIPTION
Package that allows getting and setting of user profile information.
=head1 METHODS
These methods are available from this class:
=cut
#-------------------------------------------------------------------
=head2 get ( )
Returns a profile hash for this user.
=cut
sub get {
my (%profile);
%profile = WebGUI::SQL->buildHash("select fieldName, fieldData from profileData where userId=$_[0]->{_userId}");
return %profile;
}
#-------------------------------------------------------------------
=head2 new ( userId )
Constructor.
=item userId
The userId for the profile you wish to manipulate.
=cut
sub new {
my ($class);
$class = shift;
bless {_userId => $_[1]}, $class;
}
#-------------------------------------------------------------------
=head setAttribute ( attributeName, value )
Sets the value of an attribute.
=item attributeName
An attribute of the user profile.
=item value
The value to set the above named attribute to.
=cut
sub setAttribute {
WebGUI::SQL::write("delete from profileData where userId=$_[0]->{_userId} and fieldName=".quote($_[1]));
WebGUI::SQL::write("insert into profileData values ($_[0]->{_userId}, ".quote($_[1]).", ".quote($_[2]).")");
if ($session{user}{userId} == $_[0]->{_userId}) {
$session{user}{$_[1]} = $_[2];
}
}
1;

View file

@ -35,15 +35,16 @@ our @EXPORT = qw(&quote &getNextId);
$sth = WebGUI::SQL->new($sql);
$sth = WebGUI::SQL->read($sql);
$sth = WebGUI::SQL->unconditionalRead($sql);
$sth->array;
$sth->getColumnNames;
$sth->hash;
$sth->hashRef;
$sth->rows;
@arr = $sth->array;
@arr = $sth->getColumnNames;
%hash = $sth->hash;
$hashRef = $sth->hashRef;
$num = $sth->rows;
$sth->finish;
@arr = WebGUI::SQL->buildArray($sql);
%hash = WebGUI::SQL->buildHash($sql);
$hashRef = WebGUI::SQL->buildHashRef($sql);
@arr = WebGUI::SQL->quickArray($sql);
%hash = WebGUI::SQL->quickHash($sql);
@ -131,17 +132,39 @@ sub buildHash {
tie %hash, "Tie::IxHash";
$sth = WebGUI::SQL->read($_[1],$_[2]);
while (@data = $sth->array) {
if ($data[1] eq "") {
$hash{$data[0]} = $data[0];
} else {
$hash{$data[0]} = $data[1];
}
$hash{$data[0]} = $data[1];
}
$sth->finish;
return %hash;
}
#-------------------------------------------------------------------
=head2 buildHashRef ( sql [, dbh ] )
Builds a hash reference of data from a series of rows.
=item sql
An SQL query. The query must select only two columns of data, the
first being the key for the hash, the second being the value.
=item dbh
By default this method uses the WebGUI database handler. However,
you may choose to pass in your own if you wish.
=cut
sub buildHashRef {
my ($sth, %hash);
tie %hash, "Tie::IxHash";
%hash = $_[0]->buildHash($_[1],$_[2]);
return \%hash;
}
#-------------------------------------------------------------------
=head2 errorCode {

View file

@ -44,6 +44,7 @@ sub _getPageInfo {
($pageId) = WebGUI::SQL->quickArray("select pageId from page where urlizedTitle='".$pageName."'",$_[1]);
if ($pageId eq "") {
$pageId = $_[2];
$session{header}{status} = '404';
}
} else {
$pageId = 1;
@ -69,13 +70,15 @@ sub _getSessionVars {
#-------------------------------------------------------------------
sub _getUserInfo {
my (%user, $uid);
my (%user, $uid, %profile);
tie %user, 'Tie::CPHash';
$uid = $_[0] || 1;
%user = WebGUI::SQL->quickHash("select * from users where userId='$uid'", $_[1]);
if ($user{userId} eq "") {
%user = _getUserInfo("1",$_[1]);
}
%profile = WebGUI::SQL->buildHash("select userProfileField.fieldName, userProfileData.fieldData from userProfileData, userProfileField where userProfileData.fieldName=userProfileField.fieldName and userProfileData.userId=$user{userId}", $_[1]);
%user = (%user, %profile);
return %user;
}
@ -95,7 +98,10 @@ sub end {
#-------------------------------------------------------------------
sub httpHeader {
return $session{cgi}->header( -cookie => $session{header}{cookie});
return $session{cgi}->header(
-cookie => $session{header}{cookie},
-status => $session{header}{status}
);
}
#-------------------------------------------------------------------
@ -149,8 +155,8 @@ sub open {
setting => \%SETTINGS, # variables set by the administrator
cgi => $query, # interface to the CGI environment
page => \%PAGE, # variables related to the current page
header => {}, # settings to be passed back through the http header
dbh => $dbh, # interface to the default WebGUI database
header => $session{header} # HTTP header modifiers
);
}

View file

@ -44,8 +44,7 @@ sub getStyle {
$session{page}{synopsis}.'">';
}
$header .= '</head>'.$style{header};
$footer = $style{footer}.'
</html>';
$footer = $style{footer}.' </html>';
}
$header = WebGUI::Macro::process($header);
$footer = WebGUI::Macro::process($footer);

View file

@ -48,17 +48,17 @@ sub gateway {
#-------------------------------------------------------------------
sub makeUnique {
my ($url, $test, $pageId);
$url = $_[0];
$pageId = $_[1] || "new";
while (($test) = WebGUI::SQL->quickArray("select urlizedTitle from page where urlizedTitle='$url' and pageId<>'$pageId'")) {
if ($url =~ /(.*)(\d+$)/) {
$url = $1.($2+1);
} elsif ($test ne "") {
$url .= "2";
}
}
return $url;
my ($url, $test, $pageId);
$url = $_[0];
$pageId = $_[1] || "new";
while (($test) = WebGUI::SQL->quickArray("select urlizedTitle from page where urlizedTitle='$url' and pageId<>'$pageId'")) {
if ($url =~ /(.*)(\d+$)/) {
$url = $1.($2+1);
} elsif ($test ne "") {
$url .= "2";
}
}
return $url;
}
#-------------------------------------------------------------------

347
lib/WebGUI/User.pm Normal file
View file

@ -0,0 +1,347 @@
package WebGUI::User;
=head1 LEGAL
-------------------------------------------------------------------
WebGUI is Copyright 2001-2002 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
-------------------------------------------------------------------
=cut
use strict;
use WebGUI::HTMLForm;
use WebGUI::International;
use WebGUI::Session;
use WebGUI::SQL;
use WebGUI::URL;
=head1 NAME
Package WebGUI::User
=head1 SYNOPSIS
use WebGUI::User;
$u = WebGUI::User->new(3); or $f = WebGUI::User->new("new");
$authMethod = $u->authMethod("WebGUI");
$connectDN = $u->authMethod("cn=Jon Doe");
$dateCreated = $u->dateCreated;
$identifier = $u->identifier("somepassword");
$lastUpdated = $u->lastUpdated;
$ldapURL = $u->ldapURL("ldap://ldap.mycompany.com:389/o=MyCompany");
$languagePreference = $u->profileField("language","English");
$username = $u->username("jonboy");
$u->addToGroups(\@arr);
$u->deleteFromGroups(\@arr);
$u->delete;
=head1 DESCRIPTION
This package proovides an object-oriented way of managing WebGUI
users as well as getting/setting a users's profile data.
=head1 METHODS
These methods are available from this class:
=cut
#-------------------------------------------------------------------
sub _create {
my ($userId);
$userId = getNextId("userId");
WebGUI::SQL->write("insert into users (userId,dateCreated) values ($userId,".time().")");
return $userId;
}
#-------------------------------------------------------------------
=head2 addToGroups ( groups )
Adds this user to the specified groups.
=item groups
An array reference containing a list of groups.
=cut
sub addToGroups {
my ($class, $groups, $gid, $expireAfter);
$class = shift;
$groups = shift;
foreach $gid (@$groups) {
($expireAfter) = WebGUI::SQL->quickArray("select expireAfter from groups where groupId=$gid");
WebGUI::SQL->write("insert into groupings values ($gid, $class->{_userId}, ".(time()+$expireAfter).")");
}
WebGUI::SQL->write("update users set lastUpdated=".time()." where userId=".$class->{_userId});
}
#-------------------------------------------------------------------
=head2 authMethod ( [ value ] )
Returns the authentication method for this user.
=item value
If specified, the authMethod is set to this value. The only valid
values are "WebGUI" and "LDAP". When a new account is created,
authMethod is defaulted to "WebGUI".
=cut
sub authMethod {
my ($class, $value);
$class = shift;
$value = shift;
if (defined $value) {
$class->{_user}{"authMethod"} = $value;
WebGUI::SQL->write("update users set authMethod=".quote($value).",
lastUpdated=".time()." where userId=$class->{_userId}");
}
return $class->{_user}{"authMethod"};
}
#-------------------------------------------------------------------
=head2 connectDN ( [ value ] )
Returns the connection distinguished name for this user.
=item value
If specified, the connectDN is set to this value.
=cut
sub connectDN {
my ($class, $value);
$class = shift;
$value = shift;
if (defined $value) {
$class->{_user}{"connectDN"} = $value;
WebGUI::SQL->write("update users set connectDN=".quote($value).",
lastUpdated=".time()." where userId=$class->{_userId}");
}
return $class->{_user}{"connectDN"};
}
#-------------------------------------------------------------------
=head2 dateCreated ( )
Returns the epoch for when this user was created.
=cut
sub dateCreated {
return $_[0]->{_user}{dateCreated};
}
#-------------------------------------------------------------------
=head2 delete ( )
Deletes this user.
=cut
sub delete {
my ($class);
$class = shift;
WebGUI::SQL->write("delete from users where userId=".$class->{_userId});
WebGUI::SQL->write("delete from userProfileData where userId=".$class->{_userId});
WebGUI::SQL->write("delete from groupings where userId=".$class->{_userId});
WebGUI::SQL->write("delete from messageLog where userId=".$class->{_userId});
WebGUI::SQL->write("delete from userSession where userId=".$class->{_userId});
}
#-------------------------------------------------------------------
=head2 deleteFromGroups ( groups )
Deletes this user from the specified groups.
=item groups
An array reference containing a list of groups.
=cut
sub deleteFromGroups {
my ($class, $groups, $gid);
$class = shift;
$groups = shift;
foreach $gid (@$groups) {
WebGUI::SQL->write("delete from groupings where groupId=$gid and userId=$class->{_userId}");
}
WebGUI::SQL->write("update users set lastUpdated=".time()." where userId=".$class->{_userId});
}
#-------------------------------------------------------------------
=head2 identifier ( [ value ] )
Returns the password for this user.
=item value
If specified, the identifier is set to this value.
=cut
sub identifier {
my ($class, $value);
$class = shift;
$value = shift;
if (defined $value) {
$class->{_user}{"identifier"} = $value;
WebGUI::SQL->write("update users set identifier=".quote($value).",
lastUpdated=".time()." where userId=$class->{_userId}");
}
return $class->{_user}{"identifier"};
}
#-------------------------------------------------------------------
=head2 lastUpdated ( )
Returns the epoch for when this user was last modified.
=cut
sub lastUpdated {
return $_[0]->{_user}{lastUpdated};
}
#-------------------------------------------------------------------
=head2 ldapURL ( [ value ] )
Returns the LDAP URL for this user.
=item value
If specified, the ldapURL is set to this value.
=cut
sub ldapURL {
my ($class, $value);
$class = shift;
$value = shift;
if (defined $value) {
$class->{_user}{"ldapURL"} = $value;
WebGUI::SQL->write("update users set ldapURL=".quote($value).",
lastUpdated=".time()." where userId=$class->{_userId}");
}
return $class->{_user}{"ldapURL"};
}
#-------------------------------------------------------------------
=head2 new ( userId )
Constructor.
=item userId
The userId of the user you're creating an object reference for. If
left blank it will default to "1" (Visitor). If specified as "new"
then a new user account will be created and assigned the next
available userId.
=cut
sub new {
my ($class, $userId, %user, %profile);
tie %user, 'Tie::CPHash';
$class = shift;
$userId = shift || 1;
$userId = _create() if ($userId eq "new");
%user = WebGUI::SQL->quickHash("select * from users where userId='$userId'");
%profile = WebGUI::SQL->buildHash("select userProfileField.fieldName, userProfileData.fieldData from userProfileField, userProfileData where userProfileField.fieldName=userProfileData.fieldName and userProfileData.userId=$user{userId}");
bless {_userId => $userId, _user => \%user, _profile =>\%profile }, $class;
}
#-------------------------------------------------------------------
=head2 profileField ( fieldName [ value ] )
Returns a profile field's value. If "value" is specified, it also
sets the field to that value.
=item fieldName
The profile field name such as "language" or "email" or
"cellPhone".
=item value
The value to set the profile field name to.
=cut
sub profileField {
my ($class, $fieldName, $value);
$class = shift;
$fieldName = shift;
$value = shift;
if (defined $value) {
$class->{_profile}{$fieldName} = $value;
WebGUI::SQL->write("delete from userProfileData where userId=$class->{_userId} and fieldName=".quote($fieldName));
WebGUI::SQL->write("insert into userProfileData values ($class->{_userId}, ".quote($fieldName).", ".quote($value).")");
WebGUI::SQL->write("update users set lastUpdated=".time()." where userId=".$class->{_userId});
}
return $class->{_profile}{$fieldName};
}
#-------------------------------------------------------------------
=head2 username ( [ value ] )
Returns the username.
=item value
If specified, the username is set to this value.
=cut
sub username {
my ($class, $value);
$class = shift;
$value = shift;
if (defined $value) {
$class->{_user}{"username"} = $value;
WebGUI::SQL->write("update users set username=".quote($value).",
lastUpdated=".time()." where userId=$class->{_userId}");
}
return $class->{_user}{"username"};
}
#-------------------------------------------------------------------
=head2 userId ( )
Returns the userId for this user.
=cut
sub userId {
return $_[0]->{_userId};
}
1;

View file

@ -68,7 +68,7 @@ sub duplicate {
WebGUI::SQL->write("insert into Article values ($newWidgetId, $data{startDate}, $data{endDate}, ".
quote($data{body}).", ".quote($data{image}).", ".quote($data{linkTitle}).", ".
quote($data{linkURL}).", ".quote($data{attachment}).", '$data{convertCarriageReturns}', ".
quote($data{alignImage}).", $data{allowDiscussion}, $data{groupToPost}, $data{groupToModerate}, $data{editTimeout})");
quote($data{alignImage}).", '$data{allowDiscussion}', $data{groupToPost}, $data{groupToModerate}, $data{editTimeout})");
WebGUI::Discussion::duplicate($_[0],$newWidgetId);
}

View file

@ -53,7 +53,7 @@ sub duplicate {
$data{processMacros},
$data{templatePosition}
);
WebGUI::SQL->write("insert into DownloadManager values ($newWidgetId, $data{paginateAfter})");
WebGUI::SQL->write("insert into DownloadManager values ($newWidgetId, $data{paginateAfter}, $data{displayThumbnails})");
$sth = WebGUI::SQL->read("select * from DownloadManager_file where widgetId=$_[0]");
while (%row = $sth->hash) {
$newDownloadId = getNextId("downloadId");
@ -66,8 +66,7 @@ sub duplicate {
WebGUI::SQL->write("insert into DownloadManager_file values ($newDownloadId, $newWidgetId, ".
quote($row{fileTitle}).", ".quote($row{downloadFile}).", $row{groupToView}, ".
quote($row{briefSynopsis}).", $row{dateUploaded}, $row{sequenceNumber}, ".
quote($row{alternateVersion1}).", ".quote($row{alternateVersion2}).
", $row{displayThumbnails})");
quote($row{alternateVersion1}).", ".quote($row{alternateVersion2}).")");
}
$sth->finish;
}
@ -214,7 +213,7 @@ sub www_addDownloadSave {
$alt2 = WebGUI::Attachment->new("",$session{form}{wid},$downloadId);
$alt2->save("alternateVersion2");
($sequenceNumber) = WebGUI::SQL->quickArray("select count(*) from DownloadManager_file where widgetId=$session{form}{wid}");
$sequenceNumber += 1;
$sequenceNumber++;
WebGUI::SQL->write("insert into DownloadManager_file values (".
$downloadId.
", ".$session{form}{wid}.

View file

@ -370,7 +370,8 @@ sub www_view {
if ($i >= ($itemsPerPage*$pn) && $i < ($itemsPerPage*($pn+1))) {
@last = WebGUI::SQL->quickArray("select messageId,dateOfPost,username,subject,userId from discussion where widgetId=$_[0] and rid=$data[0] order by dateOfPost desc");
$last[3] = WebGUI::HTML::filter($last[3],'all');
($replies) = WebGUI::SQL->quickArray("select count(*)-1 from discussion where rid=$data[0]");
($replies) = WebGUI::SQL->quickArray("select count(*) from discussion where rid=$data[0]");
$replies -= 1;
$html .= '<tr><td class="tableData"><a href="'.WebGUI::URL::page('func=showMessage&mid='.
$data[0].'&wid='.$_[0]).'">'.substr($data[1],0,30).
'</a></td><td class="tableData"><a href="'.

View file

@ -32,7 +32,9 @@ if ($ARGV[0] eq "--help" || $ARGV[0] eq "/?" || $ARGV[0] eq "/help" || $ARGV[0]
print "\nWebGUI is checking your system environment:\n\n";
my $os;
my ($os, $prereq, $dbi);
$prereq = 1;
if ($^O =~ /Win/i) {
$os = "Microsoftish";
} else {
@ -73,6 +75,7 @@ if (eval { require LWP }) {
CPAN::Shell->install("LWP");
} else {
print "Please install.\n";
$prereq = 0;
}
}
@ -81,6 +84,7 @@ if (eval { require HTTP::Request }) {
print "OK\n";
} else {
print "Please install LWP.\n";
$prereq = 0;
}
print "HTTP::Headers module.....................";
@ -88,6 +92,7 @@ if (eval { require HTTP::Headers }) {
print "OK\n";
} else {
print "Please install LWP.\n";
$prereq = 0;
}
print "Digest::MD5 module.......................";
@ -99,10 +104,10 @@ if (eval { require Digest::MD5 }) {
CPAN::Shell->install("Digest::MD5");
} else {
print "Please install.\n";
$prereq = 0;
}
}
my $dbi;
print "DBI module...............................";
if (eval { require DBI }) {
print "OK\n";
@ -113,6 +118,7 @@ if (eval { require DBI }) {
CPAN::Shell->install("DBI");
eval {require DBI};
$dbi = 1;
$prereq = 0;
} else {
print "Please install.\n";
}
@ -123,6 +129,7 @@ if ($dbi) {
print join(", ",DBI->available_drivers);
} else {
print "None";
$prereq = 0;
}
print "\n";
@ -135,6 +142,7 @@ if (eval { require HTML::Parser }) {
CPAN::Shell->install("HTML::Parser");
} else {
print "Please install.\n";
$prereq = 0;
}
}
@ -147,6 +155,7 @@ if (eval { require Tie::IxHash }) {
CPAN::Shell->install("Tie::IxHash");
} else {
print "Please install.\n";
$prereq = 0;
}
}
@ -159,6 +168,7 @@ if (eval { require Tie::CPHash }) {
CPAN::Shell->install("Tie::CPHash");
} else {
print "Please install.\n";
$prereq = 0;
}
}
@ -171,6 +181,7 @@ if (eval { require Net::SMTP }) {
CPAN::Shell->install("Net::SMTP");
} else {
print "Please install.\n";
$prereq = 0;
}
}
@ -183,6 +194,7 @@ if (eval { require Net::LDAP }) {
CPAN::Shell->install("Net::LDAP");
} else {
print "Please install.\n";
$prereq = 0;
}
}
@ -195,6 +207,7 @@ if (eval { require Date::Calc }) {
CPAN::Shell->install("Date::Calc");
} else {
print "Please install.\n";
$prereq = 0;
}
}
@ -207,6 +220,7 @@ if (eval { require HTML::CalendarMonthSimple }) {
CPAN::Shell->install("HTML::CalendarMonthSimple");
} else {
print "Please install.\n";
$prereq = 0;
}
}
@ -219,29 +233,36 @@ if (eval { require Image::Magick }) {
CPAN::Shell->install("Image::Magick");
} else {
print "Please install.\n";
$prereq = 0;
}
}
# this is here to insure they installed correctly.
print "WebGUI modules...........................";
if (eval { require WebGUI } && eval { require WebGUI::SQL }) {
print "OK\n";
} else {
print "Please install.\n";
}
print "Data::Config module......................";
if (eval { require Data::Config }) {
print "OK\n";
} else {
print "Please install.\n";
}
if ($prereq) {
print "WebGUI modules...........................";
if (eval { require WebGUI } && eval { require WebGUI::SQL }) {
print "OK\n";
} else {
print "Please install WebGUI.\n";
}
print "HTML::TagFilter module...................";
if (eval { require HTML::TagFilter }) {
print "OK\n";
print "Data::Config module......................";
if (eval { require Data::Config }) {
print "OK\n";
} else {
print "Please install WebGUI.\n";
}
print "HTML::TagFilter module...................";
if (eval { require HTML::TagFilter }) {
print "OK\n";
} else {
print "Please install WebGUI.\n";
}
} else {
print "Please install.\n";
print "Cannot continue without prerequisites.\n";
exit;
}
###################################

View file

@ -1,364 +1,364 @@
<HTML>
<!--
#-------------------------------------------------------------------
# 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
#-------------------------------------------------------------------
-->
<HEAD><TITLE>Color Picker</TITLE>
<SCRIPT LANGUAGE="JavaScript">
var myColor, decColor, pctColor="" ;
function GetColor( myColor, decColor, pctColor ) {
if (document.forms[0].setColor.value != "Reset") {
document.forms[0].hex_value.value=myColor ;
document.forms[0].dec_value.value=decColor ;
document.forms[0].pct_value.value=pctColor ;
}
}
function GetClick( ) {
window.blur();
window.opener.focus();
window.opener.setColor(document.forms[0].hex_value.value);
window.close();
}
</SCRIPT>
</HEAD>
<BODY bgcolor="#FFFFFF" TEXT="#000000" LINK="#000000" VLINK="#000000" ALINK="#000000"
onLoad="document.forms[0].hex_value.value='';
document.forms[0].dec_value.value='';
document.forms[0].pct_value.value='';
document.forms[0].setColor.value=''" leftmargin=0 topmargin=0 marginheight="0" marginwidth="0">
<form Name="COLORS">
<input type="HIDDEN" name="hex_value" value="" size="9" onClick="document.forms[0].hex_value.value='Not Set'; document.forms[0].myformat.value=''; document.forms[0].setColor.value=''">
<input type="HIDDEN" name="dec_value" value="" size="12" onClick="document.forms[0].dec_value.value='Not Set'; document.forms[0].myformat.value=''; document.forms[0].setColor.value=''">
<input type="HIDDEN" name="pct_value" value="" size="11" onClick="document.forms[0].pct_value.value='Not Set'; document.forms[0].myformat.value=''; document.forms[0].setColor.value=''">
<input type="HIDDEN" name="setColor" value="">
<img src="colorPicker.gif" width="438" height="254" usemap="#colorpicker">
<map name="colorpicker">
<area shape="polygon" coords="47,162,53,162,56,167,53,172,47,172,44,167" href="javascript:GetClick()" onMouseOver="GetColor('FF0033','255,0,51','100,00,20')">
<area shape="polygon" coords="70,162,76,162,79,167,76,172,70,172,67,167" href="javascript:GetClick()" onMouseOver="GetColor('CC0066','204,0,102','80,00,40')">
<area shape="polygon" coords="93,162,99,162,102,167,99,172,93,172,90,167" href="javascript:GetClick()" onMouseOver="GetColor('990099','153,0,153','60,00,60')">
<area shape="polygon" coords="116,162,122,162,125,167,122,172,116,172,113,167" href="javascript:GetClick()" onMouseOver="GetColor('6600CC','102,0,204','40,00,80')">
<area shape="polygon" coords="139,162,145,162,148,167,145,172,139,172,136,167" href="javascript:GetClick()" onMouseOver="GetColor('3300FF','51,0,255','20,00,100')">
<area shape="polygon" coords="299,2,305,2,308,7,305,12,299,12,296,7" href="javascript:GetClick()" onMouseOver="GetColor('CCCC33','204,204,51','80,80,20')">
<area shape="polygon" coords="287,9,293,9,296,14,293,19,287,19,284,14" href="javascript:GetClick()" onMouseOver="GetColor('CCCC66','204,204,102','80,80,40')">
<area shape="polygon" coords="276,16,282,16,285,21,282,26,276,26,273,21" href="javascript:GetClick()" onMouseOver="GetColor('CCCC99','204,204,153','80,80,60')">
<area shape="polygon" coords="299,16,305,16,308,21,305,26,299,26,296,21" href="javascript:GetClick()" onMouseOver="GetColor('99CC33','153,204,51','60,80,20')">
<area shape="polygon" coords="264,23,270,23,273,28,270,33,264,33,261,28" href="javascript:GetClick()" onMouseOver="GetColor('CCCCCC','204,204,204','80,80,80')">
<area shape="polygon" coords="287,23,293,23,296,28,293,33,287,33,284,28" href="javascript:GetClick()" onMouseOver="GetColor('99CC66','153,204,102','60,80,40')">
<area shape="polygon" coords="276,30,282,30,285,35,282,40,276,40,273,35" href="javascript:GetClick()" onMouseOver="GetColor('99CC99','153,204,153','60,80,60')">
<area shape="polygon" coords="299,30,305,30,308,35,305,40,299,40,296,35" href="javascript:GetClick()" onMouseOver="GetColor('66CC33','102,204,51','40,80,20')">
<area shape="polygon" coords="264,37,270,37,273,42,270,47,264,47,261,42" href="javascript:GetClick()" onMouseOver="GetColor('99CCCC','153,204,204','60,80,80')">
<area shape="polygon" coords="287,37,293,37,296,42,293,47,287,47,284,42" href="javascript:GetClick()" onMouseOver="GetColor('66CC66','102,204,102','40,80,40')">
<area shape="polygon" coords="276,44,282,44,285,49,282,54,276,54,273,49" href="javascript:GetClick()" onMouseOver="GetColor('66CC99','102,204,153','40,80,60')">
<area shape="polygon" coords="299,44,305,44,308,49,305,54,299,54,296,49" href="javascript:GetClick()" onMouseOver="GetColor('33CC33','51,204,51','20,80,20')">
<area shape="polygon" coords="264,51,270,51,273,56,270,61,264,61,261,56" href="javascript:GetClick()" onMouseOver="GetColor('66CCCC','102,204,204','40,80,80')">
<area shape="polygon" coords="287,51,293,51,296,56,293,61,287,61,284,56" href="javascript:GetClick()" onMouseOver="GetColor('33CC66','51,204,102','20,80,40')">
<area shape="polygon" coords="276,58,282,58,285,63,282,68,276,68,273,63" href="javascript:GetClick()" onMouseOver="GetColor('33CC99','51,204,153','20,80,60')">
<area shape="polygon" coords="264,65,270,65,273,70,270,75,264,75,261,70" href="javascript:GetClick()" onMouseOver="GetColor('33CCCC','51,204,204','20,80,80')">
<area shape="polygon" coords="392,100,398,100,401,105,398,110,392,110,389,105" href="javascript:GetClick()" onMouseOver="GetColor('CCCC33','204,204,51','80,80,20')">
<area shape="polygon" coords="404,107,410,107,413,112,410,117,404,117,401,112" href="javascript:GetClick()" onMouseOver="GetColor('CCCC66','204,204,102','80,80,40')">
<area shape="polygon" coords="392,114,398,114,401,119,398,124,392,124,389,119" href="javascript:GetClick()" onMouseOver="GetColor('CC9933','204,153,51','80,60,20')">
<area shape="polygon" coords="415,114,421,114,424,119,421,124,415,124,412,119" href="javascript:GetClick()" onMouseOver="GetColor('CCCC99','204,204,153','80,80,60')">
<area shape="polygon" coords="404,121,410,121,413,126,410,131,404,131,401,126" href="javascript:GetClick()" onMouseOver="GetColor('CC9966','204,153,102','80,60,40')">
<area shape="polygon" coords="427,121,433,121,436,126,433,131,427,131,424,126" href="javascript:GetClick()" onMouseOver="GetColor('CCCCCC','204,204,204','80,80,80')">
<area shape="polygon" coords="392,128,398,128,401,133,398,138,392,138,389,133" href="javascript:GetClick()" onMouseOver="GetColor('CC6633','204,102,51','80,40,20')">
<area shape="polygon" coords="415,128,421,128,424,133,421,138,415,138,412,133" href="javascript:GetClick()" onMouseOver="GetColor('CC9999','204,153,153','80,60,60')">
<area shape="polygon" coords="404,135,410,135,413,140,410,145,404,145,401,140" href="javascript:GetClick()" onMouseOver="GetColor('CC6666','204,102,102','80,40,40')">
<area shape="polygon" coords="427,135,433,135,436,140,433,145,427,145,424,140" href="javascript:GetClick()" onMouseOver="GetColor('CC99CC','204,153,204','80,60,80')">
<area shape="polygon" coords="392,142,398,142,401,147,398,152,392,152,389,147" href="javascript:GetClick()" onMouseOver="GetColor('CC3333','204,51,51','80,20,20')">
<area shape="polygon" coords="415,142,421,142,424,147,421,152,415,152,412,147" href="javascript:GetClick()" onMouseOver="GetColor('CC6699','204,102,153','80,40,60')">
<area shape="polygon" coords="415,156,421,156,424,161,421,166,415,166,412,161" href="javascript:GetClick()" onMouseOver="GetColor('CC3399','204,51,153','80,20,60')">
<area shape="polygon" coords="427,163,433,163,436,168,433,173,427,173,424,168" href="javascript:GetClick()" onMouseOver="GetColor('CC33CC','204,51,204','80,20,80')">
<area shape="polygon" coords="201,78,207,78,210,83,207,88,201,88,198,83" href="javascript:GetClick()" onMouseOver="GetColor('33CC33','51,204,51','20,80,20')">
<area shape="polygon" coords="189,85,195,85,198,90,195,95,189,95,186,90" href="javascript:GetClick()" onMouseOver="GetColor('33CC66','51,204,102','20,80,40')">
<area shape="polygon" coords="178,92,184,92,187,97,184,102,178,102,175,97" href="javascript:GetClick()" onMouseOver="GetColor('33CC99','51,204,153','20,80,60')">
<area shape="polygon" coords="201,92,207,92,210,97,207,102,201,102,198,97" href="javascript:GetClick()" onMouseOver="GetColor('339933','51,153,51','20,60,20')">
<area shape="polygon" coords="166,99,172,99,175,104,172,109,166,109,163,104" href="javascript:GetClick()" onMouseOver="GetColor('33CCCC','51,204,204','20,80,80')">
<area shape="polygon" coords="189,99,195,99,198,104,195,109,189,109,186,104" href="javascript:GetClick()" onMouseOver="GetColor('339966','51,153,102','20,60,40')">
<area shape="polygon" coords="178,106,184,106,187,111,184,116,178,116,175,111" href="javascript:GetClick()" onMouseOver="GetColor('339999','51,153,153','20,60,60')">
<area shape="polygon" coords="201,106,207,106,210,111,207,116,201,116,198,111" href="javascript:GetClick()" onMouseOver="GetColor('336633','51,102,51','20,40,20')">
<area shape="polygon" coords="166,113,172,113,175,118,172,123,166,123,163,118" href="javascript:GetClick()" onMouseOver="GetColor('3399CC','51,153,204','20,60,80')">
<area shape="polygon" coords="189,113,195,113,198,118,195,123,189,123,186,118" href="javascript:GetClick()" onMouseOver="GetColor('336666','51,102,102','20,40,40')">
<area shape="polygon" coords="178,120,184,120,187,125,184,130,178,130,175,125" href="javascript:GetClick()" onMouseOver="GetColor('336699','51,102,153','20,40,60')">
<area shape="polygon" coords="201,120,207,120,210,125,207,130,201,130,198,125" href="javascript:GetClick()" onMouseOver="GetColor('333333','51,51,51','20,20,20')">
<area shape="polygon" coords="166,127,172,127,175,132,172,137,166,137,163,132" href="javascript:GetClick()" onMouseOver="GetColor('3366CC','51,102,204','20,40,80')">
<area shape="polygon" coords="189,127,195,127,198,132,195,137,189,137,186,132" href="javascript:GetClick()" onMouseOver="GetColor('333366','51,51,102','20,20,40')">
<area shape="polygon" coords="178,134,184,134,187,139,184,144,178,144,175,139" href="javascript:GetClick()" onMouseOver="GetColor('333399','51,51,153','20,20,60')">
<area shape="polygon" coords="166,141,172,141,175,146,172,151,166,151,163,146" href="javascript:GetClick()" onMouseOver="GetColor('3333CC','51,51,204','20,20,80')">
<area shape="polygon" coords="39,176,45,176,48,181,45,186,39,186,36,181" href="javascript:GetClick()" onMouseOver="GetColor('CC3333','204,51,51','80,20,20')">
<area shape="polygon" coords="51,183,57,183,60,188,57,193,51,193,48,188" href="javascript:GetClick()" onMouseOver="GetColor('CC3366','204,51,102','80,20,40')">
<area shape="polygon" coords="39,190,45,190,48,195,45,200,39,200,36,195" href="javascript:GetClick()" onMouseOver="GetColor('993333','153,51,51','60,20,20')">
<area shape="polygon" coords="62,190,68,190,71,195,68,200,62,200,59,195" href="javascript:GetClick()" onMouseOver="GetColor('CC3399','204,51,153','80,20,60')">
<area shape="polygon" coords="51,197,57,197,60,202,57,207,51,207,48,202" href="javascript:GetClick()" onMouseOver="GetColor('993366','153,51,102','60,20,40')">
<area shape="polygon" coords="74,197,80,197,83,202,80,207,74,207,71,202" href="javascript:GetClick()" onMouseOver="GetColor('CC33CC','204,51,204','80,20,80')">
<area shape="polygon" coords="39,204,45,204,48,209,45,214,39,214,36,209" href="javascript:GetClick()" onMouseOver="GetColor('663333','102,51,51','40,20,20')">
<area shape="polygon" coords="62,204,68,204,71,209,68,214,62,214,59,209" href="javascript:GetClick()" onMouseOver="GetColor('993399','153,51,153','60,20,60')">
<area shape="polygon" coords="51,211,57,211,60,216,57,221,51,221,48,216" href="javascript:GetClick()" onMouseOver="GetColor('663366','102,51,102','40,20,40')">
<area shape="polygon" coords="74,211,80,211,83,216,80,221,74,221,71,216" href="javascript:GetClick()" onMouseOver="GetColor('9933CC','153,51,204','60,20,80')">
<area shape="polygon" coords="39,218,45,218,48,223,45,228,39,228,36,223" href="javascript:GetClick()" onMouseOver="GetColor('333333','51,51,51','20,20,20')">
<area shape="polygon" coords="62,218,68,218,71,223,68,228,62,228,59,223" href="javascript:GetClick()" onMouseOver="GetColor('663399','102,51,153','40,20,60')">
<area shape="polygon" coords="62,232,68,232,71,237,68,242,62,242,59,237" href="javascript:GetClick()" onMouseOver="GetColor('333399','51,51,153','20,20,60')">
<area shape="polygon" coords="74,239,80,239,83,244,80,249,74,249,71,244" href="javascript:GetClick()" onMouseOver="GetColor('3333CC','51,51,204','20,20,80')">
<area shape="polygon" coords="378,188,384,188,387,193,384,198,378,198,375,193" href="javascript:GetClick()" onMouseOver="GetColor('669966','102,153,102','40,60,40')">
<area shape="polygon" coords="366,195,372,195,375,200,372,205,366,205,363,200" href="javascript:GetClick()" onMouseOver="GetColor('669999','102,153,153','40,60,60')">
<area shape="polygon" coords="389,195,395,195,398,200,395,205,389,205,386,200" href="javascript:GetClick()" onMouseOver="GetColor('999966','153,153,102','60,60,40')">
<area shape="polygon" coords="378,202,384,202,387,207,384,212,378,212,375,207" href="javascript:GetClick()" onMouseOver="GetColor('000000','0,0,0','00,00,00')">
<area shape="polygon" coords="366,209,372,209,375,214,372,219,366,219,363,214" href="javascript:GetClick()" onMouseOver="GetColor('666699','102,102,153','40,40,60')">
<area shape="polygon" coords="389,209,395,209,398,214,395,219,389,219,386,214" href="javascript:GetClick()" onMouseOver="GetColor('996666','153,102,102','60,40,40')">
<area shape="polygon" coords="378,216,384,216,387,221,384,226,378,226,375,221" href="javascript:GetClick()" onMouseOver="GetColor('996699','153,102,153','60,40,60')">
<area shape="polygon" coords="265,177,271,177,274,182,271,187,265,187,262,182" href="javascript:GetClick()" onMouseOver="GetColor('3333CC','51,51,204','20,20,80')">
<area shape="polygon" coords="253,184,259,184,262,189,259,194,253,194,250,189" href="javascript:GetClick()" onMouseOver="GetColor('3366CC','51,102,204','20,40,80')">
<area shape="polygon" coords="276,184,282,184,285,189,282,194,276,194,273,189" href="javascript:GetClick()" onMouseOver="GetColor('6633CC','102,51,204','40,20,80')">
<area shape="polygon" coords="242,191,248,191,251,196,248,201,242,201,239,196" href="javascript:GetClick()" onMouseOver="GetColor('3399CC','51,153,204','20,60,80')">
<area shape="polygon" coords="265,191,271,191,274,196,271,201,265,201,262,196" href="javascript:GetClick()" onMouseOver="GetColor('6666CC','102,102,204','40,40,80')">
<area shape="polygon" coords="288,191,294,191,297,196,294,201,288,201,285,196" href="javascript:GetClick()" onMouseOver="GetColor('9933CC','153,51,204','60,20,80')">
<area shape="polygon" coords="230,198,236,198,239,203,236,208,230,208,227,203" href="javascript:GetClick()" onMouseOver="GetColor('33CCCC','51,204,204','20,80,80')">
<area shape="polygon" coords="253,198,259,198,262,203,259,208,253,208,250,203" href="javascript:GetClick()" onMouseOver="GetColor('6699CC','102,153,204','40,60,80')">
<area shape="polygon" coords="276,198,282,198,285,203,282,208,276,208,273,203" href="javascript:GetClick()" onMouseOver="GetColor('9966CC','153,102,204','60,40,80')">
<area shape="polygon" coords="299,198,305,198,308,203,305,208,299,208,296,203" href="javascript:GetClick()" onMouseOver="GetColor('CC33CC','204,51,204','80,20,80')">
<area shape="polygon" coords="242,205,248,205,251,210,248,215,242,215,239,210" href="javascript:GetClick()" onMouseOver="GetColor('66CCCC','102,204,204','40,80,80')">
<area shape="polygon" coords="265,205,271,205,274,210,271,215,265,215,262,210" href="javascript:GetClick()" onMouseOver="GetColor('9999CC','153,153,204','60,60,80')">
<area shape="polygon" coords="288,205,294,205,297,210,294,215,288,215,285,210" href="javascript:GetClick()" onMouseOver="GetColor('CC66CC','204,102,204','80,40,80')">
<area shape="polygon" coords="253,212,259,212,262,217,259,222,253,222,250,217" href="javascript:GetClick()" onMouseOver="GetColor('99CCCC','153,204,204','60,80,80')">
<area shape="polygon" coords="276,212,282,212,285,217,282,222,276,222,273,217" href="javascript:GetClick()" onMouseOver="GetColor('CC99CC','204,153,204','80,60,80')">
<area shape="polygon" coords="265,219,271,219,274,224,271,229,265,229,262,224" href="javascript:GetClick()" onMouseOver="GetColor('CCCCCC','204,204,204','80,80,80')">
<area shape="polygon" coords="40,23,46,23,49,28,46,33,40,33,37,28" href="javascript:GetClick()" onMouseOver="GetColor('333333','51,51,51','20,20,20')">
<area shape="polygon" coords="28,30,34,30,37,35,34,40,28,40,25,35" href="javascript:GetClick()" onMouseOver="GetColor('663333','102,51,51','40,20,20')">
<area shape="polygon" coords="51,30,57,30,60,35,57,40,51,40,48,35" href="javascript:GetClick()" onMouseOver="GetColor('336633','51,102,51','20,40,20')">
<area shape="polygon" coords="17,37,23,37,26,42,23,47,17,47,14,42" href="javascript:GetClick()" onMouseOver="GetColor('993333','153,51,51','60,20,20')">
<area shape="polygon" coords="40,37,46,37,49,42,46,47,40,47,37,42" href="javascript:GetClick()" onMouseOver="GetColor('666633','102,102,51','40,40,20')">
<area shape="polygon" coords="63,37,69,37,72,42,69,47,63,47,60,42" href="javascript:GetClick()" onMouseOver="GetColor('339933','51,153,51','20,60,20')">
<area shape="polygon" coords="5,44,11,44,14,49,11,54,5,54,2,49" href="javascript:GetClick()" onMouseOver="GetColor('CC3333','204,51,51','80,20,20')">
<area shape="polygon" coords="28,44,34,44,37,49,34,54,28,54,25,49" href="javascript:GetClick()" onMouseOver="GetColor('996633','153,102,51','60,40,20')">
<area shape="polygon" coords="51,44,57,44,60,49,57,54,51,54,48,49" href="javascript:GetClick()" onMouseOver="GetColor('669933','102,153,51','40,60,20')">
<area shape="polygon" coords="74,44,80,44,83,49,80,54,74,54,71,49" href="javascript:GetClick()" onMouseOver="GetColor('33CC33','51,204,51','20,80,20')">
<area shape="polygon" coords="17,51,23,51,26,56,23,61,17,61,14,56" href="javascript:GetClick()" onMouseOver="GetColor('CC6633','204,102,51','80,40,20')">
<area shape="polygon" coords="40,51,46,51,49,56,46,61,40,61,37,56" href="javascript:GetClick()" onMouseOver="GetColor('999933','153,153,51','60,60,20')">
<area shape="polygon" coords="63,51,69,51,72,56,69,61,63,61,60,56" href="javascript:GetClick()" onMouseOver="GetColor('66CC33','102,204,51','40,80,20')">
<area shape="polygon" coords="28,58,34,58,37,63,34,68,28,68,25,63" href="javascript:GetClick()" onMouseOver="GetColor('CC9933','204,153,51','80,60,20')">
<area shape="polygon" coords="51,58,57,58,60,63,57,68,51,68,48,63" href="javascript:GetClick()" onMouseOver="GetColor('99CC33','153,204,51','60,80,20')">
<area shape="polygon" coords="40,65,46,65,49,70,46,75,40,75,37,70" href="javascript:GetClick()" onMouseOver="GetColor('CCCC33','204,204,51','80,80,20')">
<area shape="polygon" coords="170,37,176,37,179,42,176,47,170,47,167,42" href="javascript:GetClick()" onMouseOver="GetColor('996699','153,102,153','60,40,60')">
<area shape="polygon" coords="158,44,164,44,167,49,164,54,158,54,155,49" href="javascript:GetClick()" onMouseOver="GetColor('996666','153,102,102','60,40,40')">
<area shape="polygon" coords="181,44,187,44,190,49,187,54,181,54,178,49" href="javascript:GetClick()" onMouseOver="GetColor('666699','102,102,153','40,40,60')">
<area shape="polygon" coords="170,51,176,51,179,56,176,61,170,61,167,56" href="javascript:GetClick()" onMouseOver="GetColor('FFFFFF','255,255,255','100,100,100')">
<area shape="polygon" coords="158,58,164,58,167,63,164,68,158,68,155,63" href="javascript:GetClick()" onMouseOver="GetColor('999966','153,153,102','60,60,40')">
<area shape="polygon" coords="181,58,187,58,190,63,187,68,181,68,178,63" href="javascript:GetClick()" onMouseOver="GetColor('669999','102,153,153','40,60,60')">
<area shape="polygon" coords="170,65,176,65,179,70,176,75,170,75,167,70" href="javascript:GetClick()" onMouseOver="GetColor('669966','102,153,102','40,60,40')">
<area shape="polygon" coords="94,50,100,50,103,55,100,60,94,60,91,55" href="javascript:GetClick()" onMouseOver="GetColor('00FF00','0,255,0','00,100,00')">
<area shape="polygon" coords="82,57,88,57,91,62,88,67,82,67,79,62" href="javascript:GetClick()" onMouseOver="GetColor('33FF00','51,255,0','20,100,00')">
<area shape="polygon" coords="105,57,111,57,114,62,111,67,105,67,102,62" href="javascript:GetClick()" onMouseOver="GetColor('00FF33','0,255,51','00,100,20')">
<area shape="polygon" coords="71,64,77,64,80,69,77,74,71,74,68,69" href="javascript:GetClick()" onMouseOver="GetColor('66FF00','102,255,0','40,100,00')">
<area shape="polygon" coords="94,64,100,64,103,69,100,74,94,74,91,69" href="javascript:GetClick()" onMouseOver="GetColor('00CC00','0,204,0','00,80,00')">
<area shape="polygon" coords="117,64,123,64,126,69,123,74,117,74,114,69" href="javascript:GetClick()" onMouseOver="GetColor('00FF66','0,255,102','00,100,40')">
<area shape="polygon" coords="59,71,65,71,68,76,65,81,59,81,56,76" href="javascript:GetClick()" onMouseOver="GetColor('99FF00','153,255,0','60,100,00')">
<area shape="polygon" coords="82,71,88,71,91,76,88,81,82,81,79,76" href="javascript:GetClick()" onMouseOver="GetColor('33CC00','51,204,0','20,80,00')">
<area shape="polygon" coords="105,71,111,71,114,76,111,81,105,81,102,76" href="javascript:GetClick()" onMouseOver="GetColor('00CC33','0,204,51','00,80,20')">
<area shape="polygon" coords="128,71,134,71,137,76,134,81,128,81,125,76" href="javascript:GetClick()" onMouseOver="GetColor('00FF99','0,255,153','00,100,60')">
<area shape="polygon" coords="48,78,54,78,57,83,54,88,48,88,45,83" href="javascript:GetClick()" onMouseOver="GetColor('CCFF00','204,255,0','80,100,00')">
<area shape="polygon" coords="71,78,77,78,80,83,77,88,71,88,68,83" href="javascript:GetClick()" onMouseOver="GetColor('66CC00','102,204,0','40,80,00')">
<area shape="polygon" coords="94,78,100,78,103,83,100,88,94,88,91,83" href="javascript:GetClick()" onMouseOver="GetColor('009900','0,153,0','00,60,00')">
<area shape="polygon" coords="117,78,123,78,126,83,123,88,117,88,114,83" href="javascript:GetClick()" onMouseOver="GetColor('00CC66','0,204,102','00,80,40')">
<area shape="polygon" coords="140,78,146,78,149,83,146,88,140,88,137,83" href="javascript:GetClick()" onMouseOver="GetColor('00FFCC','0,255,204','00,100,80')">
<area shape="polygon" coords="36,85,42,85,45,90,42,95,36,95,33,90" href="javascript:GetClick()" onMouseOver="GetColor('FFFF00','255,255,0','100,100,00')">
<area shape="polygon" coords="59,85,65,85,68,90,65,95,59,95,56,90" href="javascript:GetClick()" onMouseOver="GetColor('99CC00','153,204,0','60,80,00')">
<area shape="polygon" coords="82,85,88,85,91,90,88,95,82,95,79,90" href="javascript:GetClick()" onMouseOver="GetColor('339900','51,153,0','20,60,00')">
<area shape="polygon" coords="105,85,111,85,114,90,111,95,105,95,102,90" href="javascript:GetClick()" onMouseOver="GetColor('009933','0,153,51','00,60,20')">
<area shape="polygon" coords="128,85,134,85,137,90,134,95,128,95,125,90" href="javascript:GetClick()" onMouseOver="GetColor('00CC99','0,204,153','00,80,60')">
<area shape="polygon" coords="151,85,157,85,160,90,157,95,151,95,148,90" href="javascript:GetClick()" onMouseOver="GetColor('00FFFF','0,255,255','00,100,100')">
<area shape="polygon" coords="48,92,54,92,57,97,54,102,48,102,45,97" href="javascript:GetClick()" onMouseOver="GetColor('CCCC00','204,204,0','80,80,00')">
<area shape="polygon" coords="71,92,77,92,80,97,77,102,71,102,68,97" href="javascript:GetClick()" onMouseOver="GetColor('669900','102,153,0','40,60,00')">
<area shape="polygon" coords="94,92,100,92,103,97,100,102,94,102,91,97" href="javascript:GetClick()" onMouseOver="GetColor('006600','0,102,0','00,40,00')">
<area shape="polygon" coords="117,92,123,92,126,97,123,102,117,102,114,97" href="javascript:GetClick()" onMouseOver="GetColor('009966','0,153,102','00,60,40')">
<area shape="polygon" coords="140,92,146,92,149,97,146,102,140,102,137,97" href="javascript:GetClick()" onMouseOver="GetColor('00CCCC','0,204,204','00,80,80')">
<area shape="polygon" coords="36,99,42,99,45,104,42,109,36,109,33,104" href="javascript:GetClick()" onMouseOver="GetColor('FFCC00','255,204,0','100,80,00')">
<area shape="polygon" coords="59,99,65,99,68,104,65,109,59,109,56,104" href="javascript:GetClick()" onMouseOver="GetColor('999900','153,153,0','60,60,00')">
<area shape="polygon" coords="82,99,88,99,91,104,88,109,82,109,79,104" href="javascript:GetClick()" onMouseOver="GetColor('336600','51,102,0','20,40,00')">
<area shape="polygon" coords="105,99,111,99,114,104,111,109,105,109,102,104" href="javascript:GetClick()" onMouseOver="GetColor('006633','0,102,51','00,40,20')">
<area shape="polygon" coords="128,99,134,99,137,104,134,109,128,109,125,104" href="javascript:GetClick()" onMouseOver="GetColor('009999','0,153,153','00,60,60')">
<area shape="polygon" coords="151,99,157,99,160,104,157,109,151,109,148,104" href="javascript:GetClick()" onMouseOver="GetColor('00CCFF','0,204,255','00,80,100')">
<area shape="polygon" coords="48,106,54,106,57,111,54,116,48,116,45,111" href="javascript:GetClick()" onMouseOver="GetColor('CC9900','204,153,0','80,60,00')">
<area shape="polygon" coords="71,106,77,106,80,111,77,116,71,116,68,111" href="javascript:GetClick()" onMouseOver="GetColor('666600','102,102,0','40,40,00')">
<area shape="polygon" coords="94,106,100,106,103,111,100,116,94,116,91,111" href="javascript:GetClick()" onMouseOver="GetColor('003300','0,51,0','00,20,00')">
<area shape="polygon" coords="117,106,123,106,126,111,123,116,117,116,114,111" href="javascript:GetClick()" onMouseOver="GetColor('006666','0,102,102','00,40,40')">
<area shape="polygon" coords="140,106,146,106,149,111,146,116,140,116,137,111" href="javascript:GetClick()" onMouseOver="GetColor('0099CC','0,153,204','00,60,80')">
<area shape="polygon" coords="36,113,42,113,45,118,42,123,36,123,33,118" href="javascript:GetClick()" onMouseOver="GetColor('FF9900','255,153,0','100,60,00')">
<area shape="polygon" coords="59,113,65,113,68,118,65,123,59,123,56,118" href="javascript:GetClick()" onMouseOver="GetColor('996600','153,102,0','60,40,00')">
<area shape="polygon" coords="82,113,88,113,91,118,88,123,82,123,79,118" href="javascript:GetClick()" onMouseOver="GetColor('333300','51,51,0','20,20,00')">
<area shape="polygon" coords="105,113,111,113,114,118,111,123,105,123,102,118" href="javascript:GetClick()" onMouseOver="GetColor('003333','0,51,51','00,20,20')">
<area shape="polygon" coords="128,113,134,113,137,118,134,123,128,123,125,118" href="javascript:GetClick()" onMouseOver="GetColor('006699','0,102,153','00,40,60')">
<area shape="polygon" coords="151,113,157,113,160,118,157,123,151,123,148,118" href="javascript:GetClick()" onMouseOver="GetColor('0099FF','0,153,255','00,60,100')">
<area shape="polygon" coords="48,120,54,120,57,125,54,130,48,130,45,125" href="javascript:GetClick()" onMouseOver="GetColor('CC6600','204,102,0','80,40,00')">
<area shape="polygon" coords="71,120,77,120,80,125,77,130,71,130,68,125" href="javascript:GetClick()" onMouseOver="GetColor('663300','102,51,0','40,20,00')">
<area shape="polygon" coords="94,120,100,120,103,125,100,130,94,130,91,125" href="javascript:GetClick()" onMouseOver="GetColor('000000','0,0,0','00,00,00')">
<area shape="polygon" coords="117,120,123,120,126,125,123,130,117,130,114,125" href="javascript:GetClick()" onMouseOver="GetColor('003366','0,51,102','00,20,40')">
<area shape="polygon" coords="140,120,146,120,149,125,146,130,140,130,137,125" href="javascript:GetClick()" onMouseOver="GetColor('0066CC','0,102,204','00,40,80')">
<area shape="polygon" coords="36,127,42,127,45,132,42,137,36,137,33,132" href="javascript:GetClick()" onMouseOver="GetColor('FF6600','255,102,0','100,40,00')">
<area shape="polygon" coords="59,127,65,127,68,132,65,137,59,137,56,132" href="javascript:GetClick()" onMouseOver="GetColor('993300','153,51,0','60,20,00')">
<area shape="polygon" coords="82,127,88,127,91,132,88,137,82,137,79,132" href="javascript:GetClick()" onMouseOver="GetColor('330000','51,0,0','20,00,00')">
<area shape="polygon" coords="105,127,111,127,114,132,111,137,105,137,102,132" href="javascript:GetClick()" onMouseOver="GetColor('000033','0,0,51','00,00,20')">
<area shape="polygon" coords="128,127,134,127,137,132,134,137,128,137,125,132" href="javascript:GetClick()" onMouseOver="GetColor('003399','0,51,153','00,20,60')">
<area shape="polygon" coords="151,127,157,127,160,132,157,137,151,137,148,132" href="javascript:GetClick()" onMouseOver="GetColor('0066FF','0,102,255','00,40,100')">
<area shape="polygon" coords="48,134,54,134,57,139,54,144,48,144,45,139" href="javascript:GetClick()" onMouseOver="GetColor('CC3300','204,51,0','80,20,00')">
<area shape="polygon" coords="71,134,77,134,80,139,77,144,71,144,68,139" href="javascript:GetClick()" onMouseOver="GetColor('660000','102,0,0','40,00,00')">
<area shape="polygon" coords="94,134,100,134,103,139,100,144,94,144,91,139" href="javascript:GetClick()" onMouseOver="GetColor('330033','51,0,51','20,00,20')">
<area shape="polygon" coords="117,134,123,134,126,139,123,144,117,144,114,139" href="javascript:GetClick()" onMouseOver="GetColor('000066','0,0,102','00,00,40')">
<area shape="polygon" coords="140,134,146,134,149,139,146,144,140,144,137,139" href="javascript:GetClick()" onMouseOver="GetColor('0033CC','0,51,204','00,20,80')">
<area shape="polygon" coords="36,141,42,141,45,146,42,151,36,151,33,146" href="javascript:GetClick()" onMouseOver="GetColor('FF3300','255,51,0','100,20,00')">
<area shape="polygon" coords="59,141,65,141,68,146,65,151,59,151,56,146" href="javascript:GetClick()" onMouseOver="GetColor('990000','153,0,0','60,00,00')">
<area shape="polygon" coords="82,141,88,141,91,146,88,151,82,151,79,146" href="javascript:GetClick()" onMouseOver="GetColor('660033','102,0,51','40,00,20')">
<area shape="polygon" coords="105,141,111,141,114,146,111,151,105,151,102,146" href="javascript:GetClick()" onMouseOver="GetColor('330066','51,0,102','20,00,40')">
<area shape="polygon" coords="128,141,134,141,137,146,134,151,128,151,125,146" href="javascript:GetClick()" onMouseOver="GetColor('000099','0,0,153','00,00,60')">
<area shape="polygon" coords="151,141,157,141,160,146,157,151,151,151,148,146" href="javascript:GetClick()" onMouseOver="GetColor('0033FF','0,51,255','00,20,100')">
<area shape="polygon" coords="48,148,54,148,57,153,54,158,48,158,45,153" href="javascript:GetClick()" onMouseOver="GetColor('CC0000','204,0,0','80,00,00')">
<area shape="polygon" coords="71,148,77,148,80,153,77,158,71,158,68,153" href="javascript:GetClick()" onMouseOver="GetColor('990033','153,0,51','60,00,20')">
<area shape="polygon" coords="94,148,100,148,103,153,100,158,94,158,91,153" href="javascript:GetClick()" onMouseOver="GetColor('660066','102,0,102','40,00,40')">
<area shape="polygon" coords="117,148,123,148,126,153,123,158,117,158,114,153" href="javascript:GetClick()" onMouseOver="GetColor('330099','51,0,153','20,00,60')">
<area shape="polygon" coords="140,148,146,148,149,153,146,158,140,158,137,153" href="javascript:GetClick()" onMouseOver="GetColor('0000CC','0,0,204','00,00,80')">
<area shape="polygon" coords="36,155,42,155,45,160,42,165,36,165,33,160" href="javascript:GetClick()" onMouseOver="GetColor('FF0000','255,0,0','100,00,00')">
<area shape="polygon" coords="59,155,65,155,68,160,65,165,59,165,56,160" href="javascript:GetClick()" onMouseOver="GetColor('CC0033','204,0,51','80,00,20')">
<area shape="polygon" coords="82,155,88,155,91,160,88,165,82,165,79,160" href="javascript:GetClick()" onMouseOver="GetColor('990066','153,0,102','60,00,40')">
<area shape="polygon" coords="105,155,111,155,114,160,111,165,105,165,102,160" href="javascript:GetClick()" onMouseOver="GetColor('660099','102,0,153','40,00,60')">
<area shape="polygon" coords="128,155,134,155,137,160,134,165,128,165,125,160" href="javascript:GetClick()" onMouseOver="GetColor('3300CC','51,0,204','20,00,80')">
<area shape="polygon" coords="151,155,157,155,160,160,157,165,151,165,148,160" href="javascript:GetClick()" onMouseOver="GetColor('0000FF','0,0,255','00,00,100')">
<area shape="polygon" coords="59,169,65,169,68,174,65,179,59,179,56,174" href="javascript:GetClick()" onMouseOver="GetColor('FF0066','255,0,102','100,00,40')">
<area shape="polygon" coords="82,169,88,169,91,174,88,179,82,179,79,174" href="javascript:GetClick()" onMouseOver="GetColor('CC0099','204,0,153','80,00,60')">
<area shape="polygon" coords="105,169,111,169,114,174,111,179,105,179,102,174" href="javascript:GetClick()" onMouseOver="GetColor('9900CC','153,0,204','60,00,80')">
<area shape="polygon" coords="128,169,134,169,137,174,134,179,128,179,125,174" href="javascript:GetClick()" onMouseOver="GetColor('6600FF','102,0,255','40,00,100')">
<area shape="polygon" coords="71,176,77,176,80,181,77,186,71,186,68,181" href="javascript:GetClick()" onMouseOver="GetColor('FF0099','255,0,153','100,00,60')">
<area shape="polygon" coords="94,176,100,176,103,181,100,186,94,186,91,181" href="javascript:GetClick()" onMouseOver="GetColor('CC00CC','204,0,204','80,00,80')">
<area shape="polygon" coords="117,176,123,176,126,181,123,186,117,186,114,181" href="javascript:GetClick()" onMouseOver="GetColor('9900FF','153,0,255','60,00,100')">
<area shape="polygon" coords="82,183,88,183,91,188,88,193,82,193,79,188" href="javascript:GetClick()" onMouseOver="GetColor('FF00CC','255,0,204','100,00,80')">
<area shape="polygon" coords="105,183,111,183,114,188,111,193,105,193,102,188" href="javascript:GetClick()" onMouseOver="GetColor('CC00FF','204,0,255','80,00,100')">
<area shape="polygon" coords="94,190,100,190,103,195,100,200,94,200,91,195" href="javascript:GetClick()" onMouseOver="GetColor('FF00FF','255,0,255','100,00,100')">
<area shape="polygon" coords="318,51,324,51,327,56,324,61,318,61,315,56" href="javascript:GetClick()" onMouseOver="GetColor('00FF00','0,255,0','00,100,00')">
<area shape="polygon" coords="307,58,313,58,316,63,313,68,307,68,304,63" href="javascript:GetClick()" onMouseOver="GetColor('00FF33','0,255,51','00,100,20')">
<area shape="polygon" coords="330,58,336,58,339,63,336,68,330,68,327,63" href="javascript:GetClick()" onMouseOver="GetColor('33FF00','51,255,0','20,100,00')">
<area shape="polygon" coords="295,65,301,65,304,70,301,75,295,75,292,70" href="javascript:GetClick()" onMouseOver="GetColor('00FF66','0,255,102','00,100,40')">
<area shape="polygon" coords="318,65,324,65,327,70,324,75,318,75,315,70" href="javascript:GetClick()" onMouseOver="GetColor('33FF33','51,255,51','20,100,20')">
<area shape="polygon" coords="341,65,347,65,350,70,347,75,341,75,338,70" href="javascript:GetClick()" onMouseOver="GetColor('66FF00','102,255,0','40,100,00')">
<area shape="polygon" coords="284,72,290,72,293,77,290,82,284,82,281,77" href="javascript:GetClick()" onMouseOver="GetColor('00FF99','0,255,153','00,100,60')">
<area shape="polygon" coords="307,72,313,72,316,77,313,82,307,82,304,77" href="javascript:GetClick()" onMouseOver="GetColor('33FF66','51,255,102','20,100,40')">
<area shape="polygon" coords="330,72,336,72,339,77,336,82,330,82,327,77" href="javascript:GetClick()" onMouseOver="GetColor('66FF33','102,255,51','40,100,20')">
<area shape="polygon" coords="353,72,359,72,362,77,359,82,353,82,350,77" href="javascript:GetClick()" onMouseOver="GetColor('99FF00','153,255,0','60,100,00')">
<area shape="polygon" coords="272,79,278,79,281,84,278,89,272,89,269,84" href="javascript:GetClick()" onMouseOver="GetColor('00FFCC','0,255,204','00,100,80')">
<area shape="polygon" coords="295,79,301,79,304,84,301,89,295,89,292,84" href="javascript:GetClick()" onMouseOver="GetColor('33FF99','51,255,153','20,100,60')">
<area shape="polygon" coords="318,79,324,79,327,84,324,89,318,89,315,84" href="javascript:GetClick()" onMouseOver="GetColor('66FF66','102,255,102','40,100,40')">
<area shape="polygon" coords="341,79,347,79,350,84,347,89,341,89,338,84" href="javascript:GetClick()" onMouseOver="GetColor('99FF33','153,255,51','60,100,20')">
<area shape="polygon" coords="364,79,370,79,373,84,370,89,364,89,361,84" href="javascript:GetClick()" onMouseOver="GetColor('CCFF00','204,255,0','80,100,00')">
<area shape="polygon" coords="261,86,267,86,270,91,267,96,261,96,258,91" href="javascript:GetClick()" onMouseOver="GetColor('00FFFF','0,255,255','00,100,100')">
<area shape="polygon" coords="284,86,290,86,293,91,290,96,284,96,281,91" href="javascript:GetClick()" onMouseOver="GetColor('33FFCC','51,255,204','20,100,80')">
<area shape="polygon" coords="307,86,313,86,316,91,313,96,307,96,304,91" href="javascript:GetClick()" onMouseOver="GetColor('66FF99','102,255,153','40,100,60')">
<area shape="polygon" coords="330,86,336,86,339,91,336,96,330,96,327,91" href="javascript:GetClick()" onMouseOver="GetColor('99FF66','153,255,102','60,100,40')">
<area shape="polygon" coords="353,86,359,86,362,91,359,96,353,96,350,91" href="javascript:GetClick()" onMouseOver="GetColor('CCFF33','204,255,51','80,100,20')">
<area shape="polygon" coords="376,86,382,86,385,91,382,96,376,96,373,91" href="javascript:GetClick()" onMouseOver="GetColor('FFFF00','255,255,0','100,100,00')">
<area shape="polygon" coords="272,93,278,93,281,98,278,103,272,103,269,98" href="javascript:GetClick()" onMouseOver="GetColor('33FFFF','51,255,255','20,100,100')">
<area shape="polygon" coords="295,93,301,93,304,98,301,103,295,103,292,98" href="javascript:GetClick()" onMouseOver="GetColor('66FFCC','102,255,204','40,100,80')">
<area shape="polygon" coords="318,93,324,93,327,98,324,103,318,103,315,98" href="javascript:GetClick()" onMouseOver="GetColor('99FF99','153,255,153','60,100,60')">
<area shape="polygon" coords="341,93,347,93,350,98,347,103,341,103,338,98" href="javascript:GetClick()" onMouseOver="GetColor('CCFF66','204,255,102','80,100,40')">
<area shape="polygon" coords="364,93,370,93,373,98,370,103,364,103,361,98" href="javascript:GetClick()" onMouseOver="GetColor('FFFF33','255,255,51','100,100,20')">
<area shape="polygon" coords="261,100,267,100,270,105,267,110,261,110,258,105" href="javascript:GetClick()" onMouseOver="GetColor('00CCFF','0,204,255','00,80,100')">
<area shape="polygon" coords="284,100,290,100,293,105,290,110,284,110,281,105" href="javascript:GetClick()" onMouseOver="GetColor('66FFFF','102,255,255','40,100,100')">
<area shape="polygon" coords="307,100,313,100,316,105,313,110,307,110,304,105" href="javascript:GetClick()" onMouseOver="GetColor('99FFCC','153,255,204','60,100,80')">
<area shape="polygon" coords="330,100,336,100,339,105,336,110,330,110,327,105" href="javascript:GetClick()" onMouseOver="GetColor('CCFF99','204,255,153','80,100,60')">
<area shape="polygon" coords="353,100,359,100,362,105,359,110,353,110,350,105" href="javascript:GetClick()" onMouseOver="GetColor('FFFF66','255,255,102','100,100,40')">
<area shape="polygon" coords="376,100,382,100,385,105,382,110,376,110,373,105" href="javascript:GetClick()" onMouseOver="GetColor('FFCC00','255,204,0','100,80,00')">
<area shape="polygon" coords="272,107,278,107,281,112,278,117,272,117,269,112" href="javascript:GetClick()" onMouseOver="GetColor('33CCFF','51,204,255','20,80,100')">
<area shape="polygon" coords="295,107,301,107,304,112,301,117,295,117,292,112" href="javascript:GetClick()" onMouseOver="GetColor('99FFFF','153,255,255','60,100,100')">
<area shape="polygon" coords="318,107,324,107,327,112,324,117,318,117,315,112" href="javascript:GetClick()" onMouseOver="GetColor('CCFFCC','204,255,204','80,100,80')">
<area shape="polygon" coords="341,107,347,107,350,112,347,117,341,117,338,112" href="javascript:GetClick()" onMouseOver="GetColor('FFFF99','255,255,153','100,100,60')">
<area shape="polygon" coords="364,107,370,107,373,112,370,117,364,117,361,112" href="javascript:GetClick()" onMouseOver="GetColor('FFCC33','255,204,51','100,80,20')">
<area shape="polygon" coords="261,114,267,114,270,119,267,124,261,124,258,119" href="javascript:GetClick()" onMouseOver="GetColor('0099FF','0,153,255','00,60,100')">
<area shape="polygon" coords="284,114,290,114,293,119,290,124,284,124,281,119" href="javascript:GetClick()" onMouseOver="GetColor('66CCFF','102,204,255','40,80,100')">
<area shape="polygon" coords="307,114,313,114,316,119,313,124,307,124,304,119" href="javascript:GetClick()" onMouseOver="GetColor('CCFFFF','204,255,255','80,100,100')">
<area shape="polygon" coords="330,114,336,114,339,119,336,124,330,124,327,119" href="javascript:GetClick()" onMouseOver="GetColor('FFFFCC','255,255,204','100,100,80')">
<area shape="polygon" coords="353,114,359,114,362,119,359,124,353,124,350,119" href="javascript:GetClick()" onMouseOver="GetColor('FFCC66','255,204,102','100,80,40')">
<area shape="polygon" coords="376,114,382,114,385,119,382,124,376,124,373,119" href="javascript:GetClick()" onMouseOver="GetColor('FF9900','255,153,0','100,60,00')">
<area shape="polygon" coords="272,121,278,121,281,126,278,131,272,131,269,126" href="javascript:GetClick()" onMouseOver="GetColor('3399FF','51,153,255','20,60,100')">
<area shape="polygon" coords="295,121,301,121,304,126,301,131,295,131,292,126" href="javascript:GetClick()" onMouseOver="GetColor('99CCFF','153,204,255','60,80,100')">
<area shape="polygon" coords="318,121,324,121,327,126,324,131,318,131,315,126" href="javascript:GetClick()" onMouseOver="GetColor('FFFFFF','255,255,255','100,100,100')">
<area shape="polygon" coords="341,121,347,121,350,126,347,131,341,131,338,126" href="javascript:GetClick()" onMouseOver="GetColor('FFCC99','255,204,153','100,80,60')">
<area shape="polygon" coords="364,121,370,121,373,126,370,131,364,131,361,126" href="javascript:GetClick()" onMouseOver="GetColor('FF9933','255,153,51','100,60,20')">
<area shape="polygon" coords="261,128,267,128,270,133,267,138,261,138,258,133" href="javascript:GetClick()" onMouseOver="GetColor('0066FF','0,102,255','00,40,100')">
<area shape="polygon" coords="284,128,290,128,293,133,290,138,284,138,281,133" href="javascript:GetClick()" onMouseOver="GetColor('6699FF','102,153,255','40,60,100')">
<area shape="polygon" coords="307,128,313,128,316,133,313,138,307,138,304,133" href="javascript:GetClick()" onMouseOver="GetColor('CCCCFF','204,204,255','80,80,100')">
<area shape="polygon" coords="330,128,336,128,339,133,336,138,330,138,327,133" href="javascript:GetClick()" onMouseOver="GetColor('FFCCCC','255,204,204','100,80,80')">
<area shape="polygon" coords="353,128,359,128,362,133,359,138,353,138,350,133" href="javascript:GetClick()" onMouseOver="GetColor('FF9966','255,153,102','100,60,40')">
<area shape="polygon" coords="376,128,382,128,385,133,382,138,376,138,373,133" href="javascript:GetClick()" onMouseOver="GetColor('FF6600','255,102,0','100,40,00')">
<area shape="polygon" coords="272,135,278,135,281,140,278,145,272,145,269,140" href="javascript:GetClick()" onMouseOver="GetColor('3366FF','51,102,255','20,40,100')">
<area shape="polygon" coords="295,135,301,135,304,140,301,145,295,145,292,140" href="javascript:GetClick()" onMouseOver="GetColor('9999FF','153,153,255','60,60,100')">
<area shape="polygon" coords="318,135,324,135,327,140,324,145,318,145,315,140" href="javascript:GetClick()" onMouseOver="GetColor('FFCCFF','255,204,255','100,80,100')">
<area shape="polygon" coords="341,135,347,135,350,140,347,145,341,145,338,140" href="javascript:GetClick()" onMouseOver="GetColor('FF9999','255,153,153','100,60,60')">
<area shape="polygon" coords="364,135,370,135,373,140,370,145,364,145,361,140" href="javascript:GetClick()" onMouseOver="GetColor('FF6633','255,102,51','100,40,20')">
<area shape="polygon" coords="261,142,267,142,270,147,267,152,261,152,258,147" href="javascript:GetClick()" onMouseOver="GetColor('0033FF','0,51,255','00,20,100')">
<area shape="polygon" coords="284,142,290,142,293,147,290,152,284,152,281,147" href="javascript:GetClick()" onMouseOver="GetColor('6666FF','102,102,255','40,40,100')">
<area shape="polygon" coords="307,142,313,142,316,147,313,152,307,152,304,147" href="javascript:GetClick()" onMouseOver="GetColor('CC99FF','204,153,255','80,60,100')">
<area shape="polygon" coords="330,142,336,142,339,147,336,152,330,152,327,147" href="javascript:GetClick()" onMouseOver="GetColor('FF99CC','255,153,204','100,60,80')">
<area shape="polygon" coords="353,142,359,142,362,147,359,152,353,152,350,147" href="javascript:GetClick()" onMouseOver="GetColor('FF6666','255,102,102','100,40,40')">
<area shape="polygon" coords="376,142,382,142,385,147,382,152,376,152,373,147" href="javascript:GetClick()" onMouseOver="GetColor('FF3300','255,51,0','100,20,00')">
<area shape="polygon" coords="272,149,278,149,281,154,278,159,272,159,269,154" href="javascript:GetClick()" onMouseOver="GetColor('3333FF','51,51,255','20,20,100')">
<area shape="polygon" coords="295,149,301,149,304,154,301,159,295,159,292,154" href="javascript:GetClick()" onMouseOver="GetColor('9966FF','153,102,255','60,40,100')">
<area shape="polygon" coords="318,149,324,149,327,154,324,159,318,159,315,154" href="javascript:GetClick()" onMouseOver="GetColor('FF99FF','255,153,255','100,60,100')">
<area shape="polygon" coords="341,149,347,149,350,154,347,159,341,159,338,154" href="javascript:GetClick()" onMouseOver="GetColor('FF6699','255,102,153','100,40,60')">
<area shape="polygon" coords="364,149,370,149,373,154,370,159,364,159,361,154" href="javascript:GetClick()" onMouseOver="GetColor('FF3333','255,51,51','100,20,20')">
<area shape="polygon" coords="261,156,267,156,270,161,267,166,261,166,258,161" href="javascript:GetClick()" onMouseOver="GetColor('0000FF','0,0,255','00,00,100')">
<area shape="polygon" coords="284,156,290,156,293,161,290,166,284,166,281,161" href="javascript:GetClick()" onMouseOver="GetColor('6633FF','102,51,255','40,20,100')">
<area shape="polygon" coords="307,156,313,156,316,161,313,166,307,166,304,161" href="javascript:GetClick()" onMouseOver="GetColor('CC66FF','204,102,255','80,40,100')">
<area shape="polygon" coords="330,156,336,156,339,161,336,166,330,166,327,161" href="javascript:GetClick()" onMouseOver="GetColor('FF66CC','255,102,204','100,40,80')">
<area shape="polygon" coords="353,156,359,156,362,161,359,166,353,166,350,161" href="javascript:GetClick()" onMouseOver="GetColor('FF3366','255,51,102','100,20,40')">
<area shape="polygon" coords="376,156,382,156,385,161,382,166,376,166,373,161" href="javascript:GetClick()" onMouseOver="GetColor('FF0000','255,0,0','100,00,00')">
<area shape="polygon" coords="272,163,278,163,281,168,278,173,272,173,269,168" href="javascript:GetClick()" onMouseOver="GetColor('3300FF','51,0,255','20,00,100')">
<area shape="polygon" coords="295,163,301,163,304,168,301,173,295,173,292,168" href="javascript:GetClick()" onMouseOver="GetColor('9933FF','153,51,255','60,20,100')">
<area shape="polygon" coords="318,163,324,163,327,168,324,173,318,173,315,168" href="javascript:GetClick()" onMouseOver="GetColor('FF66FF','255,102,255','100,40,100')">
<area shape="polygon" coords="341,163,347,163,350,168,347,173,341,173,338,168" href="javascript:GetClick()" onMouseOver="GetColor('FF3399','255,51,153','100,20,60')">
<area shape="polygon" coords="364,163,370,163,373,168,370,173,364,173,361,168" href="javascript:GetClick()" onMouseOver="GetColor('FF0033','255,0,51','100,00,20')">
<area shape="polygon" coords="284,170,290,170,293,175,290,180,284,180,281,175" href="javascript:GetClick()" onMouseOver="GetColor('6600FF','102,0,255','40,00,100')">
<area shape="polygon" coords="307,170,313,170,316,175,313,180,307,180,304,175" href="javascript:GetClick()" onMouseOver="GetColor('CC33FF','204,51,255','80,20,100')">
<area shape="polygon" coords="330,170,336,170,339,175,336,180,330,180,327,175" href="javascript:GetClick()" onMouseOver="GetColor('FF33CC','255,51,204','100,20,80')">
<area shape="polygon" coords="353,170,359,170,362,175,359,180,353,180,350,175" href="javascript:GetClick()" onMouseOver="GetColor('FF0066','255,0,102','100,00,40')">
<area shape="polygon" coords="295,177,301,177,304,182,301,187,295,187,292,182" href="javascript:GetClick()" onMouseOver="GetColor('9900FF','153,0,255','60,00,100')">
<area shape="polygon" coords="318,177,324,177,327,182,324,187,318,187,315,182" href="javascript:GetClick()" onMouseOver="GetColor('FF33FF','255,51,255','100,20,100')">
<area shape="polygon" coords="341,177,347,177,350,182,347,187,341,187,338,182" href="javascript:GetClick()" onMouseOver="GetColor('FF0099','255,0,153','100,00,60')">
<area shape="polygon" coords="307,184,313,184,316,189,313,194,307,194,304,189" href="javascript:GetClick()" onMouseOver="GetColor('CC00FF','204,0,255','80,00,100')">
<area shape="polygon" coords="330,184,336,184,339,189,336,194,330,194,327,189" href="javascript:GetClick()" onMouseOver="GetColor('FF00CC','255,0,204','100,00,80')">
<area shape="polygon" coords="318,191,324,191,327,196,324,201,318,201,315,196" href="javascript:GetClick()" onMouseOver="GetColor('FF00FF','255,0,255','100,00,100')">
<area shape="polygon" coords="88,109,92,103,100,103,104,109,112,109,117,116,112,125,116,132,112,138,104,140,100,146,91,148,86,139,80,139,76,133,80,126,77,118,81,110,89,109,92,103" href="javascript:GetClick()" onMouseOver="GetColor('333333','51,51,51','20,20,20')">
<area shape="polygon" coords="92,89,101,89,104,96,112,96,117,102,123,103,129,110,125,118,128,125,125,132,128,139,125,147,116,148,112,154,104,154,102,162,92,162,88,155,80,155,75,147,76,148,67,147,63,138,67,132,65,124,68,118,64,111,69,102,77,102,80,95,88,94,91,88" href="javascript:GetClick()" onMouseOver="GetColor('666666','102,102,102','40,40,40')">
<area shape="polygon" coords="92,75,57,96,54,103,54,146,56,153,92,176,101,176,135,155,140,147,139,104,138,97,100,74" href="javascript:GetClick()" onMouseOver="GetColor('999999','153,153,153','60,60,60')">
<area shape="polygon" coords="94,60,44,90,41,96,41,154,46,161,92,190,101,190,148,162,150,156,151,98,151,95,147,90,100,60,96,60" href="javascript:GetClick()" onMouseOver="GetColor('CCCCCC','204,204,204','80,80,80')">
<area shape="polygon" coords="220,100,218,106,221,111,227,112,230,105,226,99,222,99" href="javascript:GetClick()" onMouseOver="GetColor('CCCCCC','204,204,204','80,80,80')">
<area shape="polygon" coords="221,114,218,119,221,126,227,125,230,119,227,114,220,114" href="javascript:GetClick()" onMouseOver="GetColor('999999','153,153,153','60,60,60')">
<area shape="polygon" coords="220,127,217,133,222,139,226,138,230,132,227,126" href="javascript:GetClick()" onMouseOver="GetColor('666666','102,102,102','40,40,40')">
<area shape="polygon" coords="220,142,218,147,221,152,227,152,230,146,226,141" href="javascript:GetClick()" onMouseOver="GetColor('333333','51,51,51','20,20,20')">
<area shape="polygon" coords="152,63,155,56,152,50,155,41,164,41,168,34,177,34,181,41,188,41,193,49,190,56,193,62,189,72,181,72,177,79,168,78,164,72,156,71" href="javascript:GetClick()" onMouseOver="GetColor('666666','102,102,102','40,40,40')">
<area shape="polygon" coords="317,104,306,110,301,119,300,133,305,142,316,149,326,149,337,142,342,133,342,119,337,109,326,103,316,104" href="javascript:GetClick()" onMouseOver="GetColor('CCCCCC','204,204,204','80,80,80')">
<area shape="polygon" coords="316,90,293,104,289,110,290,143,293,148,318,163,326,163,349,149,354,139,354,111,349,103,325,89" href="javascript:GetClick()" onMouseOver="GetColor('999999','153,153,153','60,60,60')">
<area shape="polygon" coords="316,76,282,96,277,105,278,148,281,155,316,176,326,177,360,155,365,146,365,104,360,96,325,75" href="javascript:GetClick()" onMouseOver="GetColor('666666','102,102,102','40,40,40')">
<area shape="polygon" coords="316,62,270,90,265,97,266,154,270,162,316,190,326,190,371,161,375,155,376,97,372,89,325,60" href="javascript:GetClick()" onMouseOver="GetColor('333333','51,51,51','20,20,20')">
<area shape="polygon" coords="375,186,372,192,363,192,359,202,362,207,360,215,363,223,371,223,376,230,385,230,389,222,396,223,401,214,397,206,401,201,397,192,389,192,385,185,374,185" href="javascript:GetClick()" onMouseOver="GetColor('999999','153,153,153','60,60,60')">
<area shape="polygon" coords="73,225,80,225,82,230,80,235,73,235,71,230" href="javascript:GetClick()" onMouseOver="GetColor('6633CC','102,51,204','40,20,80')">
<area shape="polygon" coords="50,236,47,230,50,224,56,225,59,230,56,236" href="javascript:GetClick()" onMouseOver="GetColor('333366','51,51,102','20,20,40')">
<area shape="polygon" coords="403,149,410,149,413,154,411,160,403,160,400,155" href="javascript:GetClick()" onMouseOver="GetColor('CC3366','204,51,102','80,20,40')">
<area shape="polygon" coords="426,148,432,148,435,154,432,160,426,160,423,154" href="javascript:GetClick()" onMouseOver="GetColor('CC66CC','204,102,204','80,40,80')">
<area shape="polygon" coords="232,80,224,79,224,0,436,0,437,253,224,253,224,173,233,173" href="javascript:GetClick()" onMouseOver="GetColor('000000','0,0,0','00,00,00')">
<area shape="polygon" coords="224,86,220,87,218,92,219,97,225,97" href="javascript:GetClick()" onMouseOver="GetColor('FFFFFF','255,255,255','100,100,100')">
<area shape="polygon" coords="224,174,216,174,216,80,224,80" href="javascript:GetClick()" onMouseOver="GetColor('000000','0,0,0','00,00,00')">
<area shape="polygon" coords="226,166,230,162,227,156,220,157,219,162,221,166" href="javascript:GetClick()" onMouseOver="GetColor('000000','0,0,0','00,00,00')">
<area shape="rect" coords="0,0,437,253" href="javascript:GetClick()" onMouseOver="GetColor('FFFFFF','255,255,255','100,100,100')">
</map>
</form>
</body>
</html>
<HTML>
<!--
#-------------------------------------------------------------------
# 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
#-------------------------------------------------------------------
-->
<HEAD><TITLE>Color Picker</TITLE>
<SCRIPT LANGUAGE="JavaScript">
var myColor, decColor, pctColor="" ;
function GetColor( myColor, decColor, pctColor ) {
if (document.forms[0].setColor.value != "Reset") {
document.forms[0].hex_value.value=myColor ;
document.forms[0].dec_value.value=decColor ;
document.forms[0].pct_value.value=pctColor ;
}
}
function GetClick( ) {
window.blur();
window.opener.focus();
window.opener.setColor(document.forms[0].hex_value.value);
window.close();
}
</SCRIPT>
</HEAD>
<BODY bgcolor="#FFFFFF" TEXT="#000000" LINK="#000000" VLINK="#000000" ALINK="#000000"
onLoad="document.forms[0].hex_value.value='';
document.forms[0].dec_value.value='';
document.forms[0].pct_value.value='';
document.forms[0].setColor.value=''" leftmargin=0 topmargin=0 marginheight="0" marginwidth="0">
<form Name="COLORS">
<input type="HIDDEN" name="hex_value" value="" size="9" onClick="document.forms[0].hex_value.value='Not Set'; document.forms[0].myformat.value=''; document.forms[0].setColor.value=''">
<input type="HIDDEN" name="dec_value" value="" size="12" onClick="document.forms[0].dec_value.value='Not Set'; document.forms[0].myformat.value=''; document.forms[0].setColor.value=''">
<input type="HIDDEN" name="pct_value" value="" size="11" onClick="document.forms[0].pct_value.value='Not Set'; document.forms[0].myformat.value=''; document.forms[0].setColor.value=''">
<input type="HIDDEN" name="setColor" value="">
<img src="colorPicker.gif" width="438" height="254" usemap="#colorpicker">
<map name="colorpicker">
<area shape="polygon" coords="47,162,53,162,56,167,53,172,47,172,44,167" href="javascript:GetClick()" onMouseOver="GetColor('FF0033','255,0,51','100,00,20')">
<area shape="polygon" coords="70,162,76,162,79,167,76,172,70,172,67,167" href="javascript:GetClick()" onMouseOver="GetColor('CC0066','204,0,102','80,00,40')">
<area shape="polygon" coords="93,162,99,162,102,167,99,172,93,172,90,167" href="javascript:GetClick()" onMouseOver="GetColor('990099','153,0,153','60,00,60')">
<area shape="polygon" coords="116,162,122,162,125,167,122,172,116,172,113,167" href="javascript:GetClick()" onMouseOver="GetColor('6600CC','102,0,204','40,00,80')">
<area shape="polygon" coords="139,162,145,162,148,167,145,172,139,172,136,167" href="javascript:GetClick()" onMouseOver="GetColor('3300FF','51,0,255','20,00,100')">
<area shape="polygon" coords="299,2,305,2,308,7,305,12,299,12,296,7" href="javascript:GetClick()" onMouseOver="GetColor('CCCC33','204,204,51','80,80,20')">
<area shape="polygon" coords="287,9,293,9,296,14,293,19,287,19,284,14" href="javascript:GetClick()" onMouseOver="GetColor('CCCC66','204,204,102','80,80,40')">
<area shape="polygon" coords="276,16,282,16,285,21,282,26,276,26,273,21" href="javascript:GetClick()" onMouseOver="GetColor('CCCC99','204,204,153','80,80,60')">
<area shape="polygon" coords="299,16,305,16,308,21,305,26,299,26,296,21" href="javascript:GetClick()" onMouseOver="GetColor('99CC33','153,204,51','60,80,20')">
<area shape="polygon" coords="264,23,270,23,273,28,270,33,264,33,261,28" href="javascript:GetClick()" onMouseOver="GetColor('CCCCCC','204,204,204','80,80,80')">
<area shape="polygon" coords="287,23,293,23,296,28,293,33,287,33,284,28" href="javascript:GetClick()" onMouseOver="GetColor('99CC66','153,204,102','60,80,40')">
<area shape="polygon" coords="276,30,282,30,285,35,282,40,276,40,273,35" href="javascript:GetClick()" onMouseOver="GetColor('99CC99','153,204,153','60,80,60')">
<area shape="polygon" coords="299,30,305,30,308,35,305,40,299,40,296,35" href="javascript:GetClick()" onMouseOver="GetColor('66CC33','102,204,51','40,80,20')">
<area shape="polygon" coords="264,37,270,37,273,42,270,47,264,47,261,42" href="javascript:GetClick()" onMouseOver="GetColor('99CCCC','153,204,204','60,80,80')">
<area shape="polygon" coords="287,37,293,37,296,42,293,47,287,47,284,42" href="javascript:GetClick()" onMouseOver="GetColor('66CC66','102,204,102','40,80,40')">
<area shape="polygon" coords="276,44,282,44,285,49,282,54,276,54,273,49" href="javascript:GetClick()" onMouseOver="GetColor('66CC99','102,204,153','40,80,60')">
<area shape="polygon" coords="299,44,305,44,308,49,305,54,299,54,296,49" href="javascript:GetClick()" onMouseOver="GetColor('33CC33','51,204,51','20,80,20')">
<area shape="polygon" coords="264,51,270,51,273,56,270,61,264,61,261,56" href="javascript:GetClick()" onMouseOver="GetColor('66CCCC','102,204,204','40,80,80')">
<area shape="polygon" coords="287,51,293,51,296,56,293,61,287,61,284,56" href="javascript:GetClick()" onMouseOver="GetColor('33CC66','51,204,102','20,80,40')">
<area shape="polygon" coords="276,58,282,58,285,63,282,68,276,68,273,63" href="javascript:GetClick()" onMouseOver="GetColor('33CC99','51,204,153','20,80,60')">
<area shape="polygon" coords="264,65,270,65,273,70,270,75,264,75,261,70" href="javascript:GetClick()" onMouseOver="GetColor('33CCCC','51,204,204','20,80,80')">
<area shape="polygon" coords="392,100,398,100,401,105,398,110,392,110,389,105" href="javascript:GetClick()" onMouseOver="GetColor('CCCC33','204,204,51','80,80,20')">
<area shape="polygon" coords="404,107,410,107,413,112,410,117,404,117,401,112" href="javascript:GetClick()" onMouseOver="GetColor('CCCC66','204,204,102','80,80,40')">
<area shape="polygon" coords="392,114,398,114,401,119,398,124,392,124,389,119" href="javascript:GetClick()" onMouseOver="GetColor('CC9933','204,153,51','80,60,20')">
<area shape="polygon" coords="415,114,421,114,424,119,421,124,415,124,412,119" href="javascript:GetClick()" onMouseOver="GetColor('CCCC99','204,204,153','80,80,60')">
<area shape="polygon" coords="404,121,410,121,413,126,410,131,404,131,401,126" href="javascript:GetClick()" onMouseOver="GetColor('CC9966','204,153,102','80,60,40')">
<area shape="polygon" coords="427,121,433,121,436,126,433,131,427,131,424,126" href="javascript:GetClick()" onMouseOver="GetColor('CCCCCC','204,204,204','80,80,80')">
<area shape="polygon" coords="392,128,398,128,401,133,398,138,392,138,389,133" href="javascript:GetClick()" onMouseOver="GetColor('CC6633','204,102,51','80,40,20')">
<area shape="polygon" coords="415,128,421,128,424,133,421,138,415,138,412,133" href="javascript:GetClick()" onMouseOver="GetColor('CC9999','204,153,153','80,60,60')">
<area shape="polygon" coords="404,135,410,135,413,140,410,145,404,145,401,140" href="javascript:GetClick()" onMouseOver="GetColor('CC6666','204,102,102','80,40,40')">
<area shape="polygon" coords="427,135,433,135,436,140,433,145,427,145,424,140" href="javascript:GetClick()" onMouseOver="GetColor('CC99CC','204,153,204','80,60,80')">
<area shape="polygon" coords="392,142,398,142,401,147,398,152,392,152,389,147" href="javascript:GetClick()" onMouseOver="GetColor('CC3333','204,51,51','80,20,20')">
<area shape="polygon" coords="415,142,421,142,424,147,421,152,415,152,412,147" href="javascript:GetClick()" onMouseOver="GetColor('CC6699','204,102,153','80,40,60')">
<area shape="polygon" coords="415,156,421,156,424,161,421,166,415,166,412,161" href="javascript:GetClick()" onMouseOver="GetColor('CC3399','204,51,153','80,20,60')">
<area shape="polygon" coords="427,163,433,163,436,168,433,173,427,173,424,168" href="javascript:GetClick()" onMouseOver="GetColor('CC33CC','204,51,204','80,20,80')">
<area shape="polygon" coords="201,78,207,78,210,83,207,88,201,88,198,83" href="javascript:GetClick()" onMouseOver="GetColor('33CC33','51,204,51','20,80,20')">
<area shape="polygon" coords="189,85,195,85,198,90,195,95,189,95,186,90" href="javascript:GetClick()" onMouseOver="GetColor('33CC66','51,204,102','20,80,40')">
<area shape="polygon" coords="178,92,184,92,187,97,184,102,178,102,175,97" href="javascript:GetClick()" onMouseOver="GetColor('33CC99','51,204,153','20,80,60')">
<area shape="polygon" coords="201,92,207,92,210,97,207,102,201,102,198,97" href="javascript:GetClick()" onMouseOver="GetColor('339933','51,153,51','20,60,20')">
<area shape="polygon" coords="166,99,172,99,175,104,172,109,166,109,163,104" href="javascript:GetClick()" onMouseOver="GetColor('33CCCC','51,204,204','20,80,80')">
<area shape="polygon" coords="189,99,195,99,198,104,195,109,189,109,186,104" href="javascript:GetClick()" onMouseOver="GetColor('339966','51,153,102','20,60,40')">
<area shape="polygon" coords="178,106,184,106,187,111,184,116,178,116,175,111" href="javascript:GetClick()" onMouseOver="GetColor('339999','51,153,153','20,60,60')">
<area shape="polygon" coords="201,106,207,106,210,111,207,116,201,116,198,111" href="javascript:GetClick()" onMouseOver="GetColor('336633','51,102,51','20,40,20')">
<area shape="polygon" coords="166,113,172,113,175,118,172,123,166,123,163,118" href="javascript:GetClick()" onMouseOver="GetColor('3399CC','51,153,204','20,60,80')">
<area shape="polygon" coords="189,113,195,113,198,118,195,123,189,123,186,118" href="javascript:GetClick()" onMouseOver="GetColor('336666','51,102,102','20,40,40')">
<area shape="polygon" coords="178,120,184,120,187,125,184,130,178,130,175,125" href="javascript:GetClick()" onMouseOver="GetColor('336699','51,102,153','20,40,60')">
<area shape="polygon" coords="201,120,207,120,210,125,207,130,201,130,198,125" href="javascript:GetClick()" onMouseOver="GetColor('333333','51,51,51','20,20,20')">
<area shape="polygon" coords="166,127,172,127,175,132,172,137,166,137,163,132" href="javascript:GetClick()" onMouseOver="GetColor('3366CC','51,102,204','20,40,80')">
<area shape="polygon" coords="189,127,195,127,198,132,195,137,189,137,186,132" href="javascript:GetClick()" onMouseOver="GetColor('333366','51,51,102','20,20,40')">
<area shape="polygon" coords="178,134,184,134,187,139,184,144,178,144,175,139" href="javascript:GetClick()" onMouseOver="GetColor('333399','51,51,153','20,20,60')">
<area shape="polygon" coords="166,141,172,141,175,146,172,151,166,151,163,146" href="javascript:GetClick()" onMouseOver="GetColor('3333CC','51,51,204','20,20,80')">
<area shape="polygon" coords="39,176,45,176,48,181,45,186,39,186,36,181" href="javascript:GetClick()" onMouseOver="GetColor('CC3333','204,51,51','80,20,20')">
<area shape="polygon" coords="51,183,57,183,60,188,57,193,51,193,48,188" href="javascript:GetClick()" onMouseOver="GetColor('CC3366','204,51,102','80,20,40')">
<area shape="polygon" coords="39,190,45,190,48,195,45,200,39,200,36,195" href="javascript:GetClick()" onMouseOver="GetColor('993333','153,51,51','60,20,20')">
<area shape="polygon" coords="62,190,68,190,71,195,68,200,62,200,59,195" href="javascript:GetClick()" onMouseOver="GetColor('CC3399','204,51,153','80,20,60')">
<area shape="polygon" coords="51,197,57,197,60,202,57,207,51,207,48,202" href="javascript:GetClick()" onMouseOver="GetColor('993366','153,51,102','60,20,40')">
<area shape="polygon" coords="74,197,80,197,83,202,80,207,74,207,71,202" href="javascript:GetClick()" onMouseOver="GetColor('CC33CC','204,51,204','80,20,80')">
<area shape="polygon" coords="39,204,45,204,48,209,45,214,39,214,36,209" href="javascript:GetClick()" onMouseOver="GetColor('663333','102,51,51','40,20,20')">
<area shape="polygon" coords="62,204,68,204,71,209,68,214,62,214,59,209" href="javascript:GetClick()" onMouseOver="GetColor('993399','153,51,153','60,20,60')">
<area shape="polygon" coords="51,211,57,211,60,216,57,221,51,221,48,216" href="javascript:GetClick()" onMouseOver="GetColor('663366','102,51,102','40,20,40')">
<area shape="polygon" coords="74,211,80,211,83,216,80,221,74,221,71,216" href="javascript:GetClick()" onMouseOver="GetColor('9933CC','153,51,204','60,20,80')">
<area shape="polygon" coords="39,218,45,218,48,223,45,228,39,228,36,223" href="javascript:GetClick()" onMouseOver="GetColor('333333','51,51,51','20,20,20')">
<area shape="polygon" coords="62,218,68,218,71,223,68,228,62,228,59,223" href="javascript:GetClick()" onMouseOver="GetColor('663399','102,51,153','40,20,60')">
<area shape="polygon" coords="62,232,68,232,71,237,68,242,62,242,59,237" href="javascript:GetClick()" onMouseOver="GetColor('333399','51,51,153','20,20,60')">
<area shape="polygon" coords="74,239,80,239,83,244,80,249,74,249,71,244" href="javascript:GetClick()" onMouseOver="GetColor('3333CC','51,51,204','20,20,80')">
<area shape="polygon" coords="378,188,384,188,387,193,384,198,378,198,375,193" href="javascript:GetClick()" onMouseOver="GetColor('669966','102,153,102','40,60,40')">
<area shape="polygon" coords="366,195,372,195,375,200,372,205,366,205,363,200" href="javascript:GetClick()" onMouseOver="GetColor('669999','102,153,153','40,60,60')">
<area shape="polygon" coords="389,195,395,195,398,200,395,205,389,205,386,200" href="javascript:GetClick()" onMouseOver="GetColor('999966','153,153,102','60,60,40')">
<area shape="polygon" coords="378,202,384,202,387,207,384,212,378,212,375,207" href="javascript:GetClick()" onMouseOver="GetColor('000000','0,0,0','00,00,00')">
<area shape="polygon" coords="366,209,372,209,375,214,372,219,366,219,363,214" href="javascript:GetClick()" onMouseOver="GetColor('666699','102,102,153','40,40,60')">
<area shape="polygon" coords="389,209,395,209,398,214,395,219,389,219,386,214" href="javascript:GetClick()" onMouseOver="GetColor('996666','153,102,102','60,40,40')">
<area shape="polygon" coords="378,216,384,216,387,221,384,226,378,226,375,221" href="javascript:GetClick()" onMouseOver="GetColor('996699','153,102,153','60,40,60')">
<area shape="polygon" coords="265,177,271,177,274,182,271,187,265,187,262,182" href="javascript:GetClick()" onMouseOver="GetColor('3333CC','51,51,204','20,20,80')">
<area shape="polygon" coords="253,184,259,184,262,189,259,194,253,194,250,189" href="javascript:GetClick()" onMouseOver="GetColor('3366CC','51,102,204','20,40,80')">
<area shape="polygon" coords="276,184,282,184,285,189,282,194,276,194,273,189" href="javascript:GetClick()" onMouseOver="GetColor('6633CC','102,51,204','40,20,80')">
<area shape="polygon" coords="242,191,248,191,251,196,248,201,242,201,239,196" href="javascript:GetClick()" onMouseOver="GetColor('3399CC','51,153,204','20,60,80')">
<area shape="polygon" coords="265,191,271,191,274,196,271,201,265,201,262,196" href="javascript:GetClick()" onMouseOver="GetColor('6666CC','102,102,204','40,40,80')">
<area shape="polygon" coords="288,191,294,191,297,196,294,201,288,201,285,196" href="javascript:GetClick()" onMouseOver="GetColor('9933CC','153,51,204','60,20,80')">
<area shape="polygon" coords="230,198,236,198,239,203,236,208,230,208,227,203" href="javascript:GetClick()" onMouseOver="GetColor('33CCCC','51,204,204','20,80,80')">
<area shape="polygon" coords="253,198,259,198,262,203,259,208,253,208,250,203" href="javascript:GetClick()" onMouseOver="GetColor('6699CC','102,153,204','40,60,80')">
<area shape="polygon" coords="276,198,282,198,285,203,282,208,276,208,273,203" href="javascript:GetClick()" onMouseOver="GetColor('9966CC','153,102,204','60,40,80')">
<area shape="polygon" coords="299,198,305,198,308,203,305,208,299,208,296,203" href="javascript:GetClick()" onMouseOver="GetColor('CC33CC','204,51,204','80,20,80')">
<area shape="polygon" coords="242,205,248,205,251,210,248,215,242,215,239,210" href="javascript:GetClick()" onMouseOver="GetColor('66CCCC','102,204,204','40,80,80')">
<area shape="polygon" coords="265,205,271,205,274,210,271,215,265,215,262,210" href="javascript:GetClick()" onMouseOver="GetColor('9999CC','153,153,204','60,60,80')">
<area shape="polygon" coords="288,205,294,205,297,210,294,215,288,215,285,210" href="javascript:GetClick()" onMouseOver="GetColor('CC66CC','204,102,204','80,40,80')">
<area shape="polygon" coords="253,212,259,212,262,217,259,222,253,222,250,217" href="javascript:GetClick()" onMouseOver="GetColor('99CCCC','153,204,204','60,80,80')">
<area shape="polygon" coords="276,212,282,212,285,217,282,222,276,222,273,217" href="javascript:GetClick()" onMouseOver="GetColor('CC99CC','204,153,204','80,60,80')">
<area shape="polygon" coords="265,219,271,219,274,224,271,229,265,229,262,224" href="javascript:GetClick()" onMouseOver="GetColor('CCCCCC','204,204,204','80,80,80')">
<area shape="polygon" coords="40,23,46,23,49,28,46,33,40,33,37,28" href="javascript:GetClick()" onMouseOver="GetColor('333333','51,51,51','20,20,20')">
<area shape="polygon" coords="28,30,34,30,37,35,34,40,28,40,25,35" href="javascript:GetClick()" onMouseOver="GetColor('663333','102,51,51','40,20,20')">
<area shape="polygon" coords="51,30,57,30,60,35,57,40,51,40,48,35" href="javascript:GetClick()" onMouseOver="GetColor('336633','51,102,51','20,40,20')">
<area shape="polygon" coords="17,37,23,37,26,42,23,47,17,47,14,42" href="javascript:GetClick()" onMouseOver="GetColor('993333','153,51,51','60,20,20')">
<area shape="polygon" coords="40,37,46,37,49,42,46,47,40,47,37,42" href="javascript:GetClick()" onMouseOver="GetColor('666633','102,102,51','40,40,20')">
<area shape="polygon" coords="63,37,69,37,72,42,69,47,63,47,60,42" href="javascript:GetClick()" onMouseOver="GetColor('339933','51,153,51','20,60,20')">
<area shape="polygon" coords="5,44,11,44,14,49,11,54,5,54,2,49" href="javascript:GetClick()" onMouseOver="GetColor('CC3333','204,51,51','80,20,20')">
<area shape="polygon" coords="28,44,34,44,37,49,34,54,28,54,25,49" href="javascript:GetClick()" onMouseOver="GetColor('996633','153,102,51','60,40,20')">
<area shape="polygon" coords="51,44,57,44,60,49,57,54,51,54,48,49" href="javascript:GetClick()" onMouseOver="GetColor('669933','102,153,51','40,60,20')">
<area shape="polygon" coords="74,44,80,44,83,49,80,54,74,54,71,49" href="javascript:GetClick()" onMouseOver="GetColor('33CC33','51,204,51','20,80,20')">
<area shape="polygon" coords="17,51,23,51,26,56,23,61,17,61,14,56" href="javascript:GetClick()" onMouseOver="GetColor('CC6633','204,102,51','80,40,20')">
<area shape="polygon" coords="40,51,46,51,49,56,46,61,40,61,37,56" href="javascript:GetClick()" onMouseOver="GetColor('999933','153,153,51','60,60,20')">
<area shape="polygon" coords="63,51,69,51,72,56,69,61,63,61,60,56" href="javascript:GetClick()" onMouseOver="GetColor('66CC33','102,204,51','40,80,20')">
<area shape="polygon" coords="28,58,34,58,37,63,34,68,28,68,25,63" href="javascript:GetClick()" onMouseOver="GetColor('CC9933','204,153,51','80,60,20')">
<area shape="polygon" coords="51,58,57,58,60,63,57,68,51,68,48,63" href="javascript:GetClick()" onMouseOver="GetColor('99CC33','153,204,51','60,80,20')">
<area shape="polygon" coords="40,65,46,65,49,70,46,75,40,75,37,70" href="javascript:GetClick()" onMouseOver="GetColor('CCCC33','204,204,51','80,80,20')">
<area shape="polygon" coords="170,37,176,37,179,42,176,47,170,47,167,42" href="javascript:GetClick()" onMouseOver="GetColor('996699','153,102,153','60,40,60')">
<area shape="polygon" coords="158,44,164,44,167,49,164,54,158,54,155,49" href="javascript:GetClick()" onMouseOver="GetColor('996666','153,102,102','60,40,40')">
<area shape="polygon" coords="181,44,187,44,190,49,187,54,181,54,178,49" href="javascript:GetClick()" onMouseOver="GetColor('666699','102,102,153','40,40,60')">
<area shape="polygon" coords="170,51,176,51,179,56,176,61,170,61,167,56" href="javascript:GetClick()" onMouseOver="GetColor('FFFFFF','255,255,255','100,100,100')">
<area shape="polygon" coords="158,58,164,58,167,63,164,68,158,68,155,63" href="javascript:GetClick()" onMouseOver="GetColor('999966','153,153,102','60,60,40')">
<area shape="polygon" coords="181,58,187,58,190,63,187,68,181,68,178,63" href="javascript:GetClick()" onMouseOver="GetColor('669999','102,153,153','40,60,60')">
<area shape="polygon" coords="170,65,176,65,179,70,176,75,170,75,167,70" href="javascript:GetClick()" onMouseOver="GetColor('669966','102,153,102','40,60,40')">
<area shape="polygon" coords="94,50,100,50,103,55,100,60,94,60,91,55" href="javascript:GetClick()" onMouseOver="GetColor('00FF00','0,255,0','00,100,00')">
<area shape="polygon" coords="82,57,88,57,91,62,88,67,82,67,79,62" href="javascript:GetClick()" onMouseOver="GetColor('33FF00','51,255,0','20,100,00')">
<area shape="polygon" coords="105,57,111,57,114,62,111,67,105,67,102,62" href="javascript:GetClick()" onMouseOver="GetColor('00FF33','0,255,51','00,100,20')">
<area shape="polygon" coords="71,64,77,64,80,69,77,74,71,74,68,69" href="javascript:GetClick()" onMouseOver="GetColor('66FF00','102,255,0','40,100,00')">
<area shape="polygon" coords="94,64,100,64,103,69,100,74,94,74,91,69" href="javascript:GetClick()" onMouseOver="GetColor('00CC00','0,204,0','00,80,00')">
<area shape="polygon" coords="117,64,123,64,126,69,123,74,117,74,114,69" href="javascript:GetClick()" onMouseOver="GetColor('00FF66','0,255,102','00,100,40')">
<area shape="polygon" coords="59,71,65,71,68,76,65,81,59,81,56,76" href="javascript:GetClick()" onMouseOver="GetColor('99FF00','153,255,0','60,100,00')">
<area shape="polygon" coords="82,71,88,71,91,76,88,81,82,81,79,76" href="javascript:GetClick()" onMouseOver="GetColor('33CC00','51,204,0','20,80,00')">
<area shape="polygon" coords="105,71,111,71,114,76,111,81,105,81,102,76" href="javascript:GetClick()" onMouseOver="GetColor('00CC33','0,204,51','00,80,20')">
<area shape="polygon" coords="128,71,134,71,137,76,134,81,128,81,125,76" href="javascript:GetClick()" onMouseOver="GetColor('00FF99','0,255,153','00,100,60')">
<area shape="polygon" coords="48,78,54,78,57,83,54,88,48,88,45,83" href="javascript:GetClick()" onMouseOver="GetColor('CCFF00','204,255,0','80,100,00')">
<area shape="polygon" coords="71,78,77,78,80,83,77,88,71,88,68,83" href="javascript:GetClick()" onMouseOver="GetColor('66CC00','102,204,0','40,80,00')">
<area shape="polygon" coords="94,78,100,78,103,83,100,88,94,88,91,83" href="javascript:GetClick()" onMouseOver="GetColor('009900','0,153,0','00,60,00')">
<area shape="polygon" coords="117,78,123,78,126,83,123,88,117,88,114,83" href="javascript:GetClick()" onMouseOver="GetColor('00CC66','0,204,102','00,80,40')">
<area shape="polygon" coords="140,78,146,78,149,83,146,88,140,88,137,83" href="javascript:GetClick()" onMouseOver="GetColor('00FFCC','0,255,204','00,100,80')">
<area shape="polygon" coords="36,85,42,85,45,90,42,95,36,95,33,90" href="javascript:GetClick()" onMouseOver="GetColor('FFFF00','255,255,0','100,100,00')">
<area shape="polygon" coords="59,85,65,85,68,90,65,95,59,95,56,90" href="javascript:GetClick()" onMouseOver="GetColor('99CC00','153,204,0','60,80,00')">
<area shape="polygon" coords="82,85,88,85,91,90,88,95,82,95,79,90" href="javascript:GetClick()" onMouseOver="GetColor('339900','51,153,0','20,60,00')">
<area shape="polygon" coords="105,85,111,85,114,90,111,95,105,95,102,90" href="javascript:GetClick()" onMouseOver="GetColor('009933','0,153,51','00,60,20')">
<area shape="polygon" coords="128,85,134,85,137,90,134,95,128,95,125,90" href="javascript:GetClick()" onMouseOver="GetColor('00CC99','0,204,153','00,80,60')">
<area shape="polygon" coords="151,85,157,85,160,90,157,95,151,95,148,90" href="javascript:GetClick()" onMouseOver="GetColor('00FFFF','0,255,255','00,100,100')">
<area shape="polygon" coords="48,92,54,92,57,97,54,102,48,102,45,97" href="javascript:GetClick()" onMouseOver="GetColor('CCCC00','204,204,0','80,80,00')">
<area shape="polygon" coords="71,92,77,92,80,97,77,102,71,102,68,97" href="javascript:GetClick()" onMouseOver="GetColor('669900','102,153,0','40,60,00')">
<area shape="polygon" coords="94,92,100,92,103,97,100,102,94,102,91,97" href="javascript:GetClick()" onMouseOver="GetColor('006600','0,102,0','00,40,00')">
<area shape="polygon" coords="117,92,123,92,126,97,123,102,117,102,114,97" href="javascript:GetClick()" onMouseOver="GetColor('009966','0,153,102','00,60,40')">
<area shape="polygon" coords="140,92,146,92,149,97,146,102,140,102,137,97" href="javascript:GetClick()" onMouseOver="GetColor('00CCCC','0,204,204','00,80,80')">
<area shape="polygon" coords="36,99,42,99,45,104,42,109,36,109,33,104" href="javascript:GetClick()" onMouseOver="GetColor('FFCC00','255,204,0','100,80,00')">
<area shape="polygon" coords="59,99,65,99,68,104,65,109,59,109,56,104" href="javascript:GetClick()" onMouseOver="GetColor('999900','153,153,0','60,60,00')">
<area shape="polygon" coords="82,99,88,99,91,104,88,109,82,109,79,104" href="javascript:GetClick()" onMouseOver="GetColor('336600','51,102,0','20,40,00')">
<area shape="polygon" coords="105,99,111,99,114,104,111,109,105,109,102,104" href="javascript:GetClick()" onMouseOver="GetColor('006633','0,102,51','00,40,20')">
<area shape="polygon" coords="128,99,134,99,137,104,134,109,128,109,125,104" href="javascript:GetClick()" onMouseOver="GetColor('009999','0,153,153','00,60,60')">
<area shape="polygon" coords="151,99,157,99,160,104,157,109,151,109,148,104" href="javascript:GetClick()" onMouseOver="GetColor('00CCFF','0,204,255','00,80,100')">
<area shape="polygon" coords="48,106,54,106,57,111,54,116,48,116,45,111" href="javascript:GetClick()" onMouseOver="GetColor('CC9900','204,153,0','80,60,00')">
<area shape="polygon" coords="71,106,77,106,80,111,77,116,71,116,68,111" href="javascript:GetClick()" onMouseOver="GetColor('666600','102,102,0','40,40,00')">
<area shape="polygon" coords="94,106,100,106,103,111,100,116,94,116,91,111" href="javascript:GetClick()" onMouseOver="GetColor('003300','0,51,0','00,20,00')">
<area shape="polygon" coords="117,106,123,106,126,111,123,116,117,116,114,111" href="javascript:GetClick()" onMouseOver="GetColor('006666','0,102,102','00,40,40')">
<area shape="polygon" coords="140,106,146,106,149,111,146,116,140,116,137,111" href="javascript:GetClick()" onMouseOver="GetColor('0099CC','0,153,204','00,60,80')">
<area shape="polygon" coords="36,113,42,113,45,118,42,123,36,123,33,118" href="javascript:GetClick()" onMouseOver="GetColor('FF9900','255,153,0','100,60,00')">
<area shape="polygon" coords="59,113,65,113,68,118,65,123,59,123,56,118" href="javascript:GetClick()" onMouseOver="GetColor('996600','153,102,0','60,40,00')">
<area shape="polygon" coords="82,113,88,113,91,118,88,123,82,123,79,118" href="javascript:GetClick()" onMouseOver="GetColor('333300','51,51,0','20,20,00')">
<area shape="polygon" coords="105,113,111,113,114,118,111,123,105,123,102,118" href="javascript:GetClick()" onMouseOver="GetColor('003333','0,51,51','00,20,20')">
<area shape="polygon" coords="128,113,134,113,137,118,134,123,128,123,125,118" href="javascript:GetClick()" onMouseOver="GetColor('006699','0,102,153','00,40,60')">
<area shape="polygon" coords="151,113,157,113,160,118,157,123,151,123,148,118" href="javascript:GetClick()" onMouseOver="GetColor('0099FF','0,153,255','00,60,100')">
<area shape="polygon" coords="48,120,54,120,57,125,54,130,48,130,45,125" href="javascript:GetClick()" onMouseOver="GetColor('CC6600','204,102,0','80,40,00')">
<area shape="polygon" coords="71,120,77,120,80,125,77,130,71,130,68,125" href="javascript:GetClick()" onMouseOver="GetColor('663300','102,51,0','40,20,00')">
<area shape="polygon" coords="94,120,100,120,103,125,100,130,94,130,91,125" href="javascript:GetClick()" onMouseOver="GetColor('000000','0,0,0','00,00,00')">
<area shape="polygon" coords="117,120,123,120,126,125,123,130,117,130,114,125" href="javascript:GetClick()" onMouseOver="GetColor('003366','0,51,102','00,20,40')">
<area shape="polygon" coords="140,120,146,120,149,125,146,130,140,130,137,125" href="javascript:GetClick()" onMouseOver="GetColor('0066CC','0,102,204','00,40,80')">
<area shape="polygon" coords="36,127,42,127,45,132,42,137,36,137,33,132" href="javascript:GetClick()" onMouseOver="GetColor('FF6600','255,102,0','100,40,00')">
<area shape="polygon" coords="59,127,65,127,68,132,65,137,59,137,56,132" href="javascript:GetClick()" onMouseOver="GetColor('993300','153,51,0','60,20,00')">
<area shape="polygon" coords="82,127,88,127,91,132,88,137,82,137,79,132" href="javascript:GetClick()" onMouseOver="GetColor('330000','51,0,0','20,00,00')">
<area shape="polygon" coords="105,127,111,127,114,132,111,137,105,137,102,132" href="javascript:GetClick()" onMouseOver="GetColor('000033','0,0,51','00,00,20')">
<area shape="polygon" coords="128,127,134,127,137,132,134,137,128,137,125,132" href="javascript:GetClick()" onMouseOver="GetColor('003399','0,51,153','00,20,60')">
<area shape="polygon" coords="151,127,157,127,160,132,157,137,151,137,148,132" href="javascript:GetClick()" onMouseOver="GetColor('0066FF','0,102,255','00,40,100')">
<area shape="polygon" coords="48,134,54,134,57,139,54,144,48,144,45,139" href="javascript:GetClick()" onMouseOver="GetColor('CC3300','204,51,0','80,20,00')">
<area shape="polygon" coords="71,134,77,134,80,139,77,144,71,144,68,139" href="javascript:GetClick()" onMouseOver="GetColor('660000','102,0,0','40,00,00')">
<area shape="polygon" coords="94,134,100,134,103,139,100,144,94,144,91,139" href="javascript:GetClick()" onMouseOver="GetColor('330033','51,0,51','20,00,20')">
<area shape="polygon" coords="117,134,123,134,126,139,123,144,117,144,114,139" href="javascript:GetClick()" onMouseOver="GetColor('000066','0,0,102','00,00,40')">
<area shape="polygon" coords="140,134,146,134,149,139,146,144,140,144,137,139" href="javascript:GetClick()" onMouseOver="GetColor('0033CC','0,51,204','00,20,80')">
<area shape="polygon" coords="36,141,42,141,45,146,42,151,36,151,33,146" href="javascript:GetClick()" onMouseOver="GetColor('FF3300','255,51,0','100,20,00')">
<area shape="polygon" coords="59,141,65,141,68,146,65,151,59,151,56,146" href="javascript:GetClick()" onMouseOver="GetColor('990000','153,0,0','60,00,00')">
<area shape="polygon" coords="82,141,88,141,91,146,88,151,82,151,79,146" href="javascript:GetClick()" onMouseOver="GetColor('660033','102,0,51','40,00,20')">
<area shape="polygon" coords="105,141,111,141,114,146,111,151,105,151,102,146" href="javascript:GetClick()" onMouseOver="GetColor('330066','51,0,102','20,00,40')">
<area shape="polygon" coords="128,141,134,141,137,146,134,151,128,151,125,146" href="javascript:GetClick()" onMouseOver="GetColor('000099','0,0,153','00,00,60')">
<area shape="polygon" coords="151,141,157,141,160,146,157,151,151,151,148,146" href="javascript:GetClick()" onMouseOver="GetColor('0033FF','0,51,255','00,20,100')">
<area shape="polygon" coords="48,148,54,148,57,153,54,158,48,158,45,153" href="javascript:GetClick()" onMouseOver="GetColor('CC0000','204,0,0','80,00,00')">
<area shape="polygon" coords="71,148,77,148,80,153,77,158,71,158,68,153" href="javascript:GetClick()" onMouseOver="GetColor('990033','153,0,51','60,00,20')">
<area shape="polygon" coords="94,148,100,148,103,153,100,158,94,158,91,153" href="javascript:GetClick()" onMouseOver="GetColor('660066','102,0,102','40,00,40')">
<area shape="polygon" coords="117,148,123,148,126,153,123,158,117,158,114,153" href="javascript:GetClick()" onMouseOver="GetColor('330099','51,0,153','20,00,60')">
<area shape="polygon" coords="140,148,146,148,149,153,146,158,140,158,137,153" href="javascript:GetClick()" onMouseOver="GetColor('0000CC','0,0,204','00,00,80')">
<area shape="polygon" coords="36,155,42,155,45,160,42,165,36,165,33,160" href="javascript:GetClick()" onMouseOver="GetColor('FF0000','255,0,0','100,00,00')">
<area shape="polygon" coords="59,155,65,155,68,160,65,165,59,165,56,160" href="javascript:GetClick()" onMouseOver="GetColor('CC0033','204,0,51','80,00,20')">
<area shape="polygon" coords="82,155,88,155,91,160,88,165,82,165,79,160" href="javascript:GetClick()" onMouseOver="GetColor('990066','153,0,102','60,00,40')">
<area shape="polygon" coords="105,155,111,155,114,160,111,165,105,165,102,160" href="javascript:GetClick()" onMouseOver="GetColor('660099','102,0,153','40,00,60')">
<area shape="polygon" coords="128,155,134,155,137,160,134,165,128,165,125,160" href="javascript:GetClick()" onMouseOver="GetColor('3300CC','51,0,204','20,00,80')">
<area shape="polygon" coords="151,155,157,155,160,160,157,165,151,165,148,160" href="javascript:GetClick()" onMouseOver="GetColor('0000FF','0,0,255','00,00,100')">
<area shape="polygon" coords="59,169,65,169,68,174,65,179,59,179,56,174" href="javascript:GetClick()" onMouseOver="GetColor('FF0066','255,0,102','100,00,40')">
<area shape="polygon" coords="82,169,88,169,91,174,88,179,82,179,79,174" href="javascript:GetClick()" onMouseOver="GetColor('CC0099','204,0,153','80,00,60')">
<area shape="polygon" coords="105,169,111,169,114,174,111,179,105,179,102,174" href="javascript:GetClick()" onMouseOver="GetColor('9900CC','153,0,204','60,00,80')">
<area shape="polygon" coords="128,169,134,169,137,174,134,179,128,179,125,174" href="javascript:GetClick()" onMouseOver="GetColor('6600FF','102,0,255','40,00,100')">
<area shape="polygon" coords="71,176,77,176,80,181,77,186,71,186,68,181" href="javascript:GetClick()" onMouseOver="GetColor('FF0099','255,0,153','100,00,60')">
<area shape="polygon" coords="94,176,100,176,103,181,100,186,94,186,91,181" href="javascript:GetClick()" onMouseOver="GetColor('CC00CC','204,0,204','80,00,80')">
<area shape="polygon" coords="117,176,123,176,126,181,123,186,117,186,114,181" href="javascript:GetClick()" onMouseOver="GetColor('9900FF','153,0,255','60,00,100')">
<area shape="polygon" coords="82,183,88,183,91,188,88,193,82,193,79,188" href="javascript:GetClick()" onMouseOver="GetColor('FF00CC','255,0,204','100,00,80')">
<area shape="polygon" coords="105,183,111,183,114,188,111,193,105,193,102,188" href="javascript:GetClick()" onMouseOver="GetColor('CC00FF','204,0,255','80,00,100')">
<area shape="polygon" coords="94,190,100,190,103,195,100,200,94,200,91,195" href="javascript:GetClick()" onMouseOver="GetColor('FF00FF','255,0,255','100,00,100')">
<area shape="polygon" coords="318,51,324,51,327,56,324,61,318,61,315,56" href="javascript:GetClick()" onMouseOver="GetColor('00FF00','0,255,0','00,100,00')">
<area shape="polygon" coords="307,58,313,58,316,63,313,68,307,68,304,63" href="javascript:GetClick()" onMouseOver="GetColor('00FF33','0,255,51','00,100,20')">
<area shape="polygon" coords="330,58,336,58,339,63,336,68,330,68,327,63" href="javascript:GetClick()" onMouseOver="GetColor('33FF00','51,255,0','20,100,00')">
<area shape="polygon" coords="295,65,301,65,304,70,301,75,295,75,292,70" href="javascript:GetClick()" onMouseOver="GetColor('00FF66','0,255,102','00,100,40')">
<area shape="polygon" coords="318,65,324,65,327,70,324,75,318,75,315,70" href="javascript:GetClick()" onMouseOver="GetColor('33FF33','51,255,51','20,100,20')">
<area shape="polygon" coords="341,65,347,65,350,70,347,75,341,75,338,70" href="javascript:GetClick()" onMouseOver="GetColor('66FF00','102,255,0','40,100,00')">
<area shape="polygon" coords="284,72,290,72,293,77,290,82,284,82,281,77" href="javascript:GetClick()" onMouseOver="GetColor('00FF99','0,255,153','00,100,60')">
<area shape="polygon" coords="307,72,313,72,316,77,313,82,307,82,304,77" href="javascript:GetClick()" onMouseOver="GetColor('33FF66','51,255,102','20,100,40')">
<area shape="polygon" coords="330,72,336,72,339,77,336,82,330,82,327,77" href="javascript:GetClick()" onMouseOver="GetColor('66FF33','102,255,51','40,100,20')">
<area shape="polygon" coords="353,72,359,72,362,77,359,82,353,82,350,77" href="javascript:GetClick()" onMouseOver="GetColor('99FF00','153,255,0','60,100,00')">
<area shape="polygon" coords="272,79,278,79,281,84,278,89,272,89,269,84" href="javascript:GetClick()" onMouseOver="GetColor('00FFCC','0,255,204','00,100,80')">
<area shape="polygon" coords="295,79,301,79,304,84,301,89,295,89,292,84" href="javascript:GetClick()" onMouseOver="GetColor('33FF99','51,255,153','20,100,60')">
<area shape="polygon" coords="318,79,324,79,327,84,324,89,318,89,315,84" href="javascript:GetClick()" onMouseOver="GetColor('66FF66','102,255,102','40,100,40')">
<area shape="polygon" coords="341,79,347,79,350,84,347,89,341,89,338,84" href="javascript:GetClick()" onMouseOver="GetColor('99FF33','153,255,51','60,100,20')">
<area shape="polygon" coords="364,79,370,79,373,84,370,89,364,89,361,84" href="javascript:GetClick()" onMouseOver="GetColor('CCFF00','204,255,0','80,100,00')">
<area shape="polygon" coords="261,86,267,86,270,91,267,96,261,96,258,91" href="javascript:GetClick()" onMouseOver="GetColor('00FFFF','0,255,255','00,100,100')">
<area shape="polygon" coords="284,86,290,86,293,91,290,96,284,96,281,91" href="javascript:GetClick()" onMouseOver="GetColor('33FFCC','51,255,204','20,100,80')">
<area shape="polygon" coords="307,86,313,86,316,91,313,96,307,96,304,91" href="javascript:GetClick()" onMouseOver="GetColor('66FF99','102,255,153','40,100,60')">
<area shape="polygon" coords="330,86,336,86,339,91,336,96,330,96,327,91" href="javascript:GetClick()" onMouseOver="GetColor('99FF66','153,255,102','60,100,40')">
<area shape="polygon" coords="353,86,359,86,362,91,359,96,353,96,350,91" href="javascript:GetClick()" onMouseOver="GetColor('CCFF33','204,255,51','80,100,20')">
<area shape="polygon" coords="376,86,382,86,385,91,382,96,376,96,373,91" href="javascript:GetClick()" onMouseOver="GetColor('FFFF00','255,255,0','100,100,00')">
<area shape="polygon" coords="272,93,278,93,281,98,278,103,272,103,269,98" href="javascript:GetClick()" onMouseOver="GetColor('33FFFF','51,255,255','20,100,100')">
<area shape="polygon" coords="295,93,301,93,304,98,301,103,295,103,292,98" href="javascript:GetClick()" onMouseOver="GetColor('66FFCC','102,255,204','40,100,80')">
<area shape="polygon" coords="318,93,324,93,327,98,324,103,318,103,315,98" href="javascript:GetClick()" onMouseOver="GetColor('99FF99','153,255,153','60,100,60')">
<area shape="polygon" coords="341,93,347,93,350,98,347,103,341,103,338,98" href="javascript:GetClick()" onMouseOver="GetColor('CCFF66','204,255,102','80,100,40')">
<area shape="polygon" coords="364,93,370,93,373,98,370,103,364,103,361,98" href="javascript:GetClick()" onMouseOver="GetColor('FFFF33','255,255,51','100,100,20')">
<area shape="polygon" coords="261,100,267,100,270,105,267,110,261,110,258,105" href="javascript:GetClick()" onMouseOver="GetColor('00CCFF','0,204,255','00,80,100')">
<area shape="polygon" coords="284,100,290,100,293,105,290,110,284,110,281,105" href="javascript:GetClick()" onMouseOver="GetColor('66FFFF','102,255,255','40,100,100')">
<area shape="polygon" coords="307,100,313,100,316,105,313,110,307,110,304,105" href="javascript:GetClick()" onMouseOver="GetColor('99FFCC','153,255,204','60,100,80')">
<area shape="polygon" coords="330,100,336,100,339,105,336,110,330,110,327,105" href="javascript:GetClick()" onMouseOver="GetColor('CCFF99','204,255,153','80,100,60')">
<area shape="polygon" coords="353,100,359,100,362,105,359,110,353,110,350,105" href="javascript:GetClick()" onMouseOver="GetColor('FFFF66','255,255,102','100,100,40')">
<area shape="polygon" coords="376,100,382,100,385,105,382,110,376,110,373,105" href="javascript:GetClick()" onMouseOver="GetColor('FFCC00','255,204,0','100,80,00')">
<area shape="polygon" coords="272,107,278,107,281,112,278,117,272,117,269,112" href="javascript:GetClick()" onMouseOver="GetColor('33CCFF','51,204,255','20,80,100')">
<area shape="polygon" coords="295,107,301,107,304,112,301,117,295,117,292,112" href="javascript:GetClick()" onMouseOver="GetColor('99FFFF','153,255,255','60,100,100')">
<area shape="polygon" coords="318,107,324,107,327,112,324,117,318,117,315,112" href="javascript:GetClick()" onMouseOver="GetColor('CCFFCC','204,255,204','80,100,80')">
<area shape="polygon" coords="341,107,347,107,350,112,347,117,341,117,338,112" href="javascript:GetClick()" onMouseOver="GetColor('FFFF99','255,255,153','100,100,60')">
<area shape="polygon" coords="364,107,370,107,373,112,370,117,364,117,361,112" href="javascript:GetClick()" onMouseOver="GetColor('FFCC33','255,204,51','100,80,20')">
<area shape="polygon" coords="261,114,267,114,270,119,267,124,261,124,258,119" href="javascript:GetClick()" onMouseOver="GetColor('0099FF','0,153,255','00,60,100')">
<area shape="polygon" coords="284,114,290,114,293,119,290,124,284,124,281,119" href="javascript:GetClick()" onMouseOver="GetColor('66CCFF','102,204,255','40,80,100')">
<area shape="polygon" coords="307,114,313,114,316,119,313,124,307,124,304,119" href="javascript:GetClick()" onMouseOver="GetColor('CCFFFF','204,255,255','80,100,100')">
<area shape="polygon" coords="330,114,336,114,339,119,336,124,330,124,327,119" href="javascript:GetClick()" onMouseOver="GetColor('FFFFCC','255,255,204','100,100,80')">
<area shape="polygon" coords="353,114,359,114,362,119,359,124,353,124,350,119" href="javascript:GetClick()" onMouseOver="GetColor('FFCC66','255,204,102','100,80,40')">
<area shape="polygon" coords="376,114,382,114,385,119,382,124,376,124,373,119" href="javascript:GetClick()" onMouseOver="GetColor('FF9900','255,153,0','100,60,00')">
<area shape="polygon" coords="272,121,278,121,281,126,278,131,272,131,269,126" href="javascript:GetClick()" onMouseOver="GetColor('3399FF','51,153,255','20,60,100')">
<area shape="polygon" coords="295,121,301,121,304,126,301,131,295,131,292,126" href="javascript:GetClick()" onMouseOver="GetColor('99CCFF','153,204,255','60,80,100')">
<area shape="polygon" coords="318,121,324,121,327,126,324,131,318,131,315,126" href="javascript:GetClick()" onMouseOver="GetColor('FFFFFF','255,255,255','100,100,100')">
<area shape="polygon" coords="341,121,347,121,350,126,347,131,341,131,338,126" href="javascript:GetClick()" onMouseOver="GetColor('FFCC99','255,204,153','100,80,60')">
<area shape="polygon" coords="364,121,370,121,373,126,370,131,364,131,361,126" href="javascript:GetClick()" onMouseOver="GetColor('FF9933','255,153,51','100,60,20')">
<area shape="polygon" coords="261,128,267,128,270,133,267,138,261,138,258,133" href="javascript:GetClick()" onMouseOver="GetColor('0066FF','0,102,255','00,40,100')">
<area shape="polygon" coords="284,128,290,128,293,133,290,138,284,138,281,133" href="javascript:GetClick()" onMouseOver="GetColor('6699FF','102,153,255','40,60,100')">
<area shape="polygon" coords="307,128,313,128,316,133,313,138,307,138,304,133" href="javascript:GetClick()" onMouseOver="GetColor('CCCCFF','204,204,255','80,80,100')">
<area shape="polygon" coords="330,128,336,128,339,133,336,138,330,138,327,133" href="javascript:GetClick()" onMouseOver="GetColor('FFCCCC','255,204,204','100,80,80')">
<area shape="polygon" coords="353,128,359,128,362,133,359,138,353,138,350,133" href="javascript:GetClick()" onMouseOver="GetColor('FF9966','255,153,102','100,60,40')">
<area shape="polygon" coords="376,128,382,128,385,133,382,138,376,138,373,133" href="javascript:GetClick()" onMouseOver="GetColor('FF6600','255,102,0','100,40,00')">
<area shape="polygon" coords="272,135,278,135,281,140,278,145,272,145,269,140" href="javascript:GetClick()" onMouseOver="GetColor('3366FF','51,102,255','20,40,100')">
<area shape="polygon" coords="295,135,301,135,304,140,301,145,295,145,292,140" href="javascript:GetClick()" onMouseOver="GetColor('9999FF','153,153,255','60,60,100')">
<area shape="polygon" coords="318,135,324,135,327,140,324,145,318,145,315,140" href="javascript:GetClick()" onMouseOver="GetColor('FFCCFF','255,204,255','100,80,100')">
<area shape="polygon" coords="341,135,347,135,350,140,347,145,341,145,338,140" href="javascript:GetClick()" onMouseOver="GetColor('FF9999','255,153,153','100,60,60')">
<area shape="polygon" coords="364,135,370,135,373,140,370,145,364,145,361,140" href="javascript:GetClick()" onMouseOver="GetColor('FF6633','255,102,51','100,40,20')">
<area shape="polygon" coords="261,142,267,142,270,147,267,152,261,152,258,147" href="javascript:GetClick()" onMouseOver="GetColor('0033FF','0,51,255','00,20,100')">
<area shape="polygon" coords="284,142,290,142,293,147,290,152,284,152,281,147" href="javascript:GetClick()" onMouseOver="GetColor('6666FF','102,102,255','40,40,100')">
<area shape="polygon" coords="307,142,313,142,316,147,313,152,307,152,304,147" href="javascript:GetClick()" onMouseOver="GetColor('CC99FF','204,153,255','80,60,100')">
<area shape="polygon" coords="330,142,336,142,339,147,336,152,330,152,327,147" href="javascript:GetClick()" onMouseOver="GetColor('FF99CC','255,153,204','100,60,80')">
<area shape="polygon" coords="353,142,359,142,362,147,359,152,353,152,350,147" href="javascript:GetClick()" onMouseOver="GetColor('FF6666','255,102,102','100,40,40')">
<area shape="polygon" coords="376,142,382,142,385,147,382,152,376,152,373,147" href="javascript:GetClick()" onMouseOver="GetColor('FF3300','255,51,0','100,20,00')">
<area shape="polygon" coords="272,149,278,149,281,154,278,159,272,159,269,154" href="javascript:GetClick()" onMouseOver="GetColor('3333FF','51,51,255','20,20,100')">
<area shape="polygon" coords="295,149,301,149,304,154,301,159,295,159,292,154" href="javascript:GetClick()" onMouseOver="GetColor('9966FF','153,102,255','60,40,100')">
<area shape="polygon" coords="318,149,324,149,327,154,324,159,318,159,315,154" href="javascript:GetClick()" onMouseOver="GetColor('FF99FF','255,153,255','100,60,100')">
<area shape="polygon" coords="341,149,347,149,350,154,347,159,341,159,338,154" href="javascript:GetClick()" onMouseOver="GetColor('FF6699','255,102,153','100,40,60')">
<area shape="polygon" coords="364,149,370,149,373,154,370,159,364,159,361,154" href="javascript:GetClick()" onMouseOver="GetColor('FF3333','255,51,51','100,20,20')">
<area shape="polygon" coords="261,156,267,156,270,161,267,166,261,166,258,161" href="javascript:GetClick()" onMouseOver="GetColor('0000FF','0,0,255','00,00,100')">
<area shape="polygon" coords="284,156,290,156,293,161,290,166,284,166,281,161" href="javascript:GetClick()" onMouseOver="GetColor('6633FF','102,51,255','40,20,100')">
<area shape="polygon" coords="307,156,313,156,316,161,313,166,307,166,304,161" href="javascript:GetClick()" onMouseOver="GetColor('CC66FF','204,102,255','80,40,100')">
<area shape="polygon" coords="330,156,336,156,339,161,336,166,330,166,327,161" href="javascript:GetClick()" onMouseOver="GetColor('FF66CC','255,102,204','100,40,80')">
<area shape="polygon" coords="353,156,359,156,362,161,359,166,353,166,350,161" href="javascript:GetClick()" onMouseOver="GetColor('FF3366','255,51,102','100,20,40')">
<area shape="polygon" coords="376,156,382,156,385,161,382,166,376,166,373,161" href="javascript:GetClick()" onMouseOver="GetColor('FF0000','255,0,0','100,00,00')">
<area shape="polygon" coords="272,163,278,163,281,168,278,173,272,173,269,168" href="javascript:GetClick()" onMouseOver="GetColor('3300FF','51,0,255','20,00,100')">
<area shape="polygon" coords="295,163,301,163,304,168,301,173,295,173,292,168" href="javascript:GetClick()" onMouseOver="GetColor('9933FF','153,51,255','60,20,100')">
<area shape="polygon" coords="318,163,324,163,327,168,324,173,318,173,315,168" href="javascript:GetClick()" onMouseOver="GetColor('FF66FF','255,102,255','100,40,100')">
<area shape="polygon" coords="341,163,347,163,350,168,347,173,341,173,338,168" href="javascript:GetClick()" onMouseOver="GetColor('FF3399','255,51,153','100,20,60')">
<area shape="polygon" coords="364,163,370,163,373,168,370,173,364,173,361,168" href="javascript:GetClick()" onMouseOver="GetColor('FF0033','255,0,51','100,00,20')">
<area shape="polygon" coords="284,170,290,170,293,175,290,180,284,180,281,175" href="javascript:GetClick()" onMouseOver="GetColor('6600FF','102,0,255','40,00,100')">
<area shape="polygon" coords="307,170,313,170,316,175,313,180,307,180,304,175" href="javascript:GetClick()" onMouseOver="GetColor('CC33FF','204,51,255','80,20,100')">
<area shape="polygon" coords="330,170,336,170,339,175,336,180,330,180,327,175" href="javascript:GetClick()" onMouseOver="GetColor('FF33CC','255,51,204','100,20,80')">
<area shape="polygon" coords="353,170,359,170,362,175,359,180,353,180,350,175" href="javascript:GetClick()" onMouseOver="GetColor('FF0066','255,0,102','100,00,40')">
<area shape="polygon" coords="295,177,301,177,304,182,301,187,295,187,292,182" href="javascript:GetClick()" onMouseOver="GetColor('9900FF','153,0,255','60,00,100')">
<area shape="polygon" coords="318,177,324,177,327,182,324,187,318,187,315,182" href="javascript:GetClick()" onMouseOver="GetColor('FF33FF','255,51,255','100,20,100')">
<area shape="polygon" coords="341,177,347,177,350,182,347,187,341,187,338,182" href="javascript:GetClick()" onMouseOver="GetColor('FF0099','255,0,153','100,00,60')">
<area shape="polygon" coords="307,184,313,184,316,189,313,194,307,194,304,189" href="javascript:GetClick()" onMouseOver="GetColor('CC00FF','204,0,255','80,00,100')">
<area shape="polygon" coords="330,184,336,184,339,189,336,194,330,194,327,189" href="javascript:GetClick()" onMouseOver="GetColor('FF00CC','255,0,204','100,00,80')">
<area shape="polygon" coords="318,191,324,191,327,196,324,201,318,201,315,196" href="javascript:GetClick()" onMouseOver="GetColor('FF00FF','255,0,255','100,00,100')">
<area shape="polygon" coords="88,109,92,103,100,103,104,109,112,109,117,116,112,125,116,132,112,138,104,140,100,146,91,148,86,139,80,139,76,133,80,126,77,118,81,110,89,109,92,103" href="javascript:GetClick()" onMouseOver="GetColor('333333','51,51,51','20,20,20')">
<area shape="polygon" coords="92,89,101,89,104,96,112,96,117,102,123,103,129,110,125,118,128,125,125,132,128,139,125,147,116,148,112,154,104,154,102,162,92,162,88,155,80,155,75,147,76,148,67,147,63,138,67,132,65,124,68,118,64,111,69,102,77,102,80,95,88,94,91,88" href="javascript:GetClick()" onMouseOver="GetColor('666666','102,102,102','40,40,40')">
<area shape="polygon" coords="92,75,57,96,54,103,54,146,56,153,92,176,101,176,135,155,140,147,139,104,138,97,100,74" href="javascript:GetClick()" onMouseOver="GetColor('999999','153,153,153','60,60,60')">
<area shape="polygon" coords="94,60,44,90,41,96,41,154,46,161,92,190,101,190,148,162,150,156,151,98,151,95,147,90,100,60,96,60" href="javascript:GetClick()" onMouseOver="GetColor('CCCCCC','204,204,204','80,80,80')">
<area shape="polygon" coords="220,100,218,106,221,111,227,112,230,105,226,99,222,99" href="javascript:GetClick()" onMouseOver="GetColor('CCCCCC','204,204,204','80,80,80')">
<area shape="polygon" coords="221,114,218,119,221,126,227,125,230,119,227,114,220,114" href="javascript:GetClick()" onMouseOver="GetColor('999999','153,153,153','60,60,60')">
<area shape="polygon" coords="220,127,217,133,222,139,226,138,230,132,227,126" href="javascript:GetClick()" onMouseOver="GetColor('666666','102,102,102','40,40,40')">
<area shape="polygon" coords="220,142,218,147,221,152,227,152,230,146,226,141" href="javascript:GetClick()" onMouseOver="GetColor('333333','51,51,51','20,20,20')">
<area shape="polygon" coords="152,63,155,56,152,50,155,41,164,41,168,34,177,34,181,41,188,41,193,49,190,56,193,62,189,72,181,72,177,79,168,78,164,72,156,71" href="javascript:GetClick()" onMouseOver="GetColor('666666','102,102,102','40,40,40')">
<area shape="polygon" coords="317,104,306,110,301,119,300,133,305,142,316,149,326,149,337,142,342,133,342,119,337,109,326,103,316,104" href="javascript:GetClick()" onMouseOver="GetColor('CCCCCC','204,204,204','80,80,80')">
<area shape="polygon" coords="316,90,293,104,289,110,290,143,293,148,318,163,326,163,349,149,354,139,354,111,349,103,325,89" href="javascript:GetClick()" onMouseOver="GetColor('999999','153,153,153','60,60,60')">
<area shape="polygon" coords="316,76,282,96,277,105,278,148,281,155,316,176,326,177,360,155,365,146,365,104,360,96,325,75" href="javascript:GetClick()" onMouseOver="GetColor('666666','102,102,102','40,40,40')">
<area shape="polygon" coords="316,62,270,90,265,97,266,154,270,162,316,190,326,190,371,161,375,155,376,97,372,89,325,60" href="javascript:GetClick()" onMouseOver="GetColor('333333','51,51,51','20,20,20')">
<area shape="polygon" coords="375,186,372,192,363,192,359,202,362,207,360,215,363,223,371,223,376,230,385,230,389,222,396,223,401,214,397,206,401,201,397,192,389,192,385,185,374,185" href="javascript:GetClick()" onMouseOver="GetColor('999999','153,153,153','60,60,60')">
<area shape="polygon" coords="73,225,80,225,82,230,80,235,73,235,71,230" href="javascript:GetClick()" onMouseOver="GetColor('6633CC','102,51,204','40,20,80')">
<area shape="polygon" coords="50,236,47,230,50,224,56,225,59,230,56,236" href="javascript:GetClick()" onMouseOver="GetColor('333366','51,51,102','20,20,40')">
<area shape="polygon" coords="403,149,410,149,413,154,411,160,403,160,400,155" href="javascript:GetClick()" onMouseOver="GetColor('CC3366','204,51,102','80,20,40')">
<area shape="polygon" coords="426,148,432,148,435,154,432,160,426,160,423,154" href="javascript:GetClick()" onMouseOver="GetColor('CC66CC','204,102,204','80,40,80')">
<area shape="polygon" coords="232,80,224,79,224,0,436,0,437,253,224,253,224,173,233,173" href="javascript:GetClick()" onMouseOver="GetColor('000000','0,0,0','00,00,00')">
<area shape="polygon" coords="224,86,220,87,218,92,219,97,225,97" href="javascript:GetClick()" onMouseOver="GetColor('FFFFFF','255,255,255','100,100,100')">
<area shape="polygon" coords="224,174,216,174,216,80,224,80" href="javascript:GetClick()" onMouseOver="GetColor('000000','0,0,0','00,00,00')">
<area shape="polygon" coords="226,166,230,162,227,156,220,157,219,162,221,166" href="javascript:GetClick()" onMouseOver="GetColor('000000','0,0,0','00,00,00')">
<area shape="rect" coords="0,0,437,253" href="javascript:GetClick()" onMouseOver="GetColor('FFFFFF','255,255,255','100,100,100')">
</map>
</form>
</body>
</html>

155
www/extras/emailCheck.js Normal file
View file

@ -0,0 +1,155 @@
function emailCheck (emailStr) {
/* The following variable tells the rest of the function whether or not
to verify that the address ends in a two-letter country or well-known
TLD. 1 means check it, 0 means don't. */
var checkTLD=1;
/* The following is the list of known TLDs that an e-mail address must end with. */
var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;
/* The following pattern is used to check if the entered e-mail address
fits the user@domain format. It also is used to separate the username
from the domain. */
var emailPat=/^(.+)@(.+)$/;
/* The following string represents the pattern for matching all special
characters. We don't want to allow special characters in the address.
These characters include ( ) < > @ , ; : \ " . [ ] */
var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";
/* The following string represents the range of characters allowed in a
username or domainname. It really states which chars aren't allowed.*/
var validChars="\[^\\s" + specialChars + "\]";
/* The following pattern applies if the "user" is a quoted string (in
which case, there are no rules about which characters are allowed
and which aren't; anything goes). E.g. "jiminy cricket"@disney.com
is a legal e-mail address. */
var quotedUser="(\"[^\"]*\")";
/* The following pattern applies for domains that are IP addresses,
rather than symbolic names. E.g. joe@[123.124.233.4] is a legal
e-mail address. NOTE: The square brackets are required. */
var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
/* The following string represents an atom (basically a series of non-special characters.) */
var atom=validChars + '+';
/* The following string represents one word in the typical username.
For example, in john.doe@somewhere.com, john and doe are words.
Basically, a word is either an atom or quoted string. */
var word="(" + atom + "|" + quotedUser + ")";
// The following pattern describes the structure of the user
var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
/* The following pattern describes the structure of a normal symbolic
domain, as opposed to ipDomainPat, shown above. */
var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");
/* Finally, let's start trying to figure out if the supplied address is valid. */
/* Begin with the coarse pattern to simply break up user@domain into
different pieces that are easy to analyze. */
var matchArray=emailStr.match(emailPat);
if (matchArray==null) {
/* Too many/few @'s or something; basically, this address doesn't
even fit the general mould of a valid e-mail address. */
alert("Email address seems incorrect (check @ and .'s)");
return false;
}
var user=matchArray[1];
var domain=matchArray[2];
// Start by checking that only basic ASCII characters are in the strings (0-127).
for (i=0; i<user.length; i++) {
if (user.charCodeAt(i)>127) {
alert("Ths username contains invalid characters.");
return false;
}
}
for (i=0; i<domain.length; i++) {
if (domain.charCodeAt(i)>127) {
alert("Ths domain name contains invalid characters.");
return false;
}
}
// See if "user" is valid
if (user.match(userPat)==null) {
// user is not valid
alert("The username doesn't seem to be valid.");
return false;
}
/* if the e-mail address is at an IP address (as opposed to a symbolic
host name) make sure the IP address is valid. */
var IPArray=domain.match(ipDomainPat);
if (IPArray!=null) {
// this is an IP address
for (var i=1;i<=4;i++) {
if (IPArray[i]>255) {
alert("Destination IP address is invalid!");
return false;
}
}
return true;
}
// Domain is symbolic name. Check if it's valid.
var atomPat=new RegExp("^" + atom + "$");
var domArr=domain.split(".");
var len=domArr.length;
for (i=0;i<len;i++) {
if (domArr[i].search(atomPat)==-1) {
alert("The domain name does not seem to be valid.");
return false;
}
}
/* domain name seems valid, but now make sure that it ends in a
known top-level domain (like com, edu, gov) or a two-letter word,
representing country (uk, nl), and that there's a hostname preceding
the domain or country. */
if (checkTLD && domArr[domArr.length-1].length!=2 &&
domArr[domArr.length-1].search(knownDomsPat)==-1) {
alert("The address must end in a well-known domain or two letter " + "country.");
return false;
}
// Make sure there's a host name preceding the domain.
if (len<2) {
alert("This address is missing a hostname!");
return false;
}
// If we've gotten this far, everything's valid!
return true;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 948 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 983 B

Before After
Before After

File diff suppressed because it is too large Load diff

View file

@ -1,108 +1,108 @@
<html>
<head>
<title>Edit Window</title>
<script language="JavaScript">
/*
#-------------------------------------------------------------------
# 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
#-------------------------------------------------------------------
*/
var color;
var formObj;
function boldText(obj) {
obj.value = obj.value+'<b>'+prompt("Enter the text to bold:", "")+'</b>';
}
function centerText(obj) {
obj.value = obj.value+'<div align="center">'+prompt("Enter the text to center:", "")+'</div>';
}
function colorText(obj) {
formObj = obj;
window.open(window.opener.extrasDir+"/colorPicker.html","colorPicker","width=438,height=258");
}
function copyright(obj) {
obj.value = obj.value+'&copy;';
}
function email(obj) {
var email = prompt("Enter the Email address:", "");
obj.value = obj.value+'<a href="mailto:'+email+'">'+email+'</a>';
}
function getShowMeText() {
return formObj.value;
}
function imageAdd(obj) {
obj.value = obj.value+'<img src="'+prompt("Enter the image URL:", "http://somesite.com/image.jpg")+'" border="0">';
}
function italicText(obj) {
obj.value = obj.value+'<i>'+prompt("Enter the text to italicize:", "")+'</i>';
}
function list(obj) {
var item;
obj.value = obj.value+'<ul>';
obj.value = obj.value+'<li>'+prompt("Enter the first item in the list:", "");
while (item = prompt("Enter the next item in the list (cancel when done):", "")) {
obj.value = obj.value+'<li>'+item;
}
obj.value = obj.value+'</ul>';
}
function registered(obj) {
obj.value = obj.value+'&reg;';
}
function setColor(remoteColor) {
formObj.value = formObj.value+'<span style="color: #'+remoteColor+';">'+prompt("Enter the text to color:","")+'</span>';
}
function showMe(obj) {
formObj = obj;
window.open(window.opener.extrasDir+"/viewer.html","showMeViewer","width=500,height=300,scrollbars=1");
}
function trademark(obj) {
obj.value = obj.value+'<font size="-2"><sup>TM</sup></font>';
}
function url(obj) {
obj.value = obj.value+'<a href="'+prompt("Enter the URL of the link:", "http://www.google.com")+'">'+prompt("Enter the title of the link:", "Google")+'</a>';
}
</script>
</head>
<body onLoad="document.edit.editor.value=window.opener.formObj.value">
<form name="edit">
<input type="button" onClick="colorText(this.form.editor)" value="color" style="font-size: 8pt;">
<input type="button" onClick="boldText(this.form.editor)" value="bold" style="font-size: 8pt;">
<input type="button" onClick="italicText(this.form.editor)" value="italics" style="font-size: 8pt;">
<input type="button" onClick="centerText(this.form.editor)" value="center" style="font-size: 8pt;">
<input type="button" onClick="list(this.form.editor)" value="list" style="font-size: 8pt;">
<input type="button" onClick="url(this.form.editor)" value="link" style="font-size: 8pt;">
<input type="button" onClick="email(this.form.editor)" value="email" style="font-size: 8pt;">
<input type="button" onClick="imageAdd(this.form.editor)" value="image" style="font-size: 8pt;">
<input type="button" onClick="copyright(this.form.editor)" value="(C)" style="font-size: 8pt;">
<input type="button" onClick="registered(this.form.editor)" value="(R)" style="font-size: 8pt;">
<input type="button" onClick="trademark(this.form.editor)" value="TM" style="font-size: 8pt;">
<br>
<textarea name="editor" rows=20 cols=55></textarea>
<br>
<input type="button" onClick="showMe(this.form.editor)" value="show me" style="font-size: 8pt;">
<input type="button" onClick="window.blur(); window.opener.focus();window.opener.setContent(this.form.editor.value);window.close();" value="done" style="font-size: 8pt;">
</form>
</body>
</html>
<html>
<head>
<title>Edit Window</title>
<script language="JavaScript">
/*
#-------------------------------------------------------------------
# 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
#-------------------------------------------------------------------
*/
var color;
var formObj;
function boldText(obj) {
obj.value = obj.value+'<b>'+prompt("Enter the text to bold:", "")+'</b>';
}
function centerText(obj) {
obj.value = obj.value+'<div align="center">'+prompt("Enter the text to center:", "")+'</div>';
}
function colorText(obj) {
formObj = obj;
window.open(window.opener.extrasDir+"/colorPicker.html","colorPicker","width=438,height=258");
}
function copyright(obj) {
obj.value = obj.value+'&copy;';
}
function email(obj) {
var email = prompt("Enter the Email address:", "");
obj.value = obj.value+'<a href="mailto:'+email+'">'+email+'</a>';
}
function getShowMeText() {
return formObj.value;
}
function imageAdd(obj) {
obj.value = obj.value+'<img src="'+prompt("Enter the image URL:", "http://somesite.com/image.jpg")+'" border="0">';
}
function italicText(obj) {
obj.value = obj.value+'<i>'+prompt("Enter the text to italicize:", "")+'</i>';
}
function list(obj) {
var item;
obj.value = obj.value+'<ul>';
obj.value = obj.value+'<li>'+prompt("Enter the first item in the list:", "");
while (item = prompt("Enter the next item in the list (cancel when done):", "")) {
obj.value = obj.value+'<li>'+item;
}
obj.value = obj.value+'</ul>';
}
function registered(obj) {
obj.value = obj.value+'&reg;';
}
function setColor(remoteColor) {
formObj.value = formObj.value+'<span style="color: #'+remoteColor+';">'+prompt("Enter the text to color:","")+'</span>';
}
function showMe(obj) {
formObj = obj;
window.open(window.opener.extrasDir+"/viewer.html","showMeViewer","width=500,height=300,scrollbars=1");
}
function trademark(obj) {
obj.value = obj.value+'<font size="-2"><sup>TM</sup></font>';
}
function url(obj) {
obj.value = obj.value+'<a href="'+prompt("Enter the URL of the link:", "http://www.google.com")+'">'+prompt("Enter the title of the link:", "Google")+'</a>';
}
</script>
</head>
<body onLoad="document.edit.editor.value=window.opener.formObj.value">
<form name="edit">
<input type="button" onClick="colorText(this.form.editor)" value="color" style="font-size: 8pt;">
<input type="button" onClick="boldText(this.form.editor)" value="bold" style="font-size: 8pt;">
<input type="button" onClick="italicText(this.form.editor)" value="italics" style="font-size: 8pt;">
<input type="button" onClick="centerText(this.form.editor)" value="center" style="font-size: 8pt;">
<input type="button" onClick="list(this.form.editor)" value="list" style="font-size: 8pt;">
<input type="button" onClick="url(this.form.editor)" value="link" style="font-size: 8pt;">
<input type="button" onClick="email(this.form.editor)" value="email" style="font-size: 8pt;">
<input type="button" onClick="imageAdd(this.form.editor)" value="image" style="font-size: 8pt;">
<input type="button" onClick="copyright(this.form.editor)" value="(C)" style="font-size: 8pt;">
<input type="button" onClick="registered(this.form.editor)" value="(R)" style="font-size: 8pt;">
<input type="button" onClick="trademark(this.form.editor)" value="TM" style="font-size: 8pt;">
<br>
<textarea name="editor" rows=20 cols=55></textarea>
<br>
<input type="button" onClick="showMe(this.form.editor)" value="show me" style="font-size: 8pt;">
<input type="button" onClick="window.blur(); window.opener.focus();window.opener.setContent(this.form.editor.value);window.close();" value="done" style="font-size: 8pt;">
</form>
</body>
</html>

View file

@ -1,34 +1,34 @@
<HTML>
<!--
#-------------------------------------------------------------------
# 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
#-------------------------------------------------------------------
-->
<HEAD><TITLE>ShowMe Viewer</TITLE>
</HEAD>
<BODY>
<script language="JavaScript">
var text = window.opener.getShowMeText();
var re = /\n/g;
text = text.replace(re,"<br>");
document.write(text);
</script>
<form>
<input type="button" onClick="window.close()" value="Close this window!">
</form>
</body>
</html>
<HTML>
<!--
#-------------------------------------------------------------------
# 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
#-------------------------------------------------------------------
-->
<HEAD><TITLE>ShowMe Viewer</TITLE>
</HEAD>
<BODY>
<script language="JavaScript">
var text = window.opener.getShowMeText();
var re = /\n/g;
text = text.replace(re,"<br>");
document.write(text);
</script>
<form>
<input type="button" onClick="window.close()" value="Close this window!">
</form>
</body>
</html>

BIN
www/extras/widget.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 867 B