From 1b82634d2318fea3decb711faac2e9afcaca3023 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Sat, 18 Aug 2001 05:56:00 +0000 Subject: [PATCH] WebGUI 0.10.0 release --- docs/create.sql | 46 +- docs/{licence.txt => license.txt} | 0 docs/previousVersion.sql | 1239 +++++++++++++++++++++++++++ docs/upgrade-0.9.0_0.10.0.sql | 39 + extras/WebGUI.js | 4 +- extras/attachment.gif | Bin 0 -> 291 bytes extras/pbs.gif | Bin 0 -> 1345 bytes extras/plainBlackSoftware.gif | Bin 0 -> 3245 bytes lib/WebGUI.pm | 43 +- lib/WebGUI/Macro.pm | 10 +- lib/WebGUI/Operation.pm | 3 +- lib/WebGUI/Operation/Account.pm | 2 +- lib/WebGUI/Operation/Page.pm | 53 +- lib/WebGUI/Operation/Style.pm | 2 +- lib/WebGUI/Operation/Submission.pm | 86 ++ lib/WebGUI/Session.pm | 2 +- lib/WebGUI/Widget.pm | 8 +- lib/WebGUI/Widget/Article.pm | 2 +- lib/WebGUI/Widget/EventsCalendar.pm | 9 +- lib/WebGUI/Widget/FAQ.pm | 4 +- lib/WebGUI/Widget/LinkList.pm | 6 +- lib/WebGUI/Widget/MessageBoard.pm | 14 +- lib/WebGUI/Widget/Poll.pm | 16 +- lib/WebGUI/Widget/SQLReport.pm | 2 +- lib/WebGUI/Widget/SiteMap.pm | 8 +- lib/WebGUI/Widget/UserSubmission.pm | 331 +++++++ www/index.pl | 6 +- 27 files changed, 1854 insertions(+), 81 deletions(-) rename docs/{licence.txt => license.txt} (100%) create mode 100644 docs/previousVersion.sql create mode 100644 docs/upgrade-0.9.0_0.10.0.sql create mode 100644 extras/attachment.gif create mode 100644 extras/pbs.gif create mode 100644 extras/plainBlackSoftware.gif create mode 100644 lib/WebGUI/Operation/Submission.pm create mode 100644 lib/WebGUI/Widget/UserSubmission.pm diff --git a/docs/create.sql b/docs/create.sql index a782fa3c7..daeae782b 100644 --- a/docs/create.sql +++ b/docs/create.sql @@ -64,6 +64,7 @@ CREATE TABLE MessageBoard ( CREATE TABLE Poll ( widgetId int(11) NOT NULL default '0', active int(11) NOT NULL default '1', + graphWidth int(11) NOT NULL default '150', voteGroup int(11) default NULL, question varchar(255) default NULL, a1 varchar(255) default NULL, @@ -164,18 +165,19 @@ CREATE TABLE SyndicatedContent ( # -# Table structure for table 'UserContribution' +# Table structure for table 'UserSubmission' # -CREATE TABLE UserContribution ( +CREATE TABLE UserSubmission ( widgetId int(11) NOT NULL default '0', groupToContribute int(11) default NULL, - contributionsPerPage int(11) default NULL, + submissionsPerPage int(11) NOT NULL default '50', + defaultStatus varchar(30) default 'Approved', PRIMARY KEY (widgetId) ) TYPE=MyISAM; # -# Dumping data for table 'UserContribution' +# Dumping data for table 'UserSubmission' # @@ -328,8 +330,9 @@ INSERT INTO help VALUES (14,'US English','Delete','Content','As the function sug INSERT INTO help VALUES (15,'US English','Delete','Group','As the function suggests you\'ll be deleting a group and removing all users from the group. Be careful not to orphan users from pages they should have access to by deleting a group that is in use.\r\n\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'); INSERT INTO help VALUES (16,'US English','Add','Style','Styles are WebGUI macro enabled. See Using Macros for more information.\r\n\r\nStyle Name\r\nA unique name to describe what this style looks like at a glance. The name has no effect on the actual look of the style.\r\n\r\nHeader\r\nThe header is the start of the look of your site. It is helpful to look at your design and cut it into three pieces. The top and left of your design is the header. The center part is the content, and the right and bottom is the footer. Cut the HTML from your header and paste it in the space provided.\r\n\r\nIf you are in need of assistance for creating a look for your site, or if you need help cutting apart your design, Plain Black Software provides support services for a small fee.\r\n\r\nMany people will add WebGUI macros to their header for automated navigation, and other features.\r\n\r\nFooter\r\nThe footer is the end of the look for your site. It is the right and bottom portion of your design. You may also place WebGUI macros in your footer.\r\n\r\nStyle Sheet\r\nPlace your style sheet entries here. Style sheets are used to control colors, sizes, and other properties of the elements on your site. See Using Style Sheets for more information.\r\n\r\nAdvanced Users: for greater performance create your stylesheet on the file system (call it something like webgui.css) and add an entry like this to this area: \r\n<link href=\"/webgui.css\" rel=\"stylesheet\" rev=\"stylesheet\" type=\"text/css\">','18,19'); INSERT INTO help VALUES (17,'US English','Add','Group','See Manage Group for a description of grouping functions and the default groups.\r\n\r\nGroup Name\r\nA name for the group. It is best if the name is descriptive so you know what it is at a glance.\r\n\r\nDescription\r\nA longer description of the group so that other admins and content managers (or you if you forget) will know what the purpose of this group is.','0'); -INSERT INTO help VALUES (18,'US English','Using','Style Sheets','Cascading Style Sheets (CSS) are a great way to manage the look and feel of any web site. They are used extensively in WebGUI.\r\n\r\nIf you are unfamiliar with how to use CSS, Plain Black Software provides training classes on XHTML and CSS. Alternatively, Bradsoft makes an excellent CSS editor called Top Style.\r\n\r\nThe following is a list of classes used to control the look of WebGUI:\r\n\r\nA\r\nThe links throughout the style.\r\n\r\nBODY\r\nThe default setup of all pages within a style.\r\n\r\nH1\r\nThe headers on every page.\r\n\r\n.accountOptions\r\nThe links that appear under the login and account update forms.\r\n\r\n.adminBar \r\nThe bar that appears at the top of the page when you\'re in admin mode.\r\n\r\n.boardData \r\nThe message listings on the message boards.\r\n\r\n.boardHeader \r\nThe header on the message boards.\r\n\r\n.boardMenu \r\nThe menu on the message boards.\r\n\r\n.boardMessage \r\nThe full message text.\r\n\r\n.boardTitle \r\nThe headings of each column on the message list.\r\n\r\n.content\r\nThe main content area on all pages of the style.\r\n\r\n.crumbTrail \r\nThe crumb trail (if you\'re using that macro).\r\n\r\n.faqQuestion\r\nAn F.A.Q. question. To distinguish it from an answer.\r\n\r\n.formDescription \r\nThe tags on all forms next to the form elements. \r\n\r\n.formSubtext \r\nThe tags below some form elements.\r\n\r\n.highlight \r\nDenotes a highlighted item, such as which message you are viewing within a list.\r\n\r\n.horizontalMenu \r\nThe horizontal menu (if you use a horizontal menu macro).\r\n\r\n.loginBox\r\nThe login box macro.\r\n\r\n.pagination \r\nThe Previous and Next links on pages with pagination.\r\n\r\n.pollAnswer \r\nAn answer on a poll.\r\n\r\n.pollColor \r\nThe color of the percentage bar on a poll.\r\n\r\n.pollQuestion \r\nThe question on a poll.\r\n\r\n.verticalMenu \r\nThe vertical menu (if you use a verticall menu macro).\r\n\r\n','11,16'); +INSERT INTO help VALUES (18,'US English','Using','Style Sheets','Cascading Style Sheets (CSS) are a great way to manage the look and feel of any web site. They are used extensively in WebGUI.\r\n\r\nIf you are unfamiliar with how to use CSS, Plain Black Software provides training classes on XHTML and CSS. Alternatively, Bradsoft makes an excellent CSS editor called Top Style.\r\n\r\nThe following is a list of classes used to control the look of WebGUI:\r\n\r\nA\r\nThe links throughout the style.\r\n\r\nBODY\r\nThe default setup of all pages within a style.\r\n\r\nH1\r\nThe headers on every page.\r\n\r\n.accountOptions\r\nThe links that appear under the login and account update forms.\r\n\r\n.adminBar \r\nThe bar that appears at the top of the page when you\'re in admin mode.\r\n\r\n.boardMenu \r\nThe menu on the message boards.\r\n\r\n.boardMessage \r\nThe full message text.\r\n\r\n.boardTitle \r\nThe title of the message board.\r\n\r\n.content\r\nThe main content area on all pages of the style.\r\n\r\n.crumbTrail \r\nThe crumb trail (if you\'re using that macro).\r\n\r\n.eventTitle \r\nThe title of an individual event.\r\n\r\n.faqQuestion\r\nAn F.A.Q. question. To distinguish it from an answer.\r\n\r\n.formDescription \r\nThe tags on all forms next to the form elements. \r\n\r\n.formSubtext \r\nThe tags below some form elements.\r\n\r\n.highlight \r\nDenotes a highlighted item, such as which message you are viewing within a list.\r\n\r\n.horizontalMenu \r\nThe horizontal menu (if you use a horizontal menu macro).\r\n\r\n.loginBox\r\nThe login box macro.\r\n\r\n.pagination \r\nThe Previous and Next links on pages with pagination.\r\n\r\n.pollAnswer \r\nAn answer on a poll.\r\n\r\n.pollColor \r\nThe color of the percentage bar on a poll.\r\n\r\n.pollQuestion \r\nThe question on a poll.\r\n\r\n.tableData \r\nThe data rows on things like message boards and user contributions.\r\n\r\n.tableHeader \r\nThe headings of columns on things like message boards and user contributions.\r\n\r\n.verticalMenu \r\nThe vertical menu (if you use a verticall menu macro).\r\n\r\n','11,16'); INSERT INTO help VALUES (19,'US English','Using','Macros','WebGUI macros are used to create dynamic content within otherwise static content. For instance, you may wish to show which user is logged in on every page, or you may wish to have a dynamically built menu or crumb trail. \r\n\r\nMacros always begin with a carrot (^) and follow with one other character. The following is a description of all the macros in the WebGUI system.\r\n\r\n^^ - Carrot\r\nSince the carrot symbol is used to start all macros, this macro is in place just in case you really wanted to use a carrot somewhere.\r\n\r\n^/ - System URL\r\nThe URL to the gateway script (including the domain for this site). This is often used within pages so that if your development server is on a domain different than your production server that your URLs will still worked when moved.\r\n\r\n^@ - Username\r\nThe username of the currently logged in user.\r\n\r\n^# - User ID\r\nThe user id of the currently logged in user.\r\n\r\n^* - Random Number\r\nA randomly generated number. This is often used on images (such as banner ads) that you want to ensure do not cache.\r\n\r\n^a - My Account Link\r\nA link to your account information.\r\n\r\n^C - Crumb Trail\r\nA dynamically generated crumb trail to the current page.\r\n\r\n^D - Date\r\nThe current date and time.\r\n\r\n^H - Home Link\r\nA link to the home page of this site.\r\n\r\n^L - Login\r\nA small login form.\r\n\r\n^M - Current Menu (Vertical)\r\nA vertical menu containing the sub-pages at the current level.\r\n\r\n^m - Current Menu (Horizontal)\r\nA horizontal menu containing the sub-pages at the current level.\r\n\r\n^T - Top Level Menu (Vertical)\r\nA vertical menu containing the main pages of the site (aka the sub-pages from the home page).\r\n\r\n^t - Top Level Menu (Horizontal)\r\nA vertical menu containing the main pages of the site (aka the sub-pages from the home page).\r\n\r\n','11,16,12'); +INSERT INTO help VALUES (20,'US English','Add','SQL Report','SQL Reports are perhaps the most powerful widget in the WebGUI arsenal. They allow a user to query data from any database that they have access to. This is great for getting sales figures from your Accounting database or even summarizing all the message boards on your web site.\r\n\r\nTitle\r\nThe title of this report.\r\n\r\nDisplay Title?\r\nDo you wish to display the title of the report? If so, check the box.\r\n\r\nProcess Macros\r\nDo you wish to process WebGUI Macros on this report? If so, check the box.\r\n\r\nDescription\r\nDescribe the content of this report so your users will better understand what the report is all about.\r\n\r\nTemplate\r\nLayout a template of how this report should look. Usually you\'ll use HTML tables to generate a report. An example is included below.\r\n\r\nThere are 11 special macro characters used in generating SQL Reports. They are ^-, ^0, ^1, ^2, ^3, ^4, ^5, ^6, ^7, ^8, and ^9. These macros will be processed regardless of whether you checked the process macros box above. The ^- macro represents split points in the document where the report will begin and end looping. The numeric macros represent the data fields that will be returned from your query. Note that you may only have 10 fields returned per row in your query.\r\n\r\nSample Template:\r\n<table>\r\n<tr><th>Employee Name</th><th>Employee #</th><th>Vacation Days Remaining</th><th>Monthly Salary</th></tr>\r\n^-\r\n<tr><td>^0</td><td>^1</td><td>^2</td><td>^3</td></tr>\r\n^-\r\n</table>\r\n\r\nQuery\r\nThis is a standard SQL query. If you are unfamiliar with SQL, Plain Black Software provides training courses in SQL and database management.\r\n\r\nDSN\r\nData Source Name is the unique identifier that Perl uses to describe the location of your database. It takes the format of DBI:[driver]:[database name]:[host]. \r\n\r\nExample: DBI:mysql:WebGUI:localhost\r\n\r\nDatabase User\r\nThe username you use to connect to the DSN.\r\n\r\nDatabase Password\r\nThe password you use to connect to the DSN.\r\n','19'); # # Table structure for table 'incrementer' @@ -346,7 +349,6 @@ CREATE TABLE incrementer ( # INSERT INTO incrementer VALUES ('groupId',26); -INSERT INTO incrementer VALUES ('helpId',20); INSERT INTO incrementer VALUES ('messageId',1); INSERT INTO incrementer VALUES ('pageId',26); INSERT INTO incrementer VALUES ('styleId',26); @@ -355,6 +357,7 @@ INSERT INTO incrementer VALUES ('widgetId',1); INSERT INTO incrementer VALUES ('eventId',1); INSERT INTO incrementer VALUES ('linkId',1); INSERT INTO incrementer VALUES ('questionId',1); +INSERT INTO incrementer VALUES ('submissionId',1); # # Table structure for table 'link' @@ -514,7 +517,7 @@ INSERT INTO settings VALUES ('attachmentDirectoryWeb','/uploads'); INSERT INTO settings VALUES ('maxAttachmentSize','300'); INSERT INTO settings VALUES ('lib','/extras'); INSERT INTO settings VALUES ('sessionTimeout','28000'); -INSERT INTO settings VALUES ('attachmentDirectoryLocal','/path/to/mysite/uploads'); +INSERT INTO settings VALUES ('attachmentDirectoryLocal','/path/to/uploads/folder'); INSERT INTO settings VALUES ('smtpServer','smtp.mycompany.com'); INSERT INTO settings VALUES ('companyEmail','info@mycompany.com'); INSERT INTO settings VALUES ('companyName','My Company'); @@ -1116,7 +1119,7 @@ CREATE TABLE style ( INSERT INTO style VALUES (1,'Reserved','\r\n
^C^D
\r\n
\r\nhorizontal top level menu: ^t\r\n
\r\nhorizontal current level menu: ^m\r\n
\r\n
\r\nvertical top level menu: ^T
\r\n
\r\nvertical current level menu: ^M
\r\n\r\n\r\n
\r\n\r\n','\r\n^@
\r\n^#
\r\n^*
\r\n^?
\r\n
\r\n\r\n\r\n',''); INSERT INTO style VALUES (2,'Fail Safe','\r\n^H / ^t / ^m / ^a\r\n
','
\r\n^H / ^t / ^m / ^a\r\n',''); -INSERT INTO style VALUES (3,'Plain Black Software','\r\n
^C^D
\r\n
\r\nuser: ^@\r\n
\r\n^T\r\n
\r\n^M\r\n
\r\n\r\n','

\r\n^H / ^a\r\n',''); +INSERT INTO style VALUES (3,'Plain Black Software','\r\n\r\n
^C^D
\r\n
\r\nuser: ^@\r\n
\r\n^T\r\n
\r\n^m\r\n','

\r\n\r\n^H / ^a\r\n',''); INSERT INTO style VALUES (4,'Reserved','','',NULL); INSERT INTO style VALUES (5,'Reserved','','',NULL); INSERT INTO style VALUES (6,'Reserved','','',NULL); @@ -1140,6 +1143,29 @@ INSERT INTO style VALUES (23,'Reserved','','',NULL); INSERT INTO style VALUES (24,'Reserved','','',NULL); INSERT INTO style VALUES (25,'Yahoo!','Yahoo!\r\n\r\n
Yahoo
\r\nnew! Y! Domains
reserve .biz & .info domains
\"\"Yahoo! Mail
you@yahoo.com
\r\n advanced search
\r\n
\r\n
\r\n','
\r\n
How to Suggest a Site -\r\nCompany Info -\r\nCopyright Policy -\r\nTerms of Service -\r\nContributors -\r\nJobs -\r\nAdvertising

Copyright © 2001 Yahoo! Inc. All rights reserved.
Privacy Policy

\r\n',''); +# +# Table structure for table 'submission' +# + +CREATE TABLE submission ( + widgetId int(11) default NULL, + submissionId int(11) NOT NULL default '0', + title varchar(30) default NULL, + dateSubmitted datetime default NULL, + username varchar(30) default NULL, + userId int(11) default NULL, + content text, + image varchar(255) default NULL, + attachment varchar(255) default NULL, + status varchar(30) default NULL, + PRIMARY KEY (submissionId) +) TYPE=MyISAM; + +# +# Dumping data for table 'submission' +# + + # # Table structure for table 'url' # @@ -1229,6 +1255,10 @@ CREATE TABLE widget ( displayTitle int(11) NOT NULL default '1', description text, processMacros int(11) NOT NULL default '0', + dateAdded datetime default NULL, + addedBy int(11) default NULL, + lastEdited datetime default NULL, + editedBy int(11) default NULL, PRIMARY KEY (widgetId) ) TYPE=MyISAM; diff --git a/docs/licence.txt b/docs/license.txt similarity index 100% rename from docs/licence.txt rename to docs/license.txt diff --git a/docs/previousVersion.sql b/docs/previousVersion.sql new file mode 100644 index 000000000..a782fa3c7 --- /dev/null +++ b/docs/previousVersion.sql @@ -0,0 +1,1239 @@ +# MySQL dump 8.13 +# +# Host: localhost Database: WebGUI +#-------------------------------------------------------- +# Server version 3.23.36 + +# +# Table structure for table 'Article' +# + +CREATE TABLE Article ( + widgetId int(11) default NULL, + startDate datetime default NULL, + endDate datetime default NULL, + body text, + image varchar(255) default NULL, + linkTitle varchar(255) default NULL, + linkURL text, + attachment varchar(255) default NULL +) TYPE=MyISAM; + +# +# Dumping data for table 'Article' +# + + +# +# Table structure for table 'ExtraColumn' +# + +CREATE TABLE ExtraColumn ( + widgetId int(11) NOT NULL default '0', + spacer int(11) default NULL, + width int(11) default NULL, + class varchar(50) default NULL, + PRIMARY KEY (widgetId) +) TYPE=MyISAM; + +# +# Dumping data for table 'ExtraColumn' +# + + +# +# Table structure for table 'MessageBoard' +# + +CREATE TABLE MessageBoard ( + widgetId int(11) default NULL, + groupToPost int(11) default NULL, + messagesPerPage int(11) NOT NULL default '50', + editTimeout int(11) default NULL +) TYPE=MyISAM; + +# +# Dumping data for table 'MessageBoard' +# + + +# +# Table structure for table 'Poll' +# + +CREATE TABLE Poll ( + widgetId int(11) NOT NULL default '0', + active int(11) NOT NULL default '1', + voteGroup int(11) default NULL, + question varchar(255) default NULL, + a1 varchar(255) default NULL, + a2 varchar(255) default NULL, + a3 varchar(255) default NULL, + a4 varchar(255) default NULL, + a5 varchar(255) default NULL, + a6 varchar(255) default NULL, + a7 varchar(255) default NULL, + a8 varchar(255) default NULL, + a9 varchar(255) default NULL, + a10 varchar(255) default NULL, + a11 varchar(255) default NULL, + a12 varchar(255) default NULL, + a13 varchar(255) default NULL, + a14 varchar(255) default NULL, + a15 varchar(255) default NULL, + a16 varchar(255) default NULL, + a17 varchar(255) default NULL, + a18 varchar(255) default NULL, + a19 varchar(255) default NULL, + a20 varchar(255) default NULL, + PRIMARY KEY (widgetId) +) TYPE=MyISAM; + +# +# Dumping data for table 'Poll' +# + + +# +# Table structure for table 'SQLReport' +# + +CREATE TABLE SQLReport ( + widgetId int(11) NOT NULL default '0', + template text, + dbQuery text, + DSN varchar(255) default NULL, + username varchar(255) default NULL, + identifier varchar(255) default NULL, + PRIMARY KEY (widgetId) +) TYPE=MyISAM; + +# +# Dumping data for table 'SQLReport' +# + + +# +# Table structure for table 'SearchMnoGo' +# + +CREATE TABLE SearchMnoGo ( + widgetId int(11) NOT NULL default '0', + DSN varchar(255) default NULL, + username varchar(255) default NULL, + identifier varchar(255) default NULL, + PRIMARY KEY (widgetId) +) TYPE=MyISAM; + +# +# Dumping data for table 'SearchMnoGo' +# + + +# +# Table structure for table 'SiteMap' +# + +CREATE TABLE SiteMap ( + widgetId int(11) NOT NULL default '0', + startAtThisLevel int(11) default NULL, + showOnlyThisLevel int(11) default NULL, + PRIMARY KEY (widgetId) +) TYPE=MyISAM; + +# +# Dumping data for table 'SiteMap' +# + + +# +# Table structure for table 'SyndicatedContent' +# + +CREATE TABLE SyndicatedContent ( + widgetId int(11) NOT NULL default '0', + rssUrl text, + content text, + lastFetched datetime NOT NULL default '0000-00-00 00:00:00', + PRIMARY KEY (widgetId) +) TYPE=MyISAM; + +# +# Dumping data for table 'SyndicatedContent' +# + + +# +# Table structure for table 'UserContribution' +# + +CREATE TABLE UserContribution ( + widgetId int(11) NOT NULL default '0', + groupToContribute int(11) default NULL, + contributionsPerPage int(11) default NULL, + PRIMARY KEY (widgetId) +) TYPE=MyISAM; + +# +# Dumping data for table 'UserContribution' +# + + +# +# Table structure for table 'dict' +# + +CREATE TABLE dict ( + url_id int(11) NOT NULL default '0', + word varchar(32) NOT NULL default '', + intag int(11) NOT NULL default '0', + KEY url_id (url_id), + KEY word_url (word) +) TYPE=MyISAM; + +# +# Dumping data for table 'dict' +# + + +# +# Table structure for table 'event' +# + +CREATE TABLE event ( + eventId int(11) NOT NULL default '1', + widgetId int(11) default NULL, + name varchar(255) default NULL, + description text, + startDate datetime default NULL, + endDate datetime default NULL, + PRIMARY KEY (eventId) +) TYPE=MyISAM; + +# +# Dumping data for table 'event' +# + + +# +# Table structure for table 'faqQuestion' +# + +CREATE TABLE faqQuestion ( + widgetId int(11) default NULL, + questionId int(11) NOT NULL default '0', + question text, + answer text, + sequenceNumber int(11) NOT NULL default '0', + PRIMARY KEY (questionId) +) TYPE=MyISAM; + +# +# Dumping data for table 'faqQuestion' +# + + +# +# Table structure for table 'groupings' +# + +CREATE TABLE groupings ( + groupId int(11) NOT NULL default '0', + userId int(11) NOT NULL default '0', + PRIMARY KEY (groupId,userId) +) TYPE=MyISAM; + +# +# Dumping data for table 'groupings' +# + +INSERT INTO groupings VALUES (1,1); +INSERT INTO groupings VALUES (2,3); +INSERT INTO groupings VALUES (3,3); +INSERT INTO groupings VALUES (4,3); + +# +# Table structure for table 'groups' +# + +CREATE TABLE groups ( + groupId int(11) NOT NULL default '0', + groupName varchar(30) default NULL, + description varchar(255) default NULL, + PRIMARY KEY (groupId) +) TYPE=MyISAM; + +# +# Dumping data for table 'groups' +# + +INSERT INTO groups VALUES (1,'Visitors','This is the public group that has no privileges.'); +INSERT INTO groups VALUES (2,'Registered Users','All registered users belong to this group automatically.'); +INSERT INTO groups VALUES (3,'Admins','Anyone who belongs to this group has privileges to everything.'); +INSERT INTO groups VALUES (4,'Content Managers','Users that have privileges to edit content on this site. The user still needs to be added to a group that has editing privileges on specific pages.'); +INSERT INTO groups VALUES (5,'Reserved',''); +INSERT INTO groups VALUES (6,'Reserved',''); +INSERT INTO groups VALUES (7,'Reserved',''); +INSERT INTO groups VALUES (8,'Reserved',''); +INSERT INTO groups VALUES (9,'Reserved',''); +INSERT INTO groups VALUES (10,'Reserved',''); +INSERT INTO groups VALUES (11,'Reserved',''); +INSERT INTO groups VALUES (12,'Reserved',''); +INSERT INTO groups VALUES (13,'Reserved',''); +INSERT INTO groups VALUES (14,'Reserved',''); +INSERT INTO groups VALUES (15,'Reserved',''); +INSERT INTO groups VALUES (16,'Reserved',''); +INSERT INTO groups VALUES (17,'Reserved',''); +INSERT INTO groups VALUES (18,'Reserved',''); +INSERT INTO groups VALUES (19,'Reserved',''); +INSERT INTO groups VALUES (20,'Reserved',''); +INSERT INTO groups VALUES (21,'Reserved',''); +INSERT INTO groups VALUES (22,'Reserved',''); +INSERT INTO groups VALUES (23,'Reserved',''); +INSERT INTO groups VALUES (24,'Reserved',''); +INSERT INTO groups VALUES (25,'Reserved',''); + +# +# Table structure for table 'help' +# + +CREATE TABLE help ( + helpId int(11) NOT NULL default '0', + language varchar(30) NOT NULL default 'US English', + action varchar(30) default NULL, + object varchar(30) default NULL, + body text, + seeAlso varchar(50) NOT NULL default '0', + KEY helpId (helpId,language) +) TYPE=MyISAM; + +# +# Dumping data for table 'help' +# + +INSERT INTO help VALUES (1,'US English','Add','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\r\nTitle\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\r\nMeta Tags\r\nMeta tags are used by some search engines to associate key words to a particular page. There is a great site called Meta Tag Builder that will help you build meta tags if you\'ve never done it before.\r\n\r\nAdvanced Users: If you have other things (like JavaScript) you usually put in the <head> area of your pages, you may put them here as well.','0'); +INSERT INTO help VALUES (2,'US English','Edit','Page','Title\r\nSee Add Page for details.\r\n\r\nMeta Tags\r\nSee Add Page for details.\r\n\r\nStyle\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 Add Style for more details.\r\n\r\nIf you check the box next to 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\r\nPage URL\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\r\nOwner\r\nThe owner of a page is usually the person who created the page. If you\'d like to give ownership of a page to a different content manager, then change the name here. Be careful though, once you change ownership of the page, you won\'t be able to get it back unless you are an administrator.\r\n\r\nOwner can view?\r\nCan the owner view the page or not?\r\n\r\nOwner can edit?\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\r\nGroup\r\nA group is assigned to every page for additional privilege control. Pick a group from the pull-down menu.\r\n\r\nGroup can view?\r\nCan members of this group view this page?\r\n\r\nGroup can edit?\r\nCan members of this group edit this page?\r\n\r\nAnybody can view?\r\nCan any visitor or member regardless of the group and owner view this page?\r\n\r\nAnybody can edit?\r\nCan any visitor or member regardless of the group and owner edit this page?\r\n\r\n','9'); +INSERT INTO help VALUES (3,'US 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 other content before you delete a page.\r\n\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'); +INSERT INTO help VALUES (4,'US English','Delete','Style','When you delete a style all pages using that style will be reverted to the fail safe style. To ensure uninterrupted viewing, you should be sure that no pages are using a style before you delete it.\r\n\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'); +INSERT INTO help VALUES (5,'US English','Add','User','See Manage Users for additional details.\r\n\r\nUsername\r\nUsername is a unique identifier for a user. Sometimes called a handle, it is also how the user will be known on the site. (Note: Administrators have unlimited power in the WebGUI system. This also means they are capable of breaking the system. If you rename or create a user, be careful not to use a username already in existance.)\r\n\r\nPassword\r\nA password is used to ensure that the user is who s/he says s/he is.\r\n\r\nEmail Address\r\nThe user\'s email address. This must only be specified if the user will partake in functions that require email.\r\n\r\nICQ UIN\r\nThe ICQ UIN is the \"User ID Number\" on the ICQ network. ICQ is a very popular instant messaging platform.\r\n\r\nGroups\r\nGroups displays which groups the user is in. Groups that are highlighted are groups that the user is assigned to. Those that are not highlighted are other groups that can be assigned. Note that you must hold down CTRL to select multiple groups.','0'); +INSERT INTO help VALUES (6,'US English','Edit','User','Username\r\nSee Add User for details.\r\n\r\nPassword\r\nSee Add User for details.\r\n\r\nEmail Address\r\nSee Add User for details.\r\n\r\nICQ UIN\r\nSee Add User for details.\r\n\r\nGroups\r\nSee Add User for details.\r\n\r\n','0'); +INSERT INTO help VALUES (7,'US English','Delete','User','There is really no reason to ever delete a user. If you are concerned with locking out a user, then simply change their password. If you truely wish to delete a user, then please know that there are consequences. If you delete a user any content that they added to the site via widgets like message boards and user contributions will remain on the site. However, if another user tries to visit the deleted user\'s profile they will get an error message. Also if the user ever is welcomed back to the site, there is no way to give him/her access to his/her old content items except by manually re-adding the user to the users table manually.\r\n\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'); +INSERT INTO help VALUES (8,'US English','Manage','User','Users are the accounts in the system given rights to do things. There are two default users built into the system: Admin and Visitor.\r\n\r\nAdmin\r\nAdmin is exactly what you\'d expect. It is a user with unlimited rights in the WebGUI environment. If it can be done, this user has the rights to do it.\r\n\r\nVisitor\r\nVisitor is exactly the opposite of Admin. Visitor has no rights what-so-ever. By default any user who is not logged in is seen as the user Visitor.','0'); +INSERT INTO help VALUES (9,'US English','Manage','Style','Styles are used to manage the look and feel of your WebGUI pages. With WebGUI, you can have an unlimited number of styles, so your site can take on as many looks as you like. You could have some pages that look like your company\'s brochure, and some pages that look like Yahoo!. You could even have some pages that look like pages in a book. Using style management, you have ultimate control over all your designs.\r\n\r\nThere are three styles built in to WebGUI: Fail Safe, Plain Black Software, and Yahoo!. These styles are not meant to be edited, but rather to give you samples of what\'s possible.\r\n\r\nFail Safe\r\nWhen you delete a style that is still in use on some pages, the Fail Safe style will be applied to those pages. This style has a white background and simple navigation.\r\n\r\nPlain Black Software\r\nThis is the simple design used on the Plain Black Software site.\r\n\r\nYahoo!\r\nThis is the design of the Yahoo! site. (Yahoo! has not given us permission to use their design. It is simply an example.)','0'); +INSERT INTO help VALUES (10,'US English','Manage','Group','Groups are used to subdivided privileges and responsibilities within the WebGUI system. For instance, you may be building a site for a classroom situation. In that case you might set up a different group for each class that you teach. You would then apply those groups to the pages that are designed for each class.\r\n\r\nThere are four groups built into WebGUI. They are Admins, Content Managers, Visitors, and Registered Users.\r\n\r\nAdmins\r\nAdmins are users who have unlimited privileges within WebGUI. A user should only be added to the admin group if they oversee the system. Usually only one to three people will be added to this group.\r\n\r\nContent Managers\r\nContent managers are users who have privileges to add, edit, and delete content from various areas on the site. The content managers group should not be used to control individual content areas within the site, but instead just whether users can edit content at all. You should set up additional groups to separate content areas on the site.\r\n\r\nRegistered Users\r\nWhen users are added to the system they are put into the registered users group. A user should only be removed from this group if their account is deleted or if you wish to punish a troublemaker.\r\n\r\nVisitors\r\nVisitors are users who are not logged in using an account on the system. Also, if you wish to punish a registered user you could remove him/her from the Registered Users group and insert him/her into the Visitors group.','0'); +INSERT INTO help VALUES (11,'US English','Edit','Style','Style Name\r\nSee Add Style for details.\r\n\r\nHeader\r\nSee Add Style for details.\r\n\r\nFooter\r\nSee Add Style for details.\r\n\r\nStyle Sheet\r\nSee Add Style for details.\r\n\r\n','18,19'); +INSERT INTO help VALUES (12,'US English','Edit','Settings','Settings are items that allow you to adjust WebGUI to your particular needs.\r\n\r\nPath to WebGUI Extras\r\nThe web-path to the directory containing WebGUI images and javascript files.\r\n\r\nSession Timeout\r\nThe time (in seconds) that a user session remains active (before needing to log in again). This timeout is reset each time a visitor hits a page. Therefore if you set the timeout for 8 hours, a user would have to log in again if s/he hadn\'t visited the site for 8 hours.\r\n\r\n1800 = half hour\r\n3600 = 1 hour\r\n28000 = 8 hours\r\n86400 = 1 day\r\n604800 = 1 week\r\n1209600 = 2 weeks\r\n\r\nMaximum Attachment Size\r\nThe maximum size of files allowed to be uploaded to this site. This applies to all widgets that allow uploaded files and images (like Article and User Contributions). This size is measured in kilobytes.\r\n\r\nWeb Attachment Path\r\nThe web-path of the directory where attachments are to be stored.\r\n\r\nServer Attachment Path\r\nThe local path of the directory where attachments are to be stored. (Perhaps /var/www/public/uploads) Be sure that the web server has the rights to write to that directory.\r\n\r\nSMTP Server\r\nThis is the address of your local mail server. It is needed for all features that use the Internet email system (such as password recovery).\r\n\r\nCompany Name\r\nThe name of your company. It will appear on all emails and anywhere you use the Company Name macro.\r\n\r\nCompany Email Address\r\nA general email address at your company. This is the address that all automated messages will come from. It can also be used via the WebGUI macro system.\r\n\r\nCompany URL\r\nThe primary URL of your company. This will appear on all automated emails sent from the WebGUI system. It is also available via the WebGUI macro system.\r\n\r\n\r\n','19'); +INSERT INTO help VALUES (13,'US English','Edit','Group','Group Name\r\nSee Add Group for details.\r\n\r\nDescription\r\nSee Add Group for details.\r\n','0'); +INSERT INTO help VALUES (14,'US English','Delete','Content','As the function suggests you\'ll be deleting some content from a page. If you are unsure whether you wish to delete this content you may be better served to cut the content to the clipboard until you are certain you wish to delete it.\r\n\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'); +INSERT INTO help VALUES (15,'US English','Delete','Group','As the function suggests you\'ll be deleting a group and removing all users from the group. Be careful not to orphan users from pages they should have access to by deleting a group that is in use.\r\n\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'); +INSERT INTO help VALUES (16,'US English','Add','Style','Styles are WebGUI macro enabled. See Using Macros for more information.\r\n\r\nStyle Name\r\nA unique name to describe what this style looks like at a glance. The name has no effect on the actual look of the style.\r\n\r\nHeader\r\nThe header is the start of the look of your site. It is helpful to look at your design and cut it into three pieces. The top and left of your design is the header. The center part is the content, and the right and bottom is the footer. Cut the HTML from your header and paste it in the space provided.\r\n\r\nIf you are in need of assistance for creating a look for your site, or if you need help cutting apart your design, Plain Black Software provides support services for a small fee.\r\n\r\nMany people will add WebGUI macros to their header for automated navigation, and other features.\r\n\r\nFooter\r\nThe footer is the end of the look for your site. It is the right and bottom portion of your design. You may also place WebGUI macros in your footer.\r\n\r\nStyle Sheet\r\nPlace your style sheet entries here. Style sheets are used to control colors, sizes, and other properties of the elements on your site. See Using Style Sheets for more information.\r\n\r\nAdvanced Users: for greater performance create your stylesheet on the file system (call it something like webgui.css) and add an entry like this to this area: \r\n<link href=\"/webgui.css\" rel=\"stylesheet\" rev=\"stylesheet\" type=\"text/css\">','18,19'); +INSERT INTO help VALUES (17,'US English','Add','Group','See Manage Group for a description of grouping functions and the default groups.\r\n\r\nGroup Name\r\nA name for the group. It is best if the name is descriptive so you know what it is at a glance.\r\n\r\nDescription\r\nA longer description of the group so that other admins and content managers (or you if you forget) will know what the purpose of this group is.','0'); +INSERT INTO help VALUES (18,'US English','Using','Style Sheets','Cascading Style Sheets (CSS) are a great way to manage the look and feel of any web site. They are used extensively in WebGUI.\r\n\r\nIf you are unfamiliar with how to use CSS, Plain Black Software provides training classes on XHTML and CSS. Alternatively, Bradsoft makes an excellent CSS editor called Top Style.\r\n\r\nThe following is a list of classes used to control the look of WebGUI:\r\n\r\nA\r\nThe links throughout the style.\r\n\r\nBODY\r\nThe default setup of all pages within a style.\r\n\r\nH1\r\nThe headers on every page.\r\n\r\n.accountOptions\r\nThe links that appear under the login and account update forms.\r\n\r\n.adminBar \r\nThe bar that appears at the top of the page when you\'re in admin mode.\r\n\r\n.boardData \r\nThe message listings on the message boards.\r\n\r\n.boardHeader \r\nThe header on the message boards.\r\n\r\n.boardMenu \r\nThe menu on the message boards.\r\n\r\n.boardMessage \r\nThe full message text.\r\n\r\n.boardTitle \r\nThe headings of each column on the message list.\r\n\r\n.content\r\nThe main content area on all pages of the style.\r\n\r\n.crumbTrail \r\nThe crumb trail (if you\'re using that macro).\r\n\r\n.faqQuestion\r\nAn F.A.Q. question. To distinguish it from an answer.\r\n\r\n.formDescription \r\nThe tags on all forms next to the form elements. \r\n\r\n.formSubtext \r\nThe tags below some form elements.\r\n\r\n.highlight \r\nDenotes a highlighted item, such as which message you are viewing within a list.\r\n\r\n.horizontalMenu \r\nThe horizontal menu (if you use a horizontal menu macro).\r\n\r\n.loginBox\r\nThe login box macro.\r\n\r\n.pagination \r\nThe Previous and Next links on pages with pagination.\r\n\r\n.pollAnswer \r\nAn answer on a poll.\r\n\r\n.pollColor \r\nThe color of the percentage bar on a poll.\r\n\r\n.pollQuestion \r\nThe question on a poll.\r\n\r\n.verticalMenu \r\nThe vertical menu (if you use a verticall menu macro).\r\n\r\n','11,16'); +INSERT INTO help VALUES (19,'US English','Using','Macros','WebGUI macros are used to create dynamic content within otherwise static content. For instance, you may wish to show which user is logged in on every page, or you may wish to have a dynamically built menu or crumb trail. \r\n\r\nMacros always begin with a carrot (^) and follow with one other character. The following is a description of all the macros in the WebGUI system.\r\n\r\n^^ - Carrot\r\nSince the carrot symbol is used to start all macros, this macro is in place just in case you really wanted to use a carrot somewhere.\r\n\r\n^/ - System URL\r\nThe URL to the gateway script (including the domain for this site). This is often used within pages so that if your development server is on a domain different than your production server that your URLs will still worked when moved.\r\n\r\n^@ - Username\r\nThe username of the currently logged in user.\r\n\r\n^# - User ID\r\nThe user id of the currently logged in user.\r\n\r\n^* - Random Number\r\nA randomly generated number. This is often used on images (such as banner ads) that you want to ensure do not cache.\r\n\r\n^a - My Account Link\r\nA link to your account information.\r\n\r\n^C - Crumb Trail\r\nA dynamically generated crumb trail to the current page.\r\n\r\n^D - Date\r\nThe current date and time.\r\n\r\n^H - Home Link\r\nA link to the home page of this site.\r\n\r\n^L - Login\r\nA small login form.\r\n\r\n^M - Current Menu (Vertical)\r\nA vertical menu containing the sub-pages at the current level.\r\n\r\n^m - Current Menu (Horizontal)\r\nA horizontal menu containing the sub-pages at the current level.\r\n\r\n^T - Top Level Menu (Vertical)\r\nA vertical menu containing the main pages of the site (aka the sub-pages from the home page).\r\n\r\n^t - Top Level Menu (Horizontal)\r\nA vertical menu containing the main pages of the site (aka the sub-pages from the home page).\r\n\r\n','11,16,12'); + +# +# Table structure for table 'incrementer' +# + +CREATE TABLE incrementer ( + incrementerId varchar(50) NOT NULL default '', + nextValue int(11) NOT NULL default '1', + PRIMARY KEY (incrementerId) +) TYPE=MyISAM; + +# +# Dumping data for table 'incrementer' +# + +INSERT INTO incrementer VALUES ('groupId',26); +INSERT INTO incrementer VALUES ('helpId',20); +INSERT INTO incrementer VALUES ('messageId',1); +INSERT INTO incrementer VALUES ('pageId',26); +INSERT INTO incrementer VALUES ('styleId',26); +INSERT INTO incrementer VALUES ('userId',26); +INSERT INTO incrementer VALUES ('widgetId',1); +INSERT INTO incrementer VALUES ('eventId',1); +INSERT INTO incrementer VALUES ('linkId',1); +INSERT INTO incrementer VALUES ('questionId',1); + +# +# Table structure for table 'link' +# + +CREATE TABLE link ( + widgetId int(11) default NULL, + linkId int(11) NOT NULL default '0', + name varchar(30) default NULL, + url text, + description text, + sequenceNumber int(11) NOT NULL default '0', + PRIMARY KEY (linkId) +) TYPE=MyISAM; + +# +# Dumping data for table 'link' +# + + +# +# Table structure for table 'message' +# + +CREATE TABLE message ( + messageId int(11) NOT NULL default '0', + rid int(11) default NULL, + widgetId int(11) default NULL, + pid int(11) default NULL, + userId int(11) default NULL, + username varchar(30) default NULL, + subject varchar(255) default NULL, + message text, + dateOfPost datetime default NULL, + PRIMARY KEY (messageId) +) TYPE=MyISAM; + +# +# Dumping data for table 'message' +# + + +# +# Table structure for table 'page' +# + +CREATE TABLE page ( + pageId int(11) NOT NULL default '0', + parentId int(11) NOT NULL default '0', + title varchar(255) NOT NULL default '', + styleId int(11) NOT NULL default '0', + ownerId int(11) NOT NULL default '0', + ownerView int(11) NOT NULL default '1', + ownerEdit int(11) NOT NULL default '1', + groupId int(11) default NULL, + groupView int(11) NOT NULL default '1', + groupEdit int(11) NOT NULL default '0', + worldView int(11) NOT NULL default '1', + worldEdit int(11) NOT NULL default '0', + sequenceNumber int(11) NOT NULL default '1', + metaTags text, + urlizedTitle varchar(255) default NULL, + PRIMARY KEY (pageId) +) TYPE=MyISAM; + +# +# Dumping data for table 'page' +# + +INSERT INTO page VALUES (1,0,'Home',3,3,1,1,1,1,0,1,0,1,'','home'); +INSERT INTO page VALUES (5,3,'Reserved',1,1,1,1,NULL,1,0,1,0,1,NULL,'page_2.1'); +INSERT INTO page VALUES (6,0,'Reserved',0,0,1,1,NULL,1,0,1,0,1,NULL,NULL); +INSERT INTO page VALUES (7,0,'Reserved',0,0,1,1,NULL,1,0,1,0,1,NULL,NULL); +INSERT INTO page VALUES (8,0,'Reserved',0,0,1,1,NULL,1,0,1,0,1,NULL,NULL); +INSERT INTO page VALUES (9,0,'Reserved',0,0,1,1,NULL,1,0,1,0,1,NULL,NULL); +INSERT INTO page VALUES (10,0,'Reserved',0,0,1,1,NULL,1,0,1,0,1,NULL,NULL); +INSERT INTO page VALUES (11,0,'Reserved',0,0,1,1,NULL,1,0,1,0,1,NULL,NULL); +INSERT INTO page VALUES (12,0,'Reserved',0,0,1,1,NULL,1,0,1,0,1,NULL,NULL); +INSERT INTO page VALUES (13,0,'Reserved',0,0,1,1,NULL,1,0,1,0,1,NULL,NULL); +INSERT INTO page VALUES (14,0,'Reserved',0,0,1,1,NULL,1,0,1,0,1,NULL,NULL); +INSERT INTO page VALUES (15,0,'Reserved',0,0,1,1,NULL,1,0,1,0,1,NULL,NULL); +INSERT INTO page VALUES (16,0,'Reserved',0,0,1,1,NULL,1,0,1,0,1,NULL,NULL); +INSERT INTO page VALUES (17,0,'Reserved',0,0,1,1,NULL,1,0,1,0,1,NULL,NULL); +INSERT INTO page VALUES (18,0,'Reserved',0,0,1,1,NULL,1,0,1,0,1,NULL,NULL); +INSERT INTO page VALUES (19,0,'Reserved',0,0,1,1,NULL,1,0,1,0,1,NULL,NULL); +INSERT INTO page VALUES (20,0,'Reserved',0,0,1,1,NULL,1,0,1,0,1,NULL,NULL); +INSERT INTO page VALUES (21,0,'Reserved',0,0,1,1,NULL,1,0,1,0,1,NULL,NULL); +INSERT INTO page VALUES (22,0,'Reserved',0,0,1,1,NULL,1,0,1,0,1,NULL,NULL); +INSERT INTO page VALUES (23,0,'Reserved',0,0,1,1,NULL,1,0,1,0,1,NULL,NULL); +INSERT INTO page VALUES (24,0,'Reserved',0,0,1,1,NULL,1,0,1,0,1,NULL,NULL); +INSERT INTO page VALUES (25,0,'Reserved',0,0,1,1,NULL,1,0,1,0,1,NULL,NULL); +INSERT INTO page VALUES (4,0,'Reserved',1,0,1,1,0,1,0,1,0,1,NULL,NULL); +INSERT INTO page VALUES (3,0,'Trash',2,45,1,1,3,1,1,0,0,1,'','trash'); +INSERT INTO page VALUES (2,0,'Clipboard',2,45,1,1,4,1,1,0,0,1,'','clipboard'); + +# +# Table structure for table 'pollAnswer' +# + +CREATE TABLE pollAnswer ( + widgetId int(11) NOT NULL default '0', + answer char(3) default NULL, + userId int(11) default NULL +) TYPE=MyISAM; + +# +# Dumping data for table 'pollAnswer' +# + + +# +# Table structure for table 'robots' +# + +CREATE TABLE robots ( + hostinfo varchar(127) NOT NULL default '', + path varchar(127) NOT NULL default '' +) TYPE=MyISAM; + +# +# Dumping data for table 'robots' +# + + +# +# Table structure for table 'session' +# + +CREATE TABLE session ( + sessionId varchar(60) NOT NULL default '', + expires datetime default NULL, + lastPageView datetime default NULL, + adminOn int(11) NOT NULL default '0', + PRIMARY KEY (sessionId) +) TYPE=MyISAM; + +# +# Dumping data for table 'session' +# + + +# +# Table structure for table 'settings' +# + +CREATE TABLE settings ( + name varchar(255) NOT NULL default '', + value text, + PRIMARY KEY (name) +) TYPE=MyISAM; + +# +# Dumping data for table 'settings' +# + +INSERT INTO settings VALUES ('attachmentDirectoryWeb','/uploads'); +INSERT INTO settings VALUES ('maxAttachmentSize','300'); +INSERT INTO settings VALUES ('lib','/extras'); +INSERT INTO settings VALUES ('sessionTimeout','28000'); +INSERT INTO settings VALUES ('attachmentDirectoryLocal','/path/to/mysite/uploads'); +INSERT INTO settings VALUES ('smtpServer','smtp.mycompany.com'); +INSERT INTO settings VALUES ('companyEmail','info@mycompany.com'); +INSERT INTO settings VALUES ('companyName','My Company'); +INSERT INTO settings VALUES ('companyURL','http://www.mycompany.com'); + +# +# Table structure for table 'stopword' +# + +CREATE TABLE stopword ( + word char(32) NOT NULL default '', + lang char(2) NOT NULL default '', + PRIMARY KEY (word,lang) +) TYPE=MyISAM; + +# +# Dumping data for table 'stopword' +# + +INSERT INTO stopword VALUES ('a','en'); +INSERT INTO stopword VALUES ('about','en'); +INSERT INTO stopword VALUES ('above','en'); +INSERT INTO stopword VALUES ('abst','en'); +INSERT INTO stopword VALUES ('accordance','en'); +INSERT INTO stopword VALUES ('according','en'); +INSERT INTO stopword VALUES ('accordingly','en'); +INSERT INTO stopword VALUES ('across','en'); +INSERT INTO stopword VALUES ('act','en'); +INSERT INTO stopword VALUES ('actually','en'); +INSERT INTO stopword VALUES ('added','en'); +INSERT INTO stopword VALUES ('adj','en'); +INSERT INTO stopword VALUES ('adopted','en'); +INSERT INTO stopword VALUES ('affected','en'); +INSERT INTO stopword VALUES ('affecting','en'); +INSERT INTO stopword VALUES ('affects','en'); +INSERT INTO stopword VALUES ('after','en'); +INSERT INTO stopword VALUES ('afterwards','en'); +INSERT INTO stopword VALUES ('again','en'); +INSERT INTO stopword VALUES ('against','en'); +INSERT INTO stopword VALUES ('ah','en'); +INSERT INTO stopword VALUES ('all','en'); +INSERT INTO stopword VALUES ('almost','en'); +INSERT INTO stopword VALUES ('alone','en'); +INSERT INTO stopword VALUES ('along','en'); +INSERT INTO stopword VALUES ('already','en'); +INSERT INTO stopword VALUES ('also','en'); +INSERT INTO stopword VALUES ('although','en'); +INSERT INTO stopword VALUES ('always','en'); +INSERT INTO stopword VALUES ('am','en'); +INSERT INTO stopword VALUES ('among','en'); +INSERT INTO stopword VALUES ('amongst','en'); +INSERT INTO stopword VALUES ('an','en'); +INSERT INTO stopword VALUES ('and','en'); +INSERT INTO stopword VALUES ('announce','en'); +INSERT INTO stopword VALUES ('another','en'); +INSERT INTO stopword VALUES ('any','en'); +INSERT INTO stopword VALUES ('anyhow','en'); +INSERT INTO stopword VALUES ('anymore','en'); +INSERT INTO stopword VALUES ('anyone','en'); +INSERT INTO stopword VALUES ('anything','en'); +INSERT INTO stopword VALUES ('anywhere','en'); +INSERT INTO stopword VALUES ('apparently','en'); +INSERT INTO stopword VALUES ('approximately','en'); +INSERT INTO stopword VALUES ('are','en'); +INSERT INTO stopword VALUES ('aren','en'); +INSERT INTO stopword VALUES ('arent','en'); +INSERT INTO stopword VALUES ('arise','en'); +INSERT INTO stopword VALUES ('around','en'); +INSERT INTO stopword VALUES ('as','en'); +INSERT INTO stopword VALUES ('aside','en'); +INSERT INTO stopword VALUES ('at','en'); +INSERT INTO stopword VALUES ('auth','en'); +INSERT INTO stopword VALUES ('available','en'); +INSERT INTO stopword VALUES ('away','en'); +INSERT INTO stopword VALUES ('b','en'); +INSERT INTO stopword VALUES ('back','en'); +INSERT INTO stopword VALUES ('be','en'); +INSERT INTO stopword VALUES ('became','en'); +INSERT INTO stopword VALUES ('because','en'); +INSERT INTO stopword VALUES ('become','en'); +INSERT INTO stopword VALUES ('becomes','en'); +INSERT INTO stopword VALUES ('becoming','en'); +INSERT INTO stopword VALUES ('been','en'); +INSERT INTO stopword VALUES ('before','en'); +INSERT INTO stopword VALUES ('beforehand','en'); +INSERT INTO stopword VALUES ('begin','en'); +INSERT INTO stopword VALUES ('beginning','en'); +INSERT INTO stopword VALUES ('beginnings','en'); +INSERT INTO stopword VALUES ('begins','en'); +INSERT INTO stopword VALUES ('behind','en'); +INSERT INTO stopword VALUES ('being','en'); +INSERT INTO stopword VALUES ('below','en'); +INSERT INTO stopword VALUES ('beside','en'); +INSERT INTO stopword VALUES ('besides','en'); +INSERT INTO stopword VALUES ('between','en'); +INSERT INTO stopword VALUES ('beyond','en'); +INSERT INTO stopword VALUES ('billion','en'); +INSERT INTO stopword VALUES ('biol','en'); +INSERT INTO stopword VALUES ('both','en'); +INSERT INTO stopword VALUES ('briefly','en'); +INSERT INTO stopword VALUES ('but','en'); +INSERT INTO stopword VALUES ('by','en'); +INSERT INTO stopword VALUES ('c','en'); +INSERT INTO stopword VALUES ('ca','en'); +INSERT INTO stopword VALUES ('came','en'); +INSERT INTO stopword VALUES ('can','en'); +INSERT INTO stopword VALUES ('cannot','en'); +INSERT INTO stopword VALUES ('cant','en'); +INSERT INTO stopword VALUES ('certain','en'); +INSERT INTO stopword VALUES ('certainly','en'); +INSERT INTO stopword VALUES ('co','en'); +INSERT INTO stopword VALUES ('co.','en'); +INSERT INTO stopword VALUES ('come','en'); +INSERT INTO stopword VALUES ('contains','en'); +INSERT INTO stopword VALUES ('could','en'); +INSERT INTO stopword VALUES ('couldnt','en'); +INSERT INTO stopword VALUES ('d','en'); +INSERT INTO stopword VALUES ('date','en'); +INSERT INTO stopword VALUES ('did','en'); +INSERT INTO stopword VALUES ('didnt','en'); +INSERT INTO stopword VALUES ('different','en'); +INSERT INTO stopword VALUES ('do','en'); +INSERT INTO stopword VALUES ('does','en'); +INSERT INTO stopword VALUES ('doesnt','en'); +INSERT INTO stopword VALUES ('doing','en'); +INSERT INTO stopword VALUES ('done','en'); +INSERT INTO stopword VALUES ('dont','en'); +INSERT INTO stopword VALUES ('down','en'); +INSERT INTO stopword VALUES ('due','en'); +INSERT INTO stopword VALUES ('during','en'); +INSERT INTO stopword VALUES ('e','en'); +INSERT INTO stopword VALUES ('each','en'); +INSERT INTO stopword VALUES ('ed','en'); +INSERT INTO stopword VALUES ('effect','en'); +INSERT INTO stopword VALUES ('eg','en'); +INSERT INTO stopword VALUES ('eight','en'); +INSERT INTO stopword VALUES ('eighty','en'); +INSERT INTO stopword VALUES ('either','en'); +INSERT INTO stopword VALUES ('else','en'); +INSERT INTO stopword VALUES ('elsewhere','en'); +INSERT INTO stopword VALUES ('end','en'); +INSERT INTO stopword VALUES ('ending','en'); +INSERT INTO stopword VALUES ('enough','en'); +INSERT INTO stopword VALUES ('especially','en'); +INSERT INTO stopword VALUES ('et-al','en'); +INSERT INTO stopword VALUES ('etc','en'); +INSERT INTO stopword VALUES ('even','en'); +INSERT INTO stopword VALUES ('ever','en'); +INSERT INTO stopword VALUES ('every','en'); +INSERT INTO stopword VALUES ('everyone','en'); +INSERT INTO stopword VALUES ('everything','en'); +INSERT INTO stopword VALUES ('everywhere','en'); +INSERT INTO stopword VALUES ('except','en'); +INSERT INTO stopword VALUES ('f','en'); +INSERT INTO stopword VALUES ('far','en'); +INSERT INTO stopword VALUES ('few','en'); +INSERT INTO stopword VALUES ('ff','en'); +INSERT INTO stopword VALUES ('first','en'); +INSERT INTO stopword VALUES ('five','en'); +INSERT INTO stopword VALUES ('fix','en'); +INSERT INTO stopword VALUES ('followed','en'); +INSERT INTO stopword VALUES ('following','en'); +INSERT INTO stopword VALUES ('for','en'); +INSERT INTO stopword VALUES ('former','en'); +INSERT INTO stopword VALUES ('formerly','en'); +INSERT INTO stopword VALUES ('found','en'); +INSERT INTO stopword VALUES ('from','en'); +INSERT INTO stopword VALUES ('further','en'); +INSERT INTO stopword VALUES ('g','en'); +INSERT INTO stopword VALUES ('gave','en'); +INSERT INTO stopword VALUES ('get','en'); +INSERT INTO stopword VALUES ('gets','en'); +INSERT INTO stopword VALUES ('give','en'); +INSERT INTO stopword VALUES ('given','en'); +INSERT INTO stopword VALUES ('giving','en'); +INSERT INTO stopword VALUES ('go','en'); +INSERT INTO stopword VALUES ('goes','en'); +INSERT INTO stopword VALUES ('gone','en'); +INSERT INTO stopword VALUES ('got','en'); +INSERT INTO stopword VALUES ('h','en'); +INSERT INTO stopword VALUES ('had','en'); +INSERT INTO stopword VALUES ('hardly','en'); +INSERT INTO stopword VALUES ('has','en'); +INSERT INTO stopword VALUES ('hasnt','en'); +INSERT INTO stopword VALUES ('have','en'); +INSERT INTO stopword VALUES ('havent','en'); +INSERT INTO stopword VALUES ('having','en'); +INSERT INTO stopword VALUES ('he','en'); +INSERT INTO stopword VALUES ('hed','en'); +INSERT INTO stopword VALUES ('hence','en'); +INSERT INTO stopword VALUES ('her','en'); +INSERT INTO stopword VALUES ('here','en'); +INSERT INTO stopword VALUES ('hereafter','en'); +INSERT INTO stopword VALUES ('hereby','en'); +INSERT INTO stopword VALUES ('herein','en'); +INSERT INTO stopword VALUES ('heres','en'); +INSERT INTO stopword VALUES ('hereupon','en'); +INSERT INTO stopword VALUES ('hers','en'); +INSERT INTO stopword VALUES ('herself','en'); +INSERT INTO stopword VALUES ('hes','en'); +INSERT INTO stopword VALUES ('hid','en'); +INSERT INTO stopword VALUES ('him','en'); +INSERT INTO stopword VALUES ('himself','en'); +INSERT INTO stopword VALUES ('his','en'); +INSERT INTO stopword VALUES ('home','en'); +INSERT INTO stopword VALUES ('how','en'); +INSERT INTO stopword VALUES ('however','en'); +INSERT INTO stopword VALUES ('hundred','en'); +INSERT INTO stopword VALUES ('i','en'); +INSERT INTO stopword VALUES ('id','en'); +INSERT INTO stopword VALUES ('ie','en'); +INSERT INTO stopword VALUES ('if','en'); +INSERT INTO stopword VALUES ('ill','en'); +INSERT INTO stopword VALUES ('im','en'); +INSERT INTO stopword VALUES ('immediately','en'); +INSERT INTO stopword VALUES ('importance','en'); +INSERT INTO stopword VALUES ('important','en'); +INSERT INTO stopword VALUES ('in','en'); +INSERT INTO stopword VALUES ('inc','en'); +INSERT INTO stopword VALUES ('inc.','en'); +INSERT INTO stopword VALUES ('indeed','en'); +INSERT INTO stopword VALUES ('index','en'); +INSERT INTO stopword VALUES ('information','en'); +INSERT INTO stopword VALUES ('instead','en'); +INSERT INTO stopword VALUES ('into','en'); +INSERT INTO stopword VALUES ('invention','en'); +INSERT INTO stopword VALUES ('is','en'); +INSERT INTO stopword VALUES ('isnt','en'); +INSERT INTO stopword VALUES ('it','en'); +INSERT INTO stopword VALUES ('its','en'); +INSERT INTO stopword VALUES ('itself','en'); +INSERT INTO stopword VALUES ('ive','en'); +INSERT INTO stopword VALUES ('j','en'); +INSERT INTO stopword VALUES ('just','en'); +INSERT INTO stopword VALUES ('k','en'); +INSERT INTO stopword VALUES ('keep','en'); +INSERT INTO stopword VALUES ('kept','en'); +INSERT INTO stopword VALUES ('keys','en'); +INSERT INTO stopword VALUES ('kg','en'); +INSERT INTO stopword VALUES ('km','en'); +INSERT INTO stopword VALUES ('l','en'); +INSERT INTO stopword VALUES ('largely','en'); +INSERT INTO stopword VALUES ('last','en'); +INSERT INTO stopword VALUES ('later','en'); +INSERT INTO stopword VALUES ('latter','en'); +INSERT INTO stopword VALUES ('latterly','en'); +INSERT INTO stopword VALUES ('least','en'); +INSERT INTO stopword VALUES ('let','en'); +INSERT INTO stopword VALUES ('lets','en'); +INSERT INTO stopword VALUES ('like','en'); +INSERT INTO stopword VALUES ('likely','en'); +INSERT INTO stopword VALUES ('line','en'); +INSERT INTO stopword VALUES ('ll','en'); +INSERT INTO stopword VALUES ('ltd','en'); +INSERT INTO stopword VALUES ('m','en'); +INSERT INTO stopword VALUES ('made','en'); +INSERT INTO stopword VALUES ('mainly','en'); +INSERT INTO stopword VALUES ('make','en'); +INSERT INTO stopword VALUES ('makes','en'); +INSERT INTO stopword VALUES ('many','en'); +INSERT INTO stopword VALUES ('may','en'); +INSERT INTO stopword VALUES ('maybe','en'); +INSERT INTO stopword VALUES ('me','en'); +INSERT INTO stopword VALUES ('means','en'); +INSERT INTO stopword VALUES ('meantime','en'); +INSERT INTO stopword VALUES ('meanwhile','en'); +INSERT INTO stopword VALUES ('mg','en'); +INSERT INTO stopword VALUES ('might','en'); +INSERT INTO stopword VALUES ('million','en'); +INSERT INTO stopword VALUES ('miss','en'); +INSERT INTO stopword VALUES ('ml','en'); +INSERT INTO stopword VALUES ('more','en'); +INSERT INTO stopword VALUES ('moreover','en'); +INSERT INTO stopword VALUES ('most','en'); +INSERT INTO stopword VALUES ('mostly','en'); +INSERT INTO stopword VALUES ('mr','en'); +INSERT INTO stopword VALUES ('mrs','en'); +INSERT INTO stopword VALUES ('much','en'); +INSERT INTO stopword VALUES ('mug','en'); +INSERT INTO stopword VALUES ('must','en'); +INSERT INTO stopword VALUES ('my','en'); +INSERT INTO stopword VALUES ('myself','en'); +INSERT INTO stopword VALUES ('n','en'); +INSERT INTO stopword VALUES ('na','en'); +INSERT INTO stopword VALUES ('namely','en'); +INSERT INTO stopword VALUES ('nay','en'); +INSERT INTO stopword VALUES ('near','en'); +INSERT INTO stopword VALUES ('nearly','en'); +INSERT INTO stopword VALUES ('necessarily','en'); +INSERT INTO stopword VALUES ('neither','en'); +INSERT INTO stopword VALUES ('never','en'); +INSERT INTO stopword VALUES ('nevertheless','en'); +INSERT INTO stopword VALUES ('new','en'); +INSERT INTO stopword VALUES ('next','en'); +INSERT INTO stopword VALUES ('nine','en'); +INSERT INTO stopword VALUES ('ninety','en'); +INSERT INTO stopword VALUES ('no','en'); +INSERT INTO stopword VALUES ('nobody','en'); +INSERT INTO stopword VALUES ('none','en'); +INSERT INTO stopword VALUES ('nonetheless','en'); +INSERT INTO stopword VALUES ('noone','en'); +INSERT INTO stopword VALUES ('nor','en'); +INSERT INTO stopword VALUES ('normally','en'); +INSERT INTO stopword VALUES ('nos','en'); +INSERT INTO stopword VALUES ('not','en'); +INSERT INTO stopword VALUES ('noted','en'); +INSERT INTO stopword VALUES ('nothing','en'); +INSERT INTO stopword VALUES ('now','en'); +INSERT INTO stopword VALUES ('nowhere','en'); +INSERT INTO stopword VALUES ('o','en'); +INSERT INTO stopword VALUES ('obtain','en'); +INSERT INTO stopword VALUES ('obtained','en'); +INSERT INTO stopword VALUES ('of','en'); +INSERT INTO stopword VALUES ('off','en'); +INSERT INTO stopword VALUES ('often','en'); +INSERT INTO stopword VALUES ('oh','en'); +INSERT INTO stopword VALUES ('omitted','en'); +INSERT INTO stopword VALUES ('on','en'); +INSERT INTO stopword VALUES ('once','en'); +INSERT INTO stopword VALUES ('one','en'); +INSERT INTO stopword VALUES ('ones','en'); +INSERT INTO stopword VALUES ('only','en'); +INSERT INTO stopword VALUES ('onto','en'); +INSERT INTO stopword VALUES ('or','en'); +INSERT INTO stopword VALUES ('ord','en'); +INSERT INTO stopword VALUES ('other','en'); +INSERT INTO stopword VALUES ('others','en'); +INSERT INTO stopword VALUES ('otherwise','en'); +INSERT INTO stopword VALUES ('ought','en'); +INSERT INTO stopword VALUES ('our','en'); +INSERT INTO stopword VALUES ('ours','en'); +INSERT INTO stopword VALUES ('ourselves','en'); +INSERT INTO stopword VALUES ('out','en'); +INSERT INTO stopword VALUES ('over','en'); +INSERT INTO stopword VALUES ('overall','en'); +INSERT INTO stopword VALUES ('owing','en'); +INSERT INTO stopword VALUES ('own','en'); +INSERT INTO stopword VALUES ('p','en'); +INSERT INTO stopword VALUES ('page','en'); +INSERT INTO stopword VALUES ('pages','en'); +INSERT INTO stopword VALUES ('part','en'); +INSERT INTO stopword VALUES ('particularly','en'); +INSERT INTO stopword VALUES ('past','en'); +INSERT INTO stopword VALUES ('per','en'); +INSERT INTO stopword VALUES ('perhaps','en'); +INSERT INTO stopword VALUES ('please','en'); +INSERT INTO stopword VALUES ('poorly','en'); +INSERT INTO stopword VALUES ('possible','en'); +INSERT INTO stopword VALUES ('possibly','en'); +INSERT INTO stopword VALUES ('potentially','en'); +INSERT INTO stopword VALUES ('pp','en'); +INSERT INTO stopword VALUES ('predominantly','en'); +INSERT INTO stopword VALUES ('present','en'); +INSERT INTO stopword VALUES ('previously','en'); +INSERT INTO stopword VALUES ('primarily','en'); +INSERT INTO stopword VALUES ('probably','en'); +INSERT INTO stopword VALUES ('promptly','en'); +INSERT INTO stopword VALUES ('proud','en'); +INSERT INTO stopword VALUES ('put','en'); +INSERT INTO stopword VALUES ('q','en'); +INSERT INTO stopword VALUES ('quickly','en'); +INSERT INTO stopword VALUES ('quite','en'); +INSERT INTO stopword VALUES ('r','en'); +INSERT INTO stopword VALUES ('ran','en'); +INSERT INTO stopword VALUES ('rather','en'); +INSERT INTO stopword VALUES ('re','en'); +INSERT INTO stopword VALUES ('readily','en'); +INSERT INTO stopword VALUES ('really','en'); +INSERT INTO stopword VALUES ('recent','en'); +INSERT INTO stopword VALUES ('recently','en'); +INSERT INTO stopword VALUES ('ref','en'); +INSERT INTO stopword VALUES ('refs','en'); +INSERT INTO stopword VALUES ('regardless','en'); +INSERT INTO stopword VALUES ('related','en'); +INSERT INTO stopword VALUES ('relatively','en'); +INSERT INTO stopword VALUES ('research','en'); +INSERT INTO stopword VALUES ('respectively','en'); +INSERT INTO stopword VALUES ('resulted','en'); +INSERT INTO stopword VALUES ('resulting','en'); +INSERT INTO stopword VALUES ('results','en'); +INSERT INTO stopword VALUES ('run','en'); +INSERT INTO stopword VALUES ('s','en'); +INSERT INTO stopword VALUES ('said','en'); +INSERT INTO stopword VALUES ('same','en'); +INSERT INTO stopword VALUES ('say','en'); +INSERT INTO stopword VALUES ('sec','en'); +INSERT INTO stopword VALUES ('section','en'); +INSERT INTO stopword VALUES ('seem','en'); +INSERT INTO stopword VALUES ('seemed','en'); +INSERT INTO stopword VALUES ('seeming','en'); +INSERT INTO stopword VALUES ('seems','en'); +INSERT INTO stopword VALUES ('seen','en'); +INSERT INTO stopword VALUES ('seven','en'); +INSERT INTO stopword VALUES ('several','en'); +INSERT INTO stopword VALUES ('shall','en'); +INSERT INTO stopword VALUES ('she','en'); +INSERT INTO stopword VALUES ('shed','en'); +INSERT INTO stopword VALUES ('shell','en'); +INSERT INTO stopword VALUES ('shes','en'); +INSERT INTO stopword VALUES ('should','en'); +INSERT INTO stopword VALUES ('shouldnt','en'); +INSERT INTO stopword VALUES ('show','en'); +INSERT INTO stopword VALUES ('showed','en'); +INSERT INTO stopword VALUES ('shown','en'); +INSERT INTO stopword VALUES ('showns','en'); +INSERT INTO stopword VALUES ('shows','en'); +INSERT INTO stopword VALUES ('significant','en'); +INSERT INTO stopword VALUES ('significantly','en'); +INSERT INTO stopword VALUES ('similar','en'); +INSERT INTO stopword VALUES ('similarly','en'); +INSERT INTO stopword VALUES ('since','en'); +INSERT INTO stopword VALUES ('six','en'); +INSERT INTO stopword VALUES ('slightly','en'); +INSERT INTO stopword VALUES ('so','en'); +INSERT INTO stopword VALUES ('some','en'); +INSERT INTO stopword VALUES ('somehow','en'); +INSERT INTO stopword VALUES ('someone','en'); +INSERT INTO stopword VALUES ('somethan','en'); +INSERT INTO stopword VALUES ('something','en'); +INSERT INTO stopword VALUES ('sometime','en'); +INSERT INTO stopword VALUES ('sometimes','en'); +INSERT INTO stopword VALUES ('somewhat','en'); +INSERT INTO stopword VALUES ('somewhere','en'); +INSERT INTO stopword VALUES ('soon','en'); +INSERT INTO stopword VALUES ('specifically','en'); +INSERT INTO stopword VALUES ('state','en'); +INSERT INTO stopword VALUES ('states','en'); +INSERT INTO stopword VALUES ('still','en'); +INSERT INTO stopword VALUES ('stop','en'); +INSERT INTO stopword VALUES ('strongly','en'); +INSERT INTO stopword VALUES ('substantially','en'); +INSERT INTO stopword VALUES ('successfully','en'); +INSERT INTO stopword VALUES ('such','en'); +INSERT INTO stopword VALUES ('sufficiently','en'); +INSERT INTO stopword VALUES ('suggest','en'); +INSERT INTO stopword VALUES ('t','en'); +INSERT INTO stopword VALUES ('taking','en'); +INSERT INTO stopword VALUES ('than','en'); +INSERT INTO stopword VALUES ('that','en'); +INSERT INTO stopword VALUES ('thatll','en'); +INSERT INTO stopword VALUES ('thats','en'); +INSERT INTO stopword VALUES ('thatve','en'); +INSERT INTO stopword VALUES ('the','en'); +INSERT INTO stopword VALUES ('their','en'); +INSERT INTO stopword VALUES ('theirs','en'); +INSERT INTO stopword VALUES ('them','en'); +INSERT INTO stopword VALUES ('themselves','en'); +INSERT INTO stopword VALUES ('then','en'); +INSERT INTO stopword VALUES ('thence','en'); +INSERT INTO stopword VALUES ('there','en'); +INSERT INTO stopword VALUES ('thereafter','en'); +INSERT INTO stopword VALUES ('thereby','en'); +INSERT INTO stopword VALUES ('thered','en'); +INSERT INTO stopword VALUES ('therefore','en'); +INSERT INTO stopword VALUES ('therein','en'); +INSERT INTO stopword VALUES ('therell','en'); +INSERT INTO stopword VALUES ('thereof','en'); +INSERT INTO stopword VALUES ('therere','en'); +INSERT INTO stopword VALUES ('theres','en'); +INSERT INTO stopword VALUES ('thereto','en'); +INSERT INTO stopword VALUES ('thereupon','en'); +INSERT INTO stopword VALUES ('thereve','en'); +INSERT INTO stopword VALUES ('these','en'); +INSERT INTO stopword VALUES ('they','en'); +INSERT INTO stopword VALUES ('theyd','en'); +INSERT INTO stopword VALUES ('theyll','en'); +INSERT INTO stopword VALUES ('theyre','en'); +INSERT INTO stopword VALUES ('theyve','en'); +INSERT INTO stopword VALUES ('this','en'); +INSERT INTO stopword VALUES ('those','en'); +INSERT INTO stopword VALUES ('thou','en'); +INSERT INTO stopword VALUES ('though','en'); +INSERT INTO stopword VALUES ('thoughh','en'); +INSERT INTO stopword VALUES ('thousand','en'); +INSERT INTO stopword VALUES ('throug','en'); +INSERT INTO stopword VALUES ('through','en'); +INSERT INTO stopword VALUES ('throughout','en'); +INSERT INTO stopword VALUES ('thru','en'); +INSERT INTO stopword VALUES ('thus','en'); +INSERT INTO stopword VALUES ('til','en'); +INSERT INTO stopword VALUES ('tip','en'); +INSERT INTO stopword VALUES ('to','en'); +INSERT INTO stopword VALUES ('together','en'); +INSERT INTO stopword VALUES ('too','en'); +INSERT INTO stopword VALUES ('toward','en'); +INSERT INTO stopword VALUES ('towards','en'); +INSERT INTO stopword VALUES ('trillion','en'); +INSERT INTO stopword VALUES ('try','en'); +INSERT INTO stopword VALUES ('two','en'); +INSERT INTO stopword VALUES ('u','en'); +INSERT INTO stopword VALUES ('under','en'); +INSERT INTO stopword VALUES ('unless','en'); +INSERT INTO stopword VALUES ('unlike','en'); +INSERT INTO stopword VALUES ('unlikely','en'); +INSERT INTO stopword VALUES ('until','en'); +INSERT INTO stopword VALUES ('unto','en'); +INSERT INTO stopword VALUES ('up','en'); +INSERT INTO stopword VALUES ('upon','en'); +INSERT INTO stopword VALUES ('ups','en'); +INSERT INTO stopword VALUES ('us','en'); +INSERT INTO stopword VALUES ('use','en'); +INSERT INTO stopword VALUES ('used','en'); +INSERT INTO stopword VALUES ('usefully','en'); +INSERT INTO stopword VALUES ('usefulness','en'); +INSERT INTO stopword VALUES ('using','en'); +INSERT INTO stopword VALUES ('usually','en'); +INSERT INTO stopword VALUES ('v','en'); +INSERT INTO stopword VALUES ('various','en'); +INSERT INTO stopword VALUES ('ve','en'); +INSERT INTO stopword VALUES ('very','en'); +INSERT INTO stopword VALUES ('via','en'); +INSERT INTO stopword VALUES ('vol','en'); +INSERT INTO stopword VALUES ('vols','en'); +INSERT INTO stopword VALUES ('vs','en'); +INSERT INTO stopword VALUES ('w','en'); +INSERT INTO stopword VALUES ('was','en'); +INSERT INTO stopword VALUES ('wasnt','en'); +INSERT INTO stopword VALUES ('way','en'); +INSERT INTO stopword VALUES ('we','en'); +INSERT INTO stopword VALUES ('web','en'); +INSERT INTO stopword VALUES ('wed','en'); +INSERT INTO stopword VALUES ('well','en'); +INSERT INTO stopword VALUES ('were','en'); +INSERT INTO stopword VALUES ('werent','en'); +INSERT INTO stopword VALUES ('weve','en'); +INSERT INTO stopword VALUES ('what','en'); +INSERT INTO stopword VALUES ('whatever','en'); +INSERT INTO stopword VALUES ('whatll','en'); +INSERT INTO stopword VALUES ('whats','en'); +INSERT INTO stopword VALUES ('whatve','en'); +INSERT INTO stopword VALUES ('when','en'); +INSERT INTO stopword VALUES ('whence','en'); +INSERT INTO stopword VALUES ('whenever','en'); +INSERT INTO stopword VALUES ('where','en'); +INSERT INTO stopword VALUES ('whereafter','en'); +INSERT INTO stopword VALUES ('whereas','en'); +INSERT INTO stopword VALUES ('whereby','en'); +INSERT INTO stopword VALUES ('wherein','en'); +INSERT INTO stopword VALUES ('wheres','en'); +INSERT INTO stopword VALUES ('whereupon','en'); +INSERT INTO stopword VALUES ('wherever','en'); +INSERT INTO stopword VALUES ('whether','en'); +INSERT INTO stopword VALUES ('which','en'); +INSERT INTO stopword VALUES ('while','en'); +INSERT INTO stopword VALUES ('whim','en'); +INSERT INTO stopword VALUES ('whither','en'); +INSERT INTO stopword VALUES ('who','en'); +INSERT INTO stopword VALUES ('whod','en'); +INSERT INTO stopword VALUES ('whoever','en'); +INSERT INTO stopword VALUES ('whole','en'); +INSERT INTO stopword VALUES ('wholl','en'); +INSERT INTO stopword VALUES ('whom','en'); +INSERT INTO stopword VALUES ('whomever','en'); +INSERT INTO stopword VALUES ('whos','en'); +INSERT INTO stopword VALUES ('whose','en'); +INSERT INTO stopword VALUES ('why','en'); +INSERT INTO stopword VALUES ('widely','en'); +INSERT INTO stopword VALUES ('will','en'); +INSERT INTO stopword VALUES ('with','en'); +INSERT INTO stopword VALUES ('within','en'); +INSERT INTO stopword VALUES ('without','en'); +INSERT INTO stopword VALUES ('wont','en'); +INSERT INTO stopword VALUES ('words','en'); +INSERT INTO stopword VALUES ('world','en'); +INSERT INTO stopword VALUES ('would','en'); +INSERT INTO stopword VALUES ('wouldnt','en'); +INSERT INTO stopword VALUES ('www','en'); +INSERT INTO stopword VALUES ('x','en'); +INSERT INTO stopword VALUES ('y','en'); +INSERT INTO stopword VALUES ('yes','en'); +INSERT INTO stopword VALUES ('yet','en'); +INSERT INTO stopword VALUES ('you','en'); +INSERT INTO stopword VALUES ('youd','en'); +INSERT INTO stopword VALUES ('youll','en'); +INSERT INTO stopword VALUES ('your','en'); +INSERT INTO stopword VALUES ('youre','en'); +INSERT INTO stopword VALUES ('yours','en'); +INSERT INTO stopword VALUES ('yourself','en'); +INSERT INTO stopword VALUES ('yourselves','en'); +INSERT INTO stopword VALUES ('youve','en'); +INSERT INTO stopword VALUES ('z','en'); + +# +# Table structure for table 'style' +# + +CREATE TABLE style ( + styleId int(11) NOT NULL default '0', + name varchar(30) default NULL, + header text, + footer text, + styleSheet text, + PRIMARY KEY (styleId) +) TYPE=MyISAM; + +# +# Dumping data for table 'style' +# + +INSERT INTO style VALUES (1,'Reserved','\r\n
^C^D
\r\n
\r\nhorizontal top level menu: ^t\r\n
\r\nhorizontal current level menu: ^m\r\n
\r\n
\r\nvertical top level menu: ^T
\r\n
\r\nvertical current level menu: ^M
\r\n\r\n\r\n
\r\n\r\n','\r\n^@
\r\n^#
\r\n^*
\r\n^?
\r\n
\r\n\r\n\r\n',''); +INSERT INTO style VALUES (2,'Fail Safe','\r\n^H / ^t / ^m / ^a\r\n
','
\r\n^H / ^t / ^m / ^a\r\n',''); +INSERT INTO style VALUES (3,'Plain Black Software','\r\n
^C^D
\r\n
\r\nuser: ^@\r\n
\r\n^T\r\n
\r\n^M\r\n
\r\n\r\n','

\r\n^H / ^a\r\n',''); +INSERT INTO style VALUES (4,'Reserved','','',NULL); +INSERT INTO style VALUES (5,'Reserved','','',NULL); +INSERT INTO style VALUES (6,'Reserved','','',NULL); +INSERT INTO style VALUES (7,'Reserved','','',NULL); +INSERT INTO style VALUES (8,'Reserved','','',NULL); +INSERT INTO style VALUES (9,'Reserved','','',NULL); +INSERT INTO style VALUES (10,'Reserved','','',NULL); +INSERT INTO style VALUES (11,'Reserved','','',NULL); +INSERT INTO style VALUES (12,'Reserved','','',NULL); +INSERT INTO style VALUES (13,'Reserved','','',NULL); +INSERT INTO style VALUES (14,'Reserved','','',NULL); +INSERT INTO style VALUES (15,'Reserved','','',NULL); +INSERT INTO style VALUES (16,'Reserved','','',NULL); +INSERT INTO style VALUES (17,'Reserved','','',NULL); +INSERT INTO style VALUES (18,'Reserved','','',NULL); +INSERT INTO style VALUES (19,'Reserved','','',NULL); +INSERT INTO style VALUES (20,'Reserved','','',NULL); +INSERT INTO style VALUES (21,'Reserved','','',NULL); +INSERT INTO style VALUES (22,'Reserved','','',NULL); +INSERT INTO style VALUES (23,'Reserved','','',NULL); +INSERT INTO style VALUES (24,'Reserved','','',NULL); +INSERT INTO style VALUES (25,'Yahoo!','Yahoo!\r\n\r\n
Yahoo
\r\nnew! Y! Domains
reserve .biz & .info domains
\"\"Yahoo! Mail
you@yahoo.com
\r\n advanced search
\r\n
\r\n
\r\n','
\r\n
How to Suggest a Site -\r\nCompany Info -\r\nCopyright Policy -\r\nTerms of Service -\r\nContributors -\r\nJobs -\r\nAdvertising

Copyright © 2001 Yahoo! Inc. All rights reserved.
Privacy Policy

\r\n',''); + +# +# Table structure for table 'url' +# + +CREATE TABLE url ( + rec_id int(11) NOT NULL auto_increment, + status int(11) NOT NULL default '0', + url varchar(128) NOT NULL default '', + content_type varchar(48) NOT NULL default '', + title varchar(128) NOT NULL default '', + txt varchar(255) NOT NULL default '', + docsize int(11) NOT NULL default '0', + last_index_time int(11) NOT NULL default '0', + next_index_time int(11) NOT NULL default '0', + last_mod_time int(11) NOT NULL default '0', + referrer int(11) NOT NULL default '0', + tag varchar(11) NOT NULL default '0', + hops int(11) NOT NULL default '0', + category varchar(11) NOT NULL default '', + keywords varchar(255) NOT NULL default '', + description varchar(100) NOT NULL default '', + crc32 int(11) NOT NULL default '0', + lang char(2) NOT NULL default '', + PRIMARY KEY (rec_id), + UNIQUE KEY url (url), + KEY key_crc (crc32) +) TYPE=MyISAM; + +# +# Dumping data for table 'url' +# + + +# +# Table structure for table 'user' +# + +CREATE TABLE user ( + userId int(11) NOT NULL default '0', + username varchar(35) default NULL, + identifier varchar(35) default NULL, + email varchar(255) default NULL, + icq varchar(30) default NULL, + PRIMARY KEY (userId) +) TYPE=MyISAM; + +# +# Dumping data for table 'user' +# + +INSERT INTO user VALUES (1,'Visitor','No Login','',''); +INSERT INTO user VALUES (2,'Reserved','No Login',NULL,NULL); +INSERT INTO user VALUES (3,'Admin','RvlMjeFPs2aAhQdo/xt/Kg','',''); +INSERT INTO user VALUES (4,'Reserved','No Login',NULL,NULL); +INSERT INTO user VALUES (5,'Reserved','No Login',NULL,NULL); +INSERT INTO user VALUES (6,'Reserved','No Login',NULL,NULL); +INSERT INTO user VALUES (7,'Reserved','No Login',NULL,NULL); +INSERT INTO user VALUES (8,'Reserved','No Login',NULL,NULL); +INSERT INTO user VALUES (9,'Reserved','No Login',NULL,NULL); +INSERT INTO user VALUES (10,'Reserved','No Login',NULL,NULL); +INSERT INTO user VALUES (11,'Reserved','No Login',NULL,NULL); +INSERT INTO user VALUES (12,'Reserved','No Login',NULL,NULL); +INSERT INTO user VALUES (13,'Reserved','No Login',NULL,NULL); +INSERT INTO user VALUES (14,'Reserved','No Login',NULL,NULL); +INSERT INTO user VALUES (15,'Reserved','No Login',NULL,NULL); +INSERT INTO user VALUES (16,'Reserved','No Login',NULL,NULL); +INSERT INTO user VALUES (17,'Reserved','No Login',NULL,NULL); +INSERT INTO user VALUES (18,'Reserved','No Login',NULL,NULL); +INSERT INTO user VALUES (19,'Reserved','No Login',NULL,NULL); +INSERT INTO user VALUES (20,'Reserved','No Login',NULL,NULL); +INSERT INTO user VALUES (21,'Reserved','No Login',NULL,NULL); +INSERT INTO user VALUES (22,'Reserved','No Login',NULL,NULL); +INSERT INTO user VALUES (23,'Reserved','No Login',NULL,NULL); +INSERT INTO user VALUES (24,'Reserved','No Login',NULL,NULL); +INSERT INTO user VALUES (25,'Reserved','No Login',NULL,NULL); + +# +# Table structure for table 'widget' +# + +CREATE TABLE widget ( + widgetId int(11) NOT NULL default '0', + pageId int(11) default NULL, + widgetType varchar(35) default NULL, + sequenceNumber int(11) NOT NULL default '1', + title varchar(255) default NULL, + displayTitle int(11) NOT NULL default '1', + description text, + processMacros int(11) NOT NULL default '0', + PRIMARY KEY (widgetId) +) TYPE=MyISAM; + +# +# Dumping data for table 'widget' +# + + diff --git a/docs/upgrade-0.9.0_0.10.0.sql b/docs/upgrade-0.9.0_0.10.0.sql new file mode 100644 index 000000000..2eac93319 --- /dev/null +++ b/docs/upgrade-0.9.0_0.10.0.sql @@ -0,0 +1,39 @@ +alter table Poll add column graphWidth int not null default 150; +drop table UserContribution; +CREATE TABLE UserSubmission ( + widgetId int(11) NOT NULL default '0', + groupToContribute int(11) default NULL, + submissionsPerPage int(11) NOT NULL default '50', + defaultStatus varchar(30) default 'Approved', + PRIMARY KEY (widgetId) +) TYPE=MyISAM; +delete from help where helpId=18; +INSERT INTO help VALUES (18,'US English','Using','Style Sheets','Cascading Style Sheets (CSS) are a great way to manage the look and feel of any web site. They are used extensively in WebGUI.\r\n\r\nIf you are unfamiliar with how to use CSS, Plain Black Software provides training classes on XHTML and CSS. Alternatively, Bradsoft makes an excellent CSS editor called Top Style.\r\n\r\nThe following is a list of classes used to control the look of WebGUI:\r\n\r\nA\r\nThe links throughout the style.\r\n\r\nBODY\r\nThe default setup of all pages within a style.\r\n\r\nH1\r\nThe headers on every page.\r\n\r\n.accountOptions\r\nThe links that appear under the login and account update forms.\r\n\r\n.adminBar \r\nThe bar that appears at the top of the page when you\'re in admin mode.\r\n\r\n.boardMenu \r\nThe menu on the message boards.\r\n\r\n.boardMessage \r\nThe full message text.\r\n\r\n.boardTitle \r\nThe title of the message board.\r\n\r\n.content\r\nThe main content area on all pages of the style.\r\n\r\n.crumbTrail \r\nThe crumb trail (if you\'re using that macro).\r\n\r\n.eventTitle \r\nThe title of an individual event.\r\n\r\n.faqQuestion\r\nAn F.A.Q. question. To distinguish it from an answer.\r\n\r\n.formDescription \r\nThe tags on all forms next to the form elements. \r\n\r\n.formSubtext \r\nThe tags below some form elements.\r\n\r\n.highlight \r\nDenotes a highlighted item, such as which message you are viewing within a list.\r\n\r\n.horizontalMenu \r\nThe horizontal menu (if you use a horizontal menu macro).\r\n\r\n.loginBox\r\nThe login box macro.\r\n\r\n.pagination \r\nThe Previous and Next links on pages with pagination.\r\n\r\n.pollAnswer \r\nAn answer on a poll.\r\n\r\n.pollColor \r\nThe color of the percentage bar on apoll.\r\n\r\n.pollQuestion \r\nThe question on a poll.\r\n\r\n.tableData \r\nThe data rows on things like message boards and user contributions.\r\n\r\n.tableHeader \r\nThe headings of columns on things like message boards and user contributions.\r\n\r\n.verticalMenu \r\nThe vertical menu (if you use a verticall menu macro).\r\n\r\n','11,16'); +delete from help where helpId=19; +INSERT INTO help VALUES (19,'US English','Using','Macros','WebGUI macros are used to create dynamic content within otherwise static content. For instance, you may wish to show which user is logged in on every page, or you may wish to have a dynamically built menu or crumb trail. \r\n\r\nMacros always begin with a carrot (^) and follow with one other character. The following is a description of all the macros in the WebGUI system.\r\n\r\n^^ - Carrot\r\nSince the carrot symbol is used to start all macros, this macro is in place just in case you really wanted to use a carrot somewhere.\r\n\r\n^/ - System URL\r\nThe URL to the gateway script (including the domain for this site). This is often used within pages so that if your development server is on a domain different than your production server that your URLs will still worked when moved.\r\n\r\n^@ - Username\r\nThe username of the currently logged in user.\r\n\r\n^# - User ID\r\nThe user id of the currently logged in user.\r\n\r\n^* - Random Number\r\nA randomly generated number. This is often used on images (such as banner ads) that you want to ensure do not cache.\r\n\r\n^a - My Account Link\r\nA link to your account information.\r\n\r\n^C - Crumb Trail\r\nA dynamically generated crumb trail to the current page.\r\n\r\n^D - Date\r\nThe current date and time.\r\n\r\n^H - Home Link\r\nA link to the home page of this site.\r\n\r\n^L - Login\r\nA small login form.\r\n\r\n^M - Current Menu (Vertical)\r\nA vertical menu containing the sub-pages at the current level.\r\n\r\n^m - Current Menu (Horizontal)\r\nA horizontal menu containing the sub-pages at the current level.\r\n\r\n^T - Top Level Menu (Vertical)\r\nA vertical menu containing the main pages of the site (aka the sub-pages from the home page).\r\n\r\n^t - Top Level Menu (Horizontal)\r\nA vertical menu containing the main pages of the site (aka the sub-pages from the home page).\r\n\r\n','11,16,12'); +INSERT INTO help VALUES (20,'US English','Add','SQL Report','SQL Reports are perhaps the most powerful widget in the WebGUI arsenal. They allow a user to query data from any database that they have access to. This is great for getting sales figures from your Accounting database or even summarizing all the message boards on your web site.\r\n\r\nTitle\r\nThe title of this report.\r\n\r\nDisplay Title?\r\nDo you wish to display the title of the report? If so, check the box.\r\n\r\nProcess Macros\r\nDo you wish to process WebGUI Macros on this report? If so, check the box.\r\n\r\nDescription\r\nDescribe the content of this report so your users will better understand what the report is all about.\r\n\r\nTemplate\r\nLayout a template of how this report should look. Usually you\'ll use HTML tables to generate a report. An example is included below.\r\n\r\nThere are 11 special macro characters used in generating SQL Reports. They are ^-, ^0, ^1, ^2, ^3, ^4, ^5, ^6, ^7, ^8, and ^9. These macros will be processed regardless of whether you checked the process macros box above. The ^- macro represents split points in the document where the report will begin and end looping. The numeric macros represent the data fields that will be returned from your query. Note that you may only have 10 fields returned per row in your query.\r\n\r\nSample Template:\r\n<table>\r\n<tr><th>Employee Name</th><th>Employee #</th><th>Vacation Days Remaining</th><th>Monthly Salary</th></tr>\r\n^-\r\n<tr><td>^0</td><td>^1</td><td>^2</td><td>^3</td></tr>\r\n^-\r\n</table>\r\n\r\nQuery\r\nThis is a standard SQL query. If you are unfamiliar with SQL, Plain Black Software provides training courses in SQL and database management.\r\n\r\nDSN\r\nData Source Name is the unique identifier that Perl uses to describe the location of your database. It takes the format of DBI:[driver]:[database name]:[host]. \r\n\r\nExample: DBI:mysql:WebGUI:localhost\r\n\r\nDatabase User\r\nThe username you use to connect to the DSN.\r\n\r\nDatabase Password\r\nThe password you use to connect to the DSN.\r\n','19'); +delete from incrementer where incrementerId='helpId'; +insert into incrementer values ('submissionId',1); +delete from style where styleId=3; +INSERT INTO style VALUES (3,'Plain Black Software','\r\n\r\n
^C^D
\r\n
\r\nuser: ^@\r\n
\r\n^T\r\n
\r\n^m\r\n','

\r\n\r\n^H / ^a\r\n',''); +CREATE TABLE submission ( + widgetId int(11) default NULL, + submissionId int(11) NOT NULL default '0', + title varchar(30) default NULL, + dateSubmitted datetime default NULL, + username varchar(30) default NULL, + userId int(11) default NULL, + content text, + image varchar(255) default NULL, + attachment varchar(255) default NULL, + status varchar(30) default NULL, + PRIMARY KEY (submissionId) +) TYPE=MyISAM; + +alter table widget change sequenceNumber sequenceNumber int not null default 1; +alter table widget add dateAdded dateTime; +alter table widget add addedBy int; +alter table widget add lastEdited dateTime; +alter table widget add editedBy int; + + diff --git a/extras/WebGUI.js b/extras/WebGUI.js index 69ee5a7de..45498861a 100644 --- a/extras/WebGUI.js +++ b/extras/WebGUI.js @@ -25,7 +25,7 @@ function centerText(obj) { function colorText(obj) { formObj = obj; - window.open("/lib/colorPicker.html","colorPicker","width=438,height=258"); + window.open("/extras/colorPicker.html","colorPicker","width=438,height=258"); } function copyright(obj) { @@ -69,7 +69,7 @@ function setColor(remoteColor) { function showMe(obj) { formObj = obj; - window.open("/lib/viewer.html","showMeViewer","width=500,height=300,scrollbars=1"); + window.open("/extras/viewer.html","showMeViewer","width=500,height=300,scrollbars=1"); } function trademark(obj) { diff --git a/extras/attachment.gif b/extras/attachment.gif new file mode 100644 index 0000000000000000000000000000000000000000..49b84da55a13675d1b3ec028b61c93d44ca370a7 GIT binary patch literal 291 zcmZ?wbhEHb)Mij**vtR|$BrF4cW&+T=jZ+t0Th3-FfuSOGU$MGg3MrGxnOX@vvKc_ zOJ{epyJ+;yN}tDQv2H=@zS+CFR&gIL6+88<_LMQxhUb%08jMvwvPoFXwLGK8sj+O{ z1%1~?zGhA zj-H7L6Y?fa>+PF7eRku7DRXM{I%fJYEnB`~rV)!|s$#H=ryFhQoln2bKm{bi~e=JbAvVfy2jJ1JrkppwIVwr@)hwKZRB91df zB#0fjw1s~+Uy1c*$Do}IELZM&USwiqw9-z>IDP4G8waDnqTb(M64`m!rM7R8__-#E zU)G{v!+{%$M>si{|NNDl$n12GpS5U3hJr?XUzX`{Gv13|53-c%M;uXLbbQ{rozdmZ z0_&YoXE>7Ir9CKgW@SA-|JAgHf&;HsmAwAPB*6FSkk{K~rWPI?bBZpkE@V%+k=2;{ za--nB^F0ZZiWoTl)^2fR{4OcVkoZVa)q(XL>oiIHZ`o1 zy+fQKM#1;h)M>JeW(-ZNwgL}aWnC6LU!Gc}BF>~CASKekq%xQ57Mr-vgxICku~|u literal 0 HcmV?d00001 diff --git a/extras/plainBlackSoftware.gif b/extras/plainBlackSoftware.gif new file mode 100644 index 0000000000000000000000000000000000000000..d030ae605d1745dcbab21bf6ae0d66d10437a786 GIT binary patch literal 3245 zcmeH|`9IT-1IOR*-LkRCvE~|^vyt;-q}pZ}NvM@0lCvy1iX724cS){ljvTcSrLSVe z$44PC9a@R{2+a|Nq7tR(`}zDA-ygouKjHa!Js&S;7bmLip`QQ)SONY8g+gJmSUeuD zqoZSFWMpn`Zfk4HU@%-=UA?@#e0_a`gM&F7&hg{NlarIv)6;WvbBl|M%gf6}B2hy_ zgIFwXZ*TAE>FMw99~v4O8ylOMnORs^SXo*5{eS*%;D6fy<=+DSZ2>^710YI+)mYV; zhT3R+K+;(KAPY-!Eoa>ddZ>uEj2MyJy4ri5=x|2E<+iY|$Z${nfgCU5<4b12kIG$| zYMvIF+Ax&49en3>8{U|PQ4B2&vqMqgoYCG;_j4OD#KF3kVFM!V&5ZX6Dx60*4JyNg z)WF%-_12w98NQ!EXEDd6>w>(@#1Xa^gK$*0+2V*!m0MnWbT@Rg0|!R==MOBbO zqb!?y_UdnTxcQoE68!igNxte7e(Bw_^pE@AVRZlov_igAVe}<56DsHOY`aOaXnJIm z0TGS$i*{Drh($&3GUIX~SSs1Ey;ZgkgN9)#Sf1Wut|oRp&vd(#6#MQ8(k{z%TL@AP z(QISTNHgDmPgyy>ww@r)S{VFx2M7OR-poGTW8x%*Hna~_9LmTz=>hpOhFRr+Oj@EP z$*BZtC+=ofNntBG0vYnRKl~yL*UGNuL&s~Rp!;CFI%7M}+t-Q0n3{0Xl)TS}=})JF zS#Wm#-h!ZShoyksvF1)@*rAsyj<%WX=OJ5ytVB$9s+0#Rg&q-k5r}nTaG#F}VQd1m zs)nZAio-p%-nYc14w`GtZW(OVOA*CY~ zG+=M4;_dbVhm;)i4U5$MBRp!#;v=NB>j7sB=tu&ED;1_F2xsdF=}YR4puK<-s_6~T zA@IX$+!Q5MrpC2m)t3NL4Q-~zQjx17S3cA#qX3WjC#6mJZQQ!XI|L>-4}~Mn7YeP5 z4>h06Q?3$kt2UBbfo&tEUweqP=mIlx|}Bia~CG52=w{)k7Q&JpU%4(v|1j8Z7EwQR%g z`|~gZMwSVOR=rlD)`xrzOorIU?{Zey6!|67Hy9k&O8B`aMHhx=fZ}jY z$ktE$HGQ$5cle3MoAaf^;v|bomAc7Nl2s&9#r}TsSVGph$Plle4U@~GP}VXX<}C#g zLUpSxj5n*v9zSv)>}s3tvRM+pBRxLAyc2rwf@#GL4*PiMs*iJ@Yfb#o@zfJ*WOSDtlU6{@FS}Ch{@F+o*%~8bwUe;su~Ts~Xcx%Yz5+Bimy8pI zvqmD=V}XOwTDJfY=CSL1H=8IoAVH`S0nki#y{qnU2#|?ASNOGRWN)qWr$6#T@|ZPD zy=*`kD>;`I|9KsFj8E<~_8K7RdesF!{7`V3 z@$Isbc+Vaj)9-hrzVD5vtY2DQE{n?j*W1}Q9MAY+n_{}N$U3xe>n~1x`@L@We$BZJ zUSNGl`q+}fCo}aLn{*P%5XX5|5O~IQa#&TT@1Z1WN8!FLTHUt^)d0gbsONe7xAQ|& zBMA;?$M{QXWQ}WFNbHYMMGxf@TGg9VdhcRqRmuD{UAgQXRe?tmL%^e>sQq(xh53al zwOQubNzSogV2_j}fJZy!^-cWj&(Pt&V5M%gn5ws1q7Hu+W!Bm$sVxicT+yuXah%_! zm=^zFUqB;c)~XQg=F>2hagBy3H*PJhZDWS|trvHOS{6kEPkk~imb-fL$1};0TR&Oj z{3jkfp*Lx>yJhE-??Jg*o`B-_**II}@Ov1Omdi&sxhO5poUbY-9_*K>e{Bn)XwN{@ zROb-EZV?&i4zLOKiFPB$N93B*SD+l{Ao*2bM~EZ;K-V~%Hn1UQ31mF&Ymw%tEDJ^i zEyq{~HXohjNBjIeEn;0n-hP{Bn9!YRfvU7Ip7pM8&fO6f?XLJI4|DVpwAMFF{E&(5 z4eOQ+eU_a159On`T1c&Sj0&AT(e73z96*HCyMpdfStD$bG-SS#;oTB=nK~>Uoup;n zz`gLfJH(0=yVfAhiej1d;Esis^<)zfZXbbUpE>D?DP@0sGBk$BYCY*t7z-FCafUPd z&TNwRGp{=`%-*!pl+2WGCJ5E040R16FPAEc3&jt`rXB z4pOT^O+I<0ot+@L)Y7Wj3M&fNxZ9mr$8Gq#`qG7;0PN2mF$H_Fcln)z^@+-%ZAzaZ zvf9nKh{3IYB?wH#w{=R!?(FGe4=c#76}Q*PLd%sDlm&~P7@HBjd$Z>oo98xJX1{`N zn?`^2Cl>vty|UUJk(BZHDO@!hk{6-%*ZqpwnA*3_E$;dDE1X1aA5*&fF{9O+k4k?C z*Gj=fV2slZ#RXoWAh($ literal 0 HcmV?d00001 diff --git a/lib/WebGUI.pm b/lib/WebGUI.pm index f8dbf6101..8d042d481 100644 --- a/lib/WebGUI.pm +++ b/lib/WebGUI.pm @@ -44,21 +44,24 @@ sub _displayAdminBar { } $clipboardSelect = WebGUI::Form::selectList("clipboardSelect",\%hash2,"","","","goClipboard()"); #--admin functions - %hash = ( $session{page}{url}=>'Manage...', - $session{env}{SCRIPT_NAME}.'/clipboard'=>'Clipboard', - $session{page}{url}.'?op=listGroups'=>'Groups', - $session{page}{url}.'?op=editSettings'=>'Settings', - $session{page}{url}.'?op=listStyles'=>'Styles', - $session{env}{SCRIPT_NAME}.'/trash'=>'Trash', - $session{page}{url}.'?op=listUsers'=>'Users' - ); + %hash = (); + if (WebGUI::Privilege::isInGroup(3,$session{user}{userId})) { + %hash = ( + $session{page}{url}.'?op=editSettings'=>'Edit Settings', + $session{page}{url}.'?op=listGroups'=>'Manage Groups', + $session{page}{url}.'?op=listStyles'=>'Manage Styles', + $session{page}{url}.'?op=listUsers'=>'Manage Users', + $session{env}{SCRIPT_NAME}.'/clipboard'=>'View Clipboard', + $session{env}{SCRIPT_NAME}.'/trash'=>'View Trash' + ); + } + %hash = ( $session{page}{url}=>'Admin...', + $session{page}{url}.'?op=switchOffAdmin'=>'Turn Admin Off', + $session{page}{url}.'?op=viewHelpIndex'=>'View Help Index', + $session{page}{url}.'?op=viewPendingSubmissions'=>'View Pending Submissions', + %hash + ); $adminSelect = WebGUI::Form::selectList("adminSelect",\%hash,"","","","goAdmin()"); - #--misc functions - %hash = ( $session{page}{url}=>'Miscellaneous functions...', - $session{page}{url}.'?op=switchOffAdmin'=>'Turn Admin Off', - $session{page}{url}.'?op=viewHelpIndex'=>'View Help Index' - ); - $miscSelect = WebGUI::Form::selectList("miscSelect",\%hash,"","","","goMisc()"); #--output admin bar $output = '
@@ -72,18 +75,10 @@ sub _displayAdminBar { function goClipboard(){ location = document.clipboard.clipboardSelect.options[document.clipboard.clipboardSelect.selectedIndex].value } - function goMisc(){ - location = document.misc.miscSelect.options[document.misc.miscSelect.selectedIndex].value - } //--> - '; - if (WebGUI::Privilege::isInGroup(3,$session{user}{userId})) { - $output .= ' '; - } - $output .= ' - +
'.$contentSelect.'
'.$clipboardSelect.'
'.$adminSelect.'
'.$miscSelect.'
'.$adminSelect.'
'; return $output; @@ -135,7 +130,7 @@ sub page { #if (WebGUI::Privilege::canViewPage($session{page}{pageId})) { if (WebGUI::Privilege::canViewPage()) { if ($session{var}{adminOn}) { - $content .= ''; + $content .= ''; } $sth = WebGUI::SQL->read("select widgetId, widgetType from widget where pageId=".$session{page}{pageId}." order by sequenceNumber, widgetId",$session{dbh}); while (@widgetList = $sth->array) { diff --git a/lib/WebGUI/Macro.pm b/lib/WebGUI/Macro.pm index 348d387f0..1732532b4 100644 --- a/lib/WebGUI/Macro.pm +++ b/lib/WebGUI/Macro.pm @@ -64,7 +64,7 @@ sub process { } #---crumb trail--- if ($output =~ /\^C/) { - $temp = ''._recurseCrumbTrail($session{page}{parentId}).$session{page}{title}.''; + $temp = ''._recurseCrumbTrail($session{page}{parentId}).''.$session{page}{title}.''; $output =~ s/\^C/$temp/g; } #---date--- @@ -100,7 +100,7 @@ sub process { #---current menu vertical--- if ($output =~ /\^M/) { $temp = ''; - $sth = WebGUI::SQL->read("select title,urlizedTitle,pageId from page where parentId=$session{page}{pageId}",$session{dbh}); + $sth = WebGUI::SQL->read("select title,urlizedTitle,pageId from page where parentId=$session{page}{pageId} order by sequenceNumber",$session{dbh}); while (@data = $sth->array) { if (WebGUI::Privilege::canViewPage($data[2])) { $temp .= ''.$data[0].'
'; @@ -114,7 +114,7 @@ sub process { if ($output =~ /\^m/) { $temp = ''; $first = 1; - $sth = WebGUI::SQL->read("select title,urlizedTitle,pageId from page where parentId=$session{page}{pageId}",$session{dbh}); + $sth = WebGUI::SQL->read("select title,urlizedTitle,pageId from page where parentId=$session{page}{pageId} order by sequenceNumber",$session{dbh}); while (@data = $sth->array) { if (WebGUI::Privilege::canViewPage($data[2])) { if ($first) { @@ -132,7 +132,7 @@ sub process { #---top menu vertical--- if ($output =~ /\^T/) { $temp = ''; - $sth = WebGUI::SQL->read("select title,urlizedTitle,pageId from page where parentId=1",$session{dbh}); + $sth = WebGUI::SQL->read("select title,urlizedTitle,pageId from page where parentId=1 order by sequenceNumber",$session{dbh}); while (@data = $sth->array) { if (WebGUI::Privilege::canViewPage($data[2])) { $temp .= ''.$data[0].'
'; @@ -146,7 +146,7 @@ sub process { if ($output =~ /\^t/) { $temp = ''; $first = 1; - $sth = WebGUI::SQL->read("select title,urlizedTitle,pageId from page where parentId=1",$session{dbh}); + $sth = WebGUI::SQL->read("select title,urlizedTitle,pageId from page where parentId=1 order by sequenceNumber",$session{dbh}); while (@data = $sth->array) { if (WebGUI::Privilege::canViewPage($data[2])) { if ($first) { diff --git a/lib/WebGUI/Operation.pm b/lib/WebGUI/Operation.pm index 2aad2dd25..078c073c6 100644 --- a/lib/WebGUI/Operation.pm +++ b/lib/WebGUI/Operation.pm @@ -15,9 +15,10 @@ use WebGUI::Operation::Account; use WebGUI::Operation::Admin; use WebGUI::Operation::Group; use WebGUI::Operation::Help; +use WebGUI::Operation::Page; use WebGUI::Operation::Settings; use WebGUI::Operation::Style; -use WebGUI::Operation::Page; +use WebGUI::Operation::Submission; use WebGUI::Operation::User; diff --git a/lib/WebGUI/Operation/Account.pm b/lib/WebGUI/Operation/Account.pm index 24527b3f4..57f665569 100644 --- a/lib/WebGUI/Operation/Account.pm +++ b/lib/WebGUI/Operation/Account.pm @@ -222,7 +222,7 @@ sub www_saveAccount { if ($error eq "") { $encryptedPassword = Digest::MD5::md5_base64($session{form}{identifier1}); $uid = getNextId("userId"); - WebGUI::SQL->write("insert into user set userId=".getNextId("userId").", username=".quote($session{form}{username}).", identifier=".quote($encryptedPassword).", email=".quote($session{form}{email}).", icq=".quote($session{form}{icq}),$session{dbh}); + WebGUI::SQL->write("insert into user set userId=$uid, username=".quote($session{form}{username}).", identifier=".quote($encryptedPassword).", email=".quote($session{form}{email}).", icq=".quote($session{form}{icq}),$session{dbh}); WebGUI::SQL->write("insert into groupings set groupId=2,userId=$uid",$session{dbh}); _login($uid,$encryptedPassword); $output .= 'Account created successfully!

'; diff --git a/lib/WebGUI/Operation/Page.pm b/lib/WebGUI/Operation/Page.pm index 0d3a74577..c1447d5cb 100644 --- a/lib/WebGUI/Operation/Page.pm +++ b/lib/WebGUI/Operation/Page.pm @@ -19,7 +19,7 @@ use WebGUI::SQL; use WebGUI::Utility; our @ISA = qw(Exporter); -our @EXPORT = qw(&www_addPage &www_addPageSave &www_cutPage &www_deletePage &www_deletePageConfirm &www_editPage &www_editPageSave &www_pastePage); +our @EXPORT = qw(&www_movePageUp &www_movePageDown &www_addPage &www_addPageSave &www_cutPage &www_deletePage &www_deletePageConfirm &www_editPage &www_editPageSave &www_pastePage); #------------------------------------------------------------------- sub _recursivelyChangePrivileges { @@ -43,6 +43,17 @@ sub _recursivelyChangeStyle { $sth->finish; } +#------------------------------------------------------------------- +sub _reorderPages { + my ($sth, $i, $pid); + $sth = WebGUI::SQL->read("select pageId from page where parentId=$_[0] order by sequenceNumber",$session{dbh}); + while (($pid) = $sth->array) { + WebGUI::SQL->write("update page set sequenceNumber='$i' where pageId=$pid",$session{dbh}); + $i++; + } + $sth->finish; +} + #------------------------------------------------------------------- sub www_addPage { my ($output); @@ -62,14 +73,14 @@ sub www_addPage { #------------------------------------------------------------------- sub www_addPageSave { - my (%parent, $urlizedTitle, $test); + my ($urlizedTitle, $test, $nextSeq); if (WebGUI::Privilege::canEditPage()) { - %parent = WebGUI::SQL->quickHash("select * from page where pageId=$session{page}{pageId}",$session{dbh}); + ($nextSeq) = WebGUI::SQL->quickArray("select max(sequenceNumber)+1 from page where parentId=$session{page}{pageId}",$session{dbh}); $urlizedTitle = urlizeTitle($session{form}{title}); while (($test) = WebGUI::SQL->quickArray("select urlizedTitle from page where urlizedTitle='$urlizedTitle'",$session{dbh})) { $urlizedTitle .= 2; } - WebGUI::SQL->write("insert into page set pageId=".getNextId("pageId").", parentId=$session{page}{pageId}, title=".quote($session{form}{title}).", styleId=$parent{styleId}, ownerId=$session{user}{userId}, ownerView=$parent{ownerView}, ownerEdit=$parent{ownerEdit}, groupId='$parent{groupId}', groupView=$parent{groupView}, groupEdit=$parent{groupEdit}, worldView=$parent{worldView}, worldEdit=$parent{worldEdit}, metaTags=".quote($session{form}{metaTags}).", urlizedTitle='$urlizedTitle'",$session{dbh}); + WebGUI::SQL->write("insert into page set pageId=".getNextId("pageId").", parentId=$session{page}{pageId}, title=".quote($session{form}{title}).", styleId=$session{page}{styleId}, sequenceNumber='$nextSeq', ownerId=$session{user}{userId}, ownerView=$session{page}{ownerView}, ownerEdit=$session{page}{ownerEdit}, groupId='$session{page}{groupId}', groupView=$session{page}{groupView}, groupEdit=$session{page}{groupEdit}, worldView=$session{page}{worldView}, worldEdit=$session{page}{worldEdit}, metaTags=".quote($session{form}{metaTags}).", urlizedTitle='$urlizedTitle'",$session{dbh}); return ""; } else { return WebGUI::Privilege::insufficient(); @@ -80,6 +91,7 @@ sub www_addPageSave { sub www_cutPage { if (WebGUI::Privilege::canEditPage() && $session{page}{pageId}!=1) { WebGUI::SQL->write("update page set parentId=2 where pageId=".$session{page}{pageId},$session{dbh}); + _reorderPages($session{page}{parentId}); WebGUI::Session::refreshPageInfo($session{page}{parentId}); return ""; } else { @@ -105,6 +117,7 @@ sub www_deletePage { sub www_deletePageConfirm { if (WebGUI::Privilege::canEditPage() && $session{page}{pageId}!=1) { WebGUI::SQL->write("update page set parentId=3 where pageId=".$session{page}{pageId},$session{dbh}); + _reorderPages($session{page}{parentId}); WebGUI::Session::refreshPageInfo($session{page}{parentId}); return ""; } else { @@ -175,6 +188,38 @@ sub www_editPageSave { } } +#------------------------------------------------------------------- +sub www_movePageDown { + my (@data, $thisSeq); + if (WebGUI::Privilege::canEditPage()) { + ($thisSeq) = WebGUI::SQL->quickArray("select sequenceNumber from page where pageId=$session{page}{pageId}",$session{dbh}); + @data = WebGUI::SQL->quickArray("select pageId from page where parentId=$session{page}{parentId} and sequenceNumber=$thisSeq+1",$session{dbh}); + if ($data[0] ne "") { + WebGUI::SQL->write("update page set sequenceNumber=sequenceNumber+1 where pageId=$session{page}{pageId}",$session{dbh}); + WebGUI::SQL->write("update page set sequenceNumber=sequenceNumber-1 where pageId=$data[0]",$session{dbh}); + } + return ""; + } else { + return WebGUI::Privilege::insufficient(); + } +} + +#------------------------------------------------------------------- +sub www_movePageUp { + my (@data, $thisSeq); + if (WebGUI::Privilege::canEditPage()) { + ($thisSeq) = WebGUI::SQL->quickArray("select sequenceNumber from page where pageId=$session{page}{pageId}",$session{dbh}); + @data = WebGUI::SQL->quickArray("select pageId from page where parentId=$session{page}{parentId} and sequenceNumber=$thisSeq-1",$session{dbh}); + if ($data[0] ne "") { + WebGUI::SQL->write("update page set sequenceNumber=sequenceNumber-1 where pageId=$session{page}{pageId}",$session{dbh}); + WebGUI::SQL->write("update page set sequenceNumber=sequenceNumber+1 where pageId=$data[0]",$session{dbh}); + } + return ""; + } else { + return WebGUI::Privilege::insufficient(); + } +} + #------------------------------------------------------------------- sub www_pastePage { my ($output); diff --git a/lib/WebGUI/Operation/Style.pm b/lib/WebGUI/Operation/Style.pm index 7ab7b8890..ace91108e 100644 --- a/lib/WebGUI/Operation/Style.pm +++ b/lib/WebGUI/Operation/Style.pm @@ -45,7 +45,7 @@ sub www_addStyle { sub www_addStyleSave { my ($output); if (WebGUI::Privilege::isInGroup(3)) { - WebGUI::SQL->write("insert into style set styleId=".getNextId("styleId")." name=".quote($session{form}{name}).", header=".quote($session{form}{header}).", footer=".quote($session{form}{footer}).", styleSheet=".quote($session{form}{styleSheet}),$session{dbh}); + WebGUI::SQL->write("insert into style set styleId=".getNextId("styleId").", name=".quote($session{form}{name}).", header=".quote($session{form}{header}).", footer=".quote($session{form}{footer}).", styleSheet=".quote($session{form}{styleSheet}),$session{dbh}); $output = www_listStyles(); } else { $output = WebGUI::Privilege::insufficient(); diff --git a/lib/WebGUI/Operation/Submission.pm b/lib/WebGUI/Operation/Submission.pm new file mode 100644 index 000000000..6f78db0d4 --- /dev/null +++ b/lib/WebGUI/Operation/Submission.pm @@ -0,0 +1,86 @@ +package WebGUI::Operation::Submission; + +#------------------------------------------------------------------- +# WebGUI is Copyright 2001 Plain Black Software. +#------------------------------------------------------------------- +# Please read the legal notices (docs/legal.txt) and the license +# (docs/license.txt) that came with this distribution before using +# this software. +#------------------------------------------------------------------- +# http://www.plainblack.com info@plainblack.com +#------------------------------------------------------------------- + +use Exporter; +use strict; +use WebGUI::Privilege; +use WebGUI::Session; +use WebGUI::SQL; +use WebGUI::Utility; + +our @ISA = qw(Exporter); +our @EXPORT = qw(&www_viewPendingSubmissions &www_approveSubmission &www_denySubmission); + +#------------------------------------------------------------------- +sub www_approveSubmission { + if (WebGUI::Privilege::isInGroup(4,$session{user}{userId}) || WebGUI::Privilege::isInGroup(3,$session{user}{userId})) { + WebGUI::SQL->write("update submission set status='Approved' where submissionId=$session{form}{sid}",$session{dbh}); + return www_viewPendingSubmissions(); + } else { + return WebGUI::Privilege::insufficient(); + } +} + +#------------------------------------------------------------------- +sub www_denySubmission { + if (WebGUI::Privilege::isInGroup(4,$session{user}{userId}) || WebGUI::Privilege::isInGroup(3,$session{user}{userId})) { + WebGUI::SQL->write("update submission set status='Denied' where submissionId=$session{form}{sid}",$session{dbh} +); + return www_viewPendingSubmissions(); + } else { + return WebGUI::Privilege::insufficient(); + } +} + +#------------------------------------------------------------------- +sub www_viewPendingSubmissions { + my (@submission, $output, $sth, @row, $i, $pn); + if (WebGUI::Privilege::isInGroup(4,$session{user}{userId}) || WebGUI::Privilege::isInGroup(3,$session{user}{userId})) { + $output = '

Pending Sumissions

'; + $sth = WebGUI::SQL->read("select title,submissionId,date_format(dateSubmitted,'%c/%e %l:%i%p'),username,userId,widgetId from submission where status='Pending' order by dateSubmitted",$session{dbh}); + while (@submission = $sth->array) { + $row[$i] = ''.$submission[0].''.$submission[2].''.$submission[3].''; + $i++; + } + $sth->finish; + $output .= ''; + $output .= ''; + if ($session{form}{pn} < 1) { + $pn = 0; + } else { + $pn = $session{form}{pn}; + } + for ($i=(50*$pn); $i<(50*($pn+1));$i++) { + $output .= $row[$i]; + } + $output .= '
TitleDate SubmittedSubmitted By
'; + $output .= ''; + } else { + $output = WebGUI::Privilege::insufficient(); + } + return $output; +} + + +1; diff --git a/lib/WebGUI/Session.pm b/lib/WebGUI/Session.pm index 6033104e4..ee172aa7a 100644 --- a/lib/WebGUI/Session.pm +++ b/lib/WebGUI/Session.pm @@ -94,7 +94,7 @@ sub httpRedirect { #------------------------------------------------------------------- sub open { my ($key, %WebGUI, %CONFIG, %VARS, %PAGE, %FORM, $query, %COOKIES, $config, %USER, %SETTINGS, $dbh); - %WebGUI = (version=>"0.9.0", date=>"2001-08-13"); + %WebGUI = (version=>"0.10.0", date=>"2001-08-17"); $config = new WebGUI::Config '../etc/WebGUI.conf'; foreach ($config->param) { $CONFIG{$_} = $config->param($_); diff --git a/lib/WebGUI/Widget.pm b/lib/WebGUI/Widget.pm index 415ae4ff2..4f7913e89 100644 --- a/lib/WebGUI/Widget.pm +++ b/lib/WebGUI/Widget.pm @@ -37,13 +37,13 @@ sub create { my ($widgetId, $nextSeq); $widgetId = getNextId("widgetId"); ($nextSeq) = WebGUI::SQL->quickArray("select max(sequenceNumber)+1 from widget where pageId=$session{page}{pageId}",$session{dbh}); - WebGUI::SQL->write("insert into widget set widgetId=$widgetId, pageId=$session{page}{pageId}, widgetType='$session{form}{widget}', title=".quote($session{form}{title}).", displayTitle='$session{form}{displayTitle}', description=".quote($session{form}{description}).", sequenceNumber='$nextSeq'",$session{dbh}); + WebGUI::SQL->write("insert into widget set widgetId=$widgetId, pageId=$session{page}{pageId}, widgetType='$session{form}{widget}', processMacros='$session{form}{processMacros}', title=".quote($session{form}{title}).", displayTitle='$session{form}{displayTitle}', description=".quote($session{form}{description}).", dateAdded=now(), addedBy='$session{user}{userId}', sequenceNumber='$nextSeq'",$session{dbh}); return $widgetId; } #------------------------------------------------------------------- sub update { - WebGUI::SQL->write("update widget set title=".quote($session{form}{title}).", displayTitle='$session{form}{displayTitle}', description=".quote($session{form}{description}).", processMacros='$session{form}{processMacros}' where widgetId=$session{form}{wid}",$session{dbh}); + WebGUI::SQL->write("update widget set title=".quote($session{form}{title}).", displayTitle='$session{form}{displayTitle}', description=".quote($session{form}{description}).", processMacros='$session{form}{processMacros}', lastEdited=now(), editedBy='$session{user}{userId}' where widgetId=$session{form}{wid}",$session{dbh}); } #------------------------------------------------------------------- @@ -87,7 +87,7 @@ sub www_moveDown { my (@data, $thisSeq); if (WebGUI::Privilege::canEditPage()) { ($thisSeq) = WebGUI::SQL->quickArray("select sequenceNumber from widget where widgetId=$session{form}{wid}",$session{dbh}); - @data = WebGUI::SQL->quickArray("select widgetId, min(sequenceNumber) from widget where pageId=$session{page}{pageId} and sequenceNumber>$thisSeq group by pageId",$session{dbh}); + @data = WebGUI::SQL->quickArray("select widgetId from widget where pageId=$session{page}{pageId} and sequenceNumber=$thisSeq+1",$session{dbh}); if ($data[0] ne "") { WebGUI::SQL->write("update widget set sequenceNumber=sequenceNumber+1 where widgetId=$session{form}{wid}",$session{dbh}); WebGUI::SQL->write("update widget set sequenceNumber=sequenceNumber-1 where widgetId=$data[0]",$session{dbh}); @@ -103,7 +103,7 @@ sub www_moveUp { my (@data, $thisSeq); if (WebGUI::Privilege::canEditPage()) { ($thisSeq) = WebGUI::SQL->quickArray("select sequenceNumber from widget where widgetId=$session{form}{wid}",$session{dbh}); - @data = WebGUI::SQL->quickArray("select widgetId, max(sequenceNumber) from widget where pageId=$session{page}{pageId} and sequenceNumber<$thisSeq group by pageId",$session{dbh}); + @data = WebGUI::SQL->quickArray("select widgetId from widget where pageId=$session{page}{pageId} and sequenceNumber=$thisSeq-1",$session{dbh}); if ($data[0] ne "") { WebGUI::SQL->write("update widget set sequenceNumber=sequenceNumber-1 where widgetId=$session{form}{wid}",$session{dbh}); WebGUI::SQL->write("update widget set sequenceNumber=sequenceNumber+1 where widgetId=$data[0]",$session{dbh}); diff --git a/lib/WebGUI/Widget/Article.pm b/lib/WebGUI/Widget/Article.pm index 722cc8c9b..7576e5c77 100644 --- a/lib/WebGUI/Widget/Article.pm +++ b/lib/WebGUI/Widget/Article.pm @@ -156,7 +156,7 @@ sub www_view { $output .= '

'.$data{linkTitle}.''; } if ($data{attachment} ne "") { - $output .= '

[attachment: '.$data{attachment}.']'; + $output .= '

Download Attachment'; } } if ($data{processMacros} == 1) { diff --git a/lib/WebGUI/Widget/EventsCalendar.pm b/lib/WebGUI/Widget/EventsCalendar.pm index 1e814c561..19eedfdaf 100644 --- a/lib/WebGUI/Widget/EventsCalendar.pm +++ b/lib/WebGUI/Widget/EventsCalendar.pm @@ -198,10 +198,11 @@ sub www_view { } $output .= ", $event[4]"; $output .= "


"; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= '
'.$event[0].' - '.$event[1].'

'; + $output .= ''.$event[0].''; + if ($event[1] ne "") { + $output .= ' - '; + $output .= ''.$event[1].'

'; + } } $sth->finish; } diff --git a/lib/WebGUI/Widget/FAQ.pm b/lib/WebGUI/Widget/FAQ.pm index d8d896cb5..3d150f4a9 100644 --- a/lib/WebGUI/Widget/FAQ.pm +++ b/lib/WebGUI/Widget/FAQ.pm @@ -197,7 +197,7 @@ sub www_moveQuestionDown { my (@data, $thisSeq); if (WebGUI::Privilege::canEditPage()) { ($thisSeq) = WebGUI::SQL->quickArray("select sequenceNumber from faqQuestion where questionId=$session{form}{qid}",$session{dbh}); - @data = WebGUI::SQL->quickArray("select questionId, min(sequenceNumber) from faqQuestion where widgetId=$session{form}{wid} and sequenceNumber>$thisSeq group by widgetId",$session{dbh}); + @data = WebGUI::SQL->quickArray("select questionId from faqQuestion where widgetId=$session{form}{wid} and sequenceNumber=$thisSeq+1 group by widgetId",$session{dbh}); if ($data[0] ne "") { WebGUI::SQL->write("update faqQuestion set sequenceNumber=sequenceNumber+1 where questionId=$session{form}{qid}",$session{dbh}); WebGUI::SQL->write("update faqQuestion set sequenceNumber=sequenceNumber-1 where questionId=$data[0]",$session{dbh}); @@ -213,7 +213,7 @@ sub www_moveQuestionUp { my (@data, $thisSeq); if (WebGUI::Privilege::canEditPage()) { ($thisSeq) = WebGUI::SQL->quickArray("select sequenceNumber from faqQuestion where questionId=$session{form}{qid}",$session{dbh}); - @data = WebGUI::SQL->quickArray("select questionId, max(sequenceNumber) from faqQuestion where widgetId=$session{form}{wid} and sequenceNumber<$thisSeq group by widgetId",$session{dbh}); + @data = WebGUI::SQL->quickArray("select questionId from faqQuestion where widgetId=$session{form}{wid} and sequenceNumber=$thisSeq-1 group by widgetId",$session{dbh}); if ($data[0] ne "") { WebGUI::SQL->write("update faqQuestion set sequenceNumber=sequenceNumber-1 where questionId=$session{form}{qid}",$session{dbh}); WebGUI::SQL->write("update faqQuestion set sequenceNumber=sequenceNumber+1 where questionId=$data[0]",$session{dbh}); diff --git a/lib/WebGUI/Widget/LinkList.pm b/lib/WebGUI/Widget/LinkList.pm index da27f9d5c..08749c4c1 100644 --- a/lib/WebGUI/Widget/LinkList.pm +++ b/lib/WebGUI/Widget/LinkList.pm @@ -166,7 +166,7 @@ sub www_editLink { $output = '

Edit Link

'; $output .= WebGUI::Form::hidden("wid",$session{form}{wid}); $output .= WebGUI::Form::hidden("lid",$session{form}{lid}); - $output .= WebGUI::Form::hidden("func","editEventSave"); + $output .= WebGUI::Form::hidden("func","editLinkSave"); $output .= ''; $output .= ''; $output .= ''; @@ -195,7 +195,7 @@ sub www_moveLinkDown { my (@data, $thisSeq); if (WebGUI::Privilege::canEditPage()) { ($thisSeq) = WebGUI::SQL->quickArray("select sequenceNumber from link where linkId=$session{form}{lid}",$session{dbh}); - @data = WebGUI::SQL->quickArray("select linkId, min(sequenceNumber) from link where widgetId=$session{form}{wid} and sequenceNumber>$thisSeq group by widgetId",$session{dbh}); + @data = WebGUI::SQL->quickArray("select linkId from link where widgetId=$session{form}{wid} and sequenceNumber=$thisSeq+1 group by widgetId",$session{dbh}); if ($data[0] ne "") { WebGUI::SQL->write("update link set sequenceNumber=sequenceNumber+1 where linkId=$session{form}{lid}",$session{dbh}); WebGUI::SQL->write("update link set sequenceNumber=sequenceNumber-1 where linkId=$data[0]",$session{dbh}); @@ -211,7 +211,7 @@ sub www_moveLinkUp { my (@data, $thisSeq); if (WebGUI::Privilege::canEditPage()) { ($thisSeq) = WebGUI::SQL->quickArray("select sequenceNumber from link where linkId=$session{form}{lid}",$session{dbh}); - @data = WebGUI::SQL->quickArray("select linkId, max(sequenceNumber) from link where widgetId=$session{form}{wid} and sequenceNumber<$thisSeq group by widgetId",$session{dbh}); + @data = WebGUI::SQL->quickArray("select linkId from link where widgetId=$session{form}{wid} and sequenceNumber=$thisSeq-1 group by widgetId",$session{dbh}); if ($data[0] ne "") { WebGUI::SQL->write("update link set sequenceNumber=sequenceNumber-1 where linkId=$session{form}{lid}",$session{dbh}); WebGUI::SQL->write("update link set sequenceNumber=sequenceNumber+1 where linkId=$data[0]",$session{dbh}); diff --git a/lib/WebGUI/Widget/MessageBoard.pm b/lib/WebGUI/Widget/MessageBoard.pm index 55ae9523d..331149d24 100644 --- a/lib/WebGUI/Widget/MessageBoard.pm +++ b/lib/WebGUI/Widget/MessageBoard.pm @@ -36,7 +36,7 @@ sub _traverseReplyTree { if ($session{form}{mid} eq $data[0]) { $html .= ' class="highlight"'; } - $html .= '>'; + $html .= '>'; $html .= _traverseReplyTree($data[0],$_[1]+1); } $sth->finish; @@ -204,7 +204,7 @@ sub www_postNewMessageSave { $mid = getNextId("messageId"); WebGUI::SQL->write("insert into message set messageId=$mid, userId=$session{user}{userId}, username=".quote($session{user}{username}).", subject=".quote($session{form}{subject}).", message=".quote($session{form}{message}).", widgetId=$session{form}{wid}, pid=0, dateOfPost=now()",$session{dbh}); WebGUI::SQL->write("update message set rid=$mid where messageId=$mid",$session{dbh}); - return www_view($session{form}{wid}); + return ""; } else { return WebGUI::Privilege::insufficient(); } @@ -271,7 +271,7 @@ sub www_showMessage { $html .= 'Edit Message · '; } $html .= 'Post Reply
Name'.WebGUI::Form::text("name",20,30,$link{name}).'
URL'.WebGUI::Form::text("url",20,2048,$link{url}).'
'.$depth.''.$data[1].''.$data[2].''.$data[3].'
'.$depth.''.$data[1].''.$data[2].''.$data[3].'
'; - $html .= ''; %hash = WebGUI::SQL->buildHash("select groupId,groupName from groups where groupName<>'Reserved' order by groupName",$session{dbh}); $output .= ''; + $output .= ''; $output .= ''; $output .= ''; $output .= ''; @@ -103,7 +104,7 @@ sub www_addSave { if (WebGUI::Privilege::canEditPage()) { $widgetId = create(); @answer = split("\n",$session{form}{answers}); - WebGUI::SQL->write("insert into Poll set widgetId=$widgetId, active='$session{form}{active}', voteGroup='$session{form}{voteGroup}', question=".quote($session{form}{question}).", a1=".quote($answer[0]).", a2=".quote($answer[1]).", a3=".quote($answer[2]).", a4=".quote($answer[3]).", a5=".quote($answer[4]).", a6=".quote($answer[5]).", a7=".quote($answer[6]).", a8=".quote($answer[7]).", a9=".quote($answer[8]).", a10=".quote($answer[9]).", a11=".quote($answer[10]).", a12=".quote($answer[11]).", a13=".quote($answer[12]).", a14=".quote($answer[13]).", a15=".quote($answer[14]).", a16=".quote($answer[15]).", a17=".quote($answer[16]).", a18=".quote($answer[17]).", a19=".quote($answer[18]).", a20=".quote($answer[19])."",$session{dbh}); + WebGUI::SQL->write("insert into Poll set widgetId=$widgetId, active='$session{form}{active}', voteGroup='$session{form}{voteGroup}', graphWidth='$session{form}{graphWidth}', question=".quote($session{form}{question}).", a1=".quote($answer[0]).", a2=".quote($answer[1]).", a3=".quote($answer[2]).", a4=".quote($answer[3]).", a5=".quote($answer[4]).", a6=".quote($answer[5]).", a7=".quote($answer[6]).", a8=".quote($answer[7]).", a9=".quote($answer[8]).", a10=".quote($answer[9]).", a11=".quote($answer[10]).", a12=".quote($answer[11]).", a13=".quote($answer[12]).", a14=".quote($answer[13]).", a15=".quote($answer[14]).", a16=".quote($answer[15]).", a17=".quote($answer[16]).", a18=".quote($answer[17]).", a19=".quote($answer[18]).", a20=".quote($answer[19])."",$session{dbh}); return ""; } else { return WebGUI::Privilege::insufficient(); @@ -126,6 +127,7 @@ sub www_edit { %hash = WebGUI::SQL->buildHash("select groupId,groupName from groups where groupName<>'Reserved' order by groupName",$session{dbh}); $array[0] = $data{voteGroup}; $output .= ''; + $output .= ''; $output .= ''; $output .= ''; $output .= ''; @@ -142,7 +144,7 @@ sub www_editSave { if (WebGUI::Privilege::canEditPage()) { update(); @answer = split("\n",$session{form}{answers}); - WebGUI::SQL->write("update Poll set active='$session{form}{active}', voteGroup='$session{form}{voteGroup}', question=".quote($session{form}{question}).", a1=".quote($answer[0]).", a2=".quote($answer[1]).", a3=".quote($answer[2]).", a4=".quote($answer[3]).", a5=".quote($answer[4]).", a6=".quote($answer[5]).", a7=".quote($answer[6]).", a8=".quote($answer[7]).", a9=".quote($answer[8]).", a10=".quote($answer[9]).", a11=".quote($answer[10]).", a12=".quote($answer[11]).", a13=".quote($answer[12]).", a14=".quote($answer[13]).", a15=".quote($answer[14]).", a16=".quote($answer[15]).", a17=".quote($answer[16]).", a18=".quote($answer[17]).", a19=".quote($answer[18]).", a20=".quote($answer[19])." where widgetId=$session{form}{wid}",$session{dbh}); + WebGUI::SQL->write("update Poll set active='$session{form}{active}', voteGroup='$session{form}{voteGroup}', graphWidth=$session{form}{graphWidth}, question=".quote($session{form}{question}).", a1=".quote($answer[0]).", a2=".quote($answer[1]).", a3=".quote($answer[2]).", a4=".quote($answer[3]).", a5=".quote($answer[4]).", a6=".quote($answer[5]).", a7=".quote($answer[6]).", a8=".quote($answer[7]).", a9=".quote($answer[8]).", a10=".quote($answer[9]).", a11=".quote($answer[10]).", a12=".quote($answer[11]).", a13=".quote($answer[12]).", a14=".quote($answer[13]).", a15=".quote($answer[14]).", a16=".quote($answer[15]).", a17=".quote($answer[16]).", a18=".quote($answer[17]).", a19=".quote($answer[18]).", a20=".quote($answer[19])." where widgetId=$session{form}{wid}",$session{dbh}); return ""; } else { return WebGUI::Privilege::insufficient(); @@ -171,7 +173,7 @@ sub www_view { #------------------------------------------------------------------- sub www_vote { WebGUI::SQL->write("insert into pollAnswer set widgetId=$session{form}{wid}, userId=$session{user}{userId}, answer='$session{form}{answer}'",$session{dbh}); - return _viewResults($session{form}{wid}); + return ""; } diff --git a/lib/WebGUI/Widget/SQLReport.pm b/lib/WebGUI/Widget/SQLReport.pm index 9964f2cc7..4876371e9 100644 --- a/lib/WebGUI/Widget/SQLReport.pm +++ b/lib/WebGUI/Widget/SQLReport.pm @@ -27,7 +27,7 @@ sub widgetName { sub www_add { my ($output); if (WebGUI::Privilege::canEditPage()) { - $output = '

Add SQL Report

'; + $output = '

Add SQL Report

'; $output .= WebGUI::Form::hidden("widget","SQLReport"); $output .= WebGUI::Form::hidden("func","addSave"); $output .= '
'; + $html .= '
'; $html .= "Subject: ".$message{subject}."
"; $html .= "Author: ".$message{username}."
"; $html .= "Date: ".$message{dateOfPost}."
"; @@ -295,13 +295,13 @@ sub www_showMessage { $html .= 'Next Thread »'; } $html .= ''; - $html .= ''; + $html .= ''; @data = WebGUI::SQL->quickArray("select messageId,substring(subject,1,30),username,date_format(dateOfPost,'%c/%e %l:%i%p') from message where messageId=$message{rid}",$session{dbh}); $html .= ''.$data[1].''; + $html .= '>'; $html .= _traverseReplyTree($message{rid},1); $html .= "
SubjectAuthorDate
SubjectAuthorDate
'.$data[2].''.$data[3].'
'.$data[1].''.$data[2].''.$data[3].'
"; return $html; @@ -327,10 +327,10 @@ sub www_view { } $html .= '
Post New Message
'; $html .= ''; - $html .= ''; + $html .= ''; $sth = WebGUI::SQL->read("select messageId,substring(subject,1,30),count(messageId)-1,username,date_format(dateOfPost,'%c/%e %l:%i%p'),date_format(max(dateOfPost),'%c/%e %l:%i%p'),max(messageId) from message where widgetId=$_[0] group by rid order by messageId desc limit ".(($currentPage*$itemsPerPage)-$itemsPerPage).",".$itemsPerPage, $session{dbh}); while (@data = $sth->array) { - $html .= ''; + $html .= ''; } $html .= "
SubjectAuthorThread StartedRepliesLast Reply
SubjectAuthorThread StartedRepliesLast Reply
'.$data[1].''.$data[3].''.$data[4].''.$data[2].''.$data[5].'
'.$data[1].''.$data[3].''.$data[4].''.$data[2].''.$data[5].'
"; $sth->finish; diff --git a/lib/WebGUI/Widget/Poll.pm b/lib/WebGUI/Widget/Poll.pm index f033e07fc..7589e0376 100644 --- a/lib/WebGUI/Widget/Poll.pm +++ b/lib/WebGUI/Widget/Poll.pm @@ -31,7 +31,7 @@ sub _viewPoll { $output .= WebGUI::Form::hidden('func','vote'); $output .= ''.$poll{question}.'
'; for ($i=1; $i<=20; $i++) { - if ($poll{'a'.$i} ne "") { + if ($poll{'a'.$i} =~ /\w/) { $output .= WebGUI::Form::radio("answer",'a'.$i).' '.$poll{'a'.$i}.'
'; } } @@ -57,10 +57,10 @@ sub _viewResults { $totalResponses = 1; } for ($i=1; $i<=20; $i++) { - if ($poll{'a'.$i} ne "") { + if ($poll{'a'.$i} =~ /\w/) { $output .= '
'.$poll{'a'.$i}.'
'; - @data = WebGUI::SQL->quickArray("select count(*), answer from pollAnswer where answer='a$i' group by answer",$session{dbh}); - $output .= '
  '.round(100*$data[0]/$totalResponses).'%
'; + @data = WebGUI::SQL->quickArray("select count(*), answer from pollAnswer where answer='a$i' and widgetId=$widgetId group by answer",$session{dbh}); + $output .= '
  '.round(100*$data[0]/$totalResponses).'%
'; } } } @@ -86,6 +86,7 @@ sub www_add { $output .= '
Active'.WebGUI::Form::checkbox("active",1,1).'
Who can vote?'.WebGUI::Form::selectList("voteGroup",\%hash,).'
Graph Width'.WebGUI::Form::text("graphWidth",20,3).'
Question'.WebGUI::Form::text("question",50,255).'
Answers
(Enter one answer per line. No more than 20.)
'.WebGUI::Form::textArea("answers",'',50,8,0,'on').'
'.WebGUI::Form::submit("save").'
Who can vote?'.WebGUI::Form::selectList("voteGroup",\%hash,\@array).'
Graph Width'.WebGUI::Form::text("graphWidth",20,3,$data{graphWidth}).'
Question'.WebGUI::Form::text("question",50,255,$data{question}).'
Answers
(Enter one answer per line. No more than 20.)
'.WebGUI::Form::textArea("answers",$data{a1}."\n".$data{a2}."\n".$data{a3}."\n".$data{a4}."\n".$data{a5}."\n".$data{a6}."\n".$data{a7}."\n".$data{a8}."\n".$data{a9}."\n".$data{a10}."\n".$data{a11}."\n".$data{a12}."\n".$data{a13}."\n".$data{a14}."\n".$data{a15}."\n".$data{a16}."\n".$data{a17}."\n".$data{a18}."\n".$data{a19}."\n".$data{a20}."\n",50,8,0,'on').'
'.WebGUI::Form::submit("save").'
'; diff --git a/lib/WebGUI/Widget/SiteMap.pm b/lib/WebGUI/Widget/SiteMap.pm index 1c648c699..39eb2acee 100644 --- a/lib/WebGUI/Widget/SiteMap.pm +++ b/lib/WebGUI/Widget/SiteMap.pm @@ -23,7 +23,7 @@ sub _traversePageTree { for ($i=0;$i<=$_[1];$i++) { $depth .= "  "; } - $sth = WebGUI::SQL->read("select urlizedTitle, title, pageId from page where parentId='$_[0]'",$session{dbh}); + $sth = WebGUI::SQL->read("select urlizedTitle, title, pageId from page where parentId='$_[0]' order by sequenceNumber",$session{dbh}); while (@data = $sth->array) { if (WebGUI::Privilege::canViewPage($data[2])) { $output .= $depth.'· '.$data[1].'
'; @@ -51,7 +51,7 @@ sub www_add { $output .= ''; $output .= ''; $output .= ''; - $output .= ''; + $output .= ''; $output .= ''; $output .= '
Disply title?'.WebGUI::Form::checkbox("displayTitle",1).'
Description'.WebGUI::Form::textArea("description",'').'
Starting from this level?'.WebGUI::Form::checkbox("startAtThisLevel",1,1).'
Show only this level?'.WebGUI::Form::checkbox("showOnlyThisLevel",1,1).'
Show only one level?'.WebGUI::Form::checkbox("showOnlyThisLevel",1,1).'
'.WebGUI::Form::submit("save").'
'; return $output; @@ -86,7 +86,7 @@ sub www_edit { $output .= 'Disply title?'.WebGUI::Form::checkbox("displayTitle",1,$data{displayTitle}).''; $output .= 'Description'.WebGUI::Form::textArea("description",$data{description}).''; $output .= 'Starting from this level?'.WebGUI::Form::checkbox("startAtThisLevel",1,$data{startAtThisLevel}).''; - $output .= 'Show only this level?uuuu'.WebGUI::Form::checkbox("showOnlyThisLevel",1,$data{showOnlyThisLevel}).''; + $output .= 'Show only one level?uuuu'.WebGUI::Form::checkbox("showOnlyThisLevel",1,$data{showOnlyThisLevel}).''; $output .= ''.WebGUI::Form::submit("save").''; $output .= ''; return $output; @@ -120,7 +120,7 @@ sub www_view { } else { $parent = 1; } - $sth = WebGUI::SQL->read("select urlizedTitle, title, pageId from page where parentId='$parent'",$session{dbh}); + $sth = WebGUI::SQL->read("select urlizedTitle, title, pageId from page where parentId='$parent' order by sequenceNumber",$session{dbh}); while (@root = $sth->array) { if (WebGUI::Privilege::canViewPage($root[2])) { $output .= '· '.$root[1].'
'; diff --git a/lib/WebGUI/Widget/UserSubmission.pm b/lib/WebGUI/Widget/UserSubmission.pm new file mode 100644 index 000000000..d782f258f --- /dev/null +++ b/lib/WebGUI/Widget/UserSubmission.pm @@ -0,0 +1,331 @@ +package WebGUI::Widget::UserSubmission; + +#------------------------------------------------------------------- +# WebGUI is Copyright 2001 Plain Black Software. +#------------------------------------------------------------------- +# Please read the legal notices (docs/legal.txt) and the license +# (docs/license.txt) that came with this distribution before using +# this software. +#------------------------------------------------------------------- +# http://www.plainblack.com info@plainblack.com +#------------------------------------------------------------------- + +use strict; +use WebGUI::Privilege; +use WebGUI::Session; +use WebGUI::SQL; +use WebGUI::Utility; +use WebGUI::Widget; + +#------------------------------------------------------------------- +sub widgetName { + return "User Submission System"; +} + +#------------------------------------------------------------------- +sub www_add { + my ($output, %hash); + tie %hash, "Tie::IxHash"; + if (WebGUI::Privilege::canEditPage()) { + $output = '

Add User Submission System

'; + $output .= WebGUI::Form::hidden("widget","UserSubmission"); + $output .= WebGUI::Form::hidden("func","addSave"); + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + %hash = WebGUI::SQL->buildHash("select groupId,groupName from groups where groupName<>'Reserved' order by groupName",$session{dbh}); + $output .= ''; + $output .= ''; + %hash = ("Approved"=>"Approved","Denied"=>"Denied","Pending"=>"Pending"); + $output .= ''; + $output .= ''; + $output .= '
Title'.WebGUI::Form::text("title",20,30).'
Display the title?'.WebGUI::Form::checkbox("displayTitle","1").'
Description'.WebGUI::Form::textArea("description",'',50,5,1).'
Who can contribute?'.WebGUI::Form::selectList("groupToContribute",\%hash,'',1).'
Submissions Per Page'.WebGUI::Form::text("submissionsPerPage",20,2,50).'
Default Status'.WebGUI::Form::selectList("defaultStatus",\%hash,'',1).'
'.WebGUI::Form::submit("save").'
'; + return $output; + } else { + return WebGUI::Privilege::insufficient(); + } + return $output; +} + +#------------------------------------------------------------------- +sub www_addSave { + my ($widgetId); + if (WebGUI::Privilege::canEditPage()) { + $widgetId = create(); + WebGUI::SQL->write("insert into UserSubmission set widgetId=$widgetId, groupToContribute=$session{form}{groupToContribute}, submissionsPerPage=$session{form}{submissionsPerPage}, defaultStatus='$session{form}{defaultStatus}'",$session{dbh}); + return ""; + } else { + return WebGUI::Privilege::insufficient(); + } +} + +#------------------------------------------------------------------- +sub www_addSubmission { + my ($output, $groupToContribute, @submission, $sth); + ($groupToContribute) = WebGUI::SQL->quickArray("select groupToContribute from UserSubmission where widgetId=$session{form}{wid}",$session{dbh}); + if (WebGUI::Privilege::isInGroup($groupToContribute,$session{user}{userId})) { + $output = '

Add Submission

'; + $output .= WebGUI::Form::hidden("wid",$session{form}{wid}); + $output .= WebGUI::Form::hidden("func","addSubmissionSave"); + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= '
Title'.WebGUI::Form::text("title",20,30).'
Content'.WebGUI::Form::textArea("content",'',50,10,1).'
Image'.WebGUI::Form::file("image").'
Attachment'.WebGUI::Form::file("attachment").'
'.WebGUI::Form::submit("save").'
'; + $output .= ''; + $output .= ''; + $sth = WebGUI::SQL->read("select title,submissionId,date_format(dateSubmitted,'%c/%e %l:%i%p'),status from submission where widgetId='$session{form}{wid}' and userId=$session{user}{userId} order by dateSubmitted desc",$session{dbh}); + while (@submission = $sth->array) { + $output .= ''; + } + $sth->finish; + $output .= '
Edit/DeleteTitleDate SubmittedStatus
'.$submission[0].''.$submission[2].''.$submission[3].'
'; + } else { + $output = WebGUI::Privilege::insufficient(); + } + return $output; +} + +#------------------------------------------------------------------- +sub www_addSubmissionSave { + my ($submissionId, $image, $attachment, $status, $groupToContribute); + ($status, $groupToContribute) = WebGUI::SQL->quickArray("select defaultStatus,groupToContribute from UserSubmission where widgetId=$session{form}{wid}",$session{dbh}); + if (WebGUI::Privilege::isInGroup($groupToContribute,$session{user}{userId})) { + $submissionId = getNextId("submissionId"); + $image = saveAttachment("image",$session{form}{wid}); + $attachment = saveAttachment("attachment",$session{form}{wid}); + WebGUI::SQL->write("insert into submission set widgetId=$session{form}{wid}, submissionId=$submissionId, title=".quote($session{form}{title}).", username=".quote($session{user}{username}).", status='$status', dateSubmitted=now(), userId='$session{user}{userId}', content=".quote($session{form}{content}).", image=".quote($image).", attachment=".quote($attachment),$session{dbh}); + return ""; + } else { + return WebGUI::Privilege::insufficient(); + } +} + +#------------------------------------------------------------------- +sub www_deleteAttachment { + my ($owner); + ($owner) = WebGUI::SQL->quickArray("select userId from submission where submissionId=$session{form}{sid}",$session{dbh}); + if ($owner == $session{user}{userId}) { + WebGUI::SQL->write("update submission set attachment='' where widgetId=$session{form}{wid}",$session{dbh}); + return www_editSubmission(); + } else { + return WebGUI::Privilege::insufficient(); + } +} + +#------------------------------------------------------------------- +sub www_deleteImage { + my ($owner); + ($owner) = WebGUI::SQL->quickArray("select userId from submission where submissionId=$session{form}{sid}",$session{dbh}); + if ($owner == $session{user}{userId}) { + WebGUI::SQL->write("update submission set image='' where widgetId=$session{form}{wid}",$session{dbh}); + return www_editSubmission(); + } else { + return WebGUI::Privilege::insufficient(); + } +} + +#------------------------------------------------------------------- +sub www_deleteSubmission { + my ($output, $owner); + ($owner) = WebGUI::SQL->quickArray("select userId from submission where submissionId=$session{form}{sid}",$session{dbh}); + if ($owner == $session{user}{userId}) { + $output = '

Please Confirm

'; + $output .= 'Are you certain that you want to delete this submission?

'; + return $output; + } else { + return WebGUI::Privilege::insufficient(); + } +} + +#------------------------------------------------------------------- +sub www_deleteSubmissionConfirm { + my ($output, $owner); + ($owner) = WebGUI::SQL->quickArray("select userId from submission where submissionId=$session{form}{sid}",$session{dbh}); + if ($owner == $session{user}{userId}) { + WebGUI::SQL->write("delete from submission where submissionId=$session{form}{sid}",$session{dbh}); + return www_addSubmission(); + } else { + return WebGUI::Privilege::insufficient(); + } +} + +#------------------------------------------------------------------- +sub www_edit { + my ($output, %data, @array, $sth, %hash); + if (WebGUI::Privilege::canEditPage()) { + %data = WebGUI::SQL->quickHash("select * from widget,UserSubmission where widget.widgetId=$session{form}{wid} and widget.widgetId=UserSubmission.widgetId",$session{dbh}); + $output = '

Edit User Submission System

'; + $output .= WebGUI::Form::hidden("wid",$session{form}{wid}); + $output .= WebGUI::Form::hidden("func","editSave"); + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $array[0] = $data{groupToContribute}; + %hash = WebGUI::SQL->buildHash("select groupId,groupName from groups where groupName<>'Reserved' order by groupName",$session{dbh}); + $output .= ''; + $output .= ''; + %hash = ("Approved"=>"Approved","Denied"=>"Denied","Pending"=>"Pending"); + $array[0] = $data{defaultStatus}; + $output .= ''; + $output .= ''; + $output .= '
Title'.WebGUI::Form::text("title",20,30,$data{title}).'
Display the title?'.WebGUI::Form::checkbox("displayTitle","1",$data{displayTitle}).'
Description'.WebGUI::Form::textArea("description",$data{description}).'
Who can contribute?'.WebGUI::Form::selectList("groupToContribute",\%hash,\@array,1).'
Submissions Per Page'.WebGUI::Form::text("submissionsPerPage",20,2,$data{submissionsPerPage}).'
Default Status'.WebGUI::Form::selectList("defaultStatus",\%hash,\@array,1).'
'.WebGUI::Form::submit("save").'
'; + return $output; + } else { + return WebGUI::Privilege::insufficient(); + } +} + +#------------------------------------------------------------------- +sub www_editSave { + if (WebGUI::Privilege::canEditPage()) { + update(); + WebGUI::SQL->write("update UserSubmission set groupToContribute=$session{form}{groupToContribute}, submissionsPerPage=$session{form}{submissionsPerPage}, defaultStatus='$session{form}{defaultStatus}' where widgetId=$session{form}{wid}",$session{dbh}); + return ""; + } else { + return WebGUI::Privilege::insufficient(); + } +} + +#------------------------------------------------------------------- +sub www_editSubmission { + my ($output, %submission, $owner); + ($owner) = WebGUI::SQL->quickArray("select userId from submission where submissionId=$session{form}{sid}",$session{dbh}); + if ($owner == $session{user}{userId}) { + %submission = WebGUI::SQL->quickHash("select * from submission where submissionId='$session{form}{sid}'",$session{dbh}); + $output = '

Edit Submission

'; + $output .= WebGUI::Form::hidden("wid",$session{form}{wid}); + $output .= WebGUI::Form::hidden("sid",$session{form}{sid}); + $output .= WebGUI::Form::hidden("func","editSubmissionSave"); + $output .= ''; + $output .= ''; + $output .= ''; + if ($submission{image} ne "") { + $output .= ''; + } else { + $output .= ''; + } + if ($submission{attachment} ne "") { + $output .= ''; + } else { + $output .= ''; + } + $output .= ''; + $output .= '
Title'.WebGUI::Form::text("title",20,30,$submission{title}).'
Content'.WebGUI::Form::textArea("content",$submission{content},50,10).'
ImageDelete Image
Image'.WebGUI::Form::file("image").'
AttachmentDelete Attachment
Attachment'.WebGUI::Form::file("attachment").'
'.WebGUI::Form::submit("save").'
'; + return $output; + } else { + return WebGUI::Privilege::insufficient(); + } + return $output; +} + +#------------------------------------------------------------------- +sub www_editSubmissionSave { + my ($owner,$status,$image,$attachment); + ($owner) = WebGUI::SQL->quickArray("select userId from submission where submissionId=$session{form}{sid}",$session{dbh}); + if ($owner == $session{user}{userId}) { + ($status) = WebGUI::SQL->quickArray("select defaultStatus from UserSubmission where widgetId=$session{form}{wid}",$session{dbh}); + $image = saveAttachment("image",$session{form}{wid}); + if ($image ne "") { + $image = 'image='.quote($image).', '; + } + $attachment = saveAttachment("attachment",$session{form}{wid}); + if ($attachment ne "") { + $attachment = 'attachment='.quote($attachment).', '; + } + WebGUI::SQL->write("update submission set title=".quote($session{form}{title}).", content=".quote($session{form}{content}).", ".$image.$attachment." status='$status' where submissionId=$session{form}{sid}",$session{dbh}); + return www_viewSubmission(); + } else { + return WebGUI::Privilege::insufficient(); + } +} + +#------------------------------------------------------------------- +sub www_view { + my (%data, @submission, $output, $widgetId, $sth, @row, $i, $pn); + $widgetId = shift; + %data = WebGUI::SQL->quickHash("select * from widget,UserSubmission where widget.widgetId=$widgetId and widget.widgetId=UserSubmission.widgetId",$session{dbh}); + if (%data) { + if ($data{displayTitle} == 1) { + $output = "

".$data{title}."

"; + } + if ($data{description} ne "") { + $output .= $data{description}.'

'; + } + $sth = WebGUI::SQL->read("select title,submissionId,date_format(dateSubmitted,'%c/%e %l:%i%p'),username,userId from submission where widgetId='$widgetId' and status='Approved' order by dateSubmitted desc",$session{dbh}); + while (@submission = $sth->array) { + $row[$i] = ''.$submission[0].''.$submission[2].''.$submission[3].''; + $i++; + } + $sth->finish; + $output .= '
Post New Submission
'; + $output .= ''; + $output .= ''; + if ($session{form}{pn} < 1) { + $pn = 0; + } else { + $pn = $session{form}{pn}; + } + for ($i=($data{submissionsPerPage}*$pn); $i<($data{submissionsPerPage}*($pn+1));$i++) { + $output .= $row[$i]; + } + $output .= '
TitleDate SubmittedSubmitted By
'; + $output .= '

'; + } + return $output; +} + +#------------------------------------------------------------------- +sub www_viewSubmission { + my ($output, %submission); + %submission = WebGUI::SQL->quickHash("select * from submission where submissionId=$session{form}{sid}",$session{dbh}); + $output = "

".$submission{title}."

"; + $output .= 'Submitted By: '.$submission{username}.'
'; + $output .= 'Date Submitted: '.$submission{dateSubmitted}.'

'; + if ($submission{image} ne "") { + $output .= ''; + } + if ($submission{status} eq "Pending" && (WebGUI::Privilege::isInGroup(3,$session{user}{userId}) || WebGUI::Privilege::isInGroup(4,$session{user}{userId}))) { + $output .= '

'; + $output .= 'Approve · '; + $output .= 'Leave Pending · '; + $output .= 'Deny '; + $output .= '
'; + } + $output .= $submission{content}.'

'; + if ($submission{attachment} ne "") { + $output .= '

Download Attachment

'; + } + $output .= '

'; + if ($submission{userId} == $session{user}{userId}) { + $output .= 'Delete · '; + $output .= 'Edit · '; + } + $output .= 'Return To Submissions List'; + $output .= '
'; + return $output; +} + + + + + + +1; + diff --git a/www/index.pl b/www/index.pl index 5ee39bfbc..d306543c3 100755 --- a/www/index.pl +++ b/www/index.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -I../lib/ +#!/usr/bin/perl #------------------------------------------------------------------- # WebGUI is Copyright 2001 Plain Black Software. @@ -10,6 +10,10 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- +BEGIN { + unshift (@INC, "../lib/"); +} + use CGI::Carp qw(fatalsToBrowser); use strict; use WebGUI;