WebGUI 0.10.0 release
This commit is contained in:
parent
c57a922892
commit
1b82634d23
27 changed files with 1854 additions and 81 deletions
|
|
@ -64,6 +64,7 @@ CREATE TABLE MessageBoard (
|
|||
CREATE TABLE Poll (
|
||||
widgetId int(11) NOT NULL default '0',
|
||||
active int(11) NOT NULL default '1',
|
||||
graphWidth int(11) NOT NULL default '150',
|
||||
voteGroup int(11) default NULL,
|
||||
question varchar(255) default NULL,
|
||||
a1 varchar(255) default NULL,
|
||||
|
|
@ -164,18 +165,19 @@ CREATE TABLE SyndicatedContent (
|
|||
|
||||
|
||||
#
|
||||
# Table structure for table 'UserContribution'
|
||||
# Table structure for table 'UserSubmission'
|
||||
#
|
||||
|
||||
CREATE TABLE UserContribution (
|
||||
CREATE TABLE UserSubmission (
|
||||
widgetId int(11) NOT NULL default '0',
|
||||
groupToContribute int(11) default NULL,
|
||||
contributionsPerPage int(11) default NULL,
|
||||
submissionsPerPage int(11) NOT NULL default '50',
|
||||
defaultStatus varchar(30) default 'Approved',
|
||||
PRIMARY KEY (widgetId)
|
||||
) TYPE=MyISAM;
|
||||
|
||||
#
|
||||
# Dumping data for table 'UserContribution'
|
||||
# Dumping data for table 'UserSubmission'
|
||||
#
|
||||
|
||||
|
||||
|
|
@ -328,8 +330,9 @@ INSERT INTO help VALUES (14,'US English','Delete','Content','As the function sug
|
|||
INSERT INTO help VALUES (15,'US English','Delete','Group','As the function suggests you\'ll be deleting a group and removing all users from the group. Be careful not to orphan users from pages they should have access to by deleting a group that is in use.\r\n\r\nAs with any delete operation, you are prompted to be sure you wish to proceed with the delete. If you answer yes, the delete will proceed and there is no recovery possible. If you answer no you\'ll be returned to the prior screen.','0');
|
||||
INSERT INTO help VALUES (16,'US English','Add','Style','Styles are WebGUI macro enabled. See <i>Using Macros</i> for more information.\r\n\r\n<b>Style Name</b>\r\nA unique name to describe what this style looks like at a glance. The name has no effect on the actual look of the style.\r\n\r\n<b>Header</b>\r\nThe header is the start of the look of your site. It is helpful to look at your design and cut it into three pieces. The top and left of your design is the header. The center part is the content, and the right and bottom is the footer. Cut the HTML from your header and paste it in the space provided.\r\n\r\nIf you are in need of assistance for creating a look for your site, or if you need help cutting apart your design, <a href=\"http://www.plainblack.com\">Plain Black Software</a> provides support services for a small fee.\r\n\r\nMany people will add WebGUI macros to their header for automated navigation, and other features.\r\n\r\n<b>Footer</b>\r\nThe footer is the end of the look for your site. It is the right and bottom portion of your design. You may also place WebGUI macros in your footer.\r\n\r\n<b>Style Sheet</b>\r\nPlace your style sheet entries here. Style sheets are used to control colors, sizes, and other properties of the elements on your site. See <i>Using Style Sheets</i> for more information.\r\n\r\n<i>Advanced Users:</i> for greater performance create your stylesheet on the file system (call it something like webgui.css) and add an entry like this to this area: \r\n<link href=\"/webgui.css\" rel=\"stylesheet\" rev=\"stylesheet\" type=\"text/css\">','18,19');
|
||||
INSERT INTO help VALUES (17,'US English','Add','Group','See <i>Manage Group</i> for a description of grouping functions and the default groups.\r\n\r\n<b>Group Name</b>\r\nA name for the group. It is best if the name is descriptive so you know what it is at a glance.\r\n\r\n<b>Description</b>\r\nA longer description of the group so that other admins and content managers (or you if you forget) will know what the purpose of this group is.','0');
|
||||
INSERT INTO help VALUES (18,'US English','Using','Style Sheets','<a href=\"http://www.w3.org/Style/CSS/\">Cascading Style Sheets (CSS)</a> are a great way to manage the look and feel of any web site. They are used extensively in WebGUI.\r\n\r\nIf you are unfamiliar with how to use CSS, <a href=\"http://www.plainblack.com\">Plain Black Software</a> provides training classes on XHTML and CSS. Alternatively, Bradsoft makes an excellent CSS editor called <a href=\"http://www.bradsoft.com/topstyle/index.asp\">Top Style</a>.\r\n\r\nThe following is a list of classes used to control the look of WebGUI:\r\n\r\n<b>A</b>\r\nThe links throughout the style.\r\n\r\n<b>BODY</b>\r\nThe default setup of all pages within a style.\r\n\r\n<b>H1</b>\r\nThe headers on every page.\r\n\r\n<b>.accountOptions</b>\r\nThe links that appear under the login and account update forms.\r\n\r\n<b>.adminBar </b>\r\nThe bar that appears at the top of the page when you\'re in admin mode.\r\n\r\n<b>.boardData </b>\r\nThe message listings on the message boards.\r\n\r\n<b>.boardHeader </b>\r\nThe header on the message boards.\r\n\r\n<b>.boardMenu </b>\r\nThe menu on the message boards.\r\n\r\n<b>.boardMessage </b>\r\nThe full message text.\r\n\r\n<b>.boardTitle </b>\r\nThe headings of each column on the message list.\r\n\r\n<b>.content</b>\r\nThe main content area on all pages of the style.\r\n\r\n<b>.crumbTrail </b>\r\nThe crumb trail (if you\'re using that macro).\r\n\r\n<b>.faqQuestion</b>\r\nAn F.A.Q. question. To distinguish it from an answer.\r\n\r\n<b>.formDescription </b>\r\nThe tags on all forms next to the form elements. \r\n\r\n<b>.formSubtext </b>\r\nThe tags below some form elements.\r\n\r\n<b>.highlight </b>\r\nDenotes a highlighted item, such as which message you are viewing within a list.\r\n\r\n<b>.horizontalMenu </b>\r\nThe horizontal menu (if you use a horizontal menu macro).\r\n\r\n<b>.loginBox</b>\r\nThe login box macro.\r\n\r\n<b>.pagination </b>\r\nThe Previous and Next links on pages with pagination.\r\n\r\n<b>.pollAnswer </b>\r\nAn answer on a poll.\r\n\r\n<b>.pollColor </b>\r\nThe color of the percentage bar on a poll.\r\n\r\n<b>.pollQuestion </b>\r\nThe question on a poll.\r\n\r\n<b>.verticalMenu </b>\r\nThe vertical menu (if you use a verticall menu macro).\r\n\r\n','11,16');
|
||||
INSERT INTO help VALUES (18,'US English','Using','Style Sheets','<a href=\"http://www.w3.org/Style/CSS/\">Cascading Style Sheets (CSS)</a> are a great way to manage the look and feel of any web site. They are used extensively in WebGUI.\r\n\r\nIf you are unfamiliar with how to use CSS, <a href=\"http://www.plainblack.com\">Plain Black Software</a> provides training classes on XHTML and CSS. Alternatively, Bradsoft makes an excellent CSS editor called <a href=\"http://www.bradsoft.com/topstyle/index.asp\">Top Style</a>.\r\n\r\nThe following is a list of classes used to control the look of WebGUI:\r\n\r\n<b>A</b>\r\nThe links throughout the style.\r\n\r\n<b>BODY</b>\r\nThe default setup of all pages within a style.\r\n\r\n<b>H1</b>\r\nThe headers on every page.\r\n\r\n<b>.accountOptions</b>\r\nThe links that appear under the login and account update forms.\r\n\r\n<b>.adminBar </b>\r\nThe bar that appears at the top of the page when you\'re in admin mode.\r\n\r\n<b>.boardMenu </b>\r\nThe menu on the message boards.\r\n\r\n<b>.boardMessage </b>\r\nThe full message text.\r\n\r\n<b>.boardTitle </b>\r\nThe title of the message board.\r\n\r\n<b>.content</b>\r\nThe main content area on all pages of the style.\r\n\r\n<b>.crumbTrail </b>\r\nThe crumb trail (if you\'re using that macro).\r\n\r\n<b>.eventTitle </b>\r\nThe title of an individual event.\r\n\r\n<b>.faqQuestion</b>\r\nAn F.A.Q. question. To distinguish it from an answer.\r\n\r\n<b>.formDescription </b>\r\nThe tags on all forms next to the form elements. \r\n\r\n<b>.formSubtext </b>\r\nThe tags below some form elements.\r\n\r\n<b>.highlight </b>\r\nDenotes a highlighted item, such as which message you are viewing within a list.\r\n\r\n<b>.horizontalMenu </b>\r\nThe horizontal menu (if you use a horizontal menu macro).\r\n\r\n<b>.loginBox</b>\r\nThe login box macro.\r\n\r\n<b>.pagination </b>\r\nThe Previous and Next links on pages with pagination.\r\n\r\n<b>.pollAnswer </b>\r\nAn answer on a poll.\r\n\r\n<b>.pollColor </b>\r\nThe color of the percentage bar on a poll.\r\n\r\n<b>.pollQuestion </b>\r\nThe question on a poll.\r\n\r\n<b>.tableData </b>\r\nThe data rows on things like message boards and user contributions.\r\n\r\n<b>.tableHeader </b>\r\nThe headings of columns on things like message boards and user contributions.\r\n\r\n<b>.verticalMenu </b>\r\nThe vertical menu (if you use a verticall menu macro).\r\n\r\n','11,16');
|
||||
INSERT INTO help VALUES (19,'US English','Using','Macros','WebGUI macros are used to create dynamic content within otherwise static content. For instance, you may wish to show which user is logged in on every page, or you may wish to have a dynamically built menu or crumb trail. \r\n\r\nMacros always begin with a carrot (^) and follow with one other character. The following is a description of all the macros in the WebGUI system.\r\n\r\n<b>^^ - Carrot</b>\r\nSince the carrot symbol is used to start all macros, this macro is in place just in case you really wanted to use a carrot somewhere.\r\n\r\n<b>^/ - System URL</b>\r\nThe URL to the gateway script (including the domain for this site). This is often used within pages so that if your development server is on a domain different than your production server that your URLs will still worked when moved.\r\n\r\n<b>^@ - Username</b>\r\nThe username of the currently logged in user.\r\n\r\n<b>^# - User ID</b>\r\nThe user id of the currently logged in user.\r\n\r\n<b>^* - Random Number</b>\r\nA randomly generated number. This is often used on images (such as banner ads) that you want to ensure do not cache.\r\n\r\n<b>^a - My Account Link</b>\r\nA link to your account information.\r\n\r\n<b>^C - Crumb Trail</b>\r\nA dynamically generated crumb trail to the current page.\r\n\r\n<b>^D - Date</b>\r\nThe current date and time.\r\n\r\n<b>^H - Home Link</b>\r\nA link to the home page of this site.\r\n\r\n<b>^L - Login</b>\r\nA small login form.\r\n\r\n<b>^M - Current Menu (Vertical)</b>\r\nA vertical menu containing the sub-pages at the current level.\r\n\r\n<b>^m - Current Menu (Horizontal)</b>\r\nA horizontal menu containing the sub-pages at the current level.\r\n\r\n<b>^T - Top Level Menu (Vertical)</b>\r\nA vertical menu containing the main pages of the site (aka the sub-pages from the home page).\r\n\r\n<b>^t - Top Level Menu (Horizontal)</b>\r\nA vertical menu containing the main pages of the site (aka the sub-pages from the home page).\r\n\r\n','11,16,12');
|
||||
INSERT INTO help VALUES (20,'US English','Add','SQL Report','SQL Reports are perhaps the most powerful widget in the WebGUI arsenal. They allow a user to query data from any database that they have access to. This is great for getting sales figures from your Accounting database or even summarizing all the message boards on your web site.\r\n\r\n<b>Title</b>\r\nThe title of this report.\r\n\r\n<b>Display Title?</b>\r\nDo you wish to display the title of the report? If so, check the box.\r\n\r\n<b>Process Macros</b>\r\nDo you wish to process WebGUI Macros on this report? If so, check the box.\r\n\r\n<b>Description</b>\r\nDescribe the content of this report so your users will better understand what the report is all about.\r\n\r\n<b>Template</b>\r\nLayout a template of how this report should look. Usually you\'ll use HTML tables to generate a report. An example is included below.\r\n\r\nThere are 11 special macro characters used in generating SQL Reports. They are ^-, ^0, ^1, ^2, ^3, ^4, ^5, ^6, ^7, ^8, and ^9. These macros will be processed regardless of whether you checked the process macros box above. The ^- macro represents split points in the document where the report will begin and end looping. The numeric macros represent the data fields that will be returned from your query. Note that you may only have 10 fields returned per row in your query.\r\n\r\n<i>Sample Template:</i>\r\n<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\n<b>Query</b>\r\nThis is a standard SQL query. If you are unfamiliar with SQL, <a href=\"http://www.plainblack.com\">Plain Black Software</a> provides training courses in SQL and database management.\r\n\r\n<b>DSN</b>\r\n<b>D</b>ata <b>S</b>ource <b>N</b>ame is the unique identifier that Perl uses to describe the location of your database. It takes the format of DBI:[driver]:[database name]:[host]. \r\n\r\n<i>Example:</i> DBI:mysql:WebGUI:localhost\r\n\r\n<b>Database User</b>\r\nThe username you use to connect to the DSN.\r\n\r\n<b>Database Password</b>\r\nThe password you use to connect to the DSN.\r\n','19');
|
||||
|
||||
#
|
||||
# Table structure for table 'incrementer'
|
||||
|
|
@ -346,7 +349,6 @@ CREATE TABLE incrementer (
|
|||
#
|
||||
|
||||
INSERT INTO incrementer VALUES ('groupId',26);
|
||||
INSERT INTO incrementer VALUES ('helpId',20);
|
||||
INSERT INTO incrementer VALUES ('messageId',1);
|
||||
INSERT INTO incrementer VALUES ('pageId',26);
|
||||
INSERT INTO incrementer VALUES ('styleId',26);
|
||||
|
|
@ -355,6 +357,7 @@ INSERT INTO incrementer VALUES ('widgetId',1);
|
|||
INSERT INTO incrementer VALUES ('eventId',1);
|
||||
INSERT INTO incrementer VALUES ('linkId',1);
|
||||
INSERT INTO incrementer VALUES ('questionId',1);
|
||||
INSERT INTO incrementer VALUES ('submissionId',1);
|
||||
|
||||
#
|
||||
# Table structure for table 'link'
|
||||
|
|
@ -514,7 +517,7 @@ INSERT INTO settings VALUES ('attachmentDirectoryWeb','/uploads');
|
|||
INSERT INTO settings VALUES ('maxAttachmentSize','300');
|
||||
INSERT INTO settings VALUES ('lib','/extras');
|
||||
INSERT INTO settings VALUES ('sessionTimeout','28000');
|
||||
INSERT INTO settings VALUES ('attachmentDirectoryLocal','/path/to/mysite/uploads');
|
||||
INSERT INTO settings VALUES ('attachmentDirectoryLocal','/path/to/uploads/folder');
|
||||
INSERT INTO settings VALUES ('smtpServer','smtp.mycompany.com');
|
||||
INSERT INTO settings VALUES ('companyEmail','info@mycompany.com');
|
||||
INSERT INTO settings VALUES ('companyName','My Company');
|
||||
|
|
@ -1116,7 +1119,7 @@ CREATE TABLE style (
|
|||
|
||||
INSERT INTO style VALUES (1,'Reserved','<body bgcolor=\"#000000\" text=\"#ffffff\">\r\n<table width=\"100%\"><tr><td>^C</td><td align=\"right\">^D</td></tr></table>\r\n<hr>\r\nhorizontal top level menu: ^t\r\n<hr>\r\nhorizontal current level menu: ^m\r\n<hr>\r\n<table width=\"100%\"><tr><td valign=\"top\" width=\"180\">\r\nvertical top level menu: ^T<br>\r\n<hr>\r\nvertical current level menu: ^M<br>\r\n\r\n\r\n</td><td valign=\"top\">\r\n\r\n','</td><td valign=\"top\" width=\"180\">\r\n^@<br>\r\n^#<br>\r\n^*<br>\r\n^?<br>\r\n</td></tr></table>\r\n</body>\r\n</html>\r\n','<style>\r\n/* WebGUI Default Style Sheet */\r\n\r\nH1 {\r\n font-family: verdana, helvetica, arial;\r\n}\r\n\r\n.pagination {\r\n font-family: helvetica, arial;\r\n text-align: center;\r\n width: 100%;\r\n font-size: 8pt;\r\n}\r\n\r\n.adminBar {\r\n background-color: #dddddd;\r\n font-size: 8pt;\r\n font-family: helvetica, arial;\r\n color: #000055;\r\n}\r\n\r\n.crumbTrail {\r\n font-family: helvetica, arial;\r\n color: #dddddd;\r\n font-size: 8pt;\r\n}\r\n\r\n.crumbTrail A {\r\n color: #ffff00;\r\n}\r\n\r\n.crumbTrail A:visited {\r\n color: #ffff00;\r\n}\r\n\r\n.verticalMenu {\r\n font-family: helvetica, arial;\r\n color: #dddddd;\r\n font-size: 10pt;\r\n}\r\n\r\n.verticalMenu A {\r\n color: #ffff00;\r\n}\r\n\r\n.verticalMenu A:visited {\r\n color: #cccc00;\r\n}\r\n\r\n.highlight {\r\n background-color: #800000;\r\n}\r\n\r\n.formDescription {\r\n font-family: helvetica, arial;\r\n color: #dddddd;\r\n font-size: 10pt;\r\n}\r\n\r\n.formSubtext {\r\n font-family: helvetica, arial;\r\n color: #ffffff;\r\n font-size: 8pt;\r\n}\r\n\r\n.boardTitle {\r\n font-size: 16pt;\r\n}\r\n\r\n.boardMenu a {\r\n color: #00ff00;\r\n text-decoration: none;\r\n}\r\n\r\n.boardHeader {\r\n font-weight: bold;\r\n background-color: #008000\r\n}\r\n\r\n.boardData {\r\n font-size: 10pt;\r\n font-family: Helvetica, Arial;\r\n}\r\n\r\n.boardMessage {\r\n font-style: italics;\r\n}\r\n</style>');
|
||||
INSERT INTO style VALUES (2,'Fail Safe','<body>\r\n^H / ^t / ^m / ^a\r\n<hr>','<hr>\r\n^H / ^t / ^m / ^a\r\n</body></html>','<style>\r\n.adminBar {\r\n background-color: #dddddd;\r\n font-size: 8pt;\r\n font-family: helvetica, arial;\r\n color: #000055;\r\n}\r\n</style>');
|
||||
INSERT INTO style VALUES (3,'Plain Black Software','<body bgcolor=\"#555566\" text=\"#ffffff\">\r\n<table width=\"100%\"><tr><td>^C</td><td align=\"right\">^D</td></tr></table>\r\n<table width=\"100%\"><tr><td valign=\"top\" width=\"130\">\r\nuser: ^@\r\n<hr size=1>\r\n^T\r\n<hr size=1>\r\n^M\r\n</td><td valign=\"top\">\r\n\r\n','</td></tr></table><hr size=1>\r\n^H / ^a\r\n</body></html>','<style>\r\n/* WebGUI Default Style Sheet */\r\n\r\nH1 {\r\n font-family: helvetica, arial;\r\n}\r\n\r\nA {\r\n color: #cccc55;\r\n}\r\n\r\n.pagination {\r\n font-family: helvetica, arial;\r\n text-align: center;\r\n width: 100%;\r\n font-size: 8pt;\r\n}\r\n\r\n.adminBar {\r\n background-color: #dddddd;\r\n font-size: 8pt;\r\n font-family: helvetica, arial;\r\n color: #000055;\r\n}\r\n\r\n.crumbTrail {\r\n font-family: helvetica, arial;\r\n color: #dddddd;\r\n font-size: 8pt;\r\n}\r\n\r\n.crumbTrail A {\r\n color: #ffff00;\r\n}\r\n\r\n.crumbTrail A:visited {\r\n color: #ffff00;\r\n}\r\n\r\n.verticalMenu {\r\n font-family: helvetica, arial;\r\n color: #dddddd;\r\n font-size: 10pt;\r\n}\r\n\r\n.verticalMenu A {\r\n color: #ffff00;\r\n}\r\n\r\n.verticalMenu A:visited {\r\n color: #cccc00;\r\n}\r\n\r\n.highlight {\r\n background-color: #666666;\r\n}\r\n\r\n.formDescription {\r\n font-family: helvetica, arial;\r\n font-size: 10pt;\r\n}\r\n\r\n.formSubtext {\r\n font-family: helvetica, arial;\r\n font-size: 8pt;\r\n}\r\n\r\n.boardTitle {\r\n font-family: helvetica, arial;\r\n font-size: 16pt;\r\n}\r\n\r\n.boardMenu a {\r\n text-decoration: none;\r\n}\r\n\r\n.boardHeader {\r\n background-color: #444444;\r\n}\r\n\r\n.boardData {\r\n font-size: 10pt;\r\n font-family: Helvetica, Arial;\r\n}\r\n\r\n.boardMessage {\r\n font-family: Helvetica, Arial;\r\n}\r\n\r\n.pollAnswer {\r\n font-family: Helvetica, Arial;\r\n font-size: 8pt;\r\n}\r\n\r\n.pollColor {\r\n background-color: #ddddff;\r\n}\r\n\r\n.pollQuestion {\r\n font-face: Helvetica, Arial;\r\n font-weight: bold;\r\n}\r\n\r\n</style>');
|
||||
INSERT INTO style VALUES (3,'Plain Black Software','<body bgcolor=\"#eaeaef\" text=\"#000000\" link=\"#5555ff\">\r\n<a href=\"/\"><img src=\"/extras/plainBlackSoftware.gif\" border=0></a>\r\n<table width=\"100%\"><tr><td>^C</td><td align=\"right\">^D</td></tr></table>\r\n<table width=\"100%\"><tr><td valign=\"top\" width=\"130\">\r\nuser: ^@\r\n<hr size=1>\r\n^T\r\n</td><td valign=\"top\">\r\n^m\r\n','</td></tr></table><hr size=1>\r\n<a href=\"/\"><img src=\"/extras/pbs.gif\" border=0 align=\"right\"></a>\r\n^H / ^a\r\n</body></html>','<style>\r\n/* WebGUI Default Style Sheet */\r\n\r\n.content, body {\r\n background-color: #eaeaef;\r\n color: #000000;\r\n font-family: helvetica, arial;\r\n font-size: 10pt;\r\n}\r\n\r\n.verticalMenu {\r\n font-size: 10pt;\r\n}\r\nH1 {\r\n font-family: helvetica, arial;\r\n}\r\n\r\nA {\r\n color: #5555ff;\r\n}\r\n\r\n.pagination {\r\n font-family: helvetica, arial;\r\n text-align: center;\r\n width: 100%;\r\n font-size: 8pt;\r\n}\r\n\r\n.horizontalMenu {\r\n font-size: 8pt;\r\n background-color: #ffffff;\r\n font-weight: bold;\r\n border: 1px;\r\n width: 100%;\r\n}\r\n\r\n.adminBar {\r\n background-color: #dddddd;\r\n font-size: 8pt;\r\n font-family: helvetica, arial;\r\n color: #000055;\r\n}\r\n\r\n.crumbTrail {\r\n font-family: helvetica, arial;\r\n color: #666666;\r\n font-size: 8pt;\r\n}\r\n\r\n.crumbTrail A {\r\n color: #555555;\r\n}\r\n\r\n.crumbTrail A:visited {\r\n color: #666666;\r\n}\r\n\r\n.highlight {\r\n background-color: #aaaaaa;\r\n}\r\n\r\n.formDescription {\r\n font-family: helvetica, arial;\r\n font-size: 10pt;\r\n}\r\n\r\n.formSubtext {\r\n font-family: helvetica, arial;\r\n font-size: 8pt;\r\n}\r\n\r\n.boardTitle {\r\n font-family: helvetica, arial;\r\n font-size: 16pt;\r\n}\r\n\r\n.boardMenu a {\r\n font-size: 10pt;\r\n text-decoration: none;\r\n}\r\n\r\n.tableHeader {\r\n background-color: #cccccc;\r\n font-size: 10pt;\r\n}\r\n\r\n.tableData {\r\n font-size: 10pt;\r\n font-family: Helvetica, Arial;\r\n}\r\n\r\n.boardMessage {\r\n font-size: 10pt;\r\n font-family: Helvetica, Arial;\r\n}\r\n\r\n.pollAnswer {\r\n font-family: Helvetica, Arial;\r\n font-size: 8pt;\r\n}\r\n\r\n.pollColor {\r\n background-color: #ffddbb;\r\n}\r\n\r\n.pollQuestion {\r\n font-face: Helvetica, Arial;\r\n font-weight: bold;\r\n}\r\n\r\n</style>');
|
||||
INSERT INTO style VALUES (4,'Reserved','<body>','</body></html>',NULL);
|
||||
INSERT INTO style VALUES (5,'Reserved','<body>','</body></html>',NULL);
|
||||
INSERT INTO style VALUES (6,'Reserved','<body>','</body></html>',NULL);
|
||||
|
|
@ -1140,6 +1143,29 @@ INSERT INTO style VALUES (23,'Reserved','<body>','</body></html>',NULL);
|
|||
INSERT INTO style VALUES (24,'Reserved','<body>','</body></html>',NULL);
|
||||
INSERT INTO style VALUES (25,'Yahoo!','<html><head><title>Yahoo!</title><meta http-equiv=\"PICS-Label\" content=\'(PICS-1.1 \"http://www.rsac.org/ratingsv01.html\" l gen true for \"http://www.yahoo.com\" r (n 0 s 0 v 0 l 0))\'></head><body>\r\n<script language=javascript><!--\r\nfunction f(){\r\nvar f,m,p,a,i,k,o,e,l,c,d;\r\nf=\"0123456789abcdefghijklmnopqrstuvwxyz\";\r\nm=new Array;\r\np=\"claim-your-name\";\r\na=10;\r\nfor(i=0;i<36;i++){\r\n if(i==26)a=-26;\r\n m[f.charAt(i)]=f.charAt(i+a);\r\n}\r\nk=document.cookie;\r\nif((o=k.indexOf(\"Y=\"))==-1)return p;\r\nif((o=k.indexOf(\"l=\",o+2))==-1)return p;\r\nif((e=k.indexOf(\"/\",o+2))==-1)return p;\r\nif(e>o+18)e=o+18;\r\nl=k.substring(o+2,e);\r\np=\"\";\r\nfor(i=0;i<l.length;i++){\r\n c=l.charAt(i);\r\n if(m[c])p+=m[c];else p+=\'-\';\r\n}\r\nreturn p;\r\n}\r\nd=f();//-->\r\n</script>\r\n<center><form name=f action=http://search.yahoo.com/bin/search><map name=m><area coords=\"0,0,52,52\" href=r/c1><area coords=\"53,0,121,52\" href=r/p1><area coords=\"122,0,191,52\" href=r/m1><area coords=\"441,0,510,52\" href=r/wn><area coords=\"511,0,579,52\" href=r/i1><area coords=\"580,0,637,52\" href=r/hw></map><img width=638 height=53 border=0 usemap=\"#m\" src=http://us.a1.yimg.com/us.yimg.com/i/ww/m5v5.gif alt=Yahoo><br><table border=0 cellspacing=0 cellpadding=3 width=640><tr><td align=center width=205>\r\n<font color=ff0020>new!</font> <a href=\"http://www.yahoo.com/homet/?http://new.domains.yahoo.com\"><b>Y! Domains</b></a><br><small>reserve .biz & .info domains</small></td><td align=center><a href=\"http://rd.yahoo.com/M=77122.1317476.2909345.220161/D=yahoo_top/S=2716149:NP/A=656341/?http://website.yahoo.com/\" target=\"_top\"><img width=230 height=33 src=\"http://us.a1.yimg.com/us.yimg.com/a/pr/promo/anchor/hp_website2.gif\" alt=\"\" border=0></a></td><td align=center width=205><a href=\"http://www.yahoo.com//homet/?http://mail.yahoo.com\"><b>Yahoo! Mail</b></a><br>you@yahoo.com</td></tr><tr><td colspan=3 align=center><input size=30 name=p>\r\n<input type=submit value=Search> <a href=http://www.yahoo.com/r/so>advanced search</a></td></tr></table>\r\n</form>\r\n<div align=\"left\">\r\n','</div>\r\n<hr noshade size=1 width=640><small><a href=http://www.yahoo.com/r/ad>How to Suggest a Site</a> -\r\n<a href=http://www.yahoo.com/r/cp>Company Info</a> -\r\n<a href=http://www.yahoo.com/r/cy>Copyright Policy</a> -\r\n<a href=http://www.yahoo.com/r/ts>Terms of Service</a> -\r\n<a href=http://www.yahoo.com/r/cb>Contributors</a> -\r\n<a href=http://www.yahoo.com/r/hr>Jobs</a> -\r\n<a href=http://www.yahoo.com/r/ao>Advertising</a><p>Copyright © 2001 Yahoo! Inc. All rights reserved.</small><br><a href=http://www.yahoo.com/r/pv>Privacy Policy</a></form></center></body></html>\r\n','');
|
||||
|
||||
#
|
||||
# Table structure for table 'submission'
|
||||
#
|
||||
|
||||
CREATE TABLE submission (
|
||||
widgetId int(11) default NULL,
|
||||
submissionId int(11) NOT NULL default '0',
|
||||
title varchar(30) default NULL,
|
||||
dateSubmitted datetime default NULL,
|
||||
username varchar(30) default NULL,
|
||||
userId int(11) default NULL,
|
||||
content text,
|
||||
image varchar(255) default NULL,
|
||||
attachment varchar(255) default NULL,
|
||||
status varchar(30) default NULL,
|
||||
PRIMARY KEY (submissionId)
|
||||
) TYPE=MyISAM;
|
||||
|
||||
#
|
||||
# Dumping data for table 'submission'
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Table structure for table 'url'
|
||||
#
|
||||
|
|
@ -1229,6 +1255,10 @@ CREATE TABLE widget (
|
|||
displayTitle int(11) NOT NULL default '1',
|
||||
description text,
|
||||
processMacros int(11) NOT NULL default '0',
|
||||
dateAdded datetime default NULL,
|
||||
addedBy int(11) default NULL,
|
||||
lastEdited datetime default NULL,
|
||||
editedBy int(11) default NULL,
|
||||
PRIMARY KEY (widgetId)
|
||||
) TYPE=MyISAM;
|
||||
|
||||
|
|
|
|||
1239
docs/previousVersion.sql
Normal file
1239
docs/previousVersion.sql
Normal file
File diff suppressed because it is too large
Load diff
39
docs/upgrade-0.9.0_0.10.0.sql
Normal file
39
docs/upgrade-0.9.0_0.10.0.sql
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
alter table Poll add column graphWidth int not null default 150;
|
||||
drop table UserContribution;
|
||||
CREATE TABLE UserSubmission (
|
||||
widgetId int(11) NOT NULL default '0',
|
||||
groupToContribute int(11) default NULL,
|
||||
submissionsPerPage int(11) NOT NULL default '50',
|
||||
defaultStatus varchar(30) default 'Approved',
|
||||
PRIMARY KEY (widgetId)
|
||||
) TYPE=MyISAM;
|
||||
delete from help where helpId=18;
|
||||
INSERT INTO help VALUES (18,'US English','Using','Style Sheets','<a href=\"http://www.w3.org/Style/CSS/\">Cascading Style Sheets (CSS)</a> are a great way to manage the look and feel of any web site. They are used extensively in WebGUI.\r\n\r\nIf you are unfamiliar with how to use CSS, <a href=\"http://www.plainblack.com\">Plain Black Software</a> provides training classes on XHTML and CSS. Alternatively, Bradsoft makes an excellent CSS editor called <a href=\"http://www.bradsoft.com/topstyle/index.asp\">Top Style</a>.\r\n\r\nThe following is a list of classes used to control the look of WebGUI:\r\n\r\n<b>A</b>\r\nThe links throughout the style.\r\n\r\n<b>BODY</b>\r\nThe default setup of all pages within a style.\r\n\r\n<b>H1</b>\r\nThe headers on every page.\r\n\r\n<b>.accountOptions</b>\r\nThe links that appear under the login and account update forms.\r\n\r\n<b>.adminBar </b>\r\nThe bar that appears at the top of the page when you\'re in admin mode.\r\n\r\n<b>.boardMenu </b>\r\nThe menu on the message boards.\r\n\r\n<b>.boardMessage </b>\r\nThe full message text.\r\n\r\n<b>.boardTitle </b>\r\nThe title of the message board.\r\n\r\n<b>.content</b>\r\nThe main content area on all pages of the style.\r\n\r\n<b>.crumbTrail </b>\r\nThe crumb trail (if you\'re using that macro).\r\n\r\n<b>.eventTitle </b>\r\nThe title of an individual event.\r\n\r\n<b>.faqQuestion</b>\r\nAn F.A.Q. question. To distinguish it from an answer.\r\n\r\n<b>.formDescription </b>\r\nThe tags on all forms next to the form elements. \r\n\r\n<b>.formSubtext </b>\r\nThe tags below some form elements.\r\n\r\n<b>.highlight </b>\r\nDenotes a highlighted item, such as which message you are viewing within a list.\r\n\r\n<b>.horizontalMenu </b>\r\nThe horizontal menu (if you use a horizontal menu macro).\r\n\r\n<b>.loginBox</b>\r\nThe login box macro.\r\n\r\n<b>.pagination </b>\r\nThe Previous and Next links on pages with pagination.\r\n\r\n<b>.pollAnswer </b>\r\nAn answer on a poll.\r\n\r\n<b>.pollColor </b>\r\nThe color of the percentage bar on apoll.\r\n\r\n<b>.pollQuestion </b>\r\nThe question on a poll.\r\n\r\n<b>.tableData </b>\r\nThe data rows on things like message boards and user contributions.\r\n\r\n<b>.tableHeader </b>\r\nThe headings of columns on things like message boards and user contributions.\r\n\r\n<b>.verticalMenu </b>\r\nThe vertical menu (if you use a verticall menu macro).\r\n\r\n','11,16');
|
||||
delete from help where helpId=19;
|
||||
INSERT INTO help VALUES (19,'US English','Using','Macros','WebGUI macros are used to create dynamic content within otherwise static content. For instance, you may wish to show which user is logged in on every page, or you may wish to have a dynamically built menu or crumb trail. \r\n\r\nMacros always begin with a carrot (^) and follow with one other character. The following is a description of all the macros in the WebGUI system.\r\n\r\n<b>^^ - Carrot</b>\r\nSince the carrot symbol is used to start all macros, this macro is in place just in case you really wanted to use a carrot somewhere.\r\n\r\n<b>^/ - System URL</b>\r\nThe URL to the gateway script (including the domain for this site). This is often used within pages so that if your development server is on a domain different than your production server that your URLs will still worked when moved.\r\n\r\n<b>^@ - Username</b>\r\nThe username of the currently logged in user.\r\n\r\n<b>^# - User ID</b>\r\nThe user id of the currently logged in user.\r\n\r\n<b>^* - Random Number</b>\r\nA randomly generated number. This is often used on images (such as banner ads) that you want to ensure do not cache.\r\n\r\n<b>^a - My Account Link</b>\r\nA link to your account information.\r\n\r\n<b>^C - Crumb Trail</b>\r\nA dynamically generated crumb trail to the current page.\r\n\r\n<b>^D - Date</b>\r\nThe current date and time.\r\n\r\n<b>^H - Home Link</b>\r\nA link to the home page of this site.\r\n\r\n<b>^L - Login</b>\r\nA small login form.\r\n\r\n<b>^M - Current Menu (Vertical)</b>\r\nA vertical menu containing the sub-pages at the current level.\r\n\r\n<b>^m - Current Menu (Horizontal)</b>\r\nA horizontal menu containing the sub-pages at the current level.\r\n\r\n<b>^T - Top Level Menu (Vertical)</b>\r\nA vertical menu containing the main pages of the site (aka the sub-pages from the home page).\r\n\r\n<b>^t - Top Level Menu (Horizontal)</b>\r\nA vertical menu containing the main pages of the site (aka the sub-pages from the home page).\r\n\r\n','11,16,12');
|
||||
INSERT INTO help VALUES (20,'US English','Add','SQL Report','SQL Reports are perhaps the most powerful widget in the WebGUI arsenal. They allow a user to query data from any database that they have access to. This is great for getting sales figures from your Accounting database or even summarizing all the message boards on your web site.\r\n\r\n<b>Title</b>\r\nThe title of this report.\r\n\r\n<b>Display Title?</b>\r\nDo you wish to display the title of the report? If so, check the box.\r\n\r\n<b>Process Macros</b>\r\nDo you wish to process WebGUI Macros on this report? If so, check the box.\r\n\r\n<b>Description</b>\r\nDescribe the content of this report so your users will better understand what the report is all about.\r\n\r\n<b>Template</b>\r\nLayout a template of how this report should look. Usually you\'ll use HTML tables to generate a report. An example is included below.\r\n\r\nThere are 11 special macro characters used in generating SQL Reports. They are ^-, ^0, ^1, ^2, ^3, ^4, ^5, ^6, ^7, ^8, and ^9. These macros will be processed regardless of whether you checked the process macros box above. The ^- macro represents split points in the document where the report will begin and end looping. The numeric macros represent the data fields that will be returned from your query. Note that you may only have 10 fields returned per row in your query.\r\n\r\n<i>Sample Template:</i>\r\n<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\n<b>Query</b>\r\nThis is a standard SQL query. If you are unfamiliar with SQL, <a href=\"http://www.plainblack.com\">Plain Black Software</a> provides training courses in SQL and database management.\r\n\r\n<b>DSN</b>\r\n<b>D</b>ata <b>S</b>ource <b>N</b>ame is the unique identifier that Perl uses to describe the location of your database. It takes the format of DBI:[driver]:[database name]:[host]. \r\n\r\n<i>Example:</i> DBI:mysql:WebGUI:localhost\r\n\r\n<b>Database User</b>\r\nThe username you use to connect to the DSN.\r\n\r\n<b>Database Password</b>\r\nThe password you use to connect to the DSN.\r\n','19');
|
||||
delete from incrementer where incrementerId='helpId';
|
||||
insert into incrementer values ('submissionId',1);
|
||||
delete from style where styleId=3;
|
||||
INSERT INTO style VALUES (3,'Plain Black Software','<body bgcolor=\"#eaeaef\" text=\"#000000\" link=\"#5555ff\">\r\n<a href=\"/\"><img src=\"/extras/plainBlackSoftware.gif\" border=0></a>\r\n<table width=\"100%\"><tr><td>^C</td><td align=\"right\">^D</td></tr></table>\r\n<table width=\"100%\"><tr><td valign=\"top\" width=\"130\">\r\nuser: ^@\r\n<hr size=1>\r\n^T\r\n</td><td valign=\"top\">\r\n^m\r\n','</td></tr></table><hr size=1>\r\n<a href=\"/\"><img src=\"/extras/pbs.gif\" border=0 align=\"right\"></a>\r\n^H / ^a\r\n</body></html>','<style>\r\n/* WebGUI Default Style Sheet */\r\n\r\n.content, body {\r\n background-color: #eaeaef;\r\n color: #000000;\r\n font-family: helvetica, arial;\r\n font-size: 10pt;\r\n}\r\n\r\n.verticalMenu {\r\n font-size: 10pt;\r\n}\r\nH1 {\r\n font-family: helvetica, arial;\r\n}\r\n\r\nA {\r\n color: #5555ff;\r\n}\r\n\r\n.pagination {\r\n font-family: helvetica, arial;\r\n text-align: center;\r\n width: 100%;\r\n font-size: 8pt;\r\n}\r\n\r\n.horizontalMenu {\r\n font-size: 8pt;\r\n background-color: #ffffff;\r\n font-weight: bold;\r\n border: 1px;\r\n width: 100%;\r\n}\r\n\r\n.adminBar {\r\n background-color: #dddddd;\r\n font-size: 8pt;\r\n font-family: helvetica, arial;\r\n color: #000055;\r\n}\r\n\r\n.crumbTrail {\r\n font-family: helvetica, arial;\r\n color: #666666;\r\n font-size: 8pt;\r\n}\r\n\r\n.crumbTrail A {\r\n color: #555555;\r\n}\r\n\r\n.crumbTrail A:visited {\r\n color: #666666;\r\n}\r\n\r\n.highlight {\r\n background-color: #aaaaaa;\r\n}\r\n\r\n.formDescription {\r\n font-family: helvetica, arial;\r\n font-size: 10pt;\r\n}\r\n\r\n.formSubtext {\r\n font-family: helvetica, arial;\r\n font-size: 8pt;\r\n}\r\n\r\n.boardTitle {\r\n font-family: helvetica, arial;\r\n font-size: 16pt;\r\n}\r\n\r\n.boardMenu a {\r\n font-size: 10pt;\r\n text-decoration: none;\r\n}\r\n\r\n.tableHeader {\r\n background-color: #cccccc;\r\n font-size: 10pt;\r\n}\r\n\r\n.tableData {\r\n font-size: 10pt;\r\n font-family: Helvetica, Arial;\r\n}\r\n\r\n.boardMessage {\r\n font-size: 10pt;\r\n font-family: Helvetica, Arial;\r\n}\r\n\r\n.pollAnswer {\r\n font-family: Helvetica, Arial;\r\n font-size: 8pt;\r\n}\r\n\r\n.pollColor {\r\n background-color: #ffddbb;\r\n}\r\n\r\n.pollQuestion {\r\n font-face: Helvetica, Arial;\r\n font-weight: bold;\r\n}\r\n\r\n</style>');
|
||||
CREATE TABLE submission (
|
||||
widgetId int(11) default NULL,
|
||||
submissionId int(11) NOT NULL default '0',
|
||||
title varchar(30) default NULL,
|
||||
dateSubmitted datetime default NULL,
|
||||
username varchar(30) default NULL,
|
||||
userId int(11) default NULL,
|
||||
content text,
|
||||
image varchar(255) default NULL,
|
||||
attachment varchar(255) default NULL,
|
||||
status varchar(30) default NULL,
|
||||
PRIMARY KEY (submissionId)
|
||||
) TYPE=MyISAM;
|
||||
|
||||
alter table widget change sequenceNumber sequenceNumber int not null default 1;
|
||||
alter table widget add dateAdded dateTime;
|
||||
alter table widget add addedBy int;
|
||||
alter table widget add lastEdited dateTime;
|
||||
alter table widget add editedBy int;
|
||||
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ function centerText(obj) {
|
|||
|
||||
function colorText(obj) {
|
||||
formObj = obj;
|
||||
window.open("/lib/colorPicker.html","colorPicker","width=438,height=258");
|
||||
window.open("/extras/colorPicker.html","colorPicker","width=438,height=258");
|
||||
}
|
||||
|
||||
function copyright(obj) {
|
||||
|
|
@ -69,7 +69,7 @@ function setColor(remoteColor) {
|
|||
|
||||
function showMe(obj) {
|
||||
formObj = obj;
|
||||
window.open("/lib/viewer.html","showMeViewer","width=500,height=300,scrollbars=1");
|
||||
window.open("/extras/viewer.html","showMeViewer","width=500,height=300,scrollbars=1");
|
||||
}
|
||||
|
||||
function trademark(obj) {
|
||||
|
|
|
|||
BIN
extras/attachment.gif
Normal file
BIN
extras/attachment.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 291 B |
BIN
extras/pbs.gif
Normal file
BIN
extras/pbs.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
BIN
extras/plainBlackSoftware.gif
Normal file
BIN
extras/plainBlackSoftware.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
|
|
@ -44,21 +44,24 @@ sub _displayAdminBar {
|
|||
}
|
||||
$clipboardSelect = WebGUI::Form::selectList("clipboardSelect",\%hash2,"","","","goClipboard()");
|
||||
#--admin functions
|
||||
%hash = ( $session{page}{url}=>'Manage...',
|
||||
$session{env}{SCRIPT_NAME}.'/clipboard'=>'Clipboard',
|
||||
$session{page}{url}.'?op=listGroups'=>'Groups',
|
||||
$session{page}{url}.'?op=editSettings'=>'Settings',
|
||||
$session{page}{url}.'?op=listStyles'=>'Styles',
|
||||
$session{env}{SCRIPT_NAME}.'/trash'=>'Trash',
|
||||
$session{page}{url}.'?op=listUsers'=>'Users'
|
||||
);
|
||||
%hash = ();
|
||||
if (WebGUI::Privilege::isInGroup(3,$session{user}{userId})) {
|
||||
%hash = (
|
||||
$session{page}{url}.'?op=editSettings'=>'Edit Settings',
|
||||
$session{page}{url}.'?op=listGroups'=>'Manage Groups',
|
||||
$session{page}{url}.'?op=listStyles'=>'Manage Styles',
|
||||
$session{page}{url}.'?op=listUsers'=>'Manage Users',
|
||||
$session{env}{SCRIPT_NAME}.'/clipboard'=>'View Clipboard',
|
||||
$session{env}{SCRIPT_NAME}.'/trash'=>'View Trash'
|
||||
);
|
||||
}
|
||||
%hash = ( $session{page}{url}=>'Admin...',
|
||||
$session{page}{url}.'?op=switchOffAdmin'=>'Turn Admin Off',
|
||||
$session{page}{url}.'?op=viewHelpIndex'=>'View Help Index',
|
||||
$session{page}{url}.'?op=viewPendingSubmissions'=>'View Pending Submissions',
|
||||
%hash
|
||||
);
|
||||
$adminSelect = WebGUI::Form::selectList("adminSelect",\%hash,"","","","goAdmin()");
|
||||
#--misc functions
|
||||
%hash = ( $session{page}{url}=>'Miscellaneous functions...',
|
||||
$session{page}{url}.'?op=switchOffAdmin'=>'Turn Admin Off',
|
||||
$session{page}{url}.'?op=viewHelpIndex'=>'View Help Index'
|
||||
);
|
||||
$miscSelect = WebGUI::Form::selectList("miscSelect",\%hash,"","","","goMisc()");
|
||||
#--output admin bar
|
||||
$output = '
|
||||
<div class="adminBar"><table class="adminBar" width="100%" cellpadding="3" cellspacing="0" border="0"><tr>
|
||||
|
|
@ -72,18 +75,10 @@ sub _displayAdminBar {
|
|||
function goClipboard(){
|
||||
location = document.clipboard.clipboardSelect.options[document.clipboard.clipboardSelect.selectedIndex].value
|
||||
}
|
||||
function goMisc(){
|
||||
location = document.misc.miscSelect.options[document.misc.miscSelect.selectedIndex].value
|
||||
}
|
||||
//--> </script>
|
||||
<form name="content"> <td>'.$contentSelect.'</td> </form>
|
||||
<form name="clipboard"> <td align="center">'.$clipboardSelect.'</td> </form>
|
||||
';
|
||||
if (WebGUI::Privilege::isInGroup(3,$session{user}{userId})) {
|
||||
$output .= '<form name="admin"> <td align="center">'.$adminSelect.'</td> </form> ';
|
||||
}
|
||||
$output .= '
|
||||
<form name="misc"> <td align="right">'.$miscSelect.'</td> </form>
|
||||
<form name="admin"> <td align="center">'.$adminSelect.'</td> </form>
|
||||
</tr></table></div>
|
||||
';
|
||||
return $output;
|
||||
|
|
@ -135,7 +130,7 @@ sub page {
|
|||
#if (WebGUI::Privilege::canViewPage($session{page}{pageId})) {
|
||||
if (WebGUI::Privilege::canViewPage()) {
|
||||
if ($session{var}{adminOn}) {
|
||||
$content .= '<a href="'.$session{page}{url}.'?op=editPage"><img src="'.$session{setting}{lib}.'/edit.gif" border=0></a><a href="'.$session{page}{url}.'?op=cutPage"><img src="'.$session{setting}{lib}.'/cut.gif" border=0></a><a href="'.$session{page}{url}.'?op=deletePage"><img src="'.$session{setting}{lib}.'/delete.gif" border=0></a>';
|
||||
$content .= '<a href="'.$session{page}{url}.'?op=editPage"><img src="'.$session{setting}{lib}.'/edit.gif" border=0></a><a href="'.$session{page}{url}.'?op=cutPage"><img src="'.$session{setting}{lib}.'/cut.gif" border=0></a><a href="'.$session{page}{url}.'?op=deletePage"><img src="'.$session{setting}{lib}.'/delete.gif" border=0></a><a href="'.$session{page}{url}.'?op=movePageUp"><img src="'.$session{setting}{lib}.'/leftArrow.gif" border=0></a><a href="'.$session{page}{url}.'?op=movePageDown"><img src="'.$session{setting}{lib}.'/rightArrow.gif" border=0></a>';
|
||||
}
|
||||
$sth = WebGUI::SQL->read("select widgetId, widgetType from widget where pageId=".$session{page}{pageId}." order by sequenceNumber, widgetId",$session{dbh});
|
||||
while (@widgetList = $sth->array) {
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ sub process {
|
|||
}
|
||||
#---crumb trail---
|
||||
if ($output =~ /\^C/) {
|
||||
$temp = '<span class="crumbTrail">'._recurseCrumbTrail($session{page}{parentId}).$session{page}{title}.'</span>';
|
||||
$temp = '<span class="crumbTrail">'._recurseCrumbTrail($session{page}{parentId}).'<a href="'.$session{page}{url}.'">'.$session{page}{title}.'</a></span>';
|
||||
$output =~ s/\^C/$temp/g;
|
||||
}
|
||||
#---date---
|
||||
|
|
@ -100,7 +100,7 @@ sub process {
|
|||
#---current menu vertical---
|
||||
if ($output =~ /\^M/) {
|
||||
$temp = '<span class="verticalMenu">';
|
||||
$sth = WebGUI::SQL->read("select title,urlizedTitle,pageId from page where parentId=$session{page}{pageId}",$session{dbh});
|
||||
$sth = WebGUI::SQL->read("select title,urlizedTitle,pageId from page where parentId=$session{page}{pageId} order by sequenceNumber",$session{dbh});
|
||||
while (@data = $sth->array) {
|
||||
if (WebGUI::Privilege::canViewPage($data[2])) {
|
||||
$temp .= '<a href="'.$session{env}{SCRIPT_NAME}.'/'.$data[1].'">'.$data[0].'</a><br>';
|
||||
|
|
@ -114,7 +114,7 @@ sub process {
|
|||
if ($output =~ /\^m/) {
|
||||
$temp = '<span class="horizontalMenu">';
|
||||
$first = 1;
|
||||
$sth = WebGUI::SQL->read("select title,urlizedTitle,pageId from page where parentId=$session{page}{pageId}",$session{dbh});
|
||||
$sth = WebGUI::SQL->read("select title,urlizedTitle,pageId from page where parentId=$session{page}{pageId} order by sequenceNumber",$session{dbh});
|
||||
while (@data = $sth->array) {
|
||||
if (WebGUI::Privilege::canViewPage($data[2])) {
|
||||
if ($first) {
|
||||
|
|
@ -132,7 +132,7 @@ sub process {
|
|||
#---top menu vertical---
|
||||
if ($output =~ /\^T/) {
|
||||
$temp = '<span class="verticalMenu">';
|
||||
$sth = WebGUI::SQL->read("select title,urlizedTitle,pageId from page where parentId=1",$session{dbh});
|
||||
$sth = WebGUI::SQL->read("select title,urlizedTitle,pageId from page where parentId=1 order by sequenceNumber",$session{dbh});
|
||||
while (@data = $sth->array) {
|
||||
if (WebGUI::Privilege::canViewPage($data[2])) {
|
||||
$temp .= '<a href="'.$session{env}{SCRIPT_NAME}.'/'.$data[1].'">'.$data[0].'</a><br>';
|
||||
|
|
@ -146,7 +146,7 @@ sub process {
|
|||
if ($output =~ /\^t/) {
|
||||
$temp = '<span class="horizontalMenu">';
|
||||
$first = 1;
|
||||
$sth = WebGUI::SQL->read("select title,urlizedTitle,pageId from page where parentId=1",$session{dbh});
|
||||
$sth = WebGUI::SQL->read("select title,urlizedTitle,pageId from page where parentId=1 order by sequenceNumber",$session{dbh});
|
||||
while (@data = $sth->array) {
|
||||
if (WebGUI::Privilege::canViewPage($data[2])) {
|
||||
if ($first) {
|
||||
|
|
|
|||
|
|
@ -15,9 +15,10 @@ use WebGUI::Operation::Account;
|
|||
use WebGUI::Operation::Admin;
|
||||
use WebGUI::Operation::Group;
|
||||
use WebGUI::Operation::Help;
|
||||
use WebGUI::Operation::Page;
|
||||
use WebGUI::Operation::Settings;
|
||||
use WebGUI::Operation::Style;
|
||||
use WebGUI::Operation::Page;
|
||||
use WebGUI::Operation::Submission;
|
||||
use WebGUI::Operation::User;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ sub www_saveAccount {
|
|||
if ($error eq "") {
|
||||
$encryptedPassword = Digest::MD5::md5_base64($session{form}{identifier1});
|
||||
$uid = getNextId("userId");
|
||||
WebGUI::SQL->write("insert into user set userId=".getNextId("userId").", username=".quote($session{form}{username}).", identifier=".quote($encryptedPassword).", email=".quote($session{form}{email}).", icq=".quote($session{form}{icq}),$session{dbh});
|
||||
WebGUI::SQL->write("insert into user set userId=$uid, username=".quote($session{form}{username}).", identifier=".quote($encryptedPassword).", email=".quote($session{form}{email}).", icq=".quote($session{form}{icq}),$session{dbh});
|
||||
WebGUI::SQL->write("insert into groupings set groupId=2,userId=$uid",$session{dbh});
|
||||
_login($uid,$encryptedPassword);
|
||||
$output .= 'Account created successfully!<p>';
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ use WebGUI::SQL;
|
|||
use WebGUI::Utility;
|
||||
|
||||
our @ISA = qw(Exporter);
|
||||
our @EXPORT = qw(&www_addPage &www_addPageSave &www_cutPage &www_deletePage &www_deletePageConfirm &www_editPage &www_editPageSave &www_pastePage);
|
||||
our @EXPORT = qw(&www_movePageUp &www_movePageDown &www_addPage &www_addPageSave &www_cutPage &www_deletePage &www_deletePageConfirm &www_editPage &www_editPageSave &www_pastePage);
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub _recursivelyChangePrivileges {
|
||||
|
|
@ -43,6 +43,17 @@ sub _recursivelyChangeStyle {
|
|||
$sth->finish;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub _reorderPages {
|
||||
my ($sth, $i, $pid);
|
||||
$sth = WebGUI::SQL->read("select pageId from page where parentId=$_[0] order by sequenceNumber",$session{dbh});
|
||||
while (($pid) = $sth->array) {
|
||||
WebGUI::SQL->write("update page set sequenceNumber='$i' where pageId=$pid",$session{dbh});
|
||||
$i++;
|
||||
}
|
||||
$sth->finish;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_addPage {
|
||||
my ($output);
|
||||
|
|
@ -62,14 +73,14 @@ sub www_addPage {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_addPageSave {
|
||||
my (%parent, $urlizedTitle, $test);
|
||||
my ($urlizedTitle, $test, $nextSeq);
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
%parent = WebGUI::SQL->quickHash("select * from page where pageId=$session{page}{pageId}",$session{dbh});
|
||||
($nextSeq) = WebGUI::SQL->quickArray("select max(sequenceNumber)+1 from page where parentId=$session{page}{pageId}",$session{dbh});
|
||||
$urlizedTitle = urlizeTitle($session{form}{title});
|
||||
while (($test) = WebGUI::SQL->quickArray("select urlizedTitle from page where urlizedTitle='$urlizedTitle'",$session{dbh})) {
|
||||
$urlizedTitle .= 2;
|
||||
}
|
||||
WebGUI::SQL->write("insert into page set pageId=".getNextId("pageId").", parentId=$session{page}{pageId}, title=".quote($session{form}{title}).", styleId=$parent{styleId}, ownerId=$session{user}{userId}, ownerView=$parent{ownerView}, ownerEdit=$parent{ownerEdit}, groupId='$parent{groupId}', groupView=$parent{groupView}, groupEdit=$parent{groupEdit}, worldView=$parent{worldView}, worldEdit=$parent{worldEdit}, metaTags=".quote($session{form}{metaTags}).", urlizedTitle='$urlizedTitle'",$session{dbh});
|
||||
WebGUI::SQL->write("insert into page set pageId=".getNextId("pageId").", parentId=$session{page}{pageId}, title=".quote($session{form}{title}).", styleId=$session{page}{styleId}, sequenceNumber='$nextSeq', ownerId=$session{user}{userId}, ownerView=$session{page}{ownerView}, ownerEdit=$session{page}{ownerEdit}, groupId='$session{page}{groupId}', groupView=$session{page}{groupView}, groupEdit=$session{page}{groupEdit}, worldView=$session{page}{worldView}, worldEdit=$session{page}{worldEdit}, metaTags=".quote($session{form}{metaTags}).", urlizedTitle='$urlizedTitle'",$session{dbh});
|
||||
return "";
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
|
|
@ -80,6 +91,7 @@ sub www_addPageSave {
|
|||
sub www_cutPage {
|
||||
if (WebGUI::Privilege::canEditPage() && $session{page}{pageId}!=1) {
|
||||
WebGUI::SQL->write("update page set parentId=2 where pageId=".$session{page}{pageId},$session{dbh});
|
||||
_reorderPages($session{page}{parentId});
|
||||
WebGUI::Session::refreshPageInfo($session{page}{parentId});
|
||||
return "";
|
||||
} else {
|
||||
|
|
@ -105,6 +117,7 @@ sub www_deletePage {
|
|||
sub www_deletePageConfirm {
|
||||
if (WebGUI::Privilege::canEditPage() && $session{page}{pageId}!=1) {
|
||||
WebGUI::SQL->write("update page set parentId=3 where pageId=".$session{page}{pageId},$session{dbh});
|
||||
_reorderPages($session{page}{parentId});
|
||||
WebGUI::Session::refreshPageInfo($session{page}{parentId});
|
||||
return "";
|
||||
} else {
|
||||
|
|
@ -175,6 +188,38 @@ sub www_editPageSave {
|
|||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_movePageDown {
|
||||
my (@data, $thisSeq);
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
($thisSeq) = WebGUI::SQL->quickArray("select sequenceNumber from page where pageId=$session{page}{pageId}",$session{dbh});
|
||||
@data = WebGUI::SQL->quickArray("select pageId from page where parentId=$session{page}{parentId} and sequenceNumber=$thisSeq+1",$session{dbh});
|
||||
if ($data[0] ne "") {
|
||||
WebGUI::SQL->write("update page set sequenceNumber=sequenceNumber+1 where pageId=$session{page}{pageId}",$session{dbh});
|
||||
WebGUI::SQL->write("update page set sequenceNumber=sequenceNumber-1 where pageId=$data[0]",$session{dbh});
|
||||
}
|
||||
return "";
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_movePageUp {
|
||||
my (@data, $thisSeq);
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
($thisSeq) = WebGUI::SQL->quickArray("select sequenceNumber from page where pageId=$session{page}{pageId}",$session{dbh});
|
||||
@data = WebGUI::SQL->quickArray("select pageId from page where parentId=$session{page}{parentId} and sequenceNumber=$thisSeq-1",$session{dbh});
|
||||
if ($data[0] ne "") {
|
||||
WebGUI::SQL->write("update page set sequenceNumber=sequenceNumber-1 where pageId=$session{page}{pageId}",$session{dbh});
|
||||
WebGUI::SQL->write("update page set sequenceNumber=sequenceNumber+1 where pageId=$data[0]",$session{dbh});
|
||||
}
|
||||
return "";
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_pastePage {
|
||||
my ($output);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ sub www_addStyle {
|
|||
sub www_addStyleSave {
|
||||
my ($output);
|
||||
if (WebGUI::Privilege::isInGroup(3)) {
|
||||
WebGUI::SQL->write("insert into style set styleId=".getNextId("styleId")." name=".quote($session{form}{name}).", header=".quote($session{form}{header}).", footer=".quote($session{form}{footer}).", styleSheet=".quote($session{form}{styleSheet}),$session{dbh});
|
||||
WebGUI::SQL->write("insert into style set styleId=".getNextId("styleId").", name=".quote($session{form}{name}).", header=".quote($session{form}{header}).", footer=".quote($session{form}{footer}).", styleSheet=".quote($session{form}{styleSheet}),$session{dbh});
|
||||
$output = www_listStyles();
|
||||
} else {
|
||||
$output = WebGUI::Privilege::insufficient();
|
||||
|
|
|
|||
86
lib/WebGUI/Operation/Submission.pm
Normal file
86
lib/WebGUI/Operation/Submission.pm
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
package WebGUI::Operation::Submission;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001 Plain Black Software.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
# this software.
|
||||
#-------------------------------------------------------------------
|
||||
# http://www.plainblack.com info@plainblack.com
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
use Exporter;
|
||||
use strict;
|
||||
use WebGUI::Privilege;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
use WebGUI::Utility;
|
||||
|
||||
our @ISA = qw(Exporter);
|
||||
our @EXPORT = qw(&www_viewPendingSubmissions &www_approveSubmission &www_denySubmission);
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_approveSubmission {
|
||||
if (WebGUI::Privilege::isInGroup(4,$session{user}{userId}) || WebGUI::Privilege::isInGroup(3,$session{user}{userId})) {
|
||||
WebGUI::SQL->write("update submission set status='Approved' where submissionId=$session{form}{sid}",$session{dbh});
|
||||
return www_viewPendingSubmissions();
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_denySubmission {
|
||||
if (WebGUI::Privilege::isInGroup(4,$session{user}{userId}) || WebGUI::Privilege::isInGroup(3,$session{user}{userId})) {
|
||||
WebGUI::SQL->write("update submission set status='Denied' where submissionId=$session{form}{sid}",$session{dbh}
|
||||
);
|
||||
return www_viewPendingSubmissions();
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_viewPendingSubmissions {
|
||||
my (@submission, $output, $sth, @row, $i, $pn);
|
||||
if (WebGUI::Privilege::isInGroup(4,$session{user}{userId}) || WebGUI::Privilege::isInGroup(3,$session{user}{userId})) {
|
||||
$output = '<h1>Pending Sumissions</h1>';
|
||||
$sth = WebGUI::SQL->read("select title,submissionId,date_format(dateSubmitted,'%c/%e %l:%i%p'),username,userId,widgetId from submission where status='Pending' order by dateSubmitted",$session{dbh});
|
||||
while (@submission = $sth->array) {
|
||||
$row[$i] = '<tr><td class="tableData"><a href="'.$session{page}{url}.'?wid='.$submission[5].'&func=viewSubmission&sid='.$submission[1].'">'.$submission[0].'</a></td><td class="tableData">'.$submission[2].'</td><td class="tableData">'.$submission[3].'</td></tr>';
|
||||
$i++;
|
||||
}
|
||||
$sth->finish;
|
||||
$output .= '<table width="100%" cellspacing=1 cellpadding=2 border=0>';
|
||||
$output .= '<tr><td class="tableHeader">Title</td><td class="tableHeader">Date Submitted</td><td class="tableHeader">Submitted By</td></tr>';
|
||||
if ($session{form}{pn} < 1) {
|
||||
$pn = 0;
|
||||
} else {
|
||||
$pn = $session{form}{pn};
|
||||
}
|
||||
for ($i=(50*$pn); $i<(50*($pn+1));$i++) {
|
||||
$output .= $row[$i];
|
||||
}
|
||||
$output .= '</table>';
|
||||
$output .= '<div class="pagination">';
|
||||
if ($pn > 0) {
|
||||
$output .= '<a href="'.$session{page}{url}.'?pn='.($pn-1).'&op=viewPendingSubmissions">«Previous Page</a>';
|
||||
} else {
|
||||
$output .= '«Previous Page';
|
||||
}
|
||||
$output .= ' · ';
|
||||
if ($pn < round($#row/50)) {
|
||||
$output .= '<a href="'.$session{page}{url}.'?pn='.($pn+1).'&op=viewPendingSubmissions">Next Page»</a>';
|
||||
} else {
|
||||
$output .= 'Next Page»';
|
||||
}
|
||||
$output .= '</div>';
|
||||
} else {
|
||||
$output = WebGUI::Privilege::insufficient();
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
|
@ -94,7 +94,7 @@ sub httpRedirect {
|
|||
#-------------------------------------------------------------------
|
||||
sub open {
|
||||
my ($key, %WebGUI, %CONFIG, %VARS, %PAGE, %FORM, $query, %COOKIES, $config, %USER, %SETTINGS, $dbh);
|
||||
%WebGUI = (version=>"0.9.0", date=>"2001-08-13");
|
||||
%WebGUI = (version=>"0.10.0", date=>"2001-08-17");
|
||||
$config = new WebGUI::Config '../etc/WebGUI.conf';
|
||||
foreach ($config->param) {
|
||||
$CONFIG{$_} = $config->param($_);
|
||||
|
|
|
|||
|
|
@ -37,13 +37,13 @@ sub create {
|
|||
my ($widgetId, $nextSeq);
|
||||
$widgetId = getNextId("widgetId");
|
||||
($nextSeq) = WebGUI::SQL->quickArray("select max(sequenceNumber)+1 from widget where pageId=$session{page}{pageId}",$session{dbh});
|
||||
WebGUI::SQL->write("insert into widget set widgetId=$widgetId, pageId=$session{page}{pageId}, widgetType='$session{form}{widget}', title=".quote($session{form}{title}).", displayTitle='$session{form}{displayTitle}', description=".quote($session{form}{description}).", sequenceNumber='$nextSeq'",$session{dbh});
|
||||
WebGUI::SQL->write("insert into widget set widgetId=$widgetId, pageId=$session{page}{pageId}, widgetType='$session{form}{widget}', processMacros='$session{form}{processMacros}', title=".quote($session{form}{title}).", displayTitle='$session{form}{displayTitle}', description=".quote($session{form}{description}).", dateAdded=now(), addedBy='$session{user}{userId}', sequenceNumber='$nextSeq'",$session{dbh});
|
||||
return $widgetId;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub update {
|
||||
WebGUI::SQL->write("update widget set title=".quote($session{form}{title}).", displayTitle='$session{form}{displayTitle}', description=".quote($session{form}{description}).", processMacros='$session{form}{processMacros}' where widgetId=$session{form}{wid}",$session{dbh});
|
||||
WebGUI::SQL->write("update widget set title=".quote($session{form}{title}).", displayTitle='$session{form}{displayTitle}', description=".quote($session{form}{description}).", processMacros='$session{form}{processMacros}', lastEdited=now(), editedBy='$session{user}{userId}' where widgetId=$session{form}{wid}",$session{dbh});
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -87,7 +87,7 @@ sub www_moveDown {
|
|||
my (@data, $thisSeq);
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
($thisSeq) = WebGUI::SQL->quickArray("select sequenceNumber from widget where widgetId=$session{form}{wid}",$session{dbh});
|
||||
@data = WebGUI::SQL->quickArray("select widgetId, min(sequenceNumber) from widget where pageId=$session{page}{pageId} and sequenceNumber>$thisSeq group by pageId",$session{dbh});
|
||||
@data = WebGUI::SQL->quickArray("select widgetId from widget where pageId=$session{page}{pageId} and sequenceNumber=$thisSeq+1",$session{dbh});
|
||||
if ($data[0] ne "") {
|
||||
WebGUI::SQL->write("update widget set sequenceNumber=sequenceNumber+1 where widgetId=$session{form}{wid}",$session{dbh});
|
||||
WebGUI::SQL->write("update widget set sequenceNumber=sequenceNumber-1 where widgetId=$data[0]",$session{dbh});
|
||||
|
|
@ -103,7 +103,7 @@ sub www_moveUp {
|
|||
my (@data, $thisSeq);
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
($thisSeq) = WebGUI::SQL->quickArray("select sequenceNumber from widget where widgetId=$session{form}{wid}",$session{dbh});
|
||||
@data = WebGUI::SQL->quickArray("select widgetId, max(sequenceNumber) from widget where pageId=$session{page}{pageId} and sequenceNumber<$thisSeq group by pageId",$session{dbh});
|
||||
@data = WebGUI::SQL->quickArray("select widgetId from widget where pageId=$session{page}{pageId} and sequenceNumber=$thisSeq-1",$session{dbh});
|
||||
if ($data[0] ne "") {
|
||||
WebGUI::SQL->write("update widget set sequenceNumber=sequenceNumber-1 where widgetId=$session{form}{wid}",$session{dbh});
|
||||
WebGUI::SQL->write("update widget set sequenceNumber=sequenceNumber+1 where widgetId=$data[0]",$session{dbh});
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ sub www_view {
|
|||
$output .= '<p><a href="'.$data{linkURL}.'">'.$data{linkTitle}.'</a>';
|
||||
}
|
||||
if ($data{attachment} ne "") {
|
||||
$output .= '<p><a href="'.$session{setting}{attachmentDirectoryWeb}.'/'.$widgetId.'/'.$data{attachment}.'">[attachment: '.$data{attachment}.']</a>';
|
||||
$output .= '<p><a href="'.$session{setting}{attachmentDirectoryWeb}.'/'.$widgetId.'/'.$data{attachment}.'"><img src="'.$session{setting}{lib}.'/attachment.gif" border=0 alt="Download Attachment"></a>';
|
||||
}
|
||||
}
|
||||
if ($data{processMacros} == 1) {
|
||||
|
|
|
|||
|
|
@ -198,10 +198,11 @@ sub www_view {
|
|||
}
|
||||
$output .= ", $event[4]</b>";
|
||||
$output .= "<hr size=1>";
|
||||
$output .= '<table cellpadding=3 cellspacing=0 border=0><tr>';
|
||||
$output .= '<td valign="top">'.$event[0].' - </td>';
|
||||
$output .= '<td valign="top">'.$event[1].'</td>';
|
||||
$output .= '</tr></table><p>';
|
||||
$output .= '<span class="eventTitle">'.$event[0].'</span>';
|
||||
if ($event[1] ne "") {
|
||||
$output .= ' - ';
|
||||
$output .= ''.$event[1].'<p>';
|
||||
}
|
||||
}
|
||||
$sth->finish;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ sub www_moveQuestionDown {
|
|||
my (@data, $thisSeq);
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
($thisSeq) = WebGUI::SQL->quickArray("select sequenceNumber from faqQuestion where questionId=$session{form}{qid}",$session{dbh});
|
||||
@data = WebGUI::SQL->quickArray("select questionId, min(sequenceNumber) from faqQuestion where widgetId=$session{form}{wid} and sequenceNumber>$thisSeq group by widgetId",$session{dbh});
|
||||
@data = WebGUI::SQL->quickArray("select questionId from faqQuestion where widgetId=$session{form}{wid} and sequenceNumber=$thisSeq+1 group by widgetId",$session{dbh});
|
||||
if ($data[0] ne "") {
|
||||
WebGUI::SQL->write("update faqQuestion set sequenceNumber=sequenceNumber+1 where questionId=$session{form}{qid}",$session{dbh});
|
||||
WebGUI::SQL->write("update faqQuestion set sequenceNumber=sequenceNumber-1 where questionId=$data[0]",$session{dbh});
|
||||
|
|
@ -213,7 +213,7 @@ sub www_moveQuestionUp {
|
|||
my (@data, $thisSeq);
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
($thisSeq) = WebGUI::SQL->quickArray("select sequenceNumber from faqQuestion where questionId=$session{form}{qid}",$session{dbh});
|
||||
@data = WebGUI::SQL->quickArray("select questionId, max(sequenceNumber) from faqQuestion where widgetId=$session{form}{wid} and sequenceNumber<$thisSeq group by widgetId",$session{dbh});
|
||||
@data = WebGUI::SQL->quickArray("select questionId from faqQuestion where widgetId=$session{form}{wid} and sequenceNumber=$thisSeq-1 group by widgetId",$session{dbh});
|
||||
if ($data[0] ne "") {
|
||||
WebGUI::SQL->write("update faqQuestion set sequenceNumber=sequenceNumber-1 where questionId=$session{form}{qid}",$session{dbh});
|
||||
WebGUI::SQL->write("update faqQuestion set sequenceNumber=sequenceNumber+1 where questionId=$data[0]",$session{dbh});
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ sub www_editLink {
|
|||
$output = '<h1>Edit Link</h1><form method="post" enctype="multipart/form-data" action="'.$session{page}{url}.'">';
|
||||
$output .= WebGUI::Form::hidden("wid",$session{form}{wid});
|
||||
$output .= WebGUI::Form::hidden("lid",$session{form}{lid});
|
||||
$output .= WebGUI::Form::hidden("func","editEventSave");
|
||||
$output .= WebGUI::Form::hidden("func","editLinkSave");
|
||||
$output .= '<table>';
|
||||
$output .= '<tr><td class="formDescription">Name</td><td>'.WebGUI::Form::text("name",20,30,$link{name}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">URL</td><td>'.WebGUI::Form::text("url",20,2048,$link{url}).'</td></tr>';
|
||||
|
|
@ -195,7 +195,7 @@ sub www_moveLinkDown {
|
|||
my (@data, $thisSeq);
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
($thisSeq) = WebGUI::SQL->quickArray("select sequenceNumber from link where linkId=$session{form}{lid}",$session{dbh});
|
||||
@data = WebGUI::SQL->quickArray("select linkId, min(sequenceNumber) from link where widgetId=$session{form}{wid} and sequenceNumber>$thisSeq group by widgetId",$session{dbh});
|
||||
@data = WebGUI::SQL->quickArray("select linkId from link where widgetId=$session{form}{wid} and sequenceNumber=$thisSeq+1 group by widgetId",$session{dbh});
|
||||
if ($data[0] ne "") {
|
||||
WebGUI::SQL->write("update link set sequenceNumber=sequenceNumber+1 where linkId=$session{form}{lid}",$session{dbh});
|
||||
WebGUI::SQL->write("update link set sequenceNumber=sequenceNumber-1 where linkId=$data[0]",$session{dbh});
|
||||
|
|
@ -211,7 +211,7 @@ sub www_moveLinkUp {
|
|||
my (@data, $thisSeq);
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
($thisSeq) = WebGUI::SQL->quickArray("select sequenceNumber from link where linkId=$session{form}{lid}",$session{dbh});
|
||||
@data = WebGUI::SQL->quickArray("select linkId, max(sequenceNumber) from link where widgetId=$session{form}{wid} and sequenceNumber<$thisSeq group by widgetId",$session{dbh});
|
||||
@data = WebGUI::SQL->quickArray("select linkId from link where widgetId=$session{form}{wid} and sequenceNumber=$thisSeq-1 group by widgetId",$session{dbh});
|
||||
if ($data[0] ne "") {
|
||||
WebGUI::SQL->write("update link set sequenceNumber=sequenceNumber-1 where linkId=$session{form}{lid}",$session{dbh});
|
||||
WebGUI::SQL->write("update link set sequenceNumber=sequenceNumber+1 where linkId=$data[0]",$session{dbh});
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ sub _traverseReplyTree {
|
|||
if ($session{form}{mid} eq $data[0]) {
|
||||
$html .= ' class="highlight"';
|
||||
}
|
||||
$html .= '><td class="boardData">'.$depth.'<a href="'.$session{page}{url}.'?func=showMessage&mid='.$data[0].'&wid='.$session{form}{wid}.'">'.$data[1].'</a></td><td class="boardData">'.$data[2].'</td><td class="boardData">'.$data[3].'</td></tr>';
|
||||
$html .= '><td class="tableData">'.$depth.'<a href="'.$session{page}{url}.'?func=showMessage&mid='.$data[0].'&wid='.$session{form}{wid}.'">'.$data[1].'</a></td><td class="tableData">'.$data[2].'</td><td class="tableData">'.$data[3].'</td></tr>';
|
||||
$html .= _traverseReplyTree($data[0],$_[1]+1);
|
||||
}
|
||||
$sth->finish;
|
||||
|
|
@ -204,7 +204,7 @@ sub www_postNewMessageSave {
|
|||
$mid = getNextId("messageId");
|
||||
WebGUI::SQL->write("insert into message set messageId=$mid, userId=$session{user}{userId}, username=".quote($session{user}{username}).", subject=".quote($session{form}{subject}).", message=".quote($session{form}{message}).", widgetId=$session{form}{wid}, pid=0, dateOfPost=now()",$session{dbh});
|
||||
WebGUI::SQL->write("update message set rid=$mid where messageId=$mid",$session{dbh});
|
||||
return www_view($session{form}{wid});
|
||||
return "";
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
|
|
@ -271,7 +271,7 @@ sub www_showMessage {
|
|||
$html .= '<a href="'.$session{page}{url}.'?func=editMessage&mid='.$session{form}{mid}.'&wid='.$session{form}{wid}.'">Edit Message</a> · ';
|
||||
}
|
||||
$html .= '<a href="'.$session{page}{url}.'?func=postReply&mid='.$session{form}{mid}.'&wid='.$session{form}{wid}.'">Post Reply</a></td></tr></table>';
|
||||
$html .= '<table width="100%"><tr><td class="boardHeader">';
|
||||
$html .= '<table width="100%"><tr><td class="tableHeader">';
|
||||
$html .= "<b>Subject:</b> ".$message{subject}."<br>";
|
||||
$html .= "<b>Author:</b> ".$message{username}."<br>";
|
||||
$html .= "<b>Date:</b> ".$message{dateOfPost}."<br>";
|
||||
|
|
@ -295,13 +295,13 @@ sub www_showMessage {
|
|||
$html .= 'Next Thread »';
|
||||
}
|
||||
$html .= '</div><table border=0 cellpadding=2 cellspacing=1 width="100%">';
|
||||
$html .= '<tr><td class="boardHeader">Subject</td><td class="boardHeader">Author</td><td class="boardHeader">Date</td></tr>';
|
||||
$html .= '<tr><td class="tableHeader">Subject</td><td class="tableHeader">Author</td><td class="tableHeader">Date</td></tr>';
|
||||
@data = WebGUI::SQL->quickArray("select messageId,substring(subject,1,30),username,date_format(dateOfPost,'%c/%e %l:%i%p') from message where messageId=$message{rid}",$session{dbh});
|
||||
$html .= '<tr';
|
||||
if ($session{form}{mid} eq $message{rid}) {
|
||||
$html .= ' class="highlight"';
|
||||
}
|
||||
$html .= '><td class="boardData"><a href="'.$session{page}{url}.'?func=showMessage&mid='.$data[0].'&wid='.$message{widgetId}.'">'.$data[1].'</a></td><td class="boardData">'.$data[2].'</td><td class="boardData">'.$data[3].'</td></tr>';
|
||||
$html .= '><td class="tableData"><a href="'.$session{page}{url}.'?func=showMessage&mid='.$data[0].'&wid='.$message{widgetId}.'">'.$data[1].'</a></td><td class="tableData">'.$data[2].'</td><td class="tableData">'.$data[3].'</td></tr>';
|
||||
$html .= _traverseReplyTree($message{rid},1);
|
||||
$html .= "</table>";
|
||||
return $html;
|
||||
|
|
@ -327,10 +327,10 @@ sub www_view {
|
|||
}
|
||||
$html .= '</td><td align="right" valign="bottom" class="boardMenu"><a href="'.$session{page}{url}.'?func=postNewMessage&wid='.$_[0].'">Post New Message</a></td></tr></table>';
|
||||
$html .= '<table border=0 cellpadding=2 cellspacing=1 width="100%">';
|
||||
$html .= '<tr><td class="boardHeader">Subject</td><td class="boardHeader">Author</td><td class="boardHeader">Thread Started</td><td class="boardHeader">Replies</td><td class="boardHeader">Last Reply</td></tr>';
|
||||
$html .= '<tr><td class="tableHeader">Subject</td><td class="tableHeader">Author</td><td class="tableHeader">Thread Started</td><td class="tableHeader">Replies</td><td class="tableHeader">Last Reply</td></tr>';
|
||||
$sth = WebGUI::SQL->read("select messageId,substring(subject,1,30),count(messageId)-1,username,date_format(dateOfPost,'%c/%e %l:%i%p'),date_format(max(dateOfPost),'%c/%e %l:%i%p'),max(messageId) from message where widgetId=$_[0] group by rid order by messageId desc limit ".(($currentPage*$itemsPerPage)-$itemsPerPage).",".$itemsPerPage, $session{dbh});
|
||||
while (@data = $sth->array) {
|
||||
$html .= '<tr><td class="boardData"><a href="'.$session{page}{url}.'?func=showMessage&mid='.$data[0].'&wid='.$_[0].'">'.$data[1].'</a></td><td class="boardData">'.$data[3].'</td><td class="boardData">'.$data[4].'</td><td class="boardData">'.$data[2].'</td><td class="boardData"><a href="'.$session{page}{url}.'?func=showMessage&mid='.$data[6].'&wid='.$_[0].'">'.$data[5].'</a></td></tr>';
|
||||
$html .= '<tr><td class="tableData"><a href="'.$session{page}{url}.'?func=showMessage&mid='.$data[0].'&wid='.$_[0].'">'.$data[1].'</a></td><td class="tableData">'.$data[3].'</td><td class="tableData">'.$data[4].'</td><td class="tableData">'.$data[2].'</td><td class="tableData"><a href="'.$session{page}{url}.'?func=showMessage&mid='.$data[6].'&wid='.$_[0].'">'.$data[5].'</a></td></tr>';
|
||||
}
|
||||
$html .= "</table>";
|
||||
$sth->finish;
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ sub _viewPoll {
|
|||
$output .= WebGUI::Form::hidden('func','vote');
|
||||
$output .= '<span class="pollQuestion">'.$poll{question}.'</span><br>';
|
||||
for ($i=1; $i<=20; $i++) {
|
||||
if ($poll{'a'.$i} ne "") {
|
||||
if ($poll{'a'.$i} =~ /\w/) {
|
||||
$output .= WebGUI::Form::radio("answer",'a'.$i).' <span class="pollAnswer">'.$poll{'a'.$i}.'</span><br>';
|
||||
}
|
||||
}
|
||||
|
|
@ -57,10 +57,10 @@ sub _viewResults {
|
|||
$totalResponses = 1;
|
||||
}
|
||||
for ($i=1; $i<=20; $i++) {
|
||||
if ($poll{'a'.$i} ne "") {
|
||||
if ($poll{'a'.$i} =~ /\w/) {
|
||||
$output .= '<span class="pollAnswer"><hr size=1>'.$poll{'a'.$i}.'<br></span>';
|
||||
@data = WebGUI::SQL->quickArray("select count(*), answer from pollAnswer where answer='a$i' group by answer",$session{dbh});
|
||||
$output .= '<table cellpadding=0 cellspacing=0 border=0><tr><td width="'.round(150*$data[0]/$totalResponses).'" class="pollColor"></td><td class="pollAnswer"> '.round(100*$data[0]/$totalResponses).'%</td></tr></table>';
|
||||
@data = WebGUI::SQL->quickArray("select count(*), answer from pollAnswer where answer='a$i' and widgetId=$widgetId group by answer",$session{dbh});
|
||||
$output .= '<table cellpadding=0 cellspacing=0 border=0><tr><td width="'.round($poll{graphWidth}*$data[0]/$totalResponses).'" class="pollColor"></td><td class="pollAnswer"> '.round(100*$data[0]/$totalResponses).'%</td></tr></table>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -86,6 +86,7 @@ sub www_add {
|
|||
$output .= '<tr><td class="formDescription">Active</td><td>'.WebGUI::Form::checkbox("active",1,1).'</td></tr>';
|
||||
%hash = WebGUI::SQL->buildHash("select groupId,groupName from groups where groupName<>'Reserved' order by groupName",$session{dbh});
|
||||
$output .= '<tr><td class="formDescription" valign="top">Who can vote?</td><td>'.WebGUI::Form::selectList("voteGroup",\%hash,).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Graph Width</td><td>'.WebGUI::Form::text("graphWidth",20,3).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Question</td><td>'.WebGUI::Form::text("question",50,255).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Answers<span><br>(Enter one answer per line. No more than 20.)</span></td><td>'.WebGUI::Form::textArea("answers",'',50,8,0,'on').'</td></tr>';
|
||||
$output .= '<tr><td></td><td>'.WebGUI::Form::submit("save").'</td></tr>';
|
||||
|
|
@ -103,7 +104,7 @@ sub www_addSave {
|
|||
if (WebGUI::Privilege::canEditPage()) {
|
||||
$widgetId = create();
|
||||
@answer = split("\n",$session{form}{answers});
|
||||
WebGUI::SQL->write("insert into Poll set widgetId=$widgetId, active='$session{form}{active}', voteGroup='$session{form}{voteGroup}', question=".quote($session{form}{question}).", a1=".quote($answer[0]).", a2=".quote($answer[1]).", a3=".quote($answer[2]).", a4=".quote($answer[3]).", a5=".quote($answer[4]).", a6=".quote($answer[5]).", a7=".quote($answer[6]).", a8=".quote($answer[7]).", a9=".quote($answer[8]).", a10=".quote($answer[9]).", a11=".quote($answer[10]).", a12=".quote($answer[11]).", a13=".quote($answer[12]).", a14=".quote($answer[13]).", a15=".quote($answer[14]).", a16=".quote($answer[15]).", a17=".quote($answer[16]).", a18=".quote($answer[17]).", a19=".quote($answer[18]).", a20=".quote($answer[19])."",$session{dbh});
|
||||
WebGUI::SQL->write("insert into Poll set widgetId=$widgetId, active='$session{form}{active}', voteGroup='$session{form}{voteGroup}', graphWidth='$session{form}{graphWidth}', question=".quote($session{form}{question}).", a1=".quote($answer[0]).", a2=".quote($answer[1]).", a3=".quote($answer[2]).", a4=".quote($answer[3]).", a5=".quote($answer[4]).", a6=".quote($answer[5]).", a7=".quote($answer[6]).", a8=".quote($answer[7]).", a9=".quote($answer[8]).", a10=".quote($answer[9]).", a11=".quote($answer[10]).", a12=".quote($answer[11]).", a13=".quote($answer[12]).", a14=".quote($answer[13]).", a15=".quote($answer[14]).", a16=".quote($answer[15]).", a17=".quote($answer[16]).", a18=".quote($answer[17]).", a19=".quote($answer[18]).", a20=".quote($answer[19])."",$session{dbh});
|
||||
return "";
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
|
|
@ -126,6 +127,7 @@ sub www_edit {
|
|||
%hash = WebGUI::SQL->buildHash("select groupId,groupName from groups where groupName<>'Reserved' order by groupName",$session{dbh});
|
||||
$array[0] = $data{voteGroup};
|
||||
$output .= '<tr><td class="formDescription" valign="top">Who can vote?</td><td>'.WebGUI::Form::selectList("voteGroup",\%hash,\@array).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Graph Width</td><td>'.WebGUI::Form::text("graphWidth",20,3,$data{graphWidth}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Question</td><td>'.WebGUI::Form::text("question",50,255,$data{question}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Answers<span><br>(Enter one answer per line. No more than 20.)</span></td><td>'.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').'</td></tr>';
|
||||
$output .= '<tr><td></td><td>'.WebGUI::Form::submit("save").'</td></tr>';
|
||||
|
|
@ -142,7 +144,7 @@ sub www_editSave {
|
|||
if (WebGUI::Privilege::canEditPage()) {
|
||||
update();
|
||||
@answer = split("\n",$session{form}{answers});
|
||||
WebGUI::SQL->write("update Poll set active='$session{form}{active}', voteGroup='$session{form}{voteGroup}', question=".quote($session{form}{question}).", a1=".quote($answer[0]).", a2=".quote($answer[1]).", a3=".quote($answer[2]).", a4=".quote($answer[3]).", a5=".quote($answer[4]).", a6=".quote($answer[5]).", a7=".quote($answer[6]).", a8=".quote($answer[7]).", a9=".quote($answer[8]).", a10=".quote($answer[9]).", a11=".quote($answer[10]).", a12=".quote($answer[11]).", a13=".quote($answer[12]).", a14=".quote($answer[13]).", a15=".quote($answer[14]).", a16=".quote($answer[15]).", a17=".quote($answer[16]).", a18=".quote($answer[17]).", a19=".quote($answer[18]).", a20=".quote($answer[19])." where widgetId=$session{form}{wid}",$session{dbh});
|
||||
WebGUI::SQL->write("update Poll set active='$session{form}{active}', voteGroup='$session{form}{voteGroup}', graphWidth=$session{form}{graphWidth}, question=".quote($session{form}{question}).", a1=".quote($answer[0]).", a2=".quote($answer[1]).", a3=".quote($answer[2]).", a4=".quote($answer[3]).", a5=".quote($answer[4]).", a6=".quote($answer[5]).", a7=".quote($answer[6]).", a8=".quote($answer[7]).", a9=".quote($answer[8]).", a10=".quote($answer[9]).", a11=".quote($answer[10]).", a12=".quote($answer[11]).", a13=".quote($answer[12]).", a14=".quote($answer[13]).", a15=".quote($answer[14]).", a16=".quote($answer[15]).", a17=".quote($answer[16]).", a18=".quote($answer[17]).", a19=".quote($answer[18]).", a20=".quote($answer[19])." where widgetId=$session{form}{wid}",$session{dbh});
|
||||
return "";
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
|
|
@ -171,7 +173,7 @@ sub www_view {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_vote {
|
||||
WebGUI::SQL->write("insert into pollAnswer set widgetId=$session{form}{wid}, userId=$session{user}{userId}, answer='$session{form}{answer}'",$session{dbh});
|
||||
return _viewResults($session{form}{wid});
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ sub widgetName {
|
|||
sub www_add {
|
||||
my ($output);
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
$output = '<h1>Add SQL Report</h1><form method="post" enctype="multipart/form-data" action="'.$session{page}{url}.'">';
|
||||
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=20"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a><h1>Add SQL Report</h1><form method="post" enctype="multipart/form-data" action="'.$session{page}{url}.'">';
|
||||
$output .= WebGUI::Form::hidden("widget","SQLReport");
|
||||
$output .= WebGUI::Form::hidden("func","addSave");
|
||||
$output .= '<table>';
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ sub _traversePageTree {
|
|||
for ($i=0;$i<=$_[1];$i++) {
|
||||
$depth .= " ";
|
||||
}
|
||||
$sth = WebGUI::SQL->read("select urlizedTitle, title, pageId from page where parentId='$_[0]'",$session{dbh});
|
||||
$sth = WebGUI::SQL->read("select urlizedTitle, title, pageId from page where parentId='$_[0]' order by sequenceNumber",$session{dbh});
|
||||
while (@data = $sth->array) {
|
||||
if (WebGUI::Privilege::canViewPage($data[2])) {
|
||||
$output .= $depth.'· <a href="'.$session{env}{SCRIPT_NAME}.'/'.$data[0].'">'.$data[1].'</a><br>';
|
||||
|
|
@ -51,7 +51,7 @@ sub www_add {
|
|||
$output .= '<tr><td class="formDescription">Disply title?</td><td>'.WebGUI::Form::checkbox("displayTitle",1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Description</td><td>'.WebGUI::Form::textArea("description",'').'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Starting from this level?</td><td>'.WebGUI::Form::checkbox("startAtThisLevel",1,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Show only this level?</td><td>'.WebGUI::Form::checkbox("showOnlyThisLevel",1,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Show only one level?</td><td>'.WebGUI::Form::checkbox("showOnlyThisLevel",1,1).'</td></tr>';
|
||||
$output .= '<tr><td></td><td>'.WebGUI::Form::submit("save").'</td></tr>';
|
||||
$output .= '</table></form>';
|
||||
return $output;
|
||||
|
|
@ -86,7 +86,7 @@ sub www_edit {
|
|||
$output .= '<tr><td class="formDescription">Disply title?</td><td>'.WebGUI::Form::checkbox("displayTitle",1,$data{displayTitle}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Description</td><td>'.WebGUI::Form::textArea("description",$data{description}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Starting from this level?</td><td>'.WebGUI::Form::checkbox("startAtThisLevel",1,$data{startAtThisLevel}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Show only this level?uuuu</td><td>'.WebGUI::Form::checkbox("showOnlyThisLevel",1,$data{showOnlyThisLevel}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Show only one level?uuuu</td><td>'.WebGUI::Form::checkbox("showOnlyThisLevel",1,$data{showOnlyThisLevel}).'</td></tr>';
|
||||
$output .= '<tr><td></td><td>'.WebGUI::Form::submit("save").'</td></tr>';
|
||||
$output .= '</table></form>';
|
||||
return $output;
|
||||
|
|
@ -120,7 +120,7 @@ sub www_view {
|
|||
} else {
|
||||
$parent = 1;
|
||||
}
|
||||
$sth = WebGUI::SQL->read("select urlizedTitle, title, pageId from page where parentId='$parent'",$session{dbh});
|
||||
$sth = WebGUI::SQL->read("select urlizedTitle, title, pageId from page where parentId='$parent' order by sequenceNumber",$session{dbh});
|
||||
while (@root = $sth->array) {
|
||||
if (WebGUI::Privilege::canViewPage($root[2])) {
|
||||
$output .= '· <a href="'.$session{env}{SCRIPT_NAME}.'/'.$root[0].'">'.$root[1].'</a><br>';
|
||||
|
|
|
|||
331
lib/WebGUI/Widget/UserSubmission.pm
Normal file
331
lib/WebGUI/Widget/UserSubmission.pm
Normal file
|
|
@ -0,0 +1,331 @@
|
|||
package WebGUI::Widget::UserSubmission;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001 Plain Black Software.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
# this software.
|
||||
#-------------------------------------------------------------------
|
||||
# http://www.plainblack.com info@plainblack.com
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
use WebGUI::Privilege;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
use WebGUI::Utility;
|
||||
use WebGUI::Widget;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub widgetName {
|
||||
return "User Submission System";
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_add {
|
||||
my ($output, %hash);
|
||||
tie %hash, "Tie::IxHash";
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
$output = '<h1>Add User Submission System</h1><form method="post" enctype="multipart/form-data" action="'.$session{page}{url}.'">';
|
||||
$output .= WebGUI::Form::hidden("widget","UserSubmission");
|
||||
$output .= WebGUI::Form::hidden("func","addSave");
|
||||
$output .= '<table>';
|
||||
$output .= '<tr><td class="formDescription">Title</td><td>'.WebGUI::Form::text("title",20,30).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Display the title?</td><td>'.WebGUI::Form::checkbox("displayTitle","1").'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Description</td><td>'.WebGUI::Form::textArea("description",'',50,5,1).'</td></tr>';
|
||||
%hash = WebGUI::SQL->buildHash("select groupId,groupName from groups where groupName<>'Reserved' order by groupName",$session{dbh});
|
||||
$output .= '<tr><td class="formDescription" valign="top">Who can contribute?</td><td>'.WebGUI::Form::selectList("groupToContribute",\%hash,'',1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Submissions Per Page</td><td>'.WebGUI::Form::text("submissionsPerPage",20,2,50).'</td></tr>';
|
||||
%hash = ("Approved"=>"Approved","Denied"=>"Denied","Pending"=>"Pending");
|
||||
$output .= '<tr><td class="formDescription" valign="top">Default Status</td><td>'.WebGUI::Form::selectList("defaultStatus",\%hash,'',1).'</td></tr>';
|
||||
$output .= '<tr><td></td><td>'.WebGUI::Form::submit("save").'</td></tr>';
|
||||
$output .= '</table></form>';
|
||||
return $output;
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_addSave {
|
||||
my ($widgetId);
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
$widgetId = create();
|
||||
WebGUI::SQL->write("insert into UserSubmission set widgetId=$widgetId, groupToContribute=$session{form}{groupToContribute}, submissionsPerPage=$session{form}{submissionsPerPage}, defaultStatus='$session{form}{defaultStatus}'",$session{dbh});
|
||||
return "";
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_addSubmission {
|
||||
my ($output, $groupToContribute, @submission, $sth);
|
||||
($groupToContribute) = WebGUI::SQL->quickArray("select groupToContribute from UserSubmission where widgetId=$session{form}{wid}",$session{dbh});
|
||||
if (WebGUI::Privilege::isInGroup($groupToContribute,$session{user}{userId})) {
|
||||
$output = '<h1>Add Submission</h1><form method="post" enctype="multipart/form-data" action="'.$session{page}{url}.'">';
|
||||
$output .= WebGUI::Form::hidden("wid",$session{form}{wid});
|
||||
$output .= WebGUI::Form::hidden("func","addSubmissionSave");
|
||||
$output .= '<table>';
|
||||
$output .= '<tr><td class="formDescription">Title</td><td>'.WebGUI::Form::text("title",20,30).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Content</td><td>'.WebGUI::Form::textArea("content",'',50,10,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Image</td><td>'.WebGUI::Form::file("image").'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Attachment</td><td>'.WebGUI::Form::file("attachment").'</td></tr>';
|
||||
$output .= '<tr><td></td><td>'.WebGUI::Form::submit("save").'</td></tr>';
|
||||
$output .= '</table></form>';
|
||||
$output .= '<table width="100%" cellspacing=1 cellpadding=2 border=0>';
|
||||
$output .= '<tr><td class="tableHeader">Edit/Delete</td><td class="tableHeader">Title</td><td class="tableHeader">Date Submitted</td><td class="tableHeader">Status</td></tr>';
|
||||
$sth = WebGUI::SQL->read("select title,submissionId,date_format(dateSubmitted,'%c/%e %l:%i%p'),status from submission where widgetId='$session{form}{wid}' and userId=$session{user}{userId} order by dateSubmitted desc",$session{dbh});
|
||||
while (@submission = $sth->array) {
|
||||
$output .= '<tr><td class="tableData"><a href="'.$session{page}{url}.'?func=editSubmission&wid='.$session{form}{wid}.'&sid='.$submission[1].'"><img src="'.$session{setting}{lib}.'/edit.gif" border=0></a><a href="'.$session{page}{url}.'?wid='.$session{form}{wid}.'&sid='.$submission[1].'&func=deleteSubmission"><img src="'.$session{setting}{lib}.'/delete.gif" border=0></a></td><td class="tableData"><a href="'.$session{page}{url}.'?wid='.$session{form}{wid}.'&func=viewSubmission&sid='.$submission[1].'">'.$submission[0].'</a></td><td class="tableData">'.$submission[2].'</td><td class="tableData">'.$submission[3].'</td></tr>';
|
||||
}
|
||||
$sth->finish;
|
||||
$output .= '</table>';
|
||||
} else {
|
||||
$output = WebGUI::Privilege::insufficient();
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_addSubmissionSave {
|
||||
my ($submissionId, $image, $attachment, $status, $groupToContribute);
|
||||
($status, $groupToContribute) = WebGUI::SQL->quickArray("select defaultStatus,groupToContribute from UserSubmission where widgetId=$session{form}{wid}",$session{dbh});
|
||||
if (WebGUI::Privilege::isInGroup($groupToContribute,$session{user}{userId})) {
|
||||
$submissionId = getNextId("submissionId");
|
||||
$image = saveAttachment("image",$session{form}{wid});
|
||||
$attachment = saveAttachment("attachment",$session{form}{wid});
|
||||
WebGUI::SQL->write("insert into submission set widgetId=$session{form}{wid}, submissionId=$submissionId, title=".quote($session{form}{title}).", username=".quote($session{user}{username}).", status='$status', dateSubmitted=now(), userId='$session{user}{userId}', content=".quote($session{form}{content}).", image=".quote($image).", attachment=".quote($attachment),$session{dbh});
|
||||
return "";
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_deleteAttachment {
|
||||
my ($owner);
|
||||
($owner) = WebGUI::SQL->quickArray("select userId from submission where submissionId=$session{form}{sid}",$session{dbh});
|
||||
if ($owner == $session{user}{userId}) {
|
||||
WebGUI::SQL->write("update submission set attachment='' where widgetId=$session{form}{wid}",$session{dbh});
|
||||
return www_editSubmission();
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_deleteImage {
|
||||
my ($owner);
|
||||
($owner) = WebGUI::SQL->quickArray("select userId from submission where submissionId=$session{form}{sid}",$session{dbh});
|
||||
if ($owner == $session{user}{userId}) {
|
||||
WebGUI::SQL->write("update submission set image='' where widgetId=$session{form}{wid}",$session{dbh});
|
||||
return www_editSubmission();
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_deleteSubmission {
|
||||
my ($output, $owner);
|
||||
($owner) = WebGUI::SQL->quickArray("select userId from submission where submissionId=$session{form}{sid}",$session{dbh});
|
||||
if ($owner == $session{user}{userId}) {
|
||||
$output = '<h1>Please Confirm</h1>';
|
||||
$output .= 'Are you certain that you want to delete this submission?<p><div align="center"><a href="'.$session{page}{url}.'?func=deleteSubmissionConfirm&wid='.$session{form}{wid}.'&sid='.$session{form}{sid}.'">Yes, I\'m sure.</a> <a href="'.$session{page}{url}.'">No, I made a mistake.</a></div>';
|
||||
return $output;
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_deleteSubmissionConfirm {
|
||||
my ($output, $owner);
|
||||
($owner) = WebGUI::SQL->quickArray("select userId from submission where submissionId=$session{form}{sid}",$session{dbh});
|
||||
if ($owner == $session{user}{userId}) {
|
||||
WebGUI::SQL->write("delete from submission where submissionId=$session{form}{sid}",$session{dbh});
|
||||
return www_addSubmission();
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_edit {
|
||||
my ($output, %data, @array, $sth, %hash);
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
%data = WebGUI::SQL->quickHash("select * from widget,UserSubmission where widget.widgetId=$session{form}{wid} and widget.widgetId=UserSubmission.widgetId",$session{dbh});
|
||||
$output = '<h1>Edit User Submission System</h1><form method="post" enctype="multipart/form-data" action="'.$session{page}{url}.'">';
|
||||
$output .= WebGUI::Form::hidden("wid",$session{form}{wid});
|
||||
$output .= WebGUI::Form::hidden("func","editSave");
|
||||
$output .= '<table>';
|
||||
$output .= '<tr><td class="formDescription">Title</td><td>'.WebGUI::Form::text("title",20,30,$data{title}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Display the title?</td><td>'.WebGUI::Form::checkbox("displayTitle","1",$data{displayTitle}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Description</td><td>'.WebGUI::Form::textArea("description",$data{description}).'</td></tr>';
|
||||
$array[0] = $data{groupToContribute};
|
||||
%hash = WebGUI::SQL->buildHash("select groupId,groupName from groups where groupName<>'Reserved' order by groupName",$session{dbh});
|
||||
$output .= '<tr><td class="formDescription" valign="top">Who can contribute?</td><td>'.WebGUI::Form::selectList("groupToContribute",\%hash,\@array,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Submissions Per Page</td><td>'.WebGUI::Form::text("submissionsPerPage",20,2,$data{submissionsPerPage}).'</td></tr>';
|
||||
%hash = ("Approved"=>"Approved","Denied"=>"Denied","Pending"=>"Pending");
|
||||
$array[0] = $data{defaultStatus};
|
||||
$output .= '<tr><td class="formDescription" valign="top">Default Status</td><td>'.WebGUI::Form::selectList("defaultStatus",\%hash,\@array,1).'</td></tr>';
|
||||
$output .= '<tr><td></td><td>'.WebGUI::Form::submit("save").'</td></tr>';
|
||||
$output .= '</table></form>';
|
||||
return $output;
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_editSave {
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
update();
|
||||
WebGUI::SQL->write("update UserSubmission set groupToContribute=$session{form}{groupToContribute}, submissionsPerPage=$session{form}{submissionsPerPage}, defaultStatus='$session{form}{defaultStatus}' where widgetId=$session{form}{wid}",$session{dbh});
|
||||
return "";
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_editSubmission {
|
||||
my ($output, %submission, $owner);
|
||||
($owner) = WebGUI::SQL->quickArray("select userId from submission where submissionId=$session{form}{sid}",$session{dbh});
|
||||
if ($owner == $session{user}{userId}) {
|
||||
%submission = WebGUI::SQL->quickHash("select * from submission where submissionId='$session{form}{sid}'",$session{dbh});
|
||||
$output = '<h1>Edit Submission</h1><form method="post" enctype="multipart/form-data" action="'.$session{page}{url}.'">';
|
||||
$output .= WebGUI::Form::hidden("wid",$session{form}{wid});
|
||||
$output .= WebGUI::Form::hidden("sid",$session{form}{sid});
|
||||
$output .= WebGUI::Form::hidden("func","editSubmissionSave");
|
||||
$output .= '<table>';
|
||||
$output .= '<tr><td class="formDescription">Title</td><td>'.WebGUI::Form::text("title",20,30,$submission{title}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Content</td><td>'.WebGUI::Form::textArea("content",$submission{content},50,10).'</td></tr>';
|
||||
if ($submission{image} ne "") {
|
||||
$output .= '<tr><td class="formDescription">Image</td><td><a href="'.$session{page}{url}.'?func=deleteImage&wid='.$session{form}{wid}.'&sid='.$session{form}{sid}.'">Delete Image</a></td></tr>';
|
||||
} else {
|
||||
$output .= '<tr><td class="formDescription">Image</td><td>'.WebGUI::Form::file("image").'</td></tr>';
|
||||
}
|
||||
if ($submission{attachment} ne "") {
|
||||
$output .= '<tr><td class="formDescription">Attachment</td><td><a href="'.$session{page}{url}.'?func=deleteAttachment&wid='.$session{form}{wid}.'&sid='.$session{form}{sid}.'">Delete Attachment</a></td></tr>';
|
||||
} else {
|
||||
$output .= '<tr><td class="formDescription">Attachment</td><td>'.WebGUI::Form::file("attachment").'</td></tr>';
|
||||
}
|
||||
$output .= '<tr><td></td><td>'.WebGUI::Form::submit("save").'</td></tr>';
|
||||
$output .= '</table></form>';
|
||||
return $output;
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_editSubmissionSave {
|
||||
my ($owner,$status,$image,$attachment);
|
||||
($owner) = WebGUI::SQL->quickArray("select userId from submission where submissionId=$session{form}{sid}",$session{dbh});
|
||||
if ($owner == $session{user}{userId}) {
|
||||
($status) = WebGUI::SQL->quickArray("select defaultStatus from UserSubmission where widgetId=$session{form}{wid}",$session{dbh});
|
||||
$image = saveAttachment("image",$session{form}{wid});
|
||||
if ($image ne "") {
|
||||
$image = 'image='.quote($image).', ';
|
||||
}
|
||||
$attachment = saveAttachment("attachment",$session{form}{wid});
|
||||
if ($attachment ne "") {
|
||||
$attachment = 'attachment='.quote($attachment).', ';
|
||||
}
|
||||
WebGUI::SQL->write("update submission set title=".quote($session{form}{title}).", content=".quote($session{form}{content}).", ".$image.$attachment." status='$status' where submissionId=$session{form}{sid}",$session{dbh});
|
||||
return www_viewSubmission();
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_view {
|
||||
my (%data, @submission, $output, $widgetId, $sth, @row, $i, $pn);
|
||||
$widgetId = shift;
|
||||
%data = WebGUI::SQL->quickHash("select * from widget,UserSubmission where widget.widgetId=$widgetId and widget.widgetId=UserSubmission.widgetId",$session{dbh});
|
||||
if (%data) {
|
||||
if ($data{displayTitle} == 1) {
|
||||
$output = "<h2>".$data{title}."</h2>";
|
||||
}
|
||||
if ($data{description} ne "") {
|
||||
$output .= $data{description}.'<p>';
|
||||
}
|
||||
$sth = WebGUI::SQL->read("select title,submissionId,date_format(dateSubmitted,'%c/%e %l:%i%p'),username,userId from submission where widgetId='$widgetId' and status='Approved' order by dateSubmitted desc",$session{dbh});
|
||||
while (@submission = $sth->array) {
|
||||
$row[$i] = '<tr><td class="tableData"><a href="'.$session{page}{url}.'?wid='.$widgetId.'&func=viewSubmission&sid='.$submission[1].'">'.$submission[0].'</a></td><td class="tableData">'.$submission[2].'</td><td class="tableData">'.$submission[3].'</td></tr>';
|
||||
$i++;
|
||||
}
|
||||
$sth->finish;
|
||||
$output .= '<table width="100%"><tr><td align="right"><a href="'.$session{page}{url}.'?func=addSubmission&wid='.$widgetId.'">Post New Submission</a></td></tr></table>';
|
||||
$output .= '<table width="100%" cellspacing=1 cellpadding=2 border=0>';
|
||||
$output .= '<tr><td class="tableHeader">Title</td><td class="tableHeader">Date Submitted</td><td class="tableHeader">Submitted By</td></tr>';
|
||||
if ($session{form}{pn} < 1) {
|
||||
$pn = 0;
|
||||
} else {
|
||||
$pn = $session{form}{pn};
|
||||
}
|
||||
for ($i=($data{submissionsPerPage}*$pn); $i<($data{submissionsPerPage}*($pn+1));$i++) {
|
||||
$output .= $row[$i];
|
||||
}
|
||||
$output .= '</table>';
|
||||
$output .= '<div class="pagination">';
|
||||
if ($pn > 0) {
|
||||
$output .= '<a href="'.$session{page}{url}.'?pn='.($pn-1).'&wid='.$session{form}{wid}.'">«Previous Page</a>';
|
||||
} else {
|
||||
$output .= '«Previous Page';
|
||||
}
|
||||
$output .= ' · ';
|
||||
if ($pn < round($#row/$data{submissionsPerPage})) {
|
||||
$output .= '<a href="'.$session{page}{url}.'?pn='.($pn+1).'&wid='.$session{form}{wid}.'">Next Page»</a>';
|
||||
} else {
|
||||
$output .= 'Next Page»';
|
||||
}
|
||||
$output .= '</div>';
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_viewSubmission {
|
||||
my ($output, %submission);
|
||||
%submission = WebGUI::SQL->quickHash("select * from submission where submissionId=$session{form}{sid}",$session{dbh});
|
||||
$output = "<h2>".$submission{title}."</h2>";
|
||||
$output .= '<b>Submitted By:</b> '.$submission{username}.'<br>';
|
||||
$output .= '<b>Date Submitted:</b> '.$submission{dateSubmitted}.'<p>';
|
||||
if ($submission{image} ne "") {
|
||||
$output .= '<img src="'.$session{setting}{attachmentDirectoryWeb}.'/'.$session{form}{wid}.'/'.$submission{image}.'" hspace=3 align="right">';
|
||||
}
|
||||
if ($submission{status} eq "Pending" && (WebGUI::Privilege::isInGroup(3,$session{user}{userId}) || WebGUI::Privilege::isInGroup(4,$session{user}{userId}))) {
|
||||
$output .= '<div align="center">';
|
||||
$output .= '<a href="'.$session{page}{url}.'?op=approveSubmission&sid='.$session{form}{sid}.'">Approve</a> · ';
|
||||
$output .= '<a href="'.$session{page}{url}.'?op=viewPendingSubmissions">Leave Pending</a> · ';
|
||||
$output .= '<a href="'.$session{page}{url}.'?op=denySubmission&sid='.$session{form}{sid}.'">Deny</a> ';
|
||||
$output .= '</div>';
|
||||
}
|
||||
$output .= $submission{content}.'<p>';
|
||||
if ($submission{attachment} ne "") {
|
||||
$output .= '<p><a href="'.$session{setting}{attachmentDirectoryWeb}.'/'.$session{form}{wid}.'/'.$submission{attachment}.'"><img src="'.$session{setting}{lib}.'/attachment.gif" border=0 alt="Download Attachment"></a><p>';
|
||||
}
|
||||
$output .= '<div align="center">';
|
||||
if ($submission{userId} == $session{user}{userId}) {
|
||||
$output .= '<a href="'.$session{page}{url}.'?func=deleteSubmission&wid='.$session{form}{wid}.'&sid='.$session{form}{sid}.'">Delete</a> · ';
|
||||
$output .= '<a href="'.$session{page}{url}.'?func=editSubmission&wid='.$session{form}{wid}.'&sid='.$session{form}{sid}.'">Edit</a> · ';
|
||||
}
|
||||
$output .= '<a href="'.$session{page}{url}.'">Return To Submissions List</a>';
|
||||
$output .= '</div>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
1;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/perl -I../lib/
|
||||
#!/usr/bin/perl
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001 Plain Black Software.
|
||||
|
|
@ -10,6 +10,10 @@
|
|||
# http://www.plainblack.com info@plainblack.com
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
BEGIN {
|
||||
unshift (@INC, "../lib/");
|
||||
}
|
||||
|
||||
use CGI::Carp qw(fatalsToBrowser);
|
||||
use strict;
|
||||
use WebGUI;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue