WebGUI 2.4.0 release
103
docs/create.sql
|
|
@ -1,9 +1,13 @@
|
|||
####################################################################
|
||||
# WebGUI Credits #
|
||||
####################################################################
|
||||
|
||||
The following people/companies are responsible for WebGUI:
|
||||
|
||||
WebGUI Core...........................JT Smith / Plain Black Software
|
||||
German Translation....................Mattias Kunkel / WERU AG
|
||||
Perl..................................Larry Wall / O'Reilly
|
||||
Data::Config..........................Sébastien Aperghis-Tramoni
|
||||
IE Rich Edit..........................Brattli
|
||||
Spanish Translation...................Ricardo Markiewicz
|
||||
WebGUI Core..........................JT Smith / Plain Black Software
|
||||
German Translation...................Mattias Kunkel / WERU AG
|
||||
Perl.................................Larry Wall / O'Reilly
|
||||
Data::Config.........................Sébastien Aperghis-Tramoni
|
||||
IE Rich Edit.........................Brattli
|
||||
Spanish Translation..................Ricardo Markiewicz
|
||||
|
||||
|
|
|
|||
33
docs/gotcha.txt
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
####################################################################
|
||||
# WebGUI Upgrade Gotchas #
|
||||
####################################################################
|
||||
|
||||
This file contains a list of any changes you should be aware of when
|
||||
upgrading from one version to the next, or even between multiple
|
||||
versions. Be sure to heed the warnings contained herein as they will
|
||||
save you many hours of grief.
|
||||
|
||||
|
||||
2.4.0
|
||||
--------------------------------------------------------------------
|
||||
* You must convert your old macros to the new format by version
|
||||
3.0.0 or they will become unusable.
|
||||
* The "extras" and "uploads" directories have been moved into the
|
||||
"www" directory so that aliases do not need to be created
|
||||
in your web server.
|
||||
|
||||
2.3.2
|
||||
--------------------------------------------------------------------
|
||||
* Upgrade scripts are no longer available from the Plain Black
|
||||
web site. They are now included in every distribution under
|
||||
"docs/upgrades".
|
||||
|
||||
2.1.0
|
||||
--------------------------------------------------------------------
|
||||
* The Widget and Macro architecture will be changing severely
|
||||
between now and 3.0.0. If you're using or creating any
|
||||
third-party widgets they will cease to function over the
|
||||
course of this development. Before upgrading, be certain
|
||||
that the Macro or Widget complies with all new
|
||||
specifications.
|
||||
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
##################################################################
|
||||
# Quick And Dirty Install Instructions #
|
||||
##################################################################
|
||||
|
|
@ -28,11 +27,9 @@ QnD INSTALL INSTRUCTIONS:
|
|||
|
||||
4. Install MySQL.
|
||||
|
||||
5. Install MnoGO Search (http://www.mnogosearch.org).
|
||||
5. Extract WebGUI into your webroot.
|
||||
|
||||
6. Extract WebGUI into your webroot.
|
||||
|
||||
7. Run the following Database commands. (You should modify the
|
||||
6. Run the following Database commands. (You should modify the
|
||||
commands to match your database, username, and password.)
|
||||
|
||||
mysql -e "create database WebGUI"
|
||||
|
|
@ -40,9 +37,9 @@ QnD INSTALL INSTRUCTIONS:
|
|||
mysql -e "flush privileges"
|
||||
mysql -uwebgui -ppassword WebGUI < docs/create.sql
|
||||
|
||||
8. Edit "etc/WebGUI.conf" to patch your DB settings and log directory.
|
||||
7. Edit "etc/WebGUI.conf" to patch your DB settings and log directory.
|
||||
|
||||
9. Run the following command from your WebGUI directory to determine
|
||||
8. Run the following command from your WebGUI directory to determine
|
||||
whether you've configured your system correctly.
|
||||
|
||||
perl testEnvironment.pl
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
####################################################################
|
||||
# WebGUI Legal Information #
|
||||
####################################################################
|
||||
|
||||
WebGUI is Copyright 2001 Plain Black Software. All rights reserved.
|
||||
|
||||
WebGUI is a trademark of Plain Black Software.
|
||||
|
||||
WebGUI is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
WebGUI is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
@ -15,21 +19,21 @@ purchased from Plain Black Software at
|
|||
http://www.plainblack.com/index.pl/support_programs
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program in a file called "license.txt". If not you can
|
||||
download it at http://www.opensource.org/licenses/gpl-license.html or
|
||||
write to:
|
||||
along with this program in a file called "license.txt". If not you
|
||||
can download it at
|
||||
http://www.opensource.org/licenses/gpl-license.html or write to:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330
|
||||
Boston, MA 02111-1307
|
||||
USA
|
||||
|
||||
For more information about Plain Black Software or WebGUI, please visit
|
||||
http://www.plainblack.com or email info@plainblack.com.
|
||||
For more information about Plain Black Software or WebGUI, please
|
||||
visit http://www.plainblack.com or email info@plainblack.com.
|
||||
|
||||
It is illegal to remove or tamper with the notices at the top of each
|
||||
file, or this file, or the license file. The notice at the top of each
|
||||
file looks like the following:
|
||||
It is illegal to remove or tamper with the notices at the top of
|
||||
each file, or this file, or the license file. The notice at the top
|
||||
of each file looks like the following:
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001 Plain Black Software.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
####################################################################
|
||||
# WebGUI License #
|
||||
####################################################################
|
||||
|
||||
The General Public License (GPL)
|
||||
Version 2, June 1991
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
|
||||
|
|
|
|||
|
|
@ -414,11 +414,11 @@ INSERT INTO help VALUES (27,'WebGUI','English','Add/Edit','Widget','You can add
|
|||
INSERT INTO help VALUES (1,'Poll','English','Add/Edit','Poll','Polls can be used to get the impressions of your users on various topics.\r\n\r\n<b>Title</b>\r\nThe title of the poll. Even if you don\'t wish to display the title you should fill out this field so this poll will have a name if it is ever placed in the clipboard.\r\n\r\n<b>Display the title?</b>\r\nDo you wish to disply the title?\r\n\r\n<b>Process macros?</b>\r\nDo you wish to process WebGUI macros? Unchecking this box will not process macros and will speed up page execution.\r\n\r\n<b>Description</b>\r\nYou may provide a description for this poll, or give the user some background information.\r\n\r\n<b>Active</b>\r\nIf this box is checked, then users will be able to vote. Otherwise they\'ll only be able to see the results of the poll.\r\n\r\n<b>Who can vote?</b>\r\nChoose a group that can vote on this poll.\r\n\r\n<b>Graph Width</b>\r\nThe width of the poll results graph. The width is measured in pixels.\r\n\r\n<b>Question</b>\r\nWhat is the question you\'d like to ask your users?\r\n\r\n<b>Answers</b>\r\nEnter the possible answers to your question. Enter only one answer per line. Polls are only capable of 20 possible answers.\r\n\r\n<b>Reset votes.</b>\r\nReset the votes on this poll.','1,2,3,4,5');
|
||||
INSERT INTO help VALUES (1,'SiteMap','English','Add/Edit','Site Map','Site maps are used to provide additional navigation in WebGUI. You could set up a traditional site map that would display a hierarchical view of all the pages in the site. On the other hand, you could use site maps to provide extra navigation at certain levels in your site.\r\n\r\n<b>Title</b>\r\nWhat title would you give to this site map? You should fill this field out even if you don\'t wish it to be displayed.\r\n\r\n<b>Display the title?</b>\r\nDo you wish to disply the title?\r\n\r\n<b>Process macros?</b>\r\nDo you wish to process WebGUI macros? Unchecking this box will not process macros and will speed up page execution.\r\n\r\n<b>Description</b>\r\nEnter a description as to why this site map is here and what purpose it serves.\r\n\r\n<b>Starting from this level?</b>\r\nIf the site map should display the page tree starting from this level, then check this box. If you wish the site map to start from the home page then uncheck it.\r\n\r\n<b>Show only one level?</b>\r\nShould the site map display only the current level of pages or all pages from this point forward? \r\n','1,2,3,4,5');
|
||||
INSERT INTO help VALUES (1,'MessageBoard','English','Add/Edit','Message Board','Message boards, also called Forums and/or Discussions, are a great way to add community to any site or intranets. Many companies use message boards internally to collaborate on projects.\r\n\r\n<b>Title</b>\r\nThe name of this board.\r\n\r\n<b>Display the title?</b>\r\nDo you wish to disply the title?\r\n\r\n<b>Process macros?</b>\r\nDo you wish to process WebGUI macros? Unchecking this box will not process macros and will speed up page execution.\r\n\r\n<b>Description</b>\r\nBriefly describe what should be displayed on this message board.\r\n\r\n<b>Who can post?</b>\r\nWhat group can post to this message board?\r\n\r\n<b>Messages Per Page</b>\r\nWhen a visitor first comes to a message board s/he will be presented with a listing of all the topics (aka threads) of the message board. If a board is popular, it will quickly have many topics. The messages per page attribute allows you to specify how many topics should be shown on one page.\r\n\r\n<b>Edit Timeout</b>\r\nHow long after a user has posted to the board will their message be available for them to edit. This timeout is measured in hours.\r\n\r\n<i>Note:</i> Don\'t set this limit too high. One of the great things about message boards is that they are an accurate record of a discussion. If you allow editing for a long time, then a user has a chance to go back and change his/her mind a long time after the original statement was made.\r\n','1,2,3,4,5');
|
||||
INSERT INTO help VALUES (1,'LinkList','English','Add/Edit','Link List','Link lists are just what they sound like, a list of links. Many sites have a links section, and this just automates the process.\r\n\r\n<b>Title</b>\r\nWhat is the title of this link list?\r\n\r\n<b>Display the title?</b>\r\nDo you wish to disply the title?\r\n\r\n<b>Process macros?</b>\r\nDo you wish to process WebGUI macros? Unchecking this box will not process macros and will speed up page execution.\r\n\r\n<b>Description</b>\r\nDescribe the purpose of the links in this list.\r\n\r\n<b>Adding / Editing Links</b>\r\nYou\'ll notice at the bottom of the Edit screen that there are some options to add, edit, delete and reorder the links in your link lists. This process works exactly as the process for doing the same with widgets and pages. The three properties of links are <i>name</i>, <i>url</i>, and <i>description</i>.\r\n','1,2,3,4,5');
|
||||
INSERT INTO help VALUES (1,'LinkList','English','Add/Edit','Link List','Link lists are just what they sound like, a list of links. Many sites have a links section, and this just automates the process.\r\n\r\n<b>Title</b>\r\nWhat is the title of this link list?\r\n\r\n<b>Display the title?</b>\r\nDo you wish to disply the title?\r\n\r\n<b>Process macros?</b>\r\nDo you wish to process WebGUI macros? Unchecking this box will not process macros and will speed up page execution.\r\n\r\n<b>Description</b>\r\nDescribe the purpose of the links in this list.\r\n\r\n<b>Proceed to add link?</b>\r\nLeave this checked if you want to add links to the link list directly after creating it.\r\n\r\n<b>Adding / Editing Links</b>\r\nYou\'ll notice at the bottom of the Edit screen that there are some options to add, edit, delete and reorder the links in your link lists. This process works exactly as the process for doing the same with widgets and pages. The three properties of links are <i>name</i>, <i>url</i>, and <i>description</i>.\r\n','1,2,3,4,5');
|
||||
INSERT INTO help VALUES (13,'WebGUI','English','Edit','Mail Settings','<b>Recover Password Message</b>\r\nThe message that gets sent to a user when they use the \"recover password\" function.\r\n\r\n<b>SMTP Server</b>\r\nThis is the address of your local mail server. It is needed for all features that use the Internet email system (such as password recovery).\r\n\r\n','6');
|
||||
INSERT INTO help VALUES (1,'SyndicatedContent','English','Add/Edit','Syndicated Content','Syndicated content is content that is pulled from another site using the RDF/RSS specification. This technology is often used to pull headlines from various news sites like <a href=\"http://www.cnn.com\">CNN</a> and <a href=\"http://slashdot.org\">Slashdot</a>. It can, of course, be used for other things like sports scores, stock market info, etc.\r\n\r\nYou can find a list of syndicated content at <a href=\"http://my.userland.com\">http://my.userland.com</a>. You will need to register with an account to browse their listing of content. Also, the list contained there is by no means a complete list of all the syndicated content on the internet.\r\n\r\n<b>Title</b>\r\nWhat is the title for this content? This is often the title of the site that the content comes from.\r\n\r\n<b>Display the title?</b>\r\nDo you wish to disply the title?\r\n\r\n<b>Process macros?</b>\r\nDo you wish to process WebGUI macros? Unchecking this box will not process macros and will speed up page execution.\r\n\r\n<b>Description</b>\r\nBriefly describe the content being pulled so that your users will know what they are seeing.\r\n\r\n<b>URL to RSS file</b>\r\nProvide the exact URL (starting with http://) to the syndicated content\'s RDF or RSS file. The syndicated content will be downloaded from this URL hourly.','1,2,3,4,5');
|
||||
INSERT INTO help VALUES (1,'EventsCalendar','English','Add/Edit','Events Calendar','Events calendars are used on many intranets to keep track of internal dates that affect a whole organization. Also events calendars on consumer sites are a great way to let your customers know what events you\'ll be attending and what promotions you\'ll be having.\r\n\r\n<b>Title</b>\r\nWhat is the title of this events calendar?\r\n\r\n<b>Display the title?</b>\r\nDo you wish to disply the title?\r\n\r\n<b>Process macros?</b>\r\nDo you wish to process WebGUI macros? Unchecking this box will not process macros and will speed up page execution.\r\n\r\n<b>Description</b>\r\nBriefly describe what this events calendar details.\r\n\r\n<b>Add / Edit Events</b>\r\nOn the edit screen you\'ll notice that there are options to add, edit, and delete the events in your events calendar. The properties for events are <i>name</i>, <i>description</i>, <i>start date</i>, and <i>end date</i>.\r\n\r\n<i>Note:</i> Events that have already happened will not be displayed on the events calendar.','1,2,3,4,5');
|
||||
INSERT INTO help VALUES (1,'FAQ','English','Add/Edit','F.A.Q.','It seems that almost every web site, intranet, and extranet in the world has a frequently asked questions area. This widget helps you build one too.\r\n\r\n<b>Title</b>\r\nWhat is the title for this FAQ section?\r\n\r\n<b>Display the title?</b>\r\nDo you wish to disply the title?\r\n\r\n<b>Process macros?</b>\r\nDo you wish to process WebGUI macros? Unchecking this box will not process macros and will speed up page execution.\r\n\r\n<b>Description</b>\r\nBriefly describe what this FAQ covers.\r\n\r\n<b>Add / Edit Questions</b>\r\nOn the edit screen you\'ll notice options for adding, editing, deleting, and reordering the questions in your FAQ. The two properties of FAQ questions are <i>question</i> and <i>answer</i>.\r\n','1,2,3,4,5');
|
||||
INSERT INTO help VALUES (1,'EventsCalendar','English','Add/Edit','Events Calendar','Events calendars are used on many intranets to keep track of internal dates that affect a whole organization. Also events calendars on consumer sites are a great way to let your customers know what events you\'ll be attending and what promotions you\'ll be having.\r\n\r\n<b>Title</b>\r\nWhat is the title of this events calendar?\r\n\r\n<b>Display the title?</b>\r\nDo you wish to disply the title?\r\n\r\n<b>Process macros?</b>\r\nDo you wish to process WebGUI macros? Unchecking this box will not process macros and will speed up page execution.\r\n\r\n<b>Description</b>\r\nBriefly describe what this events calendar details.\r\n\r\n<b>Proceed to add event?</b>\r\nLeave this checked if you want to add events to the events calendar directly after creating it.\r\n\r\n<b>Add / Edit Events</b>\r\nOn the edit screen you\'ll notice that there are options to add, edit, and delete the events in your events calendar. The properties for events are <i>name</i>, <i>description</i>, <i>start date</i>, and <i>end date</i>.\r\n\r\n<i>Note:</i> Events that have already happened will not be displayed on the events calendar.','1,2,3,4,5');
|
||||
INSERT INTO help VALUES (1,'FAQ','English','Add/Edit','F.A.Q.','It seems that almost every web site, intranet, and extranet in the world has a frequently asked questions area. This widget helps you build one too.\r\n\r\n<b>Title</b>\r\nWhat is the title for this FAQ section?\r\n\r\n<b>Display the title?</b>\r\nDo you wish to disply the title?\r\n\r\n<b>Process macros?</b>\r\nDo you wish to process WebGUI macros? Unchecking this box will not process macros and will speed up page execution.\r\n\r\n<b>Description</b>\r\nBriefly describe what this FAQ covers.\r\n\r\n<b>Proceed to add question?</b>\r\nLeave this checked if you want to add questions to the FAQ directly after creating it.\r\n\r\n<b>Add / Edit Questions</b>\r\nOn the edit screen you\'ll notice options for adding, editing, deleting, and reordering the questions in your FAQ. The two properties of FAQ questions are <i>question</i> and <i>answer</i>.\r\n','1,2,3,4,5');
|
||||
INSERT INTO help VALUES (11,'WebGUI','English','Edit','File Settings','<b>Path to WebGUI Extras</b>\r\nThe web-path to the directory containing WebGUI images and javascript files.\r\n\r\n<b>Maximum Attachment Size</b>\r\nThe maximum size of files allowed to be uploaded to this site. This applies to all widgets that allow uploaded files and images (like Article and User Contributions). This size is measured in kilobytes.\r\n\r\n<b>Web Attachment Path</b>\r\nThe web-path of the directory where attachments are to be stored.\r\n\r\n<b>Server Attachment Path</b>\r\nThe local path of the directory where attachments are to be stored. (Perhaps /var/www/public/uploads) Be sure that the web server has the rights to write to that directory.\r\n','6');
|
||||
INSERT INTO help VALUES (2,'WebGUI','English','Edit','Authentication Settings','<b>Anonymous Registration</b>\r\nDo you wish visitors to your site to be able to register themselves?\r\n\r\n<b>Authentication Method (default)</b>\r\nWhat should the default authentication method be for new accounts that are created? The two available options are WebGUI and LDAP. WebGUI authentication means that the users will authenticate against the username and password stored in the WebGUI database. LDAP authentication means that users will authenticate against an external LDAP server.\r\n\r\n<i>Note:</i> Authentication settings can be customized on a per user basis.\r\n\r\n<b>Username Binding</b>\r\nBind the WebGUI username to the LDAP Identity. This requires the user to have the same username in WebGUI as they specified during the Anonymous Registration process. It also means that they won\'t be able to change their username later. This only in effect if the user is authenticating against LDAP.\r\n\r\n<b>LDAP URL (default)</b>\r\nThe default url to your LDAP server. The LDAP URL takes the form of <b>ldap://[server]:[port]/[base DN]</b>. Example: ldap://ldap.mycompany.com:389/o=MyCompany.\r\n\r\n<b>LDAP Identity</b>\r\nThe LDAP Identity is the unique identifier in the LDAP server that the user will be identified against. Often this field is <b>shortname</b>, which takes the form of first initial + last name. Example: jdoe. Therefore if you specify the LDAP identity to be <i>shortname</i> then Jon Doe would enter <i>jdoe</i> during the registration process.\r\n\r\n<b>LDAP Identity Name</b>\r\nThe label used to describe the LDAP Identity to the user. For instance, some companies use an LDAP server for their proxy server users to authenticate against. In the documentation or training already provided to their users, the LDAP identity is known as their <i>Web Username</b>. So you could enter that label here for consitency.\r\n\r\n<b>LDAP Password Name</b>\r\nJust as the LDAP Identity Name is a label, so is the LDAP Password Name. Use this label as you would LDAP Identity Name.\r\n\r\n','6');
|
||||
INSERT INTO help VALUES (1,'UserSubmission','English','Add/Edit','User Submission System','User submission systems are a great way to add a sense of community to any site as well as get free content from your users.\r\n\r\n<b>Title</b>\r\nWhat is the title for this user submission system?\r\n\r\n<b>Display the title?</b>\r\nDo you wish to disply the title?\r\n\r\n<b>Process macros?</b>\r\nDo you wish to process WebGUI macros? Unchecking this box will not process macros and will speed up page execution.\r\n\r\n<b>Description</b>\r\nBriefly describe why this user submission system is here and what should be submitted to it.\r\n\r\n<b>Who can contribute?</b>\r\nWhat group is allowed to contribute content?\r\n\r\n<b>Submissions Per Page</b>\r\nHow many submissions should be listed per page in the submissions index?\r\n\r\n<b>Default Status</b>\r\nShould submissions be set to <i>approved</i>, <i>pending</i>, or <i>denied</i> by default?\r\n\r\n<i>Note:</i> If you set the default status to pending, then be prepared to monitor the pending queue under the Admin menu.\r\n','1,2,3,4,5');
|
||||
|
|
@ -1198,6 +1198,307 @@ INSERT INTO international VALUES (345,'WebGUI','Deutsch','Kein Mitglied');
|
|||
INSERT INTO international VALUES (346,'WebGUI','Deutsch','Dieser Benutzer ist kein Mitglied. Wir haben keine weiteren Informationen über ihn.');
|
||||
INSERT INTO international VALUES (347,'WebGUI','Deutsch','Profil anschauen von');
|
||||
INSERT INTO international VALUES (349,'WebGUI','English','Latest version available');
|
||||
INSERT INTO international VALUES (259,'WebGUI','Español','Reporte SQL');
|
||||
INSERT INTO international VALUES (258,'WebGUI','Español','Editar Encuesta');
|
||||
INSERT INTO international VALUES (257,'WebGUI','Español','(Ingrese una por línea. No más de 20)');
|
||||
INSERT INTO international VALUES (255,'WebGUI','Español','Pregunta');
|
||||
INSERT INTO international VALUES (256,'WebGUI','Español','Respuestas');
|
||||
INSERT INTO international VALUES (254,'WebGUI','Español','Ancho del gráfico');
|
||||
INSERT INTO international VALUES (253,'WebGUI','Español','Quiénes pueden votar?');
|
||||
INSERT INTO international VALUES (251,'WebGUI','Español','Agregar Encuesta');
|
||||
INSERT INTO international VALUES (252,'WebGUI','Español','Activar');
|
||||
INSERT INTO international VALUES (250,'WebGUI','Español','Encuesta');
|
||||
INSERT INTO international VALUES (249,'WebGUI','Español','Última respuesta');
|
||||
INSERT INTO international VALUES (247,'WebGUI','Español','Inicio');
|
||||
INSERT INTO international VALUES (248,'WebGUI','Español','Respuestas');
|
||||
INSERT INTO international VALUES (246,'WebGUI','Español','Mandar Nuevo Mensage');
|
||||
INSERT INTO international VALUES (244,'WebGUI','Español','Autor');
|
||||
INSERT INTO international VALUES (245,'WebGUI','Español','Fecha');
|
||||
INSERT INTO international VALUES (243,'WebGUI','Español','Siguiente');
|
||||
INSERT INTO international VALUES (241,'WebGUI','Español','Anterior');
|
||||
INSERT INTO international VALUES (242,'WebGUI','Español','Volver a la Lista de Mensages');
|
||||
INSERT INTO international VALUES (239,'WebGUI','Español','Fecha:');
|
||||
INSERT INTO international VALUES (240,'WebGUI','Español','ID del mensage:');
|
||||
INSERT INTO international VALUES (237,'WebGUI','Español','Asunto:');
|
||||
INSERT INTO international VALUES (238,'WebGUI','Español','Autor:');
|
||||
INSERT INTO international VALUES (235,'WebGUI','Español','Editar mensage');
|
||||
INSERT INTO international VALUES (236,'WebGUI','Español','Responder');
|
||||
INSERT INTO international VALUES (234,'WebGUI','Español','Respondiendo...');
|
||||
INSERT INTO international VALUES (232,'WebGUI','Español','sin título');
|
||||
INSERT INTO international VALUES (233,'WebGUI','Español','(eom)');
|
||||
INSERT INTO international VALUES (231,'WebGUI','Español','Mandando Nuevo Mensage ...');
|
||||
INSERT INTO international VALUES (229,'WebGUI','Español','Asunto');
|
||||
INSERT INTO international VALUES (230,'WebGUI','Español','Mensage');
|
||||
INSERT INTO international VALUES (228,'WebGUI','Español','Editar Mensage...');
|
||||
INSERT INTO international VALUES (227,'WebGUI','Español','Editar Tabla de Mensages');
|
||||
INSERT INTO international VALUES (226,'WebGUI','Español','Timeout de edición');
|
||||
INSERT INTO international VALUES (225,'WebGUI','Español','Mensages por página');
|
||||
INSERT INTO international VALUES (224,'WebGUI','Español','Quienes pueden mandar?');
|
||||
INSERT INTO international VALUES (223,'WebGUI','Español','Table de Mensages');
|
||||
INSERT INTO international VALUES (222,'WebGUI','Español','Agregar Tabla de Mensages');
|
||||
INSERT INTO international VALUES (221,'WebGUI','Español','Agregar nuevo Enlace');
|
||||
INSERT INTO international VALUES (220,'WebGUI','Español','Editar Enlace');
|
||||
INSERT INTO international VALUES (218,'WebGUI','Español','Editar Lista de Enlaces');
|
||||
INSERT INTO international VALUES (219,'WebGUI','Español','Agregar Lista de Enlaces');
|
||||
INSERT INTO international VALUES (217,'WebGUI','Español','Está seguro de querer eliminar éste enlace?');
|
||||
INSERT INTO international VALUES (216,'WebGUI','Español','URL');
|
||||
INSERT INTO international VALUES (215,'WebGUI','Español','Agregar Enlace');
|
||||
INSERT INTO international VALUES (214,'WebGUI','Español','Lista de Enlaces');
|
||||
INSERT INTO international VALUES (213,'WebGUI','Español','Editar Pregunta');
|
||||
INSERT INTO international VALUES (212,'WebGUI','Español','Agregar nueva pregunta.');
|
||||
INSERT INTO international VALUES (211,'WebGUI','Español','Editar F.A.Q.');
|
||||
INSERT INTO international VALUES (209,'WebGUI','Español','Respuesta');
|
||||
INSERT INTO international VALUES (210,'WebGUI','Español','Está seguro de querer eliminar ésta pregunta?');
|
||||
INSERT INTO international VALUES (208,'WebGUI','Español','Pregunta');
|
||||
INSERT INTO international VALUES (207,'WebGUI','Español','Agregar Pregunta');
|
||||
INSERT INTO international VALUES (206,'WebGUI','Español','Agregar F.A.Q.');
|
||||
INSERT INTO international VALUES (205,'WebGUI','Español','F.A.Q.');
|
||||
INSERT INTO international VALUES (204,'WebGUI','Español','Editar Columna Extra');
|
||||
INSERT INTO international VALUES (203,'WebGUI','Español','Clase StyleSheet');
|
||||
INSERT INTO international VALUES (202,'WebGUI','Español','Ancho');
|
||||
INSERT INTO international VALUES (201,'WebGUI','Español','Espaciador');
|
||||
INSERT INTO international VALUES (200,'WebGUI','Español','Agregar Columna Extra');
|
||||
INSERT INTO international VALUES (199,'WebGUI','Español','Columna Extra');
|
||||
INSERT INTO international VALUES (198,'WebGUI','Español','Editar Evento');
|
||||
INSERT INTO international VALUES (197,'WebGUI','Español','Editar Calendario de Eventos');
|
||||
INSERT INTO international VALUES (196,'WebGUI','Español','<b>y</b> todos las recurrencias del mismo');
|
||||
INSERT INTO international VALUES (195,'WebGUI','Español','Está segugo de querer eliminar éste evento');
|
||||
INSERT INTO international VALUES (194,'WebGUI','Español','hasta');
|
||||
INSERT INTO international VALUES (193,'WebGUI','Español','Se repite cada');
|
||||
INSERT INTO international VALUES (192,'WebGUI','Español','Agregar Evento');
|
||||
INSERT INTO international VALUES (191,'WebGUI','Español','Semana');
|
||||
INSERT INTO international VALUES (187,'WebGUI','Español','Calendario de Eventos');
|
||||
INSERT INTO international VALUES (188,'WebGUI','Español','Agregar Calendario de Eventos');
|
||||
INSERT INTO international VALUES (189,'WebGUI','Español','Sucede solo una vez.');
|
||||
INSERT INTO international VALUES (190,'WebGUI','Español','Día');
|
||||
INSERT INTO international VALUES (186,'WebGUI','Español','Eliminar');
|
||||
INSERT INTO international VALUES (185,'WebGUI','Español','Editar Artículo');
|
||||
INSERT INTO international VALUES (184,'WebGUI','Español','(marque si no está agregando <br> manualmente.)');
|
||||
INSERT INTO international VALUES (183,'WebGUI','Español','Convertir saltos de carro?');
|
||||
INSERT INTO international VALUES (181,'WebGUI','Español','Link URL');
|
||||
INSERT INTO international VALUES (182,'WebGUI','Español','Adjuntar');
|
||||
INSERT INTO international VALUES (179,'WebGUI','Español','Imagen');
|
||||
INSERT INTO international VALUES (180,'WebGUI','Español','Link Título');
|
||||
INSERT INTO international VALUES (178,'WebGUI','Español','Cuerpo');
|
||||
INSERT INTO international VALUES (173,'WebGUI','Español','Agregar Artículo');
|
||||
INSERT INTO international VALUES (174,'WebGUI','Español','Mostrar el título?');
|
||||
INSERT INTO international VALUES (175,'WebGUI','Español','Procesar macros?');
|
||||
INSERT INTO international VALUES (176,'WebGUI','Español','Fecha Inicio');
|
||||
INSERT INTO international VALUES (177,'WebGUI','Español','Fecha finalización');
|
||||
INSERT INTO international VALUES (171,'WebGUI','Español','rich edit');
|
||||
INSERT INTO international VALUES (172,'WebGUI','Español','Artículo');
|
||||
INSERT INTO international VALUES (170,'WebGUI','Español','buscar');
|
||||
INSERT INTO international VALUES (169,'WebGUI','Español','Agregar nuevo usuario');
|
||||
INSERT INTO international VALUES (168,'WebGUI','Español','Editar Usuario');
|
||||
INSERT INTO international VALUES (166,'WebGUI','Español','Connect DN');
|
||||
INSERT INTO international VALUES (167,'WebGUI','Español','Está seguro de querer eliminar éste usuario? Tenga en cuenta que toda la información del usuario será eliminada permanentemente si procede.');
|
||||
INSERT INTO international VALUES (164,'WebGUI','Español','Método de Auntentificación');
|
||||
INSERT INTO international VALUES (165,'WebGUI','Español','LDAP URL');
|
||||
INSERT INTO international VALUES (163,'WebGUI','Español','Agregar usuario');
|
||||
INSERT INTO international VALUES (162,'WebGUI','Español','Está seguro de querer eliminar todos los elementos de la papelera?');
|
||||
INSERT INTO international VALUES (161,'WebGUI','Español','Contribuido por');
|
||||
INSERT INTO international VALUES (160,'WebGUI','Español','Fecha Contribución');
|
||||
INSERT INTO international VALUES (159,'WebGUI','Español','Contribuciones Pendientes');
|
||||
INSERT INTO international VALUES (156,'WebGUI','Español','Editar Estilo');
|
||||
INSERT INTO international VALUES (157,'WebGUI','Español','Estilos');
|
||||
INSERT INTO international VALUES (158,'WebGUI','Español','Agregar nuevo Estilo');
|
||||
INSERT INTO international VALUES (155,'WebGUI','Español','\"Está seguro de querer eliminar éste estilo y migrar todas la páginas que lo usen al estilo \"\"Fail Safe\"\"?\"');
|
||||
INSERT INTO international VALUES (152,'WebGUI','Español','Encabezado');
|
||||
INSERT INTO international VALUES (153,'WebGUI','Español','Pie');
|
||||
INSERT INTO international VALUES (154,'WebGUI','Español','Hoja de Estilo');
|
||||
INSERT INTO international VALUES (151,'WebGUI','Español','Nombre del Estilo');
|
||||
INSERT INTO international VALUES (150,'WebGUI','Español','Agregar Estilo');
|
||||
INSERT INTO international VALUES (149,'WebGUI','Español','Usuarios');
|
||||
INSERT INTO international VALUES (148,'WebGUI','Español','Widgets Visibles');
|
||||
INSERT INTO international VALUES (147,'WebGUI','Español','Páginas Visibles');
|
||||
INSERT INTO international VALUES (146,'WebGUI','Español','Sesiones activas');
|
||||
INSERT INTO international VALUES (145,'WebGUI','Español','Versión de WebGUI');
|
||||
INSERT INTO international VALUES (144,'WebGUI','Español','Ver estadísticas');
|
||||
INSERT INTO international VALUES (143,'WebGUI','Español','Configurar Opciones');
|
||||
INSERT INTO international VALUES (142,'WebGUI','Español','Timeout de sesión');
|
||||
INSERT INTO international VALUES (141,'WebGUI','Español','Página no encontrada');
|
||||
INSERT INTO international VALUES (139,'WebGUI','Español','No');
|
||||
INSERT INTO international VALUES (140,'WebGUI','Español','Editar configuraciones misceláneas');
|
||||
INSERT INTO international VALUES (138,'WebGUI','Español','Si');
|
||||
INSERT INTO international VALUES (135,'WebGUI','Español','Servidor SMTP');
|
||||
INSERT INTO international VALUES (136,'WebGUI','Español','Página de Inicio');
|
||||
INSERT INTO international VALUES (137,'WebGUI','Español','Página: Página No Encontrada');
|
||||
INSERT INTO international VALUES (133,'WebGUI','Español','Editar configuración de e-mail');
|
||||
INSERT INTO international VALUES (134,'WebGUI','Español','Mensage de Recuperar Password');
|
||||
INSERT INTO international VALUES (129,'WebGUI','Español','Camino a Extras de WebGUI');
|
||||
INSERT INTO international VALUES (130,'WebGUI','Español','Tamaño máximo de adjuntos');
|
||||
INSERT INTO international VALUES (131,'WebGUI','Español','Camino Web de los archivos adjuntos');
|
||||
INSERT INTO international VALUES (132,'WebGUI','Español','Camino en server de los archivos adjuntos');
|
||||
INSERT INTO international VALUES (128,'WebGUI','Español','Editar Opciones de Archivos');
|
||||
INSERT INTO international VALUES (124,'WebGUI','Español','Editar Información de la Companía');
|
||||
INSERT INTO international VALUES (125,'WebGUI','Español','Nombre de la Companía');
|
||||
INSERT INTO international VALUES (126,'WebGUI','Español','E-mail de la Companía');
|
||||
INSERT INTO international VALUES (127,'WebGUI','Español','URL de la Companía');
|
||||
INSERT INTO international VALUES (123,'WebGUI','Español','Password LDAP');
|
||||
INSERT INTO international VALUES (122,'WebGUI','Español','Nombre Identidad LDAP');
|
||||
INSERT INTO international VALUES (121,'WebGUI','Español','Identidad LDAP (por defecto)');
|
||||
INSERT INTO international VALUES (120,'WebGUI','Español','URL LDAP (por defecto)');
|
||||
INSERT INTO international VALUES (119,'WebGUI','Español','Método de Autentificación (por defecto)');
|
||||
INSERT INTO international VALUES (118,'WebGUI','Español','Registración Anónima');
|
||||
INSERT INTO international VALUES (117,'WebGUI','Español','Editar Opciones de Auntentificación');
|
||||
INSERT INTO international VALUES (116,'WebGUI','Español','Marque para dar éstos privilegios a todas las sub-páginas.');
|
||||
INSERT INTO international VALUES (115,'WebGUI','Español','Cualquiera puede editar?');
|
||||
INSERT INTO international VALUES (114,'WebGUI','Español','Cualquiera puede ver?');
|
||||
INSERT INTO international VALUES (113,'WebGUI','Español','Grupo puede editar?');
|
||||
INSERT INTO international VALUES (112,'WebGUI','Español','Grupo puede ver?');
|
||||
INSERT INTO international VALUES (111,'WebGUI','Español','Grupo');
|
||||
INSERT INTO international VALUES (110,'WebGUI','Español','Dueño puede editar?');
|
||||
INSERT INTO international VALUES (109,'WebGUI','Español','Dueño puede ver?');
|
||||
INSERT INTO international VALUES (108,'WebGUI','Español','Dueño');
|
||||
INSERT INTO international VALUES (107,'WebGUI','Español','Privilegios');
|
||||
INSERT INTO international VALUES (106,'WebGUI','Español','Marque para dar éste estilo a todas las sub-páginas.');
|
||||
INSERT INTO international VALUES (105,'WebGUI','Español','Estilo');
|
||||
INSERT INTO international VALUES (104,'WebGUI','Español','URL de la página');
|
||||
INSERT INTO international VALUES (103,'WebGUI','Español','Propio de la página');
|
||||
INSERT INTO international VALUES (102,'WebGUI','Español','Editar Página');
|
||||
INSERT INTO international VALUES (101,'WebGUI','Español','Está seguro de querer eliminar ésta página');
|
||||
INSERT INTO international VALUES (100,'WebGUI','Español','Meta Tags');
|
||||
INSERT INTO international VALUES (98,'WebGUI','Español','Agregar Página');
|
||||
INSERT INTO international VALUES (99,'WebGUI','Español','Título');
|
||||
INSERT INTO international VALUES (97,'WebGUI','Español','Ordenar por Objeto');
|
||||
INSERT INTO international VALUES (96,'WebGUI','Español','Ordenar por Acción');
|
||||
INSERT INTO international VALUES (94,'WebGUI','Español','Vea también');
|
||||
INSERT INTO international VALUES (95,'WebGUI','Español','Índice de Ayuda');
|
||||
INSERT INTO international VALUES (93,'WebGUI','Español','Ayuda');
|
||||
INSERT INTO international VALUES (92,'WebGUI','Español','Siguiente página');
|
||||
INSERT INTO international VALUES (91,'WebGUI','Español','Página previa');
|
||||
INSERT INTO international VALUES (90,'WebGUI','Español','Agregar nuevo grupo');
|
||||
INSERT INTO international VALUES (89,'WebGUI','Español','Grupos');
|
||||
INSERT INTO international VALUES (88,'WebGUI','Español','Usuarios en Grupo');
|
||||
INSERT INTO international VALUES (87,'WebGUI','Español','Editar Grupo');
|
||||
INSERT INTO international VALUES (86,'WebGUI','Español','Está segugo de querer eliminar éste grupo? Tenga en cuenta que la eliminación es permanente y removerá todos los privilegios asociados con el grupo.');
|
||||
INSERT INTO international VALUES (85,'WebGUI','Español','Descripción');
|
||||
INSERT INTO international VALUES (84,'WebGUI','Español','Nombre del Grupo');
|
||||
INSERT INTO international VALUES (83,'WebGUI','Español','Agregar Grupo');
|
||||
INSERT INTO international VALUES (82,'WebGUI','Español','Funciones Administrativas...');
|
||||
INSERT INTO international VALUES (81,'WebGUI','Español','La cuenta se actualizó con éxito!');
|
||||
INSERT INTO international VALUES (80,'WebGUI','Español','La cuenta se ha creado con éxito!');
|
||||
INSERT INTO international VALUES (78,'WebGUI','Español','Su password no concuerda. Trate de nuevo.');
|
||||
INSERT INTO international VALUES (79,'WebGUI','Español','No se puede conectar con el servidor LDAP');
|
||||
INSERT INTO international VALUES (77,'WebGUI','Español','El nombre de cuenta ya está en uso por otro miembro. Por favor trate con otro nombre de usuario. Los siguiente son algunas sugerencias:');
|
||||
INSERT INTO international VALUES (76,'WebGUI','Español','El e-mail no está en nuestra base de datos');
|
||||
INSERT INTO international VALUES (75,'WebGUI','Español','La información de su cuenta ha sido enviada a su e-mail-');
|
||||
INSERT INTO international VALUES (74,'WebGUI','Español','Información de la Cuenta');
|
||||
INSERT INTO international VALUES (73,'WebGUI','Español','Ingresar.');
|
||||
INSERT INTO international VALUES (72,'WebGUI','Español','recuperar');
|
||||
INSERT INTO international VALUES (71,'WebGUI','Español','Recuperar password');
|
||||
INSERT INTO international VALUES (70,'WebGUI','Español','Error');
|
||||
INSERT INTO international VALUES (69,'WebGUI','Español','Por favor contacte a su administrador por asistencia.');
|
||||
INSERT INTO international VALUES (68,'WebGUI','Español','La información de su cuenta no es válida. O la cuenta no existe');
|
||||
INSERT INTO international VALUES (67,'WebGUI','Español','Crear nueva Cuenta');
|
||||
INSERT INTO international VALUES (66,'WebGUI','Español','Ingresar');
|
||||
INSERT INTO international VALUES (65,'WebGUI','Español','Por favor desactive mi cuenta permanentemente');
|
||||
INSERT INTO international VALUES (64,'WebGUI','Español','Salir');
|
||||
INSERT INTO international VALUES (63,'WebGUI','Español','Encender Admin');
|
||||
INSERT INTO international VALUES (62,'WebGUI','Español','guardar');
|
||||
INSERT INTO international VALUES (61,'WebGUI','Español','Actualizar información de la Cuenta');
|
||||
INSERT INTO international VALUES (60,'WebGUI','Español','Está seguro que quiere desactivar su cuenta. Si continúa su información se perderá permanentemente.');
|
||||
INSERT INTO international VALUES (59,'WebGUI','Español','Perdí mi password');
|
||||
INSERT INTO international VALUES (58,'WebGUI','Español','Ya tengo una cuenta!');
|
||||
INSERT INTO international VALUES (57,'WebGUI','Español','Solo es necesaria si desea usar opciones que requieren e-mail.');
|
||||
INSERT INTO international VALUES (56,'WebGUI','Español','Dirección de e-mail');
|
||||
INSERT INTO international VALUES (55,'WebGUI','Español','Password (confirmar)');
|
||||
INSERT INTO international VALUES (54,'WebGUI','Español','Crear Cuenta');
|
||||
INSERT INTO international VALUES (53,'WebGUI','Español','Hacer página imprimible');
|
||||
INSERT INTO international VALUES (52,'WebGUI','Español','ingresar');
|
||||
INSERT INTO international VALUES (51,'WebGUI','Español','Password');
|
||||
INSERT INTO international VALUES (50,'WebGUI','Español','Nombre usuario');
|
||||
INSERT INTO international VALUES (49,'WebGUI','Español','\"Click <a href=\"\"^\\?op=logout\"\">aquí</a> para salir.\"');
|
||||
INSERT INTO international VALUES (48,'WebGUI','Español','Hola');
|
||||
INSERT INTO international VALUES (47,'WebGUI','Español','Home');
|
||||
INSERT INTO international VALUES (46,'WebGUI','Español','Mi Cuenta');
|
||||
INSERT INTO international VALUES (45,'WebGUI','Español','No');
|
||||
INSERT INTO international VALUES (44,'WebGUI','Español','Si');
|
||||
INSERT INTO international VALUES (43,'WebGUI','Español','Está seguro de querer eliminar éste contenido?');
|
||||
INSERT INTO international VALUES (42,'WebGUI','Español','Por favor confirme');
|
||||
INSERT INTO international VALUES (41,'WebGUI','Español','Esta intentando eliminar un componente vital del sistema WebGUI. Si continúa puede causar un mal funcionamiento de WebGUI.');
|
||||
INSERT INTO international VALUES (40,'WebGUI','Español','Componente Vital');
|
||||
INSERT INTO international VALUES (39,'WebGUI','Español','No tiene suficientes privilegios para ingresar a ésta página.');
|
||||
INSERT INTO international VALUES (38,'WebGUI','Español','\"No tiene privilegios suficientes para realizar ésta operación. Por favor <a href=\"\"^\\?op=displayLogin\"\">ingrese con una cuenta</a> que posea los privilegios suficientes antes de intentar ésta operación.\"');
|
||||
INSERT INTO international VALUES (37,'WebGUI','Español','Permiso Denegado!');
|
||||
INSERT INTO international VALUES (36,'WebGUI','Español','Debe ser administrador para realizar esta tarea. Por favor contacte a uno de los administradores. La siguiente es una lista de los administradores de éste sistema:');
|
||||
INSERT INTO international VALUES (35,'WebGUI','Español','Funciones Administrativas');
|
||||
INSERT INTO international VALUES (34,'WebGUI','Español','fijar fecha');
|
||||
INSERT INTO international VALUES (33,'WebGUI','Español','Sabado');
|
||||
INSERT INTO international VALUES (32,'WebGUI','Español','Viernes');
|
||||
INSERT INTO international VALUES (31,'WebGUI','Español','Jueves');
|
||||
INSERT INTO international VALUES (30,'WebGUI','Español','Miércoles');
|
||||
INSERT INTO international VALUES (29,'WebGUI','Español','Martes');
|
||||
INSERT INTO international VALUES (28,'WebGUI','Español','Lunes');
|
||||
INSERT INTO international VALUES (26,'WebGUI','Español','Diciembre');
|
||||
INSERT INTO international VALUES (27,'WebGUI','Español','Domingo');
|
||||
INSERT INTO international VALUES (24,'WebGUI','Español','Octubre');
|
||||
INSERT INTO international VALUES (25,'WebGUI','Español','Noviembre');
|
||||
INSERT INTO international VALUES (23,'WebGUI','Español','Septiembre');
|
||||
INSERT INTO international VALUES (22,'WebGUI','Español','Agosto');
|
||||
INSERT INTO international VALUES (21,'WebGUI','Español','Julio');
|
||||
INSERT INTO international VALUES (20,'WebGUI','Español','Junio');
|
||||
INSERT INTO international VALUES (19,'WebGUI','Español','Mayo');
|
||||
INSERT INTO international VALUES (18,'WebGUI','Español','Abril');
|
||||
INSERT INTO international VALUES (17,'WebGUI','Español','Marzo');
|
||||
INSERT INTO international VALUES (16,'WebGUI','Español','Febrero');
|
||||
INSERT INTO international VALUES (15,'WebGUI','Español','Enero');
|
||||
INSERT INTO international VALUES (14,'WebGUI','Español','Ver contribuciones pendientes.');
|
||||
INSERT INTO international VALUES (13,'WebGUI','Español','Ver índice de Ayuda');
|
||||
INSERT INTO international VALUES (12,'WebGUI','Español','Apagar Admin');
|
||||
INSERT INTO international VALUES (11,'WebGUI','Español','Vaciar Papelera');
|
||||
INSERT INTO international VALUES (10,'WebGUI','Español','Ver Papelera');
|
||||
INSERT INTO international VALUES (9,'WebGUI','Español','Ver Portapapeles');
|
||||
INSERT INTO international VALUES (8,'WebGUI','Español','Ver Página No Encontrada');
|
||||
INSERT INTO international VALUES (7,'WebGUI','Español','Configurar Usuarios');
|
||||
INSERT INTO international VALUES (6,'WebGUI','Español','Configurar Estilos');
|
||||
INSERT INTO international VALUES (5,'WebGUI','Español','Configurar Grupos.');
|
||||
INSERT INTO international VALUES (4,'WebGUI','Español','Configurar Opciones.');
|
||||
INSERT INTO international VALUES (3,'WebGUI','Español','Pegar desde el Portapapeles...');
|
||||
INSERT INTO international VALUES (2,'WebGUI','Español','Página');
|
||||
INSERT INTO international VALUES (1,'WebGUI','Español','Agregar Contenido ...');
|
||||
INSERT INTO international VALUES (260,'WebGUI','Español','Agregar Reporte SQL');
|
||||
INSERT INTO international VALUES (261,'WebGUI','Español','Modelo');
|
||||
INSERT INTO international VALUES (262,'WebGUI','Español','Consulta');
|
||||
INSERT INTO international VALUES (263,'WebGUI','Español','DSN');
|
||||
INSERT INTO international VALUES (264,'WebGUI','Español','Usuario de la Base de Datos');
|
||||
INSERT INTO international VALUES (265,'WebGUI','Español','Password de la Base de Datos');
|
||||
INSERT INTO international VALUES (266,'WebGUI','Español','Editar Reporte SQL');
|
||||
INSERT INTO international VALUES (267,'WebGUI','Español','Error: El DSN especificado está en un formato incorrecto.');
|
||||
INSERT INTO international VALUES (268,'WebGUI','Español','Error: El SQL especificado está en un formato incorrecto.');
|
||||
INSERT INTO international VALUES (269,'WebGUI','Español','Error: Hay un problema con la consulta.');
|
||||
INSERT INTO international VALUES (270,'WebGUI','Español','Error: No se puede conectar a la base de datos.');
|
||||
INSERT INTO international VALUES (277,'WebGUI','Español','Sistema de Contribución de Usuarios');
|
||||
INSERT INTO international VALUES (278,'WebGUI','Español','Agregar Sistema de Contribución de Usuarios');
|
||||
INSERT INTO international VALUES (279,'WebGUI','Español','Quiénes pueden contribuir?');
|
||||
INSERT INTO international VALUES (280,'WebGUI','Español','Contribuciones por página');
|
||||
INSERT INTO international VALUES (281,'WebGUI','Español','Aprobado');
|
||||
INSERT INTO international VALUES (282,'WebGUI','Español','Denegado');
|
||||
INSERT INTO international VALUES (283,'WebGUI','Español','Pendiente');
|
||||
INSERT INTO international VALUES (284,'WebGUI','Español','Estado por defecto');
|
||||
INSERT INTO international VALUES (285,'WebGUI','Español','Contribuir');
|
||||
INSERT INTO international VALUES (286,'WebGUI','Español','(desmarque si está escribiendo la contribución en HTML.)');
|
||||
INSERT INTO international VALUES (287,'WebGUI','Español','Fecha Contribución');
|
||||
INSERT INTO international VALUES (288,'WebGUI','Español','Estado');
|
||||
INSERT INTO international VALUES (289,'WebGUI','Español','Editar/Eliminar');
|
||||
INSERT INTO international VALUES (290,'WebGUI','Español','Sin título');
|
||||
INSERT INTO international VALUES (291,'WebGUI','Español','Está seguro de querer eliminar ésta contribución?');
|
||||
INSERT INTO international VALUES (292,'WebGUI','Español','Editar Sistema de Contribución de Usuarios');
|
||||
INSERT INTO international VALUES (293,'WebGUI','Español','Editar Contribución');
|
||||
INSERT INTO international VALUES (294,'WebGUI','Español','Nueva Contribución');
|
||||
INSERT INTO international VALUES (295,'WebGUI','Español','Fecha Contribución');
|
||||
INSERT INTO international VALUES (296,'WebGUI','Español','Contribuida por');
|
||||
INSERT INTO international VALUES (297,'WebGUI','Español','Contribuida por:');
|
||||
INSERT INTO international VALUES (298,'WebGUI','Español','Fecha Contribución:');
|
||||
INSERT INTO international VALUES (299,'WebGUI','Español','Aprobar');
|
||||
INSERT INTO international VALUES (300,'WebGUI','Español','Dejan pendiente');
|
||||
INSERT INTO international VALUES (301,'WebGUI','Español','Denegar');
|
||||
INSERT INTO international VALUES (302,'WebGUI','Español','Editar');
|
||||
INSERT INTO international VALUES (303,'WebGUI','Español','Regresar a lista de contribuciones');
|
||||
INSERT INTO international VALUES (304,'WebGUI','Español','Idioma');
|
||||
INSERT INTO international VALUES (1,'FAQ','English','Proceed to add question?');
|
||||
INSERT INTO international VALUES (5,'LinkList','English','Proceed to add link?');
|
||||
INSERT INTO international VALUES (1,'EventsCalendar','English','Proceed to add event?');
|
||||
|
||||
#
|
||||
# Table structure for table 'message'
|
||||
|
|
@ -1330,7 +1631,7 @@ INSERT INTO settings VALUES ('profileExtraContact','1');
|
|||
INSERT INTO settings VALUES ('profileMisc','1');
|
||||
INSERT INTO settings VALUES ('profileHome','0');
|
||||
INSERT INTO settings VALUES ('profileWork','0');
|
||||
INSERT INTO settings VALUES ('VERSION','2.3.3');
|
||||
INSERT INTO settings VALUES ('VERSION','2.3.4');
|
||||
|
||||
#
|
||||
# Table structure for table 'style'
|
||||
|
|
|
|||
1076
docs/upgrades/upgrade_2.3.4-2.4.0.sql
Normal file
|
|
@ -1,5 +1,5 @@
|
|||
package WebGUI;
|
||||
our $VERSION = "2.3.4";
|
||||
our $VERSION = "2.4.0";
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001 Plain Black Software.
|
||||
|
|
@ -66,7 +66,6 @@ sub _displayAdminBar {
|
|||
%hash = ( $session{page}{url}.'?'=>WebGUI::International::get(82),
|
||||
$session{page}{url}.'?op=switchOffAdmin'=>WebGUI::International::get(12),
|
||||
$session{page}{url}.'?op=viewHelpIndex'=>WebGUI::International::get(13),
|
||||
$session{page}{url}.'?op=viewPendingSubmissions'=>WebGUI::International::get(14),
|
||||
%hash
|
||||
);
|
||||
$adminSelect = WebGUI::Form::selectList("adminSelect",\%hash,"","","","goAdmin()");
|
||||
|
|
|
|||
172
lib/WebGUI/Discussion.pm
Normal file
|
|
@ -0,0 +1,172 @@
|
|||
package WebGUI::Discussion;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# 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 Tie::CPHash;
|
||||
use WebGUI::DateTime;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
use WebGUI::Utility;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub traverseReplyTree {
|
||||
my ($sth, @data, $html, $depth, $i);
|
||||
for ($i=0;$i<=$_[1];$i++) {
|
||||
$depth .= " ";
|
||||
}
|
||||
$sth = WebGUI::SQL->read("select messageId,subject,username,dateOfPost,userId from discussion where pid=$_[0] order by messageId", $session{dbh});
|
||||
while (@data = $sth->array) {
|
||||
$html .= '<tr';
|
||||
if ($session{form}{mid} eq $data[0]) {
|
||||
$html .= ' class="highlight"';
|
||||
}
|
||||
$html .= '><td class="tableData">'.$depth.'<a href="'.$session{page}{url}.'?func=showMessage&mid='.$data[0].'&wid='.$session{form}{wid}.'&sid='.$session{form}{sid}.'">'.substr($data[1],0,30).'</a></td><td class="tableData"><a href="'.$session{page}{url}.'?op=viewProfile&uid='.$data[4].'">'.$data[2].'</a></td><td class="tableData">'.epochToHuman($data[3],"%M/%D %H:%n%p").'</td></tr>';
|
||||
$html .= traverseReplyTree($data[0],$_[1]+1);
|
||||
}
|
||||
$sth->finish;
|
||||
return $html;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub editMessage {
|
||||
my ($html, %message);
|
||||
tie %message, 'Tie::CPHash';
|
||||
%message = getMessage($session{form}{mid});
|
||||
$html = '<h1>'.WebGUI::International::get(228).'</h1>';
|
||||
$html .= '<form action="'.$session{page}{url}.'" method="post"><table>';
|
||||
$html .= WebGUI::Form::hidden("func","editMessageSave");
|
||||
$html .= WebGUI::Form::hidden("wid",$session{form}{wid});
|
||||
$html .= WebGUI::Form::hidden("sid",$session{form}{sid});
|
||||
$html .= WebGUI::Form::hidden("mid",$session{form}{mid});
|
||||
$html .= '<tr><td class="formDescription">'.WebGUI::International::get(229).'</td><td>'.WebGUI::Form::text("subject",30,255,$message{subject}).'</td></tr>';
|
||||
$html .= '<tr><td class="formDescription" valign="top">'.WebGUI::International::get(230).'</td><td>'.WebGUI::Form::textArea("message",$message{message},50,6,1).'</td></tr>';
|
||||
$html .= '<tr><td></td><td>'.WebGUI::Form::submit(WebGUI::International::get(62)).'</td></tr>';
|
||||
$html .= '</table></form>';
|
||||
$html .= showMessage();
|
||||
return $html;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub editMessageSave {
|
||||
if ($session{form}{subject} eq "") {
|
||||
$session{form}{subject} = WebGUI::International::get(232);
|
||||
}
|
||||
if ($session{form}{message} eq "") {
|
||||
$session{form}{subject} .= ' '.WebGUI::International::get(233);
|
||||
}
|
||||
WebGUI::SQL->write("update discussion set subject=".quote($session{form}{subject}).", message=".quote("\n --- (Edited at ".localtime(time)." by $session{user}{username}) --- \n\n".$session{form}{message}).", subId='$session{form}{sid}' where messageId=$session{form}{mid}",$session{dbh});
|
||||
return showMessage();
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getMessage {
|
||||
my (%message);
|
||||
tie %message, 'Tie::CPHash';
|
||||
%message = WebGUI::SQL->quickHash("select * from discussion where messageId=$_[0]",$session{dbh});
|
||||
$message{message} =~ s/\n/\<br\>/g;
|
||||
return %message;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub postNewMessage {
|
||||
my ($html);
|
||||
$html = '<h1>'.WebGUI::International::get(231).'</h1>';
|
||||
$html .= '<form action="'.$session{page}{url}.'" method="post"><table>';
|
||||
$html .= WebGUI::Form::hidden("func","postNewMessageSave");
|
||||
$html .= WebGUI::Form::hidden("wid",$session{form}{wid});
|
||||
$html .= WebGUI::Form::hidden("sid",$session{form}{sid});
|
||||
$html .= '<tr><td class="formDescription">'.WebGUI::International::get(229).'</td><td>'.WebGUI::Form::text("subject",30,255).'</td></tr>';
|
||||
$html .= '<tr><td class="formDescription" valign="top">'.WebGUI::International::get(230).'</td><td>'.WebGUI::Form::textArea("message",'',50,6,1).'</td></tr>';
|
||||
$html .= '<tr><td></td><td>'.WebGUI::Form::submit(WebGUI::International::get(62)).'</td></tr>';
|
||||
$html .= '</table></form>';
|
||||
return $html;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub postNewMessageSave {
|
||||
my ($mid);
|
||||
if ($session{form}{subject} eq "") {
|
||||
$session{form}{subject} = WebGUI::International::get(232);
|
||||
}
|
||||
if ($session{form}{message} eq "") {
|
||||
$session{form}{subject} .= ' '.WebGUI::International::get(233);
|
||||
}
|
||||
$mid = getNextId("messageId");
|
||||
WebGUI::SQL->write("insert into discussion values ($mid, $mid, $session{form}{wid}, 0, $session{user}{userId}, ".quote($session{user}{username}).", ".quote($session{form}{subject}).", ".quote($session{form}{message}).", ".time().", '$session{form}{sid}')",$session{dbh});
|
||||
return "";
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub postReply {
|
||||
my ($html, $subject);
|
||||
($subject) = WebGUI::SQL->quickArray("select subject from discussion where messageId=$session{form}{mid}", $session{dbh});
|
||||
$subject = "Re: ".$subject;
|
||||
$html = '<h1>'.WebGUI::International::get(234).'</h1>';
|
||||
$html .= '<form action="'.$session{page}{url}.'" method="post"><table>';
|
||||
$html .= WebGUI::Form::hidden("func","postReplySave");
|
||||
$html .= WebGUI::Form::hidden("wid",$session{form}{wid});
|
||||
$html .= WebGUI::Form::hidden("sid",$session{form}{sid});
|
||||
$html .= WebGUI::Form::hidden("mid",$session{form}{mid});
|
||||
$html .= '<tr><td class="formDescription">'.WebGUI::International::get(229).'</td><td>'.WebGUI::Form::text("subject",30,255,$subject).'</td></tr>';
|
||||
$html .= '<tr><td class="formDescription" valign="top">'.WebGUI::International::get(230).'</td><td>'.WebGUI::Form::textArea("message",'',50,6,1).'</td></tr>';
|
||||
$html .= '<tr><td></td><td>'.WebGUI::Form::submit(WebGUI::International::get(62)).'</td></tr>';
|
||||
$html .= '</table></form>';
|
||||
$html .= showMessage();
|
||||
return $html;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub postReplySave {
|
||||
my ($rid, $mid);
|
||||
if ($session{form}{subject} eq "") {
|
||||
$session{form}{subject} = WebGUI::International::get(232);
|
||||
}
|
||||
if ($session{form}{message} eq "") {
|
||||
$session{form}{subject} .= ' '.WebGUI::International::get(233);
|
||||
}
|
||||
$mid = getNextId("messageId");
|
||||
($rid) = WebGUI::SQL->quickArray("select rid from discussion where messageId=$session{form}{mid}",$session{dbh});
|
||||
WebGUI::SQL->write("insert into discussion values ($mid, $rid, $session{form}{wid}, $session{form}{mid}, $session{user}{userId}, ".quote($session{user}{username}).", ".quote($session{form}{subject}).", ".quote($session{form}{message}).", ".time().", '$session{form}{sid}')", $session{dbh});
|
||||
return "";
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub showMessage {
|
||||
my ($html, %message);
|
||||
tie %message, 'Tie::CPHash';
|
||||
%message = getMessage($session{form}{mid});
|
||||
$html = '<table width="100%" cellpadding=3 cellspacing=1 border=0><tr><td class="tableHeader">';
|
||||
$html .= '<b>'.WebGUI::International::get(237).'</b>'.$message{subject}.'<br>';
|
||||
$html .= '<b>'.WebGUI::International::get(238).'</b> <a href="'.$session{page}{url}.'?op=viewProfile&uid='.$message{userId}.'">'.$message{username}.'</a><br>';
|
||||
$html .= "<b>".WebGUI::International::get(239)."</b> ".epochToHuman($message{dateOfPost},"%w, %c %D, %y at %H:%n%p")."<br>";
|
||||
$html .= "<b>".WebGUI::International::get(240)."</b> ".$message{widgetId}."-".$message{rid}."-".$message{pid}."-".$message{messageId}."<br>";
|
||||
$html .= '</td></tr><tr><td class="tableData">';
|
||||
$html .= $message{message};
|
||||
$html .= '</td></tr></table>';
|
||||
return $html;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub showReplyTree {
|
||||
my (@data, $html, %message);
|
||||
tie %message, 'Tie::CPHash';
|
||||
%message = getMessage($session{form}{mid});
|
||||
$html .= '<table border=0 cellpadding=2 cellspacing=1 width="100%">';
|
||||
$html .= '<tr><td class="tableHeader">'.WebGUI::International::get(229).'</td><td class="tableHeader">'.WebGUI::International::get(244).'</td><td class="tableHeader">'.WebGUI::International::get(245).'</td></tr>';
|
||||
$html .= traverseReplyTree($message{rid},0);
|
||||
$html .= "</table>";
|
||||
return $html;
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
|
@ -14,6 +14,20 @@ use strict qw(vars subs);
|
|||
use WebGUI::ErrorHandler;
|
||||
use WebGUI::Session;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getParams {
|
||||
my ($data, @param);
|
||||
$data = $_[0];
|
||||
$data = substr($data,1,length($data)-2);
|
||||
push(@param, $+) while $data =~ m {
|
||||
"([^\"\\]*(?:\\.[^\"\\]*)*)",?
|
||||
| ([^,]+),?
|
||||
| ,
|
||||
}gx;
|
||||
push(@param, undef) if substr($data,-1,1) eq ',';
|
||||
return @param;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my (@files, $file, $cmd, $output, $macroDir);
|
||||
|
|
@ -37,6 +51,7 @@ sub process {
|
|||
closedir(DIR);
|
||||
#---script url---
|
||||
# slash has to go last because it is also used as the end character for configurable widgets
|
||||
# this will disappear in a future rev as it is depricated
|
||||
if ($output =~ /\^\//) {
|
||||
$output =~ s/\^\//$session{env}{SCRIPT_NAME}/g;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,10 @@ use WebGUI::Session;
|
|||
sub process {
|
||||
my ($output);
|
||||
$output = $_[0];
|
||||
#---username---
|
||||
while ($output =~ /\^\@(.*?)\;/) {
|
||||
$output =~ s/\^\@(.*?)\;/$session{user}{username}/;
|
||||
}
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^\@/) {
|
||||
$output =~ s/\^\@/$session{user}{username}/g;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,10 @@ use WebGUI::Session;
|
|||
sub process {
|
||||
my ($output);
|
||||
$output = $_[0];
|
||||
#---page url---
|
||||
while ($output =~ /\^\\(.*?)\;/) {
|
||||
$output =~ s/\^\\(.*?)\;/$session{page}{url}/;
|
||||
}
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^\\/) {
|
||||
$output =~ s/\^\\/$session{page}{url}/g;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,11 @@ sub _recurseCrumbTrail {
|
|||
sub process {
|
||||
my ($output, $temp);
|
||||
$output = $_[0];
|
||||
#---crumb trail---
|
||||
while ($output =~ /\^C(.*?)\;/) {
|
||||
$temp = '<span class="crumbTrail">'._recurseCrumbTrail($session{page}{parentId}).'<a href="'.$session{page}{url}.'">'.$session{page}{title}.'</a></span>';
|
||||
$output =~ s/\^C(.*?)\;/$temp/;
|
||||
}
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^C/) {
|
||||
$temp = '<span class="crumbTrail">'._recurseCrumbTrail($session{page}{parentId}).'<a href="'.$session{page}{url}.'">'.$session{page}{title}.'</a></span>';
|
||||
$output =~ s/\^C/$temp/g;
|
||||
|
|
|
|||
|
|
@ -1,27 +0,0 @@
|
|||
package WebGUI::Macro::Carat_carat;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# 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;
|
||||
|
||||
sub process {
|
||||
my ($output);
|
||||
$output = $_[0];
|
||||
#---carrot ^---
|
||||
if ($output =~ /\^\^/) {
|
||||
$output =~ s/\^\^/\^/g;
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
|
||||
1;
|
||||
|
|
@ -12,12 +12,22 @@ package WebGUI::Macro::D_date;
|
|||
|
||||
use strict;
|
||||
use WebGUI::DateTime;
|
||||
use WebGUI::Macro;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp);
|
||||
$output = $_[0];
|
||||
#---date---
|
||||
my ($output, $temp, @param);
|
||||
$output = $_[0];
|
||||
while ($output =~ /\^D(.*?)\;/) {
|
||||
@param = WebGUI::Macro::getParams($1);
|
||||
if ($param[0] ne "") {
|
||||
$temp = epochToHuman(time(),$param[0]);
|
||||
} else {
|
||||
$temp = localtime(time());
|
||||
}
|
||||
$output =~ s/\^D(.*?)\;/$temp/;
|
||||
}
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^D(.*)\^\/D/) {
|
||||
$temp = epochToHuman(time(),$1);
|
||||
$output =~ s/\^D(.*)\^\/D/$temp/g;
|
||||
|
|
|
|||
|
|
@ -12,13 +12,25 @@ package WebGUI::Macro::H_homeLink;
|
|||
|
||||
use strict;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Macro;
|
||||
use WebGUI::Session;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp);
|
||||
$output = $_[0];
|
||||
#---home link---
|
||||
my ($output, $temp, @param);
|
||||
$output = $_[0];
|
||||
while ($output =~ /\^H(.*?)\;/) {
|
||||
@param = WebGUI::Macro::getParams($1);
|
||||
$temp = '<a class="homeLink" href="'.$session{env}{SCRIPT_NAME}.'/home">';
|
||||
if ($param[0] ne "") {
|
||||
$temp .= $param[0];
|
||||
} else {
|
||||
$temp .= WebGUI::International::get(47);
|
||||
}
|
||||
$temp .= '</a>';
|
||||
$output =~ s/\^H(.*?)\;/$temp/;
|
||||
}
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^H(.*)\^\/H/) {
|
||||
$temp = '<a class="homeLink" href="'.$session{env}{SCRIPT_NAME}.'/home">'.$1.'</a>';
|
||||
$output =~ s/\^H(.*)\^\/H/$temp/g;
|
||||
|
|
|
|||
|
|
@ -16,8 +16,11 @@ use WebGUI::Session;
|
|||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output);
|
||||
#---uid---
|
||||
$output = $_[0];
|
||||
while ($output =~ /\^\#(.*?)\;/) {
|
||||
$output =~ s/\^\#(.*?)\;/$session{user}{userId}/;
|
||||
}
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^\#/) {
|
||||
$output =~ s/\^\#/$session{user}{userId}/g;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,30 @@ use WebGUI::Session;
|
|||
sub process {
|
||||
my ($output, $temp);
|
||||
$output = $_[0];
|
||||
#---login box---
|
||||
while ($output =~ /\^L(.*?)\;/) {
|
||||
$temp = '<div class="loginBox">';
|
||||
if ($session{var}{sessionId}) {
|
||||
$temp .= WebGUI::International::get(48);
|
||||
$temp .= ' <a href="'.$session{page}{url}.'?op=displayAccount">'.$session{user}{username}.'</a>. ';
|
||||
$temp .= WebGUI::International::get(49);
|
||||
$temp = WebGUI::Macro::Backslash_pageUrl::process($temp);
|
||||
} else {
|
||||
$temp .= '<form method="post" action="'.$session{page}{url}.'"> ';
|
||||
$temp .= WebGUI::Form::hidden("op","login").'<span class="formSubtext">';
|
||||
$temp .= WebGUI::International::get(50);
|
||||
$temp .= '<br></span>';
|
||||
$temp .= WebGUI::Form::text("username",12,30).'<span class="formSubtext"><br>';
|
||||
$temp .= WebGUI::International::get(51);
|
||||
$temp .= '<br></span>';
|
||||
$temp .= WebGUI::Form::password("identifier",12,30).'<span class="formSubtext"><br></span>';
|
||||
$temp .= WebGUI::Form::submit(WebGUI::International::get(52));
|
||||
$temp .= '</form>';
|
||||
$temp .= '<a href="'.$session{page}{url}.'?op=createAccount">Click here to register.</a>';
|
||||
}
|
||||
$temp .= '</div>';
|
||||
$output =~ s/\^L(.*?)\;/$temp/;
|
||||
}
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^L/) {
|
||||
$temp = '<div class="loginBox">';
|
||||
if ($session{var}{sessionId}) {
|
||||
|
|
|
|||
|
|
@ -11,14 +11,26 @@ package WebGUI::Macro::M_currentMenuVertical;
|
|||
#-------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
use WebGUI::Macro;
|
||||
use WebGUI::Macro::Shared;
|
||||
use WebGUI::Session;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp);
|
||||
$output = $_[0];
|
||||
#---current menu vertical---
|
||||
my ($output, $temp, @param);
|
||||
$output = $_[0];
|
||||
while ($output =~ /\^M(.*?)\;/) {
|
||||
@param = WebGUI::Macro::getParams($1);
|
||||
$temp = '<span class="verticalMenu">';
|
||||
if ($param[0] ne "") {
|
||||
$temp .= traversePageTree($session{page}{pageId},0,$param[0]);
|
||||
} else {
|
||||
$temp .= traversePageTree($session{page}{pageId},0,1);
|
||||
}
|
||||
$temp .= '</span>';
|
||||
$output =~ s/\^M(.*?)\;/$temp/;
|
||||
}
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^M(.*)\^\/M/) {
|
||||
$temp = '<span class="verticalMenu">';
|
||||
$temp .= traversePageTree($session{page}{pageId},0,$1);
|
||||
|
|
|
|||
|
|
@ -11,14 +11,26 @@ package WebGUI::Macro::P_previousMenuVertical;
|
|||
#-------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
use WebGUI::Macro;
|
||||
use WebGUI::Macro::Shared;
|
||||
use WebGUI::Session;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp);
|
||||
$output = $_[0];
|
||||
#---previous menu vertical---
|
||||
my ($output, $temp, @param);
|
||||
$output = $_[0];
|
||||
while ($output =~ /\^P(.*?)\;/) {
|
||||
@param = WebGUI::Macro::getParams($1);
|
||||
$temp = '<span class="verticalMenu">';
|
||||
if ($param[0] ne "") {
|
||||
$temp .= traversePageTree($session{page}{parentId},0,$param[0]);
|
||||
} else {
|
||||
$temp .= traversePageTree($session{page}{parentId},0,1);
|
||||
}
|
||||
$temp .= '</span>';
|
||||
$output =~ s/\^P(.*?)\;/$temp/;
|
||||
}
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^P(.*)\^\/P/) {
|
||||
$temp = '<span class="verticalMenu">';
|
||||
$temp .= traversePageTree($session{page}{parentId},0,$1);
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ package WebGUI::Macro::S_specificMenuVertical;
|
|||
#-------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
use WebGUI::Macro;
|
||||
use WebGUI::Macro::Shared;
|
||||
use WebGUI::Privilege;
|
||||
use WebGUI::Session;
|
||||
|
|
@ -18,9 +19,23 @@ use WebGUI::SQL;
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp, $pageTitle, $depth, @data);
|
||||
$output = $_[0];
|
||||
#---any page sub menu vertical---
|
||||
my ($output, $temp, @param, @data);
|
||||
$output = $_[0];
|
||||
while ($output =~ /\^S(.*?)\;/) {
|
||||
@param = WebGUI::Macro::getParams($1);
|
||||
if ($param[1] eq "") {
|
||||
$param[1] = 0;
|
||||
}
|
||||
@data = WebGUI::SQL->quickArray("select pageId,title,urlizedTitle from page where urlizedTitle='$param[0]'",$session{dbh});
|
||||
$temp = '<span class="verticalMenu">';
|
||||
if (defined $data[0] && WebGUI::Privilege::canViewPage($data[0])) {
|
||||
$temp .= traversePageTree($data[0],1,$param[1]);
|
||||
}
|
||||
$temp .= '</span>';
|
||||
$output =~ s/\^S(.*?)\;/$temp/;
|
||||
}
|
||||
#---everything below this line will go away in a later rev.
|
||||
my ($pageTitle, $depth);
|
||||
if ($output =~ /\^S(.*)\^\/S/) {
|
||||
($pageTitle,$depth) = split(/,/,$1);
|
||||
if ($depth eq "") {
|
||||
|
|
@ -29,7 +44,6 @@ sub process {
|
|||
@data = WebGUI::SQL->quickArray("select pageId,title,urlizedTitle from page where urlizedTitle='$pageTitle'",$session{dbh});
|
||||
$temp = '<span class="verticalMenu">';
|
||||
if (defined $data[0] && WebGUI::Privilege::canViewPage($data[0])) {
|
||||
#$temp .= '<a href="'.$session{env}{SCRIPT_URL}.'/'.$data[2].'">'.$data[1].'</a><br>';
|
||||
$temp .= traversePageTree($data[0],1,$depth);
|
||||
}
|
||||
$temp .= '</span>';
|
||||
|
|
|
|||
|
|
@ -11,13 +11,23 @@ package WebGUI::Macro::Splat_random;
|
|||
#-------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
use WebGUI::Macro;
|
||||
use WebGUI::Utility;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp);
|
||||
$output = $_[0];
|
||||
#---random number---
|
||||
my ($output, $temp, @param);
|
||||
$output = $_[0];
|
||||
while ($output =~ /\^\*(.*?)\;/) {
|
||||
@param = WebGUI::Macro::getParams($1);
|
||||
if ($param[0] ne "") {
|
||||
$temp = round(rand()*$1);
|
||||
} else {
|
||||
$temp = round(rand()*1000000000);
|
||||
}
|
||||
$output =~ s/\^\*(.*?)\;/$temp/;
|
||||
}
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^\*(.*)\^\/\*/) {
|
||||
$temp = round(rand()*$1);
|
||||
$output =~ s/\^\*(.*)\^\/\*/$temp/g;
|
||||
|
|
|
|||
|
|
@ -11,13 +11,25 @@ package WebGUI::Macro::T_topMenuVertical;
|
|||
#-------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
use WebGUI::Macro;
|
||||
use WebGUI::Macro::Shared;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp);
|
||||
$output = $_[0];
|
||||
#---top menu vertical---
|
||||
my ($output, $temp, @param);
|
||||
$output = $_[0];
|
||||
while ($output =~ /\^T(.*?)\;/) {
|
||||
@param = WebGUI::Macro::getParams($1);
|
||||
$temp = '<span class="verticalMenu">';
|
||||
if ($param[0] ne "") {
|
||||
$temp .= traversePageTree(1,0,$param[0]);
|
||||
} else {
|
||||
$temp .= traversePageTree(1,0,1);
|
||||
}
|
||||
$temp .= '</span>';
|
||||
$output =~ s/\^T(.*?)\;/$temp/;
|
||||
}
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^T(.*)\^\/T/) {
|
||||
$temp = '<span class="verticalMenu">';
|
||||
$temp .= traversePageTree(1,0,$1);
|
||||
|
|
|
|||
|
|
@ -12,13 +12,25 @@ package WebGUI::Macro::a_account;
|
|||
|
||||
use strict;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Macro;
|
||||
use WebGUI::Session;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp);
|
||||
my ($output, $temp, @param);
|
||||
$output = $_[0];
|
||||
#---account link---
|
||||
while ($output =~ /\^a(.*?)\;/) {
|
||||
@param = WebGUI::Macro::getParams($1);
|
||||
$temp = '<a class="myAccountLink" href="'.$session{page}{url}.'?op=displayAccount">';
|
||||
if ($param[0] ne "") {
|
||||
$temp .= $param[0];
|
||||
} else {
|
||||
$temp .= WebGUI::International::get(46);
|
||||
}
|
||||
$temp .= '</a>';
|
||||
$output =~ s/\^a(.*?)\;/$temp/;
|
||||
}
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^a(.*)\^\/a/) {
|
||||
$temp = '<a class="myAccountLink" href="'.$session{page}{url}.'?op=displayAccount">'.$1.'</a>';
|
||||
$output =~ s/\^a(.*)\^\/a/$temp/g;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,10 @@ use WebGUI::Session;
|
|||
sub process {
|
||||
my ($output);
|
||||
$output = $_[0];
|
||||
#---company name---
|
||||
while ($output =~ /\^c(.*?)\;/) {
|
||||
$output =~ s/\^c(.*?)\;/$session{setting}{companyName}/;
|
||||
}
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^c/) {
|
||||
$output =~ s/\^c/$session{setting}{companyName}/g;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,10 @@ use WebGUI::Session;
|
|||
sub process {
|
||||
my ($output);
|
||||
$output = $_[0];
|
||||
#---company email---
|
||||
while ($output =~ /\^e(.*?)\;/) {
|
||||
$output =~ s/\^e(.*?)\;/$session{setting}{companyEmail}/;
|
||||
}
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^e/) {
|
||||
$output =~ s/\^e/$session{setting}{companyEmail}/g;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,25 @@ use WebGUI::SQL;
|
|||
sub process {
|
||||
my ($output, $temp, @data, $sth, $first);
|
||||
$output = $_[0];
|
||||
#---current menu horizontal ---
|
||||
while ($output =~ /\^m(.*?)\;/) {
|
||||
$temp = '<span class="horizontalMenu">';
|
||||
$first = 1;
|
||||
$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) {
|
||||
$first = 0;
|
||||
} else {
|
||||
$temp .= " · ";
|
||||
}
|
||||
$temp .= '<a class="horizontalMenu" href="'.$session{env}{SCRIPT_NAME}.'/'.$data[1].'">'.$data[0].'</a>';
|
||||
}
|
||||
}
|
||||
$sth->finish;
|
||||
$temp .= '</span>';
|
||||
$output =~ s/\^m(.*?)\;/$temp/;
|
||||
}
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^m/) {
|
||||
$temp = '<span class="horizontalMenu">';
|
||||
$first = 1;
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ package WebGUI::Macro::p_previousMenuHorizontal;
|
|||
#-------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
use WebGUI::Macro;
|
||||
use WebGUI::Privilege;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
|
|
@ -19,7 +20,25 @@ use WebGUI::SQL;
|
|||
sub process {
|
||||
my ($output, $temp, @data, $sth, $first);
|
||||
$output = $_[0];
|
||||
#---previous menu horizontal ---
|
||||
while ($output =~ /\^p(.*?)\;/) {
|
||||
$temp = '<span class="horizontalMenu">';
|
||||
$first = 1;
|
||||
$sth = WebGUI::SQL->read("select title,urlizedTitle,pageId from page where parentId=$session{page}{parentId} order by sequenceNumber",$session{dbh});
|
||||
while (@data = $sth->array) {
|
||||
if (WebGUI::Privilege::canViewPage($data[2])) {
|
||||
if ($first) {
|
||||
$first = 0;
|
||||
} else {
|
||||
$temp .= " · ";
|
||||
}
|
||||
$temp .= '<a class="horizontalMenu" href="'.$session{env}{SCRIPT_NAME}.'/'.$data[1].'">'.$data[0].'</a>';
|
||||
}
|
||||
}
|
||||
$sth->finish;
|
||||
$temp .= '</span>';
|
||||
$output =~ s/\^p(.*?)\;/$temp/;
|
||||
}
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^p/) {
|
||||
$temp = '<span class="horizontalMenu">';
|
||||
$first = 1;
|
||||
|
|
|
|||
|
|
@ -12,30 +12,34 @@ package WebGUI::Macro::r_printable;
|
|||
|
||||
use strict;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Macro;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::Utility;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output, $temp);
|
||||
$output = $_[0];
|
||||
#---remove style for printing link---
|
||||
if ($output =~ /\^r(.*)\^\/r/) {
|
||||
$temp = $session{env}{REQUEST_URI};
|
||||
if ($temp =~ /\?/) {
|
||||
$temp .= '&makePrintable=1';
|
||||
my ($output, $temp, @param);
|
||||
$output = $_[0];
|
||||
while ($output =~ /\^r(.*?)\;/) {
|
||||
@param = WebGUI::Macro::getParams($1);
|
||||
$temp = appendToUrl($session{env}{REQUEST_URI},'makePrintable=1');
|
||||
$temp = '<a class="makePrintableLink" href="'.$temp.'">';
|
||||
if ($param[0] ne "") {
|
||||
$temp .= $param[0];
|
||||
} else {
|
||||
$temp .= '?makePrintable=1';
|
||||
$temp .= WebGUI::International::get(53);
|
||||
}
|
||||
$temp = '<a class="makePrintable" href="'.$temp.'">'.$1.'</a>';
|
||||
$temp .= '</a>';
|
||||
$output =~ s/\^r(.*?)\;/$temp/;
|
||||
}
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^r(.*)\^\/r/) {
|
||||
$temp = appendToUrl($session{env}{REQUEST_URI},'makePrintable=1');
|
||||
$temp = '<a class="makePrintableLink" href="'.$temp.'">'.$1.'</a>';
|
||||
$output =~ s/\^r(.*)\^\/r/$temp/g;
|
||||
} elsif ($output =~ /\^r/) {
|
||||
$temp = $session{env}{REQUEST_URI};
|
||||
if ($temp =~ /\?/) {
|
||||
$temp .= '&makePrintable=1';
|
||||
} else {
|
||||
$temp .= '?makePrintable=1';
|
||||
}
|
||||
$temp = '<a class="makePrintable" href="'.$temp.'">';
|
||||
$temp = appendToUrl($session{env}{REQUEST_URI},'makePrintable=1');
|
||||
$temp = '<a class="makePrintableLink" href="'.$temp.'">';
|
||||
$temp .= WebGUI::International::get(53);
|
||||
$temp .= '</a>';
|
||||
$output =~ s/\^r/$temp/g;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,27 @@ use WebGUI::SQL;
|
|||
sub process {
|
||||
my ($output, $temp, @data, $pageTitle, $parentId, $sth, $first);
|
||||
$output = $_[0];
|
||||
#---any page sub menu vertical---
|
||||
while ($output =~ /\^s(.*?)\;/) {
|
||||
$pageTitle = $1;
|
||||
$temp = '<span class="horizontalMenu">';
|
||||
$first = 1;
|
||||
($parentId) = WebGUI::SQL->quickArray("select pageId from page where urlizedTitle='$pageTitle'",$session{dbh});
|
||||
$sth = WebGUI::SQL->read("select title,urlizedTitle,pageId from page where parentId='$parentId' order by sequenceNumber",$session{dbh});
|
||||
while (@data = $sth->array) {
|
||||
if (WebGUI::Privilege::canViewPage($data[2])) {
|
||||
if ($first) {
|
||||
$first = 0;
|
||||
} else {
|
||||
$temp .= " · ";
|
||||
}
|
||||
$temp .= '<a class="horizontalMenu" href="'.$session{env}{SCRIPT_NAME}.'/'.$data[1].'">'.$data[0].'</a>';
|
||||
}
|
||||
}
|
||||
$sth->finish;
|
||||
$temp .= '</span>';
|
||||
$output =~ s/\^s(.*?)\;/$temp/;
|
||||
}
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^s(.*)\^\/s/) {
|
||||
$pageTitle = $1;
|
||||
$temp = '<span class="horizontalMenu">';
|
||||
|
|
|
|||
|
|
@ -19,7 +19,25 @@ use WebGUI::SQL;
|
|||
sub process {
|
||||
my ($output, $temp, @data, $sth, $first);
|
||||
$output = $_[0];
|
||||
#---top menu horizontal---
|
||||
while ($output =~ /\^t(.*?)\;/) {
|
||||
$temp = '<span class="horizontalMenu">';
|
||||
$first = 1;
|
||||
$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) {
|
||||
$first = 0;
|
||||
} else {
|
||||
$temp .= " · ";
|
||||
}
|
||||
$temp .= '<a class="horizontalMenu" href="'.$session{env}{SCRIPT_NAME}.'/'.$data[1].'">'.$data[0].'</a>';
|
||||
}
|
||||
}
|
||||
$sth->finish;
|
||||
$temp .= '</span>';
|
||||
$output =~ s/\^t(.*?)\;/$temp/;
|
||||
}
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^t/) {
|
||||
$temp = '<span class="horizontalMenu">';
|
||||
$first = 1;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,10 @@ use WebGUI::Session;
|
|||
sub process {
|
||||
my ($output, $temp, @data, $sth, $first);
|
||||
$output = $_[0];
|
||||
#---company URL---
|
||||
while ($output =~ /\^u(.*?)\;/) {
|
||||
$output =~ s/\^u(.*?)\;/$session{setting}{companyURL}/;
|
||||
}
|
||||
#---everything below this line will go away in a later rev.
|
||||
if ($output =~ /\^u/) {
|
||||
$output =~ s/\^u/$session{setting}{companyURL}/g;
|
||||
}
|
||||
|
|
|
|||
48
lib/WebGUI/MessageLog.pm
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
package WebGUI::MessageLog;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# 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::Session;
|
||||
use WebGUI::Utility;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub addEntry {
|
||||
my ($user, %userLanguage, $messageLogId, %message);
|
||||
$messageLogId = getNextId("messageLogId");
|
||||
if ($_[0] ne "") {
|
||||
($userLanguage{$_[0]}) = WebGUI::SQL->quickArray("select language from users where userId=$_[0]",$session{dbh});
|
||||
}
|
||||
if ($_[1] ne "") {
|
||||
%userLanguage = (WebGUI::SQL->buildHash("select users.userId,users.language from groupings,users where groupings.groupId=$_[1] and groupings.userId=users.userId",$session{dbh}),%userLanguage);
|
||||
}
|
||||
%message = WebGUI::SQL->buildHash("select language,message from international where internationalId=$_[3] and namespace='$_[4]'",$session{dbh});
|
||||
foreach $user (keys %userLanguage) {
|
||||
WebGUI::SQL->write("insert into messageLog values ($messageLogId,$user,".quote($message{$userLanguage{$user}}).",".quote($_[2]).",".time().")",$session{dbh});
|
||||
# here is where we'll trigger communication with external systems like email
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub completeEntry {
|
||||
my ($sth, @data, $completeMessage);
|
||||
$completeMessage = WebGUI::International::get(350);
|
||||
# unfortunately had to loop through reading and writing because I couldn't
|
||||
# find a concatination function that worked the same in all DB servers
|
||||
$sth = WebGUI::SQL->read("select message,userId from messageLog where messageLogId=$_[0]",$session{dbh});
|
||||
while (@data = $sth->array) {
|
||||
WebGUI::SQL->write("update messageLog set message=".quote($completeMessage.": ".$data[0]).", dateOfEntry=".time()." where messageLogId='$_[0]' and userId=$data[1]",$session{dbh});
|
||||
}
|
||||
$sth->finish;
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
|
@ -19,7 +19,6 @@ use WebGUI::Operation::Page;
|
|||
use WebGUI::Operation::Settings;
|
||||
use WebGUI::Operation::Statistics;
|
||||
use WebGUI::Operation::Style;
|
||||
use WebGUI::Operation::Submission;
|
||||
use WebGUI::Operation::Trash;
|
||||
use WebGUI::Operation::User;
|
||||
|
||||
|
|
|
|||
|
|
@ -26,9 +26,30 @@ use WebGUI::SQL;
|
|||
use WebGUI::Utility;
|
||||
|
||||
our @ISA = qw(Exporter);
|
||||
our @EXPORT = qw(&www_viewProfile &www_editProfile &www_editProfileSave &www_createAccount &www_deactivateAccount &www_deactivateAccountConfirm &www_displayAccount &www_displayLogin &www_login &www_logout &www_recoverPassword &www_recoverPasswordFinish &www_saveAccount &www_updateAccount);
|
||||
our @EXPORT = qw(&www_viewMessageLog &www_viewProfile &www_editProfile &www_editProfileSave &www_createAccount &www_deactivateAccount &www_deactivateAccountConfirm &www_displayAccount &www_displayLogin &www_login &www_logout &www_recoverPassword &www_recoverPasswordFinish &www_saveAccount &www_updateAccount);
|
||||
our %ldapStatusCode = ( 0=>'success (0)', 1=>'Operations Error (1)', 2=>'Protocol Error (2)', 3=>'Time Limit Exceeded (3)', 4=>'Size Limit Exceeded (4)', 5=>'Compare False (5)', 6=>'Compare True (6)', 7=>'Auth Method Not Supported (7)', 8=>'Strong Auth Required (8)', 9=>'Referral (10)', 11=>'Admin Limit Exceeded (11)', 12=>'Unavailable Critical Extension (12)', 13=>'Confidentiality Required (13)', 14=>'Sasl Bind In Progress (14)', 15=>'No Such Attribute (16)', 17=>'Undefined Attribute Type (17)', 18=>'Inappropriate Matching (18)', 19=>'Constraint Violation (19)', 20=>'Attribute Or Value Exists (20)', 21=>'Invalid Attribute Syntax (21)', 32=>'No Such Object (32)', 33=>'Alias Problem (33)', 34=>'Invalid DN Syntax (34)', 36=>'Alias Dereferencing Problem (36)', 48=>'Inappropriate Authentication (48)', 49=>'Invalid Credentials (49)', 50=>'Insufficient Access Rights (50)', 51=>'Busy (51)', 52=>'Unavailable (52)', 53=>'Unwilling To Perform (53)', 54=>'Loop Detect (54)', 64=>'Naming Violation (64)', 65=>'Object Class Violation (65)', 66=>'Not Allowed On Non Leaf (66)', 67=>'Not Allowed On RDN (67)', 68=>'Entry Already Exists (68)', 69=>'Object Class Mods Prohibited (69)', 71=>'Affects Multiple DSAs (71)', 80=>'other (80)');
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub _accountOptions {
|
||||
my ($output);
|
||||
$output = '<div class="accountOptions"><ul>';
|
||||
if (WebGUI::Privilege::isInGroup(3) || WebGUI::Privilege::isInGroup(4)) {
|
||||
if ($session{var}{adminOn}) {
|
||||
$output .= '<li><a href="'.$session{page}{url}.'?op=switchOffAdmin">'.WebGUI::International::get(12).'</a>';
|
||||
} else {
|
||||
$output .= '<li><a href="'.$session{page}{url}.'?op=switchOnAdmin">'.WebGUI::International::get(63).'</a>';
|
||||
}
|
||||
}
|
||||
$output .= '<li><a href="'.$session{page}{url}.'?op=displayAccount">'.WebGUI::International::get(342).'</a>';
|
||||
$output .= '<li><a href="'.$session{page}{url}.'?op=editProfile">'.WebGUI::International::get(341).'</a>';
|
||||
$output .= '<li><a href="'.$session{page}{url}.'?op=viewProfile&uid='.$session{user}{userId}.'">'.WebGUI::International::get(343).'</a>';
|
||||
$output .= '<li><a href="'.$session{page}{url}.'?op=viewMessageLog">'.WebGUI::International::get(354).'</a>';
|
||||
$output .= '<li><a href="'.$session{page}{url}.'?op=logout">'.WebGUI::International::get(64).'</a>';
|
||||
$output .= '<li><a href="'.$session{page}{url}.'?op=deactivateAccount">'.WebGUI::International::get(65).'</a>';
|
||||
$output .= '</ul></div>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub _hasBadPassword {
|
||||
if ($_[0] ne $_[1] || $_[0] eq "") {
|
||||
|
|
@ -157,18 +178,7 @@ sub www_displayAccount {
|
|||
$output .= '<tr><td></td><td>'.WebGUI::Form::submit(WebGUI::International::get(62)).'</td></tr>';
|
||||
$output .= '</table>';
|
||||
$output .= '</form> ';
|
||||
$output .= '<div class="accountOptions"><ul>';
|
||||
if (WebGUI::Privilege::isInGroup(3) || WebGUI::Privilege::isInGroup(4)) {
|
||||
if ($session{var}{adminOn}) {
|
||||
$output .= '<li><a href="'.$session{page}{url}.'?op=switchOffAdmin">'.WebGUI::International::get(12).'</a>';
|
||||
} else {
|
||||
$output .= '<li><a href="'.$session{page}{url}.'?op=switchOnAdmin">'.WebGUI::International::get(63).'</a>';
|
||||
}
|
||||
}
|
||||
$output .= '<li><a href="'.$session{page}{url}.'?op=editProfile">'.WebGUI::International::get(341).'</a>';
|
||||
$output .= '<li><a href="'.$session{page}{url}.'?op=viewProfile&uid='.$session{user}{userId}.'">'.WebGUI::International::get(343).'</a>';
|
||||
$output .= '<li><a href="'.$session{page}{url}.'?op=logout">'.WebGUI::International::get(64).'</a>';
|
||||
$output .= '<li><a href="'.$session{page}{url}.'?op=deactivateAccount">'.WebGUI::International::get(65).'</a></ul></div>';
|
||||
$output .= _accountOptions();
|
||||
} else {
|
||||
$output .= www_displayLogin();
|
||||
}
|
||||
|
|
@ -250,19 +260,7 @@ sub www_editProfile {
|
|||
$output .= '<tr><td></td><td>'.WebGUI::Form::submit(WebGUI::International::get(62)).'</td></tr>';
|
||||
$output .= '</table>';
|
||||
$output .= '</form>';
|
||||
$output .= '<div class="accountOptions"><ul>';
|
||||
if (WebGUI::Privilege::isInGroup(3) || WebGUI::Privilege::isInGroup(4)) {
|
||||
if ($session{var}{adminOn}) {
|
||||
$output .= '<li><a href="'.$session{page}{url}.'?op=switchOffAdmin">'.WebGUI::International::get(12).'</a>';
|
||||
} else {
|
||||
$output .= '<li><a href="'.$session{page}{url}.'?op=switchOnAdmin">'.WebGUI::International::get(63).'</a>';
|
||||
}
|
||||
}
|
||||
$output .= '<li><a href="'.$session{page}{url}.'?op=displayAccount">'.WebGUI::International::get(342).'</a>';
|
||||
$output .= '<li><a href="'.$session{page}{url}.'?op=viewProfile&uid='.$session{user}{userId}.'">'.WebGUI::International::get(343).'</a>';
|
||||
$output .= '<li><a href="'.$session{page}{url}.'?op=logout">'.WebGUI::International::get(64).'</a>';
|
||||
$output .= '<li><a href="'.$session{page}{url}.'?op=deactivateAccount">'.WebGUI::International::get(65).'</a>';
|
||||
$output .= '</ul></div>';
|
||||
$output .= _accountOptions();
|
||||
} else {
|
||||
$output .= www_displayLogin();
|
||||
}
|
||||
|
|
@ -406,18 +404,23 @@ sub www_saveAccount {
|
|||
$ldap = Net::LDAP->new($uri->host, %args) or $error .= WebGUI::International::get(79);
|
||||
$ldap->bind;
|
||||
$search = $ldap->search (base => $uri->dn, filter => $session{setting}{ldapId}."=".$session{form}{ldapId});
|
||||
$connectDN = "cn=".$search->entry(0)->get_value("cn");
|
||||
$ldap->unbind;
|
||||
$ldap = Net::LDAP->new($uri->host, %args) or $error .= WebGUI::International::get(79);
|
||||
$auth = $ldap->bind(dn=>$connectDN, password=>$session{form}{ldapPassword});
|
||||
if ($auth->code == 48 || $auth->code == 49) {
|
||||
if (defined $search->entry(0)) {
|
||||
$connectDN = "cn=".$search->entry(0)->get_value("cn");
|
||||
$ldap->unbind;
|
||||
$ldap = Net::LDAP->new($uri->host, %args) or $error .= WebGUI::International::get(79);
|
||||
$auth = $ldap->bind(dn=>$connectDN, password=>$session{form}{ldapPassword});
|
||||
if ($auth->code == 48 || $auth->code == 49) {
|
||||
$error .= WebGUI::International::get(68);
|
||||
WebGUI::ErrorHandler::warn("Invalid LDAP information for registration of LDAP ID: ".$session{form}{ldapId});
|
||||
} elsif ($auth->code > 0) {
|
||||
$error .= 'LDAP error "'.$ldapStatusCode{$auth->code}.'" occured. '.WebGUI::International::get(69);
|
||||
WebGUI::ErrorHandler::warn("LDAP error: ".$ldapStatusCode{$auth->code});
|
||||
}
|
||||
$ldap->unbind;
|
||||
} else {
|
||||
$error .= WebGUI::International::get(68);
|
||||
WebGUI::ErrorHandler::warn("Invalid LDAP information for registration of LDAP ID: ".$session{form}{ldapId});
|
||||
} elsif ($auth->code > 0) {
|
||||
$error .= 'LDAP error "'.$ldapStatusCode{$auth->code}.'" occured. '.WebGUI::International::get(69);
|
||||
WebGUI::ErrorHandler::warn("LDAP error: ".$ldapStatusCode{$auth->code});
|
||||
WebGUI::ErrorHandler::warn("Invalid LDAP information for registration of LDAP ID: ".$session{form}{ldapId});
|
||||
}
|
||||
$ldap->unbind;
|
||||
}
|
||||
if ($error eq "") {
|
||||
$encryptedPassword = Digest::MD5::md5_base64($session{form}{identifier1});
|
||||
|
|
@ -470,6 +473,43 @@ sub www_updateAccount {
|
|||
return $output;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_viewMessageLog {
|
||||
my (@data, $output, $sth, @row, $i, $dataRows, $prevNextBar);
|
||||
if (WebGUI::Privilege::isInGroup(2,$session{user}{userId})) {
|
||||
$output = '<h1>'.WebGUI::International::get(159).'</h1>';
|
||||
$sth = WebGUI::SQL->read("select messageLogId,message,url,dateOfEntry from messageLog where userId=$session{user}{userId} order by dateOfEntry desc",$session{dbh});
|
||||
while (@data = $sth->array) {
|
||||
$row[$i] = '<tr><td class="tableData">';
|
||||
if ($data[2] ne "") {
|
||||
$data[2] = appendToUrl($data[2],'mlog='.$data[0]);
|
||||
$row[$i] .= '<a href="'.$data[2].'">';
|
||||
}
|
||||
$row[$i] .= $data[1];
|
||||
if ($data[2] ne "") {
|
||||
$row[$i] .= '</a>';
|
||||
}
|
||||
$row[$i] .= '</td><td class="tableData">'.epochToHuman($data[3],"%m/%d/%Y").'</td></tr>';
|
||||
$i++;
|
||||
}
|
||||
$sth->finish;
|
||||
($dataRows, $prevNextBar) = paginate(50,$session{page}{url}.'?op=viewMessageLog',\@row);
|
||||
$output .= '<table width="100%" cellspacing=1 cellpadding=2 border=0>';
|
||||
$output .= '<tr><td class="tableHeader">'.WebGUI::International::get(351).'</td><td class="tableHeader">'.WebGUI::International::get(352).'</td></tr>';
|
||||
if ($dataRows eq "") {
|
||||
$output .= '<tr><td rowspan=2 class="tableData">'.WebGUI::International::get(353).'</td></tr>';
|
||||
} else {
|
||||
$output .= $dataRows;
|
||||
}
|
||||
$output .= '</table>';
|
||||
$output .= $prevNextBar;
|
||||
$output .= _accountOptions();
|
||||
} else {
|
||||
$output = WebGUI::Privilege::insufficient();
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_viewProfile {
|
||||
my ($output, %user);
|
||||
|
|
@ -536,19 +576,7 @@ sub www_viewProfile {
|
|||
}
|
||||
$output .= '</table>';
|
||||
if ($session{user}{userId} == $session{form}{uid}) {
|
||||
$output .= '<div class="accountOptions"><ul>';
|
||||
if (WebGUI::Privilege::isInGroup(3) || WebGUI::Privilege::isInGroup(4)) {
|
||||
if ($session{var}{adminOn}) {
|
||||
$output .= '<li><a href="'.$session{page}{url}.'?op=switchOffAdmin">'.WebGUI::International::get(12).'</a>';
|
||||
} else {
|
||||
$output .= '<li><a href="'.$session{page}{url}.'?op=switchOnAdmin">'.WebGUI::International::get(63).'</a>';
|
||||
}
|
||||
}
|
||||
$output .= '<li><a href="'.$session{page}{url}.'?op=displayAccount">'.WebGUI::International::get(342).'</a>';
|
||||
$output .= '<li><a href="'.$session{page}{url}.'?op=editProfile">'.WebGUI::International::get(341).'</a>';
|
||||
$output .= '<li><a href="'.$session{page}{url}.'?op=logout">'.WebGUI::International::get(64).'</a>';
|
||||
$output .= '<li><a href="'.$session{page}{url}.'?op=deactivateAccount">'.WebGUI::International::get(65).'</a>';
|
||||
$output .= '</ul></div>';
|
||||
$output .= _accountOptions();
|
||||
}
|
||||
} else {
|
||||
$output .= WebGUI::Privilege::insufficient();
|
||||
|
|
|
|||
|
|
@ -127,9 +127,8 @@ sub www_editGroupSave {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_listGroups {
|
||||
my ($output, $pn, $sth, @data, @row, $i, $itemsPerPage);
|
||||
my ($output, $dataRows, $prevNextBar, $sth, @data, @row, $i);
|
||||
if (WebGUI::Privilege::isInGroup(3)) {
|
||||
$itemsPerPage = 50;
|
||||
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=10&namespace=WebGUI"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a>';
|
||||
$output .= '<h1>'.WebGUI::International::get(89).'</h1>';
|
||||
$output .= '<div align="center"><a href="'.$session{page}{url}.'?op=addGroup">'.WebGUI::International::get(90).'</a></div>';
|
||||
|
|
@ -141,28 +140,12 @@ sub www_listGroups {
|
|||
$row[$i] .= '<td valign="top">'.$data[2].'</td></tr>';
|
||||
$i++;
|
||||
}
|
||||
if ($session{form}{pn} < 1) {
|
||||
$pn = 0;
|
||||
} else {
|
||||
$pn = $session{form}{pn};
|
||||
}
|
||||
for ($i=($itemsPerPage*$pn); $i<($itemsPerPage*($pn+1));$i++) {
|
||||
$output .= $row[$i];
|
||||
}
|
||||
$sth->finish;
|
||||
($dataRows, $prevNextBar) = paginate(50,$session{page}{url}.'?op=listGroups',\@row);
|
||||
$output .= '<table border=1 cellpadding=5 cellspacing=0 align="center">';
|
||||
$output .= $dataRows;
|
||||
$output .= '</table>';
|
||||
$output .= '<div class="pagination">';
|
||||
if ($pn > 0) {
|
||||
$output .= '<a href="'.$session{page}{url}.'?pn='.($pn-1).'&op=listGroups">«'.WebGUI::International::get(91).'</a>';
|
||||
} else {
|
||||
$output .= '«'.WebGUI::International::get(91);
|
||||
}
|
||||
$output .= ' · ';
|
||||
if ($pn < round($#row/$itemsPerPage)) {
|
||||
$output .= '<a href="'.$session{page}{url}.'?pn='.($pn+1).'&op=listGroups">'.WebGUI::International::get(92).'»</a>';
|
||||
} else {
|
||||
$output .= WebGUI::International::get(92).'»';
|
||||
}
|
||||
$output .= '</div>';
|
||||
$output .= $prevNextBar;
|
||||
return $output;
|
||||
} else {
|
||||
return WebGUI::Privilege::adminOnly();
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@ sub www_addStyle {
|
|||
$output .= WebGUI::Form::hidden("op","addStyleSave");
|
||||
$output .= '<table>';
|
||||
$output .= '<tr><td class="formDescription" valign="top">'.WebGUI::International::get(151).'</td><td>'.WebGUI::Form::text("name",20,30).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription" valign="top">'.WebGUI::International::get(152).'</td><td>'.WebGUI::Form::textArea("header",'',50,10,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription" valign="top">'.WebGUI::International::get(153).'</td><td>'.WebGUI::Form::textArea("footer",'',50,10,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription" valign="top">'.WebGUI::International::get(152).'</td><td>'.WebGUI::Form::textArea("header",'',50,10).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription" valign="top">'.WebGUI::International::get(153).'</td><td>'.WebGUI::Form::textArea("footer",'',50,10).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription" valign="top">'.WebGUI::International::get(154).'</td><td>'.WebGUI::Form::textArea("styleSheet","<style>\n\n</style>",50,10).'</td></tr>';
|
||||
$output .= '<tr><td></td><td>'.WebGUI::Form::submit(WebGUI::International::get(62)).'</td></tr>';
|
||||
$output .= '</table>';
|
||||
|
|
@ -111,8 +111,8 @@ sub www_editStyle {
|
|||
$output .= WebGUI::Form::hidden("sid",$session{form}{sid});
|
||||
$output .= '<table>';
|
||||
$output .= '<tr><td class="formDescription" valign="top">'.WebGUI::International::get(151).'</td><td>'.WebGUI::Form::text("name",20,30,$style{name}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription" valign="top">'.WebGUI::International::get(152).'</td><td>'.WebGUI::Form::textArea("header",$style{header},50,10,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription" valign="top">'.WebGUI::International::get(153).'</td><td>'.WebGUI::Form::textArea("footer",$style{footer},50,10,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription" valign="top">'.WebGUI::International::get(152).'</td><td>'.WebGUI::Form::textArea("header",$style{header},50,10).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription" valign="top">'.WebGUI::International::get(153).'</td><td>'.WebGUI::Form::textArea("footer",$style{footer},50,10).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription" valign="top">'.WebGUI::International::get(154).'</td><td>'.WebGUI::Form::textArea("styleSheet",$style{styleSheet},50,10).'</td></tr>';
|
||||
$output .= '<tr><td></td><td>'.WebGUI::Form::submit(WebGUI::International::get(62)).'</td></tr>';
|
||||
$output .= '</table>';
|
||||
|
|
@ -135,41 +135,23 @@ sub www_editStyleSave {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_listStyles {
|
||||
my ($output, $pn, $sth, @data, @row, $i, $itemsPerPage);
|
||||
my ($output, $sth, @data, @row, $i, $prevNextBar, $dataRows);
|
||||
if (WebGUI::Privilege::isInGroup(3)) {
|
||||
$itemsPerPage = 50;
|
||||
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=9&namespace=WebGUI"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a>';
|
||||
$output .= '<h1>'.WebGUI::International::get(157).'</h1>';
|
||||
$output .= '<div align="center"><a href="'.$session{page}{url}.'?op=addStyle">'.WebGUI::International::get(158).'</a></div>';
|
||||
$output .= '<table border=1 cellpadding=5 cellspacing=0 align="center">';
|
||||
$sth = WebGUI::SQL->read("select styleId,name from style where name<>'Reserved' order by name",$session{dbh});
|
||||
while (@data = $sth->array) {
|
||||
$row[$i] = '<tr><td valign="top"><a href="'.$session{page}{url}.'?op=deleteStyle&sid='.$data[0].'"><img src="'.$session{setting}{lib}.'/delete.gif" border=0></a><a href="'.$session{page}{url}.'?op=editStyle&sid='.$data[0].'"><img src="'.$session{setting}{lib}.'/edit.gif" border=0></a><a href="'.$session{page}{url}.'?op=copyStyle&sid='.$data[0].'"><img src="'.$session{setting}{lib}.'/copy.gif" border=0></a></td>';
|
||||
$row[$i] .= '<td valign="top">'.$data[1].'</td></tr>';
|
||||
$i++;
|
||||
}
|
||||
if ($session{form}{pn} < 1) {
|
||||
$pn = 0;
|
||||
} else {
|
||||
$pn = $session{form}{pn};
|
||||
}
|
||||
for ($i=($itemsPerPage*$pn); $i<($itemsPerPage*($pn+1));$i++) {
|
||||
$output .= $row[$i];
|
||||
}
|
||||
$output .= '</table>';
|
||||
$output .= '<div class="pagination">';
|
||||
if ($pn > 0) {
|
||||
$output .= '<a href="'.$session{page}{url}.'?pn='.($pn-1).'&op=listStyles">«Previous Page</a>';
|
||||
} else {
|
||||
$output .= '«Previous Page';
|
||||
}
|
||||
$output .= ' · ';
|
||||
if ($pn < round($#row/$itemsPerPage)) {
|
||||
$output .= '<a href="'.$session{page}{url}.'?pn='.($pn+1).'&op=listStyles">Next Page»</a>';
|
||||
} else {
|
||||
$output .= 'Next Page»';
|
||||
}
|
||||
$output .= '</div>';
|
||||
$sth->finish;
|
||||
($dataRows, $prevNextBar) = paginate(50,$session{page}{url}.'?op=listStyles',\@row);
|
||||
$output .= '<table border=1 cellpadding=5 cellspacing=0 align="center">';
|
||||
$output .= $dataRows;
|
||||
$output .= '</table>';
|
||||
$output .= $prevNextBar;
|
||||
return $output;
|
||||
} else {
|
||||
return WebGUI::Privilege::adminOnly();
|
||||
|
|
|
|||
|
|
@ -1,88 +0,0 @@
|
|||
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::DateTime;
|
||||
use WebGUI::International;
|
||||
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 UserSubmission_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 UserSubmission_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>'.WebGUI::International::get(159).'</h1>';
|
||||
$sth = WebGUI::SQL->read("select title,submissionId,dateSubmitted,username,userId,widgetId from UserSubmission_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">'.epochToHuman($submission[2],"%m/%d/%Y").'</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">'.WebGUI::International::get(99).'</td><td class="tableHeader">'.WebGUI::International::get(160).'</td><td class="tableHeader">'.WebGUI::International::get(161).'</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">«'.WebGUI::International::get(91).'</a>';
|
||||
} else {
|
||||
$output .= '«'.WebGUI::International::get(91);
|
||||
}
|
||||
$output .= ' · ';
|
||||
if ($pn < round($#row/50)) {
|
||||
$output .= '<a href="'.$session{page}{url}.'?pn='.($pn+1).'&op=viewPendingSubmissions">'.WebGUI::International::get(92).'»</a>';
|
||||
} else {
|
||||
$output .= WebGUI::International::get(92).'»';
|
||||
}
|
||||
$output .= '</div>';
|
||||
} else {
|
||||
$output = WebGUI::Privilege::insufficient();
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
|
@ -81,6 +81,7 @@ sub www_becomeUser {
|
|||
($password) = WebGUI::SQL->quickArray("select identifier from users where userId='$session{form}{uid}'",$session{dbh});
|
||||
WebGUI::Session::end($session{var}{sessionId});
|
||||
$cookieInfo = $session{form}{uid}."|".crypt($password,"yJ");
|
||||
WebGUI::Session::end($cookieInfo);
|
||||
WebGUI::Session::start($cookieInfo);
|
||||
WebGUI::Session::setCookie("wgSession",$cookieInfo);
|
||||
$output = "";
|
||||
|
|
@ -205,9 +206,8 @@ sub www_editUserSave {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_listUsers {
|
||||
my ($output, $sth, @data, @row, $pn, $i, $itemsPerPage, $search);
|
||||
my ($output, $sth, @data, @row, $dataRows, $prevNextBar, $i, $search);
|
||||
if (WebGUI::Privilege::isInGroup(3)) {
|
||||
$itemsPerPage = 50;
|
||||
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=8&namespace=WebGUI"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a>';
|
||||
$output .= '<h1>'.WebGUI::International::get(149).'</h1>';
|
||||
$output .= '<table class="tableData" align="center" width="75%"><tr><td>';
|
||||
|
|
@ -220,7 +220,6 @@ sub www_listUsers {
|
|||
if ($session{form}{keyword} ne "") {
|
||||
$search = " and (username like '%".$session{form}{keyword}."%' or email like '%".$session{form}{keyword}."%') ";
|
||||
}
|
||||
$output .= '<table border=1 cellpadding=5 cellspacing=0 align="center">';
|
||||
$sth = WebGUI::SQL->read("select userId,username,email from users where username<>'Reserved' $search order by username",$session{dbh});
|
||||
while (@data = $sth->array) {
|
||||
$row[$i] = '<tr class="tableData"><td>';
|
||||
|
|
@ -233,28 +232,12 @@ sub www_listUsers {
|
|||
$row[$i] .= '<td><a href="mailto:'.$data[2].'">'.$data[2].'</a></td></tr>';
|
||||
$i++;
|
||||
}
|
||||
if ($session{form}{pn} < 1) {
|
||||
$pn = 0;
|
||||
} else {
|
||||
$pn = $session{form}{pn};
|
||||
}
|
||||
for ($i=($itemsPerPage*$pn); $i<($itemsPerPage*($pn+1));$i++) {
|
||||
$output .= $row[$i];
|
||||
}
|
||||
$sth->finish;
|
||||
($dataRows, $prevNextBar) = paginate(50,$session{page}{url}.'?op=listUsers',\@row);
|
||||
$output .= '<table border=1 cellpadding=5 cellspacing=0 align="center">';
|
||||
$output .= $dataRows;
|
||||
$output .= '</table>';
|
||||
$output .= '<div class="pagination">';
|
||||
if ($pn > 0) {
|
||||
$output .= '<a href="'.$session{page}{url}.'?pn='.($pn-1).'&op=listUsers">«'.WebGUI::International::get(91).'</a>';
|
||||
} else {
|
||||
$output .= '«'.WebGUI::International::get(91);
|
||||
}
|
||||
$output .= ' · ';
|
||||
if ($pn < round($#row/$itemsPerPage)) {
|
||||
$output .= '<a href="'.$session{page}{url}.'?pn='.($pn+1).'&op=listUsers">'.WebGUI::International::get(92).'»</a>';
|
||||
} else {
|
||||
$output .= WebGUI::International::get(92).'»';
|
||||
}
|
||||
$output .= '</div>';
|
||||
$output .= $prevNextBar;
|
||||
return $output;
|
||||
} else {
|
||||
return WebGUI::Privilege::adminOnly();
|
||||
|
|
|
|||
|
|
@ -14,11 +14,24 @@ use CGI;
|
|||
use Exporter;
|
||||
use FileHandle;
|
||||
use strict;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
|
||||
our @ISA = qw(Exporter);
|
||||
our @EXPORT = qw(&randint &getNextId &saveAttachment &round &urlize "e);
|
||||
our @EXPORT = qw(&paginate &appendToUrl &randint &getNextId &saveAttachment &round &urlize "e);
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub appendToUrl {
|
||||
my ($url);
|
||||
$url = $_[0];
|
||||
if ($url =~ /\?/) {
|
||||
$url .= '&'.$_[1];
|
||||
} else {
|
||||
$url .= '?'.$_[1];
|
||||
}
|
||||
return $url;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getNextId {
|
||||
|
|
@ -28,6 +41,36 @@ sub getNextId {
|
|||
return $id;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub paginate {
|
||||
my ($pn, $i, $dataRows, $prevNextBar, $itemsPerPage, @row, $url);
|
||||
$itemsPerPage = $_[0];
|
||||
$url = $_[1];
|
||||
@row = @{$_[2]};
|
||||
if ($session{form}{pn} < 1) {
|
||||
$pn = 0;
|
||||
} else {
|
||||
$pn = $session{form}{pn};
|
||||
}
|
||||
for ($i=($itemsPerPage*$pn); $i<($itemsPerPage*($pn+1));$i++) {
|
||||
$dataRows .= $row[$i];
|
||||
}
|
||||
$prevNextBar = '<div class="pagination">';
|
||||
if ($pn > 0) {
|
||||
$prevNextBar .= '<a href="'.appendToUrl($url,('pn='.($pn-1))).'">«'.WebGUI::International::get(91).'</a>';
|
||||
} else {
|
||||
$prevNextBar .= '«'.WebGUI::International::get(91);
|
||||
}
|
||||
$prevNextBar .= ' · ';
|
||||
if (($pn+1) < (($#row+1)/$itemsPerPage)) {
|
||||
$prevNextBar .= '<a href="'.appendToUrl($url,('pn='.($pn+1))).'">'.WebGUI::International::get(92).'»</a>';
|
||||
} else {
|
||||
$prevNextBar .= WebGUI::International::get(92).'»';
|
||||
}
|
||||
$prevNextBar .= '</div>';
|
||||
return ($dataRows, $prevNextBar);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# This is here simply to make typing shorter, cuz I'm lazy.
|
||||
sub quote {
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ sub www_edit {
|
|||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(201).'</td><td>'.WebGUI::Form::text("spacer",20,3,$data{spacer}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(202).'</td><td>'.WebGUI::Form::text("width",20,3,$data{width}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(203).'</td><td>'.WebGUI::Form::text("class",20,50,$data{class}).'</td></tr>';
|
||||
$output .= '<tr><td></td><td>'.WebGUI::Form::submit(WebGUI::International::get(204)).'</td></tr>';
|
||||
$output .= '<tr><td></td><td>'.WebGUI::Form::submit(WebGUI::International::get(62)).'</td></tr>';
|
||||
$output .= '</table></form>';
|
||||
return $output;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ sub www_addQuestion {
|
|||
$output .= WebGUI::Form::hidden("func","addQuestionSave");
|
||||
$output .= '<table>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(208).'</td><td>'.WebGUI::Form::textArea("question",'',50,3).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(209).'</td><td>'.WebGUI::Form::textArea("answer").'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(209).'</td><td>'.WebGUI::Form::textArea("answer",'',50,10,1).'</td></tr>';
|
||||
$output .= '<tr><td></td><td>'.WebGUI::Form::submit(WebGUI::International::get(62)).'</td></tr>';
|
||||
$output .= '</table></form>';
|
||||
return $output;
|
||||
|
|
@ -200,7 +200,7 @@ sub www_editQuestion {
|
|||
$output .= WebGUI::Form::hidden("func","editQuestionSave");
|
||||
$output .= '<table>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(208).'</td><td>'.WebGUI::Form::textArea("question",$question{question},50,3).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(209).'</td><td>'.WebGUI::Form::textArea("answer",$question{answer}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(209).'</td><td>'.WebGUI::Form::textArea("answer",$question{answer},50,10,1).'</td></tr>';
|
||||
$output .= '<tr><td></td><td>'.WebGUI::Form::submit(WebGUI::International::get(62)).'</td></tr>';
|
||||
$output .= '</table></form>';
|
||||
return $output;
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ our $namespace = "MessageBoard";
|
|||
use strict;
|
||||
use Tie::CPHash;
|
||||
use WebGUI::DateTime;
|
||||
use WebGUI::Discussion;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Macro;
|
||||
use WebGUI::Privilege;
|
||||
|
|
@ -31,28 +32,9 @@ sub _getBoardProperties {
|
|||
return %board;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub _traverseReplyTree {
|
||||
my ($sth, @data, $html, $depth, $i);
|
||||
for ($i=0;$i<=$_[1];$i++) {
|
||||
$depth .= " ";
|
||||
}
|
||||
$sth = WebGUI::SQL->read("select messageId,subject,username,dateOfPost,userId from message where pid=$_[0] order by messageId", $session{dbh});
|
||||
while (@data = $sth->array) {
|
||||
$html .= '<tr';
|
||||
if ($session{form}{mid} eq $data[0]) {
|
||||
$html .= ' class="highlight"';
|
||||
}
|
||||
$html .= '><td class="tableData">'.$depth.'<a href="'.$session{page}{url}.'?func=showMessage&mid='.$data[0].'&wid='.$session{form}{wid}.'">'.substr($data[1],0,30).'</a></td><td class="tableData"><a href="'.$session{page}{url}.'?op=viewProfile&uid='.$data[4].'">'.$data[2].'</a></td><td class="tableData">'.epochToHuman($data[3],"%M/%D %H:%n%p").'</td></tr>';
|
||||
$html .= _traverseReplyTree($data[0],$_[1]+1);
|
||||
}
|
||||
$sth->finish;
|
||||
return $html;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub purge {
|
||||
WebGUI::SQL->write("delete from message where widgetId=$_[0]",$_[1]);
|
||||
WebGUI::SQL->write("delete from discussion where widgetId=$_[0]",$_[1]);
|
||||
WebGUI::SQL->write("delete from MessageBoard where widgetId=$_[0]",$_[1]);
|
||||
purgeWidget($_[0],$_[1]);
|
||||
}
|
||||
|
|
@ -147,26 +129,14 @@ sub www_editSave {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_editMessage {
|
||||
my ($html, %board, %message);
|
||||
tie %message, 'Tie::CPHash';
|
||||
my (%board);
|
||||
tie %board, 'Tie::CPHash';
|
||||
%board = _getBoardProperties($session{form}{wid});
|
||||
if (WebGUI::Privilege::isInGroup($board{groupToPost},$session{user}{userId})) {
|
||||
%message = WebGUI::SQL->quickHash("select * from message where messageId=$session{form}{mid}",$session{dbh});
|
||||
$html = '<h1>'.WebGUI::International::get(228).'</h1>';
|
||||
$html .= '<form action="'.$session{page}{url}.'" method="post"><table>';
|
||||
$html .= WebGUI::Form::hidden("func","editMessageSave");
|
||||
$html .= WebGUI::Form::hidden("wid",$session{form}{wid});
|
||||
$html .= WebGUI::Form::hidden("mid",$session{form}{mid});
|
||||
$html .= '<tr><td class="formDescription">'.WebGUI::International::get(229).'</td><td>'.WebGUI::Form::text("subject",30,255,$message{subject}).'</td></tr>';
|
||||
$html .= '<tr><td class="formDescription" valign="top">'.WebGUI::International::get(230).'</td><td>'.WebGUI::Form::textArea("message",$message{message},50,6,1).'</td></tr>';
|
||||
$html .= '<tr><td></td><td>'.WebGUI::Form::submit(WebGUI::International::get(62)).'</td></tr>';
|
||||
$html .= '</table></form>';
|
||||
$html .= www_showMessage();
|
||||
return WebGUI::Discussion::editMessage();
|
||||
} else {
|
||||
$html = WebGUI::Privilege::insufficient();
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -175,14 +145,8 @@ sub www_editMessageSave {
|
|||
tie %board, 'Tie::CPHash';
|
||||
%board = _getBoardProperties($session{form}{wid});
|
||||
if (WebGUI::Privilege::isInGroup($board{groupToPost},$session{user}{userId})) {
|
||||
if ($session{form}{subject} eq "") {
|
||||
$session{form}{subject} = WebGUI::International::get(232);
|
||||
}
|
||||
if ($session{form}{message} eq "") {
|
||||
$session{form}{subject} .= ' '.WebGUI::International::get(233);
|
||||
}
|
||||
WebGUI::SQL->write("update message set subject=".quote($session{form}{subject}).", message=".quote("\n --- (Edited at ".localtime(time).") --- \n\n".$session{form}{message})." where messageId=$session{form}{mid}",$session{dbh});
|
||||
return www_showMessage();
|
||||
WebGUI::Discussion::editMessageSave();
|
||||
return www_showMessage();
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
|
|
@ -190,39 +154,23 @@ sub www_editMessageSave {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_postNewMessage {
|
||||
my ($html, %board);
|
||||
my (%board);
|
||||
tie %board, 'Tie::CPHash';
|
||||
%board = _getBoardProperties($session{form}{wid});
|
||||
if (WebGUI::Privilege::isInGroup($board{groupToPost},$session{user}{userId})) {
|
||||
$html = '<h1>'.WebGUI::International::get(231).'</h1>';
|
||||
$html .= '<form action="'.$session{page}{url}.'" method="post"><table>';
|
||||
$html .= WebGUI::Form::hidden("func","postNewMessageSave");
|
||||
$html .= WebGUI::Form::hidden("wid",$session{form}{wid});
|
||||
$html .= '<tr><td class="formDescription">'.WebGUI::International::get(229).'</td><td>'.WebGUI::Form::text("subject",30,255).'</td></tr>';
|
||||
$html .= '<tr><td class="formDescription" valign="top">'.WebGUI::International::get(230).'</td><td>'.WebGUI::Form::textArea("message",'',50,6,1).'</td></tr>';
|
||||
$html .= '<tr><td></td><td>'.WebGUI::Form::submit(WebGUI::International::get(62)).'</td></tr>';
|
||||
$html .= '</table></form>';
|
||||
return WebGUI::Discussion::postNewMessage();
|
||||
} else {
|
||||
$html = WebGUI::Privilege::insufficient();
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_postNewMessageSave {
|
||||
my ($mid, %board);
|
||||
my (%board);
|
||||
tie %board, 'Tie::CPHash';
|
||||
%board = _getBoardProperties($session{form}{wid});
|
||||
if (WebGUI::Privilege::isInGroup($board{groupToPost},$session{user}{userId})) {
|
||||
if ($session{form}{subject} eq "") {
|
||||
$session{form}{subject} = WebGUI::International::get(232);
|
||||
}
|
||||
if ($session{form}{message} eq "") {
|
||||
$session{form}{subject} .= ' '.WebGUI::International::get(233);
|
||||
}
|
||||
$mid = getNextId("messageId");
|
||||
WebGUI::SQL->write("insert into message values ($mid, $mid, $session{form}{wid}, 0, $session{user}{userId}, ".quote($session{user}{username}).", ".quote($session{form}{subject}).", ".quote($session{form}{message}).", ".time().")",$session{dbh});
|
||||
return "";
|
||||
return WebGUI::Discussion::postNewMessageSave();
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
|
|
@ -230,43 +178,23 @@ sub www_postNewMessageSave {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_postReply {
|
||||
my ($html, %board, $subject);
|
||||
my (%board);
|
||||
tie %board, 'Tie::CPHash';
|
||||
%board = _getBoardProperties($session{form}{wid});
|
||||
if (WebGUI::Privilege::isInGroup($board{groupToPost},$session{user}{userId})) {
|
||||
($subject) = WebGUI::SQL->quickArray("select subject from message where messageId=$session{form}{mid}", $session{dbh});
|
||||
$subject = "Re: ".$subject;
|
||||
$html = '<h1>'.WebGUI::International::get(234).'</h1>';
|
||||
$html .= '<form action="'.$session{page}{url}.'" method="post"><table>';
|
||||
$html .= WebGUI::Form::hidden("func","postReplySave");
|
||||
$html .= WebGUI::Form::hidden("wid",$session{form}{wid});
|
||||
$html .= WebGUI::Form::hidden("mid",$session{form}{mid});
|
||||
$html .= '<tr><td class="formDescription">'.WebGUI::International::get(229).'</td><td>'.WebGUI::Form::text("subject",30,255,$subject).'</td></tr>';
|
||||
$html .= '<tr><td class="formDescription" valign="top">'.WebGUI::International::get(230).'</td><td>'.WebGUI::Form::textArea("message",'',50,6,1).'</td></tr>';
|
||||
$html .= '<tr><td></td><td>'.WebGUI::Form::submit(WebGUI::International::get(62)).'</td></tr>';
|
||||
$html .= '</table></form>';
|
||||
$html .= www_showMessage();
|
||||
return WebGUI::Discussion::postReply();
|
||||
} else {
|
||||
$html = WebGUI::Privilege::insufficient();
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_postReplySave {
|
||||
my ($rid, %board, $mid);
|
||||
my (%board);
|
||||
tie %board, 'Tie::CPHash';
|
||||
%board = _getBoardProperties($session{form}{wid});
|
||||
if (WebGUI::Privilege::isInGroup($board{groupToPost},$session{user}{userId})) {
|
||||
if ($session{form}{subject} eq "") {
|
||||
$session{form}{subject} = WebGUI::International::get(232);
|
||||
}
|
||||
if ($session{form}{message} eq "") {
|
||||
$session{form}{subject} .= ' '.WebGUI::International::get(233);
|
||||
}
|
||||
$mid = getNextId("messageId");
|
||||
($rid) = WebGUI::SQL->quickArray("select rid from message where messageId=$session{form}{mid}",$session{dbh});
|
||||
WebGUI::SQL->write("insert into message values ($mid, $rid, $session{form}{wid}, $session{form}{mid}, $session{user}{userId}, ".quote($session{user}{username}).", ".quote($session{form}{subject}).", ".quote($session{form}{message}).", ".time().")", $session{dbh});
|
||||
WebGUI::Discussion::postReplySave();
|
||||
return www_showMessage();
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
|
|
@ -278,7 +206,7 @@ sub www_showMessage {
|
|||
my (@data, $html, %board, %message);
|
||||
tie %message, 'Tie::CPHash';
|
||||
tie %board, 'Tie::CPHash';
|
||||
%message = WebGUI::SQL->quickHash("select * from message where messageId=$session{form}{mid}",$session{dbh});
|
||||
%message = WebGUI::Discussion::getMessage($session{form}{mid});
|
||||
%board = _getBoardProperties($session{form}{wid});
|
||||
$html .= '<h1>'.$message{subject}.'</h1>';
|
||||
$html .= '<table width="100%" cellpadding=3 cellspacing=1 border=0><tr><td class="tableHeader">';
|
||||
|
|
@ -292,31 +220,30 @@ sub www_showMessage {
|
|||
$html .= '<a href="'.$session{page}{url}.'?func=editMessage&mid='.$session{form}{mid}.'&wid='.$session{form}{wid}.'">'.WebGUI::International::get(235).'</a><br>';
|
||||
}
|
||||
$html .= '<a href="'.$session{page}{url}.'">'.WebGUI::International::get(242).'</a><br>';
|
||||
@data = WebGUI::SQL->quickArray("select max(messageId) from message where widgetId=$message{widgetId} and pid=0 and messageId<$message{rid}",$session{dbh});
|
||||
@data = WebGUI::SQL->quickArray("select max(messageId) from discussion where widgetId=$message{widgetId} and pid=0 and messageId<$message{rid}",$session{dbh});
|
||||
if ($data[0] ne "") {
|
||||
$html .= '<a href="'.$session{page}{url}.'?func=showMessage&mid='.$data[0].'&wid='.$session{form}{wid}.'">« '.WebGUI::International::get(241).'</a><br>';
|
||||
# } else {
|
||||
# $html .= '« '.WebGUI::International::get(241).'</a><br>';
|
||||
}
|
||||
@data = WebGUI::SQL->quickArray("select min(messageId) from message where widgetId=$message{widgetId} and pid=0 and messageId>$message{rid}",$session{dbh});
|
||||
@data = WebGUI::SQL->quickArray("select min(messageId) from discussion where widgetId=$message{widgetId} and pid=0 and messageId>$message{rid}",$session{dbh});
|
||||
if ($data[0] ne "") {
|
||||
$html .= '<a href="'.$session{page}{url}.'?func=showMessage&mid='.$data[0].'&wid='.$session{form}{wid}.'">'.WebGUI::International::get(243).' »</a><br>';
|
||||
# } else {
|
||||
# $html .= WebGUI::International::get(243).' »<br>';
|
||||
}
|
||||
$html .= '</tr><tr><td class="tableData">';
|
||||
$message{message} =~ s/\n/\<br\>/g;
|
||||
$html .= $message{message};
|
||||
$html .= '</td></tr></table>';
|
||||
$html .= '<table border=0 cellpadding=2 cellspacing=1 width="100%">';
|
||||
$html .= '<tr><td class="tableHeader">'.WebGUI::International::get(229).'</td><td class="tableHeader">'.WebGUI::International::get(244).'</td><td class="tableHeader">'.WebGUI::International::get(245).'</td></tr>';
|
||||
@data = WebGUI::SQL->quickArray("select messageId,subject,username,dateOfPost,userId from message where messageId=$message{rid}",$session{dbh});
|
||||
@data = WebGUI::SQL->quickArray("select messageId,subject,username,dateOfPost,userId from discussion where messageId=$message{rid}",$session{dbh});
|
||||
$html .= '<tr';
|
||||
if ($session{form}{mid} eq $message{rid}) {
|
||||
$html .= ' class="highlight"';
|
||||
}
|
||||
$html .= '><td class="tableData"><a href="'.$session{page}{url}.'?func=showMessage&mid='.$data[0].'&wid='.$message{widgetId}.'">'.substr($data[1],0,30).'</a></td><td class="tableData"><a href="'.$session{page}{url}.'?op=viewProfile&uid='.$data[4].'">'.$data[2].'</a></td><td class="tableData">'.epochToHuman($data[3],"%M/%D %H:%n%p").'</td></tr>';
|
||||
$html .= _traverseReplyTree($message{rid},1);
|
||||
$html .= WebGUI::Discussion::traverseReplyTree($message{rid},1);
|
||||
$html .= "</table>";
|
||||
return $html;
|
||||
}
|
||||
|
|
@ -344,12 +271,12 @@ sub www_view {
|
|||
$html .= '<table width="100%" cellpadding=3 cellspacing=0 border=0><tr><td align="right" valign="bottom" class="tableMenu"><a href="'.$session{page}{url}.'?func=postNewMessage&wid='.$_[0].'">'.WebGUI::International::get(246).'</a></td></tr></table>';
|
||||
$html .= '<table border=0 cellpadding=2 cellspacing=1 width="100%">';
|
||||
$html .= '<tr><td class="tableHeader">'.WebGUI::International::get(229).'</td><td class="tableHeader">'.WebGUI::International::get(244).'</td><td class="tableHeader">'.WebGUI::International::get(247).'</td><td class="tableHeader">'.WebGUI::International::get(248).'</td><td class="tableHeader">'.WebGUI::International::get(249).'</td></tr>';
|
||||
#$sth = WebGUI::SQL->read("select messageId,subject,count(*)-1,username,dateOfPost,max(dateOfPost),max(messageId) from message where widgetId=$_[0] group by rid order by messageId desc", $session{dbh});
|
||||
$sth = WebGUI::SQL->read("select messageId,subject,username,dateOfPost,userId from message where widgetId=$_[0] and pid=0 order by messageId desc", $session{dbh});
|
||||
#$sth = WebGUI::SQL->read("select messageId,subject,count(*)-1,username,dateOfPost,max(dateOfPost),max(messageId) from discussion where widgetId=$_[0] group by rid order by messageId desc", $session{dbh});
|
||||
$sth = WebGUI::SQL->read("select messageId,subject,username,dateOfPost,userId from discussion where widgetId=$_[0] and pid=0 order by messageId desc", $session{dbh});
|
||||
while (@data = $sth->array) {
|
||||
if ($i >= ($itemsPerPage*$pn) && $i < ($itemsPerPage*($pn+1))) {
|
||||
@last = WebGUI::SQL->quickArray("select messageId,dateOfPost,username,subject,userId from message where widgetId=$_[0] and rid=$data[0] order by dateOfPost desc",$session{dbh});
|
||||
($replies) = WebGUI::SQL->quickArray("select count(*)-1 from message where rid=$data[0]",$session{dbh});
|
||||
@last = WebGUI::SQL->quickArray("select messageId,dateOfPost,username,subject,userId from discussion where widgetId=$_[0] and rid=$data[0] order by dateOfPost desc",$session{dbh});
|
||||
($replies) = WebGUI::SQL->quickArray("select count(*)-1 from discussion where rid=$data[0]",$session{dbh});
|
||||
$html .= '<tr><td class="tableData"><a href="'.$session{page}{url}.'?func=showMessage&mid='.$data[0].'&wid='.$_[0].'">'.substr($data[1],0,30).'</a></td><td class="tableData"><a href="'.$session{page}{url}.'?op=viewProfile&uid='.$data[4].'">'.$data[2].'</a></td><td class="tableData">'.epochToHuman($data[3],"%M/%D %H:%n%p").'</td><td class="tableData">'.$replies.'</td><td class="tableData"><span style="font-size: 8pt;"><a href="'.$session{page}{url}.'?func=showMessage&mid='.$last[0].'&wid='.$_[0].'">'.substr($last[3],0,30).'</a> @ '.epochToHuman($last[1],"%M/%D %H:%n%p").' by <a href="'.$session{page}{url}.'?op=viewProfile&uid='.$last[4].'">'.$last[2].'</a></span></td></tr>';
|
||||
}
|
||||
$i++;
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ sub www_view {
|
|||
if ($data{description} ne "") {
|
||||
$output .= $data{description}.'<p>';
|
||||
}
|
||||
@template = split(/\^\-/,$data{template});
|
||||
@template = split(/\^\-\;/,$data{template});
|
||||
$output .= $template[0];
|
||||
if ($data{DSN} =~ /\DBI\:\w+\:\w+/) {
|
||||
$dbh = DBI->connect($data{DSN},$data{username},$data{identifier});
|
||||
|
|
@ -147,7 +147,7 @@ sub www_view {
|
|||
if (defined $sth) {
|
||||
while (@result = $sth->array) {
|
||||
$temp = $template[1];
|
||||
$temp =~ s/\^(\d)/$result[$1]/g;
|
||||
$temp =~ s/\^(\d)\;/$result[$1]/g;
|
||||
if ($data{convertCarriageReturns}) {
|
||||
$temp =~ s/\n/\<br\>/g;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,18 +24,29 @@ use WebGUI::Widget;
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub _traversePageTree {
|
||||
my ($sth, @data, $output, $depth, $i);
|
||||
for ($i=0;$i<=$_[1];$i++) {
|
||||
$depth .= " ";
|
||||
my ($lineSpacing, $sth, @data, $output, $depth, $i, $toLevel);
|
||||
if ($_[2] > 0) {
|
||||
$toLevel = $_[2];
|
||||
} else {
|
||||
$toLevel = 99;
|
||||
}
|
||||
$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>';
|
||||
$output .= _traversePageTree($data[2],$_[1]+1);
|
||||
}
|
||||
for ($i=1;$i<=$_[1]*$_[3];$i++) {
|
||||
$depth .= " ";
|
||||
}
|
||||
for ($i=1;$i<=$_[5];$i++) {
|
||||
$lineSpacing .= "<br>";
|
||||
}
|
||||
if ($_[1] < $toLevel) {
|
||||
$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.$_[4].' <a href="'.$session{env}{SCRIPT_NAME}.'/'.$data[0].'">'.$data[1].'</a>';
|
||||
$output .= $lineSpacing;
|
||||
$output .= _traversePageTree($data[2],$_[1]+1,$_[2],$_[3],$_[4],$_[5]);
|
||||
}
|
||||
}
|
||||
$sth->finish;
|
||||
}
|
||||
$sth->finish;
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -47,24 +58,29 @@ sub purge {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub widgetName {
|
||||
return "Site Map";
|
||||
return WebGUI::International::get(2,$namespace);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_add {
|
||||
my ($output);
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=1&namespace='.$namespace.'"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a><h1>Add Site Map</h1><form method="post" enctype="multipart/form-data" action="'.$session{page}{url}.'">';
|
||||
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=1&namespace='.$namespace.'"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a>';
|
||||
$output .= '<h1>'.WebGUI::International::get(1,$namespace).'</h1>';
|
||||
$output .= '<form method="post" enctype="multipart/form-data" action="'.$session{page}{url}.'">';
|
||||
$output .= WebGUI::Form::hidden("widget",$namespace);
|
||||
$output .= WebGUI::Form::hidden("func","addSave");
|
||||
$output .= '<table>';
|
||||
$output .= '<tr><td class="formDescription">Title</td><td>'.WebGUI::Form::text("title",20,128,'Site Map').'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Display title?</td><td>'.WebGUI::Form::checkbox("displayTitle",1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Process Macros?</td><td>'.WebGUI::Form::checkbox("processMacros",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 one level?</td><td>'.WebGUI::Form::checkbox("showOnlyThisLevel",1,1).'</td></tr>';
|
||||
$output .= '<tr><td></td><td>'.WebGUI::Form::submit("save").'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(99).'</td><td>'.WebGUI::Form::text("title",20,128,'Site Map').'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(174).'</td><td>'.WebGUI::Form::checkbox("displayTitle",1,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(175).'</td><td>'.WebGUI::Form::checkbox("processMacros",1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</td><td>'.WebGUI::Form::textArea("description",'').'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(3,$namespace).'</td><td>'.WebGUI::Form::checkbox("startAtThisLevel",1,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(4,$namespace).'</td><td>'.WebGUI::Form::text("depth",20,2,0).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(6,$namespace).'</td><td>'.WebGUI::Form::text("indent",20,2,5).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(7,$namespace).'</td><td>'.WebGUI::Form::text("bullet",20,30,'·').'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(8,$namespace).'</td><td>'.WebGUI::Form::text("bullet",20,1,1).'</td></tr>';
|
||||
$output .= '<tr><td></td><td>'.WebGUI::Form::submit(WebGUI::International::get(62)).'</td></tr>';
|
||||
$output .= '</table></form>';
|
||||
return $output;
|
||||
} else {
|
||||
|
|
@ -78,7 +94,7 @@ sub www_addSave {
|
|||
my ($widgetId, $displayTitle, $image, $attachment);
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
$widgetId = create();
|
||||
WebGUI::SQL->write("insert into SiteMap values ($widgetId, '$session{form}{startAtThisLevel}', '$session{form}{showOnlyThisLevel}')",$session{dbh});
|
||||
WebGUI::SQL->write("insert into SiteMap values ($widgetId, '$session{form}{startAtThisLevel}', '$session{form}{depth}', '$session{form}{indent}', ".quote($session{form}{bullet}).", '$session{form}{lineSpacing}')",$session{dbh});
|
||||
return "";
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
|
|
@ -91,17 +107,22 @@ sub www_edit {
|
|||
tie %data, 'Tie::CPHash';
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
%data = WebGUI::SQL->quickHash("select * from widget,SiteMap where widget.widgetId=SiteMap.widgetId and widget.widgetId=$session{form}{wid}",$session{dbh});
|
||||
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=1&namespace='.$namespace.'"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a><h1>Edit Site Map</h1><form method="post" action="'.$session{page}{url}.'">';
|
||||
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=1&namespace='.$namespace.'"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a>';
|
||||
$output .= '<h1>'.WebGUI::International::get(5,$namespace).'</h1>';
|
||||
$output .= '<form method="post" 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,128,$data{title}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Display title?</td><td>'.WebGUI::Form::checkbox("displayTitle",1,$data{displayTitle}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Process Macros?</td><td>'.WebGUI::Form::checkbox("processMacros",1,$data{processMacros}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Description</td><td>'.WebGUI::Form::textArea("description",$data{description}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Starting from this level?</td><td>'.WebGUI::Form::checkbox("startAtThisLevel",1,$data{startAtThisLevel}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">Show only one level?</td><td>'.WebGUI::Form::checkbox("showOnlyThisLevel",1,$data{showOnlyThisLevel}).'</td></tr>';
|
||||
$output .= '<tr><td></td><td>'.WebGUI::Form::submit("save").'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(99).'</td><td>'.WebGUI::Form::text("title",20,128,$data{title}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(174).'</td><td>'.WebGUI::Form::checkbox("displayTitle",1,$data{displayTitle}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(175).'</td><td>'.WebGUI::Form::checkbox("processMacros",1,$data{processMacros}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</td><td>'.WebGUI::Form::textArea("description",$data{description}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(3,$namespace).'</td><td>'.WebGUI::Form::checkbox("startAtThisLevel",1,$data{startAtThisLevel}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(4,$namespace).'</td><td>'.WebGUI::Form::text("depth",20,2,$data{depth}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(6,$namespace).'</td><td>'.WebGUI::Form::text("indent",20,2,$data{indent}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(7,$namespace).'</td><td>'.WebGUI::Form::text("bullet",20,30,$data{bullet}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(8,$namespace).'</td><td>'.WebGUI::Form::text("lineSpacing",20,1,$data{lineSpacing}).'</td></tr>';
|
||||
$output .= '<tr><td></td><td>'.WebGUI::Form::submit(WebGUI::International::get(62)).'</td></tr>';
|
||||
$output .= '</table></form>';
|
||||
return $output;
|
||||
} else {
|
||||
|
|
@ -113,7 +134,7 @@ sub www_edit {
|
|||
sub www_editSave {
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
update();
|
||||
WebGUI::SQL->write("update SiteMap set startAtThisLevel='$session{form}{startAtThisLevel}', showOnlyThisLevel='$session{form}{showOnlyThisLevel}' where widgetId=$session{form}{wid}",$session{dbh});
|
||||
WebGUI::SQL->write("update SiteMap set startAtThisLevel='$session{form}{startAtThisLevel}', depth='$session{form}{depth}', indent='$session{form}{indent}', bullet=".quote($session{form}{bullet}).", lineSpacing='$session{form}{lineSpacing}' where widgetId=$session{form}{wid}",$session{dbh});
|
||||
return "";
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
|
|
@ -122,7 +143,7 @@ sub www_editSave {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_view {
|
||||
my (%data, $output, $sth, @root, $parent);
|
||||
my (%data, $output, $parent);
|
||||
tie %data, 'Tie::CPHash';
|
||||
%data = WebGUI::SQL->quickHash("select * from widget,SiteMap where widget.widgetId=SiteMap.widgetId and widget.widgetId='$_[0]'",$session{dbh});
|
||||
if (defined %data) {
|
||||
|
|
@ -135,16 +156,7 @@ sub www_view {
|
|||
} else {
|
||||
$parent = 1;
|
||||
}
|
||||
$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>';
|
||||
unless ($data{showOnlyThisLevel} eq 1) {
|
||||
$output .= _traversePageTree($root[2],1);
|
||||
}
|
||||
}
|
||||
}
|
||||
$sth->finish;
|
||||
$output .= _traversePageTree($parent,0,$data{depth},$data{indent},$data{bullet},$data{lineSpacing});
|
||||
if ($data{processMacros}) {
|
||||
$output = WebGUI::Macro::process($output);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ use Tie::CPHash;
|
|||
use WebGUI::DateTime;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Macro;
|
||||
use WebGUI::MessageLog;
|
||||
use WebGUI::Operation;
|
||||
use WebGUI::Privilege;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
|
|
@ -51,8 +53,10 @@ sub www_add {
|
|||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(175).'</td><td>'.WebGUI::Form::checkbox("processMacros",1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</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});
|
||||
$array[0] = 4;
|
||||
$output .= '<tr><td class="formDescription" valign="top">'.WebGUI::International::get(1,$namespace).'</td><td>'.WebGUI::Form::selectList("groupToApprove",\%hash,\@array).'</td></tr>';
|
||||
$array[0] = 2;
|
||||
$output .= '<tr><td class="formDescription" valign="top">'.WebGUI::International::get(279).'</td><td>'.WebGUI::Form::selectList("groupToContribute",\%hash,\@array).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription" valign="top">'.WebGUI::International::get(2,$namespace).'</td><td>'.WebGUI::Form::selectList("groupToContribute",\%hash,\@array).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(280).'</td><td>'.WebGUI::Form::text("submissionsPerPage",20,2,50).'</td></tr>';
|
||||
%hash = ("Approved"=>WebGUI::International::get(281),"Denied"=>WebGUI::International::get(282),"Pending"=>WebGUI::International::get(283));
|
||||
$output .= '<tr><td class="formDescription" valign="top">'.WebGUI::International::get(284).'</td><td>'.WebGUI::Form::selectList("defaultStatus",\%hash,'',1).'</td></tr>';
|
||||
|
|
@ -70,7 +74,7 @@ sub www_addSave {
|
|||
my ($widgetId);
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
$widgetId = create();
|
||||
WebGUI::SQL->write("insert into UserSubmission values ($widgetId, $session{form}{groupToContribute}, '$session{form}{submissionsPerPage}', '$session{form}{defaultStatus}')",$session{dbh});
|
||||
WebGUI::SQL->write("insert into UserSubmission values ($widgetId, $session{form}{groupToContribute}, '$session{form}{submissionsPerPage}', '$session{form}{defaultStatus}', $session{form}{groupToApprove})",$session{dbh});
|
||||
return "";
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
|
|
@ -110,9 +114,9 @@ sub www_addSubmission {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_addSubmissionSave {
|
||||
my ($title, $submissionId, $image, $attachment, $status, $groupToContribute);
|
||||
($status, $groupToContribute) = WebGUI::SQL->quickArray("select defaultStatus,groupToContribute from UserSubmission where widgetId=$session{form}{wid}",$session{dbh});
|
||||
if (WebGUI::Privilege::isInGroup($groupToContribute,$session{user}{userId})) {
|
||||
my ($title, $submissionId, $image, $attachment, %userSubmission);
|
||||
%userSubmission = WebGUI::SQL->quickHash("select * from UserSubmission where widgetId=$session{form}{wid}",$session{dbh});
|
||||
if (WebGUI::Privilege::isInGroup($userSubmission{groupToContribute},$session{user}{userId})) {
|
||||
$submissionId = getNextId("submissionId");
|
||||
$image = saveAttachment("image",$session{form}{wid},$submissionId);
|
||||
$attachment = saveAttachment("attachment",$session{form}{wid},$submissionId);
|
||||
|
|
@ -121,13 +125,31 @@ sub www_addSubmissionSave {
|
|||
} else {
|
||||
$title = WebGUI::International::get(290);
|
||||
}
|
||||
WebGUI::SQL->write("insert into UserSubmission_submission values ($session{form}{wid}, $submissionId, ".quote($title).", ".time().", ".quote($session{user}{username}).", '$session{user}{userId}', ".quote($session{form}{content}).", ".quote($image).", ".quote($attachment).", '$status', '$session{form}{convertCarriageReturns}')",$session{dbh});
|
||||
WebGUI::SQL->write("insert into UserSubmission_submission values ($session{form}{wid}, $submissionId, ".quote($title).", ".time().", ".quote($session{user}{username}).", '$session{user}{userId}', ".quote($session{form}{content}).", ".quote($image).", ".quote($attachment).", '$userSubmission{defaultStatus}', '$session{form}{convertCarriageReturns}')",$session{dbh});
|
||||
if ($userSubmission{defaultStatus} ne "Approved") {
|
||||
WebGUI::MessageLog::addEntry('',$userSubmission{groupToApprove},$session{page}{url}.'?func=viewSubmission&wid='.$session{form}{wid}.'&sid='.$submissionId,3,$namespace);
|
||||
}
|
||||
return "";
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_approveSubmission {
|
||||
my (%userSubmission, %submission);
|
||||
if (WebGUI::Privilege::isInGroup(4,$session{user}{userId}) || WebGUI::Privilege::isInGroup(3,$session{user}{userId})) {
|
||||
%submission = WebGUI::SQL->quickHash("select * from UserSubmission_submission where submissionId=$session{form}{sid}",$session{dbh});
|
||||
%userSubmission = WebGUI::SQL->quickHash("select * from UserSubmission where widgetId=$session{form}{wid}",$session{dbh});
|
||||
WebGUI::SQL->write("update UserSubmission_submission set status='Approved' where submissionId=$session{form}{sid}",$session{dbh});
|
||||
WebGUI::MessageLog::addEntry($submission{userId},'',$session{page}{url}.'?func=viewSubmission&wid='.$session{form}{wid}.'&sid='.$session{form}{sid},4,$namespace);
|
||||
WebGUI::MessageLog::completeEntry($session{form}{mlog});
|
||||
return WebGUI::Operation::www_viewMessageLog();
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_deleteAttachment {
|
||||
my ($owner);
|
||||
|
|
@ -179,10 +201,27 @@ sub www_deleteSubmissionConfirm {
|
|||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_denySubmission {
|
||||
my (%submission, %userSubmission);
|
||||
if (WebGUI::Privilege::isInGroup(4,$session{user}{userId}) || WebGUI::Privilege::isInGroup(3,$session{user}{userId})) {
|
||||
%submission = WebGUI::SQL->quickHash("select * from UserSubmission_submission where submissionId=$session{form}{sid}",$session{dbh});
|
||||
%userSubmission = WebGUI::SQL->quickHash("select * from UserSubmission where widgetId=$session{form}{wid}",$session{dbh});
|
||||
WebGUI::SQL->write("update UserSubmission_submission set status='Denied' where submissionId=$session{form}{sid}",$session{dbh}
|
||||
);
|
||||
WebGUI::MessageLog::addEntry($submission{userId},'',$session{page}{url}.'?func=viewSubmission&wid='.$session{form}{wid}.'&sid='.$session{form}{sid},5,$namespace);
|
||||
WebGUI::MessageLog::completeEntry($session{form}{mlog});
|
||||
return WebGUI::Operation::www_viewMessageLog();
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_edit {
|
||||
my ($output, %data, @array, $sth, %hash);
|
||||
tie %data, 'Tie::CPHash';
|
||||
tie %hash, 'Tie::IxHash';
|
||||
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 = '<a href="'.$session{page}{url}.'?op=viewHelp&hid=1&namespace='.$namespace.'"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a>';
|
||||
|
|
@ -195,9 +234,11 @@ sub www_edit {
|
|||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(174).'</td><td>'.WebGUI::Form::checkbox("displayTitle","1",$data{displayTitle}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(175).'</td><td>'.WebGUI::Form::checkbox("processMacros","1",$data{processMacros}).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(85).'</td><td>'.WebGUI::Form::textArea("description",$data{description}).'</td></tr>';
|
||||
$array[0] = $data{groupToContribute};
|
||||
$array[0] = $data{groupToApprove};
|
||||
%hash = WebGUI::SQL->buildHash("select groupId,groupName from groups where groupName<>'Reserved' order by groupName",$session{dbh});
|
||||
$output .= '<tr><td class="formDescription" valign="top">'.WebGUI::International::get(279).'</td><td>'.WebGUI::Form::selectList("groupToContribute",\%hash,\@array,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription" valign="top">'.WebGUI::International::get(1,$namespace).'</td><td>'.WebGUI::Form::selectList("groupToApprove",\%hash,\@array,1).'</td></tr>';
|
||||
$array[0] = $data{groupToContribute};
|
||||
$output .= '<tr><td class="formDescription" valign="top">'.WebGUI::International::get(2,$namespace).'</td><td>'.WebGUI::Form::selectList("groupToContribute",\%hash,\@array,1).'</td></tr>';
|
||||
$output .= '<tr><td class="formDescription">'.WebGUI::International::get(280).'</td><td>'.WebGUI::Form::text("submissionsPerPage",20,2,$data{submissionsPerPage}).'</td></tr>';
|
||||
%hash = ("Approved"=>WebGUI::International::get(281),"Denied"=>WebGUI::International::get(282),"Pending"=>WebGUI::International::get(283));
|
||||
$array[0] = $data{defaultStatus};
|
||||
|
|
@ -214,7 +255,7 @@ sub www_edit {
|
|||
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});
|
||||
WebGUI::SQL->write("update UserSubmission set groupToContribute=$session{form}{groupToContribute}, groupToApprove=$session{form}{groupToApprove}, submissionsPerPage=$session{form}{submissionsPerPage}, defaultStatus='$session{form}{defaultStatus}' where widgetId=$session{form}{wid}",$session{dbh});
|
||||
return "";
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
|
|
@ -258,10 +299,10 @@ sub www_editSubmission {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_editSubmissionSave {
|
||||
my ($owner,$status,$image,$attachment,$title);
|
||||
my ($owner,%userSubmission,$image,$attachment,$title);
|
||||
($owner) = WebGUI::SQL->quickArray("select userId from UserSubmission_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});
|
||||
%userSubmission = WebGUI::SQL->quickHash("select * from UserSubmission where widgetId=$session{form}{wid}",$session{dbh});
|
||||
$image = saveAttachment("image",$session{form}{wid},$session{form}{sid});
|
||||
if ($image ne "") {
|
||||
$image = 'image='.quote($image).', ';
|
||||
|
|
@ -275,7 +316,10 @@ sub www_editSubmissionSave {
|
|||
} else {
|
||||
$title = WebGUI::International::get(290);
|
||||
}
|
||||
WebGUI::SQL->write("update UserSubmission_submission set dateSubmitted=".time().", convertCarriageReturns='$session{form}{convertCarriageReturns}', title=".quote($title).", content=".quote($session{form}{content}).", ".$image.$attachment." status='$status' where submissionId=$session{form}{sid}",$session{dbh});
|
||||
WebGUI::SQL->write("update UserSubmission_submission set dateSubmitted=".time().", convertCarriageReturns='$session{form}{convertCarriageReturns}', title=".quote($title).", content=".quote($session{form}{content}).", ".$image.$attachment." status='$userSubmission{defaultStatus}' where submissionId=$session{form}{sid}",$session{dbh});
|
||||
if ($userSubmission{defaultStatus} ne "Approved") {
|
||||
WebGUI::MessageLog::addEntry('',$userSubmission{groupToApprove},$session{page}{url}.'?func=viewSubmission&wid='.$session{form}{wid}.'&sid='.$session{form}{sid},3,$namespace);
|
||||
}
|
||||
return www_viewSubmission();
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
|
|
@ -284,7 +328,7 @@ sub www_editSubmissionSave {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_view {
|
||||
my (%data, @submission, $output, $widgetId, $sth, @row, $i, $pn);
|
||||
my (%data, @submission, $output, $widgetId, $sth, @row, $i, $dataRows, $prevNextBar);
|
||||
tie %data, 'Tie::CPHash';
|
||||
$widgetId = shift;
|
||||
%data = WebGUI::SQL->quickHash("select * from widget,UserSubmission where widget.widgetId=$widgetId and widget.widgetId=UserSubmission.widgetId",$session{dbh});
|
||||
|
|
@ -305,30 +349,12 @@ sub www_view {
|
|||
}
|
||||
$sth->finish;
|
||||
$output .= '<table width="100%" cellpadding=3 cellspacing=0 border=0><tr><td align="right" class="tableMenu"><a href="'.$session{page}{url}.'?func=addSubmission&wid='.$widgetId.'">'.WebGUI::International::get(294).'</a></td></tr></table>';
|
||||
($dataRows, $prevNextBar) = paginate($data{submissionsPerPage},$session{page}{url},\@row);
|
||||
$output .= '<table width="100%" cellspacing=1 cellpadding=2 border=0>';
|
||||
$output .= '<tr><td class="tableHeader">'.WebGUI::International::get(99).'</td><td class="tableHeader">'.WebGUI::International::get(287).'</td><td class="tableHeader">'.WebGUI::International::get(296).'</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='.$widgetId.'">«'.WebGUI::International::get(91).'</a>';
|
||||
} else {
|
||||
$output .= '«'.WebGUI::International::get(91);
|
||||
}
|
||||
$output .= ' · ';
|
||||
if ($pn < round($#row/$data{submissionsPerPage})) {
|
||||
$output .= '<a href="'.$session{page}{url}.'?pn='.($pn+1).'&wid='.$widgetId.'">'.WebGUI::International::get(91).'»</a>';
|
||||
} else {
|
||||
$output .= WebGUI::International::get(92).'»';
|
||||
}
|
||||
$output .= '</div>';
|
||||
$output .= $dataRows;
|
||||
$output .= '</table>';
|
||||
$output .= $prevNextBar;
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
|
@ -352,22 +378,15 @@ sub www_viewSubmission {
|
|||
$output .= '<a href="'.$session{page}{url}.'?func=editSubmission&wid='.$session{form}{wid}.'&sid='.$session{form}{sid}.'">'.WebGUI::International::get(302).'</a><br>';
|
||||
}
|
||||
if ($submission{status} eq "Pending" && (WebGUI::Privilege::isInGroup(3,$session{user}{userId}) || WebGUI::Privilege::isInGroup(4,$session{user}{userId}))) {
|
||||
$output .= '<a href="'.$session{page}{url}.'?op=approveSubmission&sid='.$session{form}{sid}.'">'.WebGUI::International::get(299).'</a><br>';
|
||||
$output .= '<a href="'.$session{page}{url}.'?op=viewPendingSubmissions">'.WebGUI::International::get(300).'</a><br>';
|
||||
$output .= '<a href="'.$session{page}{url}.'?op=denySubmission&sid='.$session{form}{sid}.'">'.WebGUI::International::get(301).'</a><br>';
|
||||
$output .= '<a href="'.$session{page}{url}.'?func=approveSubmission&wid='.$session{form}{wid}.'&sid='.$session{form}{sid}.'&mlog='.$session{form}{mlog}.'">'.WebGUI::International::get(299).'</a><br>';
|
||||
$output .= '<a href="'.$session{page}{url}.'?op=viewMessageLog">'.WebGUI::International::get(300).'</a><br>';
|
||||
$output .= '<a href="'.$session{page}{url}.'?func=denySubmission&wid='.$session{form}{wid}.'&sid='.$session{form}{sid}.'&mlog='.$session{form}{mlog}.'">'.WebGUI::International::get(301).'</a><br>';
|
||||
}
|
||||
$output .= '</td</tr><tr><td class="tableData">';
|
||||
#---content
|
||||
if ($submission{image} ne "") {
|
||||
$output .= '<img src="'.$session{setting}{attachmentDirectoryWeb}.'/'.$session{form}{wid}.'/'.$session{form}{sid}.'/'.$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}.'">'.WebGUI::International::get(299).'</a> · ';
|
||||
$output .= '<a href="'.$session{page}{url}.'?op=viewPendingSubmissions">'.WebGUI::International::get(300).'</a> · ';
|
||||
$output .= '<a href="'.$session{page}{url}.'?op=denySubmission&sid='.$session{form}{sid}.'">'.WebGUI::International::get(301).'</a> ';
|
||||
$output .= '</div>';
|
||||
}
|
||||
if ($submission{convertCarriageReturns}) {
|
||||
$submission{content} =~ s/\n/\<br\>/g;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ if ($ARGV[0] eq "--help" || $ARGV[0] eq "/?" || $ARGV[0] eq "/help" || $ARGV[0]
|
|||
|
||||
print "\nWebGUI is checking your system environment...\n\n";
|
||||
|
||||
our $os;
|
||||
my $os;
|
||||
if ($^O =~ /Win/i) {
|
||||
$os = "Microsoftish";
|
||||
} else {
|
||||
|
|
@ -76,6 +76,20 @@ if (eval { require LWP }) {
|
|||
}
|
||||
}
|
||||
|
||||
print "HTTP::Request module:\t";
|
||||
if (eval { require HTTP::Request }) {
|
||||
print "OK\n";
|
||||
} else {
|
||||
print "Please install LWP.\n";
|
||||
}
|
||||
|
||||
print "HTTP::Headers module:\t";
|
||||
if (eval { require HTTP::Headers }) {
|
||||
print "OK\n";
|
||||
} else {
|
||||
print "Please install LWP.\n";
|
||||
}
|
||||
|
||||
print "Digest::MD5 module:\t";
|
||||
if (eval { require Digest::MD5 }) {
|
||||
print "OK\n";
|
||||
|
|
@ -226,9 +240,6 @@ unless (eval { $dbh = DBI->connect($config->param('dsn'), $config->param('dbuser
|
|||
###################################
|
||||
|
||||
print "Latest version:\t\t";
|
||||
use LWP::UserAgent;
|
||||
use HTTP::Request;
|
||||
use HTTP::Headers;
|
||||
my ($header, $userAgent, $request, $response, $version, $referer);
|
||||
$userAgent = new LWP::UserAgent;
|
||||
$userAgent->agent("WebGUI-Check/2.0");
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 291 B |
|
Before Width: | Height: | Size: 966 B After Width: | Height: | Size: 966 B |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 923 B After Width: | Height: | Size: 923 B |
|
Before Width: | Height: | Size: 904 B After Width: | Height: | Size: 904 B |
|
Before Width: | Height: | Size: 863 B After Width: | Height: | Size: 863 B |
|
Before Width: | Height: | Size: 869 B After Width: | Height: | Size: 869 B |
|
Before Width: | Height: | Size: 913 B After Width: | Height: | Size: 913 B |
|
Before Width: | Height: | Size: 934 B After Width: | Height: | Size: 934 B |
|
Before Width: | Height: | Size: 868 B After Width: | Height: | Size: 868 B |
|
Before Width: | Height: | Size: 868 B After Width: | Height: | Size: 868 B |
|
Before Width: | Height: | Size: 864 B After Width: | Height: | Size: 864 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 862 B After Width: | Height: | Size: 862 B |
|
Before Width: | Height: | Size: 85 B After Width: | Height: | Size: 85 B |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 867 B After Width: | Height: | Size: 867 B |