WebGUI 1.0.0 release

This commit is contained in:
JT Smith 2001-09-07 02:35:00 +00:00
parent 597b9ff2b0
commit 655ba6d283
40 changed files with 606 additions and 267 deletions

View file

@ -454,7 +454,6 @@ CREATE 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);
@ -1186,6 +1185,7 @@ CREATE TABLE submission (
image varchar(255) default NULL,
attachment varchar(255) default NULL,
status varchar(30) default NULL,
convertCarriageReturns int(11) NOT NULL default '0',
PRIMARY KEY (submissionId)
) TYPE=MyISAM;

View file

@ -2,11 +2,34 @@ WebGUI is Copyright 2001 Plain Black Software. All rights reserved.
WebGUI is a trademark of Plain Black Software.
WebGUI may be distributed under the GNU General Public license. A copy of that license is distributed with this code in a file called "license.txt". If you are unable to retrieve that license for any reason, you may find a copy of it here: http://www.opensource.org/licenses/gpl-license.html
WebGUI is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
For more information about Plain Black Software or WebGUI, please visit http://www.plainblack.com or email info@plainblack.com.
WebGUI is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details. However, support may be
purchased from Plain Black Software at
http://www.plainblack.com/index.pl/support_programs
It is illegal to remove or tamper with the notices at the top of each file, or this file, or the license file. The notice at the top of each file looks like the following:
You should have received a copy of the GNU General Public License
along with this program in a file called "license.txt". If not you can
download it at http://www.opensource.org/licenses/gpl-license.html or
write to:
Free Software Foundation, Inc.
59 Temple Place, Suite 330
Boston, MA 02111-1307
USA
For more information about Plain Black Software or WebGUI, please visit
http://www.plainblack.com or email info@plainblack.com.
It is illegal to remove or tamper with the notices at the top of each
file, or this file, or the license file. The notice at the top of each
file looks like the following:
#-------------------------------------------------------------------
# WebGUI is Copyright 2001 Plain Black Software.

View file

@ -106,6 +106,7 @@ CREATE TABLE SQLReport (
DSN varchar(255) default NULL,
username varchar(255) default NULL,
identifier varchar(255) default NULL,
convertCarriageReturns int(11) NOT NULL default '0',
PRIMARY KEY (widgetId)
) TYPE=MyISAM;
@ -330,20 +331,34 @@ INSERT INTO help VALUES (14,'US English','Delete','Widget','This function perman
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 <i>Using Macros</i> for more information.\r\n\r\n<b>Style Name</b>\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\n<b>Header</b>\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, <a href=\"http://www.plainblack.com\">Plain Black Software</a> 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\n<b>Footer</b>\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\n<b>Style Sheet</b>\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 <i>Using Style Sheets</i> for more information.\r\n\r\n<i>Advanced Users:</i> 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&lt;link href=\"/webgui.css\" rel=\"stylesheet\" rev=\"stylesheet\" type=\"text/css\"&gt;','18,19');
INSERT INTO help VALUES (17,'US English','Add','Group','See <i>Manage Group</i> for a description of grouping functions and the default groups.\r\n\r\n<b>Group Name</b>\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\n<b>Description</b>\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 (22,'US English','Edit','SQL Report','<b>Title</b>\r\nSee <i>Add SQL Report</i> for details.\r\n\r\n<b>Display Title?</b>\r\nSee <i>Add SQL Report</i> for details.\r\n\r\n<b>Process Macros</b>\r\nSee <i>Add SQL Report</i> for details.\r\n\r\n<b>Description</b>\r\nSee <i>Add SQL Report</i> for details.\r\n\r\n<b>Template</b>\r\nSee <i>Add SQL Report</i> for details.\r\n\r\n<b>Query</b>\r\nSee <i>Add SQL Report</i> for details.\r\n\r\n<b>DSN</b>\r\nSee <i>Add SQL Report</i> for details.\r\n\r\n<b>Database User</b>\r\nSee <i>Add SQL Report</i> for details.\r\n\r\n<b>Database Password</b>\r\nSee <i>Add SQL Report</i> for details.\r\n','19,14,21');
INSERT INTO help VALUES (22,'US English','Edit','SQL Report','<b>Title</b>\r\nSee <i>Add SQL Report</i> for details.\r\n\r\n<b>Display Title?</b>\r\nSee <i>Add SQL Report</i> for details.\r\n\r\n<b>Process Macros</b>\r\nSee <i>Add SQL Report</i> for details.\r\n\r\n<b>Description</b>\r\nSee <i>Add SQL Report</i> for details.\r\n\r\n<b>Template</b>\r\nSee <i>Add SQL Report</i> for details.\r\n\r\n<b>Query</b>\r\nSee <i>Add SQL Report</i> for details.\r\n\r\n<b>DSN</b>\r\nSee <i>Add SQL Report</i> for details.\r\n\r\n<b>Database User</b>\r\nSee <i>Add SQL Report</i> for details.\r\n\r\n<b>Database Password</b>\r\nSee <i>Add SQL Report</i> for details.\r\n\r\n<b>Convert carriage returns?</b>\r\nSee <i>Add SQL Report</i> for details.\r\n\r\n','19,14,21');
INSERT INTO help VALUES (18,'US English','Using','Style Sheets','<a href=\"http://www.w3.org/Style/CSS/\">Cascading Style Sheets (CSS)</a> 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, <a href=\"http://www.plainblack.com\">Plain Black Software</a> provides training classes on XHTML and CSS. Alternatively, Bradsoft makes an excellent CSS editor called <a href=\"http://www.bradsoft.com/topstyle/index.asp\">Top Style</a>.\r\n\r\nThe following is a list of classes used to control the look of WebGUI:\r\n\r\n<b>A</b>\r\nThe links throughout the style.\r\n\r\n<b>BODY</b>\r\nThe default setup of all pages within a style.\r\n\r\n<b>H1</b>\r\nThe headers on every page.\r\n\r\n<b>.accountOptions</b>\r\nThe links that appear under the login and account update forms.\r\n\r\n<b>.adminBar </b>\r\nThe bar that appears at the top of the page when you\'re in admin mode.\r\n\r\n<b>.boardMenu </b>\r\nThe menu on the message boards.\r\n\r\n<b>.boardMessage </b>\r\nThe full message text.\r\n\r\n<b>.boardTitle </b>\r\nThe title of the message board.\r\n\r\n<b>.content</b>\r\nThe main content area on all pages of the style.\r\n\r\n<b>.crumbTrail </b>\r\nThe crumb trail (if you\'re using that macro).\r\n\r\n<b>.eventTitle </b>\r\nThe title of an individual event.\r\n\r\n<b>.faqQuestion</b>\r\nAn F.A.Q. question. To distinguish it from an answer.\r\n\r\n<b>.formDescription </b>\r\nThe tags on all forms next to the form elements. \r\n\r\n<b>.formSubtext </b>\r\nThe tags below some form elements.\r\n\r\n<b>.highlight </b>\r\nDenotes a highlighted item, such as which message you are viewing within a list.\r\n\r\n<b>.horizontalMenu </b>\r\nThe horizontal menu (if you use a horizontal menu macro).\r\n\r\n<b>.loginBox</b>\r\nThe login box macro.\r\n\r\n<b>.pagination </b>\r\nThe Previous and Next links on pages with pagination.\r\n\r\n<b>.pollAnswer </b>\r\nAn answer on a poll.\r\n\r\n<b>.pollColor </b>\r\nThe color of the percentage bar on a poll.\r\n\r\n<b>.pollQuestion </b>\r\nThe question on a poll.\r\n\r\n<b>.tableData </b>\r\nThe data rows on things like message boards and user contributions.\r\n\r\n<b>.tableHeader </b>\r\nThe headings of columns on things like message boards and user contributions.\r\n\r\n<b>.verticalMenu </b>\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<b>^^ - Carrot</b>\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<b>^/ - System URL</b>\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<b>^@ - Username</b>\r\nThe username of the currently logged in user.\r\n\r\n<b>^# - User ID</b>\r\nThe user id of the currently logged in user.\r\n\r\n<b>^* - Random Number</b>\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<b>^a - My Account Link</b>\r\nA link to your account information.\r\n\r\n<b>^C - Crumb Trail</b>\r\nA dynamically generated crumb trail to the current page.\r\n\r\n<b>^D - Date</b>\r\nThe current date and time.\r\n\r\n<b>^f - Full Menu (Vertical)</b>\r\nDisplays a complete menu listing for all pages on the site, sort of like a site map.\r\n\r\n<b>^F - 2 Level Menu (Vertical)</b>\r\nDisplays the first two levels of the menuing hierarchy at all times.\r\n\r\n<b>^h - 3 Level Menu (Vertical)</b>\r\nDisplays the first three levels of the menuing hierarchy at all times.\r\n\r\n<b>^H - Home Link</b>\r\nA link to the home page of this site.\r\n\r\n<b>^L - Login</b>\r\nA small login form.\r\n\r\n<b>^M - Current Menu (Vertical)</b>\r\nA vertical menu containing the sub-pages at the current level.\r\n\r\n<b>^m - Current Menu (Horizontal)</b>\r\nA horizontal menu containing the sub-pages at the current level.\r\n\r\n<b>^T - Top Level Menu (Vertical)</b>\r\nA vertical menu containing the main pages of the site (aka the sub-pages from the home page).\r\n\r\n<b>^t - Top Level Menu (Horizontal)</b>\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\n<b>Title</b>\r\nThe title of this report.\r\n\r\n<b>Display Title?</b>\r\nDo you wish to display the title of the report? If so, check the box.\r\n\r\n<b>Process Macros</b>\r\nDo you wish to process WebGUI Macros on this report? If so, check the box.\r\n\r\n<b>Description</b>\r\nDescribe the content of this report so your users will better understand what the report is all about.\r\n\r\n<b>Template</b>\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\n<i>Sample Template:</i>\r\n&lt;table&gt;\r\n&lt;tr&gt;&lt;th&gt;Employee Name&lt;/th&gt;&lt;th&gt;Employee #&lt;/th&gt;&lt;th&gt;Vacation Days Remaining&lt;/th&gt;&lt;th&gt;Monthly Salary&lt;/th&gt;&lt;/tr&gt;\r\n^-\r\n&lt;tr&gt;&lt;td&gt;^0&lt;/td&gt;&lt;td&gt;^1&lt;/td&gt;&lt;td&gt;^2&lt;/td&gt;&lt;td&gt;^3&lt;/td&gt;&lt;/tr&gt;\r\n^-\r\n&lt;/table&gt;\r\n\r\n<b>Query</b>\r\nThis is a standard SQL query. If you are unfamiliar with SQL, <a href=\"http://www.plainblack.com\">Plain Black Software</a> provides training courses in SQL and database management.\r\n\r\n<b>DSN</b>\r\n<b>D</b>ata <b>S</b>ource <b>N</b>ame 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\n<i>Example:</i> DBI:mysql:WebGUI:localhost\r\n\r\n<b>Database User</b>\r\nThe username you use to connect to the DSN.\r\n\r\n<b>Database Password</b>\r\nThe password you use to connect to the DSN.\r\n','19,14,21');
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 carat (^) and follow with one other character. The following is a description of all the macros in the WebGUI system.\r\n\r\n<b>^^ - Carat</b>\r\nSince the carat symbol is used to start all macros, this macro is in place just in case you really wanted to use a carat somewhere.\r\n\r\n<b>^/ - System URL</b>\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<b>^@ - Username</b>\r\nThe username of the currently logged in user.\r\n\r\n<b>^# - User ID</b>\r\nThe user id of the currently logged in user.\r\n\r\n<b>^* - Random Number</b>\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<b>^a - My Account Link</b>\r\nA link to your account information.\r\n\r\n<b>^C - Crumb Trail</b>\r\nA dynamically generated crumb trail to the current page.\r\n\r\n<b>^D - Date</b>\r\nThe current date and time.\r\n\r\n<b>^f - Full Menu (Vertical)</b>\r\nDisplays a complete menu listing for all pages on the site, sort of like a site map.\r\n\r\n<b>^F - 2 Level Menu (Vertical)</b>\r\nDisplays the first two levels of the menuing hierarchy at all times.\r\n\r\n<b>^h - 3 Level Menu (Vertical)</b>\r\nDisplays the first three levels of the menuing hierarchy at all times.\r\n\r\n<b>^H - Home Link</b>\r\nA link to the home page of this site.\r\n\r\n<b>^L - Login</b>\r\nA small login form.\r\n\r\n<b>^M - Current Menu (Vertical)</b>\r\nA vertical menu containing the sub-pages at the current level.\r\n\r\n<b>^m - Current Menu (Horizontal)</b>\r\nA horizontal menu containing the sub-pages at the current level.\r\n\r\n<b>^P - Previous Menu (Vertical)</b>\r\nA vertical menu containing the sub-pages at the previous level.\r\n\r\n<b>^p - Previous Menu (Horizontal)</b>\r\nA horizontal menu containing the sub-pages at the previous level.\r\n\r\n<b>^r - Make Page Printable</b>\r\nCreates a link to remove the style from a page to make it printable.\r\n\r\n<b>^T - Top Level Menu (Vertical)</b>\r\nA vertical menu containing the main pages of the site (aka the sub-pages from the home page).\r\n\r\n<b>^t - Top Level Menu (Horizontal)</b>\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\n<b>Title</b>\r\nThe title of this report.\r\n\r\n<b>Display Title?</b>\r\nDo you wish to display the title of the report? If so, check the box.\r\n\r\n<b>Process Macros</b>\r\nDo you wish to process WebGUI Macros on this report? If so, check the box.\r\n\r\n<b>Description</b>\r\nDescribe the content of this report so your users will better understand what the report is all about.\r\n\r\n<b>Template</b>\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\n<i>Sample Template:</i>\r\n&lt;table&gt;\r\n&lt;tr&gt;&lt;th&gt;Employee Name&lt;/th&gt;&lt;th&gt;Employee #&lt;/th&gt;&lt;th&gt;Vacation Days Remaining&lt;/th&gt;&lt;th&gt;Monthly Salary&lt;/th&gt;&lt;/tr&gt;\r\n^-\r\n&lt;tr&gt;&lt;td&gt;^0&lt;/td&gt;&lt;td&gt;^1&lt;/td&gt;&lt;td&gt;^2&lt;/td&gt;&lt;td&gt;^3&lt;/td&gt;&lt;/tr&gt;\r\n^-\r\n&lt;/table&gt;\r\n\r\n<b>Query</b>\r\nThis is a standard SQL query. If you are unfamiliar with SQL, <a href=\"http://www.plainblack.com\">Plain Black Software</a> provides training courses in SQL and database management.\r\n\r\n<b>DSN</b>\r\n<b>D</b>ata <b>S</b>ource <b>N</b>ame 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\n<i>Example:</i> DBI:mysql:WebGUI:localhost\r\n\r\n<b>Database User</b>\r\nThe username you use to connect to the DSN.\r\n\r\n<b>Database Password</b>\r\nThe password you use to connect to the DSN.\r\n\r\n<b>Convert carriage returns?</b>\r\nDo you wish to convert the carriage returns in the resultant data to HTML breaks (&lt;br&gt;).\r\n','19,14,21');
INSERT INTO help VALUES (21,'US English','Using','Widget','Widgets are the true power of WebGUI. Widgets are tiny pluggable applications built to run under WebGUI. Message boards and polls are examples of widgets.\r\n\r\nTo add a widget to a page, first go to that page, then select <i>Add Content...</i> from the upper left corner of your screen. Each widget has it\'s own help so be sure to read the help if you\'re not sure how to use a widget.\r\n','0');
INSERT INTO help VALUES (23,'US English','Add','Article','Articles are the Swiss Army knife of WebGUI. Most pieces of static content can be added via the Article widget.\r\n\r\n<b>Title</b>\r\nWhat\'s the title for this content? Even if you don\'t wish the title to appear, it\'s a good idea to title your content so that if it is ever copied to the clipboard it will have a name.\r\n\r\n<b>Display the title?</b>\r\nDo you wish to display the title listed above?\r\n\r\n<b>Process macros?</b>\r\nDo you wish to process WebGUI macros on this article? Unchecking this box will not process macros and will speed up page execution.\r\n\r\n<b>Start Date</b>\r\nWhat date do you want this article to appear on the site? Dates are in the format of MM/DD/YYYY. You can use the JavaScript wizard to choose your date from a calendar by clicking on the <i>set date</i> button. By default the date is set to 01/01/2000.\r\n\r\n<b>End Date</b>\r\nWhat date do you want this article to be removed from the site? By default the date is set to 100 years in the future, 01/01/2100.\r\n\r\n<b>Body</b>\r\nThe body of the article is where all the content goes. You may feel free to add HTML tags as necessary to format your content. Be sure to put a &lt;p&gt; between paragraphs to add white space to your content.\r\n\r\n<b>Image</b>\r\nChoose an image (.jpg, .gif, .png) file from your hard drive. This file will be uploaded to the server and displayed in the upper-right corner of your article.\r\n\r\n<b>Link Title</b>\r\nIf you wish to add a link to your article, enter the title of the link in this field. \r\n\r\n<i>Example:</i> Google\r\n\r\n<b>Link URL</b>\r\nIf you added a link title, now add the URL (uniform resource locator) here. \r\n\r\n<i>Example:</i> http://www.google.com\r\n\r\n<b>Attachment</b>\r\nIf you wish to attach a word processor file, a zip file, or any other file for download by your users, then choose it from your hard drive.\r\n','14,21');
INSERT INTO help VALUES (24,'US English','Edit','Article','<b>Title</b>\r\nSee <i>Add Article</i> for details.\r\n\r\n<b>Display the title?</b>\r\nSee <i>Add Article</i> for details.\r\n\r\n<b>Process macros?</b>\r\nSee <i>Add Article</i> for details.\r\n\r\n<b>Start Date</b>\r\nSee <i>Add Article</i> for details.\r\n\r\n<b>End Date</b>\r\nSee <i>Add Article</i> for details.\r\n\r\n<b>Body</b>\r\nSee <i>Add Article</i> for details.\r\n\r\n<b>Image</b>\r\nSee <i>Add Article</i> for details.\r\n\r\n<b>Link Title</b>\r\nSee <i>Add Article</i> for details.\r\n\r\n<b>Link URL</b>\r\nSee <i>Add Article</i> for details.\r\n\r\n<b>Attachment</b>\r\nSee <i>Add Article</i> for details.\r\n','14,21');
INSERT INTO help VALUES (25,'US English','Add','Extra Column','Extra columns allow you to change the layout of your page for one page only. If you wish to have multiple columns on all your pages. Perhaps you should consider altering the <i>style</i> applied to your pages. \r\n\r\nColumns are always added from left to right. Therefore any existing content will be on the left of the new column.\r\n\r\n<b>Spacer</b>\r\nSpacer is the amount of space between your existing content and your new column. It is measured in pixels.\r\n\r\n<b>Width</b>\r\nWidth is the actual width of the new column to be added. Width is measured in pixels.\r\n\r\n<b>StyleSheet Class</b>\r\nBy default the <i>content</i> style (which is the style the body of your site should be using) that is applied to all columns. However, if you\'ve created a style specifically for columns, then feel free to modify this class.\r\n','14,21,9,18');
INSERT INTO help VALUES (26,'US English','Edit','Extra Column','<b>Spacer</b>\r\nSee <i>Add Extra Column</b> for details.\r\n\r\n<b>Width</b>\r\nSee <i>Add Extra Column</b> for details.\r\n\r\n<b>StyleSheet Class</b>\r\nSee <i>Add Extra Column</b> for details.\r\n','14,21,9,18');
INSERT INTO help VALUES (27,'US English','Add','Widget','You can add widgets by selecting from the <i>Add Content</i> pulldown menu.','0');
INSERT INTO help VALUES (28,'US English','Add','Poll','Polls can be used to get the impressions of your users on various topics.\r\n\r\n<b>Title</b>\r\nThe title of the poll. Even if you don\'t wish to display the title you should fill out this field so this poll will have a name if it is ever placed in the clipboard.\r\n\r\n<b>Display the title?</b>\r\nDo you wish to disply the title?\r\n\r\n<b>Description</b>\r\nYou may provide a description for this poll, or give the user some background information.\r\n\r\n<b>Active</b>\r\nIf this box is checked, then users will be able to vote. Otherwise they\'ll only be able to see the results of the poll.\r\n\r\n<b>Who can vote?</b>\r\nChoose a group that can vote on this poll.\r\n\r\n<b>Graph Width</b>\r\nThe width of the poll results graph. The width is measured in pixels.\r\n\r\n<b>Question</b>\r\nWhat is the question you\'d like to ask your users?\r\n\r\n<b>Answers</b>\r\nEnter the possible answers to your question. Enter only one answer per line. Polls are only capable of 20 possible answers.\r\n','14,21');
INSERT INTO help VALUES (29,'US English','Edit','Poll','<b>Title</b>\r\nSee <i>Add Poll</i> for details.\r\n\r\n<b>Display the title?</b>\r\nSee <i>Add Poll</i> for details.\r\n\r\n<b>Description</b>\r\nSee <i>Add Poll</i> for details.\r\n\r\n<b>Active</b>\r\nSee <i>Add Poll</i> for details.\r\n\r\n<b>Who can vote?</b>\r\nSee <i>Add Poll</i> for details.\r\n\r\n<b>Graph Width</b>\r\nSee <i>Add Poll</i> for details.\r\n\r\n<b>Question</b>\r\nSee <i>Add Poll</i> for details.\r\n\r\n<b>Answers</b>\r\nSee <i>Add Poll</i> for details.\r\n','14,21');
INSERT INTO help VALUES (30,'US English','Add','Site Map','Site maps are used to provide additional navigation in WebGUI. You could set up a traditional site map that would display a hierarchical view of all the pages in the site. On the other hand, you could use site maps to provide extra navigation at certain levels in your site.\r\n\r\n<b>Title</b>\r\nWhat title would you give to this site map? You should fill this field out even if you don\'t wish it to be displayed.\r\n\r\n<b>Display Title</b>\r\nShould the title be displayed?\r\n\r\n<b>Description</b>\r\nEnter a description as to why this site map is here and what purpose it serves.\r\n\r\n<b>Starting from this level?</b>\r\nIf the site map should display the page tree starting from this level, then check this box. If you wish the site map to start from the home page then uncheck it.\r\n\r\n<b>Show only one level?</b>\r\nShould the site map display only the current level of pages or all pages from this point forward? \r\n','14,21');
INSERT INTO help VALUES (31,'US English','Edit','Site Map','<b>Title</b>\r\nSee <i>Add Site Map</i> for details.\r\n\r\n<b>Display Title</b>\r\nSee <i>Add Site Map</i> for details.\r\n\r\n<b>Description</b>\r\nSee <i>Add Site Map</i> for details.\r\n\r\n<b>Starting from this level?</b>\r\nSee <i>Add Site Map</i> for details.\r\n\r\n<b>Show only one level?</b>\r\nSee <i>Add Site Map</i> for details.\r\n','14,21');
INSERT INTO help VALUES (28,'US English','Add','Poll','Polls can be used to get the impressions of your users on various topics.\r\n\r\n<b>Title</b>\r\nThe title of the poll. Even if you don\'t wish to display the title you should fill out this field so this poll will have a name if it is ever placed in the clipboard.\r\n\r\n<b>Display the title?</b>\r\nDo you wish to disply the title?\r\n\r\n<b>Description</b>\r\nYou may provide a description for this poll, or give the user some background information.\r\n\r\n<b>Active</b>\r\nIf this box is checked, then users will be able to vote. Otherwise they\'ll only be able to see the results of the poll.\r\n\r\n<b>Who can vote?</b>\r\nChoose a group that can vote on this poll.\r\n\r\n<b>Graph Width</b>\r\nThe width of the poll results graph. The width is measured in pixels.\r\n\r\n<b>Question</b>\r\nWhat is the question you\'d like to ask your users?\r\n\r\n<b>Answers</b>\r\nEnter the possible answers to your question. Enter only one answer per line. Polls are only capable of 20 possible answers.\r\n','14,21,19');
INSERT INTO help VALUES (29,'US English','Edit','Poll','<b>Title</b>\r\nSee <i>Add Poll</i> for details.\r\n\r\n<b>Display the title?</b>\r\nSee <i>Add Poll</i> for details.\r\n\r\n<b>Description</b>\r\nSee <i>Add Poll</i> for details.\r\n\r\n<b>Active</b>\r\nSee <i>Add Poll</i> for details.\r\n\r\n<b>Who can vote?</b>\r\nSee <i>Add Poll</i> for details.\r\n\r\n<b>Graph Width</b>\r\nSee <i>Add Poll</i> for details.\r\n\r\n<b>Question</b>\r\nSee <i>Add Poll</i> for details.\r\n\r\n<b>Answers</b>\r\nSee <i>Add Poll</i> for details.\r\n','14,21,19');
INSERT INTO help VALUES (30,'US English','Add','Site Map','Site maps are used to provide additional navigation in WebGUI. You could set up a traditional site map that would display a hierarchical view of all the pages in the site. On the other hand, you could use site maps to provide extra navigation at certain levels in your site.\r\n\r\n<b>Title</b>\r\nWhat title would you give to this site map? You should fill this field out even if you don\'t wish it to be displayed.\r\n\r\n<b>Display Title</b>\r\nShould the title be displayed?\r\n\r\n<b>Description</b>\r\nEnter a description as to why this site map is here and what purpose it serves.\r\n\r\n<b>Starting from this level?</b>\r\nIf the site map should display the page tree starting from this level, then check this box. If you wish the site map to start from the home page then uncheck it.\r\n\r\n<b>Show only one level?</b>\r\nShould the site map display only the current level of pages or all pages from this point forward? \r\n','14,21,19');
INSERT INTO help VALUES (31,'US English','Edit','Site Map','<b>Title</b>\r\nSee <i>Add Site Map</i> for details.\r\n\r\n<b>Display Title</b>\r\nSee <i>Add Site Map</i> for details.\r\n\r\n<b>Description</b>\r\nSee <i>Add Site Map</i> for details.\r\n\r\n<b>Starting from this level?</b>\r\nSee <i>Add Site Map</i> for details.\r\n\r\n<b>Show only one level?</b>\r\nSee <i>Add Site Map</i> for details.\r\n','14,21,19');
INSERT INTO help VALUES (32,'US English','Add','Message Board','Message boards, also called Forums and/or Discussions, are a great way to add community to any site or intranets. Many companies use message boards internally to collaborate on projects.\r\n\r\n<b>Title</b>\r\nThe name of this board.\r\n\r\n<b>Display the title?</b>\r\nDo you wish to display the title?\r\n\r\n<b>Description</b>\r\nBriefly describe what should be displayed on this message board.\r\n\r\n<b>Who can post?</b>\r\nWhat group can post to this message board?\r\n\r\n<b>Messages Per Page</b>\r\nWhen a visitor first comes to a message board s/he will be presented with a listing of all the topics (aka threads) of the message board. If a board is popular, it will quickly have many topics. The messages per page attribute allows you to specify how many topics should be shown on one page.\r\n\r\n<b>Edit Timeout</b>\r\nHow long after a user has posted to the board will their message be available for them to edit. This timeout is measured in hours.\r\n\r\n<i>Note:</i> Don\'t set this limit too high. One of the great things about message boards is that they are an accurate record of a discussion. If you allow editing for a long time, then a user has a chance to go back and change his/her mind a long time after the original statement was made.\r\n','14,21,19');
INSERT INTO help VALUES (33,'US English','Edit','Message Board','<b>Title</b>\r\nSee <i>Add Message Board</i> for details.\r\n\r\n<b>Display the title?</b>\r\nSee <i>Add Message Board</i> for details.\r\n\r\n<b>Description</b>\r\nSee <i>Add Message Board</i> for details.\r\n\r\n<b>Who can post?</b>\r\nSee <i>Add Message Board</i> for details.\r\n\r\n<b>Messages Per Page</b>\r\nSee <i>Add Message Board</i> for details.\r\n\r\n<b>Edit Timeout</b>\r\nSee <i>Add Message Board</i> for details.\r\n','14,21,19');
INSERT INTO help VALUES (34,'US English','Add','Link List','Link lists are just what they sound like, a list of links. Many sites have a links section, and this just automates the process.\r\n\r\n<b>Title</b>\r\nWhat is the title of this link list?\r\n\r\n<b>Display the title?</b>\r\nDo you wish to display the title of this list?\r\n\r\n<b>Process macros?</b>\r\nDo you wish to process macros on the contents of this link list? Turning this off will increase performance slightly on busy sites.\r\n\r\n<b>Description</b>\r\nDescribe the purpose of the links in this list.','14,21,19');
INSERT INTO help VALUES (35,'US English','Edit','Link List','<b>Title</b>\r\nSee <i>Add Link List</i> for details.\r\n\r\n<b>Display the title?</b>\r\nSee <i>Add Link List</i> for details.\r\n\r\n<b>Process macros?</b>\r\nSee <i>Add Link List</i> for details.\r\n\r\n<b>Description</b>\r\nSee <i>Add Link List</i> for details.\r\n\r\n<b>Adding / Editing Links</b>\r\nYou\'ll notice at the bottom of the Edit screen that there are some options to add, edit, delete and reorder the links in your link lists. This process works exactly as the process for doing the same with widgets and pages. The three properties of links are <i>name</i>, <i>url</i>, and <i>description</i>.\r\n','14,21,19');
INSERT INTO help VALUES (36,'US English','Add','Syndicated Content','Syndicated content is content that is pulled from another site using the RDF/RSS specification. This technology is often used to pull headlines from various news sites like <a href=\"http://www.cnn.com\">CNN</a> and <a href=\"http://slashdot.org\">Slashdot</a>. It can, of course, be used for other things like sports scores, stock market info, etc.\r\n\r\nYou can find a list of syndicated content at <a href=\"http://my.userland.com\">http://my.userland.com</a>. You will need to register with an account to browse their listing of content. Also, the list contained there is by no means a complete list of all the syndicated content on the internet.\r\n\r\n<b>Title</b>\r\nWhat is the title for this content? This is often the title of the site that the content comes from.\r\n\r\n<b>Display the title?</b>\r\nDo you wish to display the title?\r\n\r\n<b>Description</b>\r\nBriefly describe the content being pulled so that your users will know what they are seeing.\r\n\r\n<b>URL to RSS file</b>\r\nProvide the exact URL (starting with http://) to the syndicated content\'s RDF or RSS file. The syndicated content will be downloaded from this URL hourly.','14,21');
INSERT INTO help VALUES (37,'US English','Edit','Syndicated Content','<b>Title</b>\r\nSee <i>Add Syndicated Content</i> for details.\r\n\r\n<b>Display the title?</b>\r\nSee <i>Add Syndicated Content</i> for details.\r\n\r\n<b>Description</b>\r\nSee <i>Add Syndicated Content</i> for details.\r\n\r\n<b>URL to RSS file</b>\r\nSee <i>Add Syndicated Content</i> for details.\r\n','14,21');
INSERT INTO help VALUES (38,'US English','Add','Events Calendar','Events calendars are used on many intranets to keep track of internal dates that affect a whole organization. Also events calendars on consumer sites are a great way to let your customers know what events you\'ll be attending and what promotions you\'ll be having.\r\n\r\n<b>Title</b>\r\nWhat is the title of this events calendar?\r\n\r\n<b>Display the title?</b>\r\nDo you want the title to be displayed?\r\n\r\n<b>Process macros?</b>\r\nDo you wish to process WebGUI macros in the content of the events calendar? Turning this off can increase performance on busy sites.\r\n\r\n<b>Description</b>\r\nBriefly describe what this events calendar details.\r\n','14,21,19');
INSERT INTO help VALUES (39,'US English','Edit','Events Calendar','<b>Title</b>\r\nSee <i>Add Events Calendar</i> for details.\r\n\r\n<b>Display the title?</b>\r\nSee <i>Add Events Calendar</i> for details.\r\n\r\n<b>Process macros?</b>\r\nSee <i>Add Events Calendar</i> for details.\r\n\r\n<b>Description</b>\r\nSee <i>Add Events Calendar</i> for details.\r\n\r\n<b>Add / Edit Events</b>\r\nOn the edit screen you\'ll notice that there are options to add, edit, and delete the events in your events calendar. The properties for events are <i>name</i>, <i>description</i>, <i>start date</i>, and <i>end date</i>.\r\n\r\n<i>Note:</i> Events that have already happened will not be displayed on the events calendar.','14,21,19');
INSERT INTO help VALUES (40,'US English','Add','F.A.Q.','It seems that almost every web site, intranet, and extranet in the world has a frequently asked questions area. This widget helps you build one too.\r\n\r\n<b>Title</b>\r\nWhat is the title for this FAQ section?\r\n\r\n<b>Display the title?</b>\r\nDo you wish to display the title?\r\n\r\n<b>Process macros?</b>\r\nDo you wish to process macros contained in the FAQ content? Turning this off will increase performance on busy sites.\r\n\r\n<b>Description</b>\r\nBriefly describe what this FAQ covers.\r\n','14,21,19');
INSERT INTO help VALUES (41,'US English','Edit','F.A.Q.','<b>Title</b>\r\nSee <i>Add F.A.Q.</i> for details.\r\n\r\n<b>Display the title?</b>\r\nSee <i>Add F.A.Q.</i> for details.\r\n\r\n<b>Process macros?</b>\r\nSee <i>Add F.A.Q.</i> for details.\r\n\r\n<b>Description</b>\r\nSee <i>Add F.A.Q.</i> for details.\r\n\r\n<b>Add / Edit Questions</b>\r\nOn the edit screen you\'ll notice options for adding, editing, deleting, and reordering the questions in your FAQ. The two properties of FAQ questions are <i>question</i> and <i>answer</i>.\r\n\r\n','14,21,19');
INSERT INTO help VALUES (42,'US English','Add','Search (MnoGo)','The <a href=\"http://www.mnogosearch.org\">Mno Go Search engine</a> is one of the most popular and powerful open-source search engines on the market. It is so good that we figured that there was no reason to reinvent the wheel so we incorperated it into WebGUI.\r\n\r\n<b>Title</b>\r\nWhat is the title of this search?\r\n\r\n<b>Display the title?</b>\r\nDo you want to display the title?\r\n\r\n<b>Description</b>\r\nBriefly describe what is available through this search engine.\r\n\r\n<b>DSN</b>\r\n<b>D</b>ata <b>S</b>ource <b>N</b>ame is the unique identifier that Perl uses to describe the location of your database. It takes the format of DBI:[driver]:[database name]:[host]. This DSN needs to point to where your Mno Go Indexer stored the spider results. If you are uncertain how to set up the Mno Go Search Engine and Indexer <a href=\"http://www.plainblack.com\">Plain Black Software</a> provides support and training services.\r\n\r\n<i>Example:</i> DBI:mysql:WebGUI:localhost\r\n\r\n<b>Database User</b>\r\nThe username you use to connect to the DSN.\r\n\r\n<b>Database Password</b>\r\nThe password you use to connect to the DSN.\r\n','14,21');
INSERT INTO help VALUES (43,'US English','Edit','Search (MnoGo)','<b>Title</b>\r\nSee <i>Add Search (MnoGo)</i> for details.\r\n\r\n<b>Display the title?</b>\r\nSee <i>Add Search (MnoGo)</i> for details.\r\n\r\n<b>Description</b>\r\nSee <i>Add Search (MnoGo)</i> for details.\r\n\r\n<b>DSN</b>\r\nSee <i>Add Search (MnoGo)</i> for details.\r\n\r\n<b>Database User</b>\r\nSee <i>Add Search (MnoGo)</i> for details.\r\n\r\n<b>Database Password</b>\r\nSee <i>Add Search (MnoGo)</i> for details.\r\n','14,21');
INSERT INTO help VALUES (44,'US English','Add','User Submission System','User submission systems are a great way to add a sense of community to any site as well as get free content from your users.\r\n\r\n<b>Title</b>\r\nWhat is the title for this user submission system?\r\n\r\n<b>Display the title?</b>\r\nWould you like the title displayed?\r\n\r\n<b>Description</b>\r\nBriefly describe why this user submission system is here and what should be submitted to it.\r\n\r\n<b>Who can contribute?</b>\r\nWhat group is allowed to contribute content?\r\n\r\n<b>Submissions Per Page</b>\r\nHow many submissions should be listed per page in the submissions index?\r\n\r\n<b>Default Status</b>\r\nShould submissions be set to <i>approved</i>, <i>pending</i>, or <i>denied</i> by default?\r\n\r\n<i>Note:</i> If you set the default status to pending, then be prepared to monitor the pending queue under the Admin menu.\r\n','14,21');
INSERT INTO help VALUES (45,'US English','Edit','User Submission System','<b>Title</b>\r\nSee <i>Add User Submission System</i> for details.\r\n\r\n<b>Display the title?</b>\r\nSee <i>Add User Submission System</i> for details.\r\n\r\n<b>Description</b>\r\nSee <i>Add User Submission System</i> for details.\r\n\r\n<b>Who can contribute?</b>\r\nSee <i>Add User Submission System</i> for details.\r\n\r\n<b>Submissions Per Page</b>\r\nSee <i>Add User Submission System</i> for details.\r\n\r\n<b>Default Status</b>\r\nSee <i>Add User Submission System</i> for details.\r\n','14,21');
#
# Table structure for table 'incrementer'

View file

@ -1,47 +0,0 @@
alter table SQLReport add column convertCarriageReturns int not null default 0;
delete from 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\n<b>Title</b>\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\n<b>Meta Tags</b>\r\nMeta tags are used by some search engines to associate key words to a particular page. There is a great site called <a href=\"http://www.metatagbuilder.com/\">Meta Tag Builder</a> that will help you build meta tags if you\'ve never done it before.\r\n\r\n<i>Advanced Users:</i> If you have other things (like JavaScript) you usually put in the &lt;head&gt; area of your pages, you may put them here as well.','0');
INSERT INTO help VALUES (2,'US English','Edit','Page','<b>Title</b>\r\nSee <i>Add Page</i> for details.\r\n\r\n<b>Meta Tags</b>\r\nSee <i>Add Page</i> for details.\r\n\r\n<b>Style</b>\r\nBy default, when you create a page, it inherits a few traits from its parent. One of those traits is style. Choose from the list of styles if you would like to change the appearance of this page. See <i>Add Style</i> for more details.\r\n\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\n<b>Page URL</b>\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\n<b>Owner</b>\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\n<b>Owner can view?</b>\r\nCan the owner view the page or not?\r\n\r\n<b>Owner can edit?</b>\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\n<b>Group</b>\r\nA group is assigned to every page for additional privilege control. Pick a group from the pull-down menu.\r\n\r\n<b>Group can view?</b>\r\nCan members of this group view this page?\r\n\r\n<b>Group can edit?</b>\r\nCan members of this group edit this page?\r\n\r\n<b>Anybody can view?</b>\r\nCan any visitor or member regardless of the group and owner view this page?\r\n\r\n<b>Anybody can edit?</b>\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 the content you wish to keep 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 (default) 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 <b>Manage Users</b> for additional details.\r\n\r\n<b>Username</b>\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. (<i>Note:</i> 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\n<b>Password</b>\r\nA password is used to ensure that the user is who s/he says s/he is.\r\n\r\n<b>Email Address</b>\r\nThe user\'s email address. This must only be specified if the user will partake in functions that require email.\r\n\r\n<b>ICQ UIN</b>\r\nThe <a href=\"http://www.icq.com\">ICQ</a> UIN is the \"User ID Number\" on the ICQ network. ICQ is a very popular instant messaging platform.\r\n\r\n<b>Groups</b>\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','<b>Username</b>\r\nSee <i>Add User</i> for details.\r\n\r\n<b>Password</b>\r\nSee <i>Add User</i> for details.\r\n\r\n<b>Email Address</b>\r\nSee <i>Add User</i> for details.\r\n\r\n<b>ICQ UIN</b>\r\nSee <i>Add User</i> for details.\r\n\r\n<b>Groups</b>\r\nSee <i>Add User</i> for details.\r\n\r\n','0');
INSERT INTO help VALUES (7,'US English','Delete','User','There is no need to ever actually 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 keep in mind 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 re-adding the user to the users table manually.\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 that are given rights to do certain things. There are two default users built into the system: Admin and Visitor.\r\n\r\n<b>Admin</b>\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\n<b>Visitor</b>\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!&reg;. 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!&reg;. These styles are not meant to be edited, but rather to give you samples of what\'s possible.\r\n\r\n<b>Fail Safe</b>\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\n<b>Plain Black Software</b>\r\nThis is the simple design used on the Plain Black Software site.\r\n\r\n<b>Yahoo!&reg;</b>\r\nThis is the design of the Yahoo!&reg; site. (Yahoo!&reg; 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 subdivide 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\n<b>Admins</b>\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\n<b>Content Managers</b>\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 to determine whether a user can edit content at all. You should set up additional groups to separate content areas on the site.\r\n\r\n<b>Registered Users</b>\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\n<b>Visitors</b>\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','<b>Style Name</b>\r\nSee <i>Add Style</i> for details.\r\n\r\n<b>Header</b>\r\nSee <i>Add Style</i> for details.\r\n\r\n<b>Footer</b>\r\nSee <i>Add Style</i> for details.\r\n\r\n<b>Style Sheet</b>\r\nSee <i>Add Style</i> 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\n<b>Path to WebGUI Extras</b>\r\nThe web-path to the directory containing WebGUI images and javascript files.\r\n\r\n<b>Session Timeout</b>\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\n<b>Maximum Attachment Size</b>\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\n<b>Web Attachment Path</b>\r\nThe web-path of the directory where attachments are to be stored.\r\n\r\n<b>Server Attachment Path</b>\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\n<b>SMTP Server</b>\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\n<b>Company Name</b>\r\nThe name of your company. It will appear on all emails and anywhere you use the Company Name macro.\r\n\r\n<b>Company Email Address</b>\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\n<b>Company URL</b>\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','<b>Group Name</b>\r\nSee <i>Add Group</i> for details.\r\n\r\n<b>Description</b>\r\nSee <i>Add Group</i> for details.\r\n','0');
INSERT INTO help VALUES (14,'US English','Delete','Widget','This function permanently deletes the selected widget 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 <i>Using Macros</i> for more information.\r\n\r\n<b>Style Name</b>\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\n<b>Header</b>\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, <a href=\"http://www.plainblack.com\">Plain Black Software</a> 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\n<b>Footer</b>\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\n<b>Style Sheet</b>\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 <i>Using Style Sheets</i> for more information.\r\n\r\n<i>Advanced Users:</i> 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&lt;link href=\"/webgui.css\" rel=\"stylesheet\" rev=\"stylesheet\" type=\"text/css\"&gt;','18,19');
INSERT INTO help VALUES (17,'US English','Add','Group','See <i>Manage Group</i> for a description of grouping functions and the default groups.\r\n\r\n<b>Group Name</b>\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\n<b>Description</b>\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 (22,'US English','Edit','SQL Report','<b>Title</b>\r\nSee <i>Add SQL Report</i> for details.\r\n\r\n<b>Display Title?</b>\r\nSee <i>Add SQL Report</i> for details.\r\n\r\n<b>Process Macros</b>\r\nSee <i>Add SQL Report</i> for details.\r\n\r\n<b>Description</b>\r\nSee <i>Add SQL Report</i> for details.\r\n\r\n<b>Template</b>\r\nSee <i>Add SQL Report</i> for details.\r\n\r\n<b>Query</b>\r\nSee <i>Add SQL Report</i> for details.\r\n\r\n<b>DSN</b>\r\nSee <i>Add SQL Report</i> for details.\r\n\r\n<b>Database User</b>\r\nSee <i>Add SQL Report</i> for details.\r\n\r\n<b>Database Password</b>\r\nSee <i>Add SQL Report</i> for details.\r\n\r\n<b>Convert carriage returns?</b>\r\nSee <i>Add SQL Report</i> for details.\r\n\r\n','19,14,21');
INSERT INTO help VALUES (18,'US English','Using','Style Sheets','<a href=\"http://www.w3.org/Style/CSS/\">Cascading Style Sheets (CSS)</a> 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, <a href=\"http://www.plainblack.com\">Plain Black Software</a> provides training classes on XHTML and CSS. Alternatively, Bradsoft makes an excellent CSS editor called <a href=\"http://www.bradsoft.com/topstyle/index.asp\">Top Style</a>.\r\n\r\nThe following is a list of classes used to control the look of WebGUI:\r\n\r\n<b>A</b>\r\nThe links throughout the style.\r\n\r\n<b>BODY</b>\r\nThe default setup of all pages within a style.\r\n\r\n<b>H1</b>\r\nThe headers on every page.\r\n\r\n<b>.accountOptions</b>\r\nThe links that appear under the login and account update forms.\r\n\r\n<b>.adminBar </b>\r\nThe bar that appears at the top of the page when you\'re in admin mode.\r\n\r\n<b>.boardMenu </b>\r\nThe menu on the message boards.\r\n\r\n<b>.boardMessage </b>\r\nThe full message text.\r\n\r\n<b>.boardTitle </b>\r\nThe title of the message board.\r\n\r\n<b>.content</b>\r\nThe main content area on all pages of the style.\r\n\r\n<b>.crumbTrail </b>\r\nThe crumb trail (if you\'re using that macro).\r\n\r\n<b>.eventTitle </b>\r\nThe title of an individual event.\r\n\r\n<b>.faqQuestion</b>\r\nAn F.A.Q. question. To distinguish it from an answer.\r\n\r\n<b>.formDescription </b>\r\nThe tags on all forms next to the form elements. \r\n\r\n<b>.formSubtext </b>\r\nThe tags below some form elements.\r\n\r\n<b>.highlight </b>\r\nDenotes a highlighted item, such as which message you are viewing within a list.\r\n\r\n<b>.horizontalMenu </b>\r\nThe horizontal menu (if you use a horizontal menu macro).\r\n\r\n<b>.loginBox</b>\r\nThe login box macro.\r\n\r\n<b>.pagination </b>\r\nThe Previous and Next links on pages with pagination.\r\n\r\n<b>.pollAnswer </b>\r\nAn answer on a poll.\r\n\r\n<b>.pollColor </b>\r\nThe color of the percentage bar on a poll.\r\n\r\n<b>.pollQuestion </b>\r\nThe question on a poll.\r\n\r\n<b>.tableData </b>\r\nThe data rows on things like message boards and user contributions.\r\n\r\n<b>.tableHeader </b>\r\nThe headings of columns on things like message boards and user contributions.\r\n\r\n<b>.verticalMenu </b>\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 carat (^) and follow with one other character. The following is a description of all the macros in the WebGUI system.\r\n\r\n<b>^^ - Carat</b>\r\nSince the carat symbol is used to start all macros, this macro is in place just in case you really wanted to use a carat somewhere.\r\n\r\n<b>^/ - System URL</b>\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<b>^@ - Username</b>\r\nThe username of the currently logged in user.\r\n\r\n<b>^# - User ID</b>\r\nThe user id of the currently logged in user.\r\n\r\n<b>^* - Random Number</b>\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<b>^a - My Account Link</b>\r\nA link to your account information.\r\n\r\n<b>^C - Crumb Trail</b>\r\nA dynamically generated crumb trail to the current page.\r\n\r\n<b>^D - Date</b>\r\nThe current date and time.\r\n\r\n<b>^f - Full Menu (Vertical)</b>\r\nDisplays a complete menu listing for all pages on the site, sort of like a site map.\r\n\r\n<b>^F - 2 Level Menu (Vertical)</b>\r\nDisplays the first two levels of the menuing hierarchy at all times.\r\n\r\n<b>^h - 3 Level Menu (Vertical)</b>\r\nDisplays the first three levels of the menuing hierarchy at all times.\r\n\r\n<b>^H - Home Link</b>\r\nA link to the home page of this site.\r\n\r\n<b>^L - Login</b>\r\nA small login form.\r\n\r\n<b>^M - Current Menu (Vertical)</b>\r\nA vertical menu containing the sub-pages at the current level.\r\n\r\n<b>^m - Current Menu (Horizontal)</b>\r\nA horizontal menu containing the sub-pages at the current level.\r\n\r\n<b>^P - Previous Menu (Vertical)</b>\r\nA vertical menu containing the sub-pages at the previous level.\r\n\r\n<b>^p - Previous Menu (Horizontal)</b>\r\nA horizontal menu containing the sub-pages at the previous level.\r\n\r\n<b>^r - Make Page Printable</b>\r\nCreates a link to remove the style from a page to make it printable.\r\n\r\n<b>^T - Top Level Menu (Vertical)</b>\r\nA vertical menu containing the main pages of the site (aka the sub-pages from the home page).\r\n\r\n<b>^t - Top Level Menu (Horizontal)</b>\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\n<b>Title</b>\r\nThe title of this report.\r\n\r\n<b>Display Title?</b>\r\nDo you wish to display the title of the report? If so, check the box.\r\n\r\n<b>Process Macros</b>\r\nDo you wish to process WebGUI Macros on this report? If so, check the box.\r\n\r\n<b>Description</b>\r\nDescribe the content of this report so your users will better understand what the report is all about.\r\n\r\n<b>Template</b>\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\n<i>Sample Template:</i>\r\n&lt;table&gt;\r\n&lt;tr&gt;&lt;th&gt;Employee Name&lt;/th&gt;&lt;th&gt;Employee #&lt;/th&gt;&lt;th&gt;Vacation Days Remaining&lt;/th&gt;&lt;th&gt;Monthly Salary&lt;/th&gt;&lt;/tr&gt;\r\n^-\r\n&lt;tr&gt;&lt;td&gt;^0&lt;/td&gt;&lt;td&gt;^1&lt;/td&gt;&lt;td&gt;^2&lt;/td&gt;&lt;td&gt;^3&lt;/td&gt;&lt;/tr&gt;\r\n^-\r\n&lt;/table&gt;\r\n\r\n<b>Query</b>\r\nThis is a standard SQL query. If you are unfamiliar with SQL, <a href=\"http://www.plainblack.com\">Plain Black Software</a> provides training courses in SQL and database management.\r\n\r\n<b>DSN</b>\r\n<b>D</b>ata <b>S</b>ource <b>N</b>ame 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\n<i>Example:</i> DBI:mysql:WebGUI:localhost\r\n\r\n<b>Database User</b>\r\nThe username you use to connect to the DSN.\r\n\r\n<b>Database Password</b>\r\nThe password you use to connect to the DSN.\r\n\r\n<b>Convert carriage returns?</b>\r\nDo you wish to convert the carriage returns in the resultant data to HTML breaks (&lt;br&gt;).\r\n','19,14,21');
INSERT INTO help VALUES (21,'US English','Using','Widget','Widgets are the true power of WebGUI. Widgets are tiny pluggable applications built to run under WebGUI. Message boards and polls are examples of widgets.\r\n\r\nTo add a widget to a page, first go to that page, then select <i>Add Content...</i> from the upper left corner of your screen. Each widget has it\'s own help so be sure to read the help if you\'re not sure how to use a widget.\r\n','0');
INSERT INTO help VALUES (23,'US English','Add','Article','Articles are the Swiss Army knife of WebGUI. Most pieces of static content can be added via the Article widget.\r\n\r\n<b>Title</b>\r\nWhat\'s the title for this content? Even if you don\'t wish the title to appear, it\'s a good idea to title your content so that if it is ever copied to the clipboard it will have a name.\r\n\r\n<b>Display the title?</b>\r\nDo you wish to display the title listed above?\r\n\r\n<b>Process macros?</b>\r\nDo you wish to process WebGUI macros on this article? Unchecking this box will not process macros and will speed up page execution.\r\n\r\n<b>Start Date</b>\r\nWhat date do you want this article to appear on the site? Dates are in the format of MM/DD/YYYY. You can use the JavaScript wizard to choose your date from a calendar by clicking on the <i>set date</i> button. By default the date is set to 01/01/2000.\r\n\r\n<b>End Date</b>\r\nWhat date do you want this article to be removed from the site? By default the date is set to 100 years in the future, 01/01/2100.\r\n\r\n<b>Body</b>\r\nThe body of the article is where all the content goes. You may feel free to add HTML tags as necessary to format your content. Be sure to put a &lt;p&gt; between paragraphs to add white space to your content.\r\n\r\n<b>Image</b>\r\nChoose an image (.jpg, .gif, .png) file from your hard drive. This file will be uploaded to the server and displayed in the upper-right corner of your article.\r\n\r\n<b>Link Title</b>\r\nIf you wish to add a link to your article, enter the title of the link in this field. \r\n\r\n<i>Example:</i> Google\r\n\r\n<b>Link URL</b>\r\nIf you added a link title, now add the URL (uniform resource locator) here. \r\n\r\n<i>Example:</i> http://www.google.com\r\n\r\n<b>Attachment</b>\r\nIf you wish to attach a word processor file, a zip file, or any other file for download by your users, then choose it from your hard drive.\r\n','14,21');
INSERT INTO help VALUES (24,'US English','Edit','Article','<b>Title</b>\r\nSee <i>Add Article</i> for details.\r\n\r\n<b>Display the title?</b>\r\nSee <i>Add Article</i> for details.\r\n\r\n<b>Process macros?</b>\r\nSee <i>Add Article</i> for details.\r\n\r\n<b>Start Date</b>\r\nSee <i>Add Article</i> for details.\r\n\r\n<b>End Date</b>\r\nSee <i>Add Article</i> for details.\r\n\r\n<b>Body</b>\r\nSee <i>Add Article</i> for details.\r\n\r\n<b>Image</b>\r\nSee <i>Add Article</i> for details.\r\n\r\n<b>Link Title</b>\r\nSee <i>Add Article</i> for details.\r\n\r\n<b>Link URL</b>\r\nSee <i>Add Article</i> for details.\r\n\r\n<b>Attachment</b>\r\nSee <i>Add Article</i> for details.\r\n','14,21');
INSERT INTO help VALUES (25,'US English','Add','Extra Column','Extra columns allow you to change the layout of your page for one page only. If you wish to have multiple columns on all your pages. Perhaps you should consider altering the <i>style</i> applied to your pages. \r\n\r\nColumns are always added from left to right. Therefore any existing content will be on the left of the new column.\r\n\r\n<b>Spacer</b>\r\nSpacer is the amount of space between your existing content and your new column. It is measured in pixels.\r\n\r\n<b>Width</b>\r\nWidth is the actual width of the new column to be added. Width is measured in pixels.\r\n\r\n<b>StyleSheet Class</b>\r\nBy default the <i>content</i> style (which is the style the body of your site should be using) that is applied to all columns. However, if you\'ve created a style specifically for columns, then feel free to modify this class.\r\n','14,21,9,18');
INSERT INTO help VALUES (26,'US English','Edit','Extra Column','<b>Spacer</b>\r\nSee <i>Add Extra Column</b> for details.\r\n\r\n<b>Width</b>\r\nSee <i>Add Extra Column</b> for details.\r\n\r\n<b>StyleSheet Class</b>\r\nSee <i>Add Extra Column</b> for details.\r\n','14,21,9,18');
INSERT INTO help VALUES (27,'US English','Add','Widget','You can add widgets by selecting from the <i>Add Content</i> pulldown menu.','0');
INSERT INTO help VALUES (28,'US English','Add','Poll','Polls can be used to get the impressions of your users on various topics.\r\n\r\n<b>Title</b>\r\nThe title of the poll. Even if you don\'t wish to display the title you should fill out this field so this poll will have a name if it is ever placed in the clipboard.\r\n\r\n<b>Display the title?</b>\r\nDo you wish to disply the title?\r\n\r\n<b>Description</b>\r\nYou may provide a description for this poll, or give the user some background information.\r\n\r\n<b>Active</b>\r\nIf this box is checked, then users will be able to vote. Otherwise they\'ll only be able to see the results of the poll.\r\n\r\n<b>Who can vote?</b>\r\nChoose a group that can vote on this poll.\r\n\r\n<b>Graph Width</b>\r\nThe width of the poll results graph. The width is measured in pixels.\r\n\r\n<b>Question</b>\r\nWhat is the question you\'d like to ask your users?\r\n\r\n<b>Answers</b>\r\nEnter the possible answers to your question. Enter only one answer per line. Polls are only capable of 20 possible answers.\r\n','14,21,19');
INSERT INTO help VALUES (29,'US English','Edit','Poll','<b>Title</b>\r\nSee <i>Add Poll</i> for details.\r\n\r\n<b>Display the title?</b>\r\nSee <i>Add Poll</i> for details.\r\n\r\n<b>Description</b>\r\nSee <i>Add Poll</i> for details.\r\n\r\n<b>Active</b>\r\nSee <i>Add Poll</i> for details.\r\n\r\n<b>Who can vote?</b>\r\nSee <i>Add Poll</i> for details.\r\n\r\n<b>Graph Width</b>\r\nSee <i>Add Poll</i> for details.\r\n\r\n<b>Question</b>\r\nSee <i>Add Poll</i> for details.\r\n\r\n<b>Answers</b>\r\nSee <i>Add Poll</i> for details.\r\n','14,21,19');
INSERT INTO help VALUES (30,'US English','Add','Site Map','Site maps are used to provide additional navigation in WebGUI. You could set up a traditional site map that would display a hierarchical view of all the pages in the site. On the other hand, you could use site maps to provide extra navigation at certain levels in your site.\r\n\r\n<b>Title</b>\r\nWhat title would you give to this site map? You should fill this field out even if you don\'t wish it to be displayed.\r\n\r\n<b>Display Title</b>\r\nShould the title be displayed?\r\n\r\n<b>Description</b>\r\nEnter a description as to why this site map is here and what purpose it serves.\r\n\r\n<b>Starting from this level?</b>\r\nIf the site map should display the page tree starting from this level, then check this box. If you wish the site map to start from the home page then uncheck it.\r\n\r\n<b>Show only one level?</b>\r\nShould the site map display only the current level of pages or all pages from this point forward? \r\n','14,21,19');
INSERT INTO help VALUES (31,'US English','Edit','Site Map','<b>Title</b>\r\nSee <i>Add Site Map</i> for details.\r\n\r\n<b>Display Title</b>\r\nSee <i>Add Site Map</i> for details.\r\n\r\n<b>Description</b>\r\nSee <i>Add Site Map</i> for details.\r\n\r\n<b>Starting from this level?</b>\r\nSee <i>Add Site Map</i> for details.\r\n\r\n<b>Show only one level?</b>\r\nSee <i>Add Site Map</i> for details.\r\n','14,21,19');
INSERT INTO help VALUES (32,'US English','Add','Message Board','Message boards, also called Forums and/or Discussions, are a great way to add community to any site or intranets. Many companies use message boards internally to collaborate on projects.\r\n\r\n<b>Title</b>\r\nThe name of this board.\r\n\r\n<b>Display the title?</b>\r\nDo you wish to display the title?\r\n\r\n<b>Description</b>\r\nBriefly describe what should be displayed on this message board.\r\n\r\n<b>Who can post?</b>\r\nWhat group can post to this message board?\r\n\r\n<b>Messages Per Page</b>\r\nWhen a visitor first comes to a message board s/he will be presented with a listing of all the topics (aka threads) of the message board. If a board is popular, it will quickly have many topics. The messages per page attribute allows you to specify how many topics should be shown on one page.\r\n\r\n<b>Edit Timeout</b>\r\nHow long after a user has posted to the board will their message be available for them to edit. This timeout is measured in hours.\r\n\r\n<i>Note:</i> Don\'t set this limit too high. One of the great things about message boards is that they are an accurate record of a discussion. If you allow editing for a long time, then a user has a chance to go back and change his/her mind a long time after the original statement was made.\r\n','14,21,19');
INSERT INTO help VALUES (33,'US English','Edit','Message Board','<b>Title</b>\r\nSee <i>Add Message Board</i> for details.\r\n\r\n<b>Display the title?</b>\r\nSee <i>Add Message Board</i> for details.\r\n\r\n<b>Description</b>\r\nSee <i>Add Message Board</i> for details.\r\n\r\n<b>Who can post?</b>\r\nSee <i>Add Message Board</i> for details.\r\n\r\n<b>Messages Per Page</b>\r\nSee <i>Add Message Board</i> for details.\r\n\r\n<b>Edit Timeout</b>\r\nSee <i>Add Message Board</i> for details.\r\n','14,21,19');
INSERT INTO help VALUES (34,'US English','Add','Link List','Link lists are just what they sound like, a list of links. Many sites have a links section, and this just automates the process.\r\n\r\n<b>Title</b>\r\nWhat is the title of this link list?\r\n\r\n<b>Display the title?</b>\r\nDo you wish to display the title of this list?\r\n\r\n<b>Process macros?</b>\r\nDo you wish to process macros on the contents of this link list? Turning this off will increase performance slightly on busy sites.\r\n\r\n<b>Description</b>\r\nDescribe the purpose of the links in this list.','14,21,19');
INSERT INTO help VALUES (35,'US English','Edit','Link List','<b>Title</b>\r\nSee <i>Add Link List</i> for details.\r\n\r\n<b>Display the title?</b>\r\nSee <i>Add Link List</i> for details.\r\n\r\n<b>Process macros?</b>\r\nSee <i>Add Link List</i> for details.\r\n\r\n<b>Description</b>\r\nSee <i>Add Link List</i> for details.\r\n\r\n<b>Adding / Editing Links</b>\r\nYou\'ll notice at the bottom of the Edit screen that there are some options to add, edit, delete and reorder the links in your link lists. This process works exactly as the process for doing the same with widgets and pages. The three properties of links are <i>name</i>, <i>url</i>, and <i>description</i>.\r\n','14,21,19');
INSERT INTO help VALUES (36,'US English','Add','Syndicated Content','Syndicated content is content that is pulled from another site using the RDF/RSS specification. This technology is often used to pull headlines from various news sites like <a href=\"http://www.cnn.com\">CNN</a> and <a href=\"http://slashdot.org\">Slashdot</a>. It can, of course, be used for other things like sports scores, stock market info, etc.\r\n\r\nYou can find a list of syndicated content at <a href=\"http://my.userland.com\">http://my.userland.com</a>. You will need to register with an account to browse their listing of content. Also, the list contained there is by no means a complete list of all the syndicated content on the internet.\r\n\r\n<b>Title</b>\r\nWhat is the title for this content? This is often the title of the site that the content comes from.\r\n\r\n<b>Display the title?</b>\r\nDo you wish to display the title?\r\n\r\n<b>Description</b>\r\nBriefly describe the content being pulled so that your users will know what they are seeing.\r\n\r\n<b>URL to RSS file</b>\r\nProvide the exact URL (starting with http://) to the syndicated content\'s RDF or RSS file. The syndicated content will be downloaded from this URL hourly.','14,21');
INSERT INTO help VALUES (37,'US English','Edit','Syndicated Content','<b>Title</b>\r\nSee <i>Add Syndicated Content</i> for details.\r\n\r\n<b>Display the title?</b>\r\nSee <i>Add Syndicated Content</i> for details.\r\n\r\n<b>Description</b>\r\nSee <i>Add Syndicated Content</i> for details.\r\n\r\n<b>URL to RSS file</b>\r\nSee <i>Add Syndicated Content</i> for details.\r\n','14,21');
INSERT INTO help VALUES (38,'US English','Add','Events Calendar','Events calendars are used on many intranets to keep track of internal dates that affect a whole organization. Also events calendars on consumer sites are a great way to let your customers know what events you\'ll be attending and what promotions you\'ll be having.\r\n\r\n<b>Title</b>\r\nWhat is the title of this events calendar?\r\n\r\n<b>Display the title?</b>\r\nDo you want the title to be displayed?\r\n\r\n<b>Process macros?</b>\r\nDo you wish to process WebGUI macros in the content of the events calendar? Turning this off can increase performance on busy sites.\r\n\r\n<b>Description</b>\r\nBriefly describe what this events calendar details.\r\n','14,21,19');
INSERT INTO help VALUES (39,'US English','Edit','Events Calendar','<b>Title</b>\r\nSee <i>Add Events Calendar</i> for details.\r\n\r\n<b>Display the title?</b>\r\nSee <i>Add Events Calendar</i> for details.\r\n\r\n<b>Process macros?</b>\r\nSee <i>Add Events Calendar</i> for details.\r\n\r\n<b>Description</b>\r\nSee <i>Add Events Calendar</i> for details.\r\n\r\n<b>Add / Edit Events</b>\r\nOn the edit screen you\'ll notice that there are options to add, edit, and delete the events in your events calendar. The properties for events are <i>name</i>, <i>description</i>, <i>start date</i>, and <i>end date</i>.\r\n\r\n<i>Note:</i> Events that have already happened will not be displayed on the events calendar.','14,21,19');
INSERT INTO help VALUES (40,'US English','Add','F.A.Q.','It seems that almost every web site, intranet, and extranet in the world has a frequently asked questions area. This widget helps you build one too.\r\n\r\n<b>Title</b>\r\nWhat is the title for this FAQ section?\r\n\r\n<b>Display the title?</b>\r\nDo you wish to display the title?\r\n\r\n<b>Process macros?</b>\r\nDo you wish to process macros contained in the FAQ content? Turning this off will increase performance on busy sites.\r\n\r\n<b>Description</b>\r\nBriefly describe what this FAQ covers.\r\n','14,21,19');
INSERT INTO help VALUES (41,'US English','Edit','F.A.Q.','<b>Title</b>\r\nSee <i>Add F.A.Q.</i> for details.\r\n\r\n<b>Display the title?</b>\r\nSee <i>Add F.A.Q.</i> for details.\r\n\r\n<b>Process macros?</b>\r\nSee <i>Add F.A.Q.</i> for details.\r\n\r\n<b>Description</b>\r\nSee <i>Add F.A.Q.</i> for details.\r\n\r\n<b>Add / Edit Questions</b>\r\nOn the edit screen you\'ll notice options for adding, editing, deleting, and reordering the questions in your FAQ. The two properties of FAQ questions are <i>question</i> and <i>answer</i>.\r\n\r\n','14,21,19');
INSERT INTO help VALUES (42,'US English','Add','Search (MnoGo)','The <a href=\"http://www.mnogosearch.org\">Mno Go Search engine</a> is one of the most popular and powerful open-source search engines on the market. It is so good that we figured that there was no reason to reinvent the wheel so we incorperated it into WebGUI.\r\n\r\n<b>Title</b>\r\nWhat is the title of this search?\r\n\r\n<b>Display the title?</b>\r\nDo you want to display the title?\r\n\r\n<b>Description</b>\r\nBriefly describe what is available through this search engine.\r\n\r\n<b>DSN</b>\r\n<b>D</b>ata <b>S</b>ource <b>N</b>ame is the unique identifier that Perl uses to describe the location of your database. It takes the format of DBI:[driver]:[database name]:[host]. This DSN needs to point to where your Mno Go Indexer stored the spider results. If you are uncertain how to set up the Mno Go Search Engine and Indexer <a href=\"http://www.plainblack.com\">Plain Black Software</a> provides support and training services.\r\n\r\n<i>Example:</i> DBI:mysql:WebGUI:localhost\r\n\r\n<b>Database User</b>\r\nThe username you use to connect to the DSN.\r\n\r\n<b>Database Password</b>\r\nThe password you use to connect to the DSN.\r\n','14,21');
INSERT INTO help VALUES (43,'US English','Edit','Search (MnoGo)','<b>Title</b>\r\nSee <i>Add Search (MnoGo)</i> for details.\r\n\r\n<b>Display the title?</b>\r\nSee <i>Add Search (MnoGo)</i> for details.\r\n\r\n<b>Description</b>\r\nSee <i>Add Search (MnoGo)</i> for details.\r\n\r\n<b>DSN</b>\r\nSee <i>Add Search (MnoGo)</i> for details.\r\n\r\n<b>Database User</b>\r\nSee <i>Add Search (MnoGo)</i> for details.\r\n\r\n<b>Database Password</b>\r\nSee <i>Add Search (MnoGo)</i> for details.\r\n','14,21');
INSERT INTO help VALUES (44,'US English','Add','User Submission System','User submission systems are a great way to add a sense of community to any site as well as get free content from your users.\r\n\r\n<b>Title</b>\r\nWhat is the title for this user submission system?\r\n\r\n<b>Display the title?</b>\r\nWould you like the title displayed?\r\n\r\n<b>Description</b>\r\nBriefly describe why this user submission system is here and what should be submitted to it.\r\n\r\n<b>Who can contribute?</b>\r\nWhat group is allowed to contribute content?\r\n\r\n<b>Submissions Per Page</b>\r\nHow many submissions should be listed per page in the submissions index?\r\n\r\n<b>Default Status</b>\r\nShould submissions be set to <i>approved</i>, <i>pending</i>, or <i>denied</i> by default?\r\n\r\n<i>Note:</i> If you set the default status to pending, then be prepared to monitor the pending queue under the Admin menu.\r\n','14,21');
INSERT INTO help VALUES (45,'US English','Edit','User Submission System','<b>Title</b>\r\nSee <i>Add User Submission System</i> for details.\r\n\r\n<b>Display the title?</b>\r\nSee <i>Add User Submission System</i> for details.\r\n\r\n<b>Description</b>\r\nSee <i>Add User Submission System</i> for details.\r\n\r\n<b>Who can contribute?</b>\r\nSee <i>Add User Submission System</i> for details.\r\n\r\n<b>Submissions Per Page</b>\r\nSee <i>Add User Submission System</i> for details.\r\n\r\n<b>Default Status</b>\r\nSee <i>Add User Submission System</i> for details.\r\n','14,21');

View file

@ -0,0 +1,3 @@
alter table submission add column convertCarriageReturns int not null;
alter table Article add column convertCarriageReturns int not null;

View file

@ -1,4 +1,4 @@
dsn = DBI:mysql:WebGUI
dbuser = webgui
dbpass = password
logfile = /data/webgui-`date +%Y%m%d`.log
logfile = /data/webgui.log

View file

@ -1,5 +1,4 @@
package WebGUI::Config;
# This package was originally Data::Config
package Data::Config;
use strict;
use Carp;

View file

@ -1,4 +1,5 @@
package WebGUI;
our $VERSION = "1.0.0";
#-------------------------------------------------------------------
# WebGUI is Copyright 2001 Plain Black Software.
@ -52,7 +53,8 @@ sub _displayAdminBar {
$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'
$session{env}{SCRIPT_NAME}.'/trash'=>'View Trash',
$session{page}{url}.'?op=purgeTrash'=>'Empty Trash'
);
}
%hash = ( $session{page}{url}=>'Admin...',

View file

@ -1,4 +1,4 @@
package ErrorHandler;
package WebGUI::ErrorHandler;
#-------------------------------------------------------------------
# WebGUI is Copyright 2001 Plain Black Software.
@ -15,25 +15,65 @@ use WebGUI::Session;
#-------------------------------------------------------------------
sub fatalError {
my ($key, $logfile);
print Session::httpHeader();
$logfile = FileHandle->new(">".$session{config}{logfile}) or die "Can't open log file.";
print $logfile localtime(time);
print "<h1>WebGUI Fatal Error</h1>Something unexpected happened that caused this system to fault. Please send this message to ";#.$session{setting}{adminEmail}."<p>";
my ($key, $log, $cgi, $logfile, $config);
if (exists $session{cgi}) {
$cgi = $session{cgi};
} else {
use CGI;
$cgi = CGI->new;
}
print $cgi->header;
if (exists $session{config}{logfile}) {
$logfile = $session{config}{logfile};
} else {
use Data::Config;
$config = new Data::Config '../etc/WebGUI.conf';
$logfile = $config->param('logfile');
}
$log = FileHandle->new(">>$logfile") or die "Can't open log file.";
print "<h1>WebGUI Fatal Error</h1>Something unexpected happened that caused this system to fault.<p>";
print $0." at ".localtime(time)." reported:<br>";
print $log localtime(time)." ".$0." ".$_[0]."\n";
print $_[0];
print "<p><h3>Caller</h3><table border=1><tr><td valign=top>";
print "<b>Level 1</b><br>".join("<br>",caller(1));
print $log "\t".join(",",caller(1))."\n";
print "</td><td valign=top>"."<b>Level 2</b><br>".join("<br>",caller(2));
print $log "\t".join(",",caller(2))."\n";
print "</td><td valign=top>"."<b>Level 3</b><br>".join("<br>",caller(3));
print "</td><td valign=top>"."<b>Level 4</b><br>".join("<br>",caller(4));
print "</td></tr></table><p><h3>Form Variables</h3>";
#foreach $key (keys %{$session(form}}) {
# print $key." = ".$session{form}{$key}."<br>";
#}
$logfile->close();
print $log "\t".join(",",caller(3))."\n";
print "</td></tr></table>";
print "<h3>Form Variables</h3>";
print $log "\t";
if (exists $session{form}) {
foreach $key (keys %{$session{form}}) {
print $key." = ".$session{form}{$key}."<br>";
print $log $key."=".$session{form}{$key}." ";
}
print $log "\n";
} else {
print "Cannot retrieve session information.";
print $log "Session not accessible for form variable dump.\n";
}
print $log "\n";
$log->close;
exit;
}
#-------------------------------------------------------------------
sub warn {
my ($log, $logfile, $config);
if (exists $session{config}{logfile}) {
$logfile = $session{config}{logfile};
} else {
use Data::Config;
$config = new Data::Config '../etc/WebGUI.conf';
$logfile = $config->param('logfile');
}
$log = FileHandle->new(">>".$logfile) or fatalError("Can't open log file for warning.");
print $log localtime(time)." ".$0." WARNING: ".$_[0]."\n";
$log->close;
}
1;

View file

@ -19,6 +19,7 @@ use WebGUI::Operation::Page;
use WebGUI::Operation::Settings;
use WebGUI::Operation::Style;
use WebGUI::Operation::Submission;
use WebGUI::Operation::Trash;
use WebGUI::Operation::User;

View file

@ -119,8 +119,12 @@ sub www_displayAccount {
$output .= '</form> ';
$output .= '<div class="accountOptions"><ul>';
if (WebGUI::Privilege::isInGroup(3) || WebGUI::Privilege::isInGroup(4)) {
if ($session{var}{adminOn}) {
$output .= '<li><a href="'.$session{page}{url}.'?op=switchOffAdmin">Turn admin off.</a>';
} else {
$output .= '<li><a href="'.$session{page}{url}.'?op=switchOnAdmin">Turn admin on.</a>';
}
}
$output .= '<li><a href="'.$session{page}{url}.'?op=logout">Logout.</a><li><a href="'.$session{page}{url}.'?op=deactivateAccount">Please deactivate my account permanently.</a></ul></div>';
} else {
$output .= 'You need to be logged in to view your account information.<p>';

View file

@ -115,33 +115,37 @@ sub www_editGroupSave {
#-------------------------------------------------------------------
sub www_listGroups {
my ($output, $sth, @data, $totalItems, $currentPage, $itemsPerPage);
my ($output, $pn, $sth, @data, @row, $i, $itemsPerPage);
if (WebGUI::Privilege::isInGroup(3)) {
$itemsPerPage = 50;
if ($session{form}{pageNumber} < 1) {
$currentPage = 1;
} else {
$currentPage = $session{form}{pageNumber};
}
($totalItems) = WebGUI::SQL->quickArray("select count(*) from groups where groupName<>'Reserved'",$session{dbh});
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=10"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a><h1>Groups</h1>';
$output .= '<div align="center"><a href="'.$session{page}{url}.'?op=addGroup">Add a new group.</a></div>';
$output .= '<table border=1 cellpadding=5 cellspacing=0 align="center">';
$sth = WebGUI::SQL->read("select groupId,groupName,description from groups where groupName<>'Reserved' order by groupName limit ".(($currentPage*$itemsPerPage)-$itemsPerPage).",".$itemsPerPage,$session{dbh});
$sth = WebGUI::SQL->read("select groupId,groupName,description from groups where groupName<>'Reserved' order by groupName",$session{dbh});
while (@data = $sth->array) {
$output .= '<tr><td valign="top"><a href="'.$session{page}{url}.'?op=deleteGroup&gid='.$data[0].'"><img src="'.$session{setting}{lib}.'/delete.gif" border=0></a><a href="'.$session{page}{url}.'?op=editGroup&gid='.$data[0].'"><img src="'.$session{setting}{lib}.'/edit.gif" border=0></a></td>';
$output .= '<td valign="top">'.$data[1].'</td>';
$output .= '<td valign="top">'.$data[2].'</td></tr>';
$row[$i] = '<tr><td valign="top"><a href="'.$session{page}{url}.'?op=deleteGroup&gid='.$data[0].'"><img src="'.$session{setting}{lib}.'/delete.gif" border=0></a><a href="'.$session{page}{url}.'?op=editGroup&gid='.$data[0].'"><img src="'.$session{setting}{lib}.'/edit.gif" border=0></a></td>';
$row[$i] .= '<td valign="top">'.$data[1].'</td>';
$row[$i] .= '<td valign="top">'.$data[2].'</td></tr>';
$i++;
}
$output .= '</table><div class="pagination">';
if ($currentPage > 1) {
$output .= '<a href="'.$session{page}{url}.'?op=listGroups&pageNumber='.($currentPage-1).'">&laquo;Previous Page</a>';
if ($session{form}{pn} < 1) {
$pn = 0;
} else {
$pn = $session{form}{pn};
}
for ($i=($itemsPerPage*$pn); $i<($itemsPerPage*($pn+1));$i++) {
$output .= $row[$i];
}
$output .= '</table>';
$output .= '<div class="pagination">';
if ($pn > 0) {
$output .= '<a href="'.$session{page}{url}.'?pn='.($pn-1).'&op=listGroups">&laquo;Previous Page</a>';
} else {
$output .= '&laquo;Previous Page';
}
$output .= ' &middot; ';
if ($currentPage < round($totalItems/$itemsPerPage)) {
$output .= '<a href="'.$session{page}{url}.'?op=listGroups&pageNumber='.($currentPage+1).'">Next Page&raquo;</a>';
if ($pn < round($#row/$itemsPerPage)) {
$output .= '<a href="'.$session{page}{url}.'?pn='.($pn+1).'&op=listGroups">Next Page&raquo;</a>';
} else {
$output .= 'Next Page&raquo;';
}

View file

@ -40,7 +40,7 @@ sub www_editSettings {
$output .= '<tr><td></td><td>'.WebGUI::Form::submit("save").'</td></tr>';
$output .= '</table>';
$output .= '</form> ';
$output .= '<hr size=1>Build Version: '.$session{wg}{version}.'<br>Release Date: '.$session{wg}{date};
$output .= '<hr size=1>Build Version: '.$WebGUI::VERSION;
} else {
$output = WebGUI::Privilege::insufficient();
}

View file

@ -112,32 +112,36 @@ sub www_editStyleSave {
#-------------------------------------------------------------------
sub www_listStyles {
my ($output, $sth, @data, $totalItems, $currentPage, $itemsPerPage);
my ($output, $pn, $sth, @data, @row, $i, $itemsPerPage);
if (WebGUI::Privilege::isInGroup(3)) {
$itemsPerPage = 50;
if ($session{form}{pageNumber} < 1) {
$currentPage = 1;
} else {
$currentPage = $session{form}{pageNumber};
}
($totalItems) = WebGUI::SQL->quickArray("select count(*) from style where name<>'Reserved'",$session{dbh});
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=9"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a><h1>Styles</h1>';
$output .= '<div align="center"><a href="'.$session{page}{url}.'?op=addStyle">Add a new style.</a></div>';
$output .= '<table border=1 cellpadding=5 cellspacing=0 align="center">';
$sth = WebGUI::SQL->read("select styleId,name from style where name<>'Reserved' order by name limit ".(($currentPage*$itemsPerPage)-$itemsPerPage).",".$itemsPerPage,$session{dbh});
$sth = WebGUI::SQL->read("select styleId,name from style where name<>'Reserved' order by name",$session{dbh});
while (@data = $sth->array) {
$output .= '<tr><td valign="top"><a href="'.$session{page}{url}.'?op=deleteStyle&sid='.$data[0].'"><img src="'.$session{setting}{lib}.'/delete.gif" border=0></a><a href="'.$session{page}{url}.'?op=editStyle&sid='.$data[0].'"><img src="'.$session{setting}{lib}.'/edit.gif" border=0></a></td>';
$output .= '<td valign="top">'.$data[1].'</td>';
$row[$i] = '<tr><td valign="top"><a href="'.$session{page}{url}.'?op=deleteStyle&sid='.$data[0].'"><img src="'.$session{setting}{lib}.'/delete.gif" border=0></a><a href="'.$session{page}{url}.'?op=editStyle&sid='.$data[0].'"><img src="'.$session{setting}{lib}.'/edit.gif" border=0></a></td>';
$row[$i] .= '<td valign="top">'.$data[1].'</td></tr>';
$i++;
}
$output .= '</table><div class="pagination">';
if ($currentPage > 1) {
$output .= '<a href="'.$session{page}{url}.'?op=listGroups&pageNumber='.($currentPage-1).'">&laquo;Previous Page</a>';
if ($session{form}{pn} < 1) {
$pn = 0;
} else {
$pn = $session{form}{pn};
}
for ($i=($itemsPerPage*$pn); $i<($itemsPerPage*($pn+1));$i++) {
$output .= $row[$i];
}
$output .= '</table>';
$output .= '<div class="pagination">';
if ($pn > 0) {
$output .= '<a href="'.$session{page}{url}.'?pn='.($pn-1).'&op=listStyles">&laquo;Previous Page</a>';
} else {
$output .= '&laquo;Previous Page';
}
$output .= ' &middot; ';
if ($currentPage < round($totalItems/$itemsPerPage)) {
$output .= '<a href="'.$session{page}{url}.'?op=listGroups&pageNumber='.($currentPage+1).'">Next Page&raquo;</a>';
if ($pn < round($#row/$itemsPerPage)) {
$output .= '<a href="'.$session{page}{url}.'?pn='.($pn+1).'&op=listStyles">Next Page&raquo;</a>';
} else {
$output .= 'Next Page&raquo;';
}

View file

@ -0,0 +1,71 @@
package WebGUI::Operation::Trash;
#-------------------------------------------------------------------
# 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 qw(vars subs);
use WebGUI::Privilege;
use WebGUI::Session;
use WebGUI::SQL;
use WebGUI::Utility;
our @ISA = qw(Exporter);
our @EXPORT = qw(&www_purgeTrash &www_purgeTrashConfirm);
#-------------------------------------------------------------------
sub _purgeWidgets {
my ($b, $widgetId, $widgetType, $func);
$b = WebGUI::SQL->read("select widgetId, widgetType from widget where pageId=$_[0]",$session{dbh});
while (($widgetId,$widgetType) = $b->array) {
$func = "WebGUI::Widget::".$widgetType."::purge";
&$func($widgetId,$session{dbh});
}
$b->finish;
}
#-------------------------------------------------------------------
sub _recursePageTree {
my ($a, $pageId);
$a = WebGUI::SQL->read("select pageId from page where parentId=$_[0]",$session{dbh});
while (($pageId) = $a->array) {
_recursePageTree($pageId);
_purgeWidgets($pageId);
WebGUI::SQL->write("delete from page where pageId=$pageId",$session{dbh});
}
$a->finish;
}
#-------------------------------------------------------------------
sub www_purgeTrash {
my ($output);
if (WebGUI::Privilege::isInGroup(3)) {
$output = '<h1>Please Confirm</h1>';
$output .= 'Are you certain that you wish to purge all the pages and widgets in the trash?<p>';
$output .= '<div align="center"><a href="'.$session{page}{url}.'?op=purgeTrashConfirm">Yes, I\'m sure.</a>';
$output .= '&nbsp;&nbsp;&nbsp;&nbsp;<a href="'.$session{page}{url}.'">No, I made a mistake.</a></div>';
return $output;
} else {
return WebGUI::Privilege::insufficient();
}
}
#-------------------------------------------------------------------
sub www_purgeTrashConfirm {
if (WebGUI::Privilege::isInGroup(3)) {
_recursePageTree(3);
_purgeWidgets(3);
return "";
} else {
return WebGUI::Privilege::insufficient();
}
}
1;

View file

@ -138,34 +138,38 @@ sub www_editUserSave {
#-------------------------------------------------------------------
sub www_listUsers {
my ($output, $sth, @data, $totalItems, $currentPage, $itemsPerPage);
my ($output, $sth, @data, @row, $pn, $i, $itemsPerPage);
if (WebGUI::Privilege::isInGroup(3)) {
$itemsPerPage = 50;
if ($session{form}{pageNumber} < 1) {
$currentPage = 1;
} else {
$currentPage = $session{form}{pageNumber};
}
($totalItems) = WebGUI::SQL->quickArray("select count(*) from user where username<>'Reserved'",$session{dbh});
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=8"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a><h1>Users</h1>';
$output .= '<div align="center"><a href="'.$session{page}{url}.'?op=addUser">Add a new user.</a></div>';
$output .= '<table border=1 cellpadding=5 cellspacing=0 align="center">';
$sth = WebGUI::SQL->read("select userId,username,email from user where username<>'Reserved' order by username limit ".(($currentPage*$itemsPerPage)-$itemsPerPage).",".$itemsPerPage,$session{dbh});
$sth = WebGUI::SQL->read("select userId,username,email from user where username<>'Reserved' order by username",$session{dbh});
while (@data = $sth->array) {
$output .= '<tr><td><a href="'.$session{page}{url}.'?op=deleteUser&uid='.$data[0].'"><img src="'.$session{setting}{lib}.'/delete.gif" border=0></a><a href="'.$session{page}{url}.'?op=editUser&uid='.$data[0].'"><img src="'.$session{setting}{lib}.'/edit.gif" border=0></a></td>';
#$output .= '<td><a href="'.$session{page}{url}.'?op=viewUserProfile&uid='.$data[0].'">'.$data[1].'</a></td>';
$output .= '<td>'.$data[1].'</td>';
$output .= '<td><a href="mailto:'.$data[2].'">'.$data[2].'</a></td></tr>';
$row[$i] = '<tr><td><a href="'.$session{page}{url}.'?op=deleteUser&uid='.$data[0].'"><img src="'.$session{setting}{lib}.'/delete.gif" border=0></a><a href="'.$session{page}{url}.'?op=editUser&uid='.$data[0].'"><img src="'.$session{setting}{lib}.'/edit.gif" border=0></a></td>';
#$row[$i] .= '<td><a href="'.$session{page}{url}.'?op=viewUserProfile&uid='.$data[0].'">'.$data[1].'</a></td>';
$row[$i] .= '<td>'.$data[1].'</td>';
$row[$i] .= '<td><a href="mailto:'.$data[2].'">'.$data[2].'</a></td></tr>';
$i++;
}
$output .= '</table><div class="pagination">';
if ($currentPage > 1) {
$output .= '<a href="'.$session{page}{url}.'?op=listUsers&pageNumber='.($currentPage-1).'">&laquo;Previous Page</a>';
if ($session{form}{pn} < 1) {
$pn = 0;
} else {
$pn = $session{form}{pn};
}
for ($i=($itemsPerPage*$pn); $i<($itemsPerPage*($pn+1));$i++) {
$output .= $row[$i];
}
$output .= '</table>';
$output .= '<div class="pagination">';
if ($pn > 0) {
$output .= '<a href="'.$session{page}{url}.'?pn='.($pn-1).'&op=listUsers">&laquo;Previous Page</a>';
} else {
$output .= '&laquo;Previous Page';
}
$output .= ' &middot; ';
if ($currentPage < round($totalItems/$itemsPerPage)) {
$output .= '<a href="'.$session{page}{url}.'?op=listUsers&pageNumber='.($currentPage+1).'">Next Page&raquo;</a>';
if ($pn < round($#row/$itemsPerPage)) {
$output .= '<a href="'.$session{page}{url}.'?pn='.($pn+1).'&op=listUsers">Next Page&raquo;</a>';
} else {
$output .= 'Next Page&raquo;';
}

View file

@ -65,7 +65,7 @@ sub isInGroup {
}
($result) = WebGUI::SQL->quickArray("select count(*) from groupings where groupId='$gid' && userId='$uid'",$session{dbh});
if ($result < 1 && $gid == 1) { # registered users can
isInGroup(2, $uid); # do anything visitors
$result = isInGroup(2, $uid); # do anything visitors
} # can do
return $result;
}

View file

@ -14,6 +14,7 @@ use CGI::Carp qw(fatalsToBrowser);
use DBI;
use strict;
use Tie::IxHash;
use WebGUI::ErrorHandler;
# Note: This class is really not necessary, I just decided to wrapper DBI in case
# I wanted to change to some other DB connector in the future. Also, it shorthands
@ -21,7 +22,7 @@ use Tie::IxHash;
#-------------------------------------------------------------------
sub array {
return $_[0]->{_sth}->fetchrow_array() or croak DBI->errstr;
return $_[0]->{_sth}->fetchrow_array() or WebGUI::ErrorHandler::fatalError(DBI->errstr);
}
#-------------------------------------------------------------------
@ -56,7 +57,7 @@ sub finish {
#-------------------------------------------------------------------
sub hash {
return $_[0]->{_sth}->fetchrow_hashref() or croak DBI->errstr;
return $_[0]->{_sth}->fetchrow_hashref() or WebGUI::ErrorHandler::fatalError(DBI->errstr);
}
#-------------------------------------------------------------------
@ -65,8 +66,8 @@ sub new {
$class = shift;
$sql = shift;
$dbh = shift;
$sth = $dbh->prepare($sql) or croak "Couldn't prepare statement: ".$sql." : ". DBI->errstr;
$sth->execute or croak "Couldn't execute statement: ".$sql." : ". DBI->errstr;
$sth = $dbh->prepare($sql) or WebGUI::ErrorHandler::fatalError("Couldn't prepare statement: ".$sql." : ". DBI->errstr);
$sth->execute or WebGUI::ErrorHandler::fatalError("Couldn't execute statement: ".$sql." : ". DBI->errstr);
bless ({_sth => $sth}, $class);
}
@ -97,9 +98,9 @@ sub read {
#-------------------------------------------------------------------
sub write {
$_[2]->do($_[1]) or croak "Couldn't prepare statement: ".$_[1]." : ". DBI->errstr;
$_[2]->do($_[1]) or WebGUI::ErrorHandler::fatalError("Couldn't prepare statement: ".$_[1]." : ". DBI->errstr);
}
1;

View file

@ -14,7 +14,7 @@ use CGI;
use DBI;
use Exporter;
use strict;
use WebGUI::Config;
use Data::Config;
use WebGUI::SQL;
our @ISA = qw(Exporter);
@ -93,9 +93,8 @@ sub httpRedirect {
#-------------------------------------------------------------------
sub open {
my ($key, %WebGUI, %CONFIG, %VARS, %PAGE, %FORM, $query, %COOKIES, $config, %USER, %SETTINGS, $dbh);
%WebGUI = (version=>"0.12.0", date=>"2001-08-26");
$config = new WebGUI::Config '../etc/WebGUI.conf';
my ($key, %CONFIG, %VARS, %PAGE, %FORM, $query, %COOKIES, $config, %USER, %SETTINGS, $dbh);
$config = new Data::Config '../etc/WebGUI.conf';
foreach ($config->param) {
$CONFIG{$_} = $config->param($_);
}
@ -124,7 +123,6 @@ sub open {
page => \%PAGE, # variables related to the current page
header => {}, # settings to be passed back through the http header
dbh => $dbh, # interface to the default WebGUI database
wg => \%WebGUI # WebGUI internal settings
);
}

View file

@ -19,7 +19,7 @@ use WebGUI::SQL;
use WebGUI::Utility;
our @ISA = qw(Exporter);
our @EXPORT = qw(&www_jumpDown &www_jumpUp &update &www_moveUp &www_moveDown &www_delete &www_deleteConfirm &www_cut &create &www_paste);
our @EXPORT = qw(&purgeWidget &www_jumpDown &www_jumpUp &update &www_moveUp &www_moveDown &www_delete &www_deleteConfirm &www_cut &create &www_paste);
#-------------------------------------------------------------------
sub _reorderWidgets {
@ -46,6 +46,11 @@ sub update {
WebGUI::SQL->write("update widget set title=".quote($session{form}{title}).", displayTitle='$session{form}{displayTitle}', description=".quote($session{form}{description}).", processMacros='$session{form}{processMacros}', lastEdited=now(), editedBy='$session{user}{userId}' where widgetId=$session{form}{wid}",$session{dbh});
}
#-------------------------------------------------------------------
sub purgeWidget {
WebGUI::SQL->write("delete from widget where widgetId=$_[0]",$_[1]);
}
#-------------------------------------------------------------------
sub www_cut {
if (WebGUI::Privilege::canEditPage()) {

View file

@ -18,6 +18,12 @@ use WebGUI::SQL;
use WebGUI::Utility;
use WebGUI::Widget;
#-------------------------------------------------------------------
sub purge {
WebGUI::SQL->write("delete from Article where widgetId=$_[0]",$_[1]);
purgeWidget($_[0],$_[1]);
}
#-------------------------------------------------------------------
sub widgetName {
return "Article";
@ -41,6 +47,7 @@ sub www_add {
$output .= '<tr><td class="formDescription">Link Title</td><td>'.WebGUI::Form::text("linkTitle",20,30).'</td></tr>';
$output .= '<tr><td class="formDescription">Link URL</td><td>'.WebGUI::Form::text("linkURL",20,2048).'</td></tr>';
$output .= '<tr><td class="formDescription">Attachment</td><td>'.WebGUI::Form::file("attachment").'</td></tr>';
$output .= '<tr><td class="formDescription">Convert Carriage Returns</td><td>'.WebGUI::Form::checkbox("convertCarriageReturns",1).' <span style="font-size: 8pt;">(check if you\'re not adding &lt;br&gt; manually)</span></td></tr>';
$output .= '<tr><td></td><td>'.WebGUI::Form::submit("save").'</td></tr>';
$output .= '</table></form>';
return $output;
@ -57,7 +64,7 @@ sub www_addSave {
$widgetId = create();
$image = saveAttachment("image",$widgetId);
$attachment = saveAttachment("attachment",$widgetId);
WebGUI::SQL->write("insert into Article set widgetId=$widgetId, startDate='".humanToMysqlDate($session{form}{startDate})."', endDate='".humanToMysqlDate($session{form}{endDate})."', body=".quote($session{form}{body}).", image=".quote($image).", linkTitle=".quote($session{form}{linkTitle}).", linkURL=".quote($session{form}{linkURL}).", attachment=".quote($attachment),$session{dbh});
WebGUI::SQL->write("insert into Article set widgetId=$widgetId, startDate='".humanToMysqlDate($session{form}{startDate})."', endDate='".humanToMysqlDate($session{form}{endDate})."', convertCarriageReturns='$session{form}{convertCarriageReturns}', body=".quote($session{form}{body}).", image=".quote($image).", linkTitle=".quote($session{form}{linkTitle}).", linkURL=".quote($session{form}{linkURL}).", attachment=".quote($attachment),$session{dbh});
return "";
} else {
return WebGUI::Privilege::insufficient();
@ -88,7 +95,7 @@ sub www_deleteImage {
sub www_edit {
my ($output, %article);
if (WebGUI::Privilege::canEditPage()) {
%article = WebGUI::SQL->quickHash("select widget.title, widget.displayTitle, date_format(Article.startDate,'%m/%d/%Y') as start, date_format(Article.endDate,'%m/%d/%Y') as end, Article.body, Article.image, Article.linkTitle, Article.linkURL, Article.attachment, widget.processMacros from widget left join Article on (widget.widgetId=Article.widgetId) where widget.widgetId=$session{form}{wid}",$session{dbh});
%article = WebGUI::SQL->quickHash("select widget.title, widget.displayTitle, date_format(Article.startDate,'%m/%d/%Y') as start, date_format(Article.endDate,'%m/%d/%Y') as end, Article.body, Article.image, Article.linkTitle, Article.linkURL, Article.attachment, widget.processMacros, Article.convertCarriageReturns from widget left join Article on (widget.widgetId=Article.widgetId) where widget.widgetId=$session{form}{wid}",$session{dbh});
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=24"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a><h1>Edit Article</h1><form method="post" enctype="multipart/form-data" action="'.$session{page}{url}.'">';
$output .= WebGUI::Form::hidden("wid",$session{form}{wid});
$output .= WebGUI::Form::hidden("func","editSave");
@ -111,6 +118,7 @@ sub www_edit {
} else {
$output .= '<tr><td class="formDescription">Attachment</td><td>'.WebGUI::Form::file("attachment").'</td></tr>';
}
$output .= '<tr><td class="formDescription">Convert Carriage Returns</td><td>'.WebGUI::Form::checkbox("convertCarriageReturns",1,$article{convertCarriageReturns}).' <span style="font-size: 8pt;">(check if you\'re not adding &lt;br&gt; manually)</span></td></tr>';
$output .= '<tr><td></td><td>'.WebGUI::Form::submit("save").'</td></tr>';
$output .= '</table></form>';
return $output;
@ -132,7 +140,7 @@ sub www_editSave {
if ($attachment ne "") {
$attachment = ', attachment='.quote($attachment);
}
WebGUI::SQL->write("update Article set startDate='".humanToMysqlDate($session{form}{startDate})."', endDate='".humanToMysqlDate($session{form}{endDate})."', body=".quote($session{form}{body}).", linkTitle=".quote($session{form}{linkTitle}).", linkURL=".quote($session{form}{linkURL}).$attachment.$image." where widgetId=$session{form}{wid}",$session{dbh});
WebGUI::SQL->write("update Article set startDate='".humanToMysqlDate($session{form}{startDate})."', endDate='".humanToMysqlDate($session{form}{endDate})."', convertCarriageReturns='$session{form}{convertCarriageReturns}', body=".quote($session{form}{body}).", linkTitle=".quote($session{form}{linkTitle}).", linkURL=".quote($session{form}{linkURL}).$attachment.$image." where widgetId=$session{form}{wid}",$session{dbh});
return "";
} else {
return WebGUI::Privilege::insufficient();
@ -143,14 +151,17 @@ sub www_editSave {
sub www_view {
my (%data, @test, $output, $widgetId);
$widgetId = shift;
%data = WebGUI::SQL->quickHash("select widget.title, widget.displayTitle, widget.processMacros, Article.body, Article.image, Article.linkTitle, Article.linkURL, Article.attachment from widget,Article where widget.widgetId='$widgetId' and widget.WidgetId=Article.widgetId and Article.startDate<now() and Article.endDate>now()",$session{dbh});
%data = WebGUI::SQL->quickHash("select widget.title, widget.displayTitle, widget.processMacros, Article.body, Article.image, Article.linkTitle, Article.linkURL, Article.attachment, Article.convertCarriageReturns from widget,Article where widget.widgetId='$widgetId' and widget.WidgetId=Article.widgetId and Article.startDate<now() and Article.endDate>now()",$session{dbh});
if (defined %data) {
if ($data{displayTitle} == 1) {
$output = "<h2>".$data{title}."</h2>";
$output = "<h1>".$data{title}."</h1>";
}
if ($data{image} ne "") {
$output .= '<img src="'.$session{setting}{attachmentDirectoryWeb}.'/'.$widgetId.'/'.$data{image}.'" border="0" align="right">';
}
if ($data{convertCarriageReturns}) {
$data{body} =~ s/\n/\<br\>/g;
}
$output .= $data{body};
if ($data{linkURL} ne "" && $data{linkTitle} ne "") {
$output .= '<p><a href="'.$data{linkURL}.'">'.$data{linkTitle}.'</a>';

View file

@ -18,6 +18,12 @@ use WebGUI::SQL;
use WebGUI::Utility;
use WebGUI::Widget;
#-------------------------------------------------------------------
sub purge {
WebGUI::SQL->write("delete from event where widgetId=$_[0]",$_[1]);
purgeWidget($_[0],$_[1]);
}
#-------------------------------------------------------------------
sub widgetName {
return "Events Calendar";
@ -193,12 +199,12 @@ sub www_view {
%data = WebGUI::SQL->quickHash("select * from widget where widget.widgetId='$widgetId'",$session{dbh});
if (defined %data) {
if ($data{displayTitle}) {
$output = "<h2>".$data{title}."</h2>";
$output = "<h1>".$data{title}."</h1>";
}
if ($data{description} ne "") {
$output .= $data{description}.'<p>';
}
$sth = WebGUI::SQL->read("select name, description, date_format(startDate,'%M'), date_format(startDate,'%e'), date_format(startDate,'%Y'), date_format(endDate,'%e') from event where widgetId='$widgetId' and startDate>now() order by startDate",$session{dbh});
$sth = WebGUI::SQL->read("select name, description, date_format(startDate,'%M'), date_format(startDate,'%e'), date_format(startDate,'%Y'), date_format(endDate,'%e') from event where widgetId='$widgetId' and to_days(startDate)>(to_days(now())-1) order by startDate",$session{dbh});
while (@event = $sth->array) {
$output .= "<b>$event[2] $event[3]";
if ($event[3] ne $event[5]) {

View file

@ -17,6 +17,12 @@ use WebGUI::SQL;
use WebGUI::Utility;
use WebGUI::Widget;
#-------------------------------------------------------------------
sub purge {
WebGUI::SQL->write("delete from ExtraColumn where widgetId=$_[0]",$_[1]);
purgeWidget($_[0],$_[1]);
}
#-------------------------------------------------------------------
sub widgetName {
return "Extra Column";

View file

@ -29,6 +29,12 @@ sub _reorderQuestions {
$sth->finish;
}
#-------------------------------------------------------------------
sub purge {
WebGUI::SQL->write("delete from faqQuestion where widgetId=$_[0]",$_[1]);
purgeWidget($_[0],$_[1]);
}
#-------------------------------------------------------------------
sub widgetName {
return "F.A.Q.";
@ -103,7 +109,7 @@ sub www_deleteQuestion {
my ($output);
if (WebGUI::Privilege::canEditPage()) {
$output = '<h1>Please Confirm</h1>';
$output = 'Are you certain that you want to delete this question?<p><div align="center"><a href="'.$session{page}{url}.'?func=deleteQuestionConfirm&wid='.$session{form}{wid}.'&lid='.$session{form}{lid}.'">Yes, I\'m sure.</a> &nbsp; <a href="'.$session{page}{url}.'?func=edit&wid='.$session{form}{wid}.'">No, I made a mistake.</a></div>';
$output = 'Are you certain that you want to delete this question?<p><div align="center"><a href="'.$session{page}{url}.'?func=deleteQuestionConfirm&wid='.$session{form}{wid}.'&qid='.$session{form}{qid}.'">Yes, I\'m sure.</a> &nbsp; <a href="'.$session{page}{url}.'?func=edit&wid='.$session{form}{wid}.'">No, I made a mistake.</a></div>';
return $output;
} else {
return WebGUI::Privilege::insufficient();
@ -186,7 +192,7 @@ sub www_editQuestion {
sub www_editQuestionSave {
if (WebGUI::Privilege::canEditPage()) {
WebGUI::SQL->write("update faqQuestion set question=".quote($session{form}{question}).", answer=".quote($session{form}{answer})." where questionId=$session{form}{qid}",$session{dbh});
return "";
return www_edit();
} else {
return WebGUI::Privilege::insufficient();
}
@ -231,7 +237,7 @@ sub www_view {
%data = WebGUI::SQL->quickHash("select * from widget where widget.widgetId='$widgetId'",$session{dbh});
if (defined %data) {
if ($data{displayTitle} == 1) {
$output = "<h2>".$data{title}."</h2>";
$output = "<h1>".$data{title}."</h1>";
}
if ($data{description} ne "") {
$output .= $data{description};

View file

@ -29,6 +29,12 @@ sub _reorderLinks {
$sth->finish;
}
#-------------------------------------------------------------------
sub purge {
WebGUI::SQL->write("delete from link where widgetId=$_[0]",$_[1]);
purgeWidget($_[0],$_[1]);
}
#-------------------------------------------------------------------
sub widgetName {
return "Link List";
@ -234,7 +240,7 @@ sub www_view {
%data = WebGUI::SQL->quickHash("select * from widget where widget.widgetId='$widgetId'",$session{dbh});
if (defined %data) {
if ($data{displayTitle}) {
$output = "<h2>".$data{title}."</h2>";
$output = "<h1>".$data{title}."</h1>";
}
if ($data{description} ne "") {
$output .= $data{description}.'<p>';

View file

@ -43,6 +43,13 @@ sub _traverseReplyTree {
return $html;
}
#-------------------------------------------------------------------
sub purge {
WebGUI::SQL->write("delete from message where widgetId=$_[0]",$_[1]);
WebGUI::SQL->write("delete from MessageBoard where widgetId=$_[0]",$_[1]);
purgeWidget($_[0],$_[1]);
}
#-------------------------------------------------------------------
sub widgetName {
return "Message Board";
@ -310,18 +317,12 @@ sub www_showMessage {
#-------------------------------------------------------------------
sub www_view {
my ($sth, @data, $html, %board, $itemsPerPage, $currentPage, $totalItems);
my ($sth, @data, $html, %board, $itemsPerPage, $i, @row, $pn);
%board = _getBoardProperties($_[0]);
$itemsPerPage = $board{messagesPerPage};
if ($session{form}{pageNumber} < 1) {
$currentPage = 1;
} else {
$currentPage = $session{form}{pageNumber};
}
if ($board{description} ne "") {
$html .= $board{description}.'<p>';
}
($totalItems) = WebGUI::SQL->quickArray("select count(*) from message where widgetId=$_[0]",$session{dbh});
$html .= '<table width="100%"><tr><td class="boardTitle">';
if ($board{displayTitle}) {
$html .= $board{title};
@ -329,21 +330,29 @@ sub www_view {
$html .= '</td><td align="right" valign="bottom" class="boardMenu"><a href="'.$session{page}{url}.'?func=postNewMessage&wid='.$_[0].'">Post New Message</a></td></tr></table>';
$html .= '<table border=0 cellpadding=2 cellspacing=1 width="100%">';
$html .= '<tr><td class="tableHeader">Subject</td><td class="tableHeader">Author</td><td class="tableHeader">Thread Started</td><td class="tableHeader">Replies</td><td class="tableHeader">Last Reply</td></tr>';
$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});
$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", $session{dbh});
while (@data = $sth->array) {
$html .= '<tr><td class="tableData"><a href="'.$session{page}{url}.'?func=showMessage&mid='.$data[0].'&wid='.$_[0].'">'.$data[1].'</a></td><td class="tableData">'.$data[3].'</td><td class="tableData">'.$data[4].'</td><td class="tableData">'.$data[2].'</td><td class="tableData"><a href="'.$session{page}{url}.'?func=showMessage&mid='.$data[6].'&wid='.$_[0].'">'.$data[5].'</a></td></tr>';
$row[$i] = '<tr><td class="tableData"><a href="'.$session{page}{url}.'?func=showMessage&mid='.$data[0].'&wid='.$_[0].'">'.$data[1].'</a></td><td class="tableData">'.$data[3].'</td><td class="tableData">'.$data[4].'</td><td class="tableData">'.$data[2].'</td><td class="tableData"><a href="'.$session{page}{url}.'?func=showMessage&mid='.$data[6].'&wid='.$_[0].'">'.$data[5].'</a></td></tr>';
$i++;
}
$html .= "</table>";
$sth->finish;
if ($session{form}{pn} < 1) {
$pn = 0;
} else {
$pn = $session{form}{pn};
}
for ($i=($itemsPerPage*$pn); $i<($itemsPerPage*($pn+1));$i++) {
$html .= $row[$i];
}
$html .= '</table>';
$html .= '<div class="pagination">';
if ($currentPage > 1) {
$html .= '<a href="'.$session{page}{url}.'?pageNumber='.($currentPage-1).'">&laquo;Previous Page</a>';
if ($pn > 0) {
$html .= '<a href="'.$session{page}{url}.'?pn='.($pn-1).'">&laquo;Previous Page</a>';
} else {
$html .= '&laquo;Previous Page';
}
$html .= ' &middot; ';
if ($currentPage < round($totalItems/$itemsPerPage)) {
$html .= '<a href="'.$session{page}{url}.'?pageNumber='.($currentPage+1).'">Next Page&raquo;</a>';
if ($pn < round($#row/$itemsPerPage)) {
$html .= '<a href="'.$session{page}{url}.'?pn='.($pn+1).'">Next Page&raquo;</a>';
} else {
$html .= 'Next Page&raquo;';
}
@ -351,10 +360,4 @@ sub www_view {
return $html;
}
1;

View file

@ -24,7 +24,7 @@ sub _viewPoll {
%poll = WebGUI::SQL->quickHash("select * from widget,Poll where widget.widgetId=Poll.widgetId and widget.widgetId='$widgetId'",$session{dbh});
if (defined %poll) {
if ($poll{displayTitle} == 1) {
$output = "<h2>".$poll{title}."</h2>";
$output = "<h1>".$poll{title}."</h1>";
}
if ($poll{description} ne "") {
$output .= $poll{description}.'<p>';
@ -52,7 +52,7 @@ sub _viewResults {
%poll = WebGUI::SQL->quickHash("select * from widget,Poll where widget.widgetId=Poll.widgetId and widget.widgetId='$widgetId'",$session{dbh});
if (defined %poll) {
if ($poll{displayTitle} == 1) {
$output = "<h2>".$poll{title}."</h2>";
$output = "<h1>".$poll{title}."</h1>";
}
if ($poll{description} ne "") {
$output .= $poll{description}.'<p>';
@ -73,6 +73,13 @@ sub _viewResults {
return $output;
}
#-------------------------------------------------------------------
sub purge {
WebGUI::SQL->write("delete from pollAnswer where widgetId=$_[0]",$_[1]);
WebGUI::SQL->write("delete from Poll where widgetId=$_[0]",$_[1]);
purgeWidget($_[0],$_[1]);
}
#-------------------------------------------------------------------
sub widgetName {
return "Poll";

View file

@ -11,6 +11,7 @@ package WebGUI::Widget::SQLReport;
#-------------------------------------------------------------------
use strict;
use WebGUI::ErrorHandler;
use WebGUI::Macro;
use WebGUI::Privilege;
use WebGUI::Session;
@ -18,6 +19,12 @@ use WebGUI::SQL;
use WebGUI::Utility;
use WebGUI::Widget;
#-------------------------------------------------------------------
sub purge {
WebGUI::SQL->write("delete from SQLReport where widgetId=$_[0]",$_[1]);
purgeWidget($_[0],$_[1]);
}
#-------------------------------------------------------------------
sub widgetName {
return "SQL Report";
@ -108,7 +115,7 @@ sub www_view {
%data = WebGUI::SQL->quickHash("select * from widget,SQLReport where widget.widgetId=$widgetId and widget.widgetId=SQLReport.widgetId",$session{dbh});
if (defined %data) {
if ($data{displayTitle} == 1) {
$output = "<h2>".$data{title}."</h2>";
$output = "<h1>".$data{title}."</h1>";
}
if ($data{description} ne "") {
$output .= $data{description}.'<p>';
@ -119,9 +126,15 @@ sub www_view {
$dbh = DBI->connect($data{DSN},$data{username},$data{identifier});
} else {
$output .= '<b>Error</b>: The DSN specified is of an improper format.<p>';
WebGUI::ErrorHandler::warn("SQLReport [$widgetId] The DSN specified is of an improper format.");
}
if (defined $dbh) {
if ($data{dbQuery} =~ /select/i) {
$sth = WebGUI::SQL->read($data{dbQuery},$dbh);
} else {
$output .= '<b>Error</b>: The SQL query is improperly formatted.<p>';
WebGUI::ErrorHandler::warn("SQLReport [$widgetId] The SQL query is improperly formatted.");
}
if (defined $sth) {
while (@result = $sth->array) {
$temp = $template[1];
@ -133,11 +146,13 @@ sub www_view {
}
$sth->finish;
} else {
$output .= '<b>Error</b>: There was a problem with the query.';
$output .= '<b>Error</b>: There was a problem with the query.<p>';
WebGUI::ErrorHandler::warn("SQLReport [$widgetId] There was a problem with the query.");
}
$dbh->disconnect();
} else {
$output .= '<b>Error</b>: Could not connect to remote database.';
$output .= '<b>Error</b>: Could not connect to remote database.<p>';
WebGUI::ErrorHandler::warn("SQLReport [$widgetId] Could not connect to remote database.");
}
$output .= $template[2];
}

View file

@ -27,6 +27,7 @@ sub _mnogoSearch {
$dbh = DBI->connect($data{DSN},$data{username},$data{identifier});
} else {
$output .= '<b>Error</b>: The DSN specified is of an improper format.<p>';
WebGUI::ErrorHandler::warn("Search (MnoGo) The DSN specified is of an improper format.");
}
if (defined $dbh) {
foreach $word (@keyword) {
@ -38,6 +39,7 @@ sub _mnogoSearch {
$sth->finish;
} else {
$output .= '<b>Error</b>: There was a problem with the query.<p>';
WebGUI::ErrorHandler::warn("Search (MnoGo) There was a problem with the query.");
}
}
foreach $key (sort {$result{$b} <=> $result{$a}} keys %result) {
@ -50,10 +52,17 @@ sub _mnogoSearch {
$dbh->disconnect();
} else {
$output .= '<b>Error</b>: Could not connect to remote database.<p>';
WebGUI::ErrorHandler::warn("Search (MnoGo) Could not connect to remote database.");
}
return $output;
}
#-------------------------------------------------------------------
sub purge {
WebGUI::SQL->write("delete from SearchMnoGo where widgetId=$_[0]",$_[1]);
purgeWidget($_[0],$_[1]);
}
#-------------------------------------------------------------------
sub widgetName {
return "Search (MnoGo)";
@ -63,7 +72,7 @@ sub widgetName {
sub www_add {
my ($output);
if (WebGUI::Privilege::canEditPage()) {
$output = '<h1>Add Search (MnoGo)</h1><form method="post" enctype="multipart/form-data" action="'.$session{page}{url}.'">';
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=42"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a><h1>Add Search (MnoGo)</h1><form method="post" enctype="multipart/form-data" action="'.$session{page}{url}.'">';
$output .= WebGUI::Form::hidden("widget","SearchMnoGo");
$output .= WebGUI::Form::hidden("func","addSave");
$output .= '<table>';
@ -99,7 +108,7 @@ sub www_edit {
my ($output, %data);
if (WebGUI::Privilege::canEditPage()) {
%data = WebGUI::SQL->quickHash("select * from widget,SearchMnoGo where widget.widgetId=SearchMnoGo.widgetId and widget.widgetId=$session{form}{wid}",$session{dbh});
$output = '<h1>Edit Search (MnoGo)</h1><form method="post" enctype="multipart/form-data" action="'.$session{page}{url}.'">';
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=43"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a><h1>Edit Search (MnoGo)</h1><form method="post" enctype="multipart/form-data" action="'.$session{page}{url}.'">';
$output .= WebGUI::Form::hidden("wid",$session{form}{wid});
$output .= WebGUI::Form::hidden("func","editSave");
$output .= '<table>';
@ -135,7 +144,7 @@ sub www_view {
%data = WebGUI::SQL->quickHash("select * from widget,SearchMnoGo where widget.widgetId='$widgetId' and widget.WidgetId=SearchMnoGo.widgetId",$session{dbh});
if (%data) {
if ($data{displayTitle} == 1) {
$output = "<h2>".$data{title}."</h2>";
$output = "<h1>".$data{title}."</h1>";
}
if ($data{description} ne "") {
$output .= $data{description}.'<p>';

View file

@ -34,6 +34,12 @@ sub _traversePageTree {
return $output;
}
#-------------------------------------------------------------------
sub purge {
WebGUI::SQL->write("delete from SiteMap where widgetId=$_[0]",$_[1]);
purgeWidget($_[0],$_[1]);
}
#-------------------------------------------------------------------
sub widgetName {
return "Site Map";
@ -86,7 +92,7 @@ sub www_edit {
$output .= '<tr><td class="formDescription">Display title?</td><td>'.WebGUI::Form::checkbox("displayTitle",1,$data{displayTitle}).'</td></tr>';
$output .= '<tr><td class="formDescription">Description</td><td>'.WebGUI::Form::textArea("description",$data{description}).'</td></tr>';
$output .= '<tr><td class="formDescription">Starting from this level?</td><td>'.WebGUI::Form::checkbox("startAtThisLevel",1,$data{startAtThisLevel}).'</td></tr>';
$output .= '<tr><td class="formDescription">Show only one level?uuuu</td><td>'.WebGUI::Form::checkbox("showOnlyThisLevel",1,$data{showOnlyThisLevel}).'</td></tr>';
$output .= '<tr><td class="formDescription">Show only one level?</td><td>'.WebGUI::Form::checkbox("showOnlyThisLevel",1,$data{showOnlyThisLevel}).'</td></tr>';
$output .= '<tr><td></td><td>'.WebGUI::Form::submit("save").'</td></tr>';
$output .= '</table></form>';
return $output;

View file

@ -18,6 +18,12 @@ use WebGUI::SQL;
use WebGUI::Utility;
use WebGUI::Widget;
#-------------------------------------------------------------------
sub purge {
WebGUI::SQL->write("delete from SyndicatedContent where widgetId=$_[0]",$_[1]);
purgeWidget($_[0],$_[1]);
}
#-------------------------------------------------------------------
sub widgetName {
return "Syndicated Content";
@ -98,7 +104,7 @@ sub www_view {
%data = WebGUI::SQL->quickHash("select * from widget,SyndicatedContent where widget.widgetId=$widgetId",$session{dbh});
if (defined %data) {
if ($data{displayTitle} == 1) {
$output = "<h2>".$data{title}."</h2>";
$output = "<h1>".$data{title}."</h1>";
}
if ($data{description} ne "") {
$output .= $data{description}.'<p>';

View file

@ -17,6 +17,13 @@ use WebGUI::SQL;
use WebGUI::Utility;
use WebGUI::Widget;
#-------------------------------------------------------------------
sub purge {
WebGUI::SQL->write("delete from submission where widgetId=$_[0]",$_[1]);
WebGUI::SQL->write("delete from UserSubmission where widgetId=$_[0]",$_[1]);
purgeWidget($_[0],$_[1]);
}
#-------------------------------------------------------------------
sub widgetName {
return "User Submission System";
@ -27,7 +34,7 @@ sub www_add {
my ($output, %hash);
tie %hash, "Tie::IxHash";
if (WebGUI::Privilege::canEditPage()) {
$output = '<h1>Add User Submission System</h1><form method="post" enctype="multipart/form-data" action="'.$session{page}{url}.'">';
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=44"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a><h1>Add User Submission System</h1><form method="post" enctype="multipart/form-data" action="'.$session{page}{url}.'">';
$output .= WebGUI::Form::hidden("widget","UserSubmission");
$output .= WebGUI::Form::hidden("func","addSave");
$output .= '<table>';
@ -73,11 +80,12 @@ sub www_addSubmission {
$output .= '<tr><td class="formDescription">Content</td><td>'.WebGUI::Form::textArea("content",'',50,10,1).'</td></tr>';
$output .= '<tr><td class="formDescription">Image</td><td>'.WebGUI::Form::file("image").'</td></tr>';
$output .= '<tr><td class="formDescription">Attachment</td><td>'.WebGUI::Form::file("attachment").'</td></tr>';
$output .= '<tr><td class="formDescription">Convert Carriage Returns</td><td>'.WebGUI::Form::checkbox("convertCarriageReturns",1,1).' <span style="font-size: 8pt;">(uncheck if you\'re writing an HTML submission)</span></td></tr>';
$output .= '<tr><td></td><td>'.WebGUI::Form::submit("save").'</td></tr>';
$output .= '</table></form>';
$output .= '<table width="100%" cellspacing=1 cellpadding=2 border=0>';
$output .= '<tr><td class="tableHeader">Edit/Delete</td><td class="tableHeader">Title</td><td class="tableHeader">Date Submitted</td><td class="tableHeader">Status</td></tr>';
$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});
$sth = WebGUI::SQL->read("select title,submissionId,date_format(dateSubmitted,'%c/%e/%Y'),status from submission where widgetId='$session{form}{wid}' and userId=$session{user}{userId} order by dateSubmitted desc",$session{dbh});
while (@submission = $sth->array) {
$output .= '<tr><td class="tableData"><a href="'.$session{page}{url}.'?func=editSubmission&wid='.$session{form}{wid}.'&sid='.$submission[1].'"><img src="'.$session{setting}{lib}.'/edit.gif" border=0></a><a href="'.$session{page}{url}.'?wid='.$session{form}{wid}.'&sid='.$submission[1].'&func=deleteSubmission"><img src="'.$session{setting}{lib}.'/delete.gif" border=0></a></td><td class="tableData"><a href="'.$session{page}{url}.'?wid='.$session{form}{wid}.'&func=viewSubmission&sid='.$submission[1].'">'.$submission[0].'</a></td><td class="tableData">'.$submission[2].'</td><td class="tableData">'.$submission[3].'</td></tr>';
}
@ -91,13 +99,18 @@ sub www_addSubmission {
#-------------------------------------------------------------------
sub www_addSubmissionSave {
my ($submissionId, $image, $attachment, $status, $groupToContribute);
my ($title, $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},$submissionId);
$attachment = saveAttachment("attachment",$session{form}{wid},$submissionId);
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});
if ($session{form}{title} ne "") {
$title = $session{form}{title};
} else {
$title = "Untitled";
}
WebGUI::SQL->write("insert into submission set widgetId=$session{form}{wid}, submissionId=$submissionId, convertCarriageReturns='$session{form}{convertCarriageReturns}', title=".quote($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();
@ -158,7 +171,7 @@ 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 = '<h1>Edit User Submission System</h1><form method="post" enctype="multipart/form-data" action="'.$session{page}{url}.'">';
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=45"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a><h1>Edit User Submission System</h1><form method="post" enctype="multipart/form-data" action="'.$session{page}{url}.'">';
$output .= WebGUI::Form::hidden("wid",$session{form}{wid});
$output .= WebGUI::Form::hidden("func","editSave");
$output .= '<table>';
@ -214,6 +227,7 @@ sub www_editSubmission {
} else {
$output .= '<tr><td class="formDescription">Attachment</td><td>'.WebGUI::Form::file("attachment").'</td></tr>';
}
$output .= '<tr><td class="formDescription">Convert Carriage Returns</td><td>'.WebGUI::Form::checkbox("convertCarriageReturns",1,$submission{convertCarriageReturns}).' <span style="font-size: 8pt;">(uncheck if you\'re writing an HTML submission)</span></td></tr>';
$output .= '<tr><td></td><td>'.WebGUI::Form::submit("save").'</td></tr>';
$output .= '</table></form>';
return $output;
@ -225,7 +239,7 @@ sub www_editSubmission {
#-------------------------------------------------------------------
sub www_editSubmissionSave {
my ($owner,$status,$image,$attachment);
my ($owner,$status,$image,$attachment,$title);
($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});
@ -237,7 +251,12 @@ sub www_editSubmissionSave {
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});
if ($session{form}{title} ne "") {
$title = $session{form}{title};
} else {
$title = "Untitled";
}
WebGUI::SQL->write("update submission set convertCarriageReturns='$session{form}{convertCarriageReturns}', title=".quote($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();
@ -251,12 +270,12 @@ sub www_view {
%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 = "<h2>".$data{title}."</h2>";
$output = "<h1>".$data{title}."</h1>";
}
if ($data{description} ne "") {
$output .= $data{description}.'<p>';
}
$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});
$sth = WebGUI::SQL->read("select title,submissionId,date_format(dateSubmitted,'%c/%e/%Y'),username,userId from submission where widgetId='$widgetId' and status='Approved' order by dateSubmitted desc",$session{dbh});
while (@submission = $sth->array) {
$row[$i] = '<tr><td class="tableData"><a href="'.$session{page}{url}.'?wid='.$widgetId.'&func=viewSubmission&sid='.$submission[1].'">'.$submission[0].'</a></td><td class="tableData">'.$submission[2].'</td><td class="tableData">'.$submission[3].'</td></tr>';
$i++;
@ -295,7 +314,7 @@ sub www_view {
sub www_viewSubmission {
my ($output, %submission);
%submission = WebGUI::SQL->quickHash("select * from submission where submissionId=$session{form}{sid}",$session{dbh});
$output = "<h2>".$submission{title}."</h2>";
$output = "<h1>".$submission{title}."</h1>";
$output .= '<b>Submitted By:</b> '.$submission{username}.'<br>';
$output .= '<b>Date Submitted:</b> '.$submission{dateSubmitted}.'<p>';
if ($submission{image} ne "") {
@ -308,6 +327,9 @@ sub www_viewSubmission {
$output .= '<a href="'.$session{page}{url}.'?op=denySubmission&sid='.$session{form}{sid}.'">Deny</a> ';
$output .= '</div>';
}
if ($submission{convertCarriageReturns}) {
$submission{content} =~ s/\n/\<br\>/g;
}
$output .= $submission{content}.'<p>';
if ($submission{attachment} ne "") {
$output .= '<p><a href="'.$session{setting}{attachmentDirectoryWeb}.'/'.$session{form}{wid}.'/'.$session{form}{sid}.'/'.$submission{attachment}.'"><img src="'.$session{setting}{lib}.'/attachment.gif" border=0 alt="Download Attachment"></a><p>';

View file

@ -14,11 +14,11 @@ use DBI;
use HTTP::Request;
use LWP::UserAgent;
use strict;
use WebGUI::Config;
use Data::Config;
use WebGUI::SQL;
use XML::RSS;
my $config = new WebGUI::Config '../etc/WebGUI.conf';
my $config = new Data::Config '../etc/WebGUI.conf';
our $dbh = DBI->connect($config->param('dsn'), $config->param('dbuser'), $config->param('dbpass'));
deleteExpiredSessions();

161
testEnvironment.pl Normal file
View file

@ -0,0 +1,161 @@
#-------------------------------------------------------------------
# WebGUI is Copyright 2001 Plain Black Software.
#-------------------------------------------------------------------
# Please read the legal notices (docs/legal.txt) and the license
# (docs/license.txt) that came with this distribution before using
# this software.
#-------------------------------------------------------------------
# http://www.plainblack.com info@plainblack.com
#-------------------------------------------------------------------
BEGIN {
unshift (@INC, "./lib/");
}
use strict;
print "\nWebGUI is checking your system environment...\n\n";
###################################
# Checking Perl
###################################
print "Perl Interpreter:\t";
if ($] >= 5.006) {
print "OK\n";
} else {
print "Please upgrade to 5.6 or later!\n";
}
print "DBI module:\t\t";
if (eval { require DBI }) {
print "OK\n";
} else {
print "Please install.\n";
}
print "LWP module:\t\t";
if (eval { require LWP }) {
print "OK\n";
} else {
print "Please install.\n";
}
print "Tie::IxHash module:\t";
if (eval { require Tie::IxHash }) {
print "OK\n";
} else {
print "Please install.\n";
}
print "Mysql module:\t\t";
if (eval { require Mysql }) {
print "OK\n";
} else {
print "Please install.\n";
}
print "XML::RSS module:\t";
if (eval { require XML::RSS }) {
print "OK\n";
} else {
print "Please install.\n";
}
print "Digest::MD5 module:\t";
if (eval { require Digest::MD5 }) {
print "OK\n";
} else {
print "Please install.\n";
}
print "WebGUI modules:\t\t";
if (eval { require WebGUI }) {
print "OK\n";
} else {
print "Please install.\n";
}
print "Data::Config module:\t";
if (eval { require Data::Config }) {
print "OK\n";
} else {
print "Please install.\n";
}
###################################
# Checking Config File
###################################
print "Config file:\t\t";
use Data::Config;
my ($config);
$config = new Data::Config './etc/WebGUI.conf';
unless (defined $config) {
print "Couldn't open it.\n";
} elsif ($config->param('dsn') =~ /\s$/) {
print "DSN cannot end with a space.\n";
} elsif ($config->param('dsn') !~ /\DBI\:\w+\:\w+/) {
print "DSN is improperly formatted.\n";
} elsif ($config->param('dbuser') =~ /\s$/) {
print "dbuser cannot end with a space.\n";
} elsif ($config->param('dbuser') =~ /\s$/) {
print "dbpass cannot end with a space.\n";
} else {
print "OK\n";
}
###################################
# Checking database
###################################
print "Database connection:\t";
use DBI;
use WebGUI::SQL;
my ($dbh, $test);
$dbh = DBI->connect($config->param('dsn'), $config->param('dbuser'), $config->param('dbpass'));
unless (defined $dbh) {
print "Can't connect with info provided.\n";
} else {
print "OK\n";
print "Database tables:\t";
($test) = WebGUI::SQL->quickArray("select count(*) from page",$dbh);
if ($test < 1) {
print "Looks like you need to create some tables.\n";
} else {
print "OK\n";
}
$dbh->disconnect();
}
###################################
# Checking Version
###################################
print "Latest version:\t\t";
use LWP::UserAgent;
use HTTP::Request;
use HTTP::Headers;
use WebGUI;
my ($header, $userAgent, $request, $response, $version, $referer);
$userAgent = new LWP::UserAgent;
$userAgent->agent("WebGUI-Check/1.0");
$header = new HTTP::Headers;
$referer = "http://".`hostname`;
chomp $referer;
$referer .= "/getversion/";
$header->referer($referer);
$request = new HTTP::Request (GET => "http://www.plainblack.com/downloads/latest-version.txt", $header);
$response = $userAgent->request($request);
$version = $response->content;
chomp $version;
if ($version eq $WebGUI::VERSION) {
print "OK\n";
} else {
print "There is a newer version of WebGUI available.\n";
}
print "\nTesting complete!\n";

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

View file

@ -1,54 +0,0 @@
[include pages/header.include]
<table cellpadding=5 width=100%>
<tr>
<td valign="TOP" background="/football/golddither1.gif"><font face="helvetica,arial"><b><center><font size="+3">League News</center></font>
<li>The Draft will be held on Thursday Aug. 31 at Mike and Anita's house
<li>We have new divisions again this year. Those along with the new schedule will be posted on the site.
<li>We will need to decide on whether we want 2 extra playoff teams this year before we start the draft
<li>Remember to bring your $30 on draft night again.
</font></b></td>
<td background="/football/yellowdither1.gif" width=350>
<font face="helvetica,arial"><b><center><font size="+3">Standings</center></font>
[search-region arg="st=sql
fi=divisions
sq=select divid,divname from divisions order by divname
"]
[search-list]
<b><font face="helvetica,arial" size ="+2"><center>[item-param divname]</center></font></b>
[table-font face="helvetica,arial" size="+1"]
<table width=100% background=0>
[sql type=list base="teams" query="select teamid,teamname,wins,losses,clincheddivision from teams where divid=[item-param divid]"]
<tr> <td><b>[sql-param teamname]</b></td> <td align="right"><b>[sql-param wins]-[sql-param losses]</b></td></tr>
[/sql]
</table>
[/table-font]
[/search-list]
[/search-region]
</td>
</tr>
</table>
[include pages/footer.include]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View file

@ -1,5 +1,7 @@
#!/usr/bin/perl
print "Content-type: text/html\n\n";
use CGI;
my $cgi = CGI->new();
print $cgi->header;
foreach (keys %ENV) {
print $_."=".$ENV{$_}."<br>\n";

View file

@ -11,7 +11,7 @@
#-------------------------------------------------------------------
BEGIN {
unshift (@INC, "../lib/");
unshift (@INC, "../lib");
}
use CGI::Carp qw(fatalsToBrowser);