From 1cf655659f7358d48d9fb7fa85bb4da80ec8db40 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Sat, 13 Oct 2001 18:01:00 +0000 Subject: [PATCH] WebGUI 2.1.0 release --- docs/create.sql | 395 +++++++++-- docs/previousVersion.sql | 4 +- docs/upgrade_1.3.1-2.0.0.sql | 2 - docs/upgrade_2.0.0-2.1.0.sql | 323 +++++++++ etc/WebGUI.conf.original | 4 + extras/ieEdit.html | 537 ++++++++++++++ extras/ieEdit.js | 665 ++++++++++++++++++ extras/nonIeEdit.html | 109 +++ extras/nonIeEdit.js | 82 +++ extras/toolbar.gif | Bin 0 -> 6734 bytes lib/WebGUI.pm | 45 +- lib/WebGUI/DateTime.pm | 67 +- lib/WebGUI/Form.pm | 15 +- lib/WebGUI/{Macro/T.pm => International.pm} | 34 +- lib/WebGUI/Macro.pm | 9 +- lib/WebGUI/Macro/{P.pm => A_anyMenu.pm} | 29 +- lib/WebGUI/Macro/{At.pm => At_username.pm} | 2 +- .../{Backslash.pm => Backslash_pageUrl.pm} | 2 +- lib/WebGUI/Macro/{C.pm => C_crumbTrail.pm} | 2 +- lib/WebGUI/Macro/{Carat.pm => Carat_carat.pm} | 2 +- lib/WebGUI/Macro/{D.pm => D_date.pm} | 2 +- lib/WebGUI/Macro/{H.pm => H_homeLink.pm} | 5 +- lib/WebGUI/Macro/{Hash.pm => Hash_userId.pm} | 2 +- lib/WebGUI/Macro/{L.pm => L_loginBox.pm} | 19 +- .../Macro/{j.pm => M_currentMenuVertical.pm} | 15 +- .../Macro/{F.pm => P_previousMenuVertical.pm} | 18 +- .../Macro/{Splat.pm => Splat_random.pm} | 10 +- .../Macro/{J.pm => T_topMenuVertical.pm} | 18 +- lib/WebGUI/Macro/{a.pm => a_account.pm} | 5 +- lib/WebGUI/Macro/{c.pm => c_companyName.pm} | 2 +- lib/WebGUI/Macro/{e.pm => e_companyEmail.pm} | 2 +- lib/WebGUI/Macro/f.pm | 31 - lib/WebGUI/Macro/h.pm | 31 - lib/WebGUI/Macro/m.pm | 39 - .../{M.pm => m_currentMenuHorizontal.pm} | 2 +- .../{p.pm => p_previousMenuHorizontal.pm} | 2 +- lib/WebGUI/Macro/{r.pm => r_printable.pm} | 7 +- .../Macro/{t.pm => t_topMenuHorizontal.pm} | 2 +- lib/WebGUI/Macro/{u.pm => u_companyUrl.pm} | 2 +- lib/WebGUI/Operation/Account.pm | 140 ++-- lib/WebGUI/Operation/Group.pm | 45 +- lib/WebGUI/Operation/Help.pm | 17 +- lib/WebGUI/Operation/Page.pm | 60 +- lib/WebGUI/Operation/Settings.pm | 242 +++++-- lib/WebGUI/Operation/Style.pm | 42 +- lib/WebGUI/Operation/Submission.pm | 13 +- lib/WebGUI/Operation/Trash.pm | 8 +- lib/WebGUI/Operation/User.pm | 94 ++- lib/WebGUI/Privilege.pm | 27 +- lib/WebGUI/SQL.pm | 9 +- lib/WebGUI/Style.pm | 6 +- lib/WebGUI/Widget.pm | 15 +- lib/WebGUI/Widget/Article.pm | 67 +- lib/WebGUI/Widget/EventsCalendar.pm | 72 +- lib/WebGUI/Widget/ExtraColumn.pm | 27 +- lib/WebGUI/Widget/FAQ.pm | 57 +- lib/WebGUI/Widget/LinkList.pm | 61 +- lib/WebGUI/Widget/MessageBoard.pm | 119 ++-- lib/WebGUI/Widget/Poll.pm | 49 +- lib/WebGUI/Widget/SQLReport.pm | 57 +- lib/WebGUI/Widget/SearchMnoGo.pm | 168 ----- lib/WebGUI/Widget/SiteMap.pm | 1 + lib/WebGUI/Widget/SyndicatedContent.pm | 38 +- lib/WebGUI/Widget/UserSubmission.pm | 128 ++-- testEnvironment.pl | 7 + www/sub/index.pl | 26 - 66 files changed, 3136 insertions(+), 1001 deletions(-) delete mode 100644 docs/upgrade_1.3.1-2.0.0.sql create mode 100644 docs/upgrade_2.0.0-2.1.0.sql create mode 100644 etc/WebGUI.conf.original create mode 100644 extras/ieEdit.html create mode 100644 extras/ieEdit.js create mode 100644 extras/nonIeEdit.html create mode 100644 extras/nonIeEdit.js create mode 100644 extras/toolbar.gif rename lib/WebGUI/{Macro/T.pm => International.pm} (52%) rename lib/WebGUI/Macro/{P.pm => A_anyMenu.pm} (51%) rename lib/WebGUI/Macro/{At.pm => At_username.pm} (95%) rename lib/WebGUI/Macro/{Backslash.pm => Backslash_pageUrl.pm} (95%) rename lib/WebGUI/Macro/{C.pm => C_crumbTrail.pm} (97%) rename lib/WebGUI/Macro/{Carat.pm => Carat_carat.pm} (95%) rename lib/WebGUI/Macro/{D.pm => D_date.pm} (96%) rename lib/WebGUI/Macro/{H.pm => H_homeLink.pm} (91%) rename lib/WebGUI/Macro/{Hash.pm => Hash_userId.pm} (95%) rename lib/WebGUI/Macro/{L.pm => L_loginBox.pm} (69%) rename lib/WebGUI/Macro/{j.pm => M_currentMenuVertical.pm} (68%) rename lib/WebGUI/Macro/{F.pm => P_previousMenuVertical.pm} (59%) rename lib/WebGUI/Macro/{Splat.pm => Splat_random.pm} (73%) rename lib/WebGUI/Macro/{J.pm => T_topMenuVertical.pm} (64%) rename lib/WebGUI/Macro/{a.pm => a_account.pm} (90%) rename lib/WebGUI/Macro/{c.pm => c_companyName.pm} (95%) rename lib/WebGUI/Macro/{e.pm => e_companyEmail.pm} (95%) delete mode 100644 lib/WebGUI/Macro/f.pm delete mode 100644 lib/WebGUI/Macro/h.pm delete mode 100644 lib/WebGUI/Macro/m.pm rename lib/WebGUI/Macro/{M.pm => m_currentMenuHorizontal.pm} (96%) rename lib/WebGUI/Macro/{p.pm => p_previousMenuHorizontal.pm} (97%) rename lib/WebGUI/Macro/{r.pm => r_printable.pm} (89%) rename lib/WebGUI/Macro/{t.pm => t_topMenuHorizontal.pm} (96%) rename lib/WebGUI/Macro/{u.pm => u_companyUrl.pm} (95%) delete mode 100644 lib/WebGUI/Widget/SearchMnoGo.pm delete mode 100755 www/sub/index.pl diff --git a/docs/create.sql b/docs/create.sql index 9783fbbc7..b15458262 100644 --- a/docs/create.sql +++ b/docs/create.sql @@ -12,7 +12,7 @@ CREATE TABLE Article ( widgetId int(11) default NULL, startDate int(11) default NULL, endDate int(11) default NULL, - body text, + body mediumtext, image varchar(255) default NULL, linkTitle varchar(255) default NULL, linkURL text, @@ -116,23 +116,6 @@ CREATE TABLE SQLReport ( # -# -# Table structure for table 'SearchMnoGo' -# - -CREATE TABLE SearchMnoGo ( - widgetId int(11) NOT NULL default '0', - DSN varchar(255) default NULL, - username varchar(255) default NULL, - identifier varchar(255) default NULL, - PRIMARY KEY (widgetId) -) TYPE=MyISAM; - -# -# Dumping data for table 'SearchMnoGo' -# - - # # Table structure for table 'SiteMap' # @@ -319,7 +302,7 @@ INSERT INTO help VALUES (16,'US English','Add','Style','Styles are WebGUI macro INSERT INTO help VALUES (17,'US English','Add','Group','See Manage Group for a description of grouping functions and the default groups.\r\n\r\nGroup Name\r\nA name for the group. It is best if the name is descriptive so you know what it is at a glance.\r\n\r\nDescription\r\nA longer description of the group so that other admins and content managers (or you if you forget) will know what the purpose of this group is.','0'); INSERT INTO help VALUES (22,'US English','Edit','SQL Report','Title\r\nSee Add SQL Report for details.\r\n\r\nDisplay Title?\r\nSee Add SQL Report for details.\r\n\r\nProcess Macros\r\nSee Add SQL Report for details.\r\n\r\nDescription\r\nSee Add SQL Report for details.\r\n\r\nTemplate\r\nSee Add SQL Report for details.\r\n\r\nQuery\r\nSee Add SQL Report for details.\r\n\r\nDSN\r\nSee Add SQL Report for details.\r\n\r\nDatabase User\r\nSee Add SQL Report for details.\r\n\r\nDatabase Password\r\nSee Add SQL Report for details.\r\n\r\nConvert carriage returns?\r\nSee Add SQL Report for details.\r\n\r\n','19,14,21'); INSERT INTO help VALUES (18,'US English','Using','Style Sheets','Cascading Style Sheets (CSS) are a great way to manage the look and feel of any web site. They are used extensively in WebGUI.\r\n\r\nIf you are unfamiliar with how to use CSS, Plain Black Software provides training classes on XHTML and CSS. Alternatively, Bradsoft makes an excellent CSS editor called Top Style.\r\n\r\nThe following is a list of classes used to control the look of WebGUI:\r\n\r\nA\r\nThe links throughout the style.\r\n\r\nBODY\r\nThe default setup of all pages within a style.\r\n\r\nH1\r\nThe headers on every page.\r\n\r\n.accountOptions\r\nThe links that appear under the login and account update forms.\r\n\r\n.adminBar \r\nThe bar that appears at the top of the page when you\'re in admin mode.\r\n\r\n.boardMenu \r\nThe menu on the message boards.\r\n\r\n.boardMessage \r\nThe full message text.\r\n\r\n.boardTitle \r\nThe title of the message board.\r\n\r\n.content\r\nThe main content area on all pages of the style.\r\n\r\n.crumbTrail \r\nThe crumb trail (if you\'re using that macro).\r\n\r\n.eventTitle \r\nThe title of an individual event.\r\n\r\n.faqQuestion\r\nAn F.A.Q. question. To distinguish it from an answer.\r\n\r\n.formDescription \r\nThe tags on all forms next to the form elements. \r\n\r\n.formSubtext \r\nThe tags below some form elements.\r\n\r\n.highlight \r\nDenotes a highlighted item, such as which message you are viewing within a list.\r\n\r\n.horizontalMenu \r\nThe horizontal menu (if you use a horizontal menu macro).\r\n\r\n.loginBox\r\nThe login box macro.\r\n\r\n.pagination \r\nThe Previous and Next links on pages with pagination.\r\n\r\n.pollAnswer \r\nAn answer on a poll.\r\n\r\n.pollColor \r\nThe color of the percentage bar on a poll.\r\n\r\n.pollQuestion \r\nThe question on a poll.\r\n\r\n.tableData \r\nThe data rows on things like message boards and user contributions.\r\n\r\n.tableHeader \r\nThe headings of columns on things like message boards and user contributions.\r\n\r\n.verticalMenu \r\nThe vertical menu (if you use a verticall menu macro).\r\n\r\n','11,16'); -INSERT INTO help VALUES (19,'US English','Using','Macros','WebGUI macros are used to create dynamic content within otherwise static content. For instance, you may wish to show which user is logged in on every page, or you may wish to have a dynamically built menu or crumb trail. \r\n\r\nMacros always begin with a carat (^) and follow with one other character. Some macros can be extended/configured by taking the format of ^xconfig text^/x. The following is a description of all the macros in the WebGUI system.\r\n\r\n^a or ^a^/a - My Account Link\r\nA link to your account information. In addition you can change the link text by creating a macro like this ^aAccount Info^/a.\r\n\r\n^C - Crumb Trail\r\nA dynamically generated crumb trail to the current page.\r\n\r\n^D or ^D^/D - Date\r\nThe current date and time.\r\n\r\nYou can configure the date by using date formatting symbols. For instance if you created a macro like this ^D%c %D, %y^/D it would output September 26, 2001. The following are the available date formatting symbols:\r\n\r\n %% = %\r\n %y = 4 digit year\r\n %Y = 2 digit year\r\n %m = 2 digit month\r\n %M = variable digit month\r\n %c = month name\r\n %d = 2 digit day of month\r\n %D = variable digit day of month\r\n %w = day of week name\r\n %h = 2 digit base 12 hour\r\n %H = variable digit base 12 hour\r\n %j = 2 digit base 24 hour\r\n %J = variable digit base 24 hour\r\n %p = lower case am/pm\r\n %P = upper case AM/PM\r\n\r\n^f - Full Menu (Vertical)\r\nDisplays a complete menu listing for all pages on the site, sort of like a site map.\r\n\r\n^F - 2 Level Menu (Vertical)\r\nDisplays the first two levels of the menuing hierarchy at all times.\r\n\r\n^h - 3 Level Menu (Vertical)\r\nDisplays the first three levels of the menuing hierarchy at all times.\r\n\r\n^H or ^H^/H - Home Link\r\nA link to the home page of this site. In addition you can change the link text by creating a macro like this ^HGo Home^/H.\r\n\r\n^j - 2 Level, Current Level Menu (Vertical)\r\nDisplays the next two levels of the menuing hierarchy.\r\n\r\n^J - 3 Level, Current Level Menu (Vertical)\r\nDisplays the next three levels of the menuing hierarchy.\r\n\r\n^L - Login\r\nA small login form.\r\n\r\n^M - Current Menu (Vertical)\r\nA vertical menu containing the sub-pages at the current level.\r\n\r\n^m - Current Menu (Horizontal)\r\nA horizontal menu containing the sub-pages at the current level.\r\n\r\n^P - Previous Menu (Vertical)\r\nA vertical menu containing the sub-pages at the previous level.\r\n\r\n^p - Previous Menu (Horizontal)\r\nA horizontal menu containing the sub-pages at the previous level.\r\n\r\n^r or ^r^/r - Make Page Printable\r\nCreates a link to remove the style from a page to make it printable. In addition you can change the link text by creating a macro like this ^rPRINT!^/r.\r\n\r\n^T - Top Level Menu (Vertical)\r\nA vertical menu containing the main pages of the site (aka the sub-pages from the home page).\r\n\r\n^t - Top Level Menu (Horizontal)\r\nA vertical menu containing the main pages of the site (aka the sub-pages from the home page).\r\n\r\n^^ - Carat\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^/ - System URL\r\nThe URL to the gateway script (including the domain for this site). This is often used within pages so that if your development server is on a domain different than your production server that your URLs will still worked when moved.\r\n\r\n^\\ - Page URL\r\nThe URL to the current page (including the domain for this site). This is often used within pages so that if your development server is on a domain different than your production server that your URLs will still worked when moved.\r\n\r\n^@ - Username\r\nThe username of the currently logged in user.\r\n\r\n^# - User ID\r\nThe user id of the currently logged in user.\r\n\r\n^* - Random Number\r\nA randomly generated number. This is often used on images (such as banner ads) that you want to ensure do not cache.\r\n\r\n','11,16,12'); +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. Some macros can be extended/configured by taking the format of ^xconfig text^/x. The following is a description of all the macros in the WebGUI system.\r\n\r\n^A^/A - Any SubMenu\r\nThis macro allows you to get the submenu of any page, starting with the page you specified. For instance, you could get the home page submenu by creating a macro that looks like this ^Ahome,0. The first value is the urlized title of the page and the second value is the depth you\'d like the menu to go. By default it will show only the first level. To go three levels deep create a macro like this ^A3^/A. If you set the macro to \"0\" it will track the entire site tree.\r\n\r\n^a or ^a^/a - My Account Link\r\nA link to your account information. In addition you can change the link text by creating a macro like this ^aAccount Info^/a.\r\n\r\n^C - Crumb Trail\r\nA dynamically generated crumb trail to the current page.\r\n\r\n^c - Company Name\r\nThe name of your company specified in the settings by your Administrator.\r\n\r\n^D or ^D^/D - Date\r\nThe current date and time.\r\n\r\nYou can configure the date by using date formatting symbols. For instance, if you created a macro like this ^D%c %D, %y^/D it would output September 26, 2001. The following are the available date formatting symbols:\r\n\r\n %% = %\r\n %y = 4 digit year\r\n %Y = 2 digit year\r\n %m = 2 digit month\r\n %M = variable digit month\r\n %c = month name\r\n %d = 2 digit day of month\r\n %D = variable digit day of month\r\n %w = day of week name\r\n %h = 2 digit base 12 hour\r\n %H = variable digit base 12 hour\r\n %j = 2 digit base 24 hour\r\n %J = variable digit base 24 hour\r\n %p = lower case am/pm\r\n %P = upper case AM/PM\r\n\r\n^e - Company Email Address\r\nThe email address for your company specified in the settings by your Administrator.\r\n\r\n^H or ^H^/H - Home Link\r\nA link to the home page of this site. In addition you can change the link text by creating a macro like this ^HGo Home^/H.\r\n\r\n^L - Login\r\nA small login form.\r\n\r\n^M or ^M^/M - Current Menu (Vertical)\r\nA vertical menu containing the sub-pages at the current level. In addition, you may configure this macro by specifying how many levels deep the menu should go. By default it will show only the first level. To go three levels deep create a macro like this ^M3^/M. If you set the macro to \"0\" it will track the entire site tree.\r\n\r\n^m - Current Menu (Horizontal)\r\nA horizontal menu containing the sub-pages at the current level.\r\n\r\n^P or ^P^/P - Previous Menu (Vertical)\r\nA vertical menu containing the sub-pages at the previous level. In addition, you may configure this macro by specifying how many levels deep the menu should go. By default it will show only the first level. To go three levels deep create a macro like this ^TP^/P. If you set the macro to \"0\" it will track the entire site tree.\r\n\r\n^p - Previous Menu (Horizontal)\r\nA horizontal menu containing the sub-pages at the previous level.\r\n\r\n^r or ^r^/r - Make Page Printable\r\nCreates a link to remove the style from a page to make it printable. In addition, you can change the link text by creating a macro like this ^rPRINT!^/r.\r\n\r\n^T or ^T^/T - Top Level Menu (Vertical)\r\nA vertical menu containing the main pages of the site (aka the sub-pages from the home page). In addition, you may configure this macro by specifying how many levels deep the menu should go. By default it will show only the first level. To go three levels deep create a macro like this ^T3^/T. If you set the macro to \"0\" it will track the entire site tree.\r\n\r\n^t - Top Level Menu (Horizontal)\r\nA vertical menu containing the main pages of the site (aka the sub-pages from the home page).\r\n\r\n^u - Company URL\r\nThe URL for your company specified in the settings by your Administrator.\r\n\r\n^^ - Carat\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^/ - System URL\r\nThe URL to the gateway script (including the domain for this site). This is often used within pages so that if your development server is on a domain different than your production server that your URLs will still worked when moved.\r\n\r\n^\\ - Page URL\r\nThe URL to the current page (including the domain for this site). This is often used within pages so that if your development server is on a domain different than your production server that your URLs will still worked when moved.\r\n\r\n^@ - Username\r\nThe username of the currently logged in user.\r\n\r\n^# - User ID\r\nThe user id of the currently logged in user.\r\n\r\n^* or ^*^/* - Random Number\r\nA randomly generated number. This is often used on images (such as banner ads) that you want to ensure do not cache. In addition, you may configure this macro like this ^*100^/* to create a random number between 0 and 100.\r\n\r\n^0,^1,^2,^3,^4,^5,^6,^7,^8,^9, ^-\r\nThese macros are reserved for widget-specific functions as in the SQL Report widget.\r\n','11,16,12'); INSERT INTO help VALUES (20,'US English','Add','SQL Report','SQL Reports are perhaps the most powerful widget in the WebGUI arsenal. They allow a user to query data from any database that they have access to. This is great for getting sales figures from your Accounting database or even summarizing all the message boards on your web site.\r\n\r\nTitle\r\nThe title of this report.\r\n\r\nDisplay Title?\r\nDo you wish to display the title of the report? If so, check the box.\r\n\r\nProcess Macros\r\nDo you wish to process WebGUI Macros on this report? If so, check the box.\r\n\r\nDescription\r\nDescribe the content of this report so your users will better understand what the report is all about.\r\n\r\nTemplate\r\nLayout a template of how this report should look. Usually you\'ll use HTML tables to generate a report. An example is included below.\r\n\r\nThere are 11 special macro characters used in generating SQL Reports. They are ^-, ^0, ^1, ^2, ^3, ^4, ^5, ^6, ^7, ^8, and ^9. These macros will be processed regardless of whether you checked the process macros box above. The ^- macro represents split points in the document where the report will begin and end looping. The numeric macros represent the data fields that will be returned from your query. Note that you may only have 10 fields returned per row in your query.\r\n\r\nSample Template:\r\n<table>\r\n<tr><th>Employee Name</th><th>Employee #</th><th>Vacation Days Remaining</th><th>Monthly Salary</th></tr>\r\n^-\r\n<tr><td>^0</td><td>^1</td><td>^2</td><td>^3</td></tr>\r\n^-\r\n</table>\r\n\r\nQuery\r\nThis is a standard SQL query. If you are unfamiliar with SQL, Plain Black Software provides training courses in SQL and database management.\r\n\r\nDSN\r\nData Source Name is the unique identifier that Perl uses to describe the location of your database. It takes the format of DBI:[driver]:[database name]:[host]. \r\n\r\nExample: DBI:mysql:WebGUI:localhost\r\n\r\nDatabase User\r\nThe username you use to connect to the DSN.\r\n\r\nDatabase Password\r\nThe password you use to connect to the DSN.\r\n\r\nConvert carriage returns?\r\nDo you wish to convert the carriage returns in the resultant data to HTML breaks (<br>).\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 Add Content... 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\nTitle\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\nDisplay the title?\r\nDo you wish to display the title listed above?\r\n\r\nProcess macros?\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\nStart Date\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 set date button. By default the date is set to 01/01/2000.\r\n\r\nEnd Date\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\nBody\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 <p> between paragraphs to add white space to your content.\r\n\r\nImage\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\nLink Title\r\nIf you wish to add a link to your article, enter the title of the link in this field. \r\n\r\nExample: Google\r\n\r\nLink URL\r\nIf you added a link title, now add the URL (uniform resource locator) here. \r\n\r\nExample: http://www.google.com\r\n\r\nAttachment\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'); @@ -373,6 +356,326 @@ INSERT INTO incrementer VALUES ('questionId',1); INSERT INTO incrementer VALUES ('submissionId',1); INSERT INTO incrementer VALUES ('recurringEventId',1); +# +# Table structure for table 'international' +# + +CREATE TABLE international ( + internationalId int(11) NOT NULL default '0', + language varchar(30) NOT NULL default 'English', + message text, + PRIMARY KEY (internationalId,language) +) TYPE=MyISAM; + +# +# Dumping data for table 'international' +# + +INSERT INTO international VALUES (1,'English','Add content...'); +INSERT INTO international VALUES (2,'English','Page'); +INSERT INTO international VALUES (3,'English','Paste from clipboard...'); +INSERT INTO international VALUES (4,'English','Manage settings.'); +INSERT INTO international VALUES (5,'English','Manage groups.'); +INSERT INTO international VALUES (6,'English','Manage styles.'); +INSERT INTO international VALUES (7,'English','Manage users.'); +INSERT INTO international VALUES (8,'English','View page not found.'); +INSERT INTO international VALUES (9,'English','View clipboard.'); +INSERT INTO international VALUES (10,'English','View trash.'); +INSERT INTO international VALUES (11,'English','Empy trash.'); +INSERT INTO international VALUES (12,'English','Turn admin off.'); +INSERT INTO international VALUES (13,'English','View help index.'); +INSERT INTO international VALUES (14,'English','View pending submissions.'); +INSERT INTO international VALUES (15,'English','January'); +INSERT INTO international VALUES (16,'English','February'); +INSERT INTO international VALUES (17,'English','March'); +INSERT INTO international VALUES (18,'English','April'); +INSERT INTO international VALUES (19,'English','May'); +INSERT INTO international VALUES (20,'English','June'); +INSERT INTO international VALUES (21,'English','July'); +INSERT INTO international VALUES (22,'English','August'); +INSERT INTO international VALUES (23,'English','September'); +INSERT INTO international VALUES (24,'English','October'); +INSERT INTO international VALUES (25,'English','November'); +INSERT INTO international VALUES (26,'English','December'); +INSERT INTO international VALUES (27,'English','Sunday'); +INSERT INTO international VALUES (28,'English','Monday'); +INSERT INTO international VALUES (29,'English','Tuesday'); +INSERT INTO international VALUES (30,'English','Wednesday'); +INSERT INTO international VALUES (31,'English','Thursday'); +INSERT INTO international VALUES (32,'English','Friday'); +INSERT INTO international VALUES (33,'English','Saturday'); +INSERT INTO international VALUES (34,'English','set date'); +INSERT INTO international VALUES (35,'English','Administrative Function'); +INSERT INTO international VALUES (36,'English','You must be an administrator to perform this function. Please contact one of your administrators. The following is a list of the administrators for this system:'); +INSERT INTO international VALUES (37,'English','Permission Denied!'); +INSERT INTO international VALUES (38,'English','You do not have sufficient privileges to perform this operation. Please log in with an account that has sufficient privileges before attempting this operation.'); +INSERT INTO international VALUES (39,'English','You do not have sufficient privileges to access this page.'); +INSERT INTO international VALUES (41,'English','You\'re attempting to remove a vital component of the WebGUI system. If you were allowed to continue WebGUI may cease to function.'); +INSERT INTO international VALUES (40,'English','Vital Component'); +INSERT INTO international VALUES (42,'English','Please Confirm'); +INSERT INTO international VALUES (43,'English','Are you certain that you wish to delete this content?'); +INSERT INTO international VALUES (44,'English','Yes, I\'m sure.'); +INSERT INTO international VALUES (45,'English','No, I made a mistake.'); +INSERT INTO international VALUES (46,'English','My Account'); +INSERT INTO international VALUES (47,'English','Home'); +INSERT INTO international VALUES (48,'English','Hello'); +INSERT INTO international VALUES (49,'English','Click here to log out.'); +INSERT INTO international VALUES (50,'English','Username'); +INSERT INTO international VALUES (51,'English','Password'); +INSERT INTO international VALUES (52,'English','login'); +INSERT INTO international VALUES (53,'English','Make Page Printable'); +INSERT INTO international VALUES (54,'English','Create Account'); +INSERT INTO international VALUES (55,'English','Password (confirm)'); +INSERT INTO international VALUES (56,'English','Email Address'); +INSERT INTO international VALUES (57,'English','This is only necessary if you wish to use features that require Email.'); +INSERT INTO international VALUES (58,'English','I already have an account.'); +INSERT INTO international VALUES (59,'English','I forgot my password.'); +INSERT INTO international VALUES (60,'English','Are you certain you want to deactivate your account. If you proceed your account information will be lost permanently.'); +INSERT INTO international VALUES (61,'English','Update Account Information'); +INSERT INTO international VALUES (62,'English','save'); +INSERT INTO international VALUES (63,'English','Turn admin on.'); +INSERT INTO international VALUES (64,'English','Log out.'); +INSERT INTO international VALUES (65,'English','Please deactivate my account permanently.'); +INSERT INTO international VALUES (66,'English','Log In'); +INSERT INTO international VALUES (67,'English','Create a new account.'); +INSERT INTO international VALUES (68,'English','The account information you supplied is invalid. Either the account does not exist or the username/password combination was incorrect.'); +INSERT INTO international VALUES (69,'English','Please contact your system administrator for assistance.'); +INSERT INTO international VALUES (70,'English','Error'); +INSERT INTO international VALUES (71,'English','Recover password'); +INSERT INTO international VALUES (72,'English','recover'); +INSERT INTO international VALUES (73,'English','Log in.'); +INSERT INTO international VALUES (74,'English','Account Information'); +INSERT INTO international VALUES (75,'English','Your account information has been sent to your email address.'); +INSERT INTO international VALUES (76,'English','That email address is not in our databases.'); +INSERT INTO international VALUES (77,'English','That account name is already in use by another member of this site. Please try a different username. The following are some suggestions:'); +INSERT INTO international VALUES (78,'English','Your passwords did not match. Please try again.'); +INSERT INTO international VALUES (79,'English','Cannot connect to LDAP server.'); +INSERT INTO international VALUES (80,'English','Account created successfully!'); +INSERT INTO international VALUES (81,'English','Account updated successfully!'); +INSERT INTO international VALUES (82,'English','Administrative functions...'); +INSERT INTO international VALUES (83,'English','Add Group'); +INSERT INTO international VALUES (84,'English','Group Name'); +INSERT INTO international VALUES (85,'English','Description'); +INSERT INTO international VALUES (86,'English','Are you certain you wish to delete this group? Beware that deleting a group is permanent and will remove all privileges associated with this group.'); +INSERT INTO international VALUES (87,'English','Edit Group'); +INSERT INTO international VALUES (88,'English','Users In Group'); +INSERT INTO international VALUES (89,'English','Groups'); +INSERT INTO international VALUES (90,'English','Add new group.'); +INSERT INTO international VALUES (91,'English','Previous Page'); +INSERT INTO international VALUES (92,'English','Next Page'); +INSERT INTO international VALUES (93,'English','Help'); +INSERT INTO international VALUES (94,'English','See also'); +INSERT INTO international VALUES (95,'English','Help Index'); +INSERT INTO international VALUES (96,'English','Sorted By Action'); +INSERT INTO international VALUES (97,'English','Sorted by Object'); +INSERT INTO international VALUES (98,'English','Add Page'); +INSERT INTO international VALUES (99,'English','Title'); +INSERT INTO international VALUES (100,'English','Meta Tags'); +INSERT INTO international VALUES (101,'English','Are you certain that you wish to delete this page, its content, and all items under it?'); +INSERT INTO international VALUES (102,'English','Edit Page'); +INSERT INTO international VALUES (103,'English','Page Specifics'); +INSERT INTO international VALUES (104,'English','Page URL'); +INSERT INTO international VALUES (105,'English','Style'); +INSERT INTO international VALUES (106,'English','Check to give this style to all sub-pages.'); +INSERT INTO international VALUES (107,'English','Privileges'); +INSERT INTO international VALUES (108,'English','Owner'); +INSERT INTO international VALUES (109,'English','Owner can view?'); +INSERT INTO international VALUES (110,'English','Owner can edit?'); +INSERT INTO international VALUES (111,'English','Group'); +INSERT INTO international VALUES (112,'English','Group can view?'); +INSERT INTO international VALUES (113,'English','Group can edit?'); +INSERT INTO international VALUES (114,'English','Anybody can view?'); +INSERT INTO international VALUES (115,'English','Anybody can edit?'); +INSERT INTO international VALUES (116,'English','Check to give these privileges to all sub-pages.'); +INSERT INTO international VALUES (117,'English','Edit Authentication Settings'); +INSERT INTO international VALUES (118,'English','Anonymous Registration'); +INSERT INTO international VALUES (119,'English','Authentication Method (default)'); +INSERT INTO international VALUES (120,'English','LDAP URL (default)'); +INSERT INTO international VALUES (121,'English','LDAP Identity (default)'); +INSERT INTO international VALUES (122,'English','LDAP Identity Name'); +INSERT INTO international VALUES (123,'English','LDAP Password Name'); +INSERT INTO international VALUES (124,'English','Edit Company Information'); +INSERT INTO international VALUES (125,'English','Company Name'); +INSERT INTO international VALUES (126,'English','Company Email Address'); +INSERT INTO international VALUES (127,'English','Company URL'); +INSERT INTO international VALUES (128,'English','Edit File Settings'); +INSERT INTO international VALUES (129,'English','Path to WebGUI Extras'); +INSERT INTO international VALUES (130,'English','Maximum Attachment Size'); +INSERT INTO international VALUES (131,'English','Web Attachment Path'); +INSERT INTO international VALUES (132,'English','Server Attachment Path'); +INSERT INTO international VALUES (133,'English','Edit Mail Settings'); +INSERT INTO international VALUES (134,'English','Recover Password Message'); +INSERT INTO international VALUES (135,'English','SMTP Server'); +INSERT INTO international VALUES (136,'English','Home Page'); +INSERT INTO international VALUES (137,'English','Page Not Found Page'); +INSERT INTO international VALUES (138,'English','Yes'); +INSERT INTO international VALUES (139,'English','No'); +INSERT INTO international VALUES (140,'English','Edit Miscellaneous Settings'); +INSERT INTO international VALUES (141,'English','Not Found Page'); +INSERT INTO international VALUES (142,'English','Session Timeout'); +INSERT INTO international VALUES (143,'English','Manage Settings'); +INSERT INTO international VALUES (144,'English','View Statistics'); +INSERT INTO international VALUES (145,'English','WebGUI Build Version'); +INSERT INTO international VALUES (146,'English','Active Sessions'); +INSERT INTO international VALUES (147,'English','Viewable Pages'); +INSERT INTO international VALUES (148,'English','Viewable Widgets'); +INSERT INTO international VALUES (149,'English','Users'); +INSERT INTO international VALUES (150,'English','Add Style'); +INSERT INTO international VALUES (151,'English','Style Name'); +INSERT INTO international VALUES (152,'English','Header'); +INSERT INTO international VALUES (153,'English','Footer'); +INSERT INTO international VALUES (154,'English','Style Sheet'); +INSERT INTO international VALUES (155,'English','Are you certain you wish to delete this style and migrate all pages using this style to the \"Fail Safe\" style?'); +INSERT INTO international VALUES (156,'English','Edit Style'); +INSERT INTO international VALUES (157,'English','Styles'); +INSERT INTO international VALUES (158,'English','Add a new style.'); +INSERT INTO international VALUES (159,'English','Pending Submissions'); +INSERT INTO international VALUES (160,'English','Date Submitted'); +INSERT INTO international VALUES (161,'English','Submitted By'); +INSERT INTO international VALUES (162,'English','Are you certain that you wish to purge all the pages and widgets in the trash?'); +INSERT INTO international VALUES (163,'English','Add User'); +INSERT INTO international VALUES (164,'English','Authentication Method'); +INSERT INTO international VALUES (165,'English','LDAP URL'); +INSERT INTO international VALUES (166,'English','Connect DN'); +INSERT INTO international VALUES (167,'English','Are you certain you want to delete this user? Be warned that all this user\'s information will be lost permanently if you choose to proceed.'); +INSERT INTO international VALUES (168,'English','Edit User'); +INSERT INTO international VALUES (169,'English','Add a new user.'); +INSERT INTO international VALUES (170,'English','search'); +INSERT INTO international VALUES (171,'English','rich edit'); +INSERT INTO international VALUES (172,'English','Article'); +INSERT INTO international VALUES (173,'English','Add Article'); +INSERT INTO international VALUES (174,'English','Display the title?'); +INSERT INTO international VALUES (175,'English','Process macros?'); +INSERT INTO international VALUES (176,'English','Start Date'); +INSERT INTO international VALUES (177,'English','End Date'); +INSERT INTO international VALUES (178,'English','Body'); +INSERT INTO international VALUES (179,'English','Image'); +INSERT INTO international VALUES (180,'English','Link Title'); +INSERT INTO international VALUES (181,'English','Link URL'); +INSERT INTO international VALUES (182,'English','Attachment'); +INSERT INTO international VALUES (183,'English','Convert carriage returns?'); +INSERT INTO international VALUES (184,'English','(Check if you aren\'t adding <br> manually.)'); +INSERT INTO international VALUES (185,'English','Edit Article'); +INSERT INTO international VALUES (186,'English','Delete'); +INSERT INTO international VALUES (187,'English','Events Calendar'); +INSERT INTO international VALUES (188,'English','Add Events Calendar'); +INSERT INTO international VALUES (189,'English','Happens only once.'); +INSERT INTO international VALUES (190,'English','Day'); +INSERT INTO international VALUES (191,'English','Week'); +INSERT INTO international VALUES (192,'English','Add Event'); +INSERT INTO international VALUES (193,'English','Recurs every'); +INSERT INTO international VALUES (194,'English','until'); +INSERT INTO international VALUES (195,'English','Are you certain that you want to delete this event'); +INSERT INTO international VALUES (197,'English','Edit Events Calendar'); +INSERT INTO international VALUES (196,'English','and all of its recurring events'); +INSERT INTO international VALUES (198,'English','Edit Event'); +INSERT INTO international VALUES (199,'English','Extra Column'); +INSERT INTO international VALUES (200,'English','Add Extra Column'); +INSERT INTO international VALUES (201,'English','Spacer'); +INSERT INTO international VALUES (202,'English','Width'); +INSERT INTO international VALUES (203,'English','StyleSheet Class'); +INSERT INTO international VALUES (204,'English','Edit Extra Column'); +INSERT INTO international VALUES (205,'English','F.A.Q.'); +INSERT INTO international VALUES (206,'English','Add F.A.Q.'); +INSERT INTO international VALUES (207,'English','Add Question'); +INSERT INTO international VALUES (208,'English','Question'); +INSERT INTO international VALUES (209,'English','Answer'); +INSERT INTO international VALUES (211,'English','Edit F.A.Q.'); +INSERT INTO international VALUES (210,'English','Are you certain that you want to delete this question?'); +INSERT INTO international VALUES (212,'English','Add a new question.'); +INSERT INTO international VALUES (213,'English','Edit Question'); +INSERT INTO international VALUES (214,'English','Link List'); +INSERT INTO international VALUES (215,'English','Add Link'); +INSERT INTO international VALUES (216,'English','URL'); +INSERT INTO international VALUES (217,'English','Are you certain that you want to delete this link?'); +INSERT INTO international VALUES (218,'English','Edit Link List'); +INSERT INTO international VALUES (219,'English','Add Link List'); +INSERT INTO international VALUES (220,'English','Edit Link'); +INSERT INTO international VALUES (221,'English','Add a new link.'); +INSERT INTO international VALUES (222,'English','Add Message Board'); +INSERT INTO international VALUES (223,'English','Message Board'); +INSERT INTO international VALUES (224,'English','Who can post?'); +INSERT INTO international VALUES (225,'English','Messages Per Page'); +INSERT INTO international VALUES (226,'English','Edit Timeout'); +INSERT INTO international VALUES (227,'English','Edit Message Board'); +INSERT INTO international VALUES (228,'English','Editing Message...'); +INSERT INTO international VALUES (229,'English','Subject'); +INSERT INTO international VALUES (230,'English','Message'); +INSERT INTO international VALUES (231,'English','Posting New Message...'); +INSERT INTO international VALUES (232,'English','no subject'); +INSERT INTO international VALUES (233,'English','(eom)'); +INSERT INTO international VALUES (234,'English','Posting Reply...'); +INSERT INTO international VALUES (235,'English','Edit Message'); +INSERT INTO international VALUES (236,'English','Post Reply'); +INSERT INTO international VALUES (237,'English','Subject:'); +INSERT INTO international VALUES (238,'English','Author:'); +INSERT INTO international VALUES (239,'English','Date:'); +INSERT INTO international VALUES (240,'English','Message ID:'); +INSERT INTO international VALUES (241,'English','Previous Thread'); +INSERT INTO international VALUES (242,'English','Back To Message List'); +INSERT INTO international VALUES (243,'English','Next Thread'); +INSERT INTO international VALUES (244,'English','Author'); +INSERT INTO international VALUES (245,'English','Date'); +INSERT INTO international VALUES (246,'English','Post New Message'); +INSERT INTO international VALUES (247,'English','Thread Started'); +INSERT INTO international VALUES (248,'English','Replies'); +INSERT INTO international VALUES (249,'English','Last Reply'); +INSERT INTO international VALUES (250,'English','Poll'); +INSERT INTO international VALUES (251,'English','Add Poll'); +INSERT INTO international VALUES (252,'English','Active'); +INSERT INTO international VALUES (253,'English','Who can vote?'); +INSERT INTO international VALUES (254,'English','Graph Width'); +INSERT INTO international VALUES (255,'English','Question'); +INSERT INTO international VALUES (256,'English','Answers'); +INSERT INTO international VALUES (257,'English','(Enter one answer per line. No more than 20.)'); +INSERT INTO international VALUES (258,'English','Edit Poll'); +INSERT INTO international VALUES (259,'English','SQL Report'); +INSERT INTO international VALUES (260,'English','Add SQL Report'); +INSERT INTO international VALUES (261,'English','Template'); +INSERT INTO international VALUES (262,'English','Query'); +INSERT INTO international VALUES (263,'English','DSN'); +INSERT INTO international VALUES (264,'English','Database User'); +INSERT INTO international VALUES (265,'English','Database Password'); +INSERT INTO international VALUES (266,'English','Edit SQL Report'); +INSERT INTO international VALUES (267,'English','Error: The DSN specified is of an improper format.'); +INSERT INTO international VALUES (268,'English','Error: The SQL specified is of an improper format.'); +INSERT INTO international VALUES (269,'English','Error: There was a problem with the query.'); +INSERT INTO international VALUES (270,'English','Error: Could not connect to the database.'); +INSERT INTO international VALUES (271,'English','Syndicated Content'); +INSERT INTO international VALUES (272,'English','Add Syndicated Content'); +INSERT INTO international VALUES (273,'English','URL to RSS File'); +INSERT INTO international VALUES (274,'English','Edit Syndicated Content'); +INSERT INTO international VALUES (275,'English','Last Fetched'); +INSERT INTO international VALUES (276,'English','Current Content'); +INSERT INTO international VALUES (277,'English','User Submission System'); +INSERT INTO international VALUES (278,'English','Add User Submission System'); +INSERT INTO international VALUES (279,'English','Who can contribute?'); +INSERT INTO international VALUES (280,'English','Submissions Per Page'); +INSERT INTO international VALUES (281,'English','Approved'); +INSERT INTO international VALUES (282,'English','Denied'); +INSERT INTO international VALUES (283,'English','Pending'); +INSERT INTO international VALUES (284,'English','Default Status'); +INSERT INTO international VALUES (285,'English','Add Submission'); +INSERT INTO international VALUES (286,'English','(Uncheck if you\'re writing an HTML submission.)'); +INSERT INTO international VALUES (287,'English','Date Submitted'); +INSERT INTO international VALUES (288,'English','Status'); +INSERT INTO international VALUES (289,'English','Edit/Delete'); +INSERT INTO international VALUES (290,'English','Untitiled'); +INSERT INTO international VALUES (291,'English','Are you certain you wish to delete this submission?'); +INSERT INTO international VALUES (292,'English','Edit User Submission System'); +INSERT INTO international VALUES (293,'English','Edit Submission'); +INSERT INTO international VALUES (294,'English','Post New Submission'); +INSERT INTO international VALUES (295,'English','Date Submitted'); +INSERT INTO international VALUES (296,'English','Submitted By'); +INSERT INTO international VALUES (297,'English','Submitted By:'); +INSERT INTO international VALUES (298,'English','Date Submitted:'); +INSERT INTO international VALUES (299,'English','Approve'); +INSERT INTO international VALUES (300,'English','Leave Pending'); +INSERT INTO international VALUES (301,'English','Deny'); +INSERT INTO international VALUES (302,'English','Edit'); +INSERT INTO international VALUES (303,'English','Return To Submissions List'); +INSERT INTO international VALUES (304,'English','Language'); + # # Table structure for table 'link' # @@ -531,6 +834,7 @@ INSERT INTO settings VALUES ('ldapPasswordName','LDAP Password'); INSERT INTO settings VALUES ('authMethod','WebGUI'); INSERT INTO settings VALUES ('anonymousRegistration','yes'); INSERT INTO settings VALUES ('notFoundPage','1'); +INSERT INTO settings VALUES ('recoverPasswordEmail','Someone (probably you) requested your account information be sent. Your password has been reset. The following represents your new account information:'); # # Table structure for table 'style' @@ -608,10 +912,11 @@ CREATE TABLE users ( username varchar(35) default NULL, identifier varchar(35) default NULL, email varchar(255) default NULL, - icq varchar(30) default NULL, authMethod varchar(30) NOT NULL default 'WebGUI', ldapURL text, connectDN varchar(255) default NULL, + language varchar(30) NOT NULL default 'English', + icq varchar(30) default NULL, PRIMARY KEY (userId) ) TYPE=MyISAM; @@ -619,31 +924,31 @@ CREATE TABLE users ( # Dumping data for table 'users' # -INSERT INTO users VALUES (1,'Visitor','No Login','','','WebGUI',NULL,NULL); -INSERT INTO users VALUES (2,'Reserved','No Login',NULL,NULL,'WebGUI',NULL,NULL); -INSERT INTO users VALUES (3,'Admin','RvlMjeFPs2aAhQdo/xt/Kg','','','WebGUI',NULL,NULL); -INSERT INTO users VALUES (4,'Reserved','No Login',NULL,NULL,'WebGUI',NULL,NULL); -INSERT INTO users VALUES (5,'Reserved','No Login',NULL,NULL,'WebGUI',NULL,NULL); -INSERT INTO users VALUES (6,'Reserved','No Login',NULL,NULL,'WebGUI',NULL,NULL); -INSERT INTO users VALUES (7,'Reserved','No Login',NULL,NULL,'WebGUI',NULL,NULL); -INSERT INTO users VALUES (8,'Reserved','No Login',NULL,NULL,'WebGUI',NULL,NULL); -INSERT INTO users VALUES (9,'Reserved','No Login',NULL,NULL,'WebGUI',NULL,NULL); -INSERT INTO users VALUES (10,'Reserved','No Login',NULL,NULL,'WebGUI',NULL,NULL); -INSERT INTO users VALUES (11,'Reserved','No Login',NULL,NULL,'WebGUI',NULL,NULL); -INSERT INTO users VALUES (12,'Reserved','No Login',NULL,NULL,'WebGUI',NULL,NULL); -INSERT INTO users VALUES (13,'Reserved','No Login',NULL,NULL,'WebGUI',NULL,NULL); -INSERT INTO users VALUES (14,'Reserved','No Login',NULL,NULL,'WebGUI',NULL,NULL); -INSERT INTO users VALUES (15,'Reserved','No Login',NULL,NULL,'WebGUI',NULL,NULL); -INSERT INTO users VALUES (16,'Reserved','No Login',NULL,NULL,'WebGUI',NULL,NULL); -INSERT INTO users VALUES (17,'Reserved','No Login',NULL,NULL,'WebGUI',NULL,NULL); -INSERT INTO users VALUES (18,'Reserved','No Login',NULL,NULL,'WebGUI',NULL,NULL); -INSERT INTO users VALUES (19,'Reserved','No Login',NULL,NULL,'WebGUI',NULL,NULL); -INSERT INTO users VALUES (20,'Reserved','No Login',NULL,NULL,'WebGUI',NULL,NULL); -INSERT INTO users VALUES (21,'Reserved','No Login',NULL,NULL,'WebGUI',NULL,NULL); -INSERT INTO users VALUES (22,'Reserved','No Login',NULL,NULL,'WebGUI',NULL,NULL); -INSERT INTO users VALUES (23,'Reserved','No Login',NULL,NULL,'WebGUI',NULL,NULL); -INSERT INTO users VALUES (24,'Reserved','No Login',NULL,NULL,'WebGUI',NULL,NULL); -INSERT INTO users VALUES (25,'Reserved','No Login',NULL,NULL,'WebGUI',NULL,NULL); +INSERT INTO users VALUES (1,'Visitor','No Login','','WebGUI',NULL,NULL,'English',''); +INSERT INTO users VALUES (2,'Reserved','No Login',NULL,'WebGUI',NULL,NULL,'English',NULL); +INSERT INTO users VALUES (3,'Admin','RvlMjeFPs2aAhQdo/xt/Kg','','WebGUI',NULL,NULL,'English',''); +INSERT INTO users VALUES (4,'Reserved','No Login',NULL,'WebGUI',NULL,NULL,'English',NULL); +INSERT INTO users VALUES (5,'Reserved','No Login',NULL,'WebGUI',NULL,NULL,'English',NULL); +INSERT INTO users VALUES (6,'Reserved','No Login',NULL,'WebGUI',NULL,NULL,'English',NULL); +INSERT INTO users VALUES (7,'Reserved','No Login',NULL,'WebGUI',NULL,NULL,'English',NULL); +INSERT INTO users VALUES (8,'Reserved','No Login',NULL,'WebGUI',NULL,NULL,'English',NULL); +INSERT INTO users VALUES (9,'Reserved','No Login',NULL,'WebGUI',NULL,NULL,'English',NULL); +INSERT INTO users VALUES (10,'Reserved','No Login',NULL,'WebGUI',NULL,NULL,'English',NULL); +INSERT INTO users VALUES (11,'Reserved','No Login',NULL,'WebGUI',NULL,NULL,'English',NULL); +INSERT INTO users VALUES (12,'Reserved','No Login',NULL,'WebGUI',NULL,NULL,'English',NULL); +INSERT INTO users VALUES (13,'Reserved','No Login',NULL,'WebGUI',NULL,NULL,'English',NULL); +INSERT INTO users VALUES (14,'Reserved','No Login',NULL,'WebGUI',NULL,NULL,'English',NULL); +INSERT INTO users VALUES (15,'Reserved','No Login',NULL,'WebGUI',NULL,NULL,'English',NULL); +INSERT INTO users VALUES (16,'Reserved','No Login',NULL,'WebGUI',NULL,NULL,'English',NULL); +INSERT INTO users VALUES (17,'Reserved','No Login',NULL,'WebGUI',NULL,NULL,'English',NULL); +INSERT INTO users VALUES (18,'Reserved','No Login',NULL,'WebGUI',NULL,NULL,'English',NULL); +INSERT INTO users VALUES (19,'Reserved','No Login',NULL,'WebGUI',NULL,NULL,'English',NULL); +INSERT INTO users VALUES (20,'Reserved','No Login',NULL,'WebGUI',NULL,NULL,'English',NULL); +INSERT INTO users VALUES (21,'Reserved','No Login',NULL,'WebGUI',NULL,NULL,'English',NULL); +INSERT INTO users VALUES (22,'Reserved','No Login',NULL,'WebGUI',NULL,NULL,'English',NULL); +INSERT INTO users VALUES (23,'Reserved','No Login',NULL,'WebGUI',NULL,NULL,'English',NULL); +INSERT INTO users VALUES (24,'Reserved','No Login',NULL,'WebGUI',NULL,NULL,'English',NULL); +INSERT INTO users VALUES (25,'Reserved','No Login',NULL,'WebGUI',NULL,NULL,'English',NULL); # # Table structure for table 'widget' diff --git a/docs/previousVersion.sql b/docs/previousVersion.sql index b0fdd3f20..9783fbbc7 100644 --- a/docs/previousVersion.sql +++ b/docs/previousVersion.sql @@ -195,6 +195,7 @@ CREATE TABLE event ( description text, startDate int(11) default NULL, endDate int(11) default NULL, + recurringEventId int(11) NOT NULL default '0', PRIMARY KEY (eventId) ) TYPE=MyISAM; @@ -370,6 +371,7 @@ INSERT INTO incrementer VALUES ('eventId',1); INSERT INTO incrementer VALUES ('linkId',1); INSERT INTO incrementer VALUES ('questionId',1); INSERT INTO incrementer VALUES ('submissionId',1); +INSERT INTO incrementer VALUES ('recurringEventId',1); # # Table structure for table 'link' @@ -518,7 +520,7 @@ INSERT INTO settings VALUES ('maxAttachmentSize','300'); INSERT INTO settings VALUES ('lib','/extras'); INSERT INTO settings VALUES ('sessionTimeout','28000'); INSERT INTO settings VALUES ('attachmentDirectoryLocal','/data/WebGUI/uploads'); -INSERT INTO settings VALUES ('smtpServer','smtp.mycompany.com'); +INSERT INTO settings VALUES ('smtpServer','localhost'); INSERT INTO settings VALUES ('companyEmail','info@mycompany.com'); INSERT INTO settings VALUES ('ldapURL','ldap://ldap.mycompany.com:389/o=MyCompany'); INSERT INTO settings VALUES ('companyName','My Company'); diff --git a/docs/upgrade_1.3.1-2.0.0.sql b/docs/upgrade_1.3.1-2.0.0.sql deleted file mode 100644 index 759deae88..000000000 --- a/docs/upgrade_1.3.1-2.0.0.sql +++ /dev/null @@ -1,2 +0,0 @@ -alter table event add column recurringEventId int not null; -INSERT INTO incrementer VALUES ('recurringEventId',1); diff --git a/docs/upgrade_2.0.0-2.1.0.sql b/docs/upgrade_2.0.0-2.1.0.sql new file mode 100644 index 000000000..3c9b26f20 --- /dev/null +++ b/docs/upgrade_2.0.0-2.1.0.sql @@ -0,0 +1,323 @@ +alter table users add column icq_temp varchar(30); +update users set icq_temp=icq; +alter table users drop icq; +alter table users change icq_temp icq varchar(30); +alter table users add column language varchar(30) not null default 'English' after connectDN; +alter table Article change body body mediumtext; +INSERT INTO settings VALUES ('recoverPasswordEmail','Someone (probably you) requested your account information be sent. Your password has been reset. The following represents your new account information:'); + + +CREATE TABLE international ( + internationalId int(11) NOT NULL default '0', + language varchar(30) NOT NULL default 'English', + message text, + PRIMARY KEY (internationalId,language) +) TYPE=MyISAM; + +INSERT INTO international VALUES (1,'English','Add content...'); +INSERT INTO international VALUES (2,'English','Page'); +INSERT INTO international VALUES (3,'English','Paste from clipboard...'); +INSERT INTO international VALUES (4,'English','Manage settings.'); +INSERT INTO international VALUES (5,'English','Manage groups.'); +INSERT INTO international VALUES (6,'English','Manage styles.'); +INSERT INTO international VALUES (7,'English','Manage users.'); +INSERT INTO international VALUES (8,'English','View page not found.'); +INSERT INTO international VALUES (9,'English','View clipboard.'); +INSERT INTO international VALUES (10,'English','View trash.'); +INSERT INTO international VALUES (11,'English','Empy trash.'); +INSERT INTO international VALUES (12,'English','Turn admin off.'); +INSERT INTO international VALUES (13,'English','View help index.'); +INSERT INTO international VALUES (14,'English','View pending submissions.'); +INSERT INTO international VALUES (15,'English','January'); +INSERT INTO international VALUES (16,'English','February'); +INSERT INTO international VALUES (17,'English','March'); +INSERT INTO international VALUES (18,'English','April'); +INSERT INTO international VALUES (19,'English','May'); +INSERT INTO international VALUES (20,'English','June'); +INSERT INTO international VALUES (21,'English','July'); +INSERT INTO international VALUES (22,'English','August'); +INSERT INTO international VALUES (23,'English','September'); +INSERT INTO international VALUES (24,'English','October'); +INSERT INTO international VALUES (25,'English','November'); +INSERT INTO international VALUES (26,'English','December'); +INSERT INTO international VALUES (27,'English','Sunday'); +INSERT INTO international VALUES (28,'English','Monday'); +INSERT INTO international VALUES (29,'English','Tuesday'); +INSERT INTO international VALUES (30,'English','Wednesday'); +INSERT INTO international VALUES (31,'English','Thursday'); +INSERT INTO international VALUES (32,'English','Friday'); +INSERT INTO international VALUES (33,'English','Saturday'); +INSERT INTO international VALUES (34,'English','set date'); +INSERT INTO international VALUES (35,'English','Administrative Function'); +INSERT INTO international VALUES (36,'English','You must be an administrator to perform this function. Please contact one of your administrators. The following is a list of the administrators for this system:'); +INSERT INTO international VALUES (37,'English','Permission Denied!'); +INSERT INTO international VALUES (38,'English','You do not have sufficient privileges to perform this operation. Please log in with an account that has sufficient privileges before attempting this operation.'); +INSERT INTO international VALUES (39,'English','You do not have sufficient privileges to access this page.'); +INSERT INTO international VALUES (41,'English','You\'re attempting to remove a vital component of the WebGUI system. If you were allowed to continue WebGUI may cease to function.'); +INSERT INTO international VALUES (40,'English','Vital Component'); +INSERT INTO international VALUES (42,'English','Please Confirm'); +INSERT INTO international VALUES (43,'English','Are you certain that you wish to delete this content?'); +INSERT INTO international VALUES (44,'English','Yes, I\'m sure.'); +INSERT INTO international VALUES (45,'English','No, I made a mistake.'); +INSERT INTO international VALUES (46,'English','My Account'); +INSERT INTO international VALUES (47,'English','Home'); +INSERT INTO international VALUES (48,'English','Hello'); +INSERT INTO international VALUES (49,'English','Click here to log out.'); +INSERT INTO international VALUES (50,'English','Username'); +INSERT INTO international VALUES (51,'English','Password'); +INSERT INTO international VALUES (52,'English','login'); +INSERT INTO international VALUES (53,'English','Make Page Printable'); +INSERT INTO international VALUES (54,'English','Create Account'); +INSERT INTO international VALUES (55,'English','Password (confirm)'); +INSERT INTO international VALUES (56,'English','Email Address'); +INSERT INTO international VALUES (57,'English','This is only necessary if you wish to use features that require Email.'); +INSERT INTO international VALUES (58,'English','I already have an account.'); +INSERT INTO international VALUES (59,'English','I forgot my password.'); +INSERT INTO international VALUES (60,'English','Are you certain you want to deactivate your account. If you proceed your account information will be lost permanently.'); +INSERT INTO international VALUES (61,'English','Update Account Information'); +INSERT INTO international VALUES (62,'English','save'); +INSERT INTO international VALUES (63,'English','Turn admin on.'); +INSERT INTO international VALUES (64,'English','Log out.'); +INSERT INTO international VALUES (65,'English','Please deactivate my account permanently.'); +INSERT INTO international VALUES (66,'English','Log In'); +INSERT INTO international VALUES (67,'English','Create a new account.'); +INSERT INTO international VALUES (68,'English','The account information you supplied is invalid. Either the account does not exist or the username/password combination was incorrect.'); +INSERT INTO international VALUES (69,'English','Please contact your system administrator for assistance.'); +INSERT INTO international VALUES (70,'English','Error'); +INSERT INTO international VALUES (71,'English','Recover password'); +INSERT INTO international VALUES (72,'English','recover'); +INSERT INTO international VALUES (73,'English','Log in.'); +INSERT INTO international VALUES (74,'English','Account Information'); +INSERT INTO international VALUES (75,'English','Your account information has been sent to your email address.'); +INSERT INTO international VALUES (76,'English','That email address is not in our databases.'); +INSERT INTO international VALUES (77,'English','That account name is already in use by another member of this site. Please try a different username. The following are some suggestions:'); +INSERT INTO international VALUES (78,'English','Your passwords did not match. Please try again.'); +INSERT INTO international VALUES (79,'English','Cannot connect to LDAP server.'); +INSERT INTO international VALUES (80,'English','Account created successfully!'); +INSERT INTO international VALUES (81,'English','Account updated successfully!'); +INSERT INTO international VALUES (82,'English','Administrative functions...'); +INSERT INTO international VALUES (83,'English','Add Group'); +INSERT INTO international VALUES (84,'English','Group Name'); +INSERT INTO international VALUES (85,'English','Description'); +INSERT INTO international VALUES (86,'English','Are you certain you wish to delete this group? Beware that deleting a group is permanent and will remove all privileges associated with this group.'); +INSERT INTO international VALUES (87,'English','Edit Group'); +INSERT INTO international VALUES (88,'English','Users In Group'); +INSERT INTO international VALUES (89,'English','Groups'); +INSERT INTO international VALUES (90,'English','Add new group.'); +INSERT INTO international VALUES (91,'English','Previous Page'); +INSERT INTO international VALUES (92,'English','Next Page'); +INSERT INTO international VALUES (93,'English','Help'); +INSERT INTO international VALUES (94,'English','See also'); +INSERT INTO international VALUES (95,'English','Help Index'); +INSERT INTO international VALUES (96,'English','Sorted By Action'); +INSERT INTO international VALUES (97,'English','Sorted by Object'); +INSERT INTO international VALUES (98,'English','Add Page'); +INSERT INTO international VALUES (99,'English','Title'); +INSERT INTO international VALUES (100,'English','Meta Tags'); +INSERT INTO international VALUES (101,'English','Are you certain that you wish to delete this page, its content, and all items under it?'); +INSERT INTO international VALUES (102,'English','Edit Page'); +INSERT INTO international VALUES (103,'English','Page Specifics'); +INSERT INTO international VALUES (104,'English','Page URL'); +INSERT INTO international VALUES (105,'English','Style'); +INSERT INTO international VALUES (106,'English','Check to give this style to all sub-pages.'); +INSERT INTO international VALUES (107,'English','Privileges'); +INSERT INTO international VALUES (108,'English','Owner'); +INSERT INTO international VALUES (109,'English','Owner can view?'); +INSERT INTO international VALUES (110,'English','Owner can edit?'); +INSERT INTO international VALUES (111,'English','Group'); +INSERT INTO international VALUES (112,'English','Group can view?'); +INSERT INTO international VALUES (113,'English','Group can edit?'); +INSERT INTO international VALUES (114,'English','Anybody can view?'); +INSERT INTO international VALUES (115,'English','Anybody can edit?'); +INSERT INTO international VALUES (116,'English','Check to give these privileges to all sub-pages.'); +INSERT INTO international VALUES (117,'English','Edit Authentication Settings'); +INSERT INTO international VALUES (118,'English','Anonymous Registration'); +INSERT INTO international VALUES (119,'English','Authentication Method (default)'); +INSERT INTO international VALUES (120,'English','LDAP URL (default)'); +INSERT INTO international VALUES (121,'English','LDAP Identity (default)'); +INSERT INTO international VALUES (122,'English','LDAP Identity Name'); +INSERT INTO international VALUES (123,'English','LDAP Password Name'); +INSERT INTO international VALUES (124,'English','Edit Company Information'); +INSERT INTO international VALUES (125,'English','Company Name'); +INSERT INTO international VALUES (126,'English','Company Email Address'); +INSERT INTO international VALUES (127,'English','Company URL'); +INSERT INTO international VALUES (128,'English','Edit File Settings'); +INSERT INTO international VALUES (129,'English','Path to WebGUI Extras'); +INSERT INTO international VALUES (130,'English','Maximum Attachment Size'); +INSERT INTO international VALUES (131,'English','Web Attachment Path'); +INSERT INTO international VALUES (132,'English','Server Attachment Path'); +INSERT INTO international VALUES (133,'English','Edit Mail Settings'); +INSERT INTO international VALUES (134,'English','Recover Password Message'); +INSERT INTO international VALUES (135,'English','SMTP Server'); +INSERT INTO international VALUES (136,'English','Home Page'); +INSERT INTO international VALUES (137,'English','Page Not Found Page'); +INSERT INTO international VALUES (138,'English','Yes'); +INSERT INTO international VALUES (139,'English','No'); +INSERT INTO international VALUES (140,'English','Edit Miscellaneous Settings'); +INSERT INTO international VALUES (141,'English','Not Found Page'); +INSERT INTO international VALUES (142,'English','Session Timeout'); +INSERT INTO international VALUES (143,'English','Manage Settings'); +INSERT INTO international VALUES (144,'English','View Statistics'); +INSERT INTO international VALUES (145,'English','WebGUI Build Version'); +INSERT INTO international VALUES (146,'English','Active Sessions'); +INSERT INTO international VALUES (147,'English','Viewable Pages'); +INSERT INTO international VALUES (148,'English','Viewable Widgets'); +INSERT INTO international VALUES (149,'English','Users'); +INSERT INTO international VALUES (150,'English','Add Style'); +INSERT INTO international VALUES (151,'English','Style Name'); +INSERT INTO international VALUES (152,'English','Header'); +INSERT INTO international VALUES (153,'English','Footer'); +INSERT INTO international VALUES (154,'English','Style Sheet'); +INSERT INTO international VALUES (155,'English','Are you certain you wish to delete this style and migrate all pages using this style to the \"Fail Safe\" style?'); +INSERT INTO international VALUES (156,'English','Edit Style'); +INSERT INTO international VALUES (157,'English','Styles'); +INSERT INTO international VALUES (158,'English','Add a new style.'); +INSERT INTO international VALUES (159,'English','Pending Submissions'); +INSERT INTO international VALUES (160,'English','Date Submitted'); +INSERT INTO international VALUES (161,'English','Submitted By'); +INSERT INTO international VALUES (162,'English','Are you certain that you wish to purge all the pages and widgets in the trash?'); +INSERT INTO international VALUES (163,'English','Add User'); +INSERT INTO international VALUES (164,'English','Authentication Method'); +INSERT INTO international VALUES (165,'English','LDAP URL'); +INSERT INTO international VALUES (166,'English','Connect DN'); +INSERT INTO international VALUES (167,'English','Are you certain you want to delete this user? Be warned that all this user\'s information will be lost permanently if you choose to proceed.'); +INSERT INTO international VALUES (168,'English','Edit User'); +INSERT INTO international VALUES (169,'English','Add a new user.'); +INSERT INTO international VALUES (170,'English','search'); +INSERT INTO international VALUES (171,'English','rich edit'); +INSERT INTO international VALUES (172,'English','Article'); +INSERT INTO international VALUES (173,'English','Add Article'); +INSERT INTO international VALUES (174,'English','Display the title?'); +INSERT INTO international VALUES (175,'English','Process macros?'); +INSERT INTO international VALUES (176,'English','Start Date'); +INSERT INTO international VALUES (177,'English','End Date'); +INSERT INTO international VALUES (178,'English','Body'); +INSERT INTO international VALUES (179,'English','Image'); +INSERT INTO international VALUES (180,'English','Link Title'); +INSERT INTO international VALUES (181,'English','Link URL'); +INSERT INTO international VALUES (182,'English','Attachment'); +INSERT INTO international VALUES (183,'English','Convert carriage returns?'); +INSERT INTO international VALUES (184,'English','(Check if you aren\'t adding <br> manually.)'); +INSERT INTO international VALUES (185,'English','Edit Article'); +INSERT INTO international VALUES (186,'English','Delete'); +INSERT INTO international VALUES (187,'English','Events Calendar'); +INSERT INTO international VALUES (188,'English','Add Events Calendar'); +INSERT INTO international VALUES (189,'English','Happens only once.'); +INSERT INTO international VALUES (190,'English','Day'); +INSERT INTO international VALUES (191,'English','Week'); +INSERT INTO international VALUES (192,'English','Add Event'); +INSERT INTO international VALUES (193,'English','Recurs every'); +INSERT INTO international VALUES (194,'English','until'); +INSERT INTO international VALUES (195,'English','Are you certain that you want to delete this event'); +INSERT INTO international VALUES (197,'English','Edit Events Calendar'); +INSERT INTO international VALUES (196,'English','and all of its recurring events'); +INSERT INTO international VALUES (198,'English','Edit Event'); +INSERT INTO international VALUES (199,'English','Extra Column'); +INSERT INTO international VALUES (200,'English','Add Extra Column'); +INSERT INTO international VALUES (201,'English','Spacer'); +INSERT INTO international VALUES (202,'English','Width'); +INSERT INTO international VALUES (203,'English','StyleSheet Class'); +INSERT INTO international VALUES (204,'English','Edit Extra Column'); +INSERT INTO international VALUES (205,'English','F.A.Q.'); +INSERT INTO international VALUES (206,'English','Add F.A.Q.'); +INSERT INTO international VALUES (207,'English','Add Question'); +INSERT INTO international VALUES (208,'English','Question'); +INSERT INTO international VALUES (209,'English','Answer'); +INSERT INTO international VALUES (211,'English','Edit F.A.Q.'); +INSERT INTO international VALUES (210,'English','Are you certain that you want to delete this question?'); +INSERT INTO international VALUES (212,'English','Add a new question.'); +INSERT INTO international VALUES (213,'English','Edit Question'); +INSERT INTO international VALUES (214,'English','Link List'); +INSERT INTO international VALUES (215,'English','Add Link'); +INSERT INTO international VALUES (216,'English','URL'); +INSERT INTO international VALUES (217,'English','Are you certain that you want to delete this link?'); +INSERT INTO international VALUES (218,'English','Edit Link List'); +INSERT INTO international VALUES (219,'English','Add Link List'); +INSERT INTO international VALUES (220,'English','Edit Link'); +INSERT INTO international VALUES (221,'English','Add a new link.'); +INSERT INTO international VALUES (222,'English','Add Message Board'); +INSERT INTO international VALUES (223,'English','Message Board'); +INSERT INTO international VALUES (224,'English','Who can post?'); +INSERT INTO international VALUES (225,'English','Messages Per Page'); +INSERT INTO international VALUES (226,'English','Edit Timeout'); +INSERT INTO international VALUES (227,'English','Edit Message Board'); +INSERT INTO international VALUES (228,'English','Editing Message...'); +INSERT INTO international VALUES (229,'English','Subject'); +INSERT INTO international VALUES (230,'English','Message'); +INSERT INTO international VALUES (231,'English','Posting New Message...'); +INSERT INTO international VALUES (232,'English','no subject'); +INSERT INTO international VALUES (233,'English','(eom)'); +INSERT INTO international VALUES (234,'English','Posting Reply...'); +INSERT INTO international VALUES (235,'English','Edit Message'); +INSERT INTO international VALUES (236,'English','Post Reply'); +INSERT INTO international VALUES (237,'English','Subject:'); +INSERT INTO international VALUES (238,'English','Author:'); +INSERT INTO international VALUES (239,'English','Date:'); +INSERT INTO international VALUES (240,'English','Message ID:'); +INSERT INTO international VALUES (241,'English','Previous Thread'); +INSERT INTO international VALUES (242,'English','Back To Message List'); +INSERT INTO international VALUES (243,'English','Next Thread'); +INSERT INTO international VALUES (244,'English','Author'); +INSERT INTO international VALUES (245,'English','Date'); +INSERT INTO international VALUES (246,'English','Post New Message'); +INSERT INTO international VALUES (247,'English','Thread Started'); +INSERT INTO international VALUES (248,'English','Replies'); +INSERT INTO international VALUES (249,'English','Last Reply'); +INSERT INTO international VALUES (250,'English','Poll'); +INSERT INTO international VALUES (251,'English','Add Poll'); +INSERT INTO international VALUES (252,'English','Active'); +INSERT INTO international VALUES (253,'English','Who can vote?'); +INSERT INTO international VALUES (254,'English','Graph Width'); +INSERT INTO international VALUES (255,'English','Question'); +INSERT INTO international VALUES (256,'English','Answers'); +INSERT INTO international VALUES (257,'English','(Enter one answer per line. No more than 20.)'); +INSERT INTO international VALUES (258,'English','Edit Poll'); +INSERT INTO international VALUES (259,'English','SQL Report'); +INSERT INTO international VALUES (260,'English','Add SQL Report'); +INSERT INTO international VALUES (261,'English','Template'); +INSERT INTO international VALUES (262,'English','Query'); +INSERT INTO international VALUES (263,'English','DSN'); +INSERT INTO international VALUES (264,'English','Database User'); +INSERT INTO international VALUES (265,'English','Database Password'); +INSERT INTO international VALUES (266,'English','Edit SQL Report'); +INSERT INTO international VALUES (267,'English','Error: The DSN specified is of an improper format.'); +INSERT INTO international VALUES (268,'English','Error: The SQL specified is of an improper format.'); +INSERT INTO international VALUES (269,'English','Error: There was a problem with the query.'); +INSERT INTO international VALUES (270,'English','Error: Could not connect to the database.'); +INSERT INTO international VALUES (271,'English','Syndicated Content'); +INSERT INTO international VALUES (272,'English','Add Syndicated Content'); +INSERT INTO international VALUES (273,'English','URL to RSS File'); +INSERT INTO international VALUES (274,'English','Edit Syndicated Content'); +INSERT INTO international VALUES (275,'English','Last Fetched'); +INSERT INTO international VALUES (276,'English','Current Content'); +INSERT INTO international VALUES (277,'English','User Submission System'); +INSERT INTO international VALUES (278,'English','Add User Submission System'); +INSERT INTO international VALUES (279,'English','Who can contribute?'); +INSERT INTO international VALUES (280,'English','Submissions Per Page'); +INSERT INTO international VALUES (281,'English','Approved'); +INSERT INTO international VALUES (282,'English','Denied'); +INSERT INTO international VALUES (283,'English','Pending'); +INSERT INTO international VALUES (284,'English','Default Status'); +INSERT INTO international VALUES (285,'English','Add Submission'); +INSERT INTO international VALUES (286,'English','(Uncheck if you\'re writing an HTML submission.)'); +INSERT INTO international VALUES (287,'English','Date Submitted'); +INSERT INTO international VALUES (288,'English','Status'); +INSERT INTO international VALUES (289,'English','Edit/Delete'); +INSERT INTO international VALUES (290,'English','Untitiled'); +INSERT INTO international VALUES (291,'English','Are you certain you wish to delete this submission?'); +INSERT INTO international VALUES (292,'English','Edit User Submission System'); +INSERT INTO international VALUES (293,'English','Edit Submission'); +INSERT INTO international VALUES (294,'English','Post New Submission'); +INSERT INTO international VALUES (295,'English','Date Submitted'); +INSERT INTO international VALUES (296,'English','Submitted By'); +INSERT INTO international VALUES (297,'English','Submitted By:'); +INSERT INTO international VALUES (298,'English','Date Submitted:'); +INSERT INTO international VALUES (299,'English','Approve'); +INSERT INTO international VALUES (300,'English','Leave Pending'); +INSERT INTO international VALUES (301,'English','Deny'); +INSERT INTO international VALUES (302,'English','Edit'); +INSERT INTO international VALUES (303,'English','Return To Submissions List'); +INSERT INTO international VALUES (304,'English','Language'); + + + diff --git a/etc/WebGUI.conf.original b/etc/WebGUI.conf.original new file mode 100644 index 000000000..cbe1dd612 --- /dev/null +++ b/etc/WebGUI.conf.original @@ -0,0 +1,4 @@ +dsn = DBI:mysql:WebGUI +dbuser = webgui +dbpass = password +logfile = /data/webgui.log diff --git a/extras/ieEdit.html b/extras/ieEdit.html new file mode 100644 index 000000000..82bb5d7fc --- /dev/null +++ b/extras/ieEdit.html @@ -0,0 +1,537 @@ + + + + + + + + + +Edit Window + + + + + + diff --git a/extras/ieEdit.js b/extras/ieEdit.js new file mode 100644 index 000000000..717544d9b --- /dev/null +++ b/extras/ieEdit.js @@ -0,0 +1,665 @@ +// EDITOR PUBLIC (API) + +// POPUP (Link, table and image popup need to be worked on) +function _CPopup_Init() +{ +var sz = ""+ "
"+ ""+ ""+ ""+ ""+ ""+ ""+ "
"+ "
"+ ""; +idPopup.document.open("text/html","replace"); +idPopup.document.write(sz); +idPopup.document.close(); +} + + +function _CPopup_InsertDatabound(eSelect) +{ +if (eSelect.selectedIndex != 0) +{ +var sElemName = eSelect.options[eSelect.selectedIndex].text; +var iLen = sElemName.length +sElemName = sElemName.replace(/"/g, '"') +insertHTML('') +eSelect.selectedIndex = 0; +idEditbox.focus() +} +} +function _CPopup_Hide() +{ +document.all.idPopup.style.zIndex=-1 +document.all.idPopup.style.visibility = "hidden" +idPopup.document._type = "" +idPopup.document.onkeydown=idPopup.document.onmouseover=idPopup.document.onclick = null +idEditbox.focus() +} +function _CPopup_Show(szType) +{ +var oRenderer, szCacheKey = "PopupRenderer." + szType +if (idPopup.document._type == szType) +_CPopup_Hide() +else +{ +document.all.idPopup.style.zIndex = -1 +oRenderer = g_state.aCache[szCacheKey] +if ((!oRenderer) || ("Link"==szType)) +g_state.aCache[szCacheKey] = oRenderer = new _CPopupRenderer(szType) +// Force Sizing +document.all.idPopup.style.visibility = "" +idPopup.document.all.puRegion.style.pixelHeight = idPopup.document.all.puRegion.style.pixelWidth = 100 +idPopup.document._type = szType +idPopup.document._renderer = oRenderer +idPopup.document.all.caption.innerText = oRenderer.GetCaption() +idPopup.document.all.content.innerHTML = oRenderer.GetHTML() +idPopup.document.onkeydown = new Function("this._renderer.OnKeyDown()") +idPopup.document.onmouseover = new Function("this._renderer.OnMouseOver()") +idPopup.document.onclick = new Function("this._renderer.OnClick()") +oRenderer.ResetContext(idPopup.document) +setTimeout("_CPopupRenderer_Display('" + szType + "')",0) +} +} +function _CPopupRenderer_Display(szType) { +var oRenderer, szCacheKey = "PopupRenderer." + szType +oRenderer = g_state.aCache[szCacheKey] +if (oRenderer.autoSize) { +idPopup.document.all.puRegion.style.pixelHeight = document.all.idPopup.style.pixelHeight = idPopup.document.all.puRegion.offsetHeight +idPopup.document.all.puRegion.style.pixelWidth = document.all.idPopup.style.pixelWidth = idPopup.document.all.puRegion.offsetWidth + 50 +document.all.idPopup.style.pixelLeft = (document.body.clientWidth - idPopup.document.all.puRegion.offsetWidth) / 2 +} +else { +idPopup.document.all.puRegion.style.pixelHeight = document.all.idPopup.style.pixelHeight = document.body.clientHeight - idToolbar.offsetHeight- document.all.idMode.offsetHeight-20 +idPopup.document.all.puRegion.style.pixelWidth = document.all.idPopup.style.pixelWidth = document.body.clientWidth - 50 +document.all.idPopup.style.pixelLeft = 25 +} +document.all.idPopup.style.zIndex=2 +idPopup.focus() +} +function _CPopupRenderer(szType) +{ +this.szType = szType +this.elCurrent = this.oDocument = null +this.ResetContext = _CPopupRenderer_ResetContext +this.GetCaption = _CPopupRenderer_GetCaption +this.GetHTML = _CPopupRenderer_GetHTML +this.autoSize = true +this.OnMouseOver = new Function() +this.OnKeyDown = _CListPopupRenderer_GenericOnKeyDown +switch(szType) +{ +case "formatblock": +case "font": +case "fontsize": +this.OnMouseOver= _CListPopupRenderer_OnMouseOver +this.OnKeyDown = _CListPopupRenderer_OnKeyDown +case "BackColor": +case "ForeColor": +this.OnClick = _CListPopupRenderer_OnClick +this.Highlight = _CListPopupRenderer_Highlight +this.Select = _CListPopupRenderer_Select +break +default: +this.OnClick = new Function() +break +} +switch(szType) +{ +case "formatblock": +this.szCaption = L_PUTITLEPARAGRAPHSTYLE_TEXT +this.PrepareHTML = _CFormatBlockPopupRenderer_PrepareHTML +this.szHTML = this.PrepareHTML() +break +case "font": +this.szCaption = L_PUTITLEFONTFACE_TEXT +this.PrepareHTML = _CFontFacesPopupRenderer_PrepareHTML +this.szHTML = this.PrepareHTML() +break +case "fontsize": +this.szCaption = L_PUTITLEFONTSIZE_TEXT +this.PrepareHTML =_CFontSizesPopupRenderer_PrepareHTML +this.szHTML = this.PrepareHTML() +break +case "Link": +this.szCaption = L_PUTITLELINK_TEXT +this.PrepareHTML = _CLinkPopupRenderer_PrepareHTML +this.szHTML = this.PrepareHTML() +break +case "Table": +this.szCaption = L_PUTITLENEWTABLE_TEXT +this.PrepareHTML = _CTablePopupRenderer_PrepareHTML +this.szHTML = this.PrepareHTML() +break +case "Image": +this.szCaption = L_PUTITLEIMAGE_TEXT +this.PrepareHTML = _CImagePopupRenderer_PrepareHTML +this.szHTML = this.PrepareHTML() +this.autoSize = false +break +case "BackColor": +this.szCaption = L_PUTITLEBGCOLOR_TEXT +this.szHTML = "
" + _CUtil_BuildColorTable("") + "
" +break +case "ForeColor": +this.szCaption = L_PUTITLETEXTCOLOR_TEXT +this.szHTML = "
" + _CUtil_BuildColorTable("") + "
" +break +default: +this.szCaption = "" +break +} +} +function _CPopupRenderer_ResetContext(oDoc) +{ +this.oDocument = oDoc +this.elCurrent = null +if (this.szType=="Table") { +var oSel = idEditbox.document.selection.createRange() +var oBlock = (oSel.parentElement != null ? _CUtil_GetElement(oSel.parentElement(),"TABLE") : _CUtil_GetElement(oSel.item(0),"TABLE")) +if (oBlock!=null) { +oDoc.all.tabEdit.className="" +oDoc.all.tabEditBodytxtPadding.value = oBlock.cellPadding +oDoc.all.tabEditBodytxtSpacing.value = oBlock.cellSpacing +oDoc.all.tabEditBodytxtBorder.value = oBlock.border +oDoc.all.tabEditBodytxtBorderColor.value = oBlock.borderColor +oDoc.all.tabEditBodytxtBackgroundImage.value = oBlock.background +oDoc.all.tabEditBodytxtBackgroundColor.value = oBlock.bgColor +} +oDoc.elCurrent = oBlock +} +} +function _CPopupRenderer_GetCaption() +{ +return this.szCaption +} +function _CPopupRenderer_GetHTML() +{ +return this.szHTML +} +function _CFontSizesPopupRenderer_PrepareHTML() +{ +var sz = "" +for (var i=1; i <= 7; i++) +{ +sz += "" ++ "" ++ "" ++ "" +} +sz += "
" ++ "" ++ L_STYLESAMPLE_TEXT ++ "" ++ "
" +return sz +} +function _CFontFacesPopupRenderer_PrepareHTML() +{ +var sz = "" +for (var i=0; i < defaultFonts.length; i++) +{ +sz += "" ++ "" ++ "" ++ "" +} +// sz += "" +sz += "
" ++ "" ++ defaultFonts[i][1] ++ "" ++ (defaultFonts[i][2] ? ("(" + defaultFonts[i][1] + ")") : "") ++ "
" + L_CUSTOMFONT_TEXT + "
" +return sz +} +function _CFontFacesPopupRenderer_InsertOther(el) { +if (el._item=="custom") { +el._item = "input" +var sz = "" +el.innerHTML = sz +el.children[0].focus() +} +el.document.parentWindow.event.cancelBubble = true +} +function _CFormatBlockPopupRenderer_PrepareHTML() +{ +var sz, defaultParagraphs = new Array() +defaultParagraphs[0] = new Array("

", L_STYLENORMAL_TEXT) +defaultParagraphs[1] = new Array("

", L_STYLEFORMATTED_TEXT)
+for (var i=2; i <= 7; i++) 
+defaultParagraphs[i] = new Array("", L_STYLEHEADING_TEXT + (i-1))	
+sz = ""
+for (var i=0; i < defaultParagraphs.length; i++) 
+{
+sz += ""
++ ""
++	""
+}
+sz += "
" ++ defaultParagraphs[i][0] ++ defaultParagraphs[i][1] ++ "" ++ "
" +return sz +} +function _CTablePopupRenderer_PrepareHTMLPage(szID,bDisplay) { +var sz="" ++ "" ++ "" ++ "" ++ "" ++ "" ++ "
" ++ "" ++ L_TABLEROWSANDCOLS_TEXT ++ "" ++ "
" ++ "" ++ L_TABLEPADDINGANDSPACING_TEXT ++ "" ++ "
" ++ "" ++ L_TABLEBORDERS_TEXT ++ "" ++ "
" ++ "" ++ L_TABLEBG_TEXT ++ "" ++ "
" ++ "
" ++ "" +if (szID=="tabNewBody") { +sz+= "
" ++ "

" + L_TABLEROWSANDCOLS_TEXT + "

" ++ "
" ++ L_TABLEINPUTROWS_TEXT ++ "" ++ "
" ++ L_TABLEINPUTCOLUMNS_TEXT ++ "" ++ "
" +} +else { +sz+= "
" ++ "

" + L_TABLEROWSANDCOLS_TEXT + "

" ++ "

" ++ "
" ++ "

" +} +sz += "
" ++ "

" + L_TABLEPADDINGANDSPACING_TEXT + "

" ++ L_TABLEINPUTCELLPADDING_TEXT ++ "" ++ "
" ++ L_TABLEINPUTCELLSPACING_TEXT ++ "" ++ "
" ++ "
" ++ "

" + L_TABLEBORDERS_TEXT + "

" ++ L_TABLEINPUTBORDER_TEXT ++ "" ++ "
" ++ L_TABLEINPUTBORDERCOLOR_TEXT ++ "
" ++ _CUtil_BuildColorTable("idBorder"+szID, "", "parent._CTablePopupRenderer_ColorSelect(this,'" + szID + "txtBorderColor')") ++ "
" ++ "
" ++ "

" + L_TABLEBG_TEXT + "

" ++ L_TABLEINPUTBGIMGURL_TEXT ++ "" ++ "
" ++ L_TABLEINPUTBGCOLOR_TEXT ++ "
" ++ _CUtil_BuildColorTable("idBackground"+szID, "", "parent._CTablePopupRenderer_ColorSelect(this,'" + szID + "txtBackgroundColor')") ++ "
" ++ "
" +if (szID=="tabNewBody") { +sz += "" ++ " " +} else { +sz += "" ++ " " +} +sz+= "
" +return sz +} +function _CTablePopupRenderer_PrepareHTML() +{ +var sz = "" ++ "
New Table
Edit Table
 
" ++ _CTablePopupRenderer_PrepareHTMLPage("tabNewBody",true) ++ _CTablePopupRenderer_PrepareHTMLPage("tabEditBody",false) ++ "
" +return sz +} +function _CTablePopupRenderer_Select(el,szID, id) +{ +var d = el.document +for (var i = 1; i < 5; i++) +d.all[szID + "prop" + i].style.display = "none" +d.all[szID + id].style.display = "" +} +function _CTablePopupRenderer_ColorSelect(el,id) +{ +el.document.all[id].value = el.bgColor +} +function _CTablePopupRenderer_AddRow(el) { +var elRow = el.document.elCurrent.insertRow() +for (var i=0;i" +for (var r=0; r < d.all[szID + "txtRows"].value; r++) +{ +sz += "" +for (var c=0; c < d.all[szID + "txtColumns"].value; c++) +sz += " " +sz += "" +} +sz += "" +insertHTML(sz) +} else +if (d.elCurrent) { +d.elCurrent.cellPadding = d.all.tabEditBodytxtPadding.value +d.elCurrent.cellSpacing = d.all.tabEditBodytxtSpacing.value +d.elCurrent.border = d.all.tabEditBodytxtBorder.value +d.elCurrent.className = (d.elCurrent.border=="" || d.elCurrent.border==0) ? "NOBORDER" : "" +d.elCurrent.borderColor = d.all.tabEditBodytxtBorderColor.value +d.elCurrent.bgColor = d.all.tabEditBodytxtBackgroundColor.value +d.elCurrent.background = d.all.tabEditBodytxtBackgroundImage.value +} +_CPopup_Hide() +} +function _CListPopupRenderer_OnClick() +{ +var elTD = _CUtil_GetElement(this.oDocument.parentWindow.event.srcElement, "TD") +if (elTD && elTD._item) this.Select(elTD) +} +function _CListPopupRenderer_GenericOnKeyDown() { +var ev = this.oDocument.parentWindow.event +if (ev.keyCode==27) _CPopup_Hide() +} +function _CListPopupRenderer_OnKeyDown() +{ +var el +var iRow = iCell = 0 +var ev = this.oDocument.parentWindow.event +var idList = this.oDocument.all.idList +var elTR = _CUtil_GetElement(this.elCurrent,"TR") +var elTD = _CUtil_GetElement(this.elCurrent,"TD") +if (elTR != null) +{ +iRow = elTR.rowIndex +iCell = elTD.cellIndex +} +switch (ev.keyCode) +{ +case 37: +iCell-- +if (iCell < 0) +iCell = idList.rows[iRow].cells.length-1 +break +case 38: +iRow-- +if (iRow < 0) +iRow = idList.rows.length-1 +break +case 39: +iCell++ +if (iCell > idList.rows[iRow].cells.length-1) +iCell = 0 +break +case 40: +iRow++ +if (iRow > idList.rows.length-1) +iRow = 0 +break +case 13: +break; +case 27: +_CPopup_Hide() +break; +default: +return; +} +el = idList.rows[iRow].cells[iCell] +if (el && el._item) +if (13 == ev.keyCode) { +ev.keyCode=0 +this.Select(el) +} +else +this.Highlight(el) +} +function _CListPopupRenderer_OnMouseOver() +{ +var el = _CUtil_GetElement(this.oDocument.parentWindow.event.srcElement, "TD") +if (el && el._item && el != this.elCurrent) +this.Highlight(el) +} +function _CListPopupRenderer_Highlight(el) +{ +var elC = this.elCurrent +if (elC) elC.style.borderWidth = elC.style.borderColor = elC.style.borderStyle = "" +el.style.borderWidth = "1px" +el.style.borderColor = "green" +el.style.borderStyle = "solid" +this.elCurrent = el +} +function _CListPopupRenderer_Select(elTD) +{ +g_state.RestoreSelection() +var el = elTD.children[0] +switch (this.szType) +{ +case "font": +_Format("FontName",el.face) +break +case "fontsize": +_Format("FontSize",el.size) +break +case "formatblock": +_Format("FormatBlock","<" + el.tagName + ">") +break +case "ForeColor": +_Format("ForeColor", elTD.bgColor) +break +case "BackColor": +_Format("BackColor",elTD.bgColor) +break +} +_CPopup_Hide() +} +function _CLinkPopupRenderer_AddLink(d) +{ +var szURL = d.all.urlValue.value +var szType = d.all.urlType[d.all.urlType.selectedIndex].text +var oSel = g_state.GetSelection() +var sType = oSel.type +szURL = ((0 == szURL.indexOf("mailto:") || 0 == szURL.indexOf("http://") || 0 == szURL.indexOf("ftp://")) ? "" : szType) + szURL +if (szURL!="") +{ +if ((oSel.parentElement) && (oSel.text=="")) +{ +oSel.expand("word") +if (oSel.text=="") +{ +var oStore = oSel.duplicate() +if (d.all.pageList) { +var idx = d.all.pageList.selectedIndex +if (d.all.pageList[idx].value==szURL) +oSel.text = d.all.pageList[idx].text +else +oSel.text = szURL +} +else +oSel.text = szURL +oSel.setEndPoint("StartToStart",oStore) +} +oSel.select() +sType="Text" +} +if ((oSel.item) && (oSel.item(0).tagName=="IMG")) +{ +oSel.item(0).width = oSel.item(0).offsetWidth +oSel.item(0).height = oSel.item(0).offsetHeight +oSel.item(0).border = (d.all.displayBorder.checked) ? 1 : "" +} +if (d.all.urlValue.value!="") +oSel.execCommand("CreateLink",false,szURL) +else +oSel.execCommand("UnLink",false,szURL) +} +idEditbox.focus() +} +function _CLinkPopupRenderer__UpdateURL(oDoc,szURL) { +var szType = szURL.substring(0,szURL.indexOf(":")) +for (var i=0;i0) +{ +sz += "" ++ "" ++ "" ++ L_LINKSELECT_TEXT ++ "" +} +var arTypes = new Array("http","ftp","mailto") +var arText = new Array("http://","ftp://","mailto:") +var szType = szURL.substring(0,szURL.indexOf(":")) +if (("http"==szType) || ("ftp"==szType)) +szURL = szURL.substring(szURL.indexOf("//")+2) +else +szURL = szURL.substring(szURL.indexOf(":")+1) +sz += "" ++ "
" ++ L_LINKWEB_TEXT ++ "" +if (bImg) +{ +sz += "" ++ "
" ++ "" ++ L_LINKIMGBORDER_TEXT +} +sz += "" ++ "" ++ "" ++ "" ++ "" ++ " " ++ "" ++ "" ++ "" +return sz +} +// UTIL +function _CUtil_GetElement(oEl,sTag) +{ +while (oEl!=null && oEl.tagName!=sTag) +oEl = oEl.parentElement +return oEl +} +function _CUtil_BuildColorTable(sID,fmt,szClick) +{ +var sz, cPick = new Array("00","33","66","99","CC","FF"), iCnt=2 +var iColors = cPick.length, szColor = "" +sz = "
 
" ++ "" +for (var r=0;r=0;g--) +for (var b=iColors-1;b>=0;b--) { +szColor = cPick[r]+cPick[g]+cPick[b] +sz+=" " +} +sz+="" +} +sz+="
" +return sz +} +function _CUtil_GetBlock(oEl) +{ +var sBlocks = "|H1|H2|H3|H4|H5|H6|P|PRE|LI|TD|DIV|BLOCKQUOTE|DT|DD|TABLE|HR|IMG|" +while ((oEl!=null) && (sBlocks.indexOf("|"+oEl.tagName+"|")==-1)) +oEl = oEl.parentElement +return oEl +} diff --git a/extras/nonIeEdit.html b/extras/nonIeEdit.html new file mode 100644 index 000000000..ad6cde14d --- /dev/null +++ b/extras/nonIeEdit.html @@ -0,0 +1,109 @@ + + +Edit Window + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + diff --git a/extras/nonIeEdit.js b/extras/nonIeEdit.js new file mode 100644 index 000000000..b22ffc1c9 --- /dev/null +++ b/extras/nonIeEdit.js @@ -0,0 +1,82 @@ +/* + +#------------------------------------------------------------------- +# WebGUI is Copyright 2001 Plain Black Software. +#------------------------------------------------------------------- +# Please read the legal notices (docs/legal.txt) and the license +# (docs/license.txt) that came with this distribution before using +# this software. +#------------------------------------------------------------------- +# http://www.plainblack.com info@plainblack.com +#------------------------------------------------------------------- + +*/ + +var color; +var formObj; + +function boldText(obj) { + obj.value = obj.value+''+prompt("Enter the text to bold:", "")+''; +} + +function centerText(obj) { + obj.value = obj.value+'
'+prompt("Enter the text to center:", "")+'
'; +} + +function colorText(obj) { + formObj = obj; + window.open("/extras/colorPicker.html","colorPicker","width=438,height=258"); +} + +function copyright(obj) { + obj.value = obj.value+'©'; +} + +function email(obj) { + var email = prompt("Enter the Email address:", ""); + obj.value = obj.value+''+email+''; +} + +function getShowMeText() { + return formObj.value; +} + +function imageAdd(obj) { + obj.value = obj.value+''; +} + +function italicText(obj) { + obj.value = obj.value+''+prompt("Enter the text to italicize:", "")+''; +} + +function list(obj) { + var item; + obj.value = obj.value+'
    '; + obj.value = obj.value+'
  • '+prompt("Enter the first item in the list:", ""); + while (item = prompt("Enter the next item in the list (cancel when done):", "")) { + obj.value = obj.value+'
  • '+item; + } + obj.value = obj.value+'
'; +} + +function registered(obj) { + obj.value = obj.value+'®'; +} + +function setColor(remoteColor) { + formObj.value = formObj.value+''+prompt("Enter the text to color:","")+''; +} + +function showMe(obj) { + formObj = obj; + window.open("/extras/viewer.html","showMeViewer","width=500,height=300,scrollbars=1"); +} + +function trademark(obj) { + obj.value = obj.value+'TM'; +} + +function url(obj) { + obj.value = obj.value+''+prompt("Enter the title of the link:", "Google")+''; +} + diff --git a/extras/toolbar.gif b/extras/toolbar.gif new file mode 100644 index 0000000000000000000000000000000000000000..9f61f33494606ff3120ec6044dcb86027bb1ac82 GIT binary patch literal 6734 zcmeH`Wmgjb!-fZf5{k66k|RVqMt64&>F&RV7i7^)j{<;0Ex2U;u!8a`Gr8r7938#@M(ZAfPoNp*J^oczk^J z2vV9GFlZ4t`Iu5@$Qu@_siWSxHISamXPYq7T$}JVjnwN;R2<&>bHB%RAe?7O;swa|7`)i@ z@29jjO9cViyuQ5wSOa3OC@C1DarYu)LP1 zarC)VX`Fm))OHrZ)D$_U=DE~_g)i=Cow1$+3!H1r^N3yQ`49!~C5GY)+(H^Q_Eorz zs;#^@f5E>h*f|)MDJD{`Fr0-&dllPCG{+kayltZ-uY5&x~jWQ|_Mm=z*r5m88a|zNw1jw|$EZGfmwd4um}Qfqd0EX55lWyLFs> ztNOU?Sbqxw9k^A&<-d0lc$*U*MVzam_&LnSUn;B7#p1%%GDdus1~x+r!)Gri4f$bp zIZ;ASKTbnI=}*!qeoX;`C<ak~ozw%qQ)M85ZWf(Ge83Lq$P-(iO1<1e|K&h!}D%%FEM z$LVZRcl%F^Q~OZ__V3cq$rV3Toi)5n={PD-jurpje@XPPhWpRr>rv~2mW13V+K9n< z8pC(dnxOS@?B6dy!-07z+zX*+sfs)?KZ?{_!meAn+U{<@h`0yI6{kH)9u;H}{Z;Ai zOp`jhZk;Fj1aqwY`wyvaaS3x2=X#+K*(^?vO(xp+myaco2u-EJSvz>mm}b}{_topM zNBqH?IP`u1jHj$3r=}Kv0&DX7qKec}NIQGQ zXJ~f;o-rpsB_+|ZE^>n=g=M0<-^|XPEQ9pb@rr^Db-P|YAz&swlNw<~5@Lm|-@pP@ zELK^gojuRYB^VGC%X(Dlkow&^5Zo}dU6f@$eC^<7GJ9b@Sh*h~%;4mVw0u&5I*;WdKc~zn%aHX3oGNn z5SG3~c=%n+ZQXE&%D|K+)oDVlY^~@df93=#V7{;f)T{T4WPR{*{-T)3zD(%^ z&}C%=AF%U)vs3qh>Uy1R^?8nI{@opUw8HlNXtIh3I`+r)mBFEfX_C%J98(7j=dq~r z^>{kyA~%~!po>z6r=Sl%T0&k=hzXX@PGVEK&aByqcxoH1Rx85ulrOO2YAFKOSG*gq zVq~Oy*}FQghA~;wZHKI7ALm+6(0xIWX4A@ji#5Zon_^@Fx$3OAMDIyRLU_ohxr94A z{W~;o#pG!W?Y)5ChjH6P&Q5_wjxKoz(pnH(e*(;Cv&7*EI@4ow<%dDH>Bx(-KsCEB zaYBJL(#_xX)peCMLmg>J&gVv#g6w!I8cl9{CMTz9k`XOJ1&(tLgtRS%$^HiV=;vnH zMK0VllF2FUue`UEuC^I={k`s+eu}5v?K`mf5f0xY@l2Qhe-u+zO;#Uu(|MsMZw`Hs^K>Ed}Ilry9wFt@v5U~2YK7a7EI1tGCV}>aeeDw^Pm2S6ZSA{n%QY>c^Wh|v~sB_a049-9CzgqqP#-ZjMrtaI*#uOD>H!^|XKudBgB zTI5ZK24ARq0=oyU=}XS5QRbMneQD+98qXbs((Mts%&sRK$=^1MFHF#z?CzDDjIB>FIMQ+1kqJ-D7A&mzENYq}N{uy! z4dN$s9l(wZBURDng!nru_)|FPChIZqz!{=qT(y7tNE}`EH`=`XM!|ySc{z&iZ_GAcsd!{8Jqc0C75R?NIfx` zhz-`hiMCdei-ej5ipIsB_&rMZnriZg(t|_d@eHRZKtz$OL;&X+HeawW2WJK~$jFE7 zM#pH)`n@A?#ZO3e+1M$AF$34DFOc``Gvn6vB%PI{Dz+$nGDWbp9b7r2T#%_RD&)sA z4X<0MFBD2Y`97bNH80c4xy~#~)-B$esv$?@O`S>$E}bYNTZf{NN_42idf4_F^i~g8 z$48L?Hj+8eNX|`c>II(%2Jb&jD`!)DyQBrV)&v8!Pvd#7Pg28JlcOm-+NspnMS~;a zBUvF4NI{q@1j=<1@2?U^q-rJs061b(w^2kx$ilvPrz|mwYqv}ItOQ@$DnC~5)?HsXc$c5PQSe>`BwoX{tuIM;s*-vO5_Jgc zp2{PAT(mmWmmH{+I`6i1?5QRfy(j8A;$sS3MsOH6R{y=#h|`C2v+~(! zCHGlnICYj(f39M1m5*_b>}I8We}&3syf#g>u5*rhLxm=1E-8hoh#$GkiK68zWvakx zy(BRkf@%X7Wsw!=KY3{oZ(?nnw<>=5Hz>9Lm8&>Z(OiwpEI`CkHwZBH1bd$*7b*H^ zw9FgVP(^@LvJ`U-XRlQ^(s2&1O&BxHcmm+GHF-DY7zHG2VWm%9WJ|mu=8Iy>45lo< zr8qE7T4JnoEl&!*ON-@C&kOVj;!7S;NhbGB?k-5~OAKiF^V*2a)q^@NAqIwDD?Ect z(CI7Y_BB~FPE_ObUOjAs}{ho5BQT#nV0$E3$a&17Jptqz!d*n zFqNJ{3K`hD6IfD_MY>Lt%52ymeU+6!ZgixgP|@x974+B`%^&gI zq>Dil7Wdd@*9|u*J1{G*%|#86C@M zN+?e17fO;tC^_2<`R-<>)VQ4LhoG_hIt5b_29)TkBBO67S-?I$ z=}b8}VU$K91Hr9>%T*Zlc_OQ-*PcjtJ*Wm6Qf|24Gt)0-Mo}+M$X>Qjs?^t|onH_l z&gJwhR6DP?NcyjzJUkPcilrDW|)yPgHzAyrKo$CA5yl}s{lteA%8;Q z1G>wIME~GkPr@jZc>jQ3dM}7FC>o7Is zW8KV<6;doGxPC0Ro}NsgFgWTVBc&`!S*)(z(wTlHyJ5jV^93wPf46~ZR_mQQ>0kD7 z7sl~l_wESM^xnDz1)4}$t@iNAo9%w67mqS7Itubtu0a$?fzp40LebPcYU=s4T#0fOLKFF1SVP<8_#vPcjb(*5C78a;0;tBRNnVFqkKMa;HO8%L914lc4jEr8C!| zg%5Wk@tW3jEw$%<=8eV>;}&ARaEi@r*aFg}pxUQKsG*VU#tWm>K@~q=c8@U?@cI?T zUeK*nIb)veZq!6;&6UduN8CNw2_t(e%A3B5x@^KGzHQBo#ST*{jouG@?rR+KQ5W%V zLq$dg`eD6tQxzA4s~Ysf>6*D|=A+wj16pCLXs1=U zW_;1bM$X(E+;7D7LUmDmvwUbHUvstg-)0hOv;D7bFo+x6~VrtHnfCAzg4}B zLcBnY7o)bgK0(elTe9;8=XeU%!)_jZLs0Mn{J{jXnl1YSe*zS2ShLBRdv%n1XA~Lv z@^&KhHl(^J3z@XDEBLC!%!QoFlSdL|ITjcWXMRTqQF{+@Vsfg_hx8~<=)Yy;Y5xj} z1yV0@rXiA~I(mf@KPb5&j}#0^cV;Ek5vAKg!!(OHPTTRg+eghK)PE@*1Dc%i7XMtl zC&HVIINza_G6Ty|#V>|pOqCsEMp9gTqCKLODthIUjxq_ff@FRNwi{(j^> z@AA@ixvFBXORifc`j|S*QiD-(W zzqu-TY;}2Yx}KVPG$g&9gPHBxbj^m4k5sXx^(G;ID?4gfq~CNw64nxO>Gmm+2bRyz zpM&}6#4}0jlr2B$)bymYeo(Fw(yjlZp+F@Fs`Xm)t4K%jFSO(jgy~H{#0{kMCZq92j$r76c~xEWY8UNo zD34#bB|=;6)+OS#H@;2gT>*>BpSaiNNiVPMJ>exmMe$F}I<6#Em~AFDHjl|Pcxk$i z_KPkR3zib$dHbNtZdBH#-SO#GYU>^JeYvUsEnlz=LR&POMpEo2Rp|m~YOfrhMQj#i zI|Q<*O}npu#8`~qNlY^TYrW5FN+emu*ghdBWlj2*_F4)NWTm57mNCpU^tuec;UPB5 z^0k9BbHP7#3~`Qaeu=ils(wnj?cY}lC0{YLrB8?nd=ApfKYo*q#it-JTmNB2L_)$W zN5^jSO(ucZzHJ?{XiJoUOHVV-PF$s&2{g z&h?Z>C_Wf4Dp0;vKz>8P&*z}QPt?h0_dGWWqi>GP&#o^&w%UN>DDKdq@BAiBU8LYT)pysq^qrmR6X1S+SpHD9$EQGc-X zHEf9#eSfkzCAGk@eeaKkc4qAq%6lIsCQ7FPJ=f3A7jUA)wepI}>@xe(#wJ4f1aDG` zDF{on!_IZ!TJkR4+t^#ql2b(DZHQceL9*qMcj z!7oMp((GU39O_Los>cm0{8NY~Tb~&;WOjaln)|8+$>l8o?H80Z>zLyiDbmvboy&Dy zX-Ra?=&Op|WVdKbU*ZUUZeNcT(5m~!^81tQEC1iRDyZbHaV4PS!jcTvgu#-g`1Nmn U9eE0W13h)2Yl9eUY=HQG02HDXvj6}9 literal 0 HcmV?d00001 diff --git a/lib/WebGUI.pm b/lib/WebGUI.pm index cae2422d1..5e4124e3d 100644 --- a/lib/WebGUI.pm +++ b/lib/WebGUI.pm @@ -1,5 +1,5 @@ package WebGUI; -our $VERSION = "2.0.0"; +our $VERSION = "2.1.0"; #------------------------------------------------------------------- # WebGUI is Copyright 2001 Plain Black Software. @@ -15,6 +15,7 @@ use strict qw(vars subs); use Tie::CPHash; use Tie::IxHash; use WebGUI::ErrorHandler; +use WebGUI::International; use WebGUI::Operation; use WebGUI::Privilege; use WebGUI::Session; @@ -28,15 +29,16 @@ sub _displayAdminBar { tie %hash2, "Tie::IxHash"; #--content adder @widgetArray = @_; - $hash2{$session{page}{url}} = "Add content..."; - $hash2{$session{page}{url}.'?op=addPage'} = 'Page'; + $hash2{$session{page}{url}} = WebGUI::International::get(1); + $hash2{$session{page}{url}.'?op=addPage'} = WebGUI::International::get(2); foreach $widget (@widgetArray) { $widgetName = "WebGUI::Widget::".$widget."::widgetName"; $hash2{$session{page}{url}.'?func=add&widget='.$widget} = &$widgetName; } $contentSelect = WebGUI::Form::selectList("contentSelect",\%hash2,"","","","goContent()"); #--clipboard paster - %hash2 = ( $session{page}{url}=> "Paste from clipboard..." ); + %hash2 = (); + $hash2{$session{page}{url}} = WebGUI::International::get(3); %hash = WebGUI::SQL->buildHash("select pageId,title from page where parentId=2 order by title",$session{dbh}); foreach $key (keys %hash) { $hash2{$session{page}{url}.'?op=pastePage&pageId='.$key} = $hash{$key}; @@ -50,20 +52,20 @@ sub _displayAdminBar { %hash = (); if (WebGUI::Privilege::isInGroup(3,$session{user}{userId})) { %hash = ( - $session{page}{url}.'?op=editSettings'=>'Edit Settings', - $session{page}{url}.'?op=listGroups'=>'Manage Groups', - $session{page}{url}.'?op=listStyles'=>'Manage Styles', - $session{page}{url}.'?op=listUsers'=>'Manage Users', - $session{env}{SCRIPT_NAME}.'/page_not_found'=>'View Page Not Found', - $session{env}{SCRIPT_NAME}.'/clipboard'=>'View Clipboard', - $session{env}{SCRIPT_NAME}.'/trash'=>'View Trash', - $session{page}{url}.'?op=purgeTrash'=>'Empty Trash' + $session{page}{url}.'?op=listGroups'=>WebGUI::International::get(5), + $session{page}{url}.'?op=manageSettings'=>WebGUI::International::get(4), + $session{page}{url}.'?op=listStyles'=>WebGUI::International::get(6), + $session{page}{url}.'?op=listUsers'=>WebGUI::International::get(7), + $session{env}{SCRIPT_NAME}.'/page_not_found'=>WebGUI::International::get(8), + $session{env}{SCRIPT_NAME}.'/clipboard'=>WebGUI::International::get(9), + $session{env}{SCRIPT_NAME}.'/trash'=>WebGUI::International::get(10), + $session{page}{url}.'?op=purgeTrash'=>WebGUI::International::get(11) ); } - %hash = ( $session{page}{url}=>'Admin...', - $session{page}{url}.'?op=switchOffAdmin'=>'Turn Admin Off', - $session{page}{url}.'?op=viewHelpIndex'=>'View Help Index', - $session{page}{url}.'?op=viewPendingSubmissions'=>'View Pending Submissions', + %hash = ( $session{page}{url}=>WebGUI::International::get(82), + $session{page}{url}.'?op=switchOffAdmin'=>WebGUI::International::get(12), + $session{page}{url}.'?op=viewHelpIndex'=>WebGUI::International::get(13), + $session{page}{url}.'?op=viewPendingSubmissions'=>WebGUI::International::get(14), %hash ); $adminSelect = WebGUI::Form::selectList("adminSelect",\%hash,"","","","goAdmin()"); @@ -91,8 +93,13 @@ sub _displayAdminBar { #------------------------------------------------------------------- sub _loadWidgets { - my (@files, $file, $use, @widget, $i); - opendir (DIR,$session{config}{webguiRoot}."/lib/WebGUI/Widget") or WebGUI::ErrorHandler::fatalError("Can't open widget directory!"); + my ($widgetDir, @files, $file, $use, @widget, $i); + if ($^O =~ /Win/i) { + $widgetDir = "\\lib\\WebGUI\\Widget"; + } else { + $widgetDir = "/lib/WebGUI/Widget"; + } + opendir (DIR,$session{config}{webguiRoot}.$widgetDir) or WebGUI::ErrorHandler::fatalError("Can't open widget directory!"); @files = readdir(DIR); foreach $file (@files) { if ($file ne "." && $file ne ".." && $file =~ /\.pm/) { @@ -146,7 +153,7 @@ sub page { } $sth->finish; } else { - $content = '

Permission Denied!

You do not have sufficient privileges to access this page. '; + $content = WebGUI::Privilege::noAccess(); } } if ($session{var}{adminOn}) { diff --git a/lib/WebGUI/DateTime.pm b/lib/WebGUI/DateTime.pm index 467396ded..632bcf3de 100644 --- a/lib/WebGUI/DateTime.pm +++ b/lib/WebGUI/DateTime.pm @@ -13,36 +13,47 @@ package WebGUI::DateTime; use Exporter; use strict; use Time::Local; +use WebGUI::International; our @ISA = qw(Exporter); our @EXPORT = qw(&epochToHuman &epochToSet &humanToEpoch &setToEpoch); -our %month = ( - 1=> "January", - 2=> "February", - 3=> "March", - 4=> "April", - 5=> "May", - 6=> "June", - 7=> "July", - 8=> "August", - 9=> "September", - 10=> "October", - 11=> "November", - 12=> "December" - ); -our %weekday = ( - 1=> "Sunday", - 2=> "Monday", - 3=> "Tuesday", - 4=> "Wednesday", - 5=> "Thursday", - 6=> "Friday", - 7=> "Saturday" + +#------------------------------------------------------------------- +sub _getMonth { + my %month = ( + 1=> WebGUI::International::get(15), + 2=> WebGUI::International::get(16), + 3=> WebGUI::International::get(17), + 4=> WebGUI::International::get(18), + 5=> WebGUI::International::get(19), + 6=> WebGUI::International::get(20), + 7=> WebGUI::International::get(21), + 8=> WebGUI::International::get(22), + 9=> WebGUI::International::get(23), + 10=> WebGUI::International::get(24), + 11=> WebGUI::International::get(25), + 12=> WebGUI::International::get(26) ); + return %month; +} + +#------------------------------------------------------------------- +sub _getWeekday { + my %weekday = ( + 1=> WebGUI::International::get(27), + 2=> WebGUI::International::get(28), + 3=> WebGUI::International::get(29), + 4=> WebGUI::International::get(30), + 5=> WebGUI::International::get(31), + 6=> WebGUI::International::get(32), + 7=> WebGUI::International::get(33) + ); + return %weekday; +} #------------------------------------------------------------------- sub epochToHuman { - my ($hour12, $value, $output, @date); + my ($hour12, $value, $output, @date, %weekday, %month); @date = localtime($_[0]); $date[4]++; # offset the months starting from 0 $date[5] += 1900; # original value is Year-1900 @@ -58,12 +69,18 @@ sub epochToHuman { $value = sprintf("%02d",$date[4]); $output =~ s/\%m/$value/g; $output =~ s/\%M/$date[4]/g; - $output =~ s/\%c/$month{$date[4]}/g; + if ($output =~ /\%c/) { + %month = _getMonth(); + $output =~ s/\%c/$month{$date[4]}/g; + } #---day stuff $value = sprintf("%02d",$date[3]); $output =~ s/\%d/$value/g; $output =~ s/\%D/$date[3]/g; - $output =~ s/\%w/$weekday{$date[6]}/g; + if ($output =~ /\%w/) { + %weekday = _getWeekday(); + $output =~ s/\%w/$weekday{$date[6]}/g; + } #---hour stuff $hour12 = $date[2]+1; if ($hour12 > 12) { diff --git a/lib/WebGUI/Form.pm b/lib/WebGUI/Form.pm index e88da3a09..2732e2e0b 100644 --- a/lib/WebGUI/Form.pm +++ b/lib/WebGUI/Form.pm @@ -11,6 +11,7 @@ package WebGUI::Form; #------------------------------------------------------------------- use strict qw(vars subs); +use WebGUI::International; use WebGUI::Session; #------------------------------------------------------------------- @@ -116,19 +117,22 @@ sub submit { #------------------------------------------------------------------- sub text { - my ($output, $assistance, $name, $size, $maxLength, $value); - ($name, $size, $maxLength, $value, $assistance) = @_; + my ($output, $assistance, $name, $size, $maxLength, $value, $events); + ($name, $size, $maxLength, $value, $assistance, $events) = @_; if ($size eq "") { $size = 15; } if ($maxLength ne "") { $maxLength = ' maxlength="'.$maxLength.'"'; } + if ($events ne "") { + $events = ' '.$events; + } if ($assistance == 1) { - $assistance = ''; + $assistance = ''; } $value = _fixQuotes($value); - $output = ''.$assistance; + $output = ''.$assistance; return $output; } @@ -143,7 +147,8 @@ sub textArea { $rows = 5; } if ($htmlEdit > 0) { - $output = '
'; + $output .= ''; + $output .= '
'; } if ($wrap eq "") { $wrap = "virtual"; diff --git a/lib/WebGUI/Macro/T.pm b/lib/WebGUI/International.pm similarity index 52% rename from lib/WebGUI/Macro/T.pm rename to lib/WebGUI/International.pm index b38dc0c8f..d9dfd67fc 100644 --- a/lib/WebGUI/Macro/T.pm +++ b/lib/WebGUI/International.pm @@ -1,4 +1,4 @@ -package WebGUI::Macro::T; +package WebGUI::International; #------------------------------------------------------------------- # WebGUI is Copyright 2001 Plain Black Software. @@ -11,26 +11,28 @@ package WebGUI::Macro::T; #------------------------------------------------------------------- use strict; -use WebGUI::Privilege; use WebGUI::Session; use WebGUI::SQL; +my %international; + #------------------------------------------------------------------- -sub process { - my ($output, $temp, @data, $sth); - $output = $_[0]; - #---top menu vertical--- - if ($output =~ /\^T/) { - $temp = ''; - $sth = WebGUI::SQL->read("select title,urlizedTitle,pageId from page where parentId=1 order by sequenceNumber",$session{dbh}); - while (@data = $sth->array) { - if (WebGUI::Privilege::canViewPage($data[2])) { - $temp .= ''.$data[0].'
'; - } +sub get { + my ($output, $language); + if ($session{user}{language} ne "") { + $language = $session{user}{language}; + } elsif ($_[1] ne "") { + $language = $_[1]; + } else { + $language = "English"; + } + if (defined $international{$language}{$_[0]}) { # a little caching never hurts =) + $output = $international{$language}{$_[0]}; + } else { + ($output) = WebGUI::SQL->quickArray("select message from international where internationalId=$_[0] and language='$language'",$session{dbh}); + if ($output eq "" && $language ne "English") { + $output = get($_[0],"English"); } - $sth->finish; - $temp .= '
'; - $output =~ s/\^T/$temp/g; } return $output; } diff --git a/lib/WebGUI/Macro.pm b/lib/WebGUI/Macro.pm index 1fa54bbcc..871dff68f 100644 --- a/lib/WebGUI/Macro.pm +++ b/lib/WebGUI/Macro.pm @@ -16,9 +16,14 @@ use WebGUI::Session; #------------------------------------------------------------------- sub process { - my (@files, $file, $cmd, $output); + my (@files, $file, $cmd, $output, $macroDir); $output = $_[0]; - opendir (DIR,$session{config}{webguiRoot}."/lib/WebGUI/Macro") or WebGUI::ErrorHandler::fatalError("Can't open macro directory!"); + if ($^O =~ /Win/i) { + $macroDir = "\\lib\\WebGUI\\Macro"; + } else { + $macroDir = "/lib/WebGUI/Macro"; + } + opendir (DIR,$session{config}{webguiRoot}.$macroDir) or WebGUI::ErrorHandler::fatalError("Can't open macro directory!"); @files = readdir(DIR); foreach $file (@files) { if ($file ne "." && $file ne ".." && $file =~ /\.pm/) { diff --git a/lib/WebGUI/Macro/P.pm b/lib/WebGUI/Macro/A_anyMenu.pm similarity index 51% rename from lib/WebGUI/Macro/P.pm rename to lib/WebGUI/Macro/A_anyMenu.pm index 11351223f..6e202175d 100644 --- a/lib/WebGUI/Macro/P.pm +++ b/lib/WebGUI/Macro/A_anyMenu.pm @@ -1,4 +1,4 @@ -package WebGUI::Macro::P; +package WebGUI::Macro::A_anyMenu; #------------------------------------------------------------------- # WebGUI is Copyright 2001 Plain Black Software. @@ -11,26 +11,29 @@ package WebGUI::Macro::P; #------------------------------------------------------------------- use strict; +use WebGUI::Macro::Shared; use WebGUI::Privilege; use WebGUI::Session; use WebGUI::SQL; #------------------------------------------------------------------- sub process { - my ($output, $temp, @data, $sth); + my ($output, $temp, $pageTitle, $depth, @data); $output = $_[0]; - #---previous menu vertical--- - if ($output =~ /\^P/) { - $temp = ''; - $sth = WebGUI::SQL->read("select title,urlizedTitle,pageId from page where parentId=$session{page}{parentId} order by sequenceNumber",$session{dbh}); - while (@data = $sth->array) { - if (WebGUI::Privilege::canViewPage($data[2])) { - $temp .= ''.$data[0].'
'; - } - } - $sth->finish; + #---any page sub menu vertical--- + if ($output =~ /\^A(.*)\^\/A/) { + ($pageTitle,$depth) = split(/,/,$1); + if ($depth eq "") { + $depth = 1; + } + @data = WebGUI::SQL->quickArray("select pageId,title,urlizedTitle from page where urlizedTitle='$pageTitle'",$session{dbh}); + $temp = $pageTitle.'|'.$depth.''; + if (defined $data[0] && WebGUI::Privilege::canViewPage($data[0])) { + $temp .= ''.$data[1].'
'; + $temp .= traversePageTree($data[0],1,$depth); + } $temp .= '
'; - $output =~ s/\^P/$temp/g; + $output =~ s/\^A(.*)\^\/A/$temp/g; } return $output; } diff --git a/lib/WebGUI/Macro/At.pm b/lib/WebGUI/Macro/At_username.pm similarity index 95% rename from lib/WebGUI/Macro/At.pm rename to lib/WebGUI/Macro/At_username.pm index 1698dbd07..c58564a49 100644 --- a/lib/WebGUI/Macro/At.pm +++ b/lib/WebGUI/Macro/At_username.pm @@ -1,4 +1,4 @@ -package WebGUI::Macro::At; +package WebGUI::Macro::At_username; #------------------------------------------------------------------- # WebGUI is Copyright 2001 Plain Black Software. diff --git a/lib/WebGUI/Macro/Backslash.pm b/lib/WebGUI/Macro/Backslash_pageUrl.pm similarity index 95% rename from lib/WebGUI/Macro/Backslash.pm rename to lib/WebGUI/Macro/Backslash_pageUrl.pm index e4b4d8f6a..49f03ee32 100644 --- a/lib/WebGUI/Macro/Backslash.pm +++ b/lib/WebGUI/Macro/Backslash_pageUrl.pm @@ -1,4 +1,4 @@ -package WebGUI::Macro::Backslash; +package WebGUI::Macro::Backslash_pageUrl; #------------------------------------------------------------------- # WebGUI is Copyright 2001 Plain Black Software. diff --git a/lib/WebGUI/Macro/C.pm b/lib/WebGUI/Macro/C_crumbTrail.pm similarity index 97% rename from lib/WebGUI/Macro/C.pm rename to lib/WebGUI/Macro/C_crumbTrail.pm index f02c1d11b..0bfbd323e 100644 --- a/lib/WebGUI/Macro/C.pm +++ b/lib/WebGUI/Macro/C_crumbTrail.pm @@ -1,4 +1,4 @@ -package WebGUI::Macro::C; +package WebGUI::Macro::C_crumbTrail; #------------------------------------------------------------------- # WebGUI is Copyright 2001 Plain Black Software. diff --git a/lib/WebGUI/Macro/Carat.pm b/lib/WebGUI/Macro/Carat_carat.pm similarity index 95% rename from lib/WebGUI/Macro/Carat.pm rename to lib/WebGUI/Macro/Carat_carat.pm index 6c22f6bfc..411269e0a 100644 --- a/lib/WebGUI/Macro/Carat.pm +++ b/lib/WebGUI/Macro/Carat_carat.pm @@ -1,4 +1,4 @@ -package WebGUI::Macro::Carat; +package WebGUI::Macro::Carat_carat; #------------------------------------------------------------------- # WebGUI is Copyright 2001 Plain Black Software. diff --git a/lib/WebGUI/Macro/D.pm b/lib/WebGUI/Macro/D_date.pm similarity index 96% rename from lib/WebGUI/Macro/D.pm rename to lib/WebGUI/Macro/D_date.pm index 3a78a48d6..8cf0d55bb 100644 --- a/lib/WebGUI/Macro/D.pm +++ b/lib/WebGUI/Macro/D_date.pm @@ -1,4 +1,4 @@ -package WebGUI::Macro::D; +package WebGUI::Macro::D_date; #------------------------------------------------------------------- # WebGUI is Copyright 2001 Plain Black Software. diff --git a/lib/WebGUI/Macro/H.pm b/lib/WebGUI/Macro/H_homeLink.pm similarity index 91% rename from lib/WebGUI/Macro/H.pm rename to lib/WebGUI/Macro/H_homeLink.pm index 24c6e87f8..bd20696fc 100644 --- a/lib/WebGUI/Macro/H.pm +++ b/lib/WebGUI/Macro/H_homeLink.pm @@ -1,4 +1,4 @@ -package WebGUI::Macro::H; +package WebGUI::Macro::H_homeLink; #------------------------------------------------------------------- # WebGUI is Copyright 2001 Plain Black Software. @@ -11,6 +11,7 @@ package WebGUI::Macro::H; #------------------------------------------------------------------- use strict; +use WebGUI::International; use WebGUI::Session; #------------------------------------------------------------------- @@ -22,7 +23,7 @@ sub process { $temp = ''.$1.''; $output =~ s/\^H(.*)\^\/H/$temp/g; } elsif ($output =~ /\^H/) { - $temp = 'Home'; + $temp = ''.WebGUI::International::get(47).''; $output =~ s/\^H/$temp/g; } return $output; diff --git a/lib/WebGUI/Macro/Hash.pm b/lib/WebGUI/Macro/Hash_userId.pm similarity index 95% rename from lib/WebGUI/Macro/Hash.pm rename to lib/WebGUI/Macro/Hash_userId.pm index d45298595..7f949677d 100644 --- a/lib/WebGUI/Macro/Hash.pm +++ b/lib/WebGUI/Macro/Hash_userId.pm @@ -1,4 +1,4 @@ -package WebGUI::Macro::Hash; +package WebGUI::Macro::Hash_userId; #------------------------------------------------------------------- # WebGUI is Copyright 2001 Plain Black Software. diff --git a/lib/WebGUI/Macro/L.pm b/lib/WebGUI/Macro/L_loginBox.pm similarity index 69% rename from lib/WebGUI/Macro/L.pm rename to lib/WebGUI/Macro/L_loginBox.pm index 7a58ce556..2f81ab6a2 100644 --- a/lib/WebGUI/Macro/L.pm +++ b/lib/WebGUI/Macro/L_loginBox.pm @@ -1,4 +1,4 @@ -package WebGUI::Macro::L; +package WebGUI::Macro::L_loginBox; #------------------------------------------------------------------- # WebGUI is Copyright 2001 Plain Black Software. @@ -12,6 +12,8 @@ package WebGUI::Macro::L; use strict; use WebGUI::Form; +use WebGUI::International; +use WebGUI::Macro::Backslash_pageUrl; use WebGUI::Session; #------------------------------------------------------------------- @@ -22,13 +24,20 @@ sub process { if ($output =~ /\^L/) { $temp = '
'; if ($session{var}{sessionId}) { - $temp .= 'Hello '.$session{user}{username}.'. Click here to log out.'; + $temp .= WebGUI::International::get(48); + $temp .= ' '.$session{user}{username}.'. '; + $temp .= WebGUI::International::get(49); + $temp = WebGUI::Macro::Backslash::process($temp); } else { $temp .= '
'; - $temp .= WebGUI::Form::hidden("op","login").'Username:
'; - $temp .= WebGUI::Form::text("username",12,30).'
Password:
'; + $temp .= WebGUI::Form::hidden("op","login").''; + $temp .= WebGUI::International::get(50); + $temp .= '
'; + $temp .= WebGUI::Form::text("username",12,30).'
'; + $temp .= WebGUI::International::get(51); + $temp .= '
'; $temp .= WebGUI::Form::password("identifier",12,30).'
'; - $temp .= WebGUI::Form::submit("login"); + $temp .= WebGUI::Form::submit(WebGUI::International::get(52)); $temp .= '
'; } $temp .= '
'; diff --git a/lib/WebGUI/Macro/j.pm b/lib/WebGUI/Macro/M_currentMenuVertical.pm similarity index 68% rename from lib/WebGUI/Macro/j.pm rename to lib/WebGUI/Macro/M_currentMenuVertical.pm index fb18e8bfd..2b457929f 100644 --- a/lib/WebGUI/Macro/j.pm +++ b/lib/WebGUI/Macro/M_currentMenuVertical.pm @@ -1,4 +1,4 @@ -package WebGUI::Macro::j; +package WebGUI::Macro::M_currentMenuVertical; #------------------------------------------------------------------- # WebGUI is Copyright 2001 Plain Black Software. @@ -18,12 +18,17 @@ use WebGUI::Session; sub process { my ($output, $temp); $output = $_[0]; - #---2 level current level menu (vertical)--- - if ($output =~ /\^j/) { + #---current menu vertical--- + if ($output =~ /\^M(.*)\^\/M/) { $temp = ''; - $temp .= traversePageTree($session{page}{pageId},0,2); + $temp .= traversePageTree($session{page}{pageId},0,$1); $temp .= ''; - $output =~ s/\^j/$temp/g; + $output =~ s/\^M(.*)\^\/M/$temp/g; + } elsif ($output =~ /\^M/) { + $temp = ''; + $temp .= traversePageTree($session{page}{pageId},0,1); + $temp .= ''; + $output =~ s/\^M/$temp/g; } return $output; } diff --git a/lib/WebGUI/Macro/F.pm b/lib/WebGUI/Macro/P_previousMenuVertical.pm similarity index 59% rename from lib/WebGUI/Macro/F.pm rename to lib/WebGUI/Macro/P_previousMenuVertical.pm index 979734944..56afe9b56 100644 --- a/lib/WebGUI/Macro/F.pm +++ b/lib/WebGUI/Macro/P_previousMenuVertical.pm @@ -1,4 +1,4 @@ -package WebGUI::Macro::F; +package WebGUI::Macro::P_previousMenuVertical; #------------------------------------------------------------------- # WebGUI is Copyright 2001 Plain Black Software. @@ -12,17 +12,23 @@ package WebGUI::Macro::F; use strict; use WebGUI::Macro::Shared; +use WebGUI::Session; #------------------------------------------------------------------- sub process { my ($output, $temp); $output = $_[0]; - #---2 level menu (vertical)--- - if ($output =~ /\^F/) { + #---previous menu vertical--- + if ($output =~ /\^P(.*)\^\/P/) { $temp = ''; - $temp .= traversePageTree(1,0,2); - $temp .= ''; - $output =~ s/\^F/$temp/g; + $temp .= traversePageTree($session{page}{parentId},0,$1); + $temp .= '
'; + $output =~ s/\^P(.*)\^\/P/$temp/g; + } elsif ($output =~ /\^P/) { + $temp = ''; + $temp .= traversePageTree($session{page}{parentId},0,1); + $temp .= ''; + $output =~ s/\^P/$temp/g; } return $output; } diff --git a/lib/WebGUI/Macro/Splat.pm b/lib/WebGUI/Macro/Splat_random.pm similarity index 73% rename from lib/WebGUI/Macro/Splat.pm rename to lib/WebGUI/Macro/Splat_random.pm index 176f11b2c..0236392e3 100644 --- a/lib/WebGUI/Macro/Splat.pm +++ b/lib/WebGUI/Macro/Splat_random.pm @@ -1,4 +1,4 @@ -package WebGUI::Macro::Splat; +package WebGUI::Macro::Splat_random; #------------------------------------------------------------------- # WebGUI is Copyright 2001 Plain Black Software. @@ -11,14 +11,18 @@ package WebGUI::Macro::Splat; #------------------------------------------------------------------- use strict; +use WebGUI::Utility; #------------------------------------------------------------------- sub process { my ($output, $temp); $output = $_[0]; #---random number--- - if ($output =~ /\^\*/) { - $temp = rand()*1000000000; + if ($output =~ /\^\*(.*)\^\/\*/) { + $temp = round(rand()*$1); + $output =~ s/\^\*(.*)\^\/\*/$temp/g; + } elsif ($output =~ /\^\*/) { + $temp = round(rand()*1000000000); $output =~ s/\^\*/$temp/g; } return $output; diff --git a/lib/WebGUI/Macro/J.pm b/lib/WebGUI/Macro/T_topMenuVertical.pm similarity index 64% rename from lib/WebGUI/Macro/J.pm rename to lib/WebGUI/Macro/T_topMenuVertical.pm index 17d428382..dff2f9f8d 100644 --- a/lib/WebGUI/Macro/J.pm +++ b/lib/WebGUI/Macro/T_topMenuVertical.pm @@ -1,4 +1,4 @@ -package WebGUI::Macro::J; +package WebGUI::Macro::T_topMenuVertical; #------------------------------------------------------------------- # WebGUI is Copyright 2001 Plain Black Software. @@ -12,18 +12,22 @@ package WebGUI::Macro::J; use strict; use WebGUI::Macro::Shared; -use WebGUI::Session; #------------------------------------------------------------------- sub process { - my ($output, $temp, @data, $sth, $first); + my ($output, $temp); $output = $_[0]; - #---3 level current level menu (vertical)--- - if ($output =~ /\^J/) { + #---top menu vertical--- + if ($output =~ /\^T(.*)\^\/T/) { $temp = ''; - $temp .= traversePageTree($session{page}{pageId},0,3); + $temp .= traversePageTree(1,0,$1); $temp .= ''; - $output =~ s/\^J/$temp/g; + $output =~ s/\^T(.*)\^\/T/$temp/g; + } elsif ($output =~ /\^T/) { + $temp = ''; + $temp .= traversePageTree(1,0,1); + $temp .= ''; + $output =~ s/\^T/$temp/g; } return $output; } diff --git a/lib/WebGUI/Macro/a.pm b/lib/WebGUI/Macro/a_account.pm similarity index 90% rename from lib/WebGUI/Macro/a.pm rename to lib/WebGUI/Macro/a_account.pm index 4b74bc90e..469056168 100644 --- a/lib/WebGUI/Macro/a.pm +++ b/lib/WebGUI/Macro/a_account.pm @@ -1,4 +1,4 @@ -package WebGUI::Macro::a; +package WebGUI::Macro::a_account; #------------------------------------------------------------------- # WebGUI is Copyright 2001 Plain Black Software. @@ -11,6 +11,7 @@ package WebGUI::Macro::a; #------------------------------------------------------------------- use strict; +use WebGUI::International; use WebGUI::Session; #------------------------------------------------------------------- @@ -22,7 +23,7 @@ sub process { $temp = ''.$1.''; $output =~ s/\^a(.*)\^\/a/$temp/g; } elsif ($output =~ /\^a/) { - $temp = 'My Account'; + $temp = ''.WebGUI::International::get(46).''; $output =~ s/\^a/$temp/g; } return $output; diff --git a/lib/WebGUI/Macro/c.pm b/lib/WebGUI/Macro/c_companyName.pm similarity index 95% rename from lib/WebGUI/Macro/c.pm rename to lib/WebGUI/Macro/c_companyName.pm index 7c53d5a62..3c0aa05fd 100644 --- a/lib/WebGUI/Macro/c.pm +++ b/lib/WebGUI/Macro/c_companyName.pm @@ -1,4 +1,4 @@ -package WebGUI::Macro::c; +package WebGUI::Macro::c_companyName; #------------------------------------------------------------------- # WebGUI is Copyright 2001 Plain Black Software. diff --git a/lib/WebGUI/Macro/e.pm b/lib/WebGUI/Macro/e_companyEmail.pm similarity index 95% rename from lib/WebGUI/Macro/e.pm rename to lib/WebGUI/Macro/e_companyEmail.pm index 841fcbad4..af295d08f 100644 --- a/lib/WebGUI/Macro/e.pm +++ b/lib/WebGUI/Macro/e_companyEmail.pm @@ -1,4 +1,4 @@ -package WebGUI::Macro::e; +package WebGUI::Macro::e_companyEmail; #------------------------------------------------------------------- # WebGUI is Copyright 2001 Plain Black Software. diff --git a/lib/WebGUI/Macro/f.pm b/lib/WebGUI/Macro/f.pm deleted file mode 100644 index ff4862bef..000000000 --- a/lib/WebGUI/Macro/f.pm +++ /dev/null @@ -1,31 +0,0 @@ -package WebGUI::Macro::f; - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001 Plain Black Software. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -use strict; -use WebGUI::Macro::Shared; - -#------------------------------------------------------------------- -sub process { - my ($output, $temp); - $output = $_[0]; - #---full menu (vertical)--- - if ($output =~ /\^f/) { - $temp = ''; - $temp .= traversePageTree(1,0); - $temp .= ''; - $output =~ s/\^f/$temp/g; - } - return $output; -} - -1; - diff --git a/lib/WebGUI/Macro/h.pm b/lib/WebGUI/Macro/h.pm deleted file mode 100644 index 399467576..000000000 --- a/lib/WebGUI/Macro/h.pm +++ /dev/null @@ -1,31 +0,0 @@ -package WebGUI::Macro::h; - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001 Plain Black Software. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -use strict; -use WebGUI::Macro::Shared; - -#------------------------------------------------------------------- -sub process { - my ($output, $temp); - $output = $_[0]; - #---3 level menu (vertical)--- - if ($output =~ /\^h/) { - $temp = ''; - $temp .= traversePageTree(1,0,3); - $temp .= ''; - $output =~ s/\^h/$temp/g; - } - return $output; -} - -1; - diff --git a/lib/WebGUI/Macro/m.pm b/lib/WebGUI/Macro/m.pm deleted file mode 100644 index 2dde95842..000000000 --- a/lib/WebGUI/Macro/m.pm +++ /dev/null @@ -1,39 +0,0 @@ -package WebGUI::Macro::m; - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001 Plain Black Software. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -use strict; -use WebGUI::Privilege; -use WebGUI::Session; -use WebGUI::SQL; - -#------------------------------------------------------------------- -sub process { - my ($output, $temp, @data, $sth, $first); - $output = $_[0]; - #---current menu vertical--- - if ($output =~ /\^M/) { - $temp = ''; - $sth = WebGUI::SQL->read("select title,urlizedTitle,pageId from page where parentId=$session{page}{pageId} order by sequenceNumber",$session{dbh}); - while (@data = $sth->array) { - if (WebGUI::Privilege::canViewPage($data[2])) { - $temp .= ''.$data[0].'
'; - } - } - $sth->finish; - $temp .= '
'; - $output =~ s/\^M/$temp/g; - } - return $output; -} - -1; - diff --git a/lib/WebGUI/Macro/M.pm b/lib/WebGUI/Macro/m_currentMenuHorizontal.pm similarity index 96% rename from lib/WebGUI/Macro/M.pm rename to lib/WebGUI/Macro/m_currentMenuHorizontal.pm index 7978335e9..af6e53eba 100644 --- a/lib/WebGUI/Macro/M.pm +++ b/lib/WebGUI/Macro/m_currentMenuHorizontal.pm @@ -1,4 +1,4 @@ -package WebGUI::Macro::M; +package WebGUI::Macro::m_currentMenuHorizontal; #------------------------------------------------------------------- # WebGUI is Copyright 2001 Plain Black Software. diff --git a/lib/WebGUI/Macro/p.pm b/lib/WebGUI/Macro/p_previousMenuHorizontal.pm similarity index 97% rename from lib/WebGUI/Macro/p.pm rename to lib/WebGUI/Macro/p_previousMenuHorizontal.pm index 0d199362e..7d9dc73a4 100644 --- a/lib/WebGUI/Macro/p.pm +++ b/lib/WebGUI/Macro/p_previousMenuHorizontal.pm @@ -1,4 +1,4 @@ -package WebGUI::Macro::p; +package WebGUI::Macro::p_previousMenuHorizontal; #------------------------------------------------------------------- # WebGUI is Copyright 2001 Plain Black Software. diff --git a/lib/WebGUI/Macro/r.pm b/lib/WebGUI/Macro/r_printable.pm similarity index 89% rename from lib/WebGUI/Macro/r.pm rename to lib/WebGUI/Macro/r_printable.pm index eee8b86f1..bb506ef2b 100644 --- a/lib/WebGUI/Macro/r.pm +++ b/lib/WebGUI/Macro/r_printable.pm @@ -1,4 +1,4 @@ -package WebGUI::Macro::r; +package WebGUI::Macro::r_printable; #------------------------------------------------------------------- # WebGUI is Copyright 2001 Plain Black Software. @@ -11,6 +11,7 @@ package WebGUI::Macro::r; #------------------------------------------------------------------- use strict; +use WebGUI::International; use WebGUI::Session; #------------------------------------------------------------------- @@ -34,7 +35,9 @@ sub process { } else { $temp .= '?makePrintable=1'; } - $temp = 'Make Page Printable'; + $temp = ''; + $temp .= WebGUI::International::get(53); + $temp .= ''; $output =~ s/\^r/$temp/g; } return $output; diff --git a/lib/WebGUI/Macro/t.pm b/lib/WebGUI/Macro/t_topMenuHorizontal.pm similarity index 96% rename from lib/WebGUI/Macro/t.pm rename to lib/WebGUI/Macro/t_topMenuHorizontal.pm index 65393f5da..6de6a7270 100644 --- a/lib/WebGUI/Macro/t.pm +++ b/lib/WebGUI/Macro/t_topMenuHorizontal.pm @@ -1,4 +1,4 @@ -package WebGUI::Macro::t; +package WebGUI::Macro::t_topMenuHorizontal; #------------------------------------------------------------------- # WebGUI is Copyright 2001 Plain Black Software. diff --git a/lib/WebGUI/Macro/u.pm b/lib/WebGUI/Macro/u_companyUrl.pm similarity index 95% rename from lib/WebGUI/Macro/u.pm rename to lib/WebGUI/Macro/u_companyUrl.pm index 08ee88263..2796fb76d 100644 --- a/lib/WebGUI/Macro/u.pm +++ b/lib/WebGUI/Macro/u_companyUrl.pm @@ -1,4 +1,4 @@ -package WebGUI::Macro::u; +package WebGUI::Macro::u_companyUrl; #------------------------------------------------------------------- # WebGUI is Copyright 2001 Plain Black Software. diff --git a/lib/WebGUI/Operation/Account.pm b/lib/WebGUI/Operation/Account.pm index 2b577556a..cf2228a98 100644 --- a/lib/WebGUI/Operation/Account.pm +++ b/lib/WebGUI/Operation/Account.pm @@ -15,8 +15,10 @@ use Exporter; use Net::LDAP; use strict; use URI; +use WebGUI::DateTime; use WebGUI::ErrorHandler; use WebGUI::Form; +use WebGUI::International; use WebGUI::Mail; use WebGUI::Privilege; use WebGUI::Session; @@ -56,40 +58,43 @@ sub _login { WebGUI::Session::setCookie("wgSession",$cookieInfo); return ""; } else { + WebGUI::ErrorHandler::warn("Session signature '".$cookieInfo."' does not match account info for user ID ".$_[0]); return "Error: Unable to initialize session vars because your session signature does not match your account information.

"; } } #------------------------------------------------------------------- sub www_createAccount { - my ($output); + my ($output, %language); if ($session{user}{userId} != 1) { $output .= www_displayAccount(); } elsif ($session{setting}{anonymousRegistration} eq "no") { $output .= www_displayLogin(); } else { - $output .= '

Create Account

'; + $output .= '

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

'; + $output .= ' '; $output .= WebGUI::Form::hidden("op","saveAccount"); $output .= ''; - $output .= ''; + $output .= ''; if ($session{setting}{authMethod} eq "LDAP") { $output .= WebGUI::Form::hidden("identifier1","ldap-password"); $output .= WebGUI::Form::hidden("identifier2","ldap-password"); $output .= ''; $output .= ''; } else { - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; } - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + %language = WebGUI::SQL->buildHash("select distinct(language) from international",$session{dbh}); + $output .= ''; + $output .= ''; $output .= '
Username'.WebGUI::Form::text("username",20,30).'
'.WebGUI::International::get(50).''.WebGUI::Form::text("username",20,30).'
'.$session{setting}{ldapIdName}.''.WebGUI::Form::text("ldapId",20,100).'
'.$session{setting}{ldapPasswordName}.''.WebGUI::Form::password("ldapPassword",20,100).'
Password'.WebGUI::Form::password("identifier1",20,30).'
Password (confirm)'.WebGUI::Form::password("identifier2",20,30).'
'.WebGUI::International::get(51).''.WebGUI::Form::password("identifier1",20,30).'
'.WebGUI::International::get(55).''.WebGUI::Form::password("identifier2",20,30).'
Email Address'.WebGUI::Form::text("email",20,255).'
This is only necessary if you wish to use features that require Email.
ICQ UIN'.WebGUI::Form::text("icq",20,30).'
This is only necessary if you wish to use features that require ICQ.
'.WebGUI::Form::submit("create").'
'.WebGUI::International::get(56).''.WebGUI::Form::text("email",20,255).'
'.WebGUI::International::get(57).'
'.WebGUI::International::get(304).''.WebGUI::Form::selectList("language",\%language).'
'.WebGUI::Form::submit(WebGUI::International::get(62)).'
'; $output .= '
'; $output .= '
'; } @@ -102,10 +107,10 @@ sub www_deactivateAccount { if ($session{user}{userId} == 1) { $output .= www_displayLogin(); } else { - $output .= '

Please Confirm

'; - $output .= 'Are you certain you want to deactivate your account. If you proceed your account information will be lost permanently.

'; - $output .= '

Yes, I\'m sure.'; - $output .= '    No, I made a mistake.
'; + $output .= '

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

'; + $output .= WebGUI::International::get(60).'

'; + $output .= '

'; } return $output; } @@ -123,34 +128,37 @@ sub www_deactivateAccountConfirm { #------------------------------------------------------------------- sub www_displayAccount { - my ($output); + my ($output, %hash, @array); if ($session{user}{userId} != 1) { - $output .= '

Update Account Information

'; + $output .= '

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

'; + $output .= ' '; $output .= WebGUI::Form::hidden("op","updateAccount"); $output .= ''; - $output .= ''; + $output .= ''; if ($session{user}{authMethod} eq "LDAP") { $output .= WebGUI::Form::hidden("identifier","password"); } else { - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; } - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + %hash = WebGUI::SQL->buildHash("select distinct(language) from international",$session{dbh}); + $array[0] = $session{user}{language}; + $output .= ''; + $output .= ''; $output .= '
username'.WebGUI::Form::text("username",20,30,$session{user}{username}).'
'.WebGUI::International::get(50).''.WebGUI::Form::text("username",20,30,$session{user}{username}).'
password'.WebGUI::Form::password("identifier1",20,30,"password").'
password (confirm)'.WebGUI::Form::password("identifier2",20,30,"password").'
'.WebGUI::International::get(51).''.WebGUI::Form::password("identifier1",20,30,"password").'
'.WebGUI::International::get(55).''.WebGUI::Form::password("identifier2",20,30,"password").'
email address'.WebGUI::Form::text("email",20,255,$session{user}{email}).'
This is only necessary if you wish to use features that require Email.
ICQ UIN'.WebGUI::Form::text("icq",20,30,$session{user}{icq}).'
This is only necessary if you wish to use features that require ICQ.
'.WebGUI::Form::submit("update").'
'.WebGUI::International::get(56).''.WebGUI::Form::text("email",20,255,$session{user}{email}).'
'.WebGUI::International::get(57).'
'.WebGUI::International::get(304).''.WebGUI::Form::selectList("language",\%hash,\@array).'
'.WebGUI::Form::submit(WebGUI::International::get(62)).'
'; $output .= '
'; $output .= '
'; + $output .= '
  • '.WebGUI::International::get(64).''; + $output .= '
  • '.WebGUI::International::get(65).''; } else { - $output .= 'You need to be logged in to view your account information.

    '; $output .= www_displayLogin(); } return $output; @@ -162,20 +170,21 @@ sub www_displayLogin { if ($session{var}{sessionId}) { $output .= www_displayAccount(); } else { - $output .= '

    Login

    '; + $output .= '

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

    '; + $output .= ' '; $output .= WebGUI::Form::hidden("op","login"); $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= '
    username'.WebGUI::Form::text("username",20,30).'
    password'.WebGUI::Form::password("identifier",20,30).'
    '.WebGUI::Form::submit("login").'
    '.WebGUI::International::get(50).''.WebGUI::Form::text("username",20,30).'
    '.WebGUI::International::get(51).''.WebGUI::Form::password("identifier",20,30).'
    '.WebGUI::Form::submit(WebGUI::International::get(52)).'
    '; $output .= '
    '; $output .= '
    '; } @@ -194,14 +203,15 @@ sub www_login { $port = $uri->port; } %args = (port => $port); - $ldap = Net::LDAP->new($uri->host, %args) or $error = "Cannot connect to LDAP server."; + $ldap = Net::LDAP->new($uri->host, %args) or $error = WebGUI::International::get(79); $auth = $ldap->bind($connectDN, $session{form}{identifier}); $ldap->unbind; if ($auth->code == 48 || $auth->code == 49) { - $error = "The account information you supplied is invalid. Either the account does not exist or the username/password combination was incorrect."; + $error = WebGUI::International::get(68); WebGUI::ErrorHandler::warn("Invalid login for user account: ".$session{form}{username}); } elsif ($auth->code > 0) { - $error .= 'LDAP error "'.$ldapStatusCode{$auth->code}.'" occured. Please contact your system administrator for assistance. '; + $error .= 'LDAP error "'.$ldapStatusCode{$auth->code}.'" occured.'; + $error .= WebGUI::International::get(69); WebGUI::ErrorHandler::warn("LDAP error: ".$ldapStatusCode{$auth->code}); } else { $success = 1; @@ -210,7 +220,7 @@ sub www_login { if (Digest::MD5::md5_base64($session{form}{identifier}) eq $pass && $session{form}{identifier} ne "") { $success = 1; } else { - $error = "The account information you supplied is invalid. Either the account does not exist or the username/password combination was incorrect."; + $error = WebGUI::International::get(68); WebGUI::ErrorHandler::warn("Invalid login for user account: ".$session{form}{username}); } } @@ -218,7 +228,7 @@ sub www_login { _login($uid,$pass); return ""; } else { - return "

    Error

    ".$error.www_displayLogin(); + return "

    ".WebGUI::International::get(70)."

    ".$error.www_displayLogin(); } } @@ -235,18 +245,19 @@ sub www_recoverPassword { if ($session{var}{sessionId}) { $output .= www_displayAccount(); } else { - $output .= '

    Recover Password

    '; + $output .= '

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

    '; + $output .= ' '; $output .= WebGUI::Form::hidden("op","recoverPasswordFinish"); $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; $output .= '
    Email Address'.WebGUI::Form::text("email",20,255).'
    '.WebGUI::Form::submit("recover").'
    '.WebGUI::International::get(56).''.WebGUI::Form::text("email",20,255).'
    '.WebGUI::Form::submit(WebGUI::International::get(72)).'
    '; $output .= '
    '; $output .= '
    '; } return $output; @@ -263,15 +274,17 @@ sub www_recoverPasswordFinish { $encryptedPassword = Digest::MD5::md5_base64($password); WebGUI::SQL->write("update users set identifier='$encryptedPassword' where userId='$userId'",$session{dbh}); $flag = 1; - $message = "Someone (probably you) requested your account information be sent. Your password has been reset. The following represents your new account information:\nUser: ".$username."\nPass: ".$password."\n"; - WebGUI::Mail::send($session{form}{email},"Account Information",$message); + $message = $session{setting}{recoverPasswordEmail}; + $message .= "\n".WebGUI::International::get(50).": ".$username."\n"; + $message .= WebGUI::International::get(51).": ".$password."\n"; + WebGUI::Mail::send($session{form}{email},WebGUI::International::get(74),$message); } $sth->finish(); if ($flag) { - $output = '
    • Your account information has been sent to your email address.
    '; + $output = '
    • '.WebGUI::International::get(75).'
    '; $output .= www_displayLogin(); } else { - $output = '
    • That email address is not in our databases.
    '; + $output = '
    • '.WebGUI::International::get(76).'
    '; $output .= www_recoverPassword(); } return $output; @@ -281,10 +294,14 @@ sub www_recoverPasswordFinish { sub www_saveAccount { my ($uri, $ldap, $port, %args, $search, $connectDN, $auth, $output, $error, $uid, $encryptedPassword); if (_hasBadUsername($session{form}{username})) { - $error = 'The account name "'.$session{form}{username}.'" is in use by another member of this site. Please try a different username, perhaps "'.$session{form}{username}.'too" or "'.$session{form}{username}.'01" '; + $error = WebGUI::International::get(77); + $error .= ' "'.$session{form}{username}.'too", '; + $error .= '"'.$session{form}{username}.'2", '; + $error .= '"'.$session{form}{username}.'_'.WebGUI::DateTime::epochToHuman(time(),"%y").'"'; + $error .= '

    '; } if (_hasBadPassword($session{form}{identifier1},$session{form}{identifier2})) { - $error .= 'Your passwords did not match. Please try again. '; + $error .= WebGUI::International::get(78); } if ($session{setting}{authMethod} eq "LDAP") { $uri = URI->new($session{setting}{ldapURL}); @@ -294,18 +311,18 @@ sub www_saveAccount { $port = $uri->port; } %args = (port => $port); - $ldap = Net::LDAP->new($uri->host, %args) or $error .= "Cannot connect to LDAP server. "; + $ldap = Net::LDAP->new($uri->host, %args) or $error .= WebGUI::International::get(79); $ldap->bind; $search = $ldap->search (base => $uri->dn, filter => $session{setting}{ldapId}."=".$session{form}{ldapId}); $connectDN = "cn=".$search->entry(0)->get_value("cn"); $ldap->unbind; - $ldap = Net::LDAP->new($uri->host, %args) or $error .= "Cannot connect to LDAP server. "; + $ldap = Net::LDAP->new($uri->host, %args) or $error .= WebGUI::International::get(79); $auth = $ldap->bind(dn=>$connectDN, password=>$session{form}{ldapPassword}); if ($auth->code == 48 || $auth->code == 49) { - $error .= "Either your ".$session{setting}{ldapIdName}." or ".$session{setting}{ldapPasswordName}." were invalid. "; + $error .= WebGUI::International::get(68); WebGUI::ErrorHandler::warn("Invalid LDAP information for registration of LDAP ID: ".$session{form}{ldapId}); } elsif ($auth->code > 0) { - $error .= 'LDAP error "'.$ldapStatusCode{$auth->code}.'" occured. Please contact your system administrator for assistance. '; + $error .= 'LDAP error "'.$ldapStatusCode{$auth->code}.'" occured. '.WebGUI::International::get(69); WebGUI::ErrorHandler::warn("LDAP error: ".$ldapStatusCode{$auth->code}); } $ldap->unbind; @@ -313,13 +330,13 @@ sub www_saveAccount { if ($error eq "") { $encryptedPassword = Digest::MD5::md5_base64($session{form}{identifier1}); $uid = getNextId("userId"); - WebGUI::SQL->write("insert into users values ($uid, ".quote($session{form}{username}).", ".quote($encryptedPassword).", ".quote($session{form}{email}).", ".quote($session{form}{icq}).", ".quote($session{setting}{authMethod}).", ".quote($session{setting}{ldapURL}).", ".quote($connectDN).")",$session{dbh}); + WebGUI::SQL->write("insert into users (userId,username,identifier,email,authMethod,ldapURL,connectDN,language) values ($uid, ".quote($session{form}{username}).", ".quote($encryptedPassword).", ".quote($session{form}{email}).", ".quote($session{setting}{authMethod}).", ".quote($session{setting}{ldapURL}).", ".quote($connectDN).", ".quote($session{form}{language}).")",$session{dbh}); WebGUI::SQL->write("insert into groupings values (2,$uid)",$session{dbh}); _login($uid,$encryptedPassword); - $output .= 'Account created successfully!

    '; + $output .= WebGUI::International::get(80).'

    '; $output .= www_displayAccount(); } else { - $output = "

    Error

    ".$error.www_createAccount(); + $output = "

    ".WebGUI::International::get(70)."

    ".$error.www_createAccount(); } return $output; } @@ -329,21 +346,25 @@ sub www_updateAccount { my ($output, $error, $encryptedPassword, $passwordStatement); if ($session{var}{sessionId}) { if (_hasBadUsername($session{form}{username})) { - $error = 'Error: The account name '.$session{form}{username}.' is in use by another member of this site. Please try a different username, perhaps "'.$session{form}{username}.'too" or "'.$session{form}{username}.'01"

    '; + $error = WebGUI::International::get(77); + $error .= ' "'.$session{form}{username}.'too", '; + $error .= '"'.$session{form}{username}.'2", '; + $error .= '"'.$session{form}{username}.'_'.WebGUI::DateTime::epochToHuman(time(),"%y").'"'; + $error .= '

    '; } if ($session{form}{identifier1} ne "password" && _hasBadPassword($session{form}{identifier1},$session{form}{identifier2})) { - $error .= 'Error: Your passwords did not match. Please try again.

    '; + $error .= WebGUI::International::get(78).'

    '; } else { $encryptedPassword = Digest::MD5::md5_base64($session{form}{identifier1}); $passwordStatement = ', identifier='.quote($encryptedPassword); } if ($error eq "") { $encryptedPassword = Digest::MD5::md5_base64($session{form}{identifier1}); - WebGUI::SQL->write("update users set username=".quote($session{form}{username}).$passwordStatement.", email=".quote($session{form}{email}).", icq=".quote($session{form}{icq})." where userId=".$session{user}{userId},$session{dbh}); + WebGUI::SQL->write("update users set username=".quote($session{form}{username}).$passwordStatement.", email=".quote($session{form}{email}).", language=".quote($session{form}{language})." where userId=".$session{user}{userId},$session{dbh}); if ($passwordStatement ne "") { _login($session{user}{userId},$encryptedPassword); } - $output .= 'Account updated successfully!

    '; + $output .= WebGUI::International::get(81).'

    '; $output .= www_displayAccount(); } else { $output = $error; @@ -356,3 +377,4 @@ sub www_updateAccount { } 1; + diff --git a/lib/WebGUI/Operation/Group.pm b/lib/WebGUI/Operation/Group.pm index 61cc65a30..864abcdac 100644 --- a/lib/WebGUI/Operation/Group.pm +++ b/lib/WebGUI/Operation/Group.pm @@ -14,6 +14,7 @@ use Exporter; use strict; use Tie::CPHash; use WebGUI::Form; +use WebGUI::International; use WebGUI::Privilege; use WebGUI::Session; use WebGUI::SQL; @@ -26,12 +27,14 @@ our @EXPORT = qw(&www_addGroup &www_addGroupSave &www_deleteGroup &www_deleteGro sub www_addGroup { my ($output); if (WebGUI::Privilege::isInGroup(3)) { - $output .= '

    Add Group

    '; + $output .= ''; + $output .= '

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

    '; + $output .= ' '; $output .= WebGUI::Form::hidden("op","addGroupSave"); $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= '
    Group Name'.WebGUI::Form::text("groupName",20,30).'
    Description'.WebGUI::Form::textArea("description",'').'
    '.WebGUI::Form::submit("save").'
    '.WebGUI::International::get(84).''.WebGUI::Form::text("groupName",20,30).'
    '.WebGUI::International::get(85).''.WebGUI::Form::textArea("description",'').'
    '.WebGUI::Form::submit(WebGUI::International::get(62)).'
    '; $output .= '
    '; } else { @@ -58,10 +61,11 @@ sub www_deleteGroup { if ($session{form}{gid} < 26) { return WebGUI::Privilege::vitalComponent(); } elsif (WebGUI::Privilege::isInGroup(3)) { - $output .= '

    Please Confirm

    '; - $output .= 'Are you certain you wish to delete this group? Beware that deleting a group is permanent and will remove all privileges associated with this group.

    '; - $output .= '

    Yes, I\'m sure.'; - $output .= '    No, I made a mistake.
    '; + $output .= ''; + $output .= '

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

    '; + $output .= WebGUI::International::get(86).'

    '; + $output .= '

    '; return $output; } else { return WebGUI::Privilege::adminOnly(); @@ -87,14 +91,16 @@ sub www_editGroup { tie %group, 'Tie::CPHash'; if (WebGUI::Privilege::isInGroup(3)) { %group = WebGUI::SQL->quickHash("select * from groups where groupId=$session{form}{gid}",$session{dbh}); - $output .= '

    Edit Group

    '; + $output .= ''; + $output .= '

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

    '; + $output .= ' '; $output .= WebGUI::Form::hidden("op","editGroupSave"); $output .= WebGUI::Form::hidden("gid",$session{form}{gid}); $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= '
    Group Name'.WebGUI::Form::text("groupName",20,30,$group{groupName}).'
    Description'.WebGUI::Form::textArea("description",$group{description}).'
    '.WebGUI::Form::submit("save").'
    Users In Group'; + $output .= '
    '.WebGUI::International::get(84).''.WebGUI::Form::text("groupName",20,30,$group{groupName}).'
    '.WebGUI::International::get(85).''.WebGUI::Form::textArea("description",$group{description}).'
    '.WebGUI::Form::submit(WebGUI::International::get(62)).'
    '.WebGUI::International::get(88).''; $sth = WebGUI::SQL->read("select users.username from users,groupings where groupings.groupId=$session{form}{gid} and groupings.userId=users.userId order by users.username",$session{dbh}); while (($user) = $sth->array) { $output .= $user."
    "; @@ -124,8 +130,9 @@ sub www_listGroups { my ($output, $pn, $sth, @data, @row, $i, $itemsPerPage); if (WebGUI::Privilege::isInGroup(3)) { $itemsPerPage = 50; - $output = '

    Groups

    '; - $output .= ''; + $output = ''; + $output .= '

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

    '; + $output .= ''; $output .= ''; $sth = WebGUI::SQL->read("select groupId,groupName,description from groups where groupName<>'Reserved' order by groupName",$session{dbh}); while (@data = $sth->array) { @@ -145,15 +152,15 @@ sub www_listGroups { $output .= '
    '; $output .= ''; return $output; diff --git a/lib/WebGUI/Operation/Help.pm b/lib/WebGUI/Operation/Help.pm index 5d39a2d49..0d7149435 100644 --- a/lib/WebGUI/Operation/Help.pm +++ b/lib/WebGUI/Operation/Help.pm @@ -13,6 +13,7 @@ package WebGUI::Operation::Help; use Exporter; use strict; use Tie::CPHash; +use WebGUI::International; use WebGUI::Session; use WebGUI::SQL; use WebGUI::Utility; @@ -25,29 +26,29 @@ sub www_viewHelp { my ($output, %help, @data, $sth); tie %help, 'Tie::CPHash'; %help = WebGUI::SQL->quickHash("select * from help where helpId=$session{form}{hid}",$session{dbh}); - $output = '

    Help: '.$help{action}.' '.$help{object}.'

    '; + $output = '

    '.WebGUI::International::get(93).': '.$help{action}.' '.$help{object}.'

    '; $help{body} =~ s/\n/\/g; $output .= $help{body}; - $output .= '

    See Also:'; + $output .= '

    '.WebGUI::International::get(94).':'; $sth = WebGUI::SQL->read("select helpId, action, object from help where object='$help{object}' and action<>'$help{action}' order by action",$session{dbh}); while (@data = $sth->array) { - $output .= ' '.$data[1].' '.$data[2].' ·'; + $output .= ' '.$data[1].' '.$data[2].','; } $sth->finish; $sth = WebGUI::SQL->read("select helpId, action, object from help where helpId in ($help{seeAlso}) order by action",$session{dbh}); while (@data = $sth->array) { - $output .= ' '.$data[1].' '.$data[2].' ·'; + $output .= ' '.$data[1].' '.$data[2].','; } $sth->finish; - $output .= ' Help Index'; + $output .= ' '.WebGUI::International::get(95).''; return $output; } #------------------------------------------------------------------- sub www_viewHelpIndex { my ($sth, @data, $output, $previous); - $output = '

    Help Index

    '; - $output .= '
    Sorted By Action

    '; + $output = '

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

    '; + $output .= '
    '.WebGUI::International::get(96).'

    '; $sth = WebGUI::SQL->read("select helpId, action, object from help order by action,object",$session{dbh}); while (@data = $sth->array) { if ($data[1] ne $previous) { @@ -57,7 +58,7 @@ sub www_viewHelpIndex { $output .= '

  • '.$data[2].'
    '; } $sth->finish; - $output .= '
  • Sorted By Object

    '; + $output .= '

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

    '; $sth = WebGUI::SQL->read("select helpId, object, action from help order by object,action",$session{dbh}); while (@data = $sth->array) { if ($data[1] ne $previous) { diff --git a/lib/WebGUI/Operation/Page.pm b/lib/WebGUI/Operation/Page.pm index 3a7ae55b9..47c5aeea5 100644 --- a/lib/WebGUI/Operation/Page.pm +++ b/lib/WebGUI/Operation/Page.pm @@ -13,6 +13,7 @@ package WebGUI::Operation::Page; use Exporter; use strict; use WebGUI::Form; +use WebGUI::International; use WebGUI::Privilege; use WebGUI::Session; use WebGUI::SQL; @@ -58,12 +59,14 @@ sub _reorderPages { sub www_addPage { my ($output); if (WebGUI::Privilege::canEditPage()) { - $output = '

    Add Page

    '; + $output = ''; + $output .= '

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

    '; + $output .= ''; $output .= WebGUI::Form::hidden("op","addPageSave"); $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= '
    Title'.WebGUI::Form::text("title",20,30,$session{form}{title}).'
    Meta Tags'.WebGUI::Form::textArea("metaTags",$session{form}{metaTags}).'
    '.WebGUI::Form::submit("create").'
    '.WebGUI::International::get(99).''.WebGUI::Form::text("title",20,30,$session{form}{title}).'
    '.WebGUI::International::get(100).''.WebGUI::Form::textArea("metaTags",$session{form}{metaTags}).'
    '.WebGUI::Form::submit(WebGUI::International::get(62)).'
    '; return $output; } else { @@ -107,10 +110,11 @@ sub www_deletePage { if ($session{page}{pageId} < 26) { return WebGUI::Privilege::vitalComponent(); } elsif (WebGUI::Privilege::canEditPage()) { - $output .= '

    Please Confirm

    '; - $output .= 'Are you certain that you wish to delete this page, its content, and all items under it?

    '; - $output .= '

    Yes, I\'m sure.'; - $output .= '    No, I made a mistake.
    '; + $output .= ''; + $output .= '

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

    '; + $output .= WebGUI::International::get(101).'

    '; + $output .= '

    '; return $output; } else { return WebGUI::Privilege::insufficient(); @@ -137,39 +141,41 @@ sub www_editPage { tie %hash, "Tie::IxHash"; if (WebGUI::Privilege::canEditPage()) { %yesNo = ("0"=>"No", "1"=>"Yes"); - $output = '

    Edit Page

    '; + $output = ''; + $output .= '

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

    '; + $output .= ''; $output .= WebGUI::Form::hidden("op","editPageSave"); $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; %hash = WebGUI::SQL->buildHash("select styleId,name from style where name<>'Reserved' order by name",$session{dbh}); $array[0] = $session{page}{styleId}; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; %hash = WebGUI::SQL->buildHash("select users.userId,users.username from users,groupings where groupings.groupId=4 and groupings.userId=users.userId order by users.username",$session{dbh}); $array[0] = $session{page}{ownerId}; - $output .= ''; + $output .= ''; $array[0] = $session{page}{ownerView}; - $output .= ''; + $output .= ''; $array[0] = $session{page}{ownerEdit}; - $output .= ''; + $output .= ''; %hash = WebGUI::SQL->buildHash("select groupId,groupName from groups where groupName<>'Reserved' order by groupName",$session{dbh}); $array[0] = $session{page}{groupId}; - $output .= ''; + $output .= ''; $array[0] = $session{page}{groupView}; - $output .= ''; + $output .= ''; $array[0] = $session{page}{groupEdit}; - $output .= ''; + $output .= ''; $array[0] = $session{page}{worldView}; - $output .= ''; + $output .= ''; $array[0] = $session{page}{worldEdit}; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= '
    Page Specifics
    Title'.WebGUI::Form::text("title",20,30,$session{page}{title}).'
    Page URL'.WebGUI::Form::text("urlizedTitle",20,30,$session{page}{urlizedTitle}).'
    Meta Tags'.WebGUI::Form::textArea("metaTags",$session{page}{metaTags}).'

    Style
    '.WebGUI::International::get(103).'
    '.WebGUI::International::get(99).''.WebGUI::Form::text("title",20,30,$session{page}{title}).'
    '.WebGUI::International::get(104).''.WebGUI::Form::text("urlizedTitle",20,30,$session{page}{urlizedTitle}).'
    '.WebGUI::International::get(100).''.WebGUI::Form::textArea("metaTags",$session{page}{metaTags}).'

    '.WebGUI::International::get(105).'
    Style'.WebGUI::Form::selectList("styleId",\%hash,\@array).' Manage Styles
    '.WebGUI::Form::checkbox("recurseStyle","yes").' Check to give this style to all sub-pages.

    Privileges
    '.WebGUI::International::get(105).''.WebGUI::Form::selectList("styleId",\%hash,\@array).' '.WebGUI::International::get(6).'
    '.WebGUI::Form::checkbox("recurseStyle","yes").' '.WebGUI::International::get(106).'

    '.WebGUI::International::get(107).'
    Owner'.WebGUI::Form::selectList("ownerId",\%hash,\@array).' Manage Users
    '.WebGUI::International::get(108).''.WebGUI::Form::selectList("ownerId",\%hash,\@array).' '.WebGUI::International::get(7).'
    Owner can view?'.WebGUI::Form::selectList("ownerView",\%yesNo,\@array).'
    '.WebGUI::International::get(109).''.WebGUI::Form::selectList("ownerView",\%yesNo,\@array).'
    Owner can edit?'.WebGUI::Form::selectList("ownerEdit",\%yesNo,\@array).'
    '.WebGUI::International::get(110).''.WebGUI::Form::selectList("ownerEdit",\%yesNo,\@array).'
    Group'.WebGUI::Form::selectList("groupId",\%hash,\@array).' Manage Groups
    '.WebGUI::International::get(111).''.WebGUI::Form::selectList("groupId",\%hash,\@array).' '.WebGUI::International::get(5).'
    Group can view?'.WebGUI::Form::selectList("groupView",\%yesNo,\@array).'
    '.WebGUI::International::get(112).''.WebGUI::Form::selectList("groupView",\%yesNo,\@array).'
    Group can edit?'.WebGUI::Form::selectList("groupEdit",\%yesNo,\@array).'
    '.WebGUI::International::get(113).''.WebGUI::Form::selectList("groupEdit",\%yesNo,\@array).'
    Anybody can view?'.WebGUI::Form::selectList("worldView",\%yesNo,\@array).'
    '.WebGUI::International::get(114).''.WebGUI::Form::selectList("worldView",\%yesNo,\@array).'
    Anybody can Edit?'.WebGUI::Form::selectList("worldEdit",\%yesNo,\@array).'
    '.WebGUI::Form::checkbox("recursePrivs","yes").' Check to give these privileges to all sub-pages.
    '.WebGUI::Form::submit("save").'
    '.WebGUI::International::get(115).''.WebGUI::Form::selectList("worldEdit",\%yesNo,\@array).'
    '.WebGUI::Form::checkbox("recursePrivs","yes").' '.WebGUI::International::get(116).'
    '.WebGUI::Form::submit(WebGUI::International::get(62)).'
    '; return $output; } else { diff --git a/lib/WebGUI/Operation/Settings.pm b/lib/WebGUI/Operation/Settings.pm index 195892f49..3c29168c7 100644 --- a/lib/WebGUI/Operation/Settings.pm +++ b/lib/WebGUI/Operation/Settings.pm @@ -13,51 +13,37 @@ package WebGUI::Operation::Settings; use Exporter; use strict; use WebGUI::Form; +use WebGUI::International; use WebGUI::Privilege; use WebGUI::Session; use WebGUI::SQL; use WebGUI::Utility; our @ISA = qw(Exporter); -our @EXPORT = qw(&www_editSettings &www_editSettingsSave); +our @EXPORT = qw(&www_editAuthenticationSettings &www_editAuthenticationSettingsSave &www_editCompanyInformation &www_editCompanyInformationSave &www_editFileSettings &www_editFileSettingsSave &www_editMailSettings &www_editMailSettingsSave &www_editMiscSettings &www_editMiscSettingsSave &www_manageSettings &www_viewStatistics); #------------------------------------------------------------------- -sub www_editSettings { - my ($output, %authMethod, @array, %yesNo, %notFoundPage); - %authMethod = ('WebGUI'=>'WebGUI', 'LDAP'=>'LDAP'); - %yesNo = ('yes'=>'Yes', 'no'=>'No'); - %notFoundPage = (1=>'Home Page', 4=>'Page Not Found Page'); +sub www_editAuthenticationSettings { + my ($output, %authMethod, @array, %yesNo); + %authMethod = ('WebGUI'=>'WebGUI', 'LDAP'=>'LDAP'); + %yesNo = ('yes'=>WebGUI::International::get(138), 'no'=>WebGUI::International::get(139)); if (WebGUI::Privilege::isInGroup(3)) { - $output .= '

    Edit Settings

    '; - $output .= WebGUI::Form::hidden("op","editSettingsSave"); + $output .= ''; + $output .= '

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

    '; + $output .= ' '; + $output .= WebGUI::Form::hidden("op","editAuthenticationSettingsSave"); $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $array[0] = $session{setting}{anonymousRegistration}; - $output .= ''; - $array[0] = $session{setting}{authMethod}; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $array[0] = $session{setting}{notFoundPage}; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $array[0] = $session{setting}{anonymousRegistration}; + $output .= ''; + $array[0] = $session{setting}{authMethod}; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= '
    Files
    Path to WebGUI Extras'.WebGUI::Form::text("lib",30,255,$session{setting}{lib}).'
    Maximum Attachment Size'.WebGUI::Form::text("maxAttachmentSize",30,11,$session{setting}{maxAttachmentSize}).'
    Web Attachment Path'.WebGUI::Form::text("attachmentDirectoryWeb",30,255,$session{setting}{attachmentDirectoryWeb}).'
    Server Attachment Path'.WebGUI::Form::text("attachmentDirectoryLocal",30,255,$session{setting}{attachmentDirectoryLocal}).'

    Company Information
    Company Name'.WebGUI::Form::text("companyName",30,255,$session{setting}{companyName}).'
    Company Email Address'.WebGUI::Form::text("companyEmail",30,255,$session{setting}{companyEmail}).'
    Company URL'.WebGUI::Form::text("companyURL",30,2048,$session{setting}{companyURL}).'

    Authentication
    Anonymous Registration'.WebGUI::Form::selectList("anonymousRegistration",\%yesNo, \@array).'
    Authentication Method (default)'.WebGUI::Form::selectList("authMethod",\%authMethod, \@array).'
    LDAP URL (default)'.WebGUI::Form::text("ldapURL",30,2048,$session{setting}{ldapURL}).'
    LDAP Identity (default)'.WebGUI::Form::text("ldapId",30,100,$session{setting}{ldapId}).'
    LDAP Identity Name'.WebGUI::Form::text("ldapIdName",30,100,$session{setting}{ldapIdName}).'
    LDAP Password Name'.WebGUI::Form::text("ldapPasswordName",30,100,$session{setting}{ldapPasswordName}).'

    Miscellaneous
    Not Found Page'.WebGUI::Form::selectList("notFoundPage",\%notFoundPage,\@array).'
    Session Timeout'.WebGUI::Form::text("sessionTimeout",30,11,$session{setting}{sessionTimeout}).'
    SMTP Server'.WebGUI::Form::text("smtpServer",30,255,$session{setting}{smtpServer}).'
    '.WebGUI::Form::submit("save").'
    '.WebGUI::International::get(118).''.WebGUI::Form::selectList("anonymousRegistration",\%yesNo, \@array).'
    '.WebGUI::International::get(119).''.WebGUI::Form::selectList("authMethod",\%authMethod, \@array).'
    '.WebGUI::International::get(120).''.WebGUI::Form::text("ldapURL",30,2048,$session{setting}{ldapURL}).'
    '.WebGUI::International::get(121).''.WebGUI::Form::text("ldapId",30,100,$session{setting}{ldapId}).'
    '.WebGUI::International::get(122).''.WebGUI::Form::text("ldapIdName",30,100,$session{setting}{ldapIdName}).'
    '.WebGUI::International::get(123).''.WebGUI::Form::text("ldapPasswordName",30,100,$session{setting}{ldapPasswordName}).'
    '.WebGUI::Form::submit(WebGUI::International::get(62)).'
    '; $output .= '
    '; - $output .= '
    Build Version: '.$WebGUI::VERSION; } else { $output = WebGUI::Privilege::adminOnly(); } @@ -65,23 +51,145 @@ sub www_editSettings { } #------------------------------------------------------------------- -sub www_editSettingsSave { +sub www_editAuthenticationSettingsSave { if (WebGUI::Privilege::isInGroup(3)) { - WebGUI::SQL->write("update settings set value=".quote($session{form}{lib})." where name='lib'",$session{dbh}); - WebGUI::SQL->write("update settings set value=".quote($session{form}{sessionTimeout})." where name='sessionTimeout'",$session{dbh}); - WebGUI::SQL->write("update settings set value=".quote($session{form}{maxAttachmentSize})." where name='maxAttachmentSize'",$session{dbh}); - WebGUI::SQL->write("update settings set value=".quote($session{form}{attachmentDirectoryWeb})." where name='attachmentDirectoryWeb'",$session{dbh}); - WebGUI::SQL->write("update settings set value=".quote($session{form}{attachmentDirectoryLocal})." where name='attachmentDirectoryLocal'",$session{dbh}); - WebGUI::SQL->write("update settings set value=".quote($session{form}{smtpServer})." where name='smtpServer'",$session{dbh}); - WebGUI::SQL->write("update settings set value=".quote($session{form}{companyName})." where name='companyName'",$session{dbh}); - WebGUI::SQL->write("update settings set value=".quote($session{form}{companyEmail})." where name='companyEmail'",$session{dbh}); - WebGUI::SQL->write("update settings set value=".quote($session{form}{companyURL})." where name='companyURL'",$session{dbh}); WebGUI::SQL->write("update settings set value=".quote($session{form}{authMethod})." where name='authMethod'",$session{dbh}); WebGUI::SQL->write("update settings set value=".quote($session{form}{ldapURL})." where name='ldapURL'",$session{dbh}); WebGUI::SQL->write("update settings set value=".quote($session{form}{ldapId})." where name='ldapId'",$session{dbh}); WebGUI::SQL->write("update settings set value=".quote($session{form}{ldapIdName})." where name='ldapIdName'",$session{dbh}); WebGUI::SQL->write("update settings set value=".quote($session{form}{ldapPasswordName})." where name='ldapPasswordName'",$session{dbh}); WebGUI::SQL->write("update settings set value=".quote($session{form}{anonymousRegistration})." where name='anonymousRegistration'",$session{dbh}); + return www_manageSettings(); + } else { + return WebGUI::Privilege::adminOnly(); + } +} + +#------------------------------------------------------------------- +sub www_editCompanyInformation { + my ($output); + if (WebGUI::Privilege::isInGroup(3)) { + $output .= ''; + $output .= '

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

    '; + $output .= '
    '; + $output .= WebGUI::Form::hidden("op","editCompanyInformationSave"); + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= '
    '.WebGUI::International::get(125).''.WebGUI::Form::text("companyName",30,255,$session{setting}{companyName}).'
    '.WebGUI::International::get(126).''.WebGUI::Form::text("companyEmail",30,255,$session{setting}{companyEmail}).'
    '.WebGUI::International::get(127).''.WebGUI::Form::text("companyURL",30,2048,$session{setting}{companyURL}).'
    '.WebGUI::Form::submit(WebGUI::International::get(62)).'
    '; + $output .= '
    '; + } else { + $output = WebGUI::Privilege::adminOnly(); + } + return $output; +} + +#------------------------------------------------------------------- +sub www_editCompanyInformationSave { + if (WebGUI::Privilege::isInGroup(3)) { + WebGUI::SQL->write("update settings set value=".quote($session{form}{companyName})." where name='companyName'",$session{dbh}); + WebGUI::SQL->write("update settings set value=".quote($session{form}{companyEmail})." where name='companyEmail'",$session{dbh}); + WebGUI::SQL->write("update settings set value=".quote($session{form}{companyURL})." where name='companyURL'",$session{dbh}); + return www_manageSettings(); + } else { + return WebGUI::Privilege::adminOnly(); + } +} + +#------------------------------------------------------------------- +sub www_editFileSettings { + my ($output); + if (WebGUI::Privilege::isInGroup(3)) { + $output .= ''; + $output .= '

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

    '; + $output .= '
    '; + $output .= WebGUI::Form::hidden("op","editFileSettingsSave"); + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= '
    '.WebGUI::International::get(129).''.WebGUI::Form::text("lib",30,255,$session{setting}{lib}).'
    '.WebGUI::International::get(130).''.WebGUI::Form::text("maxAttachmentSize",30,11,$session{setting}{maxAttachmentSize}).'
    '.WebGUI::International::get(131).''.WebGUI::Form::text("attachmentDirectoryWeb",30,255,$session{setting}{attachmentDirectoryWeb}).'
    '.WebGUI::International::get(132).''.WebGUI::Form::text("attachmentDirectoryLocal",30,255,$session{setting}{attachmentDirectoryLocal}).'
    '.WebGUI::Form::submit(WebGUI::International::get(62)).'
    '; + $output .= '
    '; + } else { + $output = WebGUI::Privilege::adminOnly(); + } + return $output; +} + +#------------------------------------------------------------------- +sub www_editFileSettingsSave { + if (WebGUI::Privilege::isInGroup(3)) { + WebGUI::SQL->write("update settings set value=".quote($session{form}{lib})." where name='lib'",$session{dbh}); + WebGUI::SQL->write("update settings set value=".quote($session{form}{maxAttachmentSize})." where name='maxAttachmentSize'",$session{dbh}); + WebGUI::SQL->write("update settings set value=".quote($session{form}{attachmentDirectoryWeb})." where name='attachmentDirectoryWeb'",$session{dbh}); + WebGUI::SQL->write("update settings set value=".quote($session{form}{attachmentDirectoryLocal})." wherename='attachmentDirectoryLocal'",$session{dbh}); + return www_manageSettings(); + } else { + return WebGUI::Privilege::adminOnly(); + } +} + +#------------------------------------------------------------------- +sub www_editMailSettings { + my ($output); + if (WebGUI::Privilege::isInGroup(3)) { + $output .= ''; + $output .= '

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

    '; + $output .= '
    '; + $output .= WebGUI::Form::hidden("op","editMailSettingsSave"); + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= '
    '.WebGUI::International::get(134).''.WebGUI::Form::textArea("recoverPasswordEmail",$session{setting}{recoverPasswordEmail}).'
    '.WebGUI::International::get(135).''.WebGUI::Form::text("smtpServer",30,255,$session{setting}{smtpServer}).'
    '.WebGUI::Form::submit(WebGUI::International::get(62)).'
    '; + $output .= '
    '; + } else { + $output = WebGUI::Privilege::adminOnly(); + } + return $output; +} + +#------------------------------------------------------------------- +sub www_editMailSettingsSave { + if (WebGUI::Privilege::isInGroup(3)) { + WebGUI::SQL->write("update settings set value=".quote($session{form}{recoverPasswordEmail})." where name='recoverPasswordEmail'",$session{dbh}); + WebGUI::SQL->write("update settings set value=".quote($session{form}{smtpServer})." where name='smtpServer'",$session{dbh}); + return www_manageSettings(); + } else { + return WebGUI::Privilege::adminOnly(); + } +} + +#------------------------------------------------------------------- +sub www_editMiscSettings { + my ($output, @array, %notFoundPage); + %notFoundPage = (1=>WebGUI::International::get(136), 4=>WebGUI::International::get(137)); + if (WebGUI::Privilege::isInGroup(3)) { + $output .= ''; + $output .= '

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

    '; + $output .= '
    '; + $output .= WebGUI::Form::hidden("op","editMiscSettingsSave"); + $output .= ''; + $array[0] = $session{setting}{notFoundPage}; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= '
    '.WebGUI::International::get(141).''.WebGUI::Form::selectList("notFoundPage",\%notFoundPage,\@array).'
    '.WebGUI::International::get(142).''.WebGUI::Form::text("sessionTimeout",30,11,$session{setting}{sessionTimeout}).'
    '.WebGUI::Form::submit(WebGUI::International::get(62)).'
    '; + $output .= '
    '; + } else { + $output = WebGUI::Privilege::adminOnly(); + } + return $output; +} + +#------------------------------------------------------------------- +sub www_editMiscSettingsSave { + if (WebGUI::Privilege::isInGroup(3)) { + WebGUI::SQL->write("update settings set value=".quote($session{form}{sessionTimeout})." where name='sessionTimeout'",$session{dbh}); WebGUI::SQL->write("update settings set value=".quote($session{form}{notFoundPage})." where name='notFoundPage'",$session{dbh}); return ""; } else { @@ -89,4 +197,52 @@ sub www_editSettingsSave { } } +#------------------------------------------------------------------- +sub www_manageSettings { + my ($output); + if (WebGUI::Privilege::isInGroup(3)) { + $output .= ''; + $output .= '

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

    '; + $output .= ''; + } else { + $output = WebGUI::Privilege::adminOnly(); + } + return $output; +} + +#------------------------------------------------------------------- +sub www_viewStatistics { + my ($output, $data); + if (WebGUI::Privilege::isInGroup(3)) { + $output .= ''; + $output .= '

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

    '; + $output .= ''; + $output .= ''; + ($data) = WebGUI::SQL->quickArray("select count(*) from session",$session{dbh}); + $output .= ''; + ($data) = WebGUI::SQL->quickArray("select count(*)+1 from page where parentId>25",$session{dbh}); + $output .= ''; + ($data) = WebGUI::SQL->quickArray("select count(*) from page where pageId>25 or pageId=0",$session{dbh}); + $output .= ''; + ($data) = WebGUI::SQL->quickArray("select count(*) from users where userId>25",$session{dbh}); + $output .= ''; + ($data) = WebGUI::SQL->quickArray("select count(*) from groups where groupId>25",$session{dbh}); + $output .= ''; + $output .= '
    '.WebGUI::International::get(145).''.$WebGUI::VERSION.'
    '.WebGUI::International::get(146).''.$data.'
    '.WebGUI::International::get(147).''.$data.'
    '.WebGUI::International::get(148).''.$data.'
    '.WebGUI::International::get(149).''.$data.'
    '.WebGUI::International::get(89).''.$data.'
    '; + } else { + $output = WebGUI::Privilege::adminOnly(); + } + return $output; +} + + + 1; + diff --git a/lib/WebGUI/Operation/Style.pm b/lib/WebGUI/Operation/Style.pm index 38156f4f3..4792ae8c2 100644 --- a/lib/WebGUI/Operation/Style.pm +++ b/lib/WebGUI/Operation/Style.pm @@ -14,6 +14,7 @@ use Exporter; use strict; use Tie::CPHash; use WebGUI::Form; +use WebGUI::International; use WebGUI::Privilege; use WebGUI::Session; use WebGUI::SQL; @@ -26,14 +27,16 @@ our @EXPORT = qw(&www_addStyle &www_addStyleSave &www_deleteStyle &www_deleteSty sub www_addStyle { my ($output); if (WebGUI::Privilege::isInGroup(3)) { - $output .= '

    Add Style

    '; + $output .= ''; + $output .= '

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

    '; + $output .= ' '; $output .= WebGUI::Form::hidden("op","addStyleSave"); $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= '
    Style Name'.WebGUI::Form::text("name",20,30).'
    Header'.WebGUI::Form::textArea("header",'',50,10,1).'
    Footer'.WebGUI::Form::textArea("footer",'',50,10,1).'
    Style Sheet'.WebGUI::Form::textArea("styleSheet",'',50,10).'
    '.WebGUI::Form::submit("save").'
    '.WebGUI::International::get(151).''.WebGUI::Form::text("name",20,30).'
    '.WebGUI::International::get(152).''.WebGUI::Form::textArea("header",'',50,10,1).'
    '.WebGUI::International::get(153).''.WebGUI::Form::textArea("footer",'',50,10,1).'
    '.WebGUI::International::get(154).''.WebGUI::Form::textArea("styleSheet","",50,10).'
    '.WebGUI::Form::submit(WebGUI::International::get(62)).'
    '; $output .= '
    '; } else { @@ -60,10 +63,10 @@ sub www_deleteStyle { if ($session{form}{sid} < 26) { return WebGUI::Privilege::vitalComponent(); } elsif (WebGUI::Privilege::isInGroup(3)) { - $output .= '

    Please Confirm

    '; - $output .= 'Are you certain you wish to delete this style and migrate all pages using this style to the "Fail Safe" style?

    '; - $output .= '

    Yes, I\'m sure.'; - $output .= '    No, I made a mistake.
    '; + $output .= '

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

    '; + $output .= WebGUI::International::get(155).'

    '; + $output .= '

    '; return $output; } else { return WebGUI::Privilege::adminOnly(); @@ -89,15 +92,17 @@ sub www_editStyle { tie %style, 'Tie::CPHash'; if (WebGUI::Privilege::isInGroup(3)) { %style = WebGUI::SQL->quickHash("select * from style where styleId=$session{form}{sid}",$session{dbh}); - $output .= '

    Edit Style

    '; + $output .= ''; + $output .= '

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

    '; + $output .= ' '; $output .= WebGUI::Form::hidden("op","editStyleSave"); $output .= WebGUI::Form::hidden("sid",$session{form}{sid}); $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= '
    Style Name'.WebGUI::Form::text("name",20,30,$style{name}).'
    Header'.WebGUI::Form::textArea("header",$style{header},50,10,1).'
    Footer'.WebGUI::Form::textArea("footer",$style{footer},50,10,1).'
    Style Sheet'.WebGUI::Form::textArea("styleSheet",$style{styleSheet},50,10).'
    '.WebGUI::Form::submit("save").'
    '.WebGUI::International::get(151).''.WebGUI::Form::text("name",20,30,$style{name}).'
    '.WebGUI::International::get(152).''.WebGUI::Form::textArea("header",$style{header},50,10,1).'
    '.WebGUI::International::get(153).''.WebGUI::Form::textArea("footer",$style{footer},50,10,1).'
    '.WebGUI::International::get(154).''.WebGUI::Form::textArea("styleSheet",$style{styleSheet},50,10).'
    '.WebGUI::Form::submit(WebGUI::International::get(62)).'
    '; $output .= '
    '; } else { @@ -121,8 +126,9 @@ sub www_listStyles { my ($output, $pn, $sth, @data, @row, $i, $itemsPerPage); if (WebGUI::Privilege::isInGroup(3)) { $itemsPerPage = 50; - $output = '

    Styles

    '; - $output .= ''; + $output = ''; + $output .= '

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

    '; + $output .= ''; $output .= ''; $sth = WebGUI::SQL->read("select styleId,name from style where name<>'Reserved' order by name",$session{dbh}); while (@data = $sth->array) { diff --git a/lib/WebGUI/Operation/Submission.pm b/lib/WebGUI/Operation/Submission.pm index 77dab5361..d81843852 100644 --- a/lib/WebGUI/Operation/Submission.pm +++ b/lib/WebGUI/Operation/Submission.pm @@ -13,6 +13,7 @@ package WebGUI::Operation::Submission; use Exporter; use strict; use WebGUI::DateTime; +use WebGUI::International; use WebGUI::Privilege; use WebGUI::Session; use WebGUI::SQL; @@ -46,7 +47,7 @@ sub www_denySubmission { sub www_viewPendingSubmissions { my (@submission, $output, $sth, @row, $i, $pn); if (WebGUI::Privilege::isInGroup(4,$session{user}{userId}) || WebGUI::Privilege::isInGroup(3,$session{user}{userId})) { - $output = '

    Pending Sumissions

    '; + $output = '

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

    '; $sth = WebGUI::SQL->read("select title,submissionId,dateSubmitted,username,userId,widgetId from submission where status='Pending' order by dateSubmitted",$session{dbh}); while (@submission = $sth->array) { $row[$i] = ''; @@ -54,7 +55,7 @@ sub www_viewPendingSubmissions { } $sth->finish; $output .= '
    '.$submission[0].''.epochToHuman($submission[2],"%m/%d/%Y").''.$submission[3].'
    '; - $output .= ''; + $output .= ''; if ($session{form}{pn} < 1) { $pn = 0; } else { @@ -66,15 +67,15 @@ sub www_viewPendingSubmissions { $output .= '
    TitleDate SubmittedSubmitted By
    '.WebGUI::International::get(99).''.WebGUI::International::get(160).''.WebGUI::International::get(161).'
    '; $output .= ''; } else { diff --git a/lib/WebGUI/Operation/Trash.pm b/lib/WebGUI/Operation/Trash.pm index dff46fd6c..20ac9d0a4 100644 --- a/lib/WebGUI/Operation/Trash.pm +++ b/lib/WebGUI/Operation/Trash.pm @@ -47,10 +47,10 @@ sub _recursePageTree { sub www_purgeTrash { my ($output); if (WebGUI::Privilege::isInGroup(3)) { - $output = '

    Please Confirm

    '; - $output .= 'Are you certain that you wish to purge all the pages and widgets in the trash?

    '; - $output .= '

    Yes, I\'m sure.'; - $output .= '    No, I made a mistake.
    '; + $output = '

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

    '; + $output .= WebGUI::International::get(162).'

    '; + $output .= '

    '; return $output; } else { return WebGUI::Privilege::adminOnly(); diff --git a/lib/WebGUI/Operation/User.pm b/lib/WebGUI/Operation/User.pm index c0ed44626..420811bda 100644 --- a/lib/WebGUI/Operation/User.pm +++ b/lib/WebGUI/Operation/User.pm @@ -15,8 +15,7 @@ use Exporter; use strict; use Tie::CPHash; use WebGUI::Form; -use WebGUI::Operation::Help; -use WebGUI::Operation::Page; +use WebGUI::International; use WebGUI::Privilege; use WebGUI::Session; use WebGUI::SQL; @@ -29,21 +28,25 @@ our @EXPORT = qw(&www_addUser &www_addUserSave &www_deleteUser &www_deleteUserCo sub www_addUser { my ($output, %hash, @array); if (WebGUI::Privilege::isInGroup(3)) { - $output .= '

    Add User

    '; + $output .= ''; + $output .= '

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

    '; + $output .= ' '; $output .= WebGUI::Form::hidden("op","addUserSave"); $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; %hash = ('WebGUI'=>'WebGUI', 'LDAP'=>'LDAP'); $array[0] = $session{setting}{authMethod}; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; %hash = WebGUI::SQL->buildHash("select groupId,groupName from groups where groupName<>'Reserved' order by groupName",$session{dbh}); - $output .= ''; - $output .= ''; + $array[0] = 2; + $output .= ''; + %hash = WebGUI::SQL->buildHash("select distinct(language) from international",$session{dbh}); + $output .= ''; + $output .= ''; $output .= '
    Username'.WebGUI::Form::text("username",20,30).'
    Password'.WebGUI::Form::password("identifier",20,30).'
    '.WebGUI::International::get(50).''.WebGUI::Form::text("username",20,30).'
    '.WebGUI::International::get(51).''.WebGUI::Form::password("identifier",20,30).'
    Authentication Method'.WebGUI::Form::selectList("authMethod",\%hash, \@array).'
    LDAP URL'.WebGUI::Form::text("ldapURL",20,2048,$session{setting}{ldapURL}).'
    Connect DN'.WebGUI::Form::text("connectDN",20,255).'
    Email address'.WebGUI::Form::text("email",20,255).'
    ICQ UIN'.WebGUI::Form::text("icq",20,30).'
    '.WebGUI::International::get(164).''.WebGUI::Form::selectList("authMethod",\%hash, \@array).'
    '.WebGUI::International::get(165).''.WebGUI::Form::text("ldapURL",20,2048,$session{setting}{ldapURL}).'
    '.WebGUI::International::get(166).''.WebGUI::Form::text("connectDN",20,255).'
    '.WebGUI::International::get(56).''.WebGUI::Form::text("email",20,255).'
    Groups'.WebGUI::Form::selectList("groups",\%hash,'',5,1).'
    '.WebGUI::Form::submit("save").'
    '.WebGUI::International::get(89).''.WebGUI::Form::selectList("groups",\%hash,\@array,5,1).'
    '.WebGUI::International::get(304).''.WebGUI::Form::selectList("language",\%hash).'
    '.WebGUI::Form::submit(WebGUI::International::get(62)).'
    '; $output .= '
    '; } else { @@ -58,7 +61,7 @@ sub www_addUserSave { if (WebGUI::Privilege::isInGroup(3)) { $encryptedPassword = Digest::MD5::md5_base64($session{form}{identifier}); $uid = getNextId("userId"); - WebGUI::SQL->write("insert into users values ($uid, ".quote($session{form}{username}).", ".quote($encryptedPassword).", ".quote($session{form}{email}).", ".quote($session{form}{icq}).", ".quote($session{form}{authMethod}).", ".quote($session{form}{ldapURL}).", ".quote($session{form}{connectDN}).")",$session{dbh}); + WebGUI::SQL->write("insert into users values ($uid, ".quote($session{form}{username}).", ".quote($encryptedPassword).", ".quote($session{form}{email}).", ".quote($session{form}{authMethod}).", ".quote($session{form}{ldapURL}).", ".quote($session{form}{connectDN}).", ".quote($session{form}{language}).", '')",$session{dbh}); @groups = $session{cgi}->param('groups'); foreach $gid (@groups) { WebGUI::SQL->write("insert into groupings values ($gid, $uid)",$session{dbh}); @@ -76,10 +79,11 @@ sub www_deleteUser { if ($session{form}{uid} < 26) { return WebGUI::Privilege::vitalComponent(); } elsif (WebGUI::Privilege::isInGroup(3)) { - $output .= '

    Please Confirm

    '; - $output .= 'Are you certain you want to delete this user? Be warned that all this user\'s information will be lost permanently if you choose to proceed.

    '; - $output .= '

    Yes, I\'m sure.'; - $output .= '    No, I made a mistake.
    '; + $output .= ''; + $output .= '

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

    '; + $output .= WebGUI::International::get(167).'

    '; + $output .= '

    '; return $output; } else { return WebGUI::Privilege::adminOnly(); @@ -105,23 +109,28 @@ sub www_editUser { tie %hash, 'Tie::CPHash'; if (WebGUI::Privilege::isInGroup(3)) { %user = WebGUI::SQL->quickHash("select * from users where userId=$session{form}{uid}",$session{dbh}); - $output .= '

    Edit User

    '; + $output .= ''; + $output .= '

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

    '; + $output .= ' '; $output .= WebGUI::Form::hidden("op","editUserSave"); $output .= WebGUI::Form::hidden("uid",$session{form}{uid}); $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; %hash = ('WebGUI'=>'WebGUI', 'LDAP'=>'LDAP'); $array[0] = $user{authMethod}; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; %hash = WebGUI::SQL->buildHash("select groupId,groupName from groups where groupName<>'Reserved' order by groupName",$session{dbh}); @array = WebGUI::SQL->buildArray("select groupId from groupings where userId=$session{form}{uid}",$session{dbh}); - $output .= ''; - $output .= ''; + $output .= ''; + %hash = WebGUI::SQL->buildHash("select distinct(language) from international",$session{dbh}); + @array = []; + $array[0] = $user{language}; + $output .= ''; + $output .= ''; $output .= '
    Username'.WebGUI::Form::text("username",20,30,$user{username}).'
    Password'.WebGUI::Form::password("identifier",20,30,"password").'
    '.WebGUI::International::get(50).''.WebGUI::Form::text("username",20,30,$user{username}).'
    '.WebGUI::International::get(51).''.WebGUI::Form::password("identifier",20,30,"password").'
    Authentication Method'.WebGUI::Form::selectList("authMethod",\%hash,\@array).'
    LDAP URL'.WebGUI::Form::text("ldapURL",20,2048,$user{ldapURL}).'
    Connect DN'.WebGUI::Form::text("connectDN",20,255,$user{connectDN}).'
    Email Address'.WebGUI::Form::text("email",20,255,$user{email}).'
    ICQ UIN'.WebGUI::Form::text("icq",20,30,$user{icq}).'
    '.WebGUI::International::get(164).''.WebGUI::Form::selectList("authMethod",\%hash,\@array).'
    '.WebGUI::International::get(165).''.WebGUI::Form::text("ldapURL",20,2048,$user{ldapURL}).'
    '.WebGUI::International::get(166).''.WebGUI::Form::text("connectDN",20,255,$user{connectDN}).'
    '.WebGUI::International::get(56).''.WebGUI::Form::text("email",20,255,$user{email}).'
    Groups'.WebGUI::Form::selectList("groups",\%hash,\@array,5,1).'
    '.WebGUI::Form::submit("save").'
    '.WebGUI::International::get(89).''.WebGUI::Form::selectList("groups",\%hash,\@array,5,1).'
    '.WebGUI::International::get(304).''.WebGUI::Form::selectList("language",\%hash,\@array).'
    '.WebGUI::Form::submit(WebGUI::International::get(62)).'
    '; $output .= '
    '; } else { @@ -139,7 +148,7 @@ sub www_editUserSave { $passwordStatement = ', identifier='.quote($encryptedPassword); } $encryptedPassword = Digest::MD5::md5_base64($session{form}{identifier1}); - WebGUI::SQL->write("update users set username=".quote($session{form}{username}).$passwordStatement.", authMethod=".quote($session{form}{authMethod}).", ldapURL=".quote($session{form}{ldapURL}).", connectDN=".quote($session{form}{connectDN}).", email=".quote($session{form}{email}).", icq=".quote($session{form}{icq})." where userId=".$session{form}{uid},$session{dbh}); + WebGUI::SQL->write("update users set username=".quote($session{form}{username}).$passwordStatement.", authMethod=".quote($session{form}{authMethod}).", ldapURL=".quote($session{form}{ldapURL}).", connectDN=".quote($session{form}{connectDN}).", email=".quote($session{form}{email}).", language=".quote($session{form}{language})." where userId=".$session{form}{uid},$session{dbh}); WebGUI::SQL->write("delete from groupings where userId=$session{form}{uid}",$session{dbh}); @groups = $session{cgi}->param('groups'); foreach $gid (@groups) { @@ -153,15 +162,25 @@ sub www_editUserSave { #------------------------------------------------------------------- sub www_listUsers { - my ($output, $sth, @data, @row, $pn, $i, $itemsPerPage); + my ($output, $sth, @data, @row, $pn, $i, $itemsPerPage, $search); if (WebGUI::Privilege::isInGroup(3)) { $itemsPerPage = 50; - $output = '

    Users

    '; - $output .= ''; + $output = ''; + $output .= '

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

    '; + $output .= '
    '; + $output .= ''.WebGUI::International::get(169).''; + $output .= '
    '; + $output .= WebGUI::Form::hidden("op","listUsers"); + $output .= WebGUI::Form::text("keyword",20,50); + $output .= WebGUI::Form::submit(WebGUI::International::get(170)); + $output .= '

    '; + if ($session{form}{keyword} ne "") { + $search = " and (username like '%".$session{form}{keyword}."%' or email like '%".$session{form}{keyword}."%') "; + } $output .= ''; - $sth = WebGUI::SQL->read("select userId,username,email from users where username<>'Reserved' order by username",$session{dbh}); + $sth = WebGUI::SQL->read("select userId,username,email from users where username<>'Reserved' $search order by username",$session{dbh}); while (@data = $sth->array) { - $row[$i] = ''; + $row[$i] = ''; #$row[$i] .= ''; $row[$i] .= ''; $row[$i] .= ''; @@ -178,15 +197,15 @@ sub www_listUsers { $output .= '
    '.$data[1].''.$data[1].''.$data[2].'
    '; $output .= '

    '; return $output; @@ -197,3 +216,4 @@ sub www_listUsers { 1; + diff --git a/lib/WebGUI/Privilege.pm b/lib/WebGUI/Privilege.pm index 1239e69e2..3171f698f 100644 --- a/lib/WebGUI/Privilege.pm +++ b/lib/WebGUI/Privilege.pm @@ -12,6 +12,7 @@ package WebGUI::Privilege; use strict; use Tie::CPHash; +use WebGUI::International; use WebGUI::Session; use WebGUI::SQL; use WebGUI::Utility; @@ -19,7 +20,9 @@ use WebGUI::Utility; #------------------------------------------------------------------- sub adminOnly { my ($output, $sth, @data); - $output = '

    Administrative Function

    You must be an administrator to perform this function. Please contact one of your administrators. The following is a list of the administrators for this system:
      '; + $output = '

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

      '; + $output .= WebGUI::International::get(36); + $output .= '
        '; $sth = WebGUI::SQL->read("select users.username, users.email from users,groupings where users.userId=groupings.userId and groupings.groupId=3 order by users.username",$session{dbh}); while (@data = $sth->array) { $output .= '
      • '.$data[0].' ('.$data[1].')'; @@ -68,7 +71,12 @@ sub canViewPage { #------------------------------------------------------------------- sub insufficient { - return '

        Permission Denied!

        You do not have sufficient privileges to perform this operation. Please log in with an account that has sufficient privileges before attempting this operation.

        '; + my ($output); + $output = '

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

        '; + $output .= WebGUI::International::get(37); + $output .= '

        '; + $output = WebGUI::Macro::process($output); + return $output; } #------------------------------------------------------------------- @@ -85,9 +93,22 @@ sub isInGroup { return $result; } +#------------------------------------------------------------------- +sub noAccess { + my ($output); + $output = '

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

        '; + $output .= WebGUI::International::get(39); + $output .= '

        '; + return $output; +} + #------------------------------------------------------------------- sub vitalComponent { - return '

        Vital Component

        You\'re attempting to remove a vital component of the WebGUI system. If you were allowed to continue WebGUI may cease to function.

        '; + my ($output); + $output = '

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

        '; + $output .= WebGUI::International::get(41); + $output .= '

        '; + return $output; } diff --git a/lib/WebGUI/SQL.pm b/lib/WebGUI/SQL.pm index 140ae2119..d0bb97bac 100644 --- a/lib/WebGUI/SQL.pm +++ b/lib/WebGUI/SQL.pm @@ -18,7 +18,8 @@ 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 -# a few tasks. +# a few tasks. And to be honest, having it separated has come in handy a few times, +# like when I started coding for databases beyond MySQL. #------------------------------------------------------------------- sub array { @@ -44,7 +45,11 @@ sub buildHash { tie %hash, "Tie::IxHash"; $sth = WebGUI::SQL->read($_[1],$_[2]); while (@data = $sth->array) { - $hash{$data[0]} = $data[1]; + if ($data[1] eq "") { + $hash{$data[0]} = $data[0]; + } else { + $hash{$data[0]} = $data[1]; + } } $sth->finish; return %hash; diff --git a/lib/WebGUI/Style.pm b/lib/WebGUI/Style.pm index 0214640e4..3357b6da3 100644 --- a/lib/WebGUI/Style.pm +++ b/lib/WebGUI/Style.pm @@ -30,9 +30,9 @@ sub getStyle { '.$session{page}{title}.' '.$style{styleSheet}.' - '.$session{page}{metaTags}.' - - + '.$session{page}{metaTags} + # .'' + .' '.$style{header}; $footer = $style{footer}.' '; diff --git a/lib/WebGUI/Widget.pm b/lib/WebGUI/Widget.pm index 8b720f581..7892558ea 100644 --- a/lib/WebGUI/Widget.pm +++ b/lib/WebGUI/Widget.pm @@ -14,6 +14,7 @@ use CGI::Carp qw(fatalsToBrowser); use DBI; use Exporter; use strict; +use WebGUI::International; use WebGUI::Session; use WebGUI::SQL; use WebGUI::Utility; @@ -66,10 +67,16 @@ sub www_cut { sub www_delete { my ($output); if (WebGUI::Privilege::canEditPage()) { - $output .= '

        Please Confirm

        '; - $output .= 'Are you certain that you wish to delete this content?

        '; - $output .= '

        Yes, I\'m sure.'; - $output .= '    No, I made a mistake.
        '; + $output = ''; + $output .= '

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

        '; + $output .= WebGUI::International::get(43); + $output .= '

        '; + $output .= '

        '; return $output; } else { return WebGUI::Privilege::insufficient(); diff --git a/lib/WebGUI/Widget/Article.pm b/lib/WebGUI/Widget/Article.pm index f17d26ce7..bf6fe3c0b 100644 --- a/lib/WebGUI/Widget/Article.pm +++ b/lib/WebGUI/Widget/Article.pm @@ -13,6 +13,7 @@ package WebGUI::Widget::Article; use strict; use Tie::CPHash; use WebGUI::DateTime; +use WebGUI::International; use WebGUI::Macro; use WebGUI::Privilege; use WebGUI::Session; @@ -28,7 +29,7 @@ sub purge { #------------------------------------------------------------------- sub widgetName { - return "Article"; + return WebGUI::International::get(172); } #------------------------------------------------------------------- @@ -36,23 +37,23 @@ sub www_add { my ($output); if (WebGUI::Privilege::canEditPage()) { $output = ''; - $output .= '

        Add '.widgetName().'

        '; + $output .= '

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

        '; $output .= '
        '; $output .= WebGUI::Form::hidden("widget","Article"); $output .= WebGUI::Form::hidden("func","addSave"); $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= '
        Title'.WebGUI::Form::text("title",20,30,'Article').'
        Display the title?'.WebGUI::Form::checkbox("displayTitle",1,1).'
        Process macros?'.WebGUI::Form::checkbox("processMacros",1,1).'
        Start Date'.WebGUI::Form::text("startDate",20,30,epochToSet(time()),1).'
        End Date'.WebGUI::Form::text("endDate",20,30,'01/01/2037',1).'
        Body'.WebGUI::Form::textArea("body",'',50,10,1).'
        Image'.WebGUI::Form::file("image").'
        Link Title'.WebGUI::Form::text("linkTitle",20,30).'
        Link URL'.WebGUI::Form::text("linkURL",20,2048).'
        Attachment'.WebGUI::Form::file("attachment").'
        Convert Carriage Returns'.WebGUI::Form::checkbox("convertCarriageReturns",1).' (check if you\'re not adding <br> manually)
        '.WebGUI::Form::submit("save").'
        '.WebGUI::International::get(99).''.WebGUI::Form::text("title",20,30,'Article').'
        '.WebGUI::International::get(174).''.WebGUI::Form::checkbox("displayTitle",1,1).'
        '.WebGUI::International::get(175).''.WebGUI::Form::checkbox("processMacros",1,1).'
        '.WebGUI::International::get(176).''.WebGUI::Form::text("startDate",20,30,epochToSet(time()),1).'
        '.WebGUI::International::get(177).''.WebGUI::Form::text("endDate",20,30,'01/01/2037',1).'
        '.WebGUI::International::get(178).''.WebGUI::Form::textArea("body",'',50,10,1).'
        '.WebGUI::International::get(179).''.WebGUI::Form::file("image").'
        '.WebGUI::International::get(180).''.WebGUI::Form::text("linkTitle",20,30).'
        '.WebGUI::International::get(181).''.WebGUI::Form::text("linkURL",20,2048).'
        '.WebGUI::International::get(182).''.WebGUI::Form::file("attachment").'
        '.WebGUI::International::get(183).''.WebGUI::Form::checkbox("convertCarriageReturns",1).' '.WebGUI::International::get(184).'
        '.WebGUI::Form::submit(WebGUI::International::get(62)).'
        '; return $output; } else { @@ -63,7 +64,7 @@ sub www_add { #------------------------------------------------------------------- sub www_addSave { - my ($widgetId, $displayTitle, $image, $attachment); + my ($widgetId, $image, $attachment); if (WebGUI::Privilege::canEditPage()) { $widgetId = create(); $image = saveAttachment("image",$widgetId); @@ -102,31 +103,31 @@ sub www_edit { if (WebGUI::Privilege::canEditPage()) { %article = WebGUI::SQL->quickHash("select * from widget,Article where widget.widgetId=Article.widgetId and widget.widgetId=$session{form}{wid}",$session{dbh}); $output = ''; - $output .= '

        Edit '.widgetName().'

        '; + $output .= '

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

        '; $output .= '
        '; $output .= WebGUI::Form::hidden("wid",$session{form}{wid}); $output .= WebGUI::Form::hidden("func","editSave"); $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; if ($article{image} ne "") { - $output .= ''; + $output .= ''; } else { - $output .= ''; + $output .= ''; } - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; if ($article{attachment} ne "") { - $output .= ''; + $output .= ''; } else { - $output .= ''; + $output .= ''; } - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; $output .= '
        Title'.WebGUI::Form::text("title",20,30,$article{title}).'
        Display the title?'.WebGUI::Form::checkbox("displayTitle","1",$article{displayTitle}).'
        Process macros?'.WebGUI::Form::checkbox("processMacros","1",$article{processMacros}).'
        Start Date'.WebGUI::Form::text("startDate",20,30,epochToSet($article{startDate}),1).'
        End Date'.WebGUI::Form::text("endDate",20,30,epochToSet($article{endDate}),1).'
        Body'.WebGUI::Form::textArea("body",$article{body},50,10,1).'
        '.WebGUI::International::get(99).''.WebGUI::Form::text("title",20,30,$article{title}).'
        '.WebGUI::International::get(174).''.WebGUI::Form::checkbox("displayTitle","1",$article{displayTitle}).'
        '.WebGUI::International::get(175).''.WebGUI::Form::checkbox("processMacros","1",$article{processMacros}).'
        '.WebGUI::International::get(176).''.WebGUI::Form::text("startDate",20,30,epochToSet($article{startDate}),1).'
        '.WebGUI::International::get(177).''.WebGUI::Form::text("endDate",20,30,epochToSet($article{endDate}),1).'
        '.WebGUI::International::get(178).''.WebGUI::Form::textArea("body",$article{body},50,10,1).'
        ImageDelete Image
        '.WebGUI::International::get(179).''.WebGUI::International::get(186).'
        Image'.WebGUI::Form::file("image").'
        '.WebGUI::International::get(179).''.WebGUI::Form::file("image").'
        Link Title'.WebGUI::Form::text("linkTitle",20,30,$article{linkTitle}).'
        Link URL'.WebGUI::Form::text("linkURL",20,2048,$article{linkURL}).'
        '.WebGUI::International::get(180).''.WebGUI::Form::text("linkTitle",20,30,$article{linkTitle}).'
        '.WebGUI::International::get(181).''.WebGUI::Form::text("linkURL",20,2048,$article{linkURL}).'
        AttachmentDelete Attachment
        '.WebGUI::International::get(182).''.WebGUI::International::get(186).'
        Attachment'.WebGUI::Form::file("attachment").'
        '.WebGUI::International::get(182).''.WebGUI::Form::file("attachment").'
        Convert Carriage Returns'.WebGUI::Form::checkbox("convertCarriageReturns",1,$article{convertCarriageReturns}).' (check if you\'re not adding <br> manually)
        '.WebGUI::Form::submit("save").'
        '.WebGUI::International::get(183).''.WebGUI::Form::checkbox("convertCarriageReturns",1,$article{convertCarriageReturns}).' '.WebGUI::International::get(184).'
        '.WebGUI::Form::submit(WebGUI::International::get(62)).'
        '; return $output; } else { @@ -136,7 +137,7 @@ sub www_edit { #------------------------------------------------------------------- sub www_editSave { - my ($widgetId, $displayTitle, $image, $attachment); + my ($image, $attachment); if (WebGUI::Privilege::canEditPage()) { update(); $image = saveAttachment("image",$session{form}{wid}); @@ -187,7 +188,5 @@ sub www_view { - - - 1; + diff --git a/lib/WebGUI/Widget/EventsCalendar.pm b/lib/WebGUI/Widget/EventsCalendar.pm index c264258da..3e3264745 100644 --- a/lib/WebGUI/Widget/EventsCalendar.pm +++ b/lib/WebGUI/Widget/EventsCalendar.pm @@ -13,6 +13,7 @@ package WebGUI::Widget::EventsCalendar; use strict; use Tie::CPHash; use WebGUI::DateTime; +use WebGUI::International; use WebGUI::Macro; use WebGUI::Privilege; use WebGUI::Session; @@ -28,22 +29,24 @@ sub purge { #------------------------------------------------------------------- sub widgetName { - return "Events Calendar"; + return WebGUI::International::get(187); } #------------------------------------------------------------------- sub www_add { my ($output); if (WebGUI::Privilege::canEditPage()) { - $output = '

        Add Events Calendar

        '; + $output = ''; + $output .= '

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

        '; + $output .= ''; $output .= WebGUI::Form::hidden("widget","EventsCalendar"); $output .= WebGUI::Form::hidden("func","addSave"); $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= '
        Title'.WebGUI::Form::text("title",20,30,'Events Calendar').'
        Display the title?'.WebGUI::Form::checkbox("displayTitle",1).'
        Process macros?'.WebGUI::Form::checkbox("processMacros",1).'
        Description'.WebGUI::Form::textArea("description").'
        '.WebGUI::Form::submit("save").'
        '.WebGUI::International::get(99).''.WebGUI::Form::text("title",20,30,'Events Calendar').'
        '.WebGUI::International::get(174).''.WebGUI::Form::checkbox("displayTitle",1).'
        '.WebGUI::International::get(175).''.WebGUI::Form::checkbox("processMacros",1).'
        '.WebGUI::International::get(85).''.WebGUI::Form::textArea("description").'
        '.WebGUI::Form::submit(WebGUI::International::get(62)).'
        '; return $output; } else { @@ -67,19 +70,23 @@ sub www_addSave { sub www_addEvent { my ($output, $today, %recursEvery); tie %recursEvery, 'Tie::IxHash'; - %recursEvery = ('never'=>'Happens Only Once','day'=>'Day','week'=>'Week'); + %recursEvery = ('never'=>WebGUI::International::get(189), + 'day'=>WebGUI::International::get(190), + 'week'=>WebGUI::International::get(191) + ); if (WebGUI::Privilege::canEditPage()) { ($today) = epochToSet(time()); - $output = '

        Add Event

        '; + $output = '

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

        '; + $output .= ''; $output .= WebGUI::Form::hidden("wid",$session{form}{wid}); $output .= WebGUI::Form::hidden("func","addEventSave"); $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= '
        Name'.WebGUI::Form::text("name",20,30).'
        Description'.WebGUI::Form::textArea("description",'',50,10,1).'
        Start Date'.WebGUI::Form::text("startDate",20,30,$today,1).'
        End Date'.WebGUI::Form::text("endDate",20,30,$today,1).'
        Recurs every'.WebGUI::Form::selectList("recursEvery",\%recursEvery).' until '.WebGUI::Form::text("until",20,30,$today,1).'
        '.WebGUI::Form::submit("save").'
        '.WebGUI::International::get(99).''.WebGUI::Form::text("name",20,30).'
        '.WebGUI::International::get(85).''.WebGUI::Form::textArea("description",'',50,10,1).'
        '.WebGUI::International::get(176).''.WebGUI::Form::text("startDate",20,30,$today,1,'onBlur="this.form.endDate.value=this.form.startDate.value;this.form.until.value=this.form.startDate.value;"').'
        '.WebGUI::International::get(177).''.WebGUI::Form::text("endDate",20,30,$today,1).'
        '.WebGUI::International::get(193).''.WebGUI::Form::selectList("recursEvery",\%recursEvery).' '.WebGUI::International::get(194).' '.WebGUI::Form::text("until",20,30,$today,1).'
        '.WebGUI::Form::submit(WebGUI::International::get(62)).'
        '; return $output; } else { @@ -130,12 +137,12 @@ sub www_addEventSave { sub www_deleteEvent { my ($output); if (WebGUI::Privilege::canEditPage()) { - $output = '

        Please Confirm

        '; - $output .= 'Are you certain that you want to delete this event'; + $output = '

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

        '; + $output .= WebGUI::International::get(195); if ($session{form}{rid} > 0) { - $output .= ' and all of its recurring events'; + $output .= ' '.WebGUI::International::get(196); } - $output .= '?

        '; + $output .= '?

        '; return $output; } else { return WebGUI::Privilege::insufficient(); @@ -163,15 +170,17 @@ sub www_edit { tie %data, 'Tie::CPHash'; if (WebGUI::Privilege::canEditPage()) { %data = WebGUI::SQL->quickHash("select * from widget where widget.widgetId=$session{form}{wid}",$session{dbh}); - $output = '

        Edit Events Calendar

        '; + $output = ''; + $output .= '

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

        '; + $output .= ''; $output .= WebGUI::Form::hidden("wid",$session{form}{wid}); $output .= WebGUI::Form::hidden("func","editSave"); $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= '
        Title'.WebGUI::Form::text("title",20,30,$data{title}).'
        Display the title?'.WebGUI::Form::checkbox("displayTitle",1,$data{displayTitle}).'
        Process macros?'.WebGUI::Form::checkbox("processMacros",1,$data{processMacros}).'
        Description'.WebGUI::Form::textArea("description",$data{description}).'
        '.WebGUI::Form::submit("save").'
        '.WebGUI::International::get(99).''.WebGUI::Form::text("title",20,30,$data{title}).'
        '.WebGUI::International::get(174).''.WebGUI::Form::checkbox("displayTitle",1,$data{displayTitle}).'
        '.WebGUI::International::get(175).''.WebGUI::Form::checkbox("processMacros",1,$data{processMacros}).'
        '.WebGUI::International::get(85).''.WebGUI::Form::textArea("description",$data{description}).'
        '.WebGUI::Form::submit(WebGUI::International::get(62)).'
        '; $output .= '

        Add New Event

        '; $output .= ''; @@ -203,17 +212,18 @@ sub www_editEvent { tie %event, 'Tie::CPHash'; if (WebGUI::Privilege::canEditPage()) { %event = WebGUI::SQL->quickHash("select * from event where eventId='$session{form}{eid}'",$session{dbh}); - $output = '

        Edit Event

        '; + $output = '

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

        '; + $output .= ''; $output .= WebGUI::Form::hidden("wid",$session{form}{wid}); $output .= WebGUI::Form::hidden("eid",$session{form}{eid}); $output .= WebGUI::Form::hidden("func","editEventSave"); $output .= '
        '; - $output .= '' + $output .= '' ; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= '
        Name'.WebGUI::Form::text("name",20,30,$event{name}).'
        '.WebGUI::International::get(99).''.WebGUI::Form::text("name",20,30,$event{name}).'
        Description'.WebGUI::Form::textArea("description",$event{description},50,10,1).'
        Start Date'.WebGUI::Form::text("startDate",20,30,epochToSet($event{startDate}),1).'
        End Date'.WebGUI::Form::text("endDate",20,30,epochToSet($event{endDate}),1).'
        '.WebGUI::Form::submit("save").'
        '.WebGUI::International::get(85).''.WebGUI::Form::textArea("description",$event{description},50,10,1).'
        '.WebGUI::International::get(176).''.WebGUI::Form::text("startDate",20,30,epochToSet($event{startDate}),1).'
        '.WebGUI::International::get(177).''.WebGUI::Form::text("endDate",20,30,epochToSet($event{endDate}),1).'
        '.WebGUI::Form::submit(WebGUI::International::get(62)).'
        '; return $output; } else { diff --git a/lib/WebGUI/Widget/ExtraColumn.pm b/lib/WebGUI/Widget/ExtraColumn.pm index ffd76e522..ac5f06d42 100644 --- a/lib/WebGUI/Widget/ExtraColumn.pm +++ b/lib/WebGUI/Widget/ExtraColumn.pm @@ -12,6 +12,7 @@ package WebGUI::Widget::ExtraColumn; use strict; use Tie::CPHash; +use WebGUI::International; use WebGUI::Privilege; use WebGUI::Session; use WebGUI::SQL; @@ -26,22 +27,24 @@ sub purge { #------------------------------------------------------------------- sub widgetName { - return "Extra Column"; + return WebGUI::International::get(199); } #------------------------------------------------------------------- sub www_add { my ($output); if (WebGUI::Privilege::canEditPage()) { - $output = '

        Add Column

        '; + $output = ''; + $output .= '

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

        '; + $output .= ''; $output .= WebGUI::Form::hidden("widget","ExtraColumn"); $output .= WebGUI::Form::hidden("func","addSave"); $output .= WebGUI::Form::hidden("title","column"); $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= '
        Spacer'.WebGUI::Form::text("spacer",20,3,10).'
        Width'.WebGUI::Form::text("width",20,3,200).'
        StyleSheet Class'.WebGUI::Form::text("class",20,50,"content").'
        '.WebGUI::Form::submit("save").'
        '.WebGUI::International::get(201).''.WebGUI::Form::text("spacer",20,3,10).'
        '.WebGUI::International::get(202).''.WebGUI::Form::text("width",20,3,200).'
        '.WebGUI::International::get(203).''.WebGUI::Form::text("class",20,50,"content").'
        '.WebGUI::Form::submit(WebGUI::International::get(62)).'
        '; return $output; } else { @@ -68,15 +71,17 @@ sub www_edit { tie %data, 'Tie::CPHash'; if (WebGUI::Privilege::canEditPage()) { %data = WebGUI::SQL->quickHash("select * from ExtraColumn where widgetId=$session{form}{wid}",$session{dbh}); - $output = '

        Edit Column

        '; + $output = ''; + $output .= '

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

        '; + $output .= ''; $output .= WebGUI::Form::hidden("wid",$session{form}{wid}); $output .= WebGUI::Form::hidden("func","editSave"); $output .= WebGUI::Form::hidden("title","column"); $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= '
        Spacer'.WebGUI::Form::text("spacer",20,3,$data{spacer}).'
        Width'.WebGUI::Form::text("width",20,3,$data{width}).'
        StyleSheet Class'.WebGUI::Form::text("class",20,30,$data{class}).'
        '.WebGUI::Form::submit("save").'
        '.WebGUI::International::get(201).''.WebGUI::Form::text("spacer",20,3,$data{spacer}).'
        '.WebGUI::International::get(202).''.WebGUI::Form::text("width",20,3,$data{width}).'
        '.WebGUI::International::get(203).''.WebGUI::Form::text("class",20,30,$data{class}).'
        '.WebGUI::Form::submit(WebGUI::International::get(204)).'
        '; return $output; } else { diff --git a/lib/WebGUI/Widget/FAQ.pm b/lib/WebGUI/Widget/FAQ.pm index 739a962ac..3369f4005 100644 --- a/lib/WebGUI/Widget/FAQ.pm +++ b/lib/WebGUI/Widget/FAQ.pm @@ -12,6 +12,7 @@ package WebGUI::Widget::FAQ; use strict; use Tie::CPHash; +use WebGUI::International; use WebGUI::Macro; use WebGUI::Privilege; use WebGUI::Session; @@ -38,22 +39,24 @@ sub purge { #------------------------------------------------------------------- sub widgetName { - return "F.A.Q."; + return WebGUI::International::get(205); } #------------------------------------------------------------------- sub www_add { my ($output); if (WebGUI::Privilege::canEditPage()) { - $output = '

        Add F.A.Q.

        '; + $output = ''; + $output = '

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

        '; + $output .= ''; $output .= WebGUI::Form::hidden("widget","FAQ"); $output .= WebGUI::Form::hidden("func","addSave"); $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= '
        Title'.WebGUI::Form::text("title",20,30,'F.A.Q.').'
        Display the title?'.WebGUI::Form::checkbox("displayTitle",1,1).'
        Process Macros?'.WebGUI::Form::checkbox("processMacros",1,1).'
        Description'.WebGUI::Form::textArea("description").'
        '.WebGUI::Form::submit("save").'
        '.WebGUI::International::get(99).''.WebGUI::Form::text("title",20,30,'F.A.Q.').'
        '.WebGUI::International::get(174).''.WebGUI::Form::checkbox("displayTitle",1,1).'
        '.WebGUI::International::get(175).''.WebGUI::Form::checkbox("processMacros",1,1).'
        '.WebGUI::International::get(85).''.WebGUI::Form::textArea("description").'
        '.WebGUI::Form::submit(WebGUI::International::get(62)).'
        '; return $output; } else { @@ -77,13 +80,14 @@ sub www_addSave { sub www_addQuestion { my ($output); if (WebGUI::Privilege::canEditPage()) { - $output = '

        Add Question

        '; + $output = '

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

        '; + $output .= ''; $output .= WebGUI::Form::hidden("wid",$session{form}{wid}); $output .= WebGUI::Form::hidden("func","addQuestionSave"); $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= '
        Question'.WebGUI::Form::textArea("question",'',50,3).'
        Answer'.WebGUI::Form::textArea("answer").'
        '.WebGUI::Form::submit("save").'
        '.WebGUI::International::get(208).''.WebGUI::Form::textArea("question",'',50,3).'
        '.WebGUI::International::get(209).''.WebGUI::Form::textArea("answer").'
        '.WebGUI::Form::submit(WebGUI::International::get(62)).'
        '; return $output; } else { @@ -109,8 +113,10 @@ sub www_addQuestionSave { sub www_deleteQuestion { my ($output); if (WebGUI::Privilege::canEditPage()) { - $output = '

        Please Confirm

        '; - $output .= 'Are you certain that you want to delete this question?

        '; + $output = '

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

        '; + $output .= WebGUI::International::get(210).'

        '; + $output .= '

        '; return $output; } else { return WebGUI::Privilege::insufficient(); @@ -135,17 +141,19 @@ sub www_edit { tie %data, 'Tie::CPHash'; if (WebGUI::Privilege::canEditPage()) { %data = WebGUI::SQL->quickHash("select * from widget where widget.widgetId=$session{form}{wid}",$session{dbh}); - $output = '

        Edit Link List

        '; + $output = ''; + $output = '

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

        '; + $output .= ''; $output .= WebGUI::Form::hidden("wid",$session{form}{wid}); $output .= WebGUI::Form::hidden("func","editSave"); $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= '
        Title'.WebGUI::Form::text("title",20,30,$data{title}).'
        Display the title?'.WebGUI::Form::checkbox("displayTitle","1",$data{displayTitle}).'
        Process macros?'.WebGUI::Form::checkbox("processMacros","1",$data{processMacros}).'
        Description'.WebGUI::Form::textArea("description",$data{description}).'
        '.WebGUI::Form::submit("save").'
        '.WebGUI::International::get(99).''.WebGUI::Form::text("title",20,30,$data{title}).'
        '.WebGUI::International::get(174).''.WebGUI::Form::checkbox("displayTitle","1",$data{displayTitle}).'
        '.WebGUI::International::get(175).''.WebGUI::Form::checkbox("processMacros","1",$data{processMacros}).'
        '.WebGUI::International::get(85).''.WebGUI::Form::textArea("description",$data{description}).'
        '.WebGUI::Form::submit(WebGUI::International::get(62)).'
        '; - $output .= '

        Add New Question

        '; + $output .= '

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

        '; $output .= ''; $sth = WebGUI::SQL->read("select questionId,question from faqQuestion where widgetId='$session{form}{wid}' order by sequenceNumber",$session{dbh}); while (@question = $sth->array) { @@ -175,14 +183,15 @@ sub www_editQuestion { tie %question, 'Tie::CPHash'; if (WebGUI::Privilege::canEditPage()) { %question = WebGUI::SQL->quickHash("select * from faqQuestion where questionId='$session{form}{qid}'",$session{dbh}); - $output = '

        Edit Question

        '; + $output = '

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

        '; + $output .= ''; $output .= WebGUI::Form::hidden("wid",$session{form}{wid}); $output .= WebGUI::Form::hidden("qid",$session{form}{qid}); $output .= WebGUI::Form::hidden("func","editQuestionSave"); $output .= '
        '; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= '
        Question'.WebGUI::Form::textArea("question",$question{question},50,3).'
        Answer'.WebGUI::Form::textArea("answer",$question{answer}).'
        '.WebGUI::Form::submit("save").'
        '.WebGUI::International::get(208).''.WebGUI::Form::textArea("question",$question{question},50,3).'
        '.WebGUI::International::get(209).''.WebGUI::Form::textArea("answer",$question{answer}).'
        '.WebGUI::Form::submit(WebGUI::International::get(62)).'
        '; return $output; } else { diff --git a/lib/WebGUI/Widget/LinkList.pm b/lib/WebGUI/Widget/LinkList.pm index c1168fbff..c2427f8ca 100644 --- a/lib/WebGUI/Widget/LinkList.pm +++ b/lib/WebGUI/Widget/LinkList.pm @@ -12,6 +12,7 @@ package WebGUI::Widget::LinkList; use strict; use Tie::CPHash; +use WebGUI::International; use WebGUI::Macro; use WebGUI::Privilege; use WebGUI::Session; @@ -38,22 +39,24 @@ sub purge { #------------------------------------------------------------------- sub widgetName { - return "Link List"; + return WebGUI::International::get(214); } #------------------------------------------------------------------- sub www_add { my ($output); if (WebGUI::Privilege::canEditPage()) { - $output = '

        Add Link List

        '; + $output = ''; + $output .= '

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

        '; + $output .= ''; $output .= WebGUI::Form::hidden("widget","LinkList"); $output .= WebGUI::Form::hidden("func","addSave"); $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= '
        Title'.WebGUI::Form::text("title",20,30,'Link List').'
        Display the title?'.WebGUI::Form::checkbox("displayTitle",1,1).'
        Process macros?'.WebGUI::Form::checkbox("processMacros",1).'
        Description'.WebGUI::Form::textArea("description").'
        '.WebGUI::Form::submit("save").'
        '.WebGUI::International::get(99).''.WebGUI::Form::text("title",20,30,'Link List').'
        '.WebGUI::International::get(175).''.WebGUI::Form::checkbox("displayTitle",1,1).'
        '.WebGUI::International::get(176).''.WebGUI::Form::checkbox("processMacros",1).'
        '.WebGUI::International::get(85).''.WebGUI::Form::textArea("description").'
        '.WebGUI::Form::submit(WebGUI::International::get(62)).'
        '; return $output; } else { @@ -77,14 +80,15 @@ sub www_addSave { sub www_addLink { my ($output); if (WebGUI::Privilege::canEditPage()) { - $output = '

        Add Link

        '; + $output = '

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

        '; + $output .= ''; $output .= WebGUI::Form::hidden("wid",$session{form}{wid}); $output .= WebGUI::Form::hidden("func","addLinkSave"); $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= '
        Name'.WebGUI::Form::text("name",20,30).'
        URL'.WebGUI::Form::text("url",20,1024).'
        Description'.WebGUI::Form::textArea("description",'',50,10).'
        '.WebGUI::Form::submit("save").'
        '.WebGUI::International::get(99).''.WebGUI::Form::text("name",20,30).'
        '.WebGUI::International::get(216).''.WebGUI::Form::text("url",20,1024).'
        '.WebGUI::International::get(85).''.WebGUI::Form::textArea("description",'',50,10).'
        '.WebGUI::Form::submit(WebGUI::International::get(62)).'
        '; return $output; } else { @@ -110,8 +114,10 @@ sub www_addLinkSave { sub www_deleteLink { my ($output); if (WebGUI::Privilege::canEditPage()) { - $output = '

        Please Confirm

        '; - $output .= 'Are you certain that you want to delete this link?

        '; + $output = '

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

        '; + $output .= WebGUI::International::get(217).'

        '; + $output .= '

        '; return $output; } else { return WebGUI::Privilege::insufficient(); @@ -136,17 +142,19 @@ sub www_edit { tie %data, 'Tie::CPHash'; if (WebGUI::Privilege::canEditPage()) { %data = WebGUI::SQL->quickHash("select * from widget where widget.widgetId=$session{form}{wid}",$session{dbh}); - $output = '

        Edit Link List

        '; + $output = ''; + $output .= '

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

        '; + $output .= ''; $output .= WebGUI::Form::hidden("wid",$session{form}{wid}); $output .= WebGUI::Form::hidden("func","editSave"); $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= '
        Title'.WebGUI::Form::text("title",20,30,$data{title}).'
        Display the title?'.WebGUI::Form::checkbox("displayTitle",1,$data{displayTitle}).'
        Process macros?'.WebGUI::Form::checkbox("processMacros",1,$data{processMacros}).'
        Description'.WebGUI::Form::textArea("description",$data{description}).'
        '.WebGUI::Form::submit("save").'
        '.WebGUI::International::get(99).''.WebGUI::Form::text("title",20,30,$data{title}).'
        '.WebGUI::International::get(175).''.WebGUI::Form::checkbox("displayTitle",1,$data{displayTitle}).'
        '.WebGUI::International::get(176).''.WebGUI::Form::checkbox("processMacros",1,$data{processMacros}).'
        '.WebGUI::International::get(85).''.WebGUI::Form::textArea("description",$data{description}).'
        '.WebGUI::Form::submit(WebGUI::International::get(62)).'
        '; - $output .= '

        Add New Link

        '; + $output .= '

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

        '; $output .= ''; $sth = WebGUI::SQL->read("select linkId, name from link where widgetId='$session{form}{wid}' order by sequenceNumber",$session{dbh}); while (@link = $sth->array) { @@ -176,15 +184,16 @@ sub www_editLink { tie %link, 'Tie::CPHash'; if (WebGUI::Privilege::canEditPage()) { %link = WebGUI::SQL->quickHash("select name, url, description from link where linkId='$session{form}{lid}'",$session{dbh}); - $output = '

        Edit Link

        '; + $output = '

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

        '; + $output .= ''; $output .= WebGUI::Form::hidden("wid",$session{form}{wid}); $output .= WebGUI::Form::hidden("lid",$session{form}{lid}); $output .= WebGUI::Form::hidden("func","editLinkSave"); $output .= '
        '; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= '
        Name'.WebGUI::Form::text("name",20,30,$link{name}).'
        URL'.WebGUI::Form::text("url",20,2048,$link{url}).'
        Description'.WebGUI::Form::textArea("description",$link{description},50,10).'
        '.WebGUI::Form::submit("save").'
        '.WebGUI::International::get(99).''.WebGUI::Form::text("name",20,30,$link{name}).'
        '.WebGUI::International::get(216).''.WebGUI::Form::text("url",20,2048,$link{url}).'
        '.WebGUI::International::get(85).''.WebGUI::Form::textArea("description",$link{description},50,10).'
        '.WebGUI::Form::submit(WebGUI::International::get(62)).'
        '; return $output; } else { diff --git a/lib/WebGUI/Widget/MessageBoard.pm b/lib/WebGUI/Widget/MessageBoard.pm index 0229fb76a..fcb93fbb7 100644 --- a/lib/WebGUI/Widget/MessageBoard.pm +++ b/lib/WebGUI/Widget/MessageBoard.pm @@ -13,6 +13,8 @@ package WebGUI::Widget::MessageBoard; use strict; use Tie::CPHash; use WebGUI::DateTime; +use WebGUI::International; +use WebGUI::Macro; use WebGUI::Privilege; use WebGUI::Session; use WebGUI::SQL; @@ -23,7 +25,7 @@ use WebGUI::Widget; sub _getBoardProperties { my (%board); tie %board, 'Tie::CPHash'; - %board = WebGUI::SQL->quickHash("select widget.title, widget.displayTitle, widget.description, MessageBoard.groupToPost, MessageBoard.messagesPerPage, MessageBoard.editTimeout from widget, MessageBoard where widget.widgetId=MessageBoard.widgetId and widget.widgetId=$_[0]",$session{dbh}); + %board = WebGUI::SQL->quickHash("select * from widget, MessageBoard where widget.widgetId=MessageBoard.widgetId and widget.widgetId=$_[0]",$session{dbh}); return %board; } @@ -55,7 +57,7 @@ sub purge { #------------------------------------------------------------------- sub widgetName { - return "Message Board"; + return WebGUI::International::get(223); } #------------------------------------------------------------------- @@ -63,18 +65,21 @@ sub www_add { my ($output, %hash); tie %hash, "Tie::IxHash"; if (WebGUI::Privilege::canEditPage()) { - $output = '

        Add Message Board

        '; + $output = ''; + $output .= '

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

        '; + $output .= ''; $output .= WebGUI::Form::hidden("widget","MessageBoard"); $output .= WebGUI::Form::hidden("func","addSave"); $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; %hash = WebGUI::SQL->buildHash("select groupId,groupName from groups where groupName<>'Reserved' order by groupName",$session{dbh}); - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= '
        Title'.WebGUI::Form::text("title",20,30,'Message Board').'
        Display the title?'.WebGUI::Form::checkbox("displayTitle",1,1).'
        Description'.WebGUI::Form::textArea("description",'').'
        '.WebGUI::International::get(99).''.WebGUI::Form::text("title",20,30,'Message Board').'
        '.WebGUI::International::get(175).''.WebGUI::Form::checkbox("displayTitle",1,1).'
        '.WebGUI::International::get(176).''.WebGUI::Form::checkbox("processMacros",1).'
        '.WebGUI::International::get(85).''.WebGUI::Form::textArea("description",'').'
        Who can post?'.WebGUI::Form::selectList("groupToPost",\%hash,'',1).'
        Messages Per Page'.WebGUI::Form::text("messagesPerPage",20,2,30).'
        Edit Timeout'.WebGUI::Form::text("editTimeout",20,3,1).'
        '.WebGUI::Form::submit("save").'
        '.WebGUI::International::get(224).''.WebGUI::Form::selectList("groupToPost",\%hash,'',1).'
        '.WebGUI::International::get(225).''.WebGUI::Form::text("messagesPerPage",20,2,30).'
        '.WebGUI::International::get(226).''.WebGUI::Form::text("editTimeout",20,3,1).'
        '.WebGUI::Form::submit(WebGUI::International::get(62)).'
        '; return $output; } else { @@ -102,19 +107,22 @@ sub www_edit { if (WebGUI::Privilege::canEditPage()) { tie %board, 'Tie::CPHash'; %board = _getBoardProperties($session{form}{wid}); - $output = '

        Edit Message Board

        '; + $output = ''; + $output .= '

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

        '; + $output .= ''; $output .= WebGUI::Form::hidden("wid",$session{form}{wid}); $output .= WebGUI::Form::hidden("func","editSave"); $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; %hash = WebGUI::SQL->buildHash("select groupId,groupName from groups where groupName<>'Reserved' order by groupName",$session{dbh}); $array[0] = $board{groupToPost}; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= '
        Title'.WebGUI::Form::text("title",20,30,$board{title}).'
        Display the title?'.WebGUI::Form::checkbox("displayTitle","1",$board{displayTitle}).'
        Description'.WebGUI::Form::textArea("description",$board{description}).'
        '.WebGUI::International::get(99).''.WebGUI::Form::text("title",20,30,$board{title}).'
        '.WebGUI::International::get(175).''.WebGUI::Form::checkbox("displayTitle","1",$board{displayTitle}).'
        '.WebGUI::International::get(176).''.WebGUI::Form::checkbox("processMacros","1",$board{processMacros}).'
        '.WebGUI::International::get(85).''.WebGUI::Form::textArea("description",$board{description}).'
        Who can post?'.WebGUI::Form::selectList("groupToPost",\%hash,\@array,1).'
        Messages Per Page'.WebGUI::Form::text("messagesPerPage",20,2,$board{messagesPerPage}).'
        Edit Timeout'.WebGUI::Form::text("editTimeout",20,2,$board{editTimeout}).'
        '.WebGUI::Form::submit("save").'
        '.WebGUI::International::get(224).''.WebGUI::Form::selectList("groupToPost",\%hash,\@array,1).'
        '.WebGUI::International::get(225).''.WebGUI::Form::text("messagesPerPage",20,2,$board{messagesPerPage}).'
        '.WebGUI::International::get(226).''.WebGUI::Form::text("editTimeout",20,2,$board{editTimeout}).'
        '.WebGUI::Form::submit(WebGUI::International::get(62)).'
        '; return $output; } else { @@ -146,14 +154,14 @@ sub www_editMessage { if ($board{displayTitle}) { $html .= $board{title}; } - $html .= '
    Editing Message...
    '; + $html .= '
    '.WebGUI::International::get(228).'
    '; $html .= '
    '; $html .= WebGUI::Form::hidden("func","editMessageSave"); $html .= WebGUI::Form::hidden("wid",$session{form}{wid}); $html .= WebGUI::Form::hidden("mid",$session{form}{mid}); - $html .= ''; - $html .= ''; - $html .= ''; + $html .= ''; + $html .= ''; + $html .= ''; $html .= '
    Subject'.WebGUI::Form::text("subject",30,255,$message{subject}).'
    Message'.WebGUI::Form::textArea("message",$message{message},50,6,1).'
    '.WebGUI::Form::submit("Save This Edit").'
    '.WebGUI::International::get(229).''.WebGUI::Form::text("subject",30,255,$message{subject}).'
    '.WebGUI::International::get(230).''.WebGUI::Form::textArea("message",$message{message},50,6,1).'
    '.WebGUI::Form::submit(WebGUI::International::get(62)).'
    '; $html .= www_showMessage(); } else { @@ -169,10 +177,10 @@ sub www_editMessageSave { %board = _getBoardProperties($session{form}{wid}); if (WebGUI::Privilege::isInGroup($board{groupToPost},$session{user}{userId})) { if ($session{form}{subject} eq "") { - $session{form}{subject} = 'no subject'; + $session{form}{subject} = WebGUI::International::get(232); } if ($session{form}{message} eq "") { - $session{form}{subject} .= ' (eom)'; + $session{form}{subject} .= ' '.WebGUI::International::get(233); } WebGUI::SQL->write("update message set subject=".quote($session{form}{subject}).", message=".quote("\n --- (Edited at ".localtime(time).") --- \n\n".$session{form}{message})." where messageId=$session{form}{mid}",$session{dbh}); return www_showMessage(); @@ -191,13 +199,13 @@ sub www_postNewMessage { if ($board{displayTitle}) { $html .= $board{title}; } - $html .= '
    Posting New Message...
    '; + $html .= ''.WebGUI::International::get(231).''; $html .= '
    '; $html .= WebGUI::Form::hidden("func","postNewMessageSave"); $html .= WebGUI::Form::hidden("wid",$session{form}{wid}); - $html .= ''; - $html .= ''; - $html .= ''; + $html .= ''; + $html .= ''; + $html .= ''; $html .= '
    Subject'.WebGUI::Form::text("subject",30,255).'
    Message'.WebGUI::Form::textArea("message",'',50,6,1).'
    '.WebGUI::Form::submit("Post This Message").'
    '.WebGUI::International::get(229).''.WebGUI::Form::text("subject",30,255).'
    '.WebGUI::International::get(230).''.WebGUI::Form::textArea("message",'',50,6,1).'
    '.WebGUI::Form::submit(WebGUI::International::get(62)).'
    '; } else { $html = WebGUI::Privilege::insufficient(); @@ -212,10 +220,10 @@ sub www_postNewMessageSave { %board = _getBoardProperties($session{form}{wid}); if (WebGUI::Privilege::isInGroup($board{groupToPost},$session{user}{userId})) { if ($session{form}{subject} eq "") { - $session{form}{subject} = 'no subject'; + $session{form}{subject} = WebGUI::International::get(232); } if ($session{form}{message} eq "") { - $session{form}{subject} .= ' (eom)'; + $session{form}{subject} .= ' '.WebGUI::International::get(233); } $mid = getNextId("messageId"); WebGUI::SQL->write("insert into message values ($mid, $mid, $session{form}{wid}, 0, $session{user}{userId}, ".quote($session{user}{username}).", ".quote($session{form}{subject}).", ".quote($session{form}{message}).", ".time().")",$session{dbh}); @@ -237,14 +245,14 @@ sub www_postReply { if ($board{displayTitle}) { $html .= $board{title}; } - $html .= 'Posting Reply...'; + $html .= ''.WebGUI::International::get(234).''; $html .= '
    '; $html .= WebGUI::Form::hidden("func","postReplySave"); $html .= WebGUI::Form::hidden("wid",$session{form}{wid}); $html .= WebGUI::Form::hidden("mid",$session{form}{mid}); - $html .= ''; - $html .= ''; - $html .= ''; + $html .= ''; + $html .= ''; + $html .= ''; $html .= '
    Subject'.WebGUI::Form::text("subject",30,255,$subject).'
    Message'.WebGUI::Form::textArea("message",'',50,6,1).'
    '.WebGUI::Form::submit("Post This Reply").'
    '.WebGUI::International::get(229).''.WebGUI::Form::text("subject",30,255,$subject).'
    '.WebGUI::International::get(230).''.WebGUI::Form::textArea("message",'',50,6,1).'
    '.WebGUI::Form::submit(WebGUI::International::get(62)).'
    '; $html .= www_showMessage(); } else { @@ -260,10 +268,10 @@ sub www_postReplySave { %board = _getBoardProperties($session{form}{wid}); if (WebGUI::Privilege::isInGroup($board{groupToPost},$session{user}{userId})) { if ($session{form}{subject} eq "") { - $session{form}{subject} = 'no subject'; + $session{form}{subject} = WebGUI::International::get(232); } if ($session{form}{message} eq "") { - $session{form}{subject} .= ' (eom)'; + $session{form}{subject} .= ' '.WebGUI::International::get(233); } $mid = getNextId("messageId"); ($rid) = WebGUI::SQL->quickArray("select rid from message where messageId=$session{form}{mid}",$session{dbh}); @@ -287,14 +295,14 @@ sub www_showMessage { } $html .= ''; if ((time()-$message{dateOfPost}) < 3600*$board{editTimeout} && $message{'userId'} eq $session{user}{userId}) { - $html .= 'Edit Message · '; + $html .= ''.WebGUI::International::get(235).' · '; } - $html .= 'Post Reply'; + $html .= ''.WebGUI::International::get(236).''; $html .= ''; $html .= '
    '; - $html .= "Subject: ".$message{subject}."
    "; - $html .= "Author: ".$message{username}."
    "; - $html .= "Date: ".epochToHuman($message{dateOfPost},"%w, %c %D, %y at %H:%n%p")."
    "; - $html .= "Message ID: ".$message{widgetId}."-".$message{rid}."-".$message{pid}."-".$message{messageId}."
    "; + $html .= "".WebGUI::International::get(237)." ".$message{subject}."
    "; + $html .= "".WebGUI::International::get(238)." ".$message{username}."
    "; + $html .= "".WebGUI::International::get(239)." ".epochToHuman($message{dateOfPost},"%w, %c %D, %y at %H:%n%p")."
    "; + $html .= "".WebGUI::International::get(240)." ".$message{widgetId}."-".$message{rid}."-".$message{pid}."-".$message{messageId}."
    "; $html .= '
    '; $message{message} =~ s/\n/\/g; @@ -302,19 +310,19 @@ sub www_showMessage { $html .= '

    '; @data = WebGUI::SQL->quickArray("select max(messageId) from message where widgetId=$message{widgetId} and pid=0 and messageId<$message{rid}",$session{dbh}); if ($data[0] ne "") { - $html .= '« Previous Thread'; + $html .= '« '.WebGUI::International::get(241).''; } else { - $html .= '« Previous Thread'; + $html .= '« '.WebGUI::International::get(241).''; } - $html .= ' · Back To Message List · '; + $html .= ' · '.WebGUI::International::get(242).' · '; @data = WebGUI::SQL->quickArray("select min(messageId) from message where widgetId=$message{widgetId} and pid=0 and messageId>$message{rid}",$session{dbh}); if ($data[0] ne "") { - $html .= 'Next Thread »'; + $html .= ''.WebGUI::International::get(243).' »'; } else { - $html .= 'Next Thread »'; + $html .= WebGUI::International::get(243).' »'; } $html .= '
    '; - $html .= ''; + $html .= ''; @data = WebGUI::SQL->quickArray("select messageId,subject,username,dateOfPost from message where messageId=$message{rid}",$session{dbh}); $html .= ''; } + if ($board{processMacros}) { + $html = WebGUI::Macro::process($html); + } $html .= '
    SubjectAuthorDate
    '.WebGUI::International::get(229).''.WebGUI::International::get(244).''.WebGUI::International::get(245).'
    '; if ($board{displayTitle}) { $html .= $board{title}; } - $html .= 'Post New Message
    '; + $html .= ''.WebGUI::International::get(246).''; $html .= ''; - $html .= ''; + $html .= ''; #$sth = WebGUI::SQL->read("select messageId,subject,count(*)-1,username,dateOfPost,max(dateOfPost),max(messageId) from message where widgetId=$_[0] group by rid order by messageId desc", $session{dbh}); $sth = WebGUI::SQL->read("select messageId,subject,username,dateOfPost from message where widgetId=$_[0] and pid=0 order by messageId desc", $session{dbh}); while (@data = $sth->array) { @@ -360,15 +371,15 @@ sub www_view { $html .= '
    SubjectAuthorThread StartedRepliesLast Reply
    '.WebGUI::International::get(229).''.WebGUI::International::get(244).''.WebGUI::International::get(247).''.WebGUI::International::get(248).''.WebGUI::International::get(249).'
    '; $html .= ''; return $html; diff --git a/lib/WebGUI/Widget/Poll.pm b/lib/WebGUI/Widget/Poll.pm index 3b851031e..8d5b9db76 100644 --- a/lib/WebGUI/Widget/Poll.pm +++ b/lib/WebGUI/Widget/Poll.pm @@ -12,6 +12,7 @@ package WebGUI::Widget::Poll; use strict; use Tie::CPHash; +use WebGUI::International; use WebGUI::Privilege; use WebGUI::Session; use WebGUI::SQL; @@ -86,7 +87,7 @@ sub purge { #------------------------------------------------------------------- sub widgetName { - return "Poll"; + return WebGUI::International::get(250); } #------------------------------------------------------------------- @@ -94,20 +95,23 @@ sub www_add { my ($output, %hash); tie %hash, "Tie::IxHash"; if (WebGUI::Privilege::canEditPage()) { - $output = '

    Add Poll

    '; + $output = ''; + $output .= '

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

    '; + $output .= ''; $output .= WebGUI::Form::hidden("widget","Poll"); $output .= WebGUI::Form::hidden("func","addSave"); $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; %hash = WebGUI::SQL->buildHash("select groupId,groupName from groups where groupName<>'Reserved' order by groupName",$session{dbh}); - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= '
    Title'.WebGUI::Form::text("title",20,30,'Poll').'
    Display the title?'.WebGUI::Form::checkbox("displayTitle",1).'
    Description'.WebGUI::Form::textArea("description",'').'
    Active'.WebGUI::Form::checkbox("active",1,1).'
    '.WebGUI::International::get(99).''.WebGUI::Form::text("title",20,30,'Poll').'
    '.WebGUI::International::get(175).''.WebGUI::Form::checkbox("displayTitle",1).'
    '.WebGUI::International::get(176).''.WebGUI::Form::checkbox("processMacros",1).'
    '.WebGUI::International::get(85).''.WebGUI::Form::textArea("description",'').'
    '.WebGUI::International::get(252).''.WebGUI::Form::checkbox("active",1,1).'
    Who can vote?'.WebGUI::Form::selectList("voteGroup",\%hash,).'
    Graph Width'.WebGUI::Form::text("graphWidth",20,3,150).'
    Question'.WebGUI::Form::text("question",50,255).'
    Answers
    (Enter one answer per line. No more than 20.)
    '.WebGUI::Form::textArea("answers",'',50,8,0,'on').'
    '.WebGUI::Form::submit("save").'
    '.WebGUI::International::get(253).''.WebGUI::Form::selectList("voteGroup",\%hash,).'
    '.WebGUI::International::get(254).''.WebGUI::Form::text("graphWidth",20,3,150).'
    '.WebGUI::International::get(255).''.WebGUI::Form::text("question",50,255).'
    '.WebGUI::International::get(256).'
    '.WebGUI::International::get(257).'
    '.WebGUI::Form::textArea("answers",'',50,8,0,'on').'
    '.WebGUI::Form::submit(WebGUI::International::get(62)).'
    '; return $output; } else { @@ -136,21 +140,24 @@ sub www_edit { tie %data, 'Tie::CPHash'; if (WebGUI::Privilege::canEditPage()) { %data = WebGUI::SQL->quickHash("select * from widget,Poll where widget.widgetId=Poll.widgetId and widget.widgetId=$session{form}{wid}",$session{dbh}); - $output = '

    Edit Poll

    '; + $output = ''; + $output .= '

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

    '; + $output .= ''; $output .= WebGUI::Form::hidden("wid",$session{form}{wid}); $output .= WebGUI::Form::hidden("func","editSave"); $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; %hash = WebGUI::SQL->buildHash("select groupId,groupName from groups where groupName<>'Reserved' order by groupName",$session{dbh}); $array[0] = $data{voteGroup}; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= '
    Title'.WebGUI::Form::text("title",20,30,$data{title}).'
    Display the title?'.WebGUI::Form::checkbox("displayTitle",1,$data{displayTitle}).'
    Description'.WebGUI::Form::textArea("description",$data{description}).'
    Active'.WebGUI::Form::checkbox("active",1,$data{active}).'
    '.WebGUI::International::get(99).''.WebGUI::Form::text("title",20,30,$data{title}).'
    '.WebGUI::International::get(175).''.WebGUI::Form::checkbox("displayTitle",1,$data{displayTitle}).'
    '.WebGUI::International::get(176).''.WebGUI::Form::checkbox("processMacros",1,$data{processMacros}).'
    '.WebGUI::International::get(85).''.WebGUI::Form::textArea("description",$data{description}).'
    '.WebGUI::International::get(252).''.WebGUI::Form::checkbox("active",1,$data{active}).'
    Who can vote?'.WebGUI::Form::selectList("voteGroup",\%hash,\@array).'
    Graph Width'.WebGUI::Form::text("graphWidth",20,3,$data{graphWidth}).'
    Question'.WebGUI::Form::text("question",50,255,$data{question}).'
    Answers
    (Enter one answer per line. No more than 20.)
    '.WebGUI::Form::textArea("answers",$data{a1}."\n".$data{a2}."\n".$data{a3}."\n".$data{a4}."\n".$data{a5}."\n".$data{a6}."\n".$data{a7}."\n".$data{a8}."\n".$data{a9}."\n".$data{a10}."\n".$data{a11}."\n".$data{a12}."\n".$data{a13}."\n".$data{a14}."\n".$data{a15}."\n".$data{a16}."\n".$data{a17}."\n".$data{a18}."\n".$data{a19}."\n".$data{a20}."\n",50,8,0,'on').'
    '.WebGUI::Form::submit("save").'
    '.WebGUI::International::get(253).''.WebGUI::Form::selectList("voteGroup",\%hash,\@array).'
    '.WebGUI::International::get(254).''.WebGUI::Form::text("graphWidth",20,3,$data{graphWidth}).'
    '.WebGUI::International::get(255).''.WebGUI::Form::text("question",50,255,$data{question}).'
    '.WebGUI::International::get(256).'
    '.WebGUI::International::get(257).'
    '.WebGUI::Form::textArea("answers",$data{a1}."\n".$data{a2}."\n".$data{a3}."\n".$data{a4}."\n".$data{a5}."\n".$data{a6}."\n".$data{a7}."\n".$data{a8}."\n".$data{a9}."\n".$data{a10}."\n".$data{a11}."\n".$data{a12}."\n".$data{a13}."\n".$data{a14}."\n".$data{a15}."\n".$data{a16}."\n".$data{a17}."\n".$data{a18}."\n".$data{a19}."\n".$data{a20}."\n",50,8,0,'on').'
    '.WebGUI::Form::submit(WebGUI::International::get(62)).'
    '; return $output; } else { diff --git a/lib/WebGUI/Widget/SQLReport.pm b/lib/WebGUI/Widget/SQLReport.pm index e23154e9c..0392a1838 100644 --- a/lib/WebGUI/Widget/SQLReport.pm +++ b/lib/WebGUI/Widget/SQLReport.pm @@ -12,6 +12,7 @@ package WebGUI::Widget::SQLReport; use strict; use WebGUI::ErrorHandler; +use WebGUI::International; use WebGUI::Macro; use WebGUI::Privilege; use WebGUI::Session; @@ -27,7 +28,7 @@ sub purge { #------------------------------------------------------------------- sub widgetName { - return "SQL Report"; + return WebGUI::International::get(259); } #------------------------------------------------------------------- @@ -35,22 +36,22 @@ sub www_add { my ($output); if (WebGUI::Privilege::canEditPage()) { $output = ''; - $output .= '

    Add '.widgetName().'

    '; + $output .= '

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

    '; $output .= '
    '; $output .= WebGUI::Form::hidden("widget","SQLReport"); $output .= WebGUI::Form::hidden("func","addSave"); $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= '
    Title'.WebGUI::Form::text("title",20,30,'SQL Report').'
    Display the title?'.WebGUI::Form::checkbox("displayTitle",1,1).'
    Process macros?'.WebGUI::Form::checkbox("processMacros",1,1).'
    Description'.WebGUI::Form::textArea("description",'','','',1).'
    Template'.WebGUI::Form::textArea("template",'','','',1).'
    Query'.WebGUI::Form::textArea("dbQuery",'').'
    DSN'.WebGUI::Form::text("DSN",20,255,$session{config}{dsn}).'
    Database User'.WebGUI::Form::text("username",20,255,$session{config}{dbuser}).'
    Database Password'.WebGUI::Form::password("identifier",20,255).'
    Convert carriage returns?'.WebGUI::Form::checkbox("convertCarriageReturns",1).'
    '.WebGUI::Form::submit("save").'
    '.WebGUI::International::get(99).''.WebGUI::Form::text("title",20,30,'SQL Report').'
    '.WebGUI::International::get(175).''.WebGUI::Form::checkbox("displayTitle",1,1).'
    '.WebGUI::International::get(176).''.WebGUI::Form::checkbox("processMacros",1,1).'
    '.WebGUI::International::get(85).''.WebGUI::Form::textArea("description",'','','',1).'
    '.WebGUI::International::get(261).''.WebGUI::Form::textArea("template",'','','',1).'
    '.WebGUI::International::get(262).''.WebGUI::Form::textArea("dbQuery",'').'
    '.WebGUI::International::get(263).''.WebGUI::Form::text("DSN",20,255,$session{config}{dsn}).'
    '.WebGUI::International::get(264).''.WebGUI::Form::text("username",20,255,$session{config}{dbuser}).'
    '.WebGUI::International::get(265).''.WebGUI::Form::password("identifier",20,255).'
    '.WebGUI::International::get(183).''.WebGUI::Form::checkbox("convertCarriageReturns",1).'
    '.WebGUI::Form::submit(WebGUI::International::get(62)).'
    '; return $output; } else { @@ -78,22 +79,22 @@ sub www_edit { if (WebGUI::Privilege::canEditPage()) { %data = WebGUI::SQL->quickHash("select * from widget,SQLReport where widget.widgetId=$session{form}{wid} and widget.widgetId=SQLReport.widgetId",$session{dbh}); $output = ''; - $output .= '

    Edit '.widgetName().'

    '; + $output .= '

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

    '; $output .= '
    '; $output .= WebGUI::Form::hidden("wid",$session{form}{wid}); $output .= WebGUI::Form::hidden("func","editSave"); $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= '
    Title'.WebGUI::Form::text("title",20,30,$data{title}).'
    Display the title?'.WebGUI::Form::checkbox("displayTitle","1",$data{displayTitle}).'
    Process macros?'.WebGUI::Form::checkbox("processMacros","1",$data{processMacros}).'
    Description'.WebGUI::Form::textArea("description",$data{description},50,10,1).'
    Template'.WebGUI::Form::textArea("template",$data{template},50,10,1).'
    '.WebGUI::International::get(99).''.WebGUI::Form::text("title",20,30,$data{title}).'
    '.WebGUI::International::get(175).''.WebGUI::Form::checkbox("displayTitle","1",$data{displayTitle}).'
    '.WebGUI::International::get(176).''.WebGUI::Form::checkbox("processMacros","1",$data{processMacros}).'
    '.WebGUI::International::get(85).''.WebGUI::Form::textArea("description",$data{description},50,10,1).'
    '.WebGUI::International::get(261).''.WebGUI::Form::textArea("template",$data{template},50,10,1).'
    Query'.WebGUI::Form::textArea("dbQuery",$data{dbQuery},50,10,1).'
    DSN'.WebGUI::Form::text("DSN",20,255,$data{DSN}).'
    Database User'.WebGUI::Form::text("username",20,255,$data{username}).'
    Database Password'.WebGUI::Form::password("identifier",20,255,$data{identifier}).'
    Convert carriage returns?'.WebGUI::Form::checkbox("convertCarriageReturns",1,$data{convertCarriageReturns}).'
    '.WebGUI::Form::submit("save").'
    '.WebGUI::International::get(262).''.WebGUI::Form::text("DSN",20,255,$data{DSN}).'
    '.WebGUI::International::get(263).''.WebGUI::Form::text("username",20,255,$data{username}).'
    '.WebGUI::International::get(264).''.WebGUI::Form::password("identifier",20,255,$data{identifier}).'
    '.WebGUI::International::get(183).''.WebGUI::Form::checkbox("convertCarriageReturns",1,$data{convertCarriageReturns}).'
    '.WebGUI::Form::submit(WebGUI::International::get(62)).'
    '; return $output; } else { @@ -131,14 +132,14 @@ sub www_view { if ($data{DSN} =~ /\DBI\:\w+\:\w+/) { $dbh = DBI->connect($data{DSN},$data{username},$data{identifier}); } else { - $output .= 'Error: The DSN specified is of an improper format.

    '; + $output .= WebGUI::International::get(267).'

    '; 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 .= 'Error: The SQL query is improperly formatted.

    '; + $output .= WebGUI::International::get(268).'

    '; WebGUI::ErrorHandler::warn("SQLReport [$widgetId] The SQL query is improperly formatted."); } if (defined $sth) { @@ -152,12 +153,12 @@ sub www_view { } $sth->finish; } else { - $output .= 'Error: There was a problem with the query.

    '; + $output .= WebGUI::International::get(269).'

    '; WebGUI::ErrorHandler::warn("SQLReport [$widgetId] There was a problem with the query."); } $dbh->disconnect(); } else { - $output .= 'Error: Could not connect to remote database.

    '; + $output .= WebGUI::International::get(270).'

    '; WebGUI::ErrorHandler::warn("SQLReport [$widgetId] Could not connect to remote database."); } $output .= $template[2]; diff --git a/lib/WebGUI/Widget/SearchMnoGo.pm b/lib/WebGUI/Widget/SearchMnoGo.pm deleted file mode 100644 index 626a1cee6..000000000 --- a/lib/WebGUI/Widget/SearchMnoGo.pm +++ /dev/null @@ -1,168 +0,0 @@ -package WebGUI::Widget::SearchMnoGo; - -#------------------------------------------------------------------- -# 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 DBI; -use strict; -use Tie::CPHash; -use WebGUI::Privilege; -use WebGUI::Session; -use WebGUI::SQL; -use WebGUI::Utility; -use WebGUI::Widget; - -#------------------------------------------------------------------- -sub _mnogoSearch { - my ($i, %match, $key, $sth, $dbh, $urlId, %data, $output, @keyword, $word, %result); - tie %match, 'Tie::CPHash'; - %data = @_; - @keyword = split(/ /,$session{form}{query}); - if ($data{DSN} =~ /\DBI\:\w+\:\w+/) { - $dbh = DBI->connect($data{DSN},$data{username},$data{identifier}); - } else { - $output .= 'Error: The DSN specified is of an improper format.

    '; - WebGUI::ErrorHandler::warn("Search (MnoGo) The DSN specified is of an improper format."); - } - if (defined $dbh) { - foreach $word (@keyword) { - $sth = WebGUI::SQL->read("select url_id from dict where soundex(word)=soundex(lcase('$word'))",$dbh); - if (defined $sth) { - while (($urlId) = $sth->array) { - $result{$urlId}++; - } - $sth->finish; - } else { - $output .= 'Error: There was a problem with the query.

    '; - WebGUI::ErrorHandler::warn("Search (MnoGo) There was a problem with the query."); - } - } - foreach $key (sort {$result{$b} <=> $result{$a}} keys %result) { - if ($i < 50) { - %match = WebGUI::SQL->quickHash("select url,title,txt from url where rec_id=$key",$dbh); - $output .= ''.$match{title}.' ('.$result{$key}.')
    '.$match{txt}.'
    '.$match{url}.'

    '; - } - $i++; - } - $dbh->disconnect(); - } else { - $output .= 'Error: Could not connect to remote database.

    '; - 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)"; -} - -#------------------------------------------------------------------- -sub www_add { - my ($output); - if (WebGUI::Privilege::canEditPage()) { - $output = '

    Add Search (MnoGo)

    '; - $output .= WebGUI::Form::hidden("widget","SearchMnoGo"); - $output .= WebGUI::Form::hidden("func","addSave"); - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= '
    Title'.WebGUI::Form::text("title",20,30,'Search (MnoGo)').'
    Display the title?'.WebGUI::Form::checkbox("displayTitle",1).'
    Description'.WebGUI::Form::textArea("description",'',50,5,1).'
    DSN'.WebGUI::Form::text("DSN",20,255,$session{config}{dsn}).'
    Database User'.WebGUI::Form::text("username",20,255,$session{config}{dbuser}).'
    Database Password'.WebGUI::Form::password("identifier",20,255).'
    '.WebGUI::Form::submit("save").'
    '; - return $output; - } else { - return WebGUI::Privilege::insufficient(); - } - return $output; -} - -#------------------------------------------------------------------- -sub www_addSave { - my ($widgetId); - if (WebGUI::Privilege::canEditPage()) { - $widgetId = create(); - WebGUI::SQL->write("insert into SearchMnoGo values ($widgetId, ".quote($session{form}{DSN}).", ".quote($session{form}{username}).", ".quote($session{form}{identifier}).")",$session{dbh}); - return ""; - } else { - return WebGUI::Privilege::insufficient(); - } -} - -#------------------------------------------------------------------- -sub www_edit { - my ($output, %data); - tie %data, 'Tie::CPHash'; - 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 = '

    Edit Search (MnoGo)

    '; - $output .= WebGUI::Form::hidden("wid",$session{form}{wid}); - $output .= WebGUI::Form::hidden("func","editSave"); - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= '
    Title'.WebGUI::Form::text("title",20,30,$data{title}).'
    Display the title?'.WebGUI::Form::checkbox("displayTitle","1",$data{displayTitle}).'
    Description'.WebGUI::Form::textArea("description",$data{description},50,10,1).'
    DSN'.WebGUI::Form::text("DSN",20,255,$data{DSN}).'
    Database Username'.WebGUI::Form::text("username",20,255,$data{username}).'
    Database Password'.WebGUI::Form::password("identifier",20,255,$data{identifier}).'
    '.WebGUI::Form::submit("save").'
    '; - return $output; - } else { - return WebGUI::Privilege::insufficient(); - } -} - -#------------------------------------------------------------------- -sub www_editSave { - if (WebGUI::Privilege::canEditPage()) { - update(); - WebGUI::SQL->write("update SearchMnoGo set DSN=".quote($session{form}{DSN}).", username=".quote($session{form}{username}).", identifier=".quote($session{form}{identifier})." where widgetId=$session{form}{wid}",$session{dbh}); - return ""; - } else { - return WebGUI::Privilege::insufficient(); - } -} - -#------------------------------------------------------------------- -sub www_view { - my (%data, @test, $output, $widgetId); - tie %data, 'Tie::CPHash'; - $widgetId = shift; - %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 = "

    ".$data{title}."

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

    '; - } - $output .= '

    '; - $output .= WebGUI::Form::text("query",20,255,$session{form}{query}); - $output .= WebGUI::Form::submit("search"); - $output .= '
    '; - $output .= _mnogoSearch(%data); - } - return $output; -} - - - - -1; diff --git a/lib/WebGUI/Widget/SiteMap.pm b/lib/WebGUI/Widget/SiteMap.pm index 377a17994..8bbbd7434 100644 --- a/lib/WebGUI/Widget/SiteMap.pm +++ b/lib/WebGUI/Widget/SiteMap.pm @@ -12,6 +12,7 @@ package WebGUI::Widget::SiteMap; use strict; use Tie::CPHash; +use WebGUI::International; use WebGUI::Macro; use WebGUI::Privilege; use WebGUI::Session; diff --git a/lib/WebGUI/Widget/SyndicatedContent.pm b/lib/WebGUI/Widget/SyndicatedContent.pm index a186632c6..dbbf2c7f3 100644 --- a/lib/WebGUI/Widget/SyndicatedContent.pm +++ b/lib/WebGUI/Widget/SyndicatedContent.pm @@ -13,6 +13,7 @@ package WebGUI::Widget::SyndicatedContent; use strict; use Tie::CPHash; use WebGUI::DateTime; +use WebGUI::International; use WebGUI::Macro; use WebGUI::Privilege; use WebGUI::Session; @@ -28,22 +29,25 @@ sub purge { #------------------------------------------------------------------- sub widgetName { - return "Syndicated Content"; + return WebGUI::International::get(271); } #------------------------------------------------------------------- sub www_add { my ($output); if (WebGUI::Privilege::canEditPage()) { - $output = '

    Add Syndicated Content

    '; + $output = ''; + $output .= '

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

    '; + $output .= ''; $output .= WebGUI::Form::hidden("widget","SyndicatedContent"); $output .= WebGUI::Form::hidden("func","addSave"); $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= '
    Title'.WebGUI::Form::text("title",20,30,'Syndicated Content').'
    Display the title?'.WebGUI::Form::checkbox("displayTitle",1,1).'
    Description'.WebGUI::Form::textArea("description",'','','',1).'
    URL to RSS File'.WebGUI::Form::text("rssUrl",20,2048).'
    '.WebGUI::Form::submit("save").'
    '.WebGUI::International::get(99).''.WebGUI::Form::text("title",20,30,'Syndicated Content').'
    '.WebGUI::International::get(175).''.WebGUI::Form::checkbox("displayTitle",1).'
    '.WebGUI::International::get(176).''.WebGUI::Form::checkbox("processMacros",1).'
    '.WebGUI::International::get(85).''.WebGUI::Form::textArea("description",'','','',1).'
    '.WebGUI::International::get(273).''.WebGUI::Form::text("rssUrl",20,2048).'
    '.WebGUI::Form::submit(WebGUI::International::get(62)).'
    '; return $output; } else { @@ -70,18 +74,21 @@ sub www_edit { tie %data, 'Tie::CPHash'; if (WebGUI::Privilege::canEditPage()) { %data = WebGUI::SQL->quickHash("select * from widget,SyndicatedContent where widget.widgetId=$session{form}{wid}",$session{dbh}); - $output = '

    Edit Syndicated Content

    '; + $output = ''; + $output .= '

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

    '; + $output .= ''; $output .= WebGUI::Form::hidden("wid",$session{form}{wid}); $output .= WebGUI::Form::hidden("func","editSave"); $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= ''; $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; $output .= '
    Title'.WebGUI::Form::text("title",20,30,$data{title}).'
    Display the title?'.WebGUI::Form::checkbox("displayTitle","1",$data{displayTitle}).'
    Description'.WebGUI::Form::textArea("description",$data{description},50,10,1).'
    URL to RSS File'.WebGUI::Form::text("rssUrl",20,2048,$data{rssUrl}).'
    '.WebGUI::International::get(99).''.WebGUI::Form::text("title",20,30,$data{title}).'
    '.WebGUI::International::get(175).''.WebGUI::Form::checkbox("displayTitle","1",$data{displayTitle}).'
    '.WebGUI::International::get(176).''.WebGUI::Form::checkbox("processMacros","1",$data{processMacros}).'
    '.WebGUI::International::get(85).''.WebGUI::Form::textArea("description",$data{description},50,10,1).'
    '.WebGUI::International::get(273).''.WebGUI::Form::text("rssUrl",20,2048,$data{rssUrl}).'
    '.WebGUI::Form::submit("save").'

    Last Fetched'.WebGUI::DateTime::epochToHuman($data{lastFetched},"%m/%d/%y %h:%n%p").'
    Current Content'.$data{content}.'
    '.WebGUI::International::get(275).''.WebGUI::DateTime::epochToHuman($data{lastFetched},"%m/%d/%y %h:%n%p").'
    '.WebGUI::International::get(276).''.$data{content}.'
    '; return $output; } else { @@ -115,6 +122,9 @@ sub www_view { } $output .= $data{content}; } + if ($data{processMacros}) { + $output = WebGUI::Macro::process($output); + } return $output; } diff --git a/lib/WebGUI/Widget/UserSubmission.pm b/lib/WebGUI/Widget/UserSubmission.pm index 2bfc36c13..1e7f1f888 100644 --- a/lib/WebGUI/Widget/UserSubmission.pm +++ b/lib/WebGUI/Widget/UserSubmission.pm @@ -13,6 +13,8 @@ package WebGUI::Widget::UserSubmission; use strict; use Tie::CPHash; use WebGUI::DateTime; +use WebGUI::International; +use WebGUI::Macro; use WebGUI::Privilege; use WebGUI::Session; use WebGUI::SQL; @@ -28,7 +30,7 @@ sub purge { #------------------------------------------------------------------- sub widgetName { - return "User Submission System"; + return WebGUI::International::get(277); } #------------------------------------------------------------------- @@ -36,19 +38,22 @@ sub www_add { my ($output, %hash); tie %hash, "Tie::IxHash"; if (WebGUI::Privilege::canEditPage()) { - $output = '

    Add User Submission System

    '; + $output = ''; + $output .= '

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

    '; + $output .= ''; $output .= WebGUI::Form::hidden("widget","UserSubmission"); $output .= WebGUI::Form::hidden("func","addSave"); $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; %hash = WebGUI::SQL->buildHash("select groupId,groupName from groups where groupName<>'Reserved' order by groupName",$session{dbh}); - $output .= ''; - $output .= ''; - %hash = ("Approved"=>"Approved","Denied"=>"Denied","Pending"=>"Pending"); - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + %hash = ("Approved"=>WebGUI::International::get(281),"Denied"=>WebGUI::International::get(282),"Pending"=>WebGUI::International::get(283)); + $output .= ''; + $output .= ''; $output .= '
    Title'.WebGUI::Form::text("title",20,30,'User Submission System').'
    Display the title?'.WebGUI::Form::checkbox("displayTitle","1").'
    Description'.WebGUI::Form::textArea("description",'',50,5,1).'
    '.WebGUI::International::get(99).''.WebGUI::Form::text("title",20,30,'User Submission System').'
    '.WebGUI::International::get(175).''.WebGUI::Form::checkbox("displayTitle",1,1).'
    '.WebGUI::International::get(176).''.WebGUI::Form::checkbox("processMacros",1).'
    '.WebGUI::International::get(85).''.WebGUI::Form::textArea("description",'',50,5,1).'
    Who can contribute?'.WebGUI::Form::selectList("groupToContribute",\%hash,'',1).'
    Submissions Per Page'.WebGUI::Form::text("submissionsPerPage",20,2,50).'
    Default Status'.WebGUI::Form::selectList("defaultStatus",\%hash,'',1).'
    '.WebGUI::Form::submit("save").'
    '.WebGUI::International::get(279).''.WebGUI::Form::selectList("groupToContribute",\%hash,'',1).'
    '.WebGUI::International::get(280).''.WebGUI::Form::text("submissionsPerPage",20,2,50).'
    '.WebGUI::International::get(284).''.WebGUI::Form::selectList("defaultStatus",\%hash,'',1).'
    '.WebGUI::Form::submit(WebGUI::International::get(62)).'
    '; return $output; } else { @@ -74,19 +79,20 @@ sub www_addSubmission { my ($output, $groupToContribute, @submission, $sth); ($groupToContribute) = WebGUI::SQL->quickArray("select groupToContribute from UserSubmission where widgetId=$session{form}{wid}",$session{dbh}); if (WebGUI::Privilege::isInGroup($groupToContribute,$session{user}{userId})) { - $output = '

    Add Submission

    '; + $output = '

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

    '; + $output .= ''; $output .= WebGUI::Form::hidden("wid",$session{form}{wid}); $output .= WebGUI::Form::hidden("func","addSubmissionSave"); $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= '
    Title'.WebGUI::Form::text("title",20,30).'
    Content'.WebGUI::Form::textArea("content",'',50,10,1).'
    Image'.WebGUI::Form::file("image").'
    Attachment'.WebGUI::Form::file("attachment").'
    Convert Carriage Returns'.WebGUI::Form::checkbox("convertCarriageReturns",1,1).' (uncheck if you\'re writing an HTML submission)
    '.WebGUI::Form::submit("save").'
    '.WebGUI::International::get(99).''.WebGUI::Form::text("title",20,30).'
    '.WebGUI::International::get(178).''.WebGUI::Form::textArea("content",'',50,10,1).'
    '.WebGUI::International::get(179).''.WebGUI::Form::file("image").'
    '.WebGUI::International::get(182).''.WebGUI::Form::file("attachment").'
    '.WebGUI::International::get(183).''.WebGUI::Form::checkbox("convertCarriageReturns",1,1).' '.WebGUI::International::get(286).'
    '.WebGUI::Form::submit(WebGUI::International::get(62)).'
    '; $output .= ''; - $output .= ''; + $output .= ''; $sth = WebGUI::SQL->read("select title,submissionId,dateSubmitted,status from submission where widgetId='$session{form}{wid}' and userId=$session{user}{userId} order by dateSubmitted desc",$session{dbh}); while (@submission = $sth->array) { $output .= ''; @@ -110,7 +116,7 @@ sub www_addSubmissionSave { if ($session{form}{title} ne "") { $title = $session{form}{title}; } else { - $title = "Untitled"; + $title = WebGUI::International::get(290); } WebGUI::SQL->write("insert into submission values ($session{form}{wid}, $submissionId, ".quote($title).", ".time().", ".quote($session{user}{username}).", '$session{user}{userId}', ".quote($session{form}{content}).", ".quote($image).", ".quote($attachment).", '$status', '$session{form}{convertCarriageReturns}')",$session{dbh}); return ""; @@ -148,8 +154,10 @@ sub www_deleteSubmission { my ($output, $owner); ($owner) = WebGUI::SQL->quickArray("select userId from submission where submissionId=$session{form}{sid}",$session{dbh}); if ($owner == $session{user}{userId}) { - $output = '

    Please Confirm

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

    '; + $output = '

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

    '; + $output .= WebGUI::International::get(291).'

    '; + $output .= '

    '; return $output; } else { return WebGUI::Privilege::insufficient(); @@ -174,21 +182,24 @@ sub www_edit { tie %data, 'Tie::CPHash'; if (WebGUI::Privilege::canEditPage()) { %data = WebGUI::SQL->quickHash("select * from widget,UserSubmission where widget.widgetId=$session{form}{wid} and widget.widgetId=UserSubmission.widgetId",$session{dbh}); - $output = '

    Edit User Submission System

    '; + $output = ''; + $output .= '

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

    '; + $output .= ''; $output .= WebGUI::Form::hidden("wid",$session{form}{wid}); $output .= WebGUI::Form::hidden("func","editSave"); $output .= '
    Edit/DeleteTitleDate SubmittedStatus
    '.WebGUI::International::get(289).''.WebGUI::International::get(99).''.WebGUI::International::get(287).''.WebGUI::International::get(288).'
    '.$submission[0].''.epochToHuman($submission[2],"%M/%D/%y").''.$submission[3].'
    '; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $array[0] = $data{groupToContribute}; %hash = WebGUI::SQL->buildHash("select groupId,groupName from groups where groupName<>'Reserved' order by groupName",$session{dbh}); - $output .= ''; - $output .= ''; - %hash = ("Approved"=>"Approved","Denied"=>"Denied","Pending"=>"Pending"); + $output .= ''; + $output .= ''; + %hash = ("Approved"=>WebGUI::International::get(281),"Denied"=>WebGUI::International::get(282),"Pending"=>WebGUI::International::get(283)); $array[0] = $data{defaultStatus}; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; $output .= '
    Title'.WebGUI::Form::text("title",20,30,$data{title}).'
    Display the title?'.WebGUI::Form::checkbox("displayTitle","1",$data{displayTitle}).'
    Description'.WebGUI::Form::textArea("description",$data{description}).'
    '.WebGUI::International::get(99).''.WebGUI::Form::text("title",20,30,$data{title}).'
    '.WebGUI::International::get(175).''.WebGUI::Form::checkbox("displayTitle","1",$data{displayTitle}).'
    '.WebGUI::International::get(176).''.WebGUI::Form::checkbox("processMacros","1",$data{processMacros}).'
    '.WebGUI::International::get(85).''.WebGUI::Form::textArea("description",$data{description}).'
    Who can contribute?'.WebGUI::Form::selectList("groupToContribute",\%hash,\@array,1).'
    Submissions Per Page'.WebGUI::Form::text("submissionsPerPage",20,2,$data{submissionsPerPage}).'
    '.WebGUI::International::get(279).''.WebGUI::Form::selectList("groupToContribute",\%hash,\@array,1).'
    '.WebGUI::International::get(280).''.WebGUI::Form::text("submissionsPerPage",20,2,$data{submissionsPerPage}).'
    Default Status'.WebGUI::Form::selectList("defaultStatus",\%hash,\@array,1).'
    '.WebGUI::Form::submit("save").'
    '.WebGUI::International::get(284).''.WebGUI::Form::selectList("defaultStatus",\%hash,\@array,1).'
    '.WebGUI::Form::submit(WebGUI::International::get(62)).'
    '; return $output; } else { @@ -214,25 +225,26 @@ sub www_editSubmission { ($owner) = WebGUI::SQL->quickArray("select userId from submission where submissionId=$session{form}{sid}",$session{dbh}); if ($owner == $session{user}{userId}) { %submission = WebGUI::SQL->quickHash("select * from submission where submissionId='$session{form}{sid}'",$session{dbh}); - $output = '

    Edit Submission

    '; + $output = '

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

    '; + $output .= ''; $output .= WebGUI::Form::hidden("wid",$session{form}{wid}); $output .= WebGUI::Form::hidden("sid",$session{form}{sid}); $output .= WebGUI::Form::hidden("func","editSubmissionSave"); $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; if ($submission{image} ne "") { - $output .= ''; + $output .= ''; } else { - $output .= ''; + $output .= ''; } if ($submission{attachment} ne "") { - $output .= ''; + $output .= ''; } else { - $output .= ''; + $output .= ''; } - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; $output .= '
    Title'.WebGUI::Form::text("title",20,30,$submission{title}).'
    Content'.WebGUI::Form::textArea("content",$submission{content},50,10).'
    '.WebGUI::International::get(99).''.WebGUI::Form::text("title",20,30,$submission{title}).'
    '.WebGUI::International::get(178).''.WebGUI::Form::textArea("content",$submission{content},50,10).'
    ImageDelete Image
    '.WebGUI::International::get(179).''.WebGUI::International::get(186).'
    Image'.WebGUI::Form::file("image").'
    '.WebGUI::International::get(179).''.WebGUI::Form::file("image").'
    AttachmentDelete Attachment
    '.WebGUI::International::get(182).''.WebGUI::International::get(186).'
    Attachment'.WebGUI::Form::file("attachment").'
    '.WebGUI::International::get(182).''.WebGUI::Form::file("attachment").'
    Convert Carriage Returns'.WebGUI::Form::checkbox("convertCarriageReturns",1,$submission{convertCarriageReturns}).' (uncheck if you\'re writing an HTML submission)
    '.WebGUI::Form::submit("save").'
    '.WebGUI::International::get(183).''.WebGUI::Form::checkbox("convertCarriageReturns",1,$submission{convertCarriageReturns}).' (uncheck if you\'re writing an HTML submission)
    '.WebGUI::Form::submit(WebGUI::International::get(62)).'
    '; return $output; } else { @@ -258,9 +270,9 @@ sub www_editSubmissionSave { if ($session{form}{title} ne "") { $title = $session{form}{title}; } else { - $title = "Untitled"; + $title = WebGUI::International::get(290); } - 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}); + WebGUI::SQL->write("update submission set dateSubmitted=".time().", 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(); @@ -280,15 +292,18 @@ sub www_view { if ($data{description} ne "") { $output .= $data{description}.'

    '; } + if ($data{processMacros}) { + $output = WebGUI::Macro::process($output); + } $sth = WebGUI::SQL->read("select title,submissionId,dateSubmitted,username,userId from submission where widgetId='$widgetId' and status='Approved' order by dateSubmitted desc",$session{dbh}); while (@submission = $sth->array) { $row[$i] = ''.$submission[0].''.epochToHuman($submission[2],"%M/%D/%y").''.$submission[3].''; $i++; } $sth->finish; - $output .= '
    Post New Submission
    '; + $output .= '
    '.WebGUI::International::get(294).'
    '; $output .= ''; - $output .= ''; + $output .= ''; if ($session{form}{pn} < 1) { $pn = 0; } else { @@ -300,15 +315,15 @@ sub www_view { $output .= '
    TitleDate SubmittedSubmitted By
    '.WebGUI::International::get(99).''.WebGUI::International::get(287).''.WebGUI::International::get(295).'
    '; $output .= '

    '; } @@ -321,16 +336,16 @@ sub www_viewSubmission { tie %submission, 'Tie::CPHash'; %submission = WebGUI::SQL->quickHash("select * from submission where submissionId=$session{form}{sid}",$session{dbh}); $output = "

    ".$submission{title}."

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

    '; + $output .= ''.WebGUI::International::get(297).' '.$submission{username}.'
    '; + $output .= ''.WebGUI::International::get(298).' '.epochToHuman($submission{dateSubmitted},"%w, %c %D, %y at %H:%n%p").'

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

    '; - $output .= 'Approve · '; - $output .= 'Leave Pending · '; - $output .= 'Deny '; + $output .= ''.WebGUI::International::get(299).' · '; + $output .= ''.WebGUI::International::get(300).' · '; + $output .= ''.WebGUI::International::get(301).' '; $output .= '
    '; } if ($submission{convertCarriageReturns}) { @@ -342,18 +357,15 @@ sub www_viewSubmission { } $output .= '
    '; if ($submission{userId} == $session{user}{userId}) { - $output .= 'Delete · '; - $output .= 'Edit · '; + $output .= ''.WebGUI::International::get(186).' · '; + $output .= ''.WebGUI::International::get(302).' · '; } - $output .= 'Return To Submissions List'; + $output .= ''.WebGUI::International::get(303).''; $output .= '
    '; return $output; } - - - 1; diff --git a/testEnvironment.pl b/testEnvironment.pl index 8f314d2eb..54f2afa61 100644 --- a/testEnvironment.pl +++ b/testEnvironment.pl @@ -53,6 +53,13 @@ if (eval { require Tie::IxHash }) { print "Please install.\n"; } +print "Tie::CPHash module:\t"; +if (eval { require Tie::CPHash }) { + print "OK\n"; +} else { + print "Please install.\n"; +} + print "XML::RSS module:\t"; if (eval { require XML::RSS }) { print "OK\n"; diff --git a/www/sub/index.pl b/www/sub/index.pl deleted file mode 100755 index d2db7393f..000000000 --- a/www/sub/index.pl +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/perl - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001 Plain Black Software. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -my $webguiRoot = "../.."; - -BEGIN { - unshift (@INC, "../../lib"); -} - -#-----------------DO NOT MODIFY BELOW THIS LINE-------------------- - -use CGI::Carp qw(fatalsToBrowser); -use strict; -use WebGUI; - -print WebGUI::page($webguiRoot); -