diff --git a/docs/upgrades/upgrade_5.5.3-6.0.0.sql b/docs/upgrades/upgrade_5.5.3-6.0.0.sql
index f875751d9..a44900ce4 100644
--- a/docs/upgrades/upgrade_5.5.3-6.0.0.sql
+++ b/docs/upgrades/upgrade_5.5.3-6.0.0.sql
@@ -1,4 +1,4 @@
-#insert into webguiVersion values ('6.0.0','upgrade',unix_timestamp());
+insert into webguiVersion values ('6.0.0','upgrade',unix_timestamp());
delete from international where internationalId=158 and namespace='WebGUI';
delete from international where internationalId=803 and namespace='WebGUI';
delete from international where internationalId=804 and namespace='WebGUI';
@@ -31,7 +31,7 @@ insert into international (internationalId,languageId,namespace,message,lastUpda
delete from international where languageId=1 and namespace='WebGUI' and internationalId=634;
insert into international (internationalId,languageId,namespace,message,lastUpdated,context) values (634,1,'WebGUI','Default Home Page
Some really small sites don\'t have a home page, but instead like to use one of their internal pages like \"About Us\" or \"Company Information\" as their home page. For that reason, you can set the default page of your site to any page in the site. That page will be the one people go to if they type in just your URL http://www.mywebguisite.com, or if they click on the Home link generated by the ^H; macro. \r\n\r\n
Not Found Page
If a page that a user requests is not found in the system, the user can be redirected to the home page or to an error page where they can attempt to find what they were looking for. You decide which is better for your users. \r\n\r\n\r\n
Favicon
An icon that appears on Internet Explorer short cuts such as your \"Favorites\". To learn more about Favicon click here. \r\n\r\n
Site Icon
An icon that appears in the URL bar of most modern browsers. It may also appear in the bookmarks of the browser. The image must be 16x16 pixels. \r\n\r\n
Add edit stamp to posts?
Typically if a user edits a post on a discussion, a stamp is added to that post to identify who made the edit, and at what time. On some sites that information is not necessary, therefore you can turn it off here. \r\n\r\n
Filter Contributed HTML
Especially when running a public site where anybody can post to your message boards or user submission systems, it is often a good idea to filter their content for malicious code that can harm the viewing experience of your visitors; And in some circumstances, it can even cause security problems. Use this setting to select the level of filtering you wish to apply. \r\n\r\n
Maximum Attachment Size
The size (in kilobytes) of the maximum allowable attachment to be uploaded to your system. \r\n\r\n
Max Image Size
If images are uploaded to your system that are bigger than the max image size, then they will be resized to the max image size. The max image size is measured in pixels and will use the size of the longest side of the image to determine if the limit has been reached. \r\n\r\n
Thumbnail Size
When images are uploaded to your system, they will automatically have thumbnails generated at the size specified here (unless overridden on a case-by-case basis). Thumbnail size is measured in pixels. \r\n\r\n
Snippet Preview Length
How many characters of a snippet should be displayed in the collateral management system main listing. \r\n\r\n
Text Area Rows
Some sites wish to control the size of the forms that WebGUI generates. With this setting you can specify how many rows of characters will be displayed in textareas on the site. \r\n\r\n
Text Area Columns
Some sites wish to control the size of the forms that WebGUI generates. With this setting you can specify how many columns of characters will be displayed in textareas on the site. \r\n\r\n
Text Box Size
Some sites wish to control the size of the forms that WebGUI generates. With this setting you can specify how characters can be displayed at once in text boxes on the site. \r\n\r\n
Wobject Privileges
Choose \'Yes\' to enable privileges at the Wobject level. By default, Wobjects are set to inherit page level privileges
\r\n\r\nNOTE: The .crumbTrail style sheet class is tied to this macro.\r\n
\r\n\r\n^FlexMenu;
\r\nThis menu macro creates a top-level menu that expands as the user selects each menu item.\r\n
\r\n\r\n^H; or ^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 ^H(\"Go Home\");.\r\n
\r\n\r\nNOTES: You can also use the special case ^H(linkonly); to return only the URL to the home page and nothing more. Also, the .homeLink style sheet class is tied to this macro.\r\n
\r\n\r\n^M; or ^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 ^M(3);. If you set the macro to \"0\" it will track the entire site tree.\r\n
\r\n\r\n^m; - Current Menu (Horizontal)
\r\nA horizontal menu containing the sub-pages at the current level. You can optionally specify a delimeter to be used between page names by using ^m(:--:);. The default delimeter is ·.\r\n
\r\n\r\n^PreviousDropMenu;
\r\nCreate a drop down menu containing the sub-pages at the previous level in the page tree.\r\n
\r\nExample: ^PreviousDropMenu;\r\n
\r\n\r\n^P; or ^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 ^P(3);. If you set the macro to \"0\" it will track the entire site tree.\r\n
\r\n\r\n^p; - Previous Menu (Horizontal)
\r\nA horizontal menu containing the sub-pages at the previous level. You can optionally specify a delimeter to be used between page names by using ^p(:--:);. The default delimeter is ·.\r\n
\r\n\r\n^rootmenu; or ^rootmenu(); (Horizontal)
\r\nCreates a horizontal menu of the various roots on your system (except for the WebGUI system roots). You can optionally specify a menu delimiter like this: ^rootmenu(|);\r\n
\r\n\r\n^RootTab;
\r\nCreate a tab navigation system from the roots on your site (except WebGUI\'s system roots) similar to the tabs used in the tab forms (editing wobjects or pages).\r\n
\r\nNOTE: Has two special style sheet classes: .RootTabOn{} and .RootTabOff{}.\r\n
\r\nExample:
\r\n<style>\r\n.rootTabOn {\r\n line-height: 17px;\r\n font-size: 16px;\r\n spacing: 3px;\r\n border: 1px solid black;\r\n border-bottom-width: 0px;\r\n background-color: #333333;\r\n z-index: 10000;\r\n padding: 3px 9px 5px 9px;\r\n color: white;\r\n}\r\n\r\n.rootTabOn A, .rootTabOn A:visited {\r\n color: white;\r\n font-weight: bold;\r\n text-decoration: none;\r\n}\r\n\r\n.rootTabOff {\r\n line-height: 15px;\r\n font-size: 14px;\r\n border: 1px solid black;\r\n border-bottom-width: 0px;\r\n background-color: #c8c8c8;\r\n z-index: 1000;\r\n padding: 2px 9px 2px 9px;\r\n}\r\n\r\n.rootTabOff A, .rootTabOff A:visited {\r\n color: black;\r\n text-decoration: underline;\r\n}\r\n\r\n.rootTabOff A:hover {\r\n font-weight: bold;\r\n}\r\n</style>\r\n^RootTab;\r\n
\r\n\r\n\r\n^SpecificDropMenu();
\r\nCreate a drop down menu starting at a specific point in your navigation tree. This takes two parameters. The first is the url of the page to start with and the second (optional parameter) is the depth to traverse to.\r\n
\r\nExample: ^SpecificDropMenu(\"home\",3);\r\n
\r\n\r\n^S(); - Specific SubMenu (Vertical)
\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 ^S(\"home\",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 ^S(\"home\",3);.\r\n
\r\n\r\n\r\n^s(); - Specific SubMenu (Horizontal)
\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 ^s(\"home\");. The value is the urlized title of the page. You can optionally specify a delimeter to be used between page names by using ^s(\"home\",\":--:\");. The default delimeter is ·.\r\n
\r\n\r\n^Synopsis; or ^Synopsis(); Menu
\r\nThis macro allows you to get the submenu of a page along with the synopsis of each link. You may specify an integer to specify how many levels deep to traverse the page tree.\r\n
\r\n\r\nNOTES: The .synopsis_sub, .synopsis_summary, and .synopsis_title style sheet classes are tied to this macro.\r\n
\r\n\r\n^TopDropMenu;
\r\nCreate a drop down menu of your top level navigation.\r\n
\r\nExample: ^TopDropMenu;\r\n
\r\n\r\n^T; or ^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 ^T(3);. If you set the macro to \"0\" it will track the entire site tree.\r\n
\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). You can optionally specify a delimeter to be used between page names by using ^t(:--:);. The default delimeter is ·.\r\n
\r\n\r\n^/; - System URL
\r\nThe URL to the gateway script (example: /index.pl/).\r\n
\r\n\r\n^\\; - Page URL
\r\nThe URL to the current page (example: /index.pl/pagename).\r\n
\r\n\r\nIt should be noted that many of these macros can also make use of these style sheet classes:\r\n
\r\n.selectedMenuItem
\r\nUse this class to highlight the current page in any of the menu macros.\r\n
\r\n\r\n.verticalMenu
\r\nThe vertical menu (if you use a vertical menu macro).\r\n
\r\n\r\n\r\n.horizontalMenu
\r\nThe horizontal menu (if you use a horizontal menu macro).\r\n
\r\n', 1070030242,NULL); +insert into international (internationalId,languageId,namespace,message,lastUpdated,context) values (842,1,'WebGUI','These macros are used to create navigation on the site.\r\n
\r\n\r\n^C; or ^C(); - Crumb Trail\r\n\r\nNOTE: The .crumbTrail style sheet class is tied to this macro.\r\n
\r\n\r\n^FlexMenu;
\r\nThis menu macro creates a top-level menu that expands as the user selects each menu item.\r\n
\r\n\r\n^H; or ^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 ^H(\"Go Home\");.\r\n
\r\n\r\nNOTES: You can also use the special case ^H(linkonly); to return only the URL to the home page and nothing more. Also, the .homeLink style sheet class is tied to this macro.\r\n
\r\n\r\n^M; or ^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 ^M(3);. If you set the macro to \"0\" it will track the entire site tree.\r\n
\r\n\r\n^m; - Current Menu (Horizontal)
\r\nA horizontal menu containing the sub-pages at the current level. You can optionally specify a delimeter to be used between page names by using ^m(:--:);. The default delimeter is ·.\r\n
\r\n\r\n^PreviousDropMenu;
\r\nCreate a drop down menu containing the sub-pages at the previous level in the page tree.\r\n
\r\nExample: ^PreviousDropMenu;\r\n
\r\n\r\n^P; or ^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 ^P(3);. If you set the macro to \"0\" it will track the entire site tree.\r\n
\r\n\r\n^p; - Previous Menu (Horizontal)
\r\nA horizontal menu containing the sub-pages at the previous level. You can optionally specify a delimeter to be used between page names by using ^p(:--:);. The default delimeter is ·.\r\n
\r\n\r\n^rootmenu; or ^rootmenu(); (Horizontal)
\r\nCreates a horizontal menu of the various roots on your system (except for the WebGUI system roots). You can optionally specify a menu delimiter like this: ^rootmenu(|);\r\n
\r\n\r\n^RootTab;
\r\nCreate a tab navigation system from the roots on your site (except WebGUI\'s system roots) similar to the tabs used in the tab forms (editing wobjects or pages).\r\n
\r\nNOTE: Has two special style sheet classes: .RootTabOn{} and .RootTabOff{}.\r\n
\r\nExample:
\r\n<style>\r\n.rootTabOn {\r\n line-height: 17px;\r\n font-size: 16px;\r\n spacing: 3px;\r\n border: 1px solid black;\r\n border-bottom-width: 0px;\r\n background-color: #333333;\r\n z-index: 10000;\r\n padding: 3px 9px 5px 9px;\r\n color: white;\r\n}\r\n\r\n.rootTabOn A, .rootTabOn A:visited {\r\n color: white;\r\n font-weight: bold;\r\n text-decoration: none;\r\n}\r\n\r\n.rootTabOff {\r\n line-height: 15px;\r\n font-size: 14px;\r\n border: 1px solid black;\r\n border-bottom-width: 0px;\r\n background-color: #c8c8c8;\r\n z-index: 1000;\r\n padding: 2px 9px 2px 9px;\r\n}\r\n\r\n.rootTabOff A, .rootTabOff A:visited {\r\n color: black;\r\n text-decoration: underline;\r\n}\r\n\r\n.rootTabOff A:hover {\r\n font-weight: bold;\r\n}\r\n</style>\r\n^RootTab;\r\n
\r\n\r\n\r\n^SpecificDropMenu();
\r\nCreate a drop down menu starting at a specific point in your navigation tree. This takes two parameters. The first is the url of the page to start with and the second (optional parameter) is the depth to traverse to.\r\n
\r\nExample: ^SpecificDropMenu(\"home\",3);\r\n
\r\n\r\n^S(); - Specific SubMenu (Vertical)
\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 ^S(\"home\",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 ^S(\"home\",3);.\r\n
\r\n\r\n\r\n^s(); - Specific SubMenu (Horizontal)
\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 ^s(\"home\");. The value is the urlized title of the page. You can optionally specify a delimeter to be used between page names by using ^s(\"home\",\":--:\");. The default delimeter is ·.\r\n
\r\n\r\n^Synopsis; or ^Synopsis(); Menu
\r\nThis macro allows you to get the submenu of a page along with the synopsis of each link. You may specify an integer to specify how many levels deep to traverse the page tree.\r\n
\r\n\r\nNOTES: The .synopsis_sub, .synopsis_summary, and .synopsis_title style sheet classes are tied to this macro.\r\n
\r\n\r\n^TopDropMenu;
\r\nCreate a drop down menu of your top level navigation.\r\n
\r\nExample: ^TopDropMenu;\r\n
\r\n\r\n^T; or ^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 ^T(3);. If you set the macro to \"0\" it will track the entire site tree.\r\n
\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). You can optionally specify a delimeter to be used between page names by using ^t(:--:);. The default delimeter is ·.\r\n
\r\n\r\n^/; - System URL
\r\nThe URL to the gateway script (example: /index.pl/).\r\n
\r\n\r\n^\\; - Page URL
\r\nThe URL to the current page (example: /index.pl/pagename).\r\n
\r\n\r\nIt should be noted that many of these macros can also make use of these style sheet classes:\r\n
\r\n.selectedMenuItem
\r\nUse this class to highlight the current page in any of the menu macros.\r\n
\r\n\r\n.verticalMenu
\r\nThe vertical menu (if you use a vertical menu macro).\r\n
\r\n\r\n\r\n.horizontalMenu
\r\nThe horizontal menu (if you use a horizontal menu macro).\r\n
\r\n', 1070030242,NULL); delete from international where languageId=1 and namespace='WebGUI' and internationalId=623; insert into international (internationalId,languageId,namespace,message,lastUpdated,context) values (623,1,'WebGUI','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\n\r\n\r\nIf you are unfamiliar with how to use CSS, Plain Black provides training classes on XHTML and CSS. Alternatively, Bradsoft makes an excellent CSS editor called Top Style.\r\n
\r\n\r\n\r\nThe following is a list of classes used to control the default look of WebGUI. These of course can be overridden or replaced in the various templates that generate them.\r\n
\r\n\r\n\r\nA
\r\nThe links throughout the style.\r\n
\r\n\r\n\r\nBODY
\r\nThe default setup of all pages within a style.\r\n
\r\n\r\n\r\nH1
\r\nThe headers on every page.\r\n
\r\n\r\n\r\n.content
\r\nThe main content area on all pages of the style.\r\n
\r\n\r\n\r\n.formDescription
\r\nThe tags on all forms next to the form elements. \r\n
\r\n\r\n\r\n.formSubtext
\r\nThe tags below some form elements.\r\n
\r\n\r\n\r\n.highlight
\r\nDenotes a highlighted item, such as which message you are viewing within a list.\r\n
\r\n\r\n\r\n\r\n\r\n.pagination
\r\nThe Previous and Next links on pages with pagination.\r\n
\r\n\r\n\r\n\r\n\r\n.tableData
\r\nThe data rows on things like message boards and user contributions.\r\n
\r\n\r\n\r\n.tableHeader
\r\nThe headings of columns on things like message boards and user contributions.\r\n
\r\n\r\n\r\n\r\n\r\nNOTE: Some wobjects and macros have their own unique styles sheet classes, which are documented in their individual help files.\r\n
\r\n\r\n\r\n', 1070030223,NULL);
delete from international where languageId=1 and namespace='WebGUI' and internationalId=846;
@@ -259,25 +259,30 @@ insert into international (internationalId,languageId,namespace,message,lastUpda
delete from template where namespace='Auth/WebGUI/Login' and templateId=1;
-INSERT INTO template VALUES (1,'Default WebGUI Login Template',' \r\n\r\n /ig) {
- $data{message} =~ s/\n/\ ';
- if ($data{url} ne "" && $data{status} eq 'pending') {
- $output .= ''.WebGUI::International::get(554).' · ';
- }
- $output .= ''.WebGUI::International::get(354).' ';
- $output .= WebGUI::Operation::Profile::accountOptions();
- } else {
- $output = WebGUI::Privilege::insufficient();
- }
- return $output;
-}
\ No newline at end of file
+ my ($data, $vars);
+ return WebGUI::Privilege::insufficient() unless (WebGUI::Privilege::isInGroup(2,$session{user}{userId}));
+ $vars->{displayTitle} = ' /ig) {
+ $data->{message} =~ s/\n/\\r\n
\r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n\r\n
\r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n\r\n
\r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n\r\n
\r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n\r\n
\r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n\r\n
\r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n\r\n
\r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n\r\n
\r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n\r\n
\r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n
\r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n
\r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n\r\n
\r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n
\r\n\r\n
\r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n
\r\n
\r\n\r\n
\r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n
\r\n\r\n
\r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n\r\n
\r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n\r\n
\r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n\r\n
\r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n
\r\n\r\n
\r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n
\r\n
\r\n\r\n
\r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n
\r\n\r\n
\r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n\r\n
\r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n
\r\n\r\n\r\n
\r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n'.WebGUI::International::get(159).'
';
- $sth = WebGUI::SQL->read("select messageLogId,subject,url,dateOfEntry,status from messageLog where userId=$session{user}{userId} order by dateOfEntry desc");
- while (@data = $sth->array) {
- $row[$i] = ' ';
- $i++;
- }
- $sth->finish;
- $p = WebGUI::Paginator->new(WebGUI::URL::page('op=viewMessageLog'),\@row);
- $output .= '';
- $row[$i] .= ''.$data[1].'';
- $row[$i] .= ' ';
- if ($data[2] ne "") {
- $data[2] = WebGUI::URL::append($data[2],'mlog='.$data[0]);
- $row[$i] .= '';
- }
- $row[$i] .= $status{$data[4]};
- if ($data[2] ne "") {
- $row[$i] .= '';
- }
- $row[$i] .= ' '.epochToHuman($data[3]).' ';
- $output .= '
';
- $output .= $p->getBarSimple($session{form}{pn});
- $output .= WebGUI::Operation::Profile::accountOptions();
- } else {
- $output = WebGUI::Privilege::insufficient();
- }
- return $output;
+ my (@msg, $vars);
+ WebGUI::Privilege::insufficient() unless (WebGUI::Privilege::isInGroup(2,$session{user}{userId}));
+ $vars->{displayTitle} = ' ';
- if ($p->getPage($session{form}{pn}) eq "") {
- $output .= ''.WebGUI::International::get(351).'
- '.WebGUI::International::get(553).'
- '.WebGUI::International::get(352).' ';
- } else {
- $output .= $p->getPage($session{form}{pn});
- }
- $output .= ''.WebGUI::International::get(353).' '.WebGUI::International::get(159).'
';
+ my $p = WebGUI::Paginator->new(WebGUI::URL::page('op=viewMessageLog'),[]);
+ my $query = "select messageLogId,subject,url,dateOfEntry,status from messageLog where userId=$session{user}{userId} order by dateOfEntry desc";
+ $p->setDataByQuery($query);
+
+ $vars->{'message.subject.label'} = WebGUI::International::get(351);
+ $vars->{'message.status.label'} = WebGUI::International::get(553);
+ $vars->{'message.dateOfEntry.label'} = WebGUI::International::get(352);
+
+ my $messages = $p->getPageData;
+ foreach my $message (@$messages) {
+ my $hash;
+ $hash->{'message.subject'} = ''.$message->{subject}.'';
+ my $status = _status->{$message->{status}};
+ $status = ''.$status.'' if ($message->{url} ne "");
+ $hash->{'message.status'} = $status;
+ $hash->{'message.dateOfEntry'} = epochToHuman($message->{dateOfEntry});
+ push(@msg,$hash);
+ }
+ $vars->{'message.loop'} = \@msg;
+ $vars->{'message.noresults'} = WebGUI::International::get(353) unless (scalar(@$messages) > 0);
+
+ $vars->{'message.firstPage'} = $p->getFirstPageLink;
+ $vars->{'message.lastPage'} = $p->getLastPageLink;
+ $vars->{'message.nextPage'} = $p->getNextPageLink;
+ $vars->{'message.pageList'} = $p->getPageLinks;
+ $vars->{'message.previousPage'} = $p->getPreviousPageLink;
+ $vars->{'message.multiplePages'} = ($p->getNumberOfPages > 1);
+ $vars->{'message.accountOptions'} = WebGUI::Operation::Shared::accountOptions();
+
+ return WebGUI::Template::process(WebGUI::Template::get(1,'Operation/MessageLog/View'), $vars);
}
#-------------------------------------------------------------------
sub www_viewMessageLogMessage {
- my (%status, %data, $output, $sth, @row, $i, $p);
- tie %data, 'Tie::CPHash';
- if (WebGUI::Privilege::isInGroup(2,$session{user}{userId})) {
- %status = (notice=>WebGUI::International::get(551),pending=>WebGUI::International::get(552),completed=>WebGUI::International::get(350));
- $output = ''.WebGUI::International::get(159).'
';
- %data = WebGUI::SQL->quickHash("select * from messageLog where messageLogId=$session{form}{mlog} and userId=$session{user}{userId}");
- $output .= ''.$data{subject}.'
';
- $output .= epochToHuman($data{dateOfEntry}).'
';
- if ($data{url} ne "" && $data{status} eq 'pending') {
- $data{url} = WebGUI::URL::append($data{url},'mlog='.$data{messageLogId});
- $output .= '';
- }
- $output .= $status{$data{status}}.'
';
- if ($data{url} ne "") {
- $output .= '';
- }
- unless ($data{message} =~ /\
/ig || $data{message} =~ /\
/g;
- }
- $output .= '
'.$data{message}.''.WebGUI::International::get(159).'
';
+
+ $data = WebGUI::SQL->quickHashRef("select * from messageLog where messageLogId=$session{form}{mlog} and userId=$session{user}{userId}");
+
+ $vars->{'message.subject'} = $data->{subject};
+ $vars->{'message.dateOfEntry'} = epochToHuman($data->{dateOfEntry});
+
+ my $status = _status->{$data->{status}};
+ if ($data->{url} ne "" && $data->{status} eq 'pending'){
+ $status = ''.$status.'';
+ $vars->{'message.takeAction'} = ''.WebGUI::International::get(554).''
+ }
+ $vars->{'message.status'} = $status;
+
+ unless ($data->{message} =~ /\
/ig || $data->{message} =~ /\
/g;
+ }
+
+ $vars->{'message.text'} = $data->{message};
+ $vars->{'message.accountOptions'} = WebGUI::Operation::Shared::accountOptions();
+ return WebGUI::Template::process(WebGUI::Template::get(1,'Operation/MessageLog/Message'), $vars);
+}
+
+1;